Class ExternalMapInfo


  • public class ExternalMapInfo
    extends Object
    Author:
    Gary O'Neall Information about an ExternalMap captured from an ExternalDocumentRef
    • Constructor Detail

      • ExternalMapInfo

        public ExternalMapInfo​(String docRefId,
                               String externalDocumentUri,
                               Optional<org.spdx.library.model.v3_0_1.core.Hash> externalDocumentHash,
                               Collection<org.spdx.library.model.v3_0_1.core.ExternalMap> docImports)
        Parameters:
        docRefId - ID of the ExternalDocRef from the SPDX Spec version 2 SPDX Document containing the reference
        externalDocumentUri - External document URI for the external document being referenced
        externalDocumentHash - Optional Hash of the external SPDX document
        docImports - SPDX Spec version 3 collection of doc imports
    • Method Detail

      • addExternalMap

        public org.spdx.library.model.v3_0_1.core.ExternalMap addExternalMap​(String externalUri,
                                                                             org.spdx.storage.IModelStore modelStore)
                                                                      throws org.spdx.core.InvalidSPDXAnalysisException
        If the externalUri has not already been added, create an ExternalMap and add it to the docImports
        Parameters:
        externalUri - External URI to add
        modelStore - model store where the ExternalMap is to be stored
        Returns:
        the existing or added External map
        Throws:
        org.spdx.core.InvalidSPDXAnalysisException - on error creating the ExternalMap
      • getDocRefId

        public String getDocRefId()
        Returns:
        the docRefId
      • getExternalDocumentUri

        public String getExternalDocumentUri()
        Returns:
        the externalDocumentUri
      • getExternalDocumentHash

        public Optional<org.spdx.library.model.v3_0_1.core.Hash> getExternalDocumentHash()
        Returns:
        the externalDocumentHash
      • getDocImports

        public Collection<org.spdx.library.model.v3_0_1.core.ExternalMap> getDocImports()
        Returns:
        the docImports