|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jbpm.xml.Parse
public class Parse
information related to one single parse operation, for instructions
see Parser
.
Field Summary | |
---|---|
protected java.lang.ClassLoader |
classLoader
|
protected org.w3c.dom.Document |
document
|
protected javax.xml.parsers.DocumentBuilder |
documentBuilder
|
protected java.lang.Object |
documentObject
|
protected org.xml.sax.InputSource |
inputSource
|
protected java.io.InputStream |
inputStream
|
protected java.util.Stack<java.lang.Object> |
objectStack
|
protected Parser |
parser
|
protected java.util.List<Problem> |
problems
|
protected StreamSource |
streamSource
|
Constructor Summary | |
---|---|
protected |
Parse(Parser parser)
|
Method Summary | ||
---|---|---|
void |
addProblem(Problem problem)
to add parsing problems during XML parsing and DOM walking. |
|
void |
addProblem(java.lang.String msg)
add a problem with the default severity . |
|
void |
addProblem(java.lang.String msg,
java.lang.Exception e)
add a problem with an exception cause and the default severity . |
|
void |
addProblem(java.lang.String msg,
java.lang.Exception e,
java.lang.String severity)
adds a problem given message, exception cause and severity |
|
void |
addWarning(java.lang.String msg)
adds a problem with severity warning . |
|
void |
addWarning(java.lang.String msg,
java.lang.Exception e)
adds a problem with severity warning
and an exception as the cause. |
|
Parse |
checkProblems(java.lang.String description)
throws if error level problems are present and logs all problems and warnings. |
|
void |
error(org.xml.sax.SAXParseException e)
part of ErrorHandler to capture XML parsing problems. |
|
Parse |
execute()
perform the actual parse operation with the specified input source. |
|
void |
fatalError(org.xml.sax.SAXParseException e)
part of ErrorHandler to capture XML parsing problems. |
|
|
findObject(java.lang.Class<T> clazz)
search a contextual object in the stack by type. |
|
java.lang.ClassLoader |
getClassLoader()
the ClassLoader used to resolve input resources. |
|
org.w3c.dom.Document |
getDocument()
the Document Object Model (DOM). |
|
java.lang.Object |
getDocumentObject()
the result of this parse operation. |
|
java.util.List<Problem> |
getProblems()
all problems encountered |
|
boolean |
hasProblems()
indicates presence of problems |
|
java.lang.Object |
peekObject()
look up the top contextual object from the stack. |
|
java.lang.Object |
popObject()
remove a contextual object from the stack. |
|
Parse |
pushObject(java.lang.Object object)
push a contextual object on the stack of this parse. |
|
Parse |
setClassLoader(java.lang.ClassLoader classLoader)
specify the classLoader to be used for resource input (this is optional) |
|
Parse |
setDocument(org.w3c.dom.Document document)
normally the Document Object Model is created during the parse execution, but providing a document can be convenient when the DOM is already available and only the walking of the DOM needs to be done by the parser. |
|
void |
setDocumentObject(java.lang.Object object)
provides the result of this parse operation. |
|
Parse |
setFile(java.io.File file)
specify a file as the source for this parse |
|
Parse |
setInputSource(org.xml.sax.InputSource inputSource)
specify an InputStream as the source for this parse |
|
Parse |
setInputStream(java.io.InputStream inputStream)
specify an input stream as the source for this parse |
|
Parse |
setProblems(java.util.List<Problem> problems)
allows to provide the list object that should be used to capture the parsing problems. |
|
Parse |
setResource(java.lang.String resource)
specify a resource as the source for this parse |
|
Parse |
setStreamSource(StreamSource streamSource)
specify a StreamSource as the source for this parse |
|
Parse |
setString(java.lang.String xmlString)
specify an XML string as the source for this parse |
|
Parse |
setUrl(java.net.URL url)
specify a URL as the source for this parse |
|
void |
warning(org.xml.sax.SAXParseException e)
part of ErrorHandler to capture XML parsing problems. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Parser parser
protected java.lang.ClassLoader classLoader
protected StreamSource streamSource
protected java.io.InputStream inputStream
protected org.xml.sax.InputSource inputSource
protected javax.xml.parsers.DocumentBuilder documentBuilder
protected org.w3c.dom.Document document
protected java.util.Stack<java.lang.Object> objectStack
protected java.util.List<Problem> problems
protected java.lang.Object documentObject
Constructor Detail |
---|
protected Parse(Parser parser)
Method Detail |
---|
public Parse setInputStream(java.io.InputStream inputStream)
public Parse setUrl(java.net.URL url)
public Parse setFile(java.io.File file)
public Parse setClassLoader(java.lang.ClassLoader classLoader)
public Parse setResource(java.lang.String resource)
public Parse setString(java.lang.String xmlString)
public Parse setStreamSource(StreamSource streamSource)
StreamSource
as the source for this parse
public Parse setInputSource(org.xml.sax.InputSource inputSource)
public Parse setDocument(org.w3c.dom.Document document)
public Parse execute()
public Parse checkProblems(java.lang.String description)
public java.util.List<Problem> getProblems()
public void addProblem(Problem problem)
public void addProblem(java.lang.String msg)
the default severity
.
public void addProblem(java.lang.String msg, java.lang.Exception e)
the default severity
.
public void addWarning(java.lang.String msg)
severity warning
.
public void addWarning(java.lang.String msg, java.lang.Exception e)
severity warning
and an exception as the cause.
public void addProblem(java.lang.String msg, java.lang.Exception e, java.lang.String severity)
public boolean hasProblems()
public Parse setProblems(java.util.List<Problem> problems)
public void error(org.xml.sax.SAXParseException e)
ErrorHandler
to capture XML parsing problems.
error
in interface org.xml.sax.ErrorHandler
public void fatalError(org.xml.sax.SAXParseException e)
ErrorHandler
to capture XML parsing problems.
fatalError
in interface org.xml.sax.ErrorHandler
public void warning(org.xml.sax.SAXParseException e)
ErrorHandler
to capture XML parsing problems.
warning
in interface org.xml.sax.ErrorHandler
public Parse pushObject(java.lang.Object object)
public java.lang.Object popObject()
public java.lang.Object peekObject()
public <T> T findObject(java.lang.Class<T> clazz)
public java.lang.Object getDocumentObject()
public void setDocumentObject(java.lang.Object object)
public org.w3c.dom.Document getDocument()
public java.lang.ClassLoader getClassLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |