com.format.xml
API has been deprecated. Instead, use the com.format.xml.bind
API.public interface ILcdXMLElementAdapter
ILcdXMLElementAdapter
interface enables the user to inspect an object
as if it was an implementation of ILcdXMLElement
, even if it isn't.
It can be used to convert an existing domain model into another, XML-based domain model.
In general, a element adapter should be written for each (Java domain object, XML type) pair.
There are two parameters, common to each method in this interface:
ILcdXMLNameStack
, the XML element name stack that represents the
location in the XML structure of the element to be inspected.ILcdXMLObjectStack
, the object stack that contains all objects
corresponding to the element name at same location in the element name stack.ALcdXMLVisitorBasedElementAdapter
or
ALcdXMLTypedVistorBasesElementAdapter
classes instead.
Modifier and Type | Method and Description |
---|---|
int |
getAttributeCount(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack)
Deprecated.
Inspects the object on top of the name/object stack: returns the number of attributes, contained
in the inspected object.
|
TLcdXMLName |
getAttributeName(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns the name of the attribute at
the given index.
|
Object |
getAttributeValue(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns the value of the attribute at
the given index.
|
Object |
getAttributeValue(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
TLcdXMLName aAttributeName)
Deprecated.
Inspects the object on top of the name/object stack: returns the value of the attribute with
the specified name, or
null if no such attribute exists. |
String |
getAttributeValueAsString(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns the value of the attribute at
the given index, as a String.
|
String |
getAttributeValueAsString(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
TLcdXMLName aAttributeName)
Deprecated.
Inspects the object on top of the name/object stack: returns the value of the attribute with
the specified name, as a String.
|
Object |
getContent(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns the content,
at the given index.
|
Object |
getContent(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
TLcdXMLName aXMLName,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns the content
at the specified index in the list of contents having the specified XML name.
|
ILcdXMLElementAdapter |
getContentAdapter(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns a suitable
ILcdXMLElementAdapter for the content at the given index. |
ILcdXMLElementAdapter |
getContentAdapter(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
TLcdXMLName aXMLName,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns a suitable
ILcdXMLElementAdapter for the content at the specified index in the list of
contents having the specified XML name. |
String |
getContentAsString(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns the content,
at the given index, as a String.
|
String |
getContentAsString(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
TLcdXMLName aXMLName,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns the content
at the specified index in the list of contents having the specified XML name, as a String.
|
int |
getContentCount(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack)
Deprecated.
Inspects the object on top of the name/object stack: returns the number of contents, contained
in the inspected object.
|
int |
getContentCount(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
TLcdXMLName aXMLName)
Deprecated.
Inspects the object on top of the name/object stack: returns the number of contents, contained
in the inspected object and having the specified XML name.
|
TLcdXMLName |
getContentName(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns the name of the content
at the given index.
|
TLcdXMLName |
getName(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
TLcdXMLName aSubstitutionGroup,
Object aElement)
Deprecated.
Returns the name of the object specified by the given name/object stack, substitution group
and object.
|
boolean |
isPrimitiveContent(ILcdXMLNameStack aNameStack,
ILcdXMLObjectStack aObjectStack,
int aIndex)
Deprecated.
Inspects the object on top of the name/object stack: returns
true if the content
at the given index is primitive content (i.e., no XML element), false otherwise. |
void |
visitAttributes(ILcdXMLEditableNameStack aNameStack,
ILcdXMLEditableObjectStack aObjectStack,
ILcdXMLElementVisitor aElementVisitor,
ILcdXMLDocumentContext aDocumentContext)
Deprecated.
Visits the attributes of the element, specified by the given name and object stack .
|
void |
visitContents(ILcdXMLEditableNameStack aNameStack,
ILcdXMLEditableObjectStack aObjectStack,
ILcdXMLElementVisitor aElementVisitor,
ILcdXMLDocumentContext aDocumentContext)
Deprecated.
Visits the contents of the element, specified by the given name and object stack .
|
void |
visitElement(ILcdXMLEditableNameStack aNameStack,
ILcdXMLEditableObjectStack aObjectStack,
TLcdXMLName aName,
Object aObject,
ILcdXMLElementVisitor aElementVisitor,
ILcdXMLDocumentContext aDocumentContext)
Deprecated.
Visits the given element.
|
TLcdXMLName getName(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aSubstitutionGroup, Object aElement)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aSubstitutionGroup
- the substitution group the returned element should belong to, if
there is one (null
otherwise).aElement
- the element for which to return a name.TLcdXMLName getAttributeName(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aIndex
- the index of the attribute whose name is to be returned.Object getAttributeValue(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aIndex
- the index of the attribute whose value is to be returned.String getAttributeValueAsString(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aIndex
- the index of the content whose name is to be returned.int getAttributeCount(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.Object getAttributeValue(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aAttributeName)
null
if no such attribute exists.aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aAttributeName
- the name of the attribute for which to return a value.String getAttributeValueAsString(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aAttributeName)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aAttributeName
- the name of the attribute for which to return a value.TLcdXMLName getContentName(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex)
<element name="xxx" type="yyy"/>
), this
name can be returned immediately.<element ref="zzz">
),
the child adapter should be retrieved, and the call should be forwarded to the
getName()
method of the child adapter, with the given substitution group.getName()
method of the child adapter,
with the null
argument as substitution group.aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aIndex
- the index of the content whose name is to be returned.Object getContent(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aIndex
- the index of the content whose name is to be returned.String getContentAsString(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aIndex
- the index of the content whose name is to be returned.int getContentCount(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.ILcdXMLElementAdapter getContentAdapter(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex)
ILcdXMLElementAdapter
for the content at the given index.aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aIndex
- the index of the content whose name is to be returned.boolean isPrimitiveContent(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex)
true
if the content
at the given index is primitive content (i.e., no XML element), false
otherwise.aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aIndex
- the index of the content whose name is to be returned.true
if the content at the given index is primitive content,
false
otherwise.Object getContent(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aXMLName, int aIndex)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aXMLName
- the name of the content to be returned.aIndex
- the index of the content whose name is to be returned.String getContentAsString(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aXMLName, int aIndex)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aXMLName
- the name of the content to be returned.aIndex
- the index of the content whose name is to be returned.int getContentCount(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aXMLName)
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aXMLName
- the name of the contents.ILcdXMLElementAdapter getContentAdapter(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aXMLName, int aIndex)
ILcdXMLElementAdapter
for the content at the specified index in the list of
contents having the specified XML name.aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.aXMLName
- the name of the content for which to return an adapter.aIndex
- the index of the content whose name is to be returned.void visitElement(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, TLcdXMLName aName, Object aObject, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException
ILcdXMLElementVisitor
interface documentation contains a detailed description
of how an XML element needs to be visited.aNameStack
- the XML name stack, identifying the XML element to be visited.aObjectStack
- the XML object stack, identifying the XML element to be visited.aName
- the element name or substitution group of the element to be visitedaObject
- the lement to be visitedaElementVisitor
- the element visitor which is called by this visitable.aDocumentContext
- the XML document contextTLcdXMLInterruptedException
- if the visit action has been interrupted.ILcdXMLElementVisitor
void visitAttributes(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException
aNameStack
- the XML name stack, identifying the XML element to be visited.aObjectStack
- the XML object stack, identifying the XML element to be visited.aElementVisitor
- the element visitor which is called by this visitable.aDocumentContext
- the XML document contextTLcdXMLInterruptedException
- if the visit action has been interrupted.ILcdXMLElementVisitor
void visitContents(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException
aNameStack
- the XML name stack, identifying the XML element to be visited.aObjectStack
- the XML object stack, identifying the XML element to be visited.aElementVisitor
- the element visitor which is called by this visitable.aDocumentContext
- the XML document contextTLcdXMLInterruptedException
- if the visit action has been interrupted.ILcdXMLElementVisitor