Class Parse
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.camunda.bpm.engine.impl.util.xml.Parse
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
- Direct Known Subclasses:
BpmnParse
,DeploymentMetadataParse
public abstract class Parse extends org.xml.sax.helpers.DefaultHandler
- Author:
- Tom Baeyens
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Problem>
errors
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 static java.lang.String
JAXP_SCHEMA_LANGUAGE
protected static java.lang.String
JAXP_SCHEMA_SOURCE
protected static EngineUtilLogger
LOG
protected java.lang.String
name
protected Parser
parser
protected Element
rootElement
protected java.lang.String
schemaResource
protected StreamSource
streamSource
protected static java.lang.String
W3C_XML_SCHEMA
protected java.util.List<Problem>
warnings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addError(java.lang.String errorMessage, Element element)
void
addError(java.lang.String errorMessage, Element element, java.lang.String... elementIds)
void
addError(BpmnParseException e)
void
addError(BpmnParseException e, java.lang.String elementId)
void
addError(org.xml.sax.SAXParseException e)
void
addWarning(java.lang.String errorMessage, Element element)
void
addWarning(java.lang.String errorMessage, Element element, java.lang.String... elementIds)
void
addWarning(org.xml.sax.SAXParseException e)
Parse
execute()
java.util.List<Problem>
getProblems()
Element
getRootElement()
boolean
hasErrors()
boolean
hasWarnings()
void
logWarnings()
Parse
name(java.lang.String name)
protected java.lang.String
resolveAccessExternalSchemaProperty()
void
setSchemaResource(java.lang.String schemaResource)
protected void
setStreamSource(StreamSource streamSource)
Parse
sourceInputStream(java.io.InputStream inputStream)
Parse
sourceResource(java.lang.String resource)
Parse
sourceResource(java.lang.String resource, java.lang.ClassLoader classLoader)
Parse
sourceString(java.lang.String string)
Parse
sourceUrl(java.lang.String url)
Parse
sourceUrl(java.net.URL url)
void
throwExceptionForErrors()
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Field Detail
-
LOG
protected static final EngineUtilLogger LOG
-
JAXP_SCHEMA_SOURCE
protected static final java.lang.String JAXP_SCHEMA_SOURCE
- See Also:
- Constant Field Values
-
JAXP_SCHEMA_LANGUAGE
protected static final java.lang.String JAXP_SCHEMA_LANGUAGE
- See Also:
- Constant Field Values
-
W3C_XML_SCHEMA
protected static final java.lang.String W3C_XML_SCHEMA
- See Also:
- Constant Field Values
-
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
-
parser
protected Parser parser
-
name
protected java.lang.String name
-
streamSource
protected StreamSource streamSource
-
rootElement
protected Element rootElement
-
errors
protected java.util.List<Problem> errors
-
warnings
protected java.util.List<Problem> warnings
-
schemaResource
protected java.lang.String schemaResource
-
-
Constructor Detail
-
Parse
public Parse(Parser parser)
-
-
Method Detail
-
name
public Parse name(java.lang.String name)
-
sourceInputStream
public Parse sourceInputStream(java.io.InputStream inputStream)
-
sourceResource
public Parse sourceResource(java.lang.String resource)
-
sourceUrl
public Parse sourceUrl(java.net.URL url)
-
sourceUrl
public Parse sourceUrl(java.lang.String url)
-
sourceResource
public Parse sourceResource(java.lang.String resource, java.lang.ClassLoader classLoader)
-
sourceString
public Parse sourceString(java.lang.String string)
-
setStreamSource
protected void setStreamSource(StreamSource streamSource)
-
setSchemaResource
public void setSchemaResource(java.lang.String schemaResource)
-
execute
public Parse execute()
-
resolveAccessExternalSchemaProperty
protected java.lang.String resolveAccessExternalSchemaProperty()
-
getRootElement
public Element getRootElement()
-
getProblems
public java.util.List<Problem> getProblems()
-
addError
public void addError(org.xml.sax.SAXParseException e)
-
addError
public void addError(java.lang.String errorMessage, Element element)
-
addError
public void addError(java.lang.String errorMessage, Element element, java.lang.String... elementIds)
-
addError
public void addError(BpmnParseException e)
-
addError
public void addError(BpmnParseException e, java.lang.String elementId)
-
hasErrors
public boolean hasErrors()
-
addWarning
public void addWarning(org.xml.sax.SAXParseException e)
-
addWarning
public void addWarning(java.lang.String errorMessage, Element element)
-
addWarning
public void addWarning(java.lang.String errorMessage, Element element, java.lang.String... elementIds)
-
hasWarnings
public boolean hasWarnings()
-
logWarnings
public void logWarnings()
-
throwExceptionForErrors
public void throwExceptionForErrors()
-
-