Package org.helm.notation2.tools
Class Validation
java.lang.Object
org.helm.notation2.tools.Validation
public final class Validation extends Object
Validation class to validate the whole HELM string
- Author:
- hecht
-
Method Summary
Modifier and Type Method Description static List<Monomer>getAllMonomers(org.helm.notation2.parser.notation.polymer.MonomerNotation not, int position)method to get for one MonomerNotation all valid contained monomersstatic List<Monomer>getAllMonomersOnlyBase(org.helm.notation2.parser.notation.polymer.MonomerNotation not)method to get for one MonomerNotation all valid contained monomers.static booleanvalidateConnections(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to valid all existent connections in the Notation objectsstatic booleanvalidateGrouping(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to validate every GroupNotation of the Notation objectsprotected static booleanvalidateMonomers(List<org.helm.notation2.parser.notation.polymer.MonomerNotation> mon)method to validate a list of MonomerNotation objectsstatic voidvalidateNotationObjects(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to check if the generated notation objects by the parser are correct the polymer ids have to be unique; all monomers have to be valid; all used polymer ids in the grouping section have to be there; all connections have to be validstatic booleanvalidateUniquePolymerIDs(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to check if all existent polymer ids are unique
-
Method Details
-
validateNotationObjects
public static void validateNotationObjects(org.helm.notation2.parser.notation.HELM2Notation helm2notation) throws PolymerIDsException, MonomerException, GroupingNotationException, ConnectionNotationException, NotationException, ChemistryException, MonomerLoadingException, org.helm.notation2.parser.exceptionparser.NotationExceptionmethod to check if the generated notation objects by the parser are correct the polymer ids have to be unique; all monomers have to be valid; all used polymer ids in the grouping section have to be there; all connections have to be valid- Parameters:
helm2notation- HELM2Notation object- Throws:
PolymerIDsException- if the polymer section is not validMonomerException- if a monomer is not validGroupingNotationException- if the grouping section is not validConnectionNotationException- if the connection section is not validNotationException- if notation is not validChemistryException- if the Chemistry Engine can not be initializedMonomerLoadingException- monomers can not be loadedorg.helm.notation2.parser.exceptionparser.NotationException- if notation is not valid
-
validateMonomers
protected static boolean validateMonomers(List<org.helm.notation2.parser.notation.polymer.MonomerNotation> mon) throws ChemistryException, MonomerLoadingException, org.helm.notation2.parser.exceptionparser.NotationExceptionmethod to validate a list of MonomerNotation objects- Parameters:
mon- List of MonomerNotation objects- Returns:
- true if all monomers are valid, false otherwise
- Throws:
ChemistryException- if the Chemistry Engine can not be initializedMonomerLoadingException- if monomer loading was not successfullorg.helm.notation2.parser.exceptionparser.NotationException- if notation is not valid
-
validateConnections
public static boolean validateConnections(org.helm.notation2.parser.notation.HELM2Notation helm2notation) throws NotationException, ChemistryExceptionmethod to valid all existent connections in the Notation objects- Parameters:
helm2notation- HELM2Notation object- Returns:
- true if all connections are valid, false otherwise
- Throws:
NotationException- if notation is not validChemistryException- if the Chemistry Engine can not be initialized
-
validateGrouping
public static boolean validateGrouping(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to validate every GroupNotation of the Notation objects- Parameters:
helm2notation- HELM2Notation object- Returns:
- true if the grouping is valid, false otherwise
-
validateUniquePolymerIDs
public static boolean validateUniquePolymerIDs(org.helm.notation2.parser.notation.HELM2Notation helm2notation)method to check if all existent polymer ids are unique- Parameters:
helm2notation- HELM2Notation object- Returns:
- true if all polymers are unique, false otherwise
-
getAllMonomers
public static List<Monomer> getAllMonomers(org.helm.notation2.parser.notation.polymer.MonomerNotation not, int position) throws HELM2HandledException, MonomerException, NotationException, ChemistryException, org.helm.chemtoolkit.CTKException, MonomerLoadingExceptionmethod to get for one MonomerNotation all valid contained monomers- Parameters:
not- MonomerNotationposition- position of monomer notation- Returns:
- List of Monomer
- Throws:
HELM2HandledException- if HELM2 features were thereMonomerException- if monomer is not validNotationException- if notation is not validChemistryException- if the Chemistry Engine can not be initializedorg.helm.chemtoolkit.CTKException- general ChemToolKit exception passed to HELMToolKitMonomerLoadingException- if monomer store can not be loaded
-
getAllMonomersOnlyBase
public static List<Monomer> getAllMonomersOnlyBase(org.helm.notation2.parser.notation.polymer.MonomerNotation not) throws HELM2HandledException, MonomerException, NotationException, ChemistryException, org.helm.chemtoolkit.CTKException, MonomerLoadingExceptionmethod to get for one MonomerNotation all valid contained monomers. But only the Base- Parameters:
not- MonomerNotation- Returns:
- List of all base monomers
- Throws:
HELM2HandledException- if HELM2 features were thereMonomerException- if monomer is not validNotationException- if notation is not validChemistryException- if the Chemistry Engine can not be initializedorg.helm.chemtoolkit.CTKException- general ChemToolKit exception passed to HELMToolKitMonomerLoadingException- if monomers can not be loaded
-