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 genericXMLHelperTools
can be used.- Author:
- Marco Waimer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProcessModelXMLHelperTools.LockDescription
This class describes a lock, e.g. a lock on a template.static class
ProcessModelXMLHelperTools.SerialisableProcessType
A lightweight data container for serialising process types without a template proxy.static class
ProcessModelXMLHelperTools.TemplateInformation
A 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 Schema
getSchemaForSchemaType(ProcessModelXMLConstants.SchemaType schemaType)
static boolean
isDocumentValid(Document document, ProcessModelXMLConstants.SchemaType schemaType)
Returns whether the givenDocument
is valid against the givenSchemaType
.static void
validateDocument(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 givenDocument
is 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
Document
is 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
-
-