Package com.luciad.format.xml.schema
Class ALcdXMLTypedVisitorBasedElementAdapter
java.lang.Object
com.luciad.format.xml.ALcdXMLVisitorBasedElementAdapter
com.luciad.format.xml.schema.ALcdXMLTypedVisitorBasedElementAdapter
- All Implemented Interfaces:
ILcdXMLElementAdapter
public abstract class ALcdXMLTypedVisitorBasedElementAdapter
extends ALcdXMLVisitorBasedElementAdapter
implements ILcdXMLElementAdapter
Deprecated.
An abstract class implementing
ILcdXMLElementAdapter
, facilitating
the implementation of custom XML adapters and offering support for XML type inheritance,
based on schema information.
Typically, when extending this class, the following methods need to be overwritten:
- when adding attributes:
- visitTypeAttributes()
- when adding contents:
- visitTypeContents()
ILcdXMLElementAdapter
interface are implemented by this adapter using delegation to the visit...() methods. These methods
should normally not be overwritten.
This adapter is considered as the default typed element adapter class to extend from,
offering an easy and compact implementation, and excellent serial access performance.-
Constructor Summary
ConstructorDescriptionALcdXMLTypedVisitorBasedElementAdapter
(ILcdXMLTypedElementAdapterProvider aElementAdapterProvider, ILcdXMLElementNameProvider aElementNameProvider, ILcdXMLSchemaProvider aSchemaProvider, TLcdXMLName aTypeName) Deprecated.Constructs anALcdXMLTypedVisitorBasedElementAdapter
for a global type.ALcdXMLTypedVisitorBasedElementAdapter
(ILcdXMLTypedElementAdapterProvider aElementAdapterProvider, ILcdXMLSchemaProvider aSchemaProvider, TLcdXMLName aTypeName, TLcdXMLName aElementName) Deprecated.Constructs anALcdXMLTypedVisitorBasedElementAdapter
for a global type, with a fixed element name.ALcdXMLTypedVisitorBasedElementAdapter
(ILcdXMLTypedElementAdapterProvider aElementAdapterProvider, ILcdXMLSchemaProvider aSchemaProvider, TLcdXMLName aTypeName, TLcdXMLName[] aElementNameStack) Deprecated.Constructs anALcdXMLTypedElementAdapter
for an anonymous type. -
Method Summary
Modifier and TypeMethodDescriptiongetName
(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aSubstitutionGroup, Object aObject) Deprecated.Returns the name of the object specified by the given name/object stack, substitution group and object.getType()
Deprecated.Returns the XML Schema type this adapter is written for.protected TLcdXMLSchemaUtil
Deprecated.Returns an XML util instance, initialized with the proper schema provider.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 aSubstitutionGroup, Object aObject, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) Deprecated.Visits the given element.void
visitTypeAttributes
(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aVisitor, ILcdXMLDocumentContext aDocumentContext) Deprecated.Visits all attributes that are specific to the XML Schema type for which this adapter was written.void
visitTypeContents
(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aVisitor, ILcdXMLDocumentContext aDocumentContext) Deprecated.Visits all contents that are specific to the XML Schema type for which this adapter was written.Methods inherited from class com.luciad.format.xml.ALcdXMLVisitorBasedElementAdapter
getAttributeCount, getAttributeName, getAttributeValue, getAttributeValue, getAttributeValueAsString, getAttributeValueAsString, getContent, getContent, getContentAdapter, getContentAdapter, getContentAsString, getContentAsString, getContentCount, getContentCount, getContentName, getElementAdapterProvider, getElementNameProvider, isPrimitiveContent, visitContent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.format.xml.ILcdXMLElementAdapter
getAttributeCount, getAttributeName, getAttributeValue, getAttributeValue, getAttributeValueAsString, getAttributeValueAsString, getContent, getContent, getContentAdapter, getContentAdapter, getContentAsString, getContentAsString, getContentCount, getContentCount, getContentName, isPrimitiveContent
-
Constructor Details
-
ALcdXMLTypedVisitorBasedElementAdapter
public ALcdXMLTypedVisitorBasedElementAdapter(ILcdXMLTypedElementAdapterProvider aElementAdapterProvider, ILcdXMLElementNameProvider aElementNameProvider, ILcdXMLSchemaProvider aSchemaProvider, TLcdXMLName aTypeName) Deprecated.Constructs anALcdXMLTypedVisitorBasedElementAdapter
for a global type.- Parameters:
aElementAdapterProvider
- the element adapter provider to which adapter requests should be forwarded.aElementNameProvider
- the element name provider to which naming requests should be forwarded.aSchemaProvider
- the schema provider to which schema requests should be forwarded.aTypeName
- the XML type name for which this adapter is written.
-
ALcdXMLTypedVisitorBasedElementAdapter
public ALcdXMLTypedVisitorBasedElementAdapter(ILcdXMLTypedElementAdapterProvider aElementAdapterProvider, ILcdXMLSchemaProvider aSchemaProvider, TLcdXMLName aTypeName, TLcdXMLName aElementName) Deprecated.Constructs anALcdXMLTypedVisitorBasedElementAdapter
for a global type, with a fixed element name.- Parameters:
aElementAdapterProvider
- the element adapter provider to which adapter requests should be forwarded.aSchemaProvider
- the schema provider to which schema requests should be forwarded.aTypeName
- the XML type name for which this adapter is written.aElementName
- the XML element name to be returned for elements handled by this adapter. NoILcdXMLElementNameProvider
will be used for look-up of the name.
-
ALcdXMLTypedVisitorBasedElementAdapter
public ALcdXMLTypedVisitorBasedElementAdapter(ILcdXMLTypedElementAdapterProvider aElementAdapterProvider, ILcdXMLSchemaProvider aSchemaProvider, TLcdXMLName aTypeName, TLcdXMLName[] aElementNameStack) Deprecated.Constructs anALcdXMLTypedElementAdapter
for an anonymous type.- Parameters:
aElementAdapterProvider
- the element adapter provider to which adapter requests should be forwarded.aSchemaProvider
- the schema provider to which schema requests should be forwarded.aTypeName
- the XML type in which the following namestack is defined.aElementNameStack
- the XML element namestack, pointing to the type for which this adapter is written.
-
-
Method Details
-
getName
public TLcdXMLName getName(ILcdXMLNameStack aNameStack, ILcdXMLObjectStack aObjectStack, TLcdXMLName aSubstitutionGroup, Object aObject) Deprecated.Description copied from interface:ILcdXMLElementAdapter
Returns the name of the object specified by the given name/object stack, substitution group and object.- Specified by:
getName
in interfaceILcdXMLElementAdapter
- Overrides:
getName
in classALcdXMLVisitorBasedElementAdapter
- 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).aObject
- the element for which to return a name.- Returns:
- the element name that best matches the specified element.
-
visitElement
public void visitElement(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, TLcdXMLName aSubstitutionGroup, Object aObject, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException Deprecated.Description copied from interface:ILcdXMLElementAdapter
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.- Specified by:
visitElement
in interfaceILcdXMLElementAdapter
- Overrides:
visitElement
in classALcdXMLVisitorBasedElementAdapter
- 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.aSubstitutionGroup
- 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
public void visitAttributes(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException Deprecated.Description copied from interface:ILcdXMLElementAdapter
Visits the attributes of the element, specified by the given name and object stack .- Specified by:
visitAttributes
in interfaceILcdXMLElementAdapter
- Overrides:
visitAttributes
in classALcdXMLVisitorBasedElementAdapter
- 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
public void visitContents(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException Deprecated.Description copied from interface:ILcdXMLElementAdapter
Visits the contents of the element, specified by the given name and object stack .- Specified by:
visitContents
in interfaceILcdXMLElementAdapter
- Overrides:
visitContents
in classALcdXMLVisitorBasedElementAdapter
- 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:
-
visitTypeAttributes
public void visitTypeAttributes(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException Deprecated.Visits all attributes that are specific to the XML Schema type for which this adapter was written.- Parameters:
aNameStack
- the name stack, containing all XML element names with the name of the element to be inspected on top.aObjectStack
- the object stack, containing all objects with the object to be inspected on top.aVisitor
- the XML element visitor that is visiting the objectaDocumentContext
- the XML document context- Throws:
TLcdXMLInterruptedException
- if the visit action was interrupted.
-
visitTypeContents
public void visitTypeContents(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aVisitor, ILcdXMLDocumentContext aDocumentContext) throws TLcdXMLInterruptedException Deprecated.Visits all contents that are specific to the XML Schema type for which this adapter was written.- Parameters:
aNameStack
- the name stack, containing all XML element names with the name of the element to be inspected on top.aObjectStack
- the object stack, containing all objects with the object to be inspected on top.aVisitor
- the XML element visitor that is visiting the objectaDocumentContext
- the XML document context- Throws:
TLcdXMLInterruptedException
- if the visit action was interrupted.
-
getXMLSchemaUtil
Deprecated.Returns an XML util instance, initialized with the proper schema provider.- Returns:
- XML util
-
getType
Deprecated.Returns the XML Schema type this adapter is written for.- Returns:
- the XML Schema type this adapter is written for.
-
com.format.xml.schema
API has been deprecated. Instead, use thecom.format.xml.bind.schema
API.