Package org.spdx.core

Interface ISpdxModelInfo


  • public interface ISpdxModelInfo
    Interface for SPDX model information
    Author:
    Gary O'Neall
    • Method Detail

      • getUriToEnumMap

        Map<String,​Enum<?>> getUriToEnumMap()
        Returns:
        a map of URIs to Enums which represents individual vocabularies in the SPDX model
      • getSpecVersions

        List<String> getSpecVersions()
        Returns:
        the spec versions this model supports
      • uriToIndividual

        @Nullable
        Object uriToIndividual​(String uri,
                               Class<?> type)
        Parameters:
        uri - URI for the individual
        type - 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 object
        objectUri - URI of the external element
        type - Type of the object to create
        copyManager - if non-null, implicitly copy any referenced properties from other model stores
        specVersion - version of the SPDX specification used by the model object
        create - if true, create the model object ONLY if it does not already exist
        idPrefix - 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