private static final int PDB_ID_LENGTH = 4;
/**
- * property set when id is a 'manufactured' identifier from the structure data's filename
+ * property set when id is a 'manufactured' identifier from the structure
+ * data's filename
*/
private static final String FAKED_ID = "faked_pdbid";
+
/**
- * property set when the id is authoritative, and should be used in preference to any identifiers in the structure data
+ * property set when the id is authoritative, and should be used in preference
+ * to any identifiers in the structure data
*/
private static final String AUTHORITATIVE_ID = "authoritative_pdbid";
{
// TODO is FILE needed; if not is this enum needed, or can we
// use FileFormatI for PDB, MMCIF?
- PDB("pdb", "pdb"), MMCIF("mmcif", "cif"), BCIF("bcif","bcif"),FILE("?", "?");
+ PDB("pdb", "pdb"), MMCIF("mmcif", "cif"), BCIF("bcif", "bcif"),
+ FILE("?", "?");
/*
* file extension for cached structure file; must be one that
}
return true;
}
-
+
public void setAuthoritative(boolean isAuthoritative)
{
setProperty(AUTHORITATIVE_ID, Boolean.valueOf(isAuthoritative));
}
-
+
/**
*
* @return true if the identifier should be preferred over any identifiers
{
if (_hasProperty(AUTHORITATIVE_ID))
{
- return ((Boolean)getProperty(AUTHORITATIVE_ID));
+ return ((Boolean) getProperty(AUTHORITATIVE_ID));
}
return false;
}
/**
* set when Jalview has manufactured the ID using a local filename
+ *
* @return
*/
public boolean fakedPDBId()
}
return false;
}
+
public void setFakedPDBId(boolean faked)
{
if (faked)
{
setProperty(FAKED_ID, Boolean.TRUE);
}
- else
+ else
{
- if (properties!=null) {
+ if (properties != null)
+ {
properties.remove(FAKED_ID);
}
}