public class ListedExceptions extends Object implements IModelContainer
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCheckNodeObject(org.apache.jena.graph.Node node,
IRdfModel rdfModelObject)
Add a node object to the container.
|
void |
addSpdxElementRef(String elementRef)
Notifies the model container that a new element ref is in use.
|
org.apache.jena.rdf.model.Resource |
createResource(org.apache.jena.rdf.model.Resource duplicate,
String uri,
org.apache.jena.rdf.model.Resource type,
IRdfModel modelObject)
Create a resource in the model
|
String |
documentNamespaceToId(String externalNamespace)
Translate an external document namespace URI to an external document ID
|
String |
externalDocumentIdToNamespace(String docId)
Translate an external document ID to the external document's namespace
|
String |
getDocumentNamespace() |
protected ListedLicenseException |
getExceptionFromUri(String uri)
Get a listed exception based on a URI.
|
ListedLicenseException |
getLicenseFromStdLicModel(IModelContainer modelContainer,
org.apache.jena.graph.Node node)
Get or create a standard exception in the model container copying any
relevant information from the standard model to the model in the modelContainer
|
String |
getLicenseListVersion() |
ListedLicenseException |
getListedExceptionById(String id) |
static ListedExceptions |
getListedExceptions() |
org.apache.jena.rdf.model.Model |
getModel() |
String |
getNextSpdxElementRef() |
String[] |
getSpdxListedExceptionIds() |
boolean |
isSpdxListedLExceptionID(String id) |
static ListedExceptions |
resetListedExceptions()
Resets all of the cached exception information and reloads the exception IDs
NOTE: This method should be used with caution, it will negatively impact
performance.
|
boolean |
spdxElementRefExists(String elementRef)
Returns true if the element reference already exists in the model
|
public static ListedExceptions getListedExceptions()
public static ListedExceptions resetListedExceptions()
public org.apache.jena.rdf.model.Model getModel()
getModel in interface IModelContainerprotected ListedLicenseException getExceptionFromUri(String uri) throws InvalidSPDXAnalysisException
uri - InvalidSPDXAnalysisExceptionpublic String[] getSpdxListedExceptionIds()
public String getLicenseListVersion()
public ListedLicenseException getLicenseFromStdLicModel(IModelContainer modelContainer, org.apache.jena.graph.Node node) throws InvalidSPDXAnalysisException
modelContainer - node - InvalidSPDXAnalysisExceptionpublic String getDocumentNamespace()
getDocumentNamespace in interface IModelContainerpublic String getNextSpdxElementRef()
getNextSpdxElementRef in interface IModelContainerpublic boolean spdxElementRefExists(String elementRef)
IModelContainerspdxElementRefExists in interface IModelContainerpublic void addSpdxElementRef(String elementRef)
IModelContaineraddSpdxElementRef in interface IModelContainerpublic String documentNamespaceToId(String externalNamespace)
IModelContainerdocumentNamespaceToId in interface IModelContainerpublic String externalDocumentIdToNamespace(String docId)
IModelContainerexternalDocumentIdToNamespace in interface IModelContainerpublic org.apache.jena.rdf.model.Resource createResource(org.apache.jena.rdf.model.Resource duplicate,
String uri,
org.apache.jena.rdf.model.Resource type,
IRdfModel modelObject)
IModelContainercreateResource in interface IModelContainerduplicate - A duplicate resource who's node and resource should be returneduri - If not null, the URI for the resource - if null, an anonomous resource will be usedtype - Type of the resourcemodelObject - the object representing this nodepublic boolean addCheckNodeObject(org.apache.jena.graph.Node node,
IRdfModel rdfModelObject)
IModelContaineraddCheckNodeObject in interface IModelContainerpublic boolean isSpdxListedLExceptionID(String id)
id - exception IDpublic ListedLicenseException getListedExceptionById(String id) throws InvalidSPDXAnalysisException
id - InvalidSPDXAnalysisExceptionCopyright © 2019 Linux Foundation. All Rights Reserved.