Package org.spdx.spdxRdfStore
Class SpdxResourceFactory
java.lang.Object
org.spdx.spdxRdfStore.SpdxResourceFactory
Factory to create specific SPDX resources
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
classNameToUri
(String className) Converts a class name to its corresponding URIstatic String
propertyNameToUri
(String propertyName) Create a Resource based on a standard SPDX property nameresourceToSpdxType
(org.apache.jena.rdf.model.Resource type) Convert a type resource to the SPDX class or typestatic org.apache.jena.rdf.model.Resource
typeToResource
(String type) Create a Resource based on an SPDX class or type
-
Field Details
-
RDF_PROPERTIES
-
RDFS_PROPERTIES
-
DOAP_TYPES
-
DOAP_PROPERTIES
-
OWL_PROPERTIES
-
POINTER_TYPES
-
POINTER_PROPERTIES
-
-
Constructor Details
-
SpdxResourceFactory
public SpdxResourceFactory()
-
-
Method Details
-
typeToResource
Create a Resource based on an SPDX class or type- Parameters:
type
- type of SPDX object- Returns:
- RDF Type representation of the string type
-
classNameToUri
Converts a class name to its corresponding URI- Parameters:
className
- the name of the class to convert to a URI- Returns:
- the URI for the type or the class name
- Throws:
NullPointerException
- if the className is null
-
propertyNameToUri
Create a Resource based on a standard SPDX property name- Parameters:
propertyName
- name of the property- Returns:
- Resource representing the property
-
resourceToSpdxType
Convert a type resource to the SPDX class or type- Parameters:
type
- Resource representing the type- Returns:
- the SPDX class or type string, null if none of the class names match
-