Package gov.nasa.pds.tools.label
Class AttributeStatement
- java.lang.Object
-
- gov.nasa.pds.tools.label.Statement
-
- gov.nasa.pds.tools.label.AttributeStatement
-
- All Implemented Interfaces:
Comparable<Object>
public class AttributeStatement extends Statement
- Version:
- $Revision$
- Author:
- pramirez, jagander
-
-
Field Summary
-
Fields inherited from class gov.nasa.pds.tools.label.Statement
comment, identifier, label, lineNumber, sourceFile, sourceURI
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttributeStatement(Label sourcelabel, int lineNumber, String identifier)Constructs a new attribute statement with no valueAttributeStatement(Label sourcelabel, int lineNumber, String identifier, Value value)AttributeStatement(Label sourcelabel, String identifier)Constructs a new attribute statement with no line number or valueAttributeStatement(Label sourcelabel, String identifier, Value value)Constructs a new attribute statement with no line number
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)StringgetElementIdentifier()Gets the unqualified identifier for the attStringgetNamespace()Gets the namespace for this attributeValuegetValue()Retrieves the value of the attributeinthashcode()booleanhasNamespace()voidsetValue(Value value)Sets the value for this attributeStringtoString()-
Methods inherited from class gov.nasa.pds.tools.label.Statement
attachComment, compareTo, getComment, getIdentifier, getLabel, getLineNumber, getSourceFile, getSourceString, getSourceURI, validateCommentType, validateElementType, validateGroupType, validateObjectType, validatePointerType, validateType
-
-
-
-
Constructor Detail
-
AttributeStatement
protected AttributeStatement(Label sourcelabel, int lineNumber, String identifier)
Constructs a new attribute statement with no value- Parameters:
lineNumber- Line on which the statement startsidentifier- Uniquely identifies the statement
-
AttributeStatement
public AttributeStatement(Label sourcelabel, String identifier)
Constructs a new attribute statement with no line number or value- Parameters:
identifier- Uniquely identifies the statement
-
AttributeStatement
public AttributeStatement(Label sourcelabel, String identifier, Value value)
Constructs a new attribute statement with no line number- Parameters:
identifier- Uniquely identifies the statementvalue-Valueof the attribute
-
-
Method Detail
-
getNamespace
public String getNamespace()
Gets the namespace for this attribute- Returns:
- The namespace or "" if none is found.
-
getElementIdentifier
public String getElementIdentifier()
Gets the unqualified identifier for the att- Returns:
- Returns the element identifier.
-
getValue
public Value getValue()
Retrieves the value of the attribute- Returns:
Valueof the attribute
-
setValue
public void setValue(Value value)
Sets the value for this attribute- Parameters:
value-Valueof the attribute
-
hasNamespace
public boolean hasNamespace()
-
hashcode
public int hashcode()
-
-