|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.archive.IlrRulesetArchive
public class IlrRulesetArchive
Model of a ruleset archive. The archive contents are managed by a content manager.
IlrRulesetArchiveBuilderBase
,
IlrRulesetArchiveBuilder
,
IlrRulesetArchiveParser
,
Serialized Form
Nested Class Summary | |
---|---|
class |
IlrRulesetArchive.Element
Model of an archive element. |
static class |
IlrRulesetArchive.RulesetArchiveException
The class of the exception obtained when a problem occurs during the construction or parsing of a ruleset archive. |
Field Summary | |
---|---|
static int |
B2X
A constant used to type an archive element as an element that contains a mapping between a business object model and an executable object model. |
static int |
BOM
A constant used to type an archive element as an element that contains a business object model. |
static int |
ENGINE_CONF
A constant used to type an archive element as an element that contains an engine configuration file. |
static int |
GENERATED
A constant used to type an archive element as an element whose content has been generated by the archive builder. |
static int |
IRL
A constant used to type an archive element as an element that contains IRL code. |
static int |
MISC
A constant used to type an archive element as an element that contains miscellaneous data. |
static int |
USER_DATA
A constant used to type an archive element as an element that contains user data. |
static String |
VARIABLES
The base name of the IRL element that contains the variables declaration for a given package. |
static int |
WSDL
A constant used to type an archive element as an element that contains a WSDL. |
static int |
XOM
A constant used to type an archive element as an element that contains an executable object model. |
static int |
XSD
A constant used to type an archive element as an element that contains an XSD. |
Constructor Summary | |
---|---|
IlrRulesetArchive()
Creates an empty ruleset archive based on UTF-8 encoding. |
|
IlrRulesetArchive(String encoding)
Creates an empty ruleset archive based on the given encoding. |
Method Summary | |
---|---|
boolean |
compare(IlrRulesetArchive archive)
Compares two ruleset archives to determine if they have the same content. |
static IlrRulesetArchive |
extractArchive(IlrRulesetArchiveLoader loader)
Obtains a ruleset archive object filled from the archive given through the archive loader. |
String |
getContent(String entryName)
Returns the contents of an archive element as a string. |
IlrRulesetArchive.Element |
getElement(String key)
Returns the element in the archive whose name is specified by the parameter. |
Collection |
getElements()
Returns the elements that compose the archive. |
Collection |
getElements(int kind)
Returns the elements of a given type contained in the archive. |
String |
getEncoding()
Returns the encoding used in the archive. |
String |
getIRL(String pkgName,
String artifactName)
Returns the IRL code stored in the archive for the specified artifact name and package. |
String |
getRulesetSignature()
Returns the part of the descriptor that contains the ruleset signature, in XML. |
Object |
getSchema(String namespace,
String name)
Returns a schema as an input stream or a URL depending on what is present inside the archive. |
Map |
getSchemaNames(boolean onlyContained)
Returns a map that associates to a namespace all the schema's file names declared or contained inside this archive. |
String |
getXmlEncoding()
Returns the encoding used for the XML parts in the archive. |
boolean |
isBusiness()
Indicates whether the archive is a business archive or not. |
boolean |
isBusinessDataXmlServiceEnable()
Allows you to determine if this ruleset archive parsed will produce a ruleset that could have parameters set with XML BOM objects. |
void |
reset()
Resets the archive. |
void |
setBusinessDataXmlServiceEnable(boolean businessDataXmlServiceEnable)
Enables the use of XML BOM objects as parameters on the ruleset resulting from the parsing of this ruleset archive. |
void |
write(JarOutputStream jarOutputStream)
Writes the ruleset archive contents in the given jar stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VARIABLES
public static final int IRL
0
.
public static final int BOM
1
.
public static final int B2X
2
.
public static final int XOM
3
.
public static final int ENGINE_CONF
4
.
public static final int USER_DATA
5
.
public static final int XSD
6
.
public static final int WSDL
7
.
public static final int MISC
8
.
public static final int GENERATED
20
.
Constructor Detail |
---|
public IlrRulesetArchive(String encoding)
encoding
- The encoding used to store the archive contents.public IlrRulesetArchive()
Method Detail |
---|
public Collection getElements()
public void reset()
public String getEncoding()
public String getXmlEncoding()
public Collection getElements(int kind)
kind
are:
IRL, BOM, B2X, XOM, XSD, WSDL, USER_DATA, ENGINE_CONF, MISC
kind
- The type of the required elements.
public String getRulesetSignature()
public Object getSchema(String namespace, String name)
Returns a schema as an input stream or a URL depending on what is present inside the archive.
namespace
- schema's namespacename
- schema's file name.
IlrRulesetArchiveBuilderBase.addSchema(String, String, java.io.InputStream)
,
IlrRulesetArchiveBuilderBase.addSchema(String, String, java.net.URL)
public Map getSchemaNames(boolean onlyContained)
Returns a map that associates to a namespace all the schema's file names declared or contained inside this archive.
onlyContained
- true if only the schema contained inside this archive should be considered
IlrRulesetArchiveBuilderBase.addSchema(String, String, java.net.URL)
,
IlrRulesetArchiveBuilderBase.addSchema(String, String, java.io.InputStream)
public IlrRulesetArchive.Element getElement(String key)
key
- The name of the element we are looking for.
null
if there is no such
element in the archive.public boolean isBusiness()
A business archive contains business object models, with the IRL based on these models. Translations can be provided to move from the business model to the execution model. If no translation is given, an implicit one-to-one mapping is applied.
true
if the archive is a business archive, else it returns false
.public void write(JarOutputStream jarOutputStream) throws IOException
IOException
jarOutputStream
- The stream in which the archive is persisted.public boolean compare(IlrRulesetArchive archive)
archive
- The archive to compare with this
.
true
if the archives have the same content, else it returns false
.public static IlrRulesetArchive extractArchive(IlrRulesetArchiveLoader loader)
loader
- The loader in charge of archive loading.
public String getIRL(String pkgName, String artifactName)
IlrRulesetArchive.VARIABLES
.
pkgName
- The name of the package given when the artifact was inserted in the archive.artifactName
- The name of the artifact given when the artifact was inserted in the archive.
public String getContent(String entryName)
entryName
- The name of the element whose contents are to be returned.
null
if no such element is found
in the archive.public boolean isBusinessDataXmlServiceEnable()
true
if XML BOM objects could be passed to the parsed ruleset.public void setBusinessDataXmlServiceEnable(boolean businessDataXmlServiceEnable)
businessDataXmlServiceEnable
-
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |