|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OMFactory
Class OMFactory
Method Summary | |
---|---|
OMAttribute |
createOMAttribute(String localName,
OMNamespace ns,
String value)
|
OMComment |
createOMComment(OMContainer parent,
String content)
Creates a comment. |
OMDocType |
createOMDocType(OMContainer parent,
String content)
Creates DocType/DTD. |
OMDocument |
createOMDocument()
Creates a new OMDocument. |
OMDocument |
createOMDocument(OMXMLParserWrapper builder)
|
OMSourcedElement |
createOMElement(OMDataSource source,
QName qname)
Construct element with arbitrary data source. |
OMSourcedElement |
createOMElement(OMDataSource source,
String localName,
OMNamespace ns)
Construct element with arbitrary data source. |
OMElement |
createOMElement(QName qname)
Create an element with the given QName . |
OMElement |
createOMElement(QName qname,
OMContainer parent)
Create an OMElement with the given QName under the given parent. |
OMElement |
createOMElement(String localName,
OMNamespace ns)
|
OMElement |
createOMElement(String localName,
OMNamespace ns,
OMContainer parent)
|
OMElement |
createOMElement(String localName,
OMNamespace ns,
OMContainer parent,
OMXMLParserWrapper builder)
|
OMElement |
createOMElement(String localName,
String namespaceURI,
String namespacePrefix)
This is almost the same as as createOMElement(localName,OMNamespace) method above. |
OMNamespace |
createOMNamespace(String uri,
String prefix)
Create an OMNamespace instance or retrieve an existing one if the factory supports
pooling. |
OMProcessingInstruction |
createOMProcessingInstruction(OMContainer parent,
String piTarget,
String piData)
Creates a PI. |
OMText |
createOMText(Object dataHandler,
boolean optimize)
|
OMText |
createOMText(OMContainer parent,
char[] charArary,
int type)
|
OMText |
createOMText(OMContainer parent,
OMText source)
Create OMText node that is a copy of the source text node |
OMText |
createOMText(OMContainer parent,
QName text)
|
OMText |
createOMText(OMContainer parent,
QName text,
int type)
|
OMText |
createOMText(OMContainer parent,
String text)
Creates a new OMText node with the given value and appends it to the given parent
element. |
OMText |
createOMText(OMContainer parent,
String text,
int type)
|
OMText |
createOMText(OMContainer parent,
String s,
String mimeType,
boolean optimize)
|
OMText |
createOMText(String s)
|
OMText |
createOMText(String contentID,
DataHandlerProvider dataHandlerProvider,
boolean optimize)
Create a binary OMText node supporting deferred loading of the content. |
OMText |
createOMText(String s,
int type)
|
OMText |
createOMText(String contentID,
OMContainer parent,
OMXMLParserWrapper builder)
|
OMText |
createOMText(String s,
String mimeType,
boolean optimize)
|
Method Detail |
---|
OMDocument createOMDocument()
OMDocument createOMDocument(OMXMLParserWrapper builder)
OMElement createOMElement(String localName, OMNamespace ns)
localName
- ns
- - This can be nullOMElement createOMElement(String localName, OMNamespace ns, OMContainer parent) throws OMException
OMException
OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent, OMXMLParserWrapper builder)
localName
- ns
- - this can be nullparent
- builder
- OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns)
source
- localName
- ns
- OMSourcedElement createOMElement(OMDataSource source, QName qname)
source
- the data sourceqname
- the name of the element produced by the data sourceOMElement createOMElement(String localName, String namespaceURI, String namespacePrefix)
localName
- namespaceURI
- namespacePrefix
-
OMElement createOMElement(QName qname, OMContainer parent) throws OMException
qname
- the QName of the element to createparent
- the OMContainer in which to place the new element
OMException
- if there's a namespace mapping problemOMElement createOMElement(QName qname) throws OMException
QName
. If a namespace URI is given but no prefix,
the method will automatically generate a prefix for the element. If a namespace URI is given,
the method will also add a namespace declaration to the element, binding the auto-generated
prefix or the prefix given in the QName
to the given namespace URI. If neither a
namespace URI nor a prefix is given, no namespace declaration will be added.
qname
- the QName
defining the name of the element to be created
OMException
- TODO: when???OMNamespace createOMNamespace(String uri, String prefix)
OMNamespace
instance or retrieve an existing one if the factory supports
pooling.
uri
- the namespace URI; must not be null
prefix
- the prefix
OMNamespace
instance
IllegalArgumentException
- if uri
is nullOMText createOMText(OMContainer parent, String text)
OMText
node with the given value and appends it to the given parent
element.
parent
- text
-
OMText createOMText(OMContainer parent, OMText source)
parent
- source
-
OMText createOMText(OMContainer parent, QName text)
parent
- text
- - This text itself can contain a namespace inside it.OMText createOMText(OMContainer parent, String text, int type)
parent
- text
- type
- - this should be either of XMLStreamConstants.CHARACTERS,
XMLStreamConstants.CDATA, XMLStreamConstants.SPACE, XMLStreamConstants.ENTITY_REFERENCE
OMText createOMText(OMContainer parent, char[] charArary, int type)
OMText createOMText(OMContainer parent, QName text, int type)
parent
- text
- - This text itself can contain a namespace inside it.type
- OMText createOMText(String s)
s
-
OMText createOMText(String s, int type)
s
- type
- - OMText node can handle SPACE, CHARACTERS, CDATA and ENTITY REFERENCES. For
Constants, use either XMLStreamConstants or constants found in OMNode.
OMText createOMText(String s, String mimeType, boolean optimize)
OMText createOMText(Object dataHandler, boolean optimize)
OMText createOMText(OMContainer parent, String s, String mimeType, boolean optimize)
OMText createOMText(String contentID, DataHandlerProvider dataHandlerProvider, boolean optimize)
OMText
node supporting deferred loading of the content.
contentID
- the content ID identifying the binary content; may be null
dataHandlerProvider
- used to load the DataHandler
when requested from the returned
OMText
nodeoptimize
- determines whether the binary content should be optimized
OMText createOMText(String contentID, OMContainer parent, OMXMLParserWrapper builder)
OMAttribute createOMAttribute(String localName, OMNamespace ns, String value)
OMDocType createOMDocType(OMContainer parent, String content)
parent
- content
-
OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, String piTarget, String piData)
parent
- piTarget
- piData
-
OMComment createOMComment(OMContainer parent, String content)
parent
- content
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |