|
ILOG JRules | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.rules.xml.binding.IlrXmlHelper
public class IlrXmlHelper
This class contains some useful static methods to help parameterize and handle an XML data driver.
| Nested Class Summary | |
|---|---|
static class |
IlrXmlHelper.Config
Deprecated. |
| Field Summary | |
|---|---|
static String |
XML_DIRECTORIES
Deprecated. |
static String |
XML_DOC_PARSER_CLASS
Resource name used to define the document parser class, which has to be an implementation of org.xml.sax.XMLReader. |
static String |
XML_DOC_PARSER_OBJECT
Deprecated. |
static String |
XML_ERROR_HANDLER_CLASS
Resource name used to define the error handler class, which has to be an implementation of ilog.rules.xml.util.IlrXmlErrorHandler. |
static String |
XML_ERROR_HANDLER_OBJECT
Deprecated. |
static String |
XML_NS_EVALUATION
Resource name used to define the namespace evaluation mode. |
static String |
XML_SCHEMA_PARSER_CLASS
Resource name used to define the schema parser class, which has to be an implementation of org.xml.sax.XMLReader. |
static String |
XML_SCHEMA_PARSER_OBJECT
Deprecated. |
static String |
XML_SCHEMA_RESOLVER_CLASS
Resource name used to define the schema file resolver class, which is an implementation of ilog.rules.xml.util.IlrXsdLocationResolver). |
static String |
XML_XOM_MAPPER
Deprecated. |
static String |
XML_XOM_MAPPER_CLASS
Resource name used to define the XML-XOM mapper class, which has to be an implementation of ilog.rules.xml.util.IlrXmlXomMapper. |
| Constructor Summary | |
|---|---|
IlrXmlHelper()
|
|
| Method Summary | |
|---|---|
static IlrXmlObject |
assertXmlObject(IlrContext context,
String xsdFile,
String pckName,
String xmlFile)
Adds the XML object defined by its XML data file and its schema model description in a context. |
static IlrXmlDataDriver |
createDataDriver(IlrContext context)
Creates a new data driver from a context. |
static IlrXmlDataDriver |
createDataDriver(IlrResources resources)
Creates a new data driver given a list of parameters. |
static IlrXmlDataDriver |
createDataDriver(IlrRuleset ruleset)
Creates a new data driver from a ruleset. |
static IlrXmlDataDriver |
createDataDriver(IlrXmlHelper.Config config)
Deprecated. |
static String |
getCanonicalName(String name)
Returns a canonical file name. |
static IlrXmlNsResolver |
getNamespaceResolver(String defaultPackage)
Returns a namespace resolver based on a unique default package. |
static boolean |
mergeXoms(IlrReflect fromXom,
IlrReflect toXom,
IlrSelector selector)
Merges two dynamic XOM properties. |
static InputSource |
openFile(String fileName)
Open a local file as a well-initialized InputSource
instance. |
static InputSource |
openFile(String fileName,
IlrResources resource)
Open a local file as a well-initialized InputSource
instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String XML_SCHEMA_PARSER_OBJECT
public static final String XML_DOC_PARSER_OBJECT
public static final String XML_ERROR_HANDLER_OBJECT
public static final String XML_DIRECTORIES
public static final String XML_XOM_MAPPER
public static final String XML_NS_EVALUATION
public static final String XML_SCHEMA_RESOLVER_CLASS
ilog.rules.xml.util.IlrXsdLocationResolver).
IlrXsdLocationResolver,
Constant Field Valuespublic static final String XML_XOM_MAPPER_CLASS
ilog.rules.xml.util.IlrXmlXomMapper.
IlrXmlXomMapper,
Constant Field Valuespublic static final String XML_ERROR_HANDLER_CLASS
ilog.rules.xml.util.IlrXmlErrorHandler.
IlrXmlErrorHandler,
Constant Field Valuespublic static final String XML_SCHEMA_PARSER_CLASS
org.xml.sax.XMLReader.
public static final String XML_DOC_PARSER_CLASS
org.xml.sax.XMLReader.
| Constructor Detail |
|---|
public IlrXmlHelper()
| Method Detail |
|---|
public static InputSource openFile(String fileName)
throws FileNotFoundException
InputSource
instance.
FileNotFoundException
public static InputSource openFile(String fileName,
IlrResources resource)
throws FileNotFoundException
InputSource
instance.
FileNotFoundExceptionpublic static String getCanonicalName(String name)
name - The URL of the file.
public static IlrXmlNsResolver getNamespaceResolver(String defaultPackage)
defaultPackage - The default package of the translated Java class.
public static IlrXmlDataDriver createDataDriver(IlrRuleset ruleset)
throws IlrXmlErrorException
IlrXmlErrorExceptionruleset - The ruleset from which to take a data driver.
public static IlrXmlDataDriver createDataDriver(IlrContext context)
throws IlrXmlErrorException
IlrXmlErrorExceptioncontext - The IlrContext from which to take a data
driver.
public static IlrXmlObject assertXmlObject(IlrContext context,
String xsdFile,
String pckName,
String xmlFile)
throws IlrXmlErrorException,
FileNotFoundException
IlrXmlErrorException - when there are errors during the schema or the document
file parsing.
FileNotFoundException - when the schema or the document file are not found.context - The context where the object is recursively added.xsdFile - The XSD file name defining the model of the object.pckName - The package where the object's class is defined.xmlFile - The XML data file that stores the XML objects.
public static boolean mergeXoms(IlrReflect fromXom,
IlrReflect toXom,
IlrSelector selector)
fromXom - The source XOM.toXom - The final XOM.selector - The selector to be applied. Can be null.
public static IlrXmlDataDriver createDataDriver(IlrResources resources)
throws IlrXmlErrorException
IlrXmlErrorException
public static IlrXmlDataDriver createDataDriver(IlrXmlHelper.Config config)
throws IlrXmlErrorException
IlrXmlErrorException
|
ILOG JRules | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||