Class AbstractModelParser
- java.lang.Object
-
- org.camunda.bpm.model.xml.impl.parser.AbstractModelParser
-
- Direct Known Subclasses:
BpmnParser
,CmmnParser
,DmnParser
public abstract class AbstractModelParser extends java.lang.Object
- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
JAXP_ACCESS_EXTERNAL_SCHEMA
protected static java.lang.String
JAXP_ACCESS_EXTERNAL_SCHEMA_ALL
protected static java.lang.String
JAXP_ACCESS_EXTERNAL_SCHEMA_SYSTEM_PROPERTY
protected javax.xml.validation.SchemaFactory
schemaFactory
protected java.util.Map<java.lang.String,javax.xml.validation.Schema>
schemas
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractModelParser()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addSchema(java.lang.String namespaceURI, javax.xml.validation.Schema schema)
protected void
configureFactory(javax.xml.parsers.DocumentBuilderFactory dbf)
allows subclasses to configure theDocumentBuilderFactory
.protected abstract ModelInstance
createModelInstance(DomDocument document)
protected javax.xml.validation.Schema
createSchema(java.lang.String location, java.lang.ClassLoader classLoader)
ModelInstance
getEmptyModel()
protected javax.xml.validation.Schema
getSchema(DomDocument document)
ModelInstance
parseModelFromStream(java.io.InputStream inputStream)
protected java.lang.String
resolveAccessExternalSchemaProperty()
void
validateModel(DomDocument document)
Validate DOM document
-
-
-
Field Detail
-
JAXP_ACCESS_EXTERNAL_SCHEMA
protected static final java.lang.String JAXP_ACCESS_EXTERNAL_SCHEMA
- See Also:
- Constant Field Values
-
JAXP_ACCESS_EXTERNAL_SCHEMA_SYSTEM_PROPERTY
protected static final java.lang.String JAXP_ACCESS_EXTERNAL_SCHEMA_SYSTEM_PROPERTY
- See Also:
- Constant Field Values
-
JAXP_ACCESS_EXTERNAL_SCHEMA_ALL
protected static final java.lang.String JAXP_ACCESS_EXTERNAL_SCHEMA_ALL
- See Also:
- Constant Field Values
-
schemaFactory
protected javax.xml.validation.SchemaFactory schemaFactory
-
schemas
protected java.util.Map<java.lang.String,javax.xml.validation.Schema> schemas
-
-
Method Detail
-
configureFactory
protected void configureFactory(javax.xml.parsers.DocumentBuilderFactory dbf)
allows subclasses to configure theDocumentBuilderFactory
.- Parameters:
dbf
- the factory to configure
-
resolveAccessExternalSchemaProperty
protected java.lang.String resolveAccessExternalSchemaProperty()
-
parseModelFromStream
public ModelInstance parseModelFromStream(java.io.InputStream inputStream)
-
getEmptyModel
public ModelInstance getEmptyModel()
-
validateModel
public void validateModel(DomDocument document)
Validate DOM document- Parameters:
document
- the DOM document to validate
-
getSchema
protected javax.xml.validation.Schema getSchema(DomDocument document)
-
addSchema
protected void addSchema(java.lang.String namespaceURI, javax.xml.validation.Schema schema)
-
createSchema
protected javax.xml.validation.Schema createSchema(java.lang.String location, java.lang.ClassLoader classLoader)
-
createModelInstance
protected abstract ModelInstance createModelInstance(DomDocument document)
-
-