Package com.spotfire.ws.im.ds
Class MetadataItem
- java.lang.Object
-
- com.spotfire.ws.im.ds.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
- Since:
- 3.0
- Author:
- Magnus Rylander
-
-
Field Summary
Fields Modifier and Type Field Description static String
CATALOG
The catalog type.static String
COLUMN
The column type.static String
DATA_SOURCE
The data-source type.static String
DATA_TYPE_ATTR
The data-type attribute.static String
PROCEDURE
The procedure type.static String
PROCEDURE_COLUMN
The procedure column type, NOTE: used in axis api only.static String
SCHEMA
The schema type.static String
TABLE
The table type.static String
TABLE_ALIAS
The table alias type.static String
TABLE_REF_ATTR
The table reference attribute.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MetadataItem
create(String type, String name)
Creates a newMetadataItem
instance.String[]
getAttributeNames()
Returns an array of all attribute names.String
getAttributeValue(String attr)
Returns the value of a given attribute.String[]
getAttributeValues()
Returns an array of all attribute values.String
getName()
Returns the item name.String
getType()
Returns the item type.void
setAttribute(String name, String value)
Sets an attribute.String
toString()
Serializes this object for debug purposes.
-
-
-
Field Detail
-
DATA_SOURCE
public static final String DATA_SOURCE
The data-source type.- Since:
- 3.0
- See Also:
- Constant Field Values
-
CATALOG
public static final String CATALOG
The catalog type.- Since:
- 3.0
- See Also:
- Constant Field Values
-
SCHEMA
public static final String SCHEMA
The schema type.- Since:
- 3.0
- See Also:
- Constant Field Values
-
TABLE
public static final String TABLE
The table type.- Since:
- 3.0
- See Also:
- Constant Field Values
-
TABLE_ALIAS
public static final String TABLE_ALIAS
The table alias type.- Since:
- 3.0
- See Also:
- Constant Field Values
-
TABLE_REF_ATTR
public static final String TABLE_REF_ATTR
The table reference attribute.- Since:
- 3.0
- See Also:
- Constant Field Values
-
PROCEDURE
public static final String PROCEDURE
The procedure type.- Since:
- 3.0
- See Also:
- Constant Field Values
-
PROCEDURE_COLUMN
public static final String PROCEDURE_COLUMN
The procedure column type, NOTE: used in axis api only.- Since:
- 3.0
- See Also:
- Constant Field Values
-
COLUMN
public static final String COLUMN
The column type.- Since:
- 3.0
- See Also:
- Constant Field Values
-
DATA_TYPE_ATTR
public static final String DATA_TYPE_ATTR
The data-type attribute.- Since:
- 3.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static MetadataItem create(String type, String name)
Creates a newMetadataItem
instance.- Parameters:
type
- an item typename
- 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 namevalue
- an attribute value- Since:
- 3.0
-
-