Class ExternalMapInfo

java.lang.Object
org.spdx.library.conversion.ExternalMapInfo

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

    • 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 Details

    • 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