Package org.spdx.spdxRdfStore
Class SpdxResourceFactory
java.lang.Object
org.spdx.spdxRdfStore.SpdxResourceFactory
public class SpdxResourceFactory extends Object
Factory to create specific SPDX resources
-
Field Summary
Fields Modifier and Type Field Description static Set<String>DOAP_PROPERTIESstatic Set<String>DOAP_TYPESstatic Set<String>OWL_PROPERTIESstatic Set<String>POINTER_PROPERTIESstatic Set<String>POINTER_TYPESstatic Set<String>RDF_PROPERTIESstatic Set<String>RDFS_PROPERTIES -
Constructor Summary
Constructors Constructor Description SpdxResourceFactory() -
Method Summary
Modifier and Type Method Description static StringclassNameToUri(String className)static StringpropertyNameToUri(String propertyName)Create a Resource based on a standard SPDX property namestatic Optional<String>resourceToSpdxType(org.apache.jena.rdf.model.Resource type)Convert a type resource to the SPDX class or typestatic org.apache.jena.rdf.model.ResourcetypeToResource(String type)Create a Resource based on an SPDX class or type
-
Field Details
-
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
- Parameters:
className-- Returns:
- URI for the type or className
-
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
-