1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 module com
{ module sun
{ module star
{ module rdf
{
24 /** represents an RDF named graph that is stored in an RDF Repository.
27 Note that this interface inherits from XResource: the
28 name of the graph is the string value of the RDF node.
29 This is so that you can easily make RDF statements about named graphs.
33 Note that instances may be destroyed via
34 XRepository::destroyGraph().
35 If a graph is destroyed, subsequent calls to addStatement(),
36 removeStatements() will fail with an
37 com::sun::star::container::NoSuchElementException.
44 interface XNamedGraph
: XURI
47 /** returns the name of the graph.
50 The name is unique within the repository.
58 /** removes all statements from the graph.
60 @throws com::sun::star::container::NoSuchElementException
61 if this graph does not exist in the repository any more
63 @throws RepositoryException
64 if an error occurs when accessing the repository.
67 raises
( com
::sun
::star
::container
::NoSuchElementException
,
68 RepositoryException
);
70 /** adds a RDF statement to the graph.
73 Note that the ODF elements that can have metadata attached all
74 implement the interface XMetadatable, which inherits
75 from XResource, meaning that you can simply pass them
76 in as arguments here, and it will magically work.
80 the subject of the RDF triple.
83 the predicate of the RDF triple.
86 the object of the RDF triple.
88 @throws com::sun::star::lang::IllegalArgumentException
89 if any parameter is `NULL`
91 @throws com::sun::star::container::NoSuchElementException
92 if this graph does not exist in the repository any more
94 @throws RepositoryException
95 if an error occurs when accessing the repository.
97 void addStatement
([in] XResource Subject
,
100 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
101 com
::sun
::star
::container
::NoSuchElementException
,
102 RepositoryException
);
104 /** removes matching RDF statements from the graph.
107 Note that the ODF elements that can have metadata attached all
108 implement the interface XMetadatable, which inherits
109 from XResource, meaning that you can simply pass them
110 in as arguments here, and it will magically work.
114 Any parameter may be `NULL`, which acts as a wildcard.
115 For example, to remove all statements about myURI:
116 <code>removeStatement(myURI, null, null)</code>
120 the subject of the RDF triple.
123 the predicate of the RDF triple.
126 the object of the RDF triple.
128 @throws com::sun::star::container::NoSuchElementException
129 if this graph does not exist in the repository any more
131 @throws RepositoryException
132 if an error occurs when accessing the repository.
134 void removeStatements
([in] XResource Subject
,
137 raises
( com
::sun
::star
::container
::NoSuchElementException
,
138 RepositoryException
);
140 /** gets matching RDF statements from a graph.
143 Note that the ODF elements that can have metadata attached all
144 implement the interface XMetadatable, which inherits
145 from XResource, meaning that you can simply pass them
146 in as arguments here, and it will magically work.
150 Any parameter may be `NULL`, which acts as a wildcard.
151 For example, to get all statements about myURI:
152 <code>getStatements(myURI, null, null)</code>
156 the subject of the RDF triple.
159 the predicate of the RDF triple.
162 the object of the RDF triple.
165 an iterator over all RDF statements in the graph that match
166 the parameters, represented as an
167 enumeration of Statement
169 @throws com::sun::star::container::NoSuchElementException
170 if this graph does not exist in the repository any more
172 @throws RepositoryException
173 if an error occurs when accessing the repository.
177 com
::sun
::star
::container
::XEnumeration
/*<Statement>*/ getStatements
(
178 [in] XResource Subject
,
181 raises
( com
::sun
::star
::container
::NoSuchElementException
,
182 RepositoryException
);
184 //FIXME reification: addReifiedStatement(Statement)...
190 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */