public class OSLC4JUtils extends Object
Constructor and Description |
---|
OSLC4JUtils() |
Modifier and Type | Method and Description |
---|---|
static com.hp.hpl.jena.datatypes.RDFDatatype |
getDataTypeBasedOnResourceShapeType(HashSet<String> rdfTypesList,
com.hp.hpl.jena.rdf.model.Property property)
This method receives the property name and the property value and tries
to infer the property Data Type from the pre-defined list of Resource Shapes.
|
static String |
getInferTypeFromShape() |
static String |
getPublicURI()
Returns the value of org.eclipse.lyo.oslc4j.publicURI or null if not set.
|
static List<ResourceShape> |
getShapes()
Returns a list of Resource Shapes to be used when inferring a property
type from the Resource Shape.
|
static String |
getUseBeanClassForParsing() |
static Object |
getValueBasedOnResourceShapeType(HashSet<String> rdfTypesList,
QName propertyQName,
Object originalValue)
This method receives the property name and the property value and tries
to infer the property type from the pre-defined list of Resource Shapes.
|
static boolean |
inferTypeFromShape() |
static boolean |
isHostResolutionDisabled()
Returns the boolean value of org.eclipse.lyo.oslc4j.disableHostResolution
Default is false if not set or invalid (hostname resolution will take place)
|
static boolean |
isQueryResultListAsContainer()
Return if the query result list type will be
http://www.w3.org/2000/01/rdf-schema#Container or there will be no type.
|
static boolean |
relativeURIsAreDisabled()
Returns the boolean value of org.eclipse.lyo.oslc4j.disableRelativeURIs
Default is true if not set or invalid (relative URIs will not be allowed)
|
static String |
resolveURI(javax.servlet.http.HttpServletRequest request,
boolean includePath)
Resolve a URI (usually a resource subject or info URI) based on the settings of
org.eclipse.lyo.oslc4j.publicURI and org.eclipse.lyo.oslc4j.disableHostResolution.
|
static void |
setHostResolutionDisabled(boolean hostResDisabled) |
static void |
setInferTypeFromShape(String inferTypeFromShape) |
static void |
setPublicURI(String newPublicURI)
Sets the value of org.eclipse.lyo.oslc4j.publicURI
|
static void |
setShapes(List<ResourceShape> shapes)
Sets a list of Resource Shapes to be used when inferring a property type
from the Resource Shape.
|
static void |
setUseBeanClassForParsing(String useBeanClassForParsing) |
static boolean |
useBeanClassForParsing() |
public static String getPublicURI()
public static void setPublicURI(String newPublicURI) throws MalformedURLException
publicURI
- MalformedURLException
public static boolean useBeanClassForParsing()
public static String getUseBeanClassForParsing()
public static void setUseBeanClassForParsing(String useBeanClassForParsing)
public static boolean inferTypeFromShape()
public static String getInferTypeFromShape()
public static void setInferTypeFromShape(String inferTypeFromShape)
public static List<ResourceShape> getShapes()
public static void setShapes(List<ResourceShape> shapes)
shapes
- List of Resource Shapespublic static boolean isHostResolutionDisabled()
public static void setHostResolutionDisabled(boolean hostResDisabled)
public static String resolveURI(javax.servlet.http.HttpServletRequest request, boolean includePath)
request
- - request to base resolved URI onincludePath
- - if the path (after the context root) should be included in the resolved URIpublic static boolean relativeURIsAreDisabled()
public static boolean isQueryResultListAsContainer()
public static Object getValueBasedOnResourceShapeType(HashSet<String> rdfTypesList, QName propertyQName, Object originalValue) throws DatatypeConfigurationException, IllegalArgumentException, InstantiationException, InvocationTargetException
rdfTypesList
- propertyQName
- Property informationoriginalValue
- Property valueDatatypeConfigurationException
- , IllegalArgumentException, InstantiationException,
InvocationTargetException
onIllegalArgumentException
InstantiationException
InvocationTargetException
public static com.hp.hpl.jena.datatypes.RDFDatatype getDataTypeBasedOnResourceShapeType(HashSet<String> rdfTypesList, com.hp.hpl.jena.rdf.model.Property property)
rdfTypesList
- propertyQName
- Property informationoriginalValue
- Property valueDatatypeConfigurationException
- , IllegalArgumentException, InstantiationException,
InvocationTargetException
onCopyright © 2017. All rights reserved.