Class MetadataItem

  • Direct Known Subclasses:
    ProcedureMetadata

    public class MetadataItem
    extends Object
    This object represents one level of data source metadata.

    A MetadataItem is described with a type and a name and may have additional attributes.

    The default item types are:

    • data-source
    • catalog
    • schema
    • table
    • table-alias
    • procedure
    • column
    The column level has a 'data-type' attribute.
    Since:
    3.0
    Author:
    Magnus Rylander
    • Method Detail

      • create

        public static MetadataItem create​(String type,
                                          String name)
        Creates a new MetadataItem instance.
        Parameters:
        type - an item type
        name - an item name
        Returns:
        A new MetadataItem instance.
        Since:
        10.1
      • getType

        public String getType()
        Returns the item type.
        Returns:
        an item type String
        Since:
        3.0
      • getName

        public String getName()
        Returns the item name.
        Returns:
        an item name String
        Since:
        3.0
      • getAttributeNames

        public String[] getAttributeNames()
        Returns an array of all attribute names.
        Returns:
        a name String array
        Since:
        3.0
      • getAttributeValues

        public String[] getAttributeValues()
        Returns an array of all attribute values.
        Returns:
        a value String array
        Since:
        3.0
      • getAttributeValue

        public String getAttributeValue​(String attr)
        Returns the value of a given attribute.
        Parameters:
        attr - an attribute name
        Returns:
        value of a given attribute
        Since:
        3.0
      • setAttribute

        public void setAttribute​(String name,
                                 String value)
        Sets an attribute.
        Parameters:
        name - an attribute name
        value - an attribute value
        Since:
        3.0
      • toString

        public String toString()
        Serializes this object for debug purposes.
        Overrides:
        toString in class Object
        Since:
        3.0