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
ConstructorsConstructorDescriptionALcdXMLTypedVisitorBasedElementAdapter(ILcdXMLTypedElementAdapterProvider aElementAdapterProvider, ILcdXMLElementNameProvider aElementNameProvider, ILcdXMLSchemaProvider aSchemaProvider, TLcdXMLName aTypeName) Deprecated.Constructs anALcdXMLTypedVisitorBasedElementAdapterfor a global type.ALcdXMLTypedVisitorBasedElementAdapter(ILcdXMLTypedElementAdapterProvider aElementAdapterProvider, ILcdXMLSchemaProvider aSchemaProvider, TLcdXMLName aTypeName, TLcdXMLName aElementName) Deprecated.Constructs anALcdXMLTypedVisitorBasedElementAdapterfor a global type, with a fixed element name.ALcdXMLTypedVisitorBasedElementAdapter(ILcdXMLTypedElementAdapterProvider aElementAdapterProvider, ILcdXMLSchemaProvider aSchemaProvider, TLcdXMLName aTypeName, TLcdXMLName[] aElementNameStack) Deprecated.Constructs anALcdXMLTypedElementAdapterfor 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 TLcdXMLSchemaUtilDeprecated.Returns an XML util instance, initialized with the proper schema provider.voidvisitAttributes(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) Deprecated.Visits the attributes of the element, specified by the given name and object stack .voidvisitContents(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) Deprecated.Visits the contents of the element, specified by the given name and object stack .voidvisitElement(ILcdXMLEditableNameStack aNameStack, ILcdXMLEditableObjectStack aObjectStack, TLcdXMLName aSubstitutionGroup, Object aObject, ILcdXMLElementVisitor aElementVisitor, ILcdXMLDocumentContext aDocumentContext) Deprecated.Visits the given element.voidvisitTypeAttributes(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.voidvisitTypeContents(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, visitContentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 anALcdXMLTypedVisitorBasedElementAdapterfor 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 anALcdXMLTypedVisitorBasedElementAdapterfor 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. NoILcdXMLElementNameProviderwill be used for look-up of the name.
-
ALcdXMLTypedVisitorBasedElementAdapter
public ALcdXMLTypedVisitorBasedElementAdapter(ILcdXMLTypedElementAdapterProvider aElementAdapterProvider, ILcdXMLSchemaProvider aSchemaProvider, TLcdXMLName aTypeName, TLcdXMLName[] aElementNameStack) Deprecated.Constructs anALcdXMLTypedElementAdapterfor 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:ILcdXMLElementAdapterReturns the name of the object specified by the given name/object stack, substitution group and object.- Specified by:
getNamein interfaceILcdXMLElementAdapter- Overrides:
getNamein 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 (nullotherwise).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:ILcdXMLElementAdapterVisits 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. TheILcdXMLElementVisitorinterface documentation contains a detailed description of how an XML element needs to be visited.- Specified by:
visitElementin interfaceILcdXMLElementAdapter- Overrides:
visitElementin 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:ILcdXMLElementAdapterVisits the attributes of the element, specified by the given name and object stack .- Specified by:
visitAttributesin interfaceILcdXMLElementAdapter- Overrides:
visitAttributesin 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:ILcdXMLElementAdapterVisits the contents of the element, specified by the given name and object stack .- Specified by:
visitContentsin interfaceILcdXMLElementAdapter- Overrides:
visitContentsin 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.schemaAPI has been deprecated. Instead, use thecom.format.xml.bind.schemaAPI.