|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
com.bea.p13n.model.DefaultDocumentModel
com.bea.p13n.rules.model.RuleSetModelDocument
public class RuleSetModelDocument
A default model document for RuleSetModels. This also provides common methods for parsing and writing rule-set xml in the preferred manner.
| Field Summary | |
|---|---|
static String |
DEFAULT_ENCODINGThe default character encoding to use, if document's don't specify one themselves. |
static String |
schemaLocationThe xsi:schemaLocation value for rule set documents. |
static Map<String,String> |
suggestedPrefixesThe unmodifiable map of namespace uri to preferred prefix for rule-set xml. |
| Constructor Summary | |
|---|---|
RuleSetModelDocument(InputStream in)Constructor from an input stream. |
|
RuleSetModelDocument(Reader in)Constructor from an input reader. |
|
RuleSetModelDocument(RuleSetModel rs)Constructor from RuleSetModel. |
|
RuleSetModelDocument(String in)Constructor from xml. |
|
| Method Summary | |
|---|---|
static org.apache.xmlbeans.XmlOptions |
getSaveOptions()Get default XmlOptions for saving/outputting rule xml. |
static RuleSetModel |
parseRuleSetModel(InputStream xml, Collection errors)Parse a rule set model from an input stream |
static RuleSetModel |
parseRuleSetModel(Reader xml, Collection errors)Parse a rule set model from a reader. |
static RuleSetModel |
parseRuleSetModel(String xml, Collection errors)Parse a rule set model from xml. |
static com.bea.p13n.rules.schema.RuleSetDocument |
prepareForSave(RuleSetModel rs, String encoding, org.apache.xmlbeans.XmlOptions opts)Prepare a RuleSetDocument xml object from the RuleSetModel. |
static InputStream |
toInputStream(RuleSetModel rs)Get an input stream of the specified RuleSetModel's xml. |
static InputStream |
toInputStream(RuleSetModel rs, String encoding)Get an input stream of the specified RuleSetModel's xml. |
static Reader |
toReader(RuleSetModel rs)Get a reader of the specified RuleSetModel's xml. |
static Reader |
toReader(RuleSetModel rs, String encoding)Get a reader of the specified RuleSetModel's xml. |
static String |
toString(RuleSetModel rs)Get the specified RuleSetModel's xml. |
static String |
toString(RuleSetModel rs, String encoding)Get the specified RuleSetModel's xml. |
| Methods inherited from class com.bea.p13n.model.DefaultDocumentModel |
|---|
addChangeListener, getRootModel, modelChildAdded, modelChildRemoved, modelPropertyChanged, removeChangeListener, setRootModel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Map<String,String> suggestedPrefixes
public static final String DEFAULT_ENCODING
public static final String schemaLocation
| Constructor Detail |
|---|
public RuleSetModelDocument(RuleSetModel rs)
public RuleSetModelDocument(Reader in)
throws org.apache.xmlbeans.XmlException,
IllegalArgumentException,
IOException
org.apache.xmlbeans.XmlException - on a parsing exceptionIllegalArgumentException - if the xml is not valid for RuleSetModel.IOException - on an error reading from the stream.
public RuleSetModelDocument(InputStream in)
throws org.apache.xmlbeans.XmlException,
IllegalArgumentException,
IOException
org.apache.xmlbeans.XmlException - on a parsing exceptionIllegalArgumentException - if the xml is not valid for RuleSetModel.IOException - on an error reading from the stream.
public RuleSetModelDocument(String in)
throws org.apache.xmlbeans.XmlException,
IllegalArgumentException
org.apache.xmlbeans.XmlException - on a parsing exceptionIllegalArgumentException - if the xml is not valid for RuleSetModel.| Method Detail |
|---|
public static RuleSetModel parseRuleSetModel(String xml,
Collection errors)
throws org.apache.xmlbeans.XmlException,
IllegalArgumentException
xml - the xml string.errors - a collection to store any XmlErrors from the parse.org.apache.xmlbeans.XmlException - on a parsing exceptionIllegalArgumentException - if the xml is not valid for RuleSetModel.
public static RuleSetModel parseRuleSetModel(Reader xml,
Collection errors)
throws org.apache.xmlbeans.XmlException,
IllegalArgumentException,
IOException
xml - the xml readererrors - a collection to store any XmlErrors from the parse.org.apache.xmlbeans.XmlException - on a parsing exception.IllegalArgumentException - if the xml is not valid for RuleSetModel.IOException - on an error reading from the stream.
public static RuleSetModel parseRuleSetModel(InputStream xml,
Collection errors)
throws org.apache.xmlbeans.XmlException,
IllegalArgumentException,
IOException
xml - the xml input streaml.errors - a collection to store any XmlErrors from the parse.org.apache.xmlbeans.XmlException - on a parsing exception.IllegalArgumentException - if the xml is not valid for RuleSetModel.IOException - on an error reading from the stream.public static org.apache.xmlbeans.XmlOptions getSaveOptions()
suggestedPrefixes
public static com.bea.p13n.rules.schema.RuleSetDocument prepareForSave(RuleSetModel rs,
String encoding,
org.apache.xmlbeans.XmlOptions opts)
rm - the rule set model.encoding - the encoding to use, null for default.opts - the opts to modify appropriately.public static InputStream toInputStream(RuleSetModel rs)
public static InputStream toInputStream(RuleSetModel rs,
String encoding)
public static Reader toReader(RuleSetModel rs)
public static Reader toReader(RuleSetModel rs,
String encoding)
rs - the rule model.encoding - the character encoding to use, null for model's default encoding.public static String toString(RuleSetModel rs)
public static String toString(RuleSetModel rs,
String encoding)
rs - the rule set model.encoding - the character encoding to use, null for model's default encoding.
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2010, Oracle. All rights reserved.