Package org.spdx.core
Interface ISpdxModelInfo
-
public interface ISpdxModelInfo
Interface for SPDX model information- Author:
- Gary O'Neall
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canBeExternal(Class<?> clazz)
CoreModelObject
createExternalElement(IModelStore store, String uri, IModelCopyManager copyManager, Class<?> type, String specVersion)
CoreModelObject
createModelObject(IModelStore modelStore, String objectUri, String type, IModelCopyManager copyManager, String specVersion, boolean create, String idPrefix)
List<String>
getSpecVersions()
Map<String,Class<?>>
getTypeToClassMap()
Map<String,Enum<?>>
getUriToEnumMap()
Object
uriToIndividual(String uri, Class<?> type)
-
-
-
Method Detail
-
getUriToEnumMap
Map<String,Enum<?>> getUriToEnumMap()
- Returns:
- a map of URIs to Enums which represents individual vocabularies in the SPDX model
-
createExternalElement
CoreModelObject createExternalElement(IModelStore store, String uri, @Nullable IModelCopyManager copyManager, Class<?> type, String specVersion) throws InvalidSPDXAnalysisException
- Parameters:
store
- store to use for the inflated objecturi
- URI of the external elementcopyManager
- if non-null, create the external Doc ref if it is not a property of the SPDX DocumentspecVersion
- version of the SPDX specification used by the external element- Returns:
- model object of type type
- Throws:
InvalidSPDXAnalysisException
-
uriToIndividual
@Nullable Object uriToIndividual(String uri, Class<?> type)
- Parameters:
uri
- URI for the individualtype
- optional type hint - used for individuals where the type may be ambiguous- Returns:
- a matching individual for a given URI or null if no individual exists
-
createModelObject
CoreModelObject createModelObject(IModelStore modelStore, String objectUri, String type, IModelCopyManager copyManager, String specVersion, boolean create, @Nullable String idPrefix) throws InvalidSPDXAnalysisException
- Parameters:
modelStore
- store to use for the inflated objectobjectUri
- URI of the external elementtype
- Type of the object to createcopyManager
- if non-null, implicitly copy any referenced properties from other model storesspecVersion
- version of the SPDX specification used by the model objectcreate
- if true, create the model object ONLY if it does not already existidPrefix
- optional prefix used for any new object URI's created in support of this model object- Returns:
- fully inflated model object of type type
- Throws:
InvalidSPDXAnalysisException
-
getTypeToClassMap
Map<String,Class<?>> getTypeToClassMap()
- Returns:
- a map of string representation of types to classes which implement those types
-
canBeExternal
boolean canBeExternal(Class<?> clazz)
- Parameters:
clazz
- model class- Returns:
- true if clazz can be represented as external to the store
-
-