Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<IAttribute> |
attributesList
Array list containing all attributes of this meta data.
|
protected java.util.HashMap<java.lang.String,IAttribute> |
attributesMap
Mapping of attribute names to attributes.
|
Constructor and Description |
---|
Metadata()
Empty constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
addAttribute(IAttribute attribute)
Adds an attribute to this metadata
If the name of the new attribute is empty or there already
exists an attribute with the same name, it is not added to
the name hashtable.
|
IAttribute |
getAttribute(int attributeIndex)
Get mining attribute by index of the array of attributes of
mining data specification
|
IAttribute |
getAttribute(java.lang.String attributeName)
Get mining attribute by name
|
int |
getIndex(IAttribute attribute)
Get index of given attribute in this specification
|
int |
getIndex(java.lang.String attributeName)
Get index of given attribute in this specification
|
int |
numberOfAttributes()
Returns number of mining attributes in mining data specification
|
void |
setAttributesArray(IAttribute[] attributesArray)
Sets array of all attributes of this specification
|
protected java.util.ArrayList<IAttribute> attributesList
protected java.util.HashMap<java.lang.String,IAttribute> attributesMap
public int numberOfAttributes()
Returns number of mining attributes in mining data specification
numberOfAttributes
in interface IMetadata
public IAttribute getAttribute(java.lang.String attributeName)
Get mining attribute by name
getAttribute
in interface IMetadata
attributeName
- name of attribute requiredpublic IAttribute getAttribute(int attributeIndex)
Get mining attribute by index of the array of attributes of mining data specification
getAttribute
in interface IMetadata
attributeIndex
- index of attribute requiredpublic int getIndex(IAttribute attribute)
Get index of given attribute in this specification
public int getIndex(java.lang.String attributeName)
Get index of given attribute in this specification
public boolean addAttribute(IAttribute attribute)
Adds an attribute to this metadata
If the name of the new attribute is empty or there already exists an attribute with the same name, it is not added to the name hashtable.
This means that it could not be retrieved via its name. It is highly recommended only to use attributes with unique names.
attribute
- mining attribute to addpublic void setAttributesArray(IAttribute[] attributesArray)
Sets array of all attributes of this specification
attributesArray
- array of all attributes to set