diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-07-01 15:24:29 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-07-01 15:24:29 +0000 |
commit | 516bf6db88e85fe9d28f85432b42c8710bf18867 (patch) | |
tree | de8d948cfdfe3cc8bda0b88228b23af7497d5f1f /offapi/com/sun/star/rdf | |
parent | a21809727e549a4cd7614ba2f0b02c8512753074 (diff) |
INTEGRATION: CWS odfmetadata (1.1.2); FILE ADDED
2008/06/11 15:45:05 mst 1.1.2.1: #i90620#: add RDF API
- offapi/prj/{build.lst,d.lst}, offapi/util/makefile.mk:
+ add directory com/sun/star/rdf
- offapi/com/sun/star/modules.idl:
+ add module rdf
- offapi/com/sun/star/rdf:
+ add the RDF API idl files
Diffstat (limited to 'offapi/com/sun/star/rdf')
-rw-r--r-- | offapi/com/sun/star/rdf/XBlankNode.idl | 63 | ||||
-rw-r--r-- | offapi/com/sun/star/rdf/XDocumentRepository.idl | 243 | ||||
-rw-r--r-- | offapi/com/sun/star/rdf/XLiteral.idl | 75 | ||||
-rw-r--r-- | offapi/com/sun/star/rdf/XMetadatable.idl | 95 | ||||
-rw-r--r-- | offapi/com/sun/star/rdf/XNamedGraph.idl | 232 | ||||
-rw-r--r-- | offapi/com/sun/star/rdf/XNode.idl | 82 | ||||
-rw-r--r-- | offapi/com/sun/star/rdf/XQuerySelectResult.idl | 79 |
7 files changed, 869 insertions, 0 deletions
diff --git a/offapi/com/sun/star/rdf/XBlankNode.idl b/offapi/com/sun/star/rdf/XBlankNode.idl new file mode 100644 index 000000000000..56862a21353f --- /dev/null +++ b/offapi/com/sun/star/rdf/XBlankNode.idl @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XBlankNode.idl,v $ + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_rdf_XBlankNode_idl__ +#define __com_sun_star_rdf_XBlankNode_idl__ + +#ifndef __com_sun_star_rdf_XResource_idl__ +#include <com/sun/star/rdf/XResource.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module rdf { + +//============================================================================= +/** represents a blank node that may occur in a RDF graph. + + <p> + Blank nodes are distinct, but have no URI; in other words, + they are resources that are anonymous. + </p> + + @since OOo 3.0 + + @see XRepository + */ +interface XBlankNode : XResource +{ +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/rdf/XDocumentRepository.idl b/offapi/com/sun/star/rdf/XDocumentRepository.idl new file mode 100644 index 000000000000..bd7f6d2259b6 --- /dev/null +++ b/offapi/com/sun/star/rdf/XDocumentRepository.idl @@ -0,0 +1,243 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XDocumentRepository.idl,v $ + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_rdf_XDocumentRepository_idl__ +#define __com_sun_star_rdf_XDocumentRepository_idl__ + +#ifndef __com_sun_star_text_XTextRange_idl__ +#include <com/sun/star/text/XTextRange.idl> +#endif + +#ifndef __com_sun_star_rdf_XMetadatable_idl__ +#include <com/sun/star/rdf/XMetadatable.idl> +#endif + +#ifndef __com_sun_star_rdf_XRepository_idl__ +#include <com/sun/star/rdf/XRepository.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module rdf { + +//============================================================================= +/** extends <type>XRepository</type> with document-specific functionality. + + <p> + This subclass of <type>XRepository</type> provides some methods which + only make sense for repositories that are attached to a document. + For example, the methods allow for manipulating in-content metadata, + which is stored as RDFa. + </p> + + @since OOo 3.0 + + @see XRepositorySupplier + @see XDocumentMetadataAccess + */ +interface XDocumentRepository : XRepository +{ + + //------------------------------------------------------------------------- + /** update the RDFa statement(s) that correspond to an ODF element in the + repository. + + <p> + This method will do the following steps: + <ol> + <li>Remove all RDFa statements that involve the Object parameter from + the repository</li> + <li>If the RDFaContent parameter is the empty <atom>string</atom>, + add the following RDF statement to an unspecified named graph: + <ul> + <li><code>Subject Predicate XLiteral(Object->getText())</code></li> + </ul> + </li> + <li>If the RDFaContent parameter is not the empty <atom>string</atom>, + add the following RDF statements to an unspecified named graph: + <ul> + <li> + <code>Subject Predicate XLiteral(RDFaContent^^RDFaDatatype)</code> + </li> + <li> + <code>Subject rdfs:label XLiteral(Object->getText())</code></li> + </ul> + </li> + </ol> + </p> + + <p> + RDFa statements are handled specially because they are not logically + part of any named graph in the repository. + Also, they have rather unusual semantics. + Also, just using <method>XNamedGraph::addStatement</method> + for this would be ambiguous: + if the object is a XMetadatable, do we insert the object itself (URI) + or its literal content (RDFa)? + </p> +//FIXME: updates??? + + @param Subject + the subject of the RDF triple. + + @param Predicate + the predicate of the RDF triple. + + @param Object + the object of the RDF triple is the text content of this parameter. + + @param RDFaContent + the <code>rdfa:content</code> attribute (may be the empty + <atom>string</atom>). + + @param RDFaDatatype + the <code>rdfa:datatype</code> attribute (may be <NULL/>) + + @throws com::sun::star::lang::IllegalArgumentException + if any parameter is <NULL/>, + or Object is of a type that can not have RDFa metadata attached. + + @throws RepositoryException + if an error occurs when accessing the repository. + */ + void setStatementRDFa( + [in] XURI Subject, + [in] XURI Predicate, + [in] com::sun::star::text::XTextRange Object, + [in] string RDFaContent, + [in] XURI RDFaDatatype) + raises( com::sun::star::lang::IllegalArgumentException, + RepositoryException ); + + //------------------------------------------------------------------------- + /** remove the RDFa statement(s) that correspond to an ODF element from the + repository. + + <p> + RDFa statements are handled specially because they are not logically + part of any graph. + </p> + + @param Object + the element whose RDFa statement(s) should be removed + + @throws com::sun::star::lang::IllegalArgumentException + if the given Element is <NULL/>, or of a type that can not have + RDFa metadata attached. + + @throws RepositoryException + if an error occurs when accessing the repository. + */ + void removeStatementRDFa([in] com::sun::star::text::XTextRange Object) + raises( com::sun::star::lang::IllegalArgumentException, + RepositoryException ); + + //------------------------------------------------------------------------- + /** find the RDFa statement(s) associated with an ODF element. + + @param Element + the ODF element for which RDFa statements should be found + + @returns + <ul> + <li>if the element has no RDFa meta-data attributes: + the empty sequence.</li> + <li>if the element has RDFa meta-data attributes, + and no <code>rdfa:content</code> attached: + a sequence with a single element: the RDFa-statement</li> + <li>if the element has RDFa meta-data attributes, + and also <code>rdfa:content</code> attached: + a sequence with 2 elements: first the RDFa-statement, + then the RDFa-labels-statement</li> + </ul> + + @throws com::sun::star::lang::IllegalArgumentException + if the given Element is <NULL/>, or of a type that can not have + RDFa metadata attached. + + @throws RepositoryException + if an error occurs when accessing the repository. + + @see Statement + */ + sequence<Statement> getStatementRDFa([in] XMetadatable Element) + raises( com::sun::star::lang::IllegalArgumentException, + RepositoryException ); + + //------------------------------------------------------------------------- + /** gets matching RDFa statements from the repository. + + <p> + This method exists because RDFa statements are not part of any named + graph, and thus they cannot be enumerated with + <method>XNamedGraph::getStatements</method>. + </p> + + <p> + Any parameter may be <NULL/>, which acts as a wildcard. + For example, to get all statements about myURI: + <code>getStatementsRDFa(myURI, null, null)</code> + </p> + + @param Subject + the subject of the RDF triple. + + @param Predicate + the predicate of the RDF triple. + + @param Object + the object of the RDF triple. + + @returns + an iterator over all RDFa statements in the repository that match + the parameters, represented as an + enumeration of <type>Statement</type> + + @throws RepositoryException + if an error occurs when accessing the repository. + + @see Statement + @see XRepository::getStatements + @see XNamedGraph::getStatements + */ + com::sun::star::container::XEnumeration/*<Statement>*/ getStatementsRDFa( + [in] XResource Subject, + [in] XResource Predicate, + [in] XNode Object) + raises( RepositoryException ); + +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/rdf/XLiteral.idl b/offapi/com/sun/star/rdf/XLiteral.idl new file mode 100644 index 000000000000..3296be18cab6 --- /dev/null +++ b/offapi/com/sun/star/rdf/XLiteral.idl @@ -0,0 +1,75 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XLiteral.idl,v $ + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_rdf_XLiteral_idl__ +#define __com_sun_star_rdf_XLiteral_idl__ + +#ifndef __com_sun_star_rdf_XURI_idl__ +#include <com/sun/star/rdf/XURI.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module rdf { + +//============================================================================= +/** represents a literal that may occur in a RDF graph. + + <p> + RDF literals may come in three varieties: + <ul> + <li>just a string Value</li> + <li>Value and Language</li> + <li>typed literal: Value and Datatype (represented by an URI)</li> + </ul> + Note that there is no literal with both Language and Datatype. + </p> + + @since OOo 3.0 + + @see XRepository + */ +interface XLiteral : XNode +{ + /// the content of the literal + [readonly, attribute] string Value; + /// the language of the literal; may be the empty <atom>string</atom> + [readonly, attribute] string Language; + /// the data type of the literal; may be <NULL/> + [readonly, attribute] XURI Datatype; + //FIXME: TODO: have not looked at handling all kinds of types, maybe just have an any attr here... +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/rdf/XMetadatable.idl b/offapi/com/sun/star/rdf/XMetadatable.idl new file mode 100644 index 000000000000..9c702cfc4db7 --- /dev/null +++ b/offapi/com/sun/star/rdf/XMetadatable.idl @@ -0,0 +1,95 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XMetadatable.idl,v $ + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_rdf_XMetadatable_idl__ +#define __com_sun_star_rdf_XMetadatable_idl__ + +#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ +#include <com/sun/star/lang/IllegalArgumentException.idl> +#endif + +#ifndef __com_sun_star_rdf_XResource_idl__ +#include <com/sun/star/rdf/XResource.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module rdf { + +//============================================================================= +/** marks an object representing an ODF element that may have RDF meta data + attached. + + <p> + To make using ODF elements as part of RDF statements more convenient, + this interface inherits from XRDFResource. + </p> + + @since OOo 3.0 + + @see XRDFRepository + */ +interface XMetadatable : XResource +{ + //------------------------------------------------------------------------- + /** an XML ID, comprising the stream name and the xml:id attribute. + + <p> + Note that this ID must be unique for the ODF document. + This implies that the xml:id part must be unique for every stream. + The ID may be omitted, in which case the value is the empty string. + For Example: "content.xml#foo-element-1" + </p> + + @throws com::sun::star::lang::IllegalArgumentException + if the given XmlId is invalid, or not unique + */ + [attribute] string XmlId { + set raises ( com::sun::star::lang::IllegalArgumentException ); + }; + + //------------------------------------------------------------------------- + /** creates an XML ID for this object, if necessary. + + <p> + If this object already has an XML ID, do nothing; + otherwise, create a fresh, unique XML ID and assign it to the + XmlId attribute. + </p> + */ + void ensureXmlId(); +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/rdf/XNamedGraph.idl b/offapi/com/sun/star/rdf/XNamedGraph.idl new file mode 100644 index 000000000000..be7b67448e9f --- /dev/null +++ b/offapi/com/sun/star/rdf/XNamedGraph.idl @@ -0,0 +1,232 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XNamedGraph.idl,v $ + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_rdf_XNamedGraph_idl__ +#define __com_sun_star_rdf_XNamedGraph_idl__ + +#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ +#include <com/sun/star/lang/IllegalArgumentException.idl> +#endif + +#ifndef __com_sun_star_container_NoSuchElementException_idl__ +#include <com/sun/star/container/NoSuchElementException.idl> +#endif + +#ifndef __com_sun_star_container_XEnumeration_idl__ +#include <com/sun/star/container/XEnumeration.idl> +#endif + +#ifndef __com_sun_star_rdf_RepositoryException_idl__ +#include <com/sun/star/rdf/RepositoryException.idl> +#endif + +#ifndef __com_sun_star_rdf_XURI_idl__ +#include <com/sun/star/rdf/XURI.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module rdf { + +//============================================================================= +/** represents an RDF named graph that is stored in an RDF Repository. + + <p> + Note that this interface inherits from <type>XResource</type>: the + name of the graph is the string value of the RDF node. + This is so that you can easily make RDF statements about named graphs. + </p> + + <p> + Note that instances may be destroyed via + <method>XRepository::destroyGraph</method>. + If a graph is destroyed, subsequent calls to <method>addStatement</method>, + <method>removeStatement</method> will fail with an + <type scope="com::sun::star::container">NoSuchElementException</type>. + </p> + + @since OOo 3.0 + + @see XRepository + */ +interface XNamedGraph : XURI +{ + + //------------------------------------------------------------------------- + /** returns the name of the graph. + + <p> + The name is unique within the repository. + </p> + + @returns + the name of the graph + */ + XURI getName(); + + //------------------------------------------------------------------------- + /** removes all statements from the graph. + + @throws com::sun::star::container::NoSuchElementException + if this graph does not exist in the repository any more + + @throws RepositoryException + if an error occurs when accessing the repository. + */ + void clear() + raises( com::sun::star::container::NoSuchElementException, + RepositoryException ); + + //------------------------------------------------------------------------- + /** adds a RDF statement to the graph. + + <p> + Note that the ODF elements that can have metadata attached all + implement the interface <type>XMetadatable</type>, which inherits + from <type>XResource</type>, meaning that you can simply pass them + in as arguments here, and it will magically work. + </p> + + @param Subject + the subject of the RDF triple. + + @param Predicate + the predicate of the RDF triple. + + @param Object + the object of the RDF triple. + + @throws com::sun::star::lang::IllegalArgumentException + if any parameter is <NULL/> + + @throws com::sun::star::container::NoSuchElementException + if this graph does not exist in the repository any more + + @throws RepositoryException + if an error occurs when accessing the repository. + */ + void addStatement([in] XResource Subject, + [in] XResource Predicate, + [in] XNode Object) + raises( com::sun::star::lang::IllegalArgumentException, + com::sun::star::container::NoSuchElementException, + RepositoryException ); + + //------------------------------------------------------------------------- + /** removes matching RDF statements from the graph. + + <p> + Note that the ODF elements that can have metadata attached all + implement the interface <type>XMetadatable</type>, which inherits + from <type>XResource</type>, meaning that you can simply pass them + in as arguments here, and it will magically work. + </p> + + <p> + Any parameter may be <NULL/>, which acts as a wildcard. + For example, to remove all statements about myURI: + <code>removeStatement(myURI, null, null)</code> + </p> + + @param Subject + the subject of the RDF triple. + + @param Predicate + the predicate of the RDF triple. + + @param Object + the object of the RDF triple. + + @throws com::sun::star::container::NoSuchElementException + if this graph does not exist in the repository any more + + @throws RepositoryException + if an error occurs when accessing the repository. + */ + void removeStatements([in] XResource Subject, + [in] XResource Predicate, + [in] XNode Object) + raises( com::sun::star::container::NoSuchElementException, + RepositoryException ); + + //------------------------------------------------------------------------- + /** gets matching RDF statements from a graph. + + <p> + Note that the ODF elements that can have metadata attached all + implement the interface <type>XMetadatable</type>, which inherits + from <type>XResource</type>, meaning that you can simply pass them + in as arguments here, and it will magically work. + </p> + + <p> + Any parameter may be <NULL/>, which acts as a wildcard. + For example, to get all statements about myURI: + <code>getStatements(myURI, null, null)</code> + </p> + + @param Subject + the subject of the RDF triple. + + @param Predicate + the predicate of the RDF triple. + + @param Object + the object of the RDF triple. + + @returns + an iterator over all RDF statements in the graph that match + the parameters, represented as an + enumeration of <type>Statement</type> + + @throws com::sun::star::container::NoSuchElementException + if this graph does not exist in the repository any more + + @throws RepositoryException + if an error occurs when accessing the repository. + + @see Statement + */ + com::sun::star::container::XEnumeration/*<Statement>*/ getStatements( + [in] XResource Subject, + [in] XResource Predicate, + [in] XNode Object) + raises( com::sun::star::container::NoSuchElementException, + RepositoryException ); + +//FIXME reification: addReifiedStatement(Statement)... +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/rdf/XNode.idl b/offapi/com/sun/star/rdf/XNode.idl new file mode 100644 index 000000000000..96cd622b090b --- /dev/null +++ b/offapi/com/sun/star/rdf/XNode.idl @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XNode.idl,v $ + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_rdf_XNode_idl__ +#define __com_sun_star_rdf_XNode_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module rdf { + +//============================================================================= +/** represents a node that may occur in a RDF graph. + + <p> + In the RDF data model, there are three distinct types of nodes: + URIs, blank nodes, and literals. + </p> + + <pre> + XNode + | + |---XLiteral + | + XResource + | + |---XBlankNode + | + XURI + </pre> + + @since OOo 3.0 + + @see XRepository + @see Statement + @see XResource + @see XBlankNode + @see XURI + @see XLiteral + */ +interface XNode +{ + /// the string value of the node. + [readonly, attribute] string StringValue; +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/rdf/XQuerySelectResult.idl b/offapi/com/sun/star/rdf/XQuerySelectResult.idl new file mode 100644 index 000000000000..9148b6b0db85 --- /dev/null +++ b/offapi/com/sun/star/rdf/XQuerySelectResult.idl @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XQuerySelectResult.idl,v $ + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_rdf_XQuerySelectResult_idl__ +#define __com_sun_star_rdf_XQuerySelectResult_idl__ + +#ifndef __com_sun_star_container_XEnumeration_idl__ +#include <com/sun/star/container/XEnumeration.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module rdf { + +//============================================================================= +/** represents the result of a SPARQL "SELECT" query. + + <p> + The result consists of: + <ol> + <li>a list of query variable names (column labels)</li> + <li>an iterator of query results (rows), + each being a list of bindings for the above variables</li> + </ol> + Note that each query result retrieved via + <method scope="com::sun::star::container">XEnumeration::nextElement</method> + has the type <type dim="[]">XNode</type>, + the length of the sequence being the same as the number of query variables. + </p> + + @since OOo 3.0 + + @see XRepository::querySelect + @see XNode + */ +interface XQuerySelectResult : com::sun::star::container::XEnumeration +{ + //------------------------------------------------------------------------- + /** get the names of the query variables. + + <p> + </p> + */ + sequence<string> getBindingNames(); +}; + +//============================================================================= + +}; }; }; }; + +#endif |