Class ByteOffsetPointer

  • All Implemented Interfaces:
    Comparable<SinglePointer>

    public class ByteOffsetPointer
    extends SinglePointer
    Byte offset pointer per RDF 2.3.2.2 ByteOffsetPointer Class
    Author:
    Gary O'Neall
    • Constructor Detail

      • ByteOffsetPointer

        public ByteOffsetPointer()
                          throws org.spdx.core.InvalidSPDXAnalysisException
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • ByteOffsetPointer

        public ByteOffsetPointer​(String id)
                          throws org.spdx.core.InvalidSPDXAnalysisException
        Parameters:
        id - identifier for the ByteOffsetPointer
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • ByteOffsetPointer

        public ByteOffsetPointer​(org.spdx.storage.IModelStore modelStore,
                                 String documentUri,
                                 String id,
                                 org.spdx.core.IModelCopyManager copyManager,
                                 boolean create)
                          throws org.spdx.core.InvalidSPDXAnalysisException
        Parameters:
        modelStore - container which includes the ByteOffsetPointer
        documentUri - URI for the SPDX document containing the ByteOffsetPointer
        id - identifier for the ByteOffsetPointer
        copyManager - if non-null, allows for copying of any properties set which use other model stores or document URI's
        create - if true, create the license if it does not exist
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
    • Method Detail

      • getType

        public String getType()
        Specified by:
        getType in class org.spdx.core.CoreModelObject
      • getOffset

        public int getOffset()
                      throws org.spdx.core.InvalidSPDXAnalysisException
        Returns:
        the offset, -1 if no offset is stored
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • setOffset

        public void setOffset​(Integer offset)
                       throws org.spdx.core.InvalidSPDXAnalysisException
        Parameters:
        offset - the offset to set
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • _verify

        protected List<String> _verify​(Set<String> verifiedIds,
                                       String specVersion)
        Description copied from class: ModelObjectV2
        Implementation of the specific verifications for this model object
        Overrides:
        _verify in class SinglePointer
        Parameters:
        verifiedIds - list of all Element Id's which have already been verified - prevents infinite recursion
        specVersion - Version of the SPDX spec to verify against
        Returns:
        Any verification errors or warnings associated with this object