Class ExtractedLicenseInfo

  • All Implemented Interfaces:
    Comparable<AbstractExtractedLicenseInfo>

    public class ExtractedLicenseInfo
    extends AbstractExtractedLicenseInfo
    An ExtractedLicensingInfo represents a license or licensing notice that was found in the package. Any license text that is recognized as a license may be represented as a License rather than an ExtractedLicensingInfo.
    Author:
    Gary O'Neall
    • Constructor Detail

      • ExtractedLicenseInfo

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

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

        public ExtractedLicenseInfo​(org.spdx.storage.IModelStore modelStore,
                                    String documentUri,
                                    String id,
                                    @Nullable
                                    org.spdx.core.IModelCopyManager copyManager,
                                    boolean create)
                             throws org.spdx.core.InvalidSPDXAnalysisException
        Create a new ExtractedLicenseInfo object
        Parameters:
        modelStore - container which includes the license
        documentUri - URI for the SPDX document containing the license
        id - identifier for the license
        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
      • ExtractedLicenseInfo

        public ExtractedLicenseInfo​(String id,
                                    String text)
                             throws org.spdx.core.InvalidSPDXAnalysisException
        Create a new ExtractedLicenseInfo using the ID and text
        Parameters:
        id - identifier
        text - license text
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
    • Method Detail

      • getType

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

        public void setExtractedText​(String text)
                              throws org.spdx.core.InvalidSPDXAnalysisException
        Parameters:
        text - the text 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:
      • equivalent

        public boolean equivalent​(org.spdx.core.CoreModelObject compare)
                           throws org.spdx.core.InvalidSPDXAnalysisException
        Overrides:
        equivalent in class org.spdx.core.CoreModelObject
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • equivalent

        public boolean equivalent​(org.spdx.core.CoreModelObject compare,
                                  boolean ignoreRelatedItems)
                           throws org.spdx.core.InvalidSPDXAnalysisException
        Overrides:
        equivalent in class org.spdx.core.CoreModelObject
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException