public abstract class StructureFile extends AlignFile
{
-
private String id;
- public enum StructureFileType
- {
- PDB, MMCIF, MMTF
- };
-
private PDBEntry.Type dbRefType;
/**
* make a friendly ID string.
*
* @param dataName
- * @return truncated dataName to after last '/'
+ * @return truncated dataName to after last '/' and pruned .extension if
+ * present
*/
protected String safeName(String dataName)
{
{
dataName = dataName.substring(p + 1);
}
+ if(dataName.indexOf(".") > -1){
+ dataName = dataName.substring(0, dataName.lastIndexOf("."));
+ }
return dataName;
}
{
this.pdbIdAvailable = pdbIdAvailable;
}
-
- public static boolean isStructureFile(String fileType)
- {
- if (fileType == null)
- {
- return false;
- }
- for (StructureFileType sfType : StructureFileType.values())
- {
- if (sfType.name().equalsIgnoreCase(fileType))
- {
- return true;
- }
- }
- return false;
- }
}