Class Label


  • public class Label
    extends Object
    This class represents a PDS label.
    Version:
    $Revision$
    Author:
    pramirez, jagander
    • Constructor Detail

      • Label

        public Label​(URI labelURI)
        Constructs an object representation of a PDS label.
      • Label

        public Label​(File labelFile)
    • Method Detail

      • setCaptureProblems

        public void setCaptureProblems​(boolean captureProblems)
      • getCaptureProblems

        public boolean getCaptureProblems()
      • setAllowExternalProblems

        public void setAllowExternalProblems​(boolean allowExternalProblems)
      • getAllowExternalProblems

        public boolean getAllowExternalProblems()
      • setHasBlankFill

        public void setHasBlankFill​(boolean hasBlankFill)
      • isValid

        public boolean isValid()
      • setInvalid

        public void setInvalid()
      • setAttachedStartByte

        public void setAttachedStartByte​(Integer startByte)
      • getAttachedStartByte

        public long getAttachedStartByte()
      • hasAttachedContent

        public boolean hasAttachedContent()
      • getLabelPath

        public String getLabelPath()
      • getStatement

        public List<Statement> getStatement​(DictIdentifier identifier)
        Retrieves a statement with the identifier
        Parameters:
        identifier - Identifies the statement(s) to retrieve
        Returns:
        The named statement or null if not found
      • getAttribute

        public AttributeStatement getAttribute​(String identifier)
        Retrieves the attribute with the identifier or null if not found
        Parameters:
        identifier - of attribute to find
        Returns:
        attribute or null
      • getGroups

        public List<GroupStatement> getGroups​(String identifier)
        Retrieves the groups with the identifier or null if not found
        Parameters:
        identifier - of group to find
        Returns:
        List of GroupStatement
      • getStatements

        public List<Statement> getStatements()
        Retrieves the statements associated with this label
        Returns:
        List of Statement
      • addStatement

        public void addStatement​(Statement statement)
        Associates a statement with this label
        Parameters:
        statement - to be added to label
      • addAncestor

        public void addAncestor​(String path)
      • addAncestors

        public void addAncestors​(List<String> pointers)
      • hasAncestor

        public boolean hasAncestor​(URI pointer)
      • hasAncestor

        public boolean hasAncestor​(File pointer)
      • hasIncludePointer

        public boolean hasIncludePointer​(String path)
      • getAncestors

        public List<String> getAncestors()
      • getLabelURI

        public URI getLabelURI()
      • getLabelFile

        public File getLabelFile()
      • getSourceString

        public String getSourceString()
      • getSourceNameString

        public String getSourceNameString()
      • addLineLength

        public void addLineLength​(int line,
                                  int length)
        Remember a line length for a line within a label. The line length includes the line terminator.
        Parameters:
        line - the line number for which we found a length
        length - the line length found
      • getLineLengths

        public List<Label.LineLength> getLineLengths()
        Return the line lengths for all label lines.
        Returns:
        a list of the line lengths found
      • checkLineLengths

        public void checkLineLengths()
      • getSkipBytes

        public static long getSkipBytes​(Label label,
                                        Numeric startPosition)
      • setHasEndStatement

        public void setHasEndStatement()
      • hasEndStatement

        public boolean hasEndStatement()