Package org.spdx.library.conversion
Class ExternalMapInfo
- java.lang.Object
-
- org.spdx.library.conversion.ExternalMapInfo
-
public class ExternalMapInfo extends Object
- Author:
- Gary O'Neall Information about an ExternalMap captured from an ExternalDocumentRef
-
-
Constructor Summary
Constructors Constructor Description 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.spdx.library.model.v3_0_1.core.ExternalMap
addExternalMap(String externalUri, org.spdx.storage.IModelStore modelStore)
If the externalUri has not already been added, create an ExternalMap and add it to the docImportsCollection<org.spdx.library.model.v3_0_1.core.ExternalMap>
getDocImports()
String
getDocRefId()
Optional<org.spdx.library.model.v3_0_1.core.Hash>
getExternalDocumentHash()
String
getExternalDocumentUri()
-
-
-
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 referenceexternalDocumentUri
- External document URI for the external document being referencedexternalDocumentHash
- Optional Hash of the external SPDX documentdocImports
- 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 addmodelStore
- 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
-
-