Class SinglePointer

  • All Implemented Interfaces:
    Comparable<SinglePointer>
    Direct Known Subclasses:
    ByteOffsetPointer, LineCharPointer

    public abstract class SinglePointer
    extends ModelObjectV2
    implements Comparable<SinglePointer>
    A pointing method made up of a unique pointer This is an abstract single pointer that provides the necessary framework, but it does not provide any kind of pointer, so more specific subclasses must be used. See http://www.w3.org/2009/pointers and https://www.w3.org/WAI/ER/Pointers/WD-Pointers-in-RDF10-20110427
    Author:
    Gary O'Neall
    • Constructor Detail

      • SinglePointer

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

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

        public SinglePointer​(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 model data
        documentUri - URI for the SPDX document containing the model data
        id - identifier
        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

      • getReference

        @Nullable
        public SpdxElement getReference()
                                 throws org.spdx.core.InvalidSPDXAnalysisException
        Returns:
        the reference, null if no reference is stored
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • setReference

        public void setReference​(SpdxElement reference)
                          throws org.spdx.core.InvalidSPDXAnalysisException
        Parameters:
        reference - the reference 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
        Specified by:
        _verify in class ModelObjectV2
        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
      • compareReferences

        protected int compareReferences​(SinglePointer o)