|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopendap.dap.Attribute
opendap.dap.Alias
public class Alias
The Alias type is a special attribute. It is simply a reference (like a "soft link" in a UNIX file system) to another attribute.
The rules for the definiton and interpretation an Alias are as follows: In the persistent representation of the DDS (XML, or old DAS & DDS syntax) Alias definitions will contain 2 fields: name, attribute. Example from a DDS:Alias CalDate .profiler.cast.conductivity.calibration.dateOr a DDX:
<Alias name="CalDate" attribute=".profiler.cast.conductivity.calibration.date"/>The rules for the interpretation of these fields are as follows:
AliasDAS and DDS objects built using methods other than
DDS.parse(), DDS.parseXML,
DDS.getDAS(), or DAS.parse()
must call DDS.resolveAliases() or DAS.resolveAliases() prior to
allowing client software access to
these objects. Since an Alias essentially represents a "pointer" to some (other)
Attribute, that
Attribute object must be found. Once this has been done (by calling the correct
resolveAliases() method)
the Aliases will act transparently as references to their target Attributes.
AttributeTable,
DDS,
DDS.parse(java.io.InputStream),
DDS.parseXML(java.io.InputStream, boolean),
DDS.getDAS(),
DAS,
DAS.resolveAliases(),
Serialized Form| Field Summary |
|---|
| Fields inherited from class opendap.dap.Attribute |
|---|
ALIAS, BYTE, CONTAINER, FLOAT32, FLOAT64, INT16, INT32, STRING, UINT16, UINT32, UNKNOWN, URL |
| Constructor Summary | |
|---|---|
Alias(java.lang.String aName,
java.lang.String attributeName)
Construct an Alias. |
|
| Method Summary | |
|---|---|
void |
appendValue(java.lang.String value)
Append a value to this attribute. |
void |
appendValue(java.lang.String value,
boolean check)
Append a value to this attribute. |
java.lang.Object |
clone()
Returns a clone of this Attribute. |
void |
deleteValueAt(int index)
Remove the i'th String from this attribute. |
java.lang.String |
getAliasedTo()
Returns the name of the attribute aliased to. |
java.lang.String |
getAliasedToAttributeField()
Returns the name of the attribute aliased to. |
java.lang.String |
getAliasedToAttributeFieldAsClearString()
Returns the name of the attribute aliased to. |
AttributeTable |
getContainer()
Returns the AttributeTable container. |
int |
getType()
Returns the attribute type constant. |
java.lang.String |
getValueAt(int index)
Returns the attribute value at index. |
java.util.Enumeration |
getValues()
Returns the values of this attribute as an Enumeration
of String. |
boolean |
isAlias()
Returns true if the attribute is an alias. |
boolean |
isContainer()
Returns true if the attribute is a container. |
void |
print(java.io.PrintWriter os,
java.lang.String pad)
|
void |
printXML(java.io.PrintWriter pw,
java.lang.String pad,
boolean constrained)
|
void |
setMyAttribute(Attribute a)
|
void |
setMyVariable(BaseType v)
|
| Methods inherited from class opendap.dap.Attribute |
|---|
getClearName, getContainerN, getName, getNumVal, getTypeString, getTypeVal, getValueAtN, getValuesIterator, print, print, print, printXML, printXML, printXML, printXML, setClearName, setName |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Alias(java.lang.String aName,
java.lang.String attributeName)
aName - a String containing the name of the alias.attributeName - the String containing the normalized name
of the variable and attribute that this Alias references.| Method Detail |
|---|
public java.lang.Object clone()
Attribute. A deep copy is performed
on all attribute values.
clone in class AttributeAttribute.public void setMyAttribute(Attribute a)
public void setMyVariable(BaseType v)
public int getType()
getType in class Attributepublic boolean isContainer()
isContainer in class Attributepublic boolean isAlias()
isAlias in class Attributepublic java.lang.String getAliasedTo()
public java.lang.String getAliasedToAttributeFieldAsClearString()
public java.lang.String getAliasedToAttributeField()
public AttributeTable getContainer()
throws NoSuchAttributeException
AttributeTable container.
getContainer in class AttributeAttributeTable container.
NoSuchAttributeException - If
the instance of Attribute on which it is called is not a container.
public java.util.Enumeration getValues()
throws NoSuchAttributeException
Enumeration
of String.
getValues in class AttributeEnumeration of String.
NoSuchAttributeException
public java.lang.String getValueAt(int index)
throws NoSuchAttributeException
index.
getValueAt in class Attributeindex - the index of the attribute value to return.
String at index.
NoSuchAttributeException
public void appendValue(java.lang.String value)
throws AttributeBadValueException
appendValue in class Attributevalue - the attribute String to add.
AttributeBadValueException - thrown if the value is not a legal
member of type
public void appendValue(java.lang.String value,
boolean check)
throws AttributeBadValueException
appendValue in class Attributevalue - the attribute String to add.check - if true, check the validity of he attribute's value, if
false don't.
AttributeBadValueException - thrown if the value is not a legal
member of type
public void deleteValueAt(int index)
throws AttributeBadValueException
i'th String from this attribute.
deleteValueAt in class Attributeindex - the index of the value to remove.
AttributeBadValueException
public void print(java.io.PrintWriter os,
java.lang.String pad)
print in class Attribute
public void printXML(java.io.PrintWriter pw,
java.lang.String pad,
boolean constrained)
printXML in class Attribute
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||