| java.lang.Object org.apache.commons.scxml.io.SCXMLDigester
SCXMLDigester | final public class SCXMLDigester (Code) | | 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:
- Digest a SCXML file into the Commons SCXML Java object model.
- Obtain a SCXML Digester for further customization of the default
ruleset.
|
Inner Class :public static class UpdateModelRule extends Rule | |
Inner Class :public static class SetExecutableParentRule extends Rule | |
Inner Class :public static class ParseExternalContentRule extends NodeCreateRule | |
Inner Class :public static class ParseDataRule extends NodeCreateRule | |
Inner Class :public static class DigestSrcAttributeRule extends Rule | |
Inner Class :public static class SetPathResolverRule extends Rule | |
Inner Class :public static class UpdateFinalizeRule extends Rule | |
Method Summary | |
public static SCXML | digest(URL scxmlURL, ErrorHandler errHandler) | public static SCXML | digest(String documentRealPath, ErrorHandler errHandler, PathResolver pathResolver) API for standalone usage where the SCXML document is a URI. | public static SCXML | digest(InputSource documentInputSource, ErrorHandler errHandler) API for standalone usage where the SCXML document is an
InputSource. | public static SCXML | digest(URL scxmlURL, ErrorHandler errHandler, List customActions) | public static SCXML | digest(String documentRealPath, ErrorHandler errHandler, PathResolver pathResolver, List customActions) API for standalone usage where the SCXML document is a URI. | public static SCXML | digest(InputSource documentInputSource, ErrorHandler errHandler, List customActions) API for standalone usage where the SCXML document is an
InputSource. | public static Digester | newInstance() | public static Digester | newInstance(PathResolver pr) | public static Digester | newInstance(SCXML scxml, PathResolver pr) | public static Digester | newInstance(SCXML scxml, PathResolver pr, List customActions) | public static void | updateSCXML(SCXML scxml) 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. |
digest | public static SCXML digest(URL scxmlURL, ErrorHandler errHandler) throws IOException, SAXException, ModelException(Code) | | API for standalone usage where the SCXML document is a URL.
Parameters: scxmlURL - a canonical absolute URL to parse (relative URLs within thetop level document are to be resovled against this URL). Parameters: errHandler - The SAX ErrorHandler SCXML The SCXML object corresponding to the file argument throws: IOException - Underlying Digester parsing threw an IOException throws: SAXException - Underlying Digester parsing threw a SAXException throws: ModelException - If the resulting document model has flaws See Also: ErrorHandler See Also: PathResolver |
digest | public static SCXML digest(String documentRealPath, ErrorHandler errHandler, PathResolver pathResolver) throws IOException, SAXException, ModelException(Code) | | API for standalone usage where the SCXML document is a URI.
A PathResolver must be provided.
Parameters: pathResolver - The PathResolver for this context Parameters: documentRealPath - The String pointing to the absolute (real) path of theSCXML document Parameters: errHandler - The SAX ErrorHandler SCXML The SCXML object corresponding to the file argument throws: IOException - Underlying Digester parsing threw an IOException throws: SAXException - Underlying Digester parsing threw a SAXException throws: ModelException - If the resulting document model has flaws See Also: ErrorHandler See Also: PathResolver |
digest | public static SCXML digest(InputSource documentInputSource, ErrorHandler errHandler) throws IOException, SAXException, ModelException(Code) | | 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.
Parameters: documentInputSource - The InputSource for the SCXML document Parameters: errHandler - The SAX ErrorHandler SCXML The SCXML object corresponding to the file argument throws: IOException - Underlying Digester parsing threw an IOException throws: SAXException - Underlying Digester parsing threw a SAXException throws: ModelException - If the resulting document model has flaws See Also: ErrorHandler |
digest | public static SCXML digest(URL scxmlURL, ErrorHandler errHandler, List customActions) throws IOException, SAXException, ModelException(Code) | | API for standalone usage where the SCXML document is a URL, and
the document uses custom actions.
Parameters: scxmlURL - a canonical absolute URL to parse (relative URLs within thetop level document are to be resovled against this URL). Parameters: errHandler - The SAX ErrorHandler Parameters: customActions - The list of CustomActions this digesterinstance will process, can be null or empty SCXML The SCXML object corresponding to the file argument throws: IOException - Underlying Digester parsing threw an IOException throws: SAXException - Underlying Digester parsing threw a SAXException throws: ModelException - If the resulting document model has flaws See Also: ErrorHandler See Also: PathResolver |
digest | public static SCXML digest(String documentRealPath, ErrorHandler errHandler, PathResolver pathResolver, List customActions) throws IOException, SAXException, ModelException(Code) | | API for standalone usage where the SCXML document is a URI.
A PathResolver must be provided.
Parameters: pathResolver - The PathResolver for this context Parameters: documentRealPath - The String pointing to the absolute (real) path of theSCXML document Parameters: errHandler - The SAX ErrorHandler Parameters: customActions - The list of CustomActions this digesterinstance will process, can be null or empty SCXML The SCXML object corresponding to the file argument throws: IOException - Underlying Digester parsing threw an IOException throws: SAXException - Underlying Digester parsing threw a SAXException throws: ModelException - If the resulting document model has flaws See Also: ErrorHandler See Also: PathResolver |
digest | public static SCXML digest(InputSource documentInputSource, ErrorHandler errHandler, List customActions) throws IOException, SAXException, ModelException(Code) | | 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.
Parameters: documentInputSource - The InputSource for the SCXML document Parameters: errHandler - The SAX ErrorHandler Parameters: customActions - The list of CustomActions this digesterinstance will process, can be null or empty SCXML The SCXML object corresponding to the file argument throws: IOException - Underlying Digester parsing threw an IOException throws: SAXException - Underlying Digester parsing threw a SAXException throws: ModelException - If the resulting document model has flaws See Also: ErrorHandler |
newInstance | public static Digester newInstance()(Code) | | Obtain a SCXML digester instance for further customization.
API Notes:
- Use the digest() convenience methods if you do not
need a custom digester.
- After the SCXML document is parsed by the customized digester,
the object model must be made executor-ready by calling
updateSCXML(SCXML) method in this class.
Digester A newly configured SCXML digester instance See Also: SCXMLDigester.updateSCXML(SCXML) |
newInstance | public static Digester newInstance(PathResolver pr)(Code) | | Obtain a SCXML digester instance for further customization.
API Notes:
- Use the digest() convenience methods if you do not
need a custom digester.
- After the SCXML document is parsed by the customized digester,
the object model must be made executor-ready by calling
updateSCXML(SCXML) method in this class.
Parameters: pr - The PathResolver, may be null for standalone documents Digester A newly configured SCXML digester instance See Also: SCXMLDigester.updateSCXML(SCXML) |
newInstance | public static Digester newInstance(SCXML scxml, PathResolver pr)(Code) | | Obtain a SCXML digester instance for further customization.
API Notes:
- Use the digest() convenience methods if you do not
need a custom digester.
- After the SCXML document is parsed by the customized digester,
the object model must be made executor-ready by calling
updateSCXML(SCXML) method in this class.
Parameters: scxml - The parent SCXML document if there is one (in case ofstate templates for example), null otherwise Parameters: pr - The PathResolver, may be null for standalone documents Digester A newly configured SCXML digester instance See Also: SCXMLDigester.updateSCXML(SCXML) |
newInstance | public static Digester newInstance(SCXML scxml, PathResolver pr, List customActions)(Code) | | Obtain a SCXML digester instance for further customization.
API Notes:
- Use the digest() convenience methods if you do not
need a custom digester.
- After the SCXML document is parsed by the customized digester,
the object model must be made executor-ready by calling
updateSCXML(SCXML) method in this class.
Parameters: scxml - The parent SCXML document if there is one (in case ofstate templates for example), null otherwise Parameters: pr - The PathResolver, may be null for standalone documents Parameters: customActions - The list of CustomActions this digesterinstance will process, can be null or empty Digester A newly configured SCXML digester instance See Also: SCXMLDigester.updateSCXML(SCXML) |
updateSCXML | public static void updateSCXML(SCXML scxml) throws ModelException(Code) | | 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.
Parameters: scxml - The SCXML object (output from Digester) throws: ModelException - If the document model has flaws |
|
|