Package com.luciad.format.xml
Interface ILcdXMLElementAdapter
- All Known Implementing Classes:
ALcdXMLIndexBasedElementAdapter
,ALcdXMLTypedIndexBasedElementAdapter
,ALcdXMLTypedVisitorBasedElementAdapter
,ALcdXMLVisitorBasedElementAdapter
,TLcdXMLDefaultElementAdapter
public interface ILcdXMLElementAdapter
Deprecated.
An adapter interface, for providing an XML view on an object.
The
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:
- an
ILcdXMLNameStack
, the XML element name stack that represents the location in the XML structure of the element to be inspected. - an
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.
-
Method Summary
Modifier and TypeMethodDescriptionint
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.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.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.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, ornull
if no such attribute exists.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.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.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.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.getContentAdapter
(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex) Deprecated.Inspects the object on top of the name/object stack: returns a suitableILcdXMLElementAdapter
for the content at the given index.getContentAdapter
(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aXMLName, int aIndex) Deprecated.Inspects the object on top of the name/object stack: returns a suitableILcdXMLElementAdapter
for the content at the specified index in the list of contents having the specified XML name.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.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.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.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: returnstrue
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.
-
Method Details
-
getName
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.- Parameters:
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.- Returns:
- the element name that best matches the specified element.
-
getAttributeName
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.- Parameters:
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.- Returns:
- the name of the attribute with the given index.
-
getAttributeValue
Deprecated.Inspects the object on top of the name/object stack: returns the value of the attribute at the given index.- Parameters:
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.- Returns:
- the value of the attribute with the given index.
-
getAttributeValueAsString
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.- Parameters:
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.- Returns:
- the value of the attribute with the given index, as a String.
-
getAttributeCount
Deprecated.Inspects the object on top of the name/object stack: returns the number of attributes, contained in the inspected object.- Parameters:
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.- Returns:
- the number of attributes for the object on top of the name/object stack.
-
getAttributeValue
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, ornull
if no such attribute exists.- Parameters:
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.- Returns:
- the value of the attribute with the specified name.
-
getAttributeValueAsString
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.- Parameters:
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.- Returns:
- the value of the attribute with the given index, as a String.
-
getContentName
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. In general, this method should be implemented as follows:- if the type of the current object enforces the child content at the given index to
have a fixed name (e.g.
<element name="xxx" type="yyy"/>
), this name can be returned immediately. - if the type of the current object enforces the child content at the given index to
belong to a certain substitution group (e.g.
<element ref="zzz">
), the child adapter should be retrieved, and the call should be forwarded to thegetName()
method of the child adapter, with the given substitution group. - if nothing is known about the child content, the child adapter should be retrieved, and
the call should be forwared to the
getName()
method of the child adapter, with thenull
argument as substitution group.
- Parameters:
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.- Returns:
- the name of the content with the given index.
- if the type of the current object enforces the child content at the given index to
have a fixed name (e.g.
-
getContent
Deprecated.Inspects the object on top of the name/object stack: returns the content, at the given index.- Parameters:
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.- Returns:
- the content with the given index.
-
getContentAsString
Deprecated.Inspects the object on top of the name/object stack: returns the content, at the given index, as a String.- Parameters:
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.- Returns:
- the content with the given index, as a String.
-
getContentCount
Deprecated.Inspects the object on top of the name/object stack: returns the number of contents, contained in the inspected object.- Parameters:
aNameStack
- the XML name stack, identifying the XML element to be inspected.aObjectStack
- the XML object stack, identifying the XML element to be inspected.- Returns:
- the number of contents for the object on top of the name/object stack.
-
getContentAdapter
ILcdXMLElementAdapter getContentAdapter(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex) Deprecated.Inspects the object on top of the name/object stack: returns a suitableILcdXMLElementAdapter
for the content at the given index.- Parameters:
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.- Returns:
- a suitable adapter for the content at the given index.
-
isPrimitiveContent
boolean isPrimitiveContent(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, int aIndex) Deprecated.Inspects the object on top of the name/object stack: returnstrue
if the content at the given index is primitive content (i.e., no XML element),false
otherwise.- Parameters:
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.- Returns:
true
if the content at the given index is primitive content,false
otherwise.
-
getContent
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.- Parameters:
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.- Returns:
- the content with the given index.
-
getContentAsString
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.- Parameters:
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.- Returns:
- the content with the given index, as a String.
-
getContentCount
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.- Parameters:
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.- Returns:
- the number of contents for the object on top of the name/object stack.
-
getContentAdapter
ILcdXMLElementAdapter getContentAdapter(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aXMLName, int aIndex) Deprecated.Inspects the object on top of the name/object stack: returns a suitableILcdXMLElementAdapter
for the content at the specified index in the list of contents having the specified XML name.- Parameters:
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.- Returns:
- a suitable adapter for the content at the given index.
-
visitElement
void visitElement(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, TLcdXMLName aName, Object aObject, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException Deprecated.Visits the given element. The element to be visited is specified by a name and object stack, containing the XML stack up to the parent name/object, and a (name,object) pair. TheILcdXMLElementVisitor
interface documentation contains a detailed description of how an XML element needs to be visited.- Parameters:
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 context- Throws:
TLcdXMLInterruptedException
- if the visit action has been interrupted.- See Also:
-
visitAttributes
void visitAttributes(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException Deprecated.Visits the attributes of the element, specified by the given name and object stack .- Parameters:
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 context- Throws:
TLcdXMLInterruptedException
- if the visit action has been interrupted.- See Also:
-
visitContents
void visitContents(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException Deprecated.Visits the contents of the element, specified by the given name and object stack .- Parameters:
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 context- Throws:
TLcdXMLInterruptedException
- if the visit action has been interrupted.- See Also:
-
com.format.xml
API has been deprecated. Instead, use thecom.format.xml.bind
API.