ssAnnotDescriptionInPDB = ssAnnotationsInPDB[0].description;
}
-- //Match the PDB entry using file path in the pdb data model and get the provider
- Vector<PDBEntry> pdbEntries = seq.getDatasetSequence().getAllPDBEntries();
- for(PDBEntry pdbEntry : pdbEntries) {
- if(ssStructFilePathNameInPDB!=null && pdbEntry.getFile()!=null && ssStructFilePathNameInPDB.startsWith(pdbEntry.getFile())) {
- provider = pdbEntry.getProvider();
- break;
- }
- }
-
- //Add provider value as property to the ss annotation
- if(provider != null) {
- AlignmentAnnotation[] ssAnnotList = ds.getAnnotation(Constants.SS_ANNOTATION_LABEL);
- if(ssAnnotList != null) {
- for(AlignmentAnnotation ssAnnot : ssAnnotList) {
- //Match the annotation description with the annotation in pdb data object
- if(ssAnnot.getProperty(Constants.SS_PROVIDER_PROPERTY) == null
- && ssAnnot.description.equals(ssAnnotDescriptionInPDB)) {
- ssAnnot.setProperty(Constants.SS_PROVIDER_PROPERTY, provider);
- if(seq.getDatasetSequence() != null) {
- Vector<PDBEntry> pdbEntries = seq.getDatasetSequence().getAllPDBEntries();
- if(pdbEntries != null) {
- for(PDBEntry pdbEntry : pdbEntries) {
- if(ssStructFilePathNameInPDB.startsWith(pdbEntry.getFile())) {
- provider = pdbEntry.getProvider();
- break;
- }
++ // Match the PDB entry using file path in the pdb data model and get the
++ // provider
++ if (seq.getDatasetSequence() != null)
++ {
++ Vector<PDBEntry> pdbEntries = seq.getDatasetSequence()
++ .getAllPDBEntries();
++ for (PDBEntry pdbEntry : pdbEntries)
++ {
++ if (ssStructFilePathNameInPDB != null
++ && pdbEntry.getFile() != null && ssStructFilePathNameInPDB
++ .startsWith(pdbEntry.getFile()))
++ {
++ provider = pdbEntry.getProvider();
++ break;
+ }
-
-
- //Add provider value as property to the ss annotation
- if(provider != null) {
- AlignmentAnnotation[] ssAnnotList = ds.getAnnotation(Constants.SS_ANNOTATION_LABEL);
- if(ssAnnotList != null) {
- for(AlignmentAnnotation ssAnnot : ssAnnotList) {
- //Match the annotation description with the annotation in pdb data object
- if(ssAnnot.getProperty(Constants.SS_PROVIDER_PROPERTY) == null
- && ssAnnot.description.equals(ssAnnotDescriptionInPDB)) {
- ssAnnot.setProperty(Constants.SS_PROVIDER_PROPERTY, provider);
- }
++ }
++ // Add provider value as property to the ss annotation
++ if (provider != null)
++ {
++ AlignmentAnnotation[] ssAnnotList = ds
++ .getAnnotation(Constants.SS_ANNOTATION_LABEL);
++ if (ssAnnotList != null)
++ {
++ for (AlignmentAnnotation ssAnnot : ssAnnotList)
++ {
++ // Match the annotation description with the annotation in pdb
++ // data object
++ if (ssAnnot
++ .getProperty(Constants.SS_PROVIDER_PROPERTY) == null
++ && ssAnnot.description
++ .equals(ssAnnotDescriptionInPDB))
++ {
++ ssAnnot.setProperty(Constants.SS_PROVIDER_PROPERTY,
++ provider);
+ }
}
}
}