Class ProcessModelXMLHelperTools
java.lang.Object
de.aristaflow.adept2.model.processmodel.xml.ProcessModelXMLHelperTools
Contains important functions for both, XML import and export. Specific for
the ProcessModelXMLHelperTools is the mapping from SchemaType to Schema, so
that the methods from the more generic
XMLHelperTools can be used.- Author:
- Marco Waimer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class describes a lock, e.g.static classA lightweight data container for serialising process types without a template proxy.static classA lightweight data container for serialising process types without a template proxy. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Schemastatic booleanisDocumentValid(Document document, ProcessModelXMLConstants.SchemaType schemaType) Returns whether the givenDocumentis valid against the givenSchemaType.static voidvalidateDocument(Document document, ProcessModelXMLConstants.SchemaType schemaType) Checks, if a document uses a valid schema.
-
Field Details
-
logger
The logger instance of this class.
-
-
Constructor Details
-
ProcessModelXMLHelperTools
public ProcessModelXMLHelperTools()
-
-
Method Details
-
isDocumentValid
public static boolean isDocumentValid(Document document, ProcessModelXMLConstants.SchemaType schemaType) Returns whether the givenDocumentis valid against the givenSchemaType.- Parameters:
document- the document to be validatedschemaType- the type of the schema to validate the document against- Returns:
- whether the given
Documentis valid against the givenSchemaType - See Also:
-
validateDocument
public static void validateDocument(Document document, ProcessModelXMLConstants.SchemaType schemaType) throws XMLFormatException Checks, if a document uses a valid schema.- Parameters:
document- the document, that wants to be checkedschemaType- the type of the document, needed to get the right schema- Throws:
XMLFormatException- when the validation fails- See Also:
-
getSchemaForSchemaType
- Parameters:
schemaType- the type of the schema that is needed- Returns:
- The schema object which is associated with the given schema type or null if no schema is found
-