Class ProcessModelXMLHelperTools
- java.lang.Object
-
- de.aristaflow.adept2.model.processmodel.xml.ProcessModelXMLHelperTools
-
public class ProcessModelXMLHelperTools extends Object
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 genericXMLHelperToolscan be used.- Author:
- Marco Waimer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProcessModelXMLHelperTools.LockDescriptionThis class describes a lock, e.g.static classProcessModelXMLHelperTools.SerialisableProcessTypeA lightweight data container for serialising process types without a template proxy.static classProcessModelXMLHelperTools.TemplateInformationA lightweight data container for serialising process types without a template proxy.
-
Constructor Summary
Constructors Constructor Description ProcessModelXMLHelperTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SchemagetSchemaForSchemaType(ProcessModelXMLConstants.SchemaType schemaType)static 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 Detail
-
logger
protected static final Logger logger
The logger instance of this class.
-
-
Method Detail
-
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:
XMLHelperTools.isValid(org.w3c.dom.Node, Schema)
-
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:
XMLHelperTools.validateDocument(org.w3c.dom.Node, Schema)
-
getSchemaForSchemaType
public static Schema getSchemaForSchemaType(ProcessModelXMLConstants.SchemaType schemaType)
- 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
-
-