public class IlrXmlDefaultSchemaDriver extends java.lang.Object implements IlrXmlSchemaDriver
IlrXmlSchemaDriver interface. It translates an XML Schema to an
Execution Object Model (XOM).
The XML schema driver creation may be parameterized by a configuration resource file. The resource file can set the XML parser, the list of XML directories scanned by the parser, and the inner class policy.
IlrXmlErrorException,
IlrReflect| Modifier | Constructor and Description |
|---|---|
|
IlrXmlDefaultSchemaDriver()
Build an instance with an empty default object model.
|
|
IlrXmlDefaultSchemaDriver(IlrReflect model)
Build an instance based on an external object model.
|
|
IlrXmlDefaultSchemaDriver(IlrReflect model,
IlrResources resources)
Build an instance with an object model and a resource file.
|
protected |
IlrXmlDefaultSchemaDriver(IlrReflect model,
IlrResources resources,
ilog.rules.xml.binding.IlrXmlConvertorFactoryImpl convertorFactory) |
|
IlrXmlDefaultSchemaDriver(IlrResources resources)
Build an instance with an empty default object model.
|
| Modifier and Type | Method and Description |
|---|---|
IlrXmlDocumentDriver |
createDocumentDriver()
Create a new IlrXmlDocumentDriver to read and save XML document
instance/p>
|
void |
end()
Dispose properly the allocated memory.
|
IlrXmlError[] |
getErrors()
Get the errors generated during the last model loading operation.
|
IlrReflect |
getModel()
Get the current driver model.
|
IlrXmlError[] |
getWarnings()
Get the warnings generated during the last model loading operation.
|
IlrXmlModel |
getXmlModel()
Get reflection model over dynamic class and instances.
|
IlrReflect |
loadModel(org.xml.sax.InputSource schemaSrc,
IlrXmlNsResolver nsToPackage)
Load an XML Schema and convert it into an
IlrReflect model. |
IlrReflect |
loadModel(java.io.Reader reader,
java.lang.String packageName)
Load an XML Schema and convert it into an
IlrReflect model. |
IlrReflect |
loadModels(org.xml.sax.InputSource[] schemaSrcs,
IlrXmlNsResolver nsToPackage)
Load a set of XML Schema and convert it into an
IlrReflect
model. |
void |
setModel(IlrReflect model)
Set a new object model for the driver.
|
public IlrXmlDefaultSchemaDriver(IlrReflect model, IlrResources resources) throws IlrXmlErrorException
IlrXmlErrorException - if the building fails.model - The XOM.resources - Used to initialize the driver.protected IlrXmlDefaultSchemaDriver(IlrReflect model, IlrResources resources, ilog.rules.xml.binding.IlrXmlConvertorFactoryImpl convertorFactory) throws IlrXmlErrorException
IlrXmlErrorExceptionpublic IlrXmlDefaultSchemaDriver(IlrResources resources) throws IlrXmlErrorException
IlrXmlErrorException - if the building fails.resources - Used to initialize the driver.public IlrXmlDefaultSchemaDriver(IlrReflect model) throws IlrXmlErrorException
IlrXmlErrorException - if the building fails.model - The object model to be used by the driver.public IlrXmlDefaultSchemaDriver()
throws IlrXmlErrorException
IlrXmlErrorException - when the building is impossible.public IlrXmlError[] getWarnings()
getWarnings in interface IlrXmlSchemaDriverpublic IlrXmlError[] getErrors()
getErrors in interface IlrXmlSchemaDriverpublic IlrReflect loadModel(java.io.Reader reader, java.lang.String packageName) throws IlrXmlErrorException
IlrReflect model.
An IlrXmlErrorException is thrown when the parsing or the
model conversion fails.loadModel in interface IlrXmlSchemaDriverIlrXmlErrorExceptionreader - The reader of the XML information.packageName - The package name of the converted classes.public IlrReflect loadModel(org.xml.sax.InputSource schemaSrc, IlrXmlNsResolver nsToPackage) throws IlrXmlErrorException
IlrReflect model.
An IlrXmlErrorException is thrown when the parsing or the
model conversion fails.loadModel in interface IlrXmlSchemaDriverIlrXmlErrorExceptionschemaSrc - The location of the schema to be loaded. To obtain better
error localization and schema importation, the system and
public identification should be set.nsToPackage - The package resolver that converts a namespace into a package
name. If null, the loaded classes are put in the default
package.public IlrReflect loadModels(org.xml.sax.InputSource[] schemaSrcs, IlrXmlNsResolver nsToPackage) throws IlrXmlErrorException
IlrReflect
model. An IlrXmlErrorException is thrown when the parsing or
the model conversion fails.loadModels in interface IlrXmlSchemaDriverIlrXmlErrorExceptionschemaSrcs - The location of the schemas to be loaded. To obtain better
error localization and schema importation, the system and
public identification should be set.nsToPackage - The package resolver that converts a namespace into a package
name. If null, the loaded classes are put in the default
package.public final IlrReflect getModel()
getModel in interface IlrXmlSchemaDriverpublic void setModel(IlrReflect model) throws IlrXmlErrorException
setModel in interface IlrXmlSchemaDriverIlrXmlErrorException - thrown when the model is invalidmodel - the new driver object model.public IlrXmlModel getXmlModel()
getXmlModel in interface IlrXmlSchemaDriverpublic IlrXmlDocumentDriver createDocumentDriver() throws IlrXmlErrorException
Create a new IlrXmlDocumentDriver to read and save XML document instance/p>
createDocumentDriver in interface IlrXmlSchemaDriverIlrXmlErrorExceptionpublic void end()
end in interface IlrXmlSchemaDriver© Copyright IBM Corp. 1987, 2017