|
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.campaign.model.ScenarioModelDocument
public class ScenarioModelDocument
A default model document for ScenarioModels. This also provides common methods for parsing and writing scenario xml in the preferred manner.
| Field Summary | |
|---|---|
static String |
schemaLocationThe xsi:schemaLocation value for scenario documents. |
static Map<String,String> |
suggestedPrefixesThe unmodifiable map of namespace uri to preferred prefix for scenario xml. |
| Constructor Summary | |
|---|---|
ScenarioModelDocument(InputStream in)Constructor from an input stream. |
|
ScenarioModelDocument(Reader in)Constructor from an input reader. |
|
ScenarioModelDocument(ScenarioModel sc)Constructor from ScenarioModel. |
|
ScenarioModelDocument(String in)Constructor from xml. |
|
| Method Summary | |
|---|---|
static org.apache.xmlbeans.XmlOptions |
getSaveOptions()Get default XmlOptions for saving/outputting scenario xml. |
static ScenarioModel |
parseScenarioModel(InputStream xml, Collection errors)Parse a scenario model from an input stream |
static ScenarioModel |
parseScenarioModel(Reader xml, Collection errors)Parse a scenario model from a reader. |
static ScenarioModel |
parseScenarioModel(String xml, Collection errors)Parse a scenario model from xml. |
static com.bea.campaign.schema.scenario.ScenarioDocument |
prepareForSave(ScenarioModel sc, String encoding, org.apache.xmlbeans.XmlOptions opts)Prepare a ScenarioDocument xml object from the ScenarioModel. |
static InputStream |
toInputStream(ScenarioModel sc)Get an input stream of the specified ScenarioModel's xml. |
static InputStream |
toInputStream(ScenarioModel sc, String encoding)Get an input stream of the specified ScenarioModel's xml. |
static Reader |
toReader(ScenarioModel sc)Get a reader of the specified ScenarioModel's xml. |
static Reader |
toReader(ScenarioModel sc, String encoding)Get a reader of the specified ScenarioModel's xml. |
static String |
toString(ScenarioModel sc)Get the specified ScenarioModel's xml. |
static String |
toString(ScenarioModel sc, String encoding)Get the specified ScenarioModel'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 schemaLocation
| Constructor Detail |
|---|
public ScenarioModelDocument(ScenarioModel sc)
public ScenarioModelDocument(Reader in)
throws org.apache.xmlbeans.XmlException,
IllegalArgumentException,
IOException
org.apache.xmlbeans.XmlException - on a parsing exceptionIllegalArgumentException - if the xml is not valid for ScenarioModel.IOException - on an error reading from the stream.
public ScenarioModelDocument(InputStream in)
throws org.apache.xmlbeans.XmlException,
IllegalArgumentException,
IOException
org.apache.xmlbeans.XmlException - on a parsing exceptionIllegalArgumentException - if the xml is not valid for ScenarioModel.IOException - on an error reading from the stream.
public ScenarioModelDocument(String in)
throws org.apache.xmlbeans.XmlException,
IllegalArgumentException
org.apache.xmlbeans.XmlException - on a parsing exceptionIllegalArgumentException - if the xml is not valid for ScenarioModel.| Method Detail |
|---|
public static ScenarioModel parseScenarioModel(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 ScenarioModel.
public static ScenarioModel parseScenarioModel(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 ScenarioModel.IOException - on an error reading from the stream.
public static ScenarioModel parseScenarioModel(InputStream xml,
Collection errors)
throws org.apache.xmlbeans.XmlException,
IllegalArgumentException,
IOException
xml - the xml input stream.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 ScenarioModel.IOException - on an error reading from the stream.public static org.apache.xmlbeans.XmlOptions getSaveOptions()
suggestedPrefixes
public static com.bea.campaign.schema.scenario.ScenarioDocument prepareForSave(ScenarioModel sc,
String encoding,
org.apache.xmlbeans.XmlOptions opts)
sc - the scenario model.encoding - the encoding to use, null for default.opts - the opts to modify appropriately.public static InputStream toInputStream(ScenarioModel sc)
public static InputStream toInputStream(ScenarioModel sc,
String encoding)
public static Reader toReader(ScenarioModel sc)
public static Reader toReader(ScenarioModel sc,
String encoding)
cam - the scenario model.encoding - the character encoding to use, null for the model's default encoding.public static String toString(ScenarioModel sc)
public static String toString(ScenarioModel sc,
String encoding)
cam - the scenario model.encoding - the character encoding to use, null for the 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.