|
xArch/xADL 2.0 Data Binding Library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface is implemented by classes that are entrypoint classes
for an xArch-based data binding library.
The primary purpose of implementations of this interface is to serve as
a factory objects for top-level document objects (IXArch
objects) and to provide implementations for implementation-dependent
utility methods that don't fit anywhere else.
The Apigen-generated data binding library is DOM-based, and this
interface is implemented by the DOMBasedXArchImplementation
class. Other data binding library implementations will have different
implementations of this interface.
| Method Summary | |
IXArch |
cloneXArch(IXArch xArch)
Clones a document. |
IXArch |
cloneXArch(IXArch xArch,
Object params)
Clones a document, allowing the user to pass some parameters to the implementation. |
IXArchContext |
createContext(IXArch xArch,
String contextType)
Creates a context object that can be used for creating, recontextualizing, and promoting elements in that context (XML namespace). |
IXArch |
createXArch()
Create a new xArch-based document. |
IXArch |
createXArch(Object params)
Create a new xArch-based document, allowing some creation parameters to be passed to the implementation. |
boolean |
isContainedIn(IXArch xArch,
IXArchElement elt)
Determines if a given IXArchElement is contained (a child of) a given IXArch. |
IXArch |
parse(Object documentSource)
Parses a document from a given source. |
String |
serialize(IXArch xArch,
Object params)
Serializes a document into a string format. |
| Method Detail |
public IXArch createXArch()
IXArch corresponding
to a newly created document.public IXArch createXArch(Object params)
params - Object containing parameters to use when creating
the new document.
IXArch corresponding
to a newly created document.
public IXArchContext createContext(IXArch xArch,
String contextType)
xArch - The top-level element in the document in which the context
should be created.contextType - The name of the context to create. If the context object
desired is, say, TypesContext then the contextType
parameter will be "types".
TypesContext then the
result must be typcast to the ITypesContext interface.public IXArch cloneXArch(IXArch xArch)
xArch - The top-level element of the document to clone.
public IXArch cloneXArch(IXArch xArch,
Object params)
xArch - The top-level element of the document to clone.params - Parameters to use when cloning.
public boolean isContainedIn(IXArch xArch,
IXArchElement elt)
xArch - IXArch to check for the element.elt - Element to check for parentage.
true if the element is attached,
false otherwise.
public IXArch parse(Object documentSource)
throws XArchParseException
java.lang.IllegalArgumentException if
the source type is invalid, and a XArchParseException
if the source type is valid, but the parsing failed.
documentSource - The source from which to parse a document
into a set of data bindings. The acceptable source types are
implementation-dependent.
IXArch corresponding to the top-level element of
the parsed document.
IllegalArgumentException - if the type of source is invalid.
XArchParseException - if the source is valid but the parsing
fails.
public String serialize(IXArch xArch,
Object params)
throws XArchSerializeException
XArchSerializeException.
xArch - Object corresponding to the top-level element of the
document to be serialized.params - Object containing data about how to serialize the
document. Object types accepted here are implementation-dependent.
If the type of the params object is unrecognized, this
method should throw a java.lang.IllegalArgumentException.
Some implementations may recognize a null parameter.
XArchSerializeException - if there was an error during
serialization.
|
xArch/xADL 2.0 Data Binding Library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||