|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.tools.label.Label
public class Label
This class represents a PDS label.
Nested Class Summary | |
---|---|
static class |
Label.LineLength
|
Constructor Summary | |
---|---|
Label(File labelFile)
|
|
Label(URI labelURI)
Constructs an object representation of a PDS label. |
Method Summary | |
---|---|
void |
addAncestor(String path)
|
void |
addAncestors(List<String> pointers)
|
void |
addLineLength(int line,
int length)
Remember a line length for a line within a label. |
void |
addProblem(File sourceFile,
int lineNumber,
Integer column,
String key,
Constants.ProblemType type,
Object... arguments)
|
void |
addProblem(File sourceFile,
LabelParserException e)
|
void |
addProblem(int lineNumber,
Integer column,
String key,
Constants.ProblemType type,
Object... arguments)
|
void |
addProblem(int lineNumber,
String key,
Constants.ProblemType type,
Object... arguments)
|
void |
addProblem(LabelParserException e)
|
void |
addProblem(Statement statement,
Integer column,
String key,
Constants.ProblemType type,
Object... arguments)
|
void |
addProblem(Statement statement,
LabelParserException e)
|
void |
addProblem(Statement statement,
String key,
Constants.ProblemType type,
Object... arguments)
|
void |
addProblem(URI sourceURI,
int lineNumber,
Integer column,
String key,
Constants.ProblemType type,
Object... arguments)
|
void |
addProblem(URI sourceURI,
LabelParserException e)
|
void |
addStatement(Statement statement)
Associates a statement with this label |
void |
checkLineLengths()
|
boolean |
getAllowExternalProblems()
|
List<String> |
getAncestors()
|
long |
getAttachedStartByte()
|
AttributeStatement |
getAttribute(String identifier)
Retrieves the attribute with the identifier or null if not found |
List<AttributeStatement> |
getAttributes()
Retrieves attributes associated with this label |
boolean |
getCaptureProblems()
|
List<GroupStatement> |
getGroups()
Retrieves groups associated with this label |
List<GroupStatement> |
getGroups(String identifier)
Retrieves the groups with the identifier or null if not found |
File |
getLabelFile()
|
String |
getLabelPath()
|
URI |
getLabelURI()
|
List<Label.LineLength> |
getLineLengths()
Return the line lengths for all label lines. |
List<ObjectStatement> |
getObjects()
Retrieves objects associated with this label |
List<ObjectStatement> |
getObjects(String identifier)
Retrieves the object with the identifier or null if not found |
List<PointerStatement> |
getPointers()
Retrieves pointers associated with this label |
List<LabelParserException> |
getProblems()
|
static long |
getSkipBytes(Label label,
Numeric startPosition)
|
String |
getSourceNameString()
|
String |
getSourceString()
|
List<Statement> |
getStatement(DictIdentifier identifier)
Retrieves a statement with the identifier |
List<Statement> |
getStatements()
Retrieves the statements associated with this label |
boolean |
hasAncestor(File pointer)
|
boolean |
hasAncestor(URI pointer)
|
boolean |
hasAttachedContent()
|
boolean |
hasEndStatement()
|
boolean |
hasIncludePointer(String path)
|
boolean |
isValid()
|
void |
setAllowExternalProblems(boolean allowExternalProblems)
|
void |
setAttachedStartByte(Integer startByte)
|
void |
setCaptureProblems(boolean captureProblems)
|
void |
setHasBlankFill(boolean hasBlankFill)
|
void |
setHasEndStatement()
|
void |
setInvalid()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Label(URI labelURI)
public Label(File labelFile)
Method Detail |
---|
public void setCaptureProblems(boolean captureProblems)
public boolean getCaptureProblems()
public void setAllowExternalProblems(boolean allowExternalProblems)
public boolean getAllowExternalProblems()
public void setHasBlankFill(boolean hasBlankFill)
public boolean isValid()
public void setInvalid()
public void setAttachedStartByte(Integer startByte)
public long getAttachedStartByte()
public boolean hasAttachedContent()
public String getLabelPath()
public void addProblem(int lineNumber, String key, Constants.ProblemType type, Object... arguments)
public void addProblem(int lineNumber, Integer column, String key, Constants.ProblemType type, Object... arguments)
public void addProblem(Statement statement, String key, Constants.ProblemType type, Object... arguments)
public void addProblem(Statement statement, Integer column, String key, Constants.ProblemType type, Object... arguments)
public void addProblem(URI sourceURI, int lineNumber, Integer column, String key, Constants.ProblemType type, Object... arguments)
public void addProblem(File sourceFile, int lineNumber, Integer column, String key, Constants.ProblemType type, Object... arguments)
public void addProblem(LabelParserException e)
public void addProblem(URI sourceURI, LabelParserException e)
public void addProblem(File sourceFile, LabelParserException e)
public void addProblem(Statement statement, LabelParserException e)
public List<Statement> getStatement(DictIdentifier identifier)
identifier
- Identifies the statement(s) to retrieve
public AttributeStatement getAttribute(String identifier)
identifier
- of attribute to find
public List<GroupStatement> getGroups(String identifier)
identifier
- of group to find
List
of GroupStatement
public List<ObjectStatement> getObjects(String identifier)
identifier
- of object to find
List
of ObjectStatement
public List<Statement> getStatements()
List
of Statement
public List<ObjectStatement> getObjects()
ObjectStatement
public List<GroupStatement> getGroups()
GroupStatement
public List<AttributeStatement> getAttributes()
AttributeStatement
public List<PointerStatement> getPointers()
PointerStatement
public void addStatement(Statement statement)
statement
- to be added to labelpublic List<LabelParserException> getProblems()
public void addAncestor(String path)
public void addAncestors(List<String> pointers)
public boolean hasAncestor(URI pointer)
public boolean hasAncestor(File pointer)
public boolean hasIncludePointer(String path)
public List<String> getAncestors()
public URI getLabelURI()
public File getLabelFile()
public String getSourceString()
public String getSourceNameString()
public void addLineLength(int line, int length)
line
- the line number for which we found a lengthlength
- the line length foundpublic List<Label.LineLength> getLineLengths()
public void checkLineLengths()
public static long getSkipBytes(Label label, Numeric startPosition)
public void setHasEndStatement()
public boolean hasEndStatement()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |