LibreOffice
LibreOffice 24.2 SDK API Reference
|
provides access to a set of named RDF graphs. More...
import"XRepository.idl";
Public Member Functions | |
XBlankNode | createBlankNode () |
creates a fresh unique blank node. More... | |
XNamedGraph | importGraph ([in] short Format, [in] com::sun::star::io::XInputStream InStream, [in] XURI GraphName, [in] XURI BaseURI) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::datatransfer::UnsupportedFlavorException, com::sun::star::container::ElementExistException, ParseException, RepositoryException, com::sun::star::io::IOException ) |
imports a named graph into the repository. More... | |
void | exportGraph ([in] short Format, [in] com::sun::star::io::XOutputStream OutStream, [in] XURI GraphName, [in] XURI BaseURI) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::datatransfer::UnsupportedFlavorException, com::sun::star::container::NoSuchElementException, RepositoryException, com::sun::star::io::IOException ) |
exports a named graph from the repository. More... | |
sequence< XURI > | getGraphNames () raises ( RepositoryException ) |
gets the names of all the graphs in the repository. More... | |
XNamedGraph | getGraph ([in] XURI GraphName) raises ( com::sun::star::lang::IllegalArgumentException, RepositoryException ) |
gets a graph by its name. More... | |
XNamedGraph | createGraph ([in] XURI GraphName) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::ElementExistException, RepositoryException ) |
creates a graph with the given name. More... | |
void | destroyGraph ([in] XURI GraphName) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::NoSuchElementException, RepositoryException ) |
destroys the graph with the given name, and removes it from the repository. More... | |
com::sun::star::container::XEnumeration | getStatements ([in] XResource Subject, [in] XURI Predicate, [in] XNode Object) raises ( RepositoryException ) |
gets matching RDF statements from the repository. More... | |
XQuerySelectResult | querySelect ([in] string Query) raises ( QueryException, RepositoryException ) |
executes a SPARQL "SELECT" query. More... | |
com::sun::star::container::XEnumeration | queryConstruct ([in] string Query) raises ( QueryException, RepositoryException ) |
executes a SPARQL "CONSTRUCT" query. More... | |
boolean | queryAsk ([in] string Query) raises ( QueryException, RepositoryException ) |
executes a SPARQL "ASK" query. More... | |
provides access to a set of named RDF graphs.
A repository for storing information according to the data model of the Resource Description Framework. This interface may be used e.g. for repositories that correspond to a loaded ODF document, or for repositories that are backed by some kind of database.
The RDF triples are stored as a set of named RDF graphs. Importing and exporting files in the RDF/XML format is supported. Support for other file formats is optional. Support for querying the repository with the SPARQL query language is provided.
XBlankNode createBlankNode | ( | ) |
creates a fresh unique blank node.
XNamedGraph createGraph | ( | [in] XURI | GraphName | ) | |
raises | ( | com::sun::star::lang::IllegalArgumentException, | |||
com::sun::star::container::ElementExistException, | |||||
RepositoryException | |||||
) |
creates a graph with the given name.
The name must be unique within the repository.
GraphName | the name of the graph that is to be created |
com::sun::star::lang::IllegalArgumentException | if the given GraphName is invalid |
com::sun::star::container::ElementExistException | if a graph with the given GraphName already exists |
RepositoryException | if an error occurs when accessing the repository. |
void destroyGraph | ( | [in] XURI | GraphName | ) | |
raises | ( | com::sun::star::lang::IllegalArgumentException, | |||
com::sun::star::container::NoSuchElementException, | |||||
RepositoryException | |||||
) |
destroys the graph with the given name, and removes it from the repository.
This invalidates any instances of XNamedGraph for the argument.
GraphName | the name of the graph that is to be destroyed |
com::sun::star::lang::IllegalArgumentException | if the given GraphName is invalid |
com::sun::star::container::NoSuchElementException | if a graph with the given GraphName does not exist |
RepositoryException | if an error occurs when accessing the repository. |
void exportGraph | ( | [in] short | Format, |
[in] com::sun::star::io::XOutputStream | OutStream, | ||
[in] XURI | GraphName, | ||
[in] XURI | BaseURI | ||
) | |||
raises | ( | com::sun::star::lang::IllegalArgumentException, | |
com::sun::star::datatransfer::UnsupportedFlavorException, | |||
com::sun::star::container::NoSuchElementException, | |||
RepositoryException, | |||
com::sun::star::io::IOException | |||
) |
exports a named graph from the repository.
Implementations must support RDF/XML format. Support for other RDF formats is optional. If the format is not supported by the implementation, an com::sun::star::datatransfer::UnsupportedFlavorException is raised.
Format | the format of the output file |
OutStream | the target output stream |
GraphName | the name of the graph that is to be exported |
BaseURI | a base URI to resolve relative URI references |
com::sun::star::lang::IllegalArgumentException | if the given stream or the GraphName is NULL , or BaseURI is NULL and the format requires use of a base URI |
com::sun::star::datatransfer::UnsupportedFlavorException | if the format requested is unknown or not supported |
com::sun::star::container::NoSuchElementException | if a graph with the given GraphName does not exist |
RepositoryException | if an error occurs when accessing the repository. |
com::sun::star::io::IOException | if an I/O error occurs. |
XNamedGraph getGraph | ( | [in] XURI | GraphName | ) | |
raises | ( | com::sun::star::lang::IllegalArgumentException, | |||
RepositoryException | |||||
) |
gets a graph by its name.
GraphName | the name of the graph that is to be returned |
NULL
com::sun::star::lang::IllegalArgumentException | if the given GraphName is invalid |
RepositoryException | if an error occurs when accessing the repository. |
sequence<XURI> getGraphNames | ( | ) | ||
raises | ( | RepositoryException | ||
) |
gets the names of all the graphs in the repository.
RepositoryException | if an error occurs when accessing the repository. |
com::sun::star::container::XEnumeration getStatements | ( | [in] XResource | Subject, |
[in] XURI | Predicate, | ||
[in] XNode | Object | ||
) | |||
raises | ( | RepositoryException | |
) |
gets matching RDF statements from the repository.
Any parameter may be NULL
, which acts as a wildcard. For example, to get all statements about myURI: getStatements(myURI, null, null)
Subject | the subject of the RDF triple. |
Predicate | the predicate of the RDF triple. |
Object | the object of the RDF triple. |
RepositoryException | if an error occurs when accessing the repository. |
XNamedGraph importGraph | ( | [in] short | Format, |
[in] com::sun::star::io::XInputStream | InStream, | ||
[in] XURI | GraphName, | ||
[in] XURI | BaseURI | ||
) | |||
raises | ( | com::sun::star::lang::IllegalArgumentException, | |
com::sun::star::datatransfer::UnsupportedFlavorException, | |||
com::sun::star::container::ElementExistException, | |||
ParseException, | |||
RepositoryException, | |||
com::sun::star::io::IOException | |||
) |
imports a named graph into the repository.
Implementations must support RDF/XML format. Support for other RDF formats is optional. If the format is not supported by the implementation, an com::sun::star::datatransfer::UnsupportedFlavorException is raised. If the format requires use of a BaseURI, but none is given, an com::sun::star::lang::IllegalArgumentException is raised.
Format | the format of the input file |
InStream | the input stream, containing an RDF file in the specified format |
GraphName | the name of the graph that is imported |
BaseURI | a base URI to resolve relative URI references |
com::sun::star::lang::IllegalArgumentException | if the given stream or the GraphName is NULL , or BaseURI is NULL and the format requires use of a base URI |
com::sun::star::datatransfer::UnsupportedFlavorException | if the format requested is unknown or not supported |
com::sun::star::container::ElementExistException | if a graph with the given GraphName already exists in the repository |
ParseException | if the input does not conform to the specified file format. |
RepositoryException | if an error occurs when accessing the repository. |
com::sun::star::io::IOException | if an I/O error occurs. |
boolean queryAsk | ( | [in] string | Query | ) | |
raises | ( | QueryException, | |||
RepositoryException | |||||
) |
executes a SPARQL "ASK" query.
This method runs a SPARQL query that computes a boolean, i.e., a query beginning with "ASK".
Query | the SPARQL query string |
QueryException | if the query is malformed, or evaluation fails |
RepositoryException | if an error occurs when accessing the repository. |
com::sun::star::container::XEnumeration queryConstruct | ( | [in] string | Query | ) | |
raises | ( | QueryException, | |||
RepositoryException | |||||
) |
executes a SPARQL "CONSTRUCT" query.
This method runs a SPARQL query that constructs a result graph, i.e., a query beginning with "CONSTRUCT".
Query | the SPARQL query string |
QueryException | if the query is malformed, or evaluation fails |
RepositoryException | if an error occurs when accessing the repository. |
XQuerySelectResult querySelect | ( | [in] string | Query | ) | |
raises | ( | QueryException, | |||
RepositoryException | |||||
) |
executes a SPARQL "SELECT" query.
This method runs a SPARQL query that returns a list of variable bindings, i.e., a query beginning with "SELECT". The result is basically a (rectangular) table with labeled columns, where individual cells may be NULL
.
Query | the SPARQL query string |
QueryException | if the query is malformed, or evaluation fails |
RepositoryException | if an error occurs when accessing the repository. |