|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.scxml.io.SCXMLDigester
SCXMLParser
instead, after updating the SCXML
document as necessary, in line with newer Working Drafts.
public final class SCXMLDigester
The SCXMLDigester provides the ability to digest a SCXML document into the Java object model provided in the model package.
The SCXMLDigester can be used for:
NOTE: The SCXMLDigester assumes that the SCXML document to be parsed is well-formed and correct. If that assumption does not hold, any subsequent behavior is undefined.
Nested Class Summary | |
---|---|
static class |
SCXMLDigester.DigestSrcAttributeRule
Deprecated. Will be removed in version 1.0 |
static class |
SCXMLDigester.ParseDataRule
Deprecated. Will be removed in version 1.0 |
static class |
SCXMLDigester.ParseExternalContentRule
Deprecated. Will be removed in version 1.0 |
static class |
SCXMLDigester.SetExecutableParentRule
Deprecated. Will be removed in version 1.0 |
static class |
SCXMLDigester.SetPathResolverRule
Deprecated. Will be removed in version 1.0 |
static class |
SCXMLDigester.UpdateFinalizeRule
Deprecated. Will be removed in version 1.0 |
static class |
SCXMLDigester.UpdateModelRule
Deprecated. Will be removed in version 1.0 |
Method Summary | |
---|---|
static SCXML |
digest(InputSource documentInputSource,
ErrorHandler errHandler)
Deprecated. API for standalone usage where the SCXML document is an InputSource. |
static SCXML |
digest(InputSource documentInputSource,
ErrorHandler errHandler,
List customActions)
Deprecated. API for standalone usage where the SCXML document is an InputSource. |
static SCXML |
digest(String documentRealPath,
ErrorHandler errHandler,
PathResolver pathResolver)
Deprecated. API for standalone usage where the SCXML document is a URI. |
static SCXML |
digest(String documentRealPath,
ErrorHandler errHandler,
PathResolver pathResolver,
List customActions)
Deprecated. API for standalone usage where the SCXML document is a URI. |
static SCXML |
digest(URL scxmlURL,
ErrorHandler errHandler)
Deprecated. API for standalone usage where the SCXML document is a URL. |
static SCXML |
digest(URL scxmlURL,
ErrorHandler errHandler,
List customActions)
Deprecated. API for standalone usage where the SCXML document is a URL, and the document uses custom actions. |
static org.apache.commons.digester.Digester |
newInstance()
Deprecated. Obtain a SCXML digester instance for further customization. |
static org.apache.commons.digester.Digester |
newInstance(PathResolver pr)
Deprecated. Obtain a SCXML digester instance for further customization. |
static org.apache.commons.digester.Digester |
newInstance(SCXML scxml,
PathResolver pr)
Deprecated. Obtain a SCXML digester instance for further customization. |
static org.apache.commons.digester.Digester |
newInstance(SCXML scxml,
PathResolver pr,
List customActions)
Deprecated. Obtain a SCXML digester instance for further customization. |
static void |
updateSCXML(SCXML scxml)
Deprecated. Update the SCXML object model and make it SCXMLExecutor ready. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SCXML digest(URL scxmlURL, ErrorHandler errHandler) throws IOException, SAXException, ModelException
API for standalone usage where the SCXML document is a URL.
scxmlURL
- a canonical absolute URL to parse (relative URLs within the
top level document are to be resovled against this URL).errHandler
- The SAX ErrorHandler
IOException
- Underlying Digester parsing threw an IOException
SAXException
- Underlying Digester parsing threw a SAXException
ModelException
- If the resulting document model has flawsErrorHandler
,
PathResolver
public static SCXML digest(String documentRealPath, ErrorHandler errHandler, PathResolver pathResolver) throws IOException, SAXException, ModelException
API for standalone usage where the SCXML document is a URI. A PathResolver must be provided.
pathResolver
- The PathResolver for this contextdocumentRealPath
- The String pointing to the absolute (real) path of the
SCXML documenterrHandler
- The SAX ErrorHandler
IOException
- Underlying Digester parsing threw an IOException
SAXException
- Underlying Digester parsing threw a SAXException
ModelException
- If the resulting document model has flawsErrorHandler
,
PathResolver
public static SCXML digest(InputSource documentInputSource, ErrorHandler errHandler) throws IOException, SAXException, ModelException
API for standalone usage where the SCXML document is an
InputSource. This method may be used when the SCXML document is
packaged in a Java archive, or part of a compound document
where the SCXML root is available as a
org.w3c.dom.Element
or via a java.io.Reader
.
Note: Since there is no path resolution, the SCXML document must not have external state sources.
documentInputSource
- The InputSource for the SCXML documenterrHandler
- The SAX ErrorHandler
IOException
- Underlying Digester parsing threw an IOException
SAXException
- Underlying Digester parsing threw a SAXException
ModelException
- If the resulting document model has flawsErrorHandler
public static SCXML digest(URL scxmlURL, ErrorHandler errHandler, List customActions) throws IOException, SAXException, ModelException
API for standalone usage where the SCXML document is a URL, and the document uses custom actions.
scxmlURL
- a canonical absolute URL to parse (relative URLs within the
top level document are to be resovled against this URL).errHandler
- The SAX ErrorHandlercustomActions
- The list of CustomAction
s this digester
instance will process, can be null or empty
IOException
- Underlying Digester parsing threw an IOException
SAXException
- Underlying Digester parsing threw a SAXException
ModelException
- If the resulting document model has flawsErrorHandler
,
PathResolver
public static SCXML digest(String documentRealPath, ErrorHandler errHandler, PathResolver pathResolver, List customActions) throws IOException, SAXException, ModelException
API for standalone usage where the SCXML document is a URI. A PathResolver must be provided.
pathResolver
- The PathResolver for this contextdocumentRealPath
- The String pointing to the absolute (real) path of the
SCXML documenterrHandler
- The SAX ErrorHandlercustomActions
- The list of CustomAction
s this digester
instance will process, can be null or empty
IOException
- Underlying Digester parsing threw an IOException
SAXException
- Underlying Digester parsing threw a SAXException
ModelException
- If the resulting document model has flawsErrorHandler
,
PathResolver
public static SCXML digest(InputSource documentInputSource, ErrorHandler errHandler, List customActions) throws IOException, SAXException, ModelException
API for standalone usage where the SCXML document is an
InputSource. This method may be used when the SCXML document is
packaged in a Java archive, or part of a compound document
where the SCXML root is available as a
org.w3c.dom.Element
or via a java.io.Reader
.
Note: Since there is no path resolution, the SCXML document must not have external state sources.
documentInputSource
- The InputSource for the SCXML documenterrHandler
- The SAX ErrorHandlercustomActions
- The list of CustomAction
s this digester
instance will process, can be null or empty
IOException
- Underlying Digester parsing threw an IOException
SAXException
- Underlying Digester parsing threw a SAXException
ModelException
- If the resulting document model has flawsErrorHandler
public static org.apache.commons.digester.Digester newInstance()
Obtain a SCXML digester instance for further customization.
API Notes:updateSCXML(SCXML)
method in this class.
updateSCXML(SCXML)
public static org.apache.commons.digester.Digester newInstance(PathResolver pr)
Obtain a SCXML digester instance for further customization.
API Notes:updateSCXML(SCXML)
method in this class.
pr
- The PathResolver, may be null for standalone documents
updateSCXML(SCXML)
public static org.apache.commons.digester.Digester newInstance(SCXML scxml, PathResolver pr)
Obtain a SCXML digester instance for further customization.
API Notes:updateSCXML(SCXML)
method in this class.
scxml
- The parent SCXML document if there is one (in case of
state templates for example), null otherwisepr
- The PathResolver, may be null for standalone documents
updateSCXML(SCXML)
public static org.apache.commons.digester.Digester newInstance(SCXML scxml, PathResolver pr, List customActions)
Obtain a SCXML digester instance for further customization.
API Notes:updateSCXML(SCXML)
method in this class.
scxml
- The parent SCXML document if there is one (in case of
state templates for example), null otherwisepr
- The PathResolver, may be null for standalone documentscustomActions
- The list of CustomAction
s this digester
instance will process, can be null or empty
updateSCXML(SCXML)
public static void updateSCXML(SCXML scxml) throws ModelException
Update the SCXML object model and make it SCXMLExecutor ready.
This is part of post-digester processing, and sets up the necessary
object references throughtout the SCXML object model for the parsed
document. Should be used only if a customized digester obtained
using the newInstance()
methods is needed.
scxml
- The SCXML object (output from Digester)
ModelException
- If the document model has flaws
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |