com.ibm.as400.data

Interface Descriptor



  • public interface Descriptor
    The Descriptor interface defines a mechanism for inspecting a node of an XML based document.

    The idea is to give a programmer the ability to inspect the various tags and attribute values without having to parse the tags. This is useful in that some XML based documents do post-parser processing that can then be handled appropriately by implementations of this interface.

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.String[] getAttributeList()
      Returns an array of attribute names for the current node.
      java.lang.String getAttributeValue(java.lang.String attr)
      Returns the value of the named attribute.
      java.util.Enumeration getChildren()
      Returns the Descriptors of the children of this node.
      Descriptor getDescriptor(java.lang.String qualifiedName)
      Returns the Descriptor for another element contained within the same document.
      java.lang.String getName()
      Returns the simple name of the Descriptor as specified on the name= attribute of its associated tag.
      java.lang.String getQualifiedName()
      Returns the qualified name of the Descriptor.
      java.lang.String getTagName()
      Returns the tag name of the Descriptor.
      boolean hasChildren()
      Returns true if this Descriptor has childen.
    • Method Detail

      • getAttributeList

        java.lang.String[] getAttributeList()
        Returns an array of attribute names for the current node.
        Returns:
        Array containing the names of all attributes associated with the node type for this descriptor. If there are no attributes for this descriptor, an empty array is returned.
      • getAttributeValue

        java.lang.String getAttributeValue(java.lang.String attr)
        Returns the value of the named attribute.
        Parameters:
        attr -
        Returns:
        String containing the value of the specified attribute. If the named attribute is not valid for this descriptor, null is returned.
      • getChildren

        java.util.Enumeration getChildren()
        Returns the Descriptors of the children of this node.
        Returns:
        Descriptors for the children of this Descriptor as an Enumeration. If there are no children, an empty enumeration is returned.
      • getDescriptor

        Descriptor getDescriptor(java.lang.String qualifiedName)
        Returns the Descriptor for another element contained within the same document.
        Parameters:
        qualifiedName -
        Returns:
        Descriptor for another element within the same document given a qualified name (i.e. - "structName1.structName2.dataElementName"). Returns null if there is no element with the specified name.
      • getName

        java.lang.String getName()
        Returns the simple name of the Descriptor as specified on the name= attribute of its associated tag.
        Returns:
        String containing the simple name of the Descriptor as specified on the name= attribute of its associated tag. If there is no name= attribute, null is returned.
      • getQualifiedName

        java.lang.String getQualifiedName()
        Returns the qualified name of the Descriptor. This qualified name is the simple name prefixed with the qualified name of this Descriptor's parent and separated with a period (".").
        Returns:
        String containing the qualified name of the Descriptor. If there is no qualified name, null is returned.
      • getTagName

        java.lang.String getTagName()
        Returns the tag name of the Descriptor.
        Returns:
        String containing the tag name of the element in the Descriptor.
      • hasChildren

        boolean hasChildren()
        Returns true if this Descriptor has childen. Returns false if this Descriptor has no childen.
        Returns:
        Boolean indicating if the Descriptor has children.