public class RedLinkDataImpl extends RedLinkAbstractImpl implements RedLink.Data
Data services implementation. To be instantiated, this implementation needs a valid Credentials object that
must contain a RedLink API key which will be used in each request to the server.RedLink.Analysis, RedLink.Data, RedLink.Search| Constructor and Description |
|---|
RedLinkDataImpl(Credentials credentials) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cleanDataset(String dataset)
Clean (delete all the data) user's dataset.
|
boolean |
deleteResource(String resource,
String dataset)
Delete a Resource identified by its URI in the user dataset passed by parameter.
|
org.openrdf.model.Model |
exportDataset(String dataset)
Export the user dataset at his RedLink application to a local RDF
Model. |
org.openrdf.model.Model |
getResource(String resource)
Get resource data by its URI as RDF
Model |
org.openrdf.model.Model |
getResource(String resource,
String dataset)
Get resource data by its URI as RDF
Model from the user dataset passed by parameter. |
boolean |
importDataset(File file,
String dataset)
Import the Model contained in the passed
File into the selected Dataset. |
boolean |
importDataset(File file,
String dataset,
boolean cleanBefore)
Import the Model contained in the passed
File into the selected Dataset. |
boolean |
importDataset(InputStream in,
org.openrdf.rio.RDFFormat format,
String dataset)
Import the Model contained in the passed
InputStream into the selected Dataset. |
boolean |
importDataset(InputStream in,
org.openrdf.rio.RDFFormat format,
String dataset,
boolean cleanBefore)
Import the Model contained in the passed
InputStream into the selected Dataset. |
boolean |
importDataset(org.openrdf.model.Model data,
String dataset)
Import an RDF
Model into the selected Dataset. |
boolean |
importDataset(org.openrdf.model.Model data,
String dataset,
boolean cleanBefore)
Import an RDF
Model into the selected Dataset. |
boolean |
importResource(String resource,
org.openrdf.model.Model data,
String dataset)
Import a resource represented by an RDF
Model into the selected Dataset. |
boolean |
importResource(String resource,
org.openrdf.model.Model data,
String dataset,
boolean cleanBefore)
Import a resource represented by an RDF
Model into the selected Dataset. |
LDPathResult |
ldpath(String uri,
String program)
Execute a LDPath program using as context all the configured datasets at user's RedLink application
|
LDPathResult |
ldpath(String uri,
String dataset,
String program)
Execute a LDPath program using the dataset passed by paramater as context.
|
org.openrdf.model.Model |
sparqlGraphQuery(String query)
Execute a SPARQL graph query using as context all the configured datasets at user's RedLink application
|
org.openrdf.model.Model |
sparqlGraphQuery(String query,
String dataset)
Execute a SPARQL graph query using the dataset passed by paramater as context.
|
org.apache.marmotta.client.model.sparql.SPARQLResult |
sparqlSelect(String query)
Deprecated.
|
org.apache.marmotta.client.model.sparql.SPARQLResult |
sparqlSelect(String query,
String dataset)
Deprecated.
|
org.apache.marmotta.client.model.sparql.SPARQLResult |
sparqlTupleQuery(String query)
Execute a SPARQL tuple query using as context all the configured datasets at user's RedLink application
|
org.apache.marmotta.client.model.sparql.SPARQLResult |
sparqlTupleQuery(String query,
String dataset)
Execute a SPARQL tuple query using the dataset passed by paramater as context.
|
boolean |
sparqlUpdate(String query,
String dataset)
Update dataset's resources using an SPARQL update query.
|
public RedLinkDataImpl(Credentials credentials)
public boolean importDataset(org.openrdf.model.Model data,
String dataset)
throws IOException,
org.openrdf.rio.RDFHandlerException
RedLink.DataModel into the selected Dataset. The Dataset must exist at the user RedLink account and
must be configured for the user's RedLink application used in the request.importDataset in interface RedLink.Datadata - RDF Model to be importeddataset - Name of the dataset where the data will be importedIOExceptionorg.openrdf.rio.RDFHandlerExceptionpublic boolean importDataset(org.openrdf.model.Model data,
String dataset,
boolean cleanBefore)
throws org.openrdf.rio.RDFHandlerException,
IOException
RedLink.DataModel into the selected Dataset. The Dataset must exist at the user RedLink account and
must be configured for the user's RedLink application used in the request. If cleanBefore value is true, current dataset at
user's RedLink application will be cleaned firstimportDataset in interface RedLink.Datadata - RDF Model to be importeddataset - Name of the dataset where the data will be importedcleanBefore - Flag indicating if the dataset must be cleaned beforeorg.openrdf.rio.RDFHandlerExceptionIOExceptionpublic boolean importDataset(File file, String dataset) throws FileNotFoundException
RedLink.DataFile into the selected Dataset. The Dataset must exist at the user RedLink account and
must be configured for the user's RedLink application used in the requestimportDataset in interface RedLink.Datafile - File containing the RDF Model to be importeddataset - Name of the dataset where the data will be importedFileNotFoundExceptionpublic boolean importDataset(File file, String dataset, boolean cleanBefore) throws FileNotFoundException
RedLink.DataFile into the selected Dataset. The Dataset must exist at the user RedLink account and
must be configured for the user's RedLink application used in the request. If cleanBefore value is true, current dataset at
user's RedLink application will be cleaned firstimportDataset in interface RedLink.Datafile - File containing the RDF Model to be importeddataset - Name of the dataset where the data will be importedcleanBefore - Flag indicating if the dataset must be cleaned beforeFileNotFoundExceptionpublic boolean importDataset(InputStream in, org.openrdf.rio.RDFFormat format, String dataset)
RedLink.DataInputStream into the selected Dataset. The Dataset must exist at the user RedLink account and
must be configured for the user's RedLink application used in the requestimportDataset in interface RedLink.Datain - InputStream containing the RDF Model to be importedformat - RDFFormat indicating the format of the model contained in the InputStreamdataset - Name of the dataset where the data will be importedpublic boolean importDataset(InputStream in, org.openrdf.rio.RDFFormat format, String dataset, boolean cleanBefore)
RedLink.DataInputStream into the selected Dataset. The Dataset must exist at the user RedLink account and
must be configured for the user's RedLink application used in the request. If cleanBefore value is true, current dataset at
user's RedLink application will be cleaned firstimportDataset in interface RedLink.Datain - InputStream containing the RDF Model to be importedformat - RDFFormat indicating the format of the model contained in the InputStreamdataset - Name of the dataset where the data will be importedcleanBefore - Flag indicating if the dataset must be cleaned beforepublic org.openrdf.model.Model exportDataset(String dataset)
RedLink.DataModel. The Dataset must exist at the user RedLink account and
must be configured for the user's RedLink application used in the requestexportDataset in interface RedLink.Datadataset - Name of the dataset at user's RedLink application to be exportedModel representing the datasetpublic boolean cleanDataset(String dataset)
RedLink.DatacleanDataset in interface RedLink.Datadataset - Name of the dataset at user's RedLink application to be cleanedpublic org.openrdf.model.Model getResource(String resource)
RedLink.DataModelgetResource in interface RedLink.Dataresource - URI (identifier) of the resourceModel representing the resource and all its properties or null if the resource is not foundpublic org.openrdf.model.Model getResource(String resource, String dataset)
RedLink.DataModel from the user dataset passed by parameter. The Dataset must exist at the user RedLink account and
must be configured for the user's RedLink application used in the requestgetResource in interface RedLink.Dataresource - URI (identifier) of the resourcedataset - Name of the dataset at user's RedLink application where the resource will be lookuppublic boolean importResource(String resource, org.openrdf.model.Model data, String dataset)
RedLink.DataModel into the selected Dataset. The Dataset must exist at the user RedLink account and
must be configured for the user's RedLink application used in the request.importResource in interface RedLink.Dataresource - URI (identifier) of the resourcedata - Resource data as RDF Modeldataset - Name of the dataset at user's RedLink application where the resource will be importedpublic boolean importResource(String resource, org.openrdf.model.Model data, String dataset, boolean cleanBefore)
RedLink.DataModel into the selected Dataset. The Dataset must exist at the user RedLink account and
must be configured for the user's RedLink application used in the request. If cleanBefore value is true, current resource at
user's dataset will be deleted firstimportResource in interface RedLink.Dataresource - URI (identifier) of the resourcedata - Resource data as RDF Modeldataset - Name of the dataset at user's RedLink application where the resource will be importedcleanBefore - Flag indicating if the resource must be deleted beforepublic boolean deleteResource(String resource, String dataset)
RedLink.DatadeleteResource in interface RedLink.Dataresource - URI (identifier) of the resourcedataset - Name of the dataset at user's RedLink application where the resource will be deletedpublic org.apache.marmotta.client.model.sparql.SPARQLResult sparqlTupleQuery(String query)
RedLink.DatasparqlTupleQuery in interface RedLink.Dataquery - SPARQL tuple query to be executedSPARQLResult object@Deprecated public org.apache.marmotta.client.model.sparql.SPARQLResult sparqlSelect(String query)
RedLink.DatasparqlSelect in interface RedLink.Datapublic org.apache.marmotta.client.model.sparql.SPARQLResult sparqlTupleQuery(String query, String dataset)
RedLink.DatasparqlTupleQuery in interface RedLink.Dataquery - SPARQL tuple query to be executeddataset - Name of the dataset at user's RedLink application where the query will be executedSPARQLResult object@Deprecated public org.apache.marmotta.client.model.sparql.SPARQLResult sparqlSelect(String query, String dataset)
RedLink.DatasparqlSelect in interface RedLink.Datapublic org.openrdf.model.Model sparqlGraphQuery(String query)
RedLink.DatasparqlGraphQuery in interface RedLink.Dataquery - SPARQL graph query to be executedModel objectpublic org.openrdf.model.Model sparqlGraphQuery(String query, String dataset)
RedLink.DatasparqlGraphQuery in interface RedLink.Dataquery - SPARQL graph query to be executeddataset - ame of the dataset at user's RedLink application where the query will be executedModel objectpublic boolean sparqlUpdate(String query, String dataset)
RedLink.DatasparqlUpdate in interface RedLink.Dataquery - SPARQL query to be executeddataset - Name of the dataset at user's RedLink application where the query will be executedpublic LDPathResult ldpath(String uri, String dataset, String program)
RedLink.Dataldpath in interface RedLink.Datadataset - Name of the dataset at user's RedLink application where the query will be executedprogram - LDPath program to be executedLDPathResult objectpublic LDPathResult ldpath(String uri, String program)
RedLink.Dataldpath in interface RedLink.Dataprogram - LDPath program to be executedLDPathResult objectCopyright © 2014 Redlink GmbH. All rights reserved.