Class SpdxItem

    • Constructor Detail

      • SpdxItem

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

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

        public SpdxItem​(org.spdx.storage.IModelStore modelStore,
                        String documentUri,
                        String id,
                        @Nullable
                        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

      • getLicenseInfoFromFilesPropertyDescriptor

        protected org.spdx.storage.PropertyDescriptor getLicenseInfoFromFilesPropertyDescriptor()
        Returns:
        Property name for licenseInfoFromFiles. Override if using a subproperty of "licenseDeclared".
      • getLicenseConcluded

        public AnyLicenseInfo getLicenseConcluded()
                                           throws org.spdx.core.InvalidSPDXAnalysisException
        Returns:
        the licenseConcluded
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • setLicenseConcluded

        public SpdxItem setLicenseConcluded​(@Nullable
                                            AnyLicenseInfo license)
                                     throws org.spdx.core.InvalidSPDXAnalysisException
        Set the licenseConcluded
        Parameters:
        license -
        Returns:
        this so you can chain setters
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • getLicenseInfoFromFiles

        public Collection<AnyLicenseInfo> getLicenseInfoFromFiles()
                                                           throws org.spdx.core.InvalidSPDXAnalysisException
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • getCopyrightText

        public String getCopyrightText()
                                throws org.spdx.core.InvalidSPDXAnalysisException
        Returns:
        the copyrightText, empty string if no copyright was set
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • setCopyrightText

        public SpdxItem setCopyrightText​(@Nullable
                                         String copyrightText)
                                  throws org.spdx.core.InvalidSPDXAnalysisException
        Parameters:
        copyrightText - the copyrightText to set
        Returns:
        myself - so you can chain setters
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • getAttributionText

        public Collection<String> getAttributionText()
                                              throws org.spdx.core.InvalidSPDXAnalysisException
        Returns:
        attribution text collection
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • setName

        public SpdxItem setName​(String name)
                         throws org.spdx.core.InvalidSPDXAnalysisException
        Description copied from class: SpdxElement
        Set the name
        Overrides:
        setName in class SpdxElement
        Returns:
        this so that you can chain setters
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • getLicenseComments

        public Optional<String> getLicenseComments()
                                            throws org.spdx.core.InvalidSPDXAnalysisException
        Returns:
        the licenseComment
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException
      • setLicenseComments

        public SpdxItem setLicenseComments​(String licenseComments)
                                    throws org.spdx.core.InvalidSPDXAnalysisException
        Parameters:
        licenseComments - the licenseComment to set
        Returns:
        this so you chan chain setters
        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 SpdxElement
        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