import jalview.datamodel.DBRefEntry;
import jalview.datamodel.DBRefSource;
import jalview.datamodel.PDBEntry;
+import jalview.datamodel.PDBEntry.Type;
import jalview.datamodel.SequenceI;
-import jalview.structure.StructureViewSettings;
+import jalview.structure.StructureImportSettings;
import java.awt.Color;
import java.io.IOException;
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
public void xferSettings()
{
- this.visibleChainAnnotation = StructureViewSettings
+ this.visibleChainAnnotation = StructureImportSettings
.isVisibleChainAnnotation();
- this.predictSecondaryStructure = StructureViewSettings
- .isPredictSecondaryStructure();
- this.externalSecondaryStructure = StructureViewSettings
+ this.predictSecondaryStructure = StructureImportSettings
+ .isProcessSecondaryStructure();
+ this.externalSecondaryStructure = StructureImportSettings
.isExternalSecondaryStructure();
}
- public StructureFile(boolean parseImmediately, String inFile, String type)
- throws IOException
+ public StructureFile(boolean parseImmediately, String dataObject,
+ DataSourceType sourceType) throws IOException
{
- super(parseImmediately, inFile, 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) };
- StructureViewSettings.setShowSeqFeatures(false);
- StructureViewSettings.setVisibleChainAnnotation(false);
- StructureViewSettings
- .setPredictSecondaryStructure(predictSecondaryStructure);
- StructureViewSettings
+ StructureImportSettings.setShowSeqFeatures(false);
+ StructureImportSettings.setVisibleChainAnnotation(false);
+ StructureImportSettings
+ .setProcessSecondaryStructure(predictSecondaryStructure);
+ StructureImportSettings
.setExternalSecondaryStructure(externalSecondaryStructure);
Object jmf = constructor.newInstance(args);
AlignmentI al = new Alignment((SequenceI[]) cl.getMethod(
} catch (ClassNotFoundException q)
{
}
- StructureViewSettings.setShowSeqFeatures(true);
+ StructureImportSettings.setShowSeqFeatures(true);
}
public PDBChain findChain(String id) throws Exception
{
for (PDBChain chain : getChains())
{
- if (chain.id.equalsIgnoreCase(id))
+ if (chain.id.equals(id))
{
return chain;
}
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;
}