/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_rdf_XDocumentRepository_idl__
#define __com_sun_star_rdf_XDocumentRepository_idl__
#include
This subclass of XRepository 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.
This method will do the following steps:
Subject Predicate
XLiteral(Object->getText()^^RDFaDatatype)
Subject Predicate XLiteral(RDFaContent^^RDFaDatatype)
RDFa statements are handled specially because they are not logically part of any named graph in the repository. Also, they have rather unusual semantics; just using XNamedGraph::addStatement() would be ambiguous: if the object is a XMetadatable, do we insert the object itself (URI) or its literal content (RDFa)?
@param Subject the subject of the RDF triple(s). @param Predicates the predicates of the RDF triple(s). @param Object the object of the RDF triple(s) is the text content of this parameter. @param RDFaContent therdfa:content
attribute (may be the empty
`string`).
@param RDFaDatatype
the rdfa:datatype
attribute (may be `NULL`)
@throws com::sun::star::lang::IllegalArgumentException
if any parameter is `NULL`, Predicates is empty,
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] XResource Subject,
[in] sequenceRDFa statements are handled specially because they are not logically part of any graph.
@param Element 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] XMetadatable Element) 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 @returnsThis method exists because RDFa statements are not part of any named graph, and thus they cannot be enumerated with XNamedGraph::getStatements().
Any parameter may be `NULL`, which acts as a wildcard.
For example, to get all statements about myURI:
getStatementsRDFa(myURI, null, null)