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 protected
AttributeStatement(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 boolean
equals(Object object)
String
getElementIdentifier()
Gets the unqualified identifier for the attString
getNamespace()
Gets the namespace for this attributeValue
getValue()
Retrieves the value of the attributeint
hashcode()
boolean
hasNamespace()
void
setValue(Value value)
Sets the value for this attributeString
toString()
-
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
-Value
of 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:
Value
of the attribute
-
setValue
public void setValue(Value value)
Sets the value for this attribute- Parameters:
value
-Value
of the attribute
-
hasNamespace
public boolean hasNamespace()
-
hashcode
public int hashcode()
-
-