public class MetadataItem
extends java.lang.Object
A MetadataItem
is described with a type and a name and may have
additional attributes.
The default item types are:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CATALOG
The catalog type.
|
static java.lang.String |
COLUMN
The column type.
|
static java.lang.String |
DATA_SOURCE
The data-source type.
|
static java.lang.String |
DATA_TYPE_ATTR
The data-type attribute.
|
static java.lang.String |
PROCEDURE
The procedure type.
|
static java.lang.String |
PROCEDURE_COLUMN
The procedure column type, NOTE: used in axis api only.
|
static java.lang.String |
SCHEMA
The schema type.
|
static java.lang.String |
TABLE
The table type.
|
static java.lang.String |
TABLE_ALIAS
The table alias type.
|
static java.lang.String |
TABLE_REF_ATTR
The table reference attribute.
|
Constructor and Description |
---|
MetadataItem(java.lang.String type,
java.lang.String name)
Creates a new
MetadataItem instance at a non-terminal level. |
MetadataItem(java.lang.String type,
java.lang.String name,
boolean terminal)
Creates a new
MetadataItem instance. |
Modifier and Type | Method and Description |
---|---|
static MetadataItem |
fromXML(Element e)
Create a MetadataItem from an XML representation.
|
java.lang.String[] |
getAttributeNames()
Returns an array of all attribute names.
|
java.lang.String |
getAttributeValue(java.lang.String attr)
Returns the value of a given attribute.
|
java.lang.String[] |
getAttributeValues()
Returns an array of all attribute values.
|
java.lang.String |
getName()
Returns the item name.
|
java.lang.String |
getType()
Returns the item type.
|
boolean |
isTerminal()
Tells if this item represents a terminal level, i.e.
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets an attribute.
|
java.lang.String |
toString()
Serializes this object for debug purposes.
|
Element |
toXML()
Returns the XML representation of this item.
|
public static final java.lang.String DATA_SOURCE
public static final java.lang.String CATALOG
public static final java.lang.String SCHEMA
public static final java.lang.String TABLE
public static final java.lang.String TABLE_ALIAS
public static final java.lang.String TABLE_REF_ATTR
public static final java.lang.String PROCEDURE
public static final java.lang.String PROCEDURE_COLUMN
public static final java.lang.String COLUMN
public static final java.lang.String DATA_TYPE_ATTR
public MetadataItem(java.lang.String type, java.lang.String name)
MetadataItem
instance at a non-terminal level.type
- an item typename
- an item namepublic MetadataItem(java.lang.String type, java.lang.String name, boolean terminal)
MetadataItem
instance.type
- an item typename
- an item nameterminal
- if true, this level contains no child itemspublic java.lang.String getType()
String
public java.lang.String getName()
String
public boolean isTerminal()
true
if item level is terminal, false
otherwisepublic java.lang.String[] getAttributeNames()
String
arraypublic java.lang.String[] getAttributeValues()
String
arraypublic java.lang.String getAttributeValue(java.lang.String attr)
attr
- an attribute namepublic void setAttribute(java.lang.String name, java.lang.String value)
name
- an attribute namevalue
- an attribute valuepublic Element toXML()
com.spotfire.ws.xml.XMLFormatException
- if an error should occur when creating the XML.public static MetadataItem fromXML(Element e)
e
- the XML representation of a MetadataItem.com.spotfire.ws.xml.XMLParseException
- XMLParseExceptionpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2000-2020 TIBCO Software Inc. All Rights Reserved.