Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / rdf / XNamedGraph.idl
blobab4b16843df1f51c30be35c84e777222faa13b03
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef __com_sun_star_rdf_XNamedGraph_idl__
30 #define __com_sun_star_rdf_XNamedGraph_idl__
32 #include <com/sun/star/lang/IllegalArgumentException.idl>
33 #include <com/sun/star/container/NoSuchElementException.idl>
34 #include <com/sun/star/container/XEnumeration.idl>
35 #include <com/sun/star/rdf/RepositoryException.idl>
36 #include <com/sun/star/rdf/XURI.idl>
39 //=============================================================================
41 module com { module sun { module star { module rdf {
43 //=============================================================================
44 /** represents an RDF named graph that is stored in an RDF Repository.
46 <p>
47 Note that this interface inherits from <type>XResource</type>: the
48 name of the graph is the string value of the RDF node.
49 This is so that you can easily make RDF statements about named graphs.
50 </p>
52 <p>
53 Note that instances may be destroyed via
54 <member>XRepository::destroyGraph</member>.
55 If a graph is destroyed, subsequent calls to <member>addStatement</member>,
56 <member>removeStatements</member> will fail with an
57 <type scope="com::sun::star::container">NoSuchElementException</type>.
58 </p>
60 @since OOo 3.2
62 @see XRepository
64 interface XNamedGraph : XURI
67 //-------------------------------------------------------------------------
68 /** returns the name of the graph.
70 <p>
71 The name is unique within the repository.
72 </p>
74 @returns
75 the name of the graph
77 XURI getName();
79 //-------------------------------------------------------------------------
80 /** removes all statements from the graph.
82 @throws com::sun::star::container::NoSuchElementException
83 if this graph does not exist in the repository any more
85 @throws RepositoryException
86 if an error occurs when accessing the repository.
88 void clear()
89 raises( com::sun::star::container::NoSuchElementException,
90 RepositoryException );
92 //-------------------------------------------------------------------------
93 /** adds a RDF statement to the graph.
95 <p>
96 Note that the ODF elements that can have metadata attached all
97 implement the interface <type>XMetadatable</type>, which inherits
98 from <type>XResource</type>, meaning that you can simply pass them
99 in as arguments here, and it will magically work.
100 </p>
102 @param Subject
103 the subject of the RDF triple.
105 @param Predicate
106 the predicate of the RDF triple.
108 @param Object
109 the object of the RDF triple.
111 @throws com::sun::star::lang::IllegalArgumentException
112 if any parameter is <NULL/>
114 @throws com::sun::star::container::NoSuchElementException
115 if this graph does not exist in the repository any more
117 @throws RepositoryException
118 if an error occurs when accessing the repository.
120 void addStatement([in] XResource Subject,
121 [in] XURI Predicate,
122 [in] XNode Object)
123 raises( com::sun::star::lang::IllegalArgumentException,
124 com::sun::star::container::NoSuchElementException,
125 RepositoryException );
127 //-------------------------------------------------------------------------
128 /** removes matching RDF statements from the graph.
131 Note that the ODF elements that can have metadata attached all
132 implement the interface <type>XMetadatable</type>, which inherits
133 from <type>XResource</type>, meaning that you can simply pass them
134 in as arguments here, and it will magically work.
135 </p>
138 Any parameter may be <NULL/>, which acts as a wildcard.
139 For example, to remove all statements about myURI:
140 <code>removeStatement(myURI, null, null)</code>
141 </p>
143 @param Subject
144 the subject of the RDF triple.
146 @param Predicate
147 the predicate of the RDF triple.
149 @param Object
150 the object of the RDF triple.
152 @throws com::sun::star::container::NoSuchElementException
153 if this graph does not exist in the repository any more
155 @throws RepositoryException
156 if an error occurs when accessing the repository.
158 void removeStatements([in] XResource Subject,
159 [in] XURI Predicate,
160 [in] XNode Object)
161 raises( com::sun::star::container::NoSuchElementException,
162 RepositoryException );
164 //-------------------------------------------------------------------------
165 /** gets matching RDF statements from a graph.
168 Note that the ODF elements that can have metadata attached all
169 implement the interface <type>XMetadatable</type>, which inherits
170 from <type>XResource</type>, meaning that you can simply pass them
171 in as arguments here, and it will magically work.
172 </p>
175 Any parameter may be <NULL/>, which acts as a wildcard.
176 For example, to get all statements about myURI:
177 <code>getStatements(myURI, null, null)</code>
178 </p>
180 @param Subject
181 the subject of the RDF triple.
183 @param Predicate
184 the predicate of the RDF triple.
186 @param Object
187 the object of the RDF triple.
189 @returns
190 an iterator over all RDF statements in the graph that match
191 the parameters, represented as an
192 enumeration of <type>Statement</type>
194 @throws com::sun::star::container::NoSuchElementException
195 if this graph does not exist in the repository any more
197 @throws RepositoryException
198 if an error occurs when accessing the repository.
200 @see Statement
202 com::sun::star::container::XEnumeration/*<Statement>*/ getStatements(
203 [in] XResource Subject,
204 [in] XURI Predicate,
205 [in] XNode Object)
206 raises( com::sun::star::container::NoSuchElementException,
207 RepositoryException );
209 //FIXME reification: addReifiedStatement(Statement)...
212 //=============================================================================
214 }; }; }; };
216 #endif
218 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */