public class TRSUtil extends Object
Modifier and Type | Field and Description |
---|---|
static QName |
dateModifiedQname |
static SimpleDateFormat |
XSD_DATETIME_FORMAT |
Constructor and Description |
---|
TRSUtil() |
Modifier and Type | Method and Description |
---|---|
static List<org.eclipse.lyo.core.trs.ChangeEvent> |
getChangeEventsFromChangeLogJenaModel(org.apache.jena.rdf.model.Model changeLogJenaModel)
look for and return the change events inside the given rdf model
|
static List<org.apache.jena.rdf.model.Resource> |
getResourcesWithTypeFromModel(org.apache.jena.rdf.model.Model model,
String fullQualifiedRDFTypeName)
Return the list of resources from the rdf model with the given rdf type
|
static Object |
historyDataToChangeEvent(Object objToConvert)
Convert a history data object to a change event and vice versa
|
static org.apache.jena.rdf.model.Model |
readJenaModelFromFile(String filePath)
return an rdf jena model object after reading it from the given file path
|
static void |
writeModelToFile(org.apache.jena.rdf.model.Model jenaModel,
String filePath)
write the rdf model to the file with the given path in rdf/xml syntax
|
public static final SimpleDateFormat XSD_DATETIME_FORMAT
public static QName dateModifiedQname
public static List<org.apache.jena.rdf.model.Resource> getResourcesWithTypeFromModel(org.apache.jena.rdf.model.Model model, String fullQualifiedRDFTypeName)
model
- the rdf model in which the resources will be looked 4fullQualifiedRDFTypeName
- the type of resources to look 4public static List<org.eclipse.lyo.core.trs.ChangeEvent> getChangeEventsFromChangeLogJenaModel(org.apache.jena.rdf.model.Model changeLogJenaModel) throws IllegalAccessException, IllegalArgumentException, InstantiationException, InvocationTargetException, SecurityException, NoSuchMethodException, DatatypeConfigurationException, org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException, URISyntaxException
changeLogJenaModel
- the rdf model inside which the change events will be looked 4IllegalAccessException
IllegalArgumentException
InstantiationException
InvocationTargetException
SecurityException
NoSuchMethodException
DatatypeConfigurationException
org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException
URISyntaxException
public static org.apache.jena.rdf.model.Model readJenaModelFromFile(String filePath) throws IOException
filePath
- the path of the file from which the rdf model shall be readIOException
public static void writeModelToFile(org.apache.jena.rdf.model.Model jenaModel, String filePath) throws IOException
jenaModel
- rdf model to be written to filefilePath
- path to which the file shall be written 2IOException
Copyright © 2018. All Rights Reserved.