|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
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.CampaignModelDocument
public class CampaignModelDocument
A default model document for CampaignModels. This also provides common methods for parsing and writing campaign xml in the preferred manner.
Field Summary | |
---|---|
static String |
schemaLocation
The xsi:schemaLocation value for campaign documents. |
static Map<String,String> |
suggestedPrefixes
The unmodifiable map of namespace uri to preferred prefix for campaign xml. |
Constructor Summary | |
---|---|
CampaignModelDocument(CampaignModel cam)
Constructor from CampaignModel. |
|
CampaignModelDocument(InputStream in)
Constructor from an input stream. |
|
CampaignModelDocument(Reader in)
Constructor from an input reader. |
|
CampaignModelDocument(String in)
Constructor from xml. |
Method Summary | |
---|---|
static org.apache.xmlbeans.XmlOptions |
getSaveOptions()
Get default XmlOptions for saving/outputting campaign xml. |
static CampaignModel |
parseCampaignModel(InputStream xml,
Collection errors)
Parse a campaign model from an input stream |
static CampaignModel |
parseCampaignModel(Reader xml,
Collection errors)
Parse a campaign model from a reader. |
static CampaignModel |
parseCampaignModel(String xml,
Collection errors)
Parse a campaign model from xml. |
static com.bea.campaign.schema.CampaignDocument |
prepareForSave(CampaignModel cam,
String encoding,
org.apache.xmlbeans.XmlOptions opts)
Prepare a CampaignDocument xml object from the CampaignModel. |
static InputStream |
toInputStream(CampaignModel cam)
Get an input stream of the specified CampaignModel's xml. |
static InputStream |
toInputStream(CampaignModel cam,
String encoding)
Get an input stream of the specified CampaignModel's xml. |
static Reader |
toReader(CampaignModel cam)
Get a reader of the specified CampaignModel's xml. |
static Reader |
toReader(CampaignModel cam,
String encoding)
Get a reader of the specified CampaignModel's xml. |
static String |
toString(CampaignModel cam)
Get the specified CampaignModel's xml. |
static String |
toString(CampaignModel cam,
String encoding)
Get the specified CampaignModel'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 CampaignModelDocument(CampaignModel cam)
public CampaignModelDocument(Reader in) throws org.apache.xmlbeans.XmlException, IllegalArgumentException, IOException
org.apache.xmlbeans.XmlException
- on a parsing exception
IllegalArgumentException
- if the xml is not valid for
CampaignModel.
IOException
- on an error reading from the stream.public CampaignModelDocument(InputStream in) throws org.apache.xmlbeans.XmlException, IllegalArgumentException, IOException
org.apache.xmlbeans.XmlException
- on a parsing exception
IllegalArgumentException
- if the xml is not valid for
CampaignModel.
IOException
- on an error reading from the stream.public CampaignModelDocument(String in) throws org.apache.xmlbeans.XmlException, IllegalArgumentException
org.apache.xmlbeans.XmlException
- on a parsing exception
IllegalArgumentException
- if the xml is not valid for
CampaignModel.Method Detail |
---|
public static CampaignModel parseCampaignModel(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 exception
IllegalArgumentException
- if the xml is not valid for
CampaignModel.public static CampaignModel parseCampaignModel(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
CampaignModel.
IOException
- on an error reading from the stream.public static CampaignModel parseCampaignModel(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
CampaignModel.
IOException
- on an error reading from the stream.public static org.apache.xmlbeans.XmlOptions getSaveOptions()
suggestedPrefixes
public static com.bea.campaign.schema.CampaignDocument prepareForSave(CampaignModel cam, String encoding, org.apache.xmlbeans.XmlOptions opts)
cam
- the campaign model.encoding
- the encoding to use, null for default.opts
- the opts to modify appropriately.public static InputStream toInputStream(CampaignModel cam)
public static InputStream toInputStream(CampaignModel cam, String encoding)
public static Reader toReader(CampaignModel cam)
public static Reader toReader(CampaignModel cam, String encoding)
cam
- the campaign model.encoding
- the character encoding to use, null for the model's
default encoding.public static String toString(CampaignModel cam)
public static String toString(CampaignModel cam, String encoding)
cam
- the campaign model.encoding
- the character encoding to use, null for the model's
default encoding.
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |