import jalview.datamodel.DBRefEntry;
import jalview.datamodel.DBRefSource;
import jalview.datamodel.PDBEntry;
+import jalview.datamodel.PDBEntry.Type;
import jalview.datamodel.SequenceI;
import jalview.structure.StructureImportSettings;
private String id;
- private String dbRefType;
+ private PDBEntry.Type dbRefType;
/**
* set to true to add derived sequence annotations (temp factor read from
private Vector<PDBChain> chains;
- public StructureFile(String inFile, String type) throws IOException
+ public StructureFile(String inFile, DataSourceType sourceType)
+ throws IOException
{
- super(inFile, type);
+ super(inFile, sourceType);
}
public StructureFile(FileParse fp) throws IOException
this.visibleChainAnnotation = StructureImportSettings
.isVisibleChainAnnotation();
this.predictSecondaryStructure = StructureImportSettings
- .isPredictSecondaryStructure();
+ .isProcessSecondaryStructure();
this.externalSecondaryStructure = StructureImportSettings
.isExternalSecondaryStructure();
}
- public StructureFile(boolean parseImmediately, String dataObject, String type)
- throws IOException
+ public StructureFile(boolean parseImmediately, String dataObject,
+ DataSourceType sourceType) throws IOException
{
- super(parseImmediately, dataObject, type);
+ super(parseImmediately, dataObject, sourceType);
}
public StructureFile(boolean a, FileParse fp) throws IOException
DBRefEntry sourceDBRef = new DBRefEntry();
sourceDBRef.setAccessionId(getId());
sourceDBRef.setSource(DBRefSource.PDB);
- sourceDBRef.setStartRes(pdbSequence.getStart());
- sourceDBRef.setEndRes(pdbSequence.getEnd());
pdbSequence.setSourceDBRef(sourceDBRef);
pdbSequence.addPDBId(entry);
pdbSequence.addDBRef(sourceDBRef);
new Object[] {});
AlignmentI al = ((AlignmentI) cl.getMethod("getRNAMLFor",
new Class[] { FileParse.class }).invoke(annotate3d,
- new Object[] { new FileParse(getDataName(), type) }));
+ new Object[] { new FileParse(getDataName(), dataSourceType) }));
for (SequenceI sq : al.getSequences())
{
if (sq.getDatasetSequence() != null)
boolean.class, boolean.class, boolean.class, FileParse.class });
final Object[] args = new Object[] { visibleChainAnnotation,
predictSecondaryStructure, externalSecondaryStructure,
- new FileParse(getDataName(), type) };
+ new FileParse(getDataName(), dataSourceType) };
StructureImportSettings.setShowSeqFeatures(false);
StructureImportSettings.setVisibleChainAnnotation(false);
StructureImportSettings
- .setPredictSecondaryStructure(predictSecondaryStructure);
+ .setProcessSecondaryStructure(predictSecondaryStructure);
StructureImportSettings
.setExternalSecondaryStructure(externalSecondaryStructure);
Object jmf = constructor.newInstance(args);
this.chains = chains;
}
- public String getDbRefType()
+ public Type getDbRefType()
{
return dbRefType;
}
public void setDbRefType(String dbRefType)
{
+ this.dbRefType = Type.valueOf(dbRefType);
+ }
+
+ public void setDbRefType(Type dbRefType)
+ {
this.dbRefType = dbRefType;
}