/* -*- 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/.
*/
class SwTextNode; class SwXTextDocument; namespace com::sun::star { namespace rdf { class XDocumentMetadataAccess; class XResource; class XURI;
}
}
/// Provides access to RDF metadata on core objects. class SW_DLLPUBLIC SwRDFHelper
{ public: /// Gets all graph-names in RDF of a given type. static css::uno::Sequence<css::uno::Reference<css::rdf::XURI>>
getGraphNames(const rtl::Reference<SwXTextDocument>& xModel, const css::uno::Reference<css::rdf::XURI>& xType);
/// Gets all graph-names in RDF of a given type. static css::uno::Sequence<css::uno::Reference<css::rdf::XURI>>
getGraphNames(const rtl::Reference<SwXTextDocument>& xModel, const OUString& rType);
/// Gets all (XResource, key, value) statements in RDF graphs given the graph-names. static std::map<OUString, OUString>
getStatements(const rtl::Reference<SwXTextDocument>& xModel, const css::uno::Sequence<css::uno::Reference<css::rdf::XURI>>& rGraphNames, const css::uno::Reference<css::rdf::XResource>& xSubject);
/// Gets all (XResource, key, value) statements in RDF graphs of type rType. static std::map<OUString, OUString>
getStatements(const rtl::Reference<SwXTextDocument>& xModel, const OUString& rType, const css::uno::Reference<css::rdf::XResource>& xSubject);
/// Add an (XResource, key, value) statement in the graph of type rType -- or if it does not exist, create a graph at rPath first. staticvoid addStatement(const rtl::Reference<SwXTextDocument>& xModel, const OUString& rType, const OUString& rPath, const css::uno::Reference<css::rdf::XResource>& xSubject, const OUString& rKey, const OUString& rValue);
/// Check if a graph of type rType exists. staticbool hasMetadataGraph(const rtl::Reference<SwXTextDocument>& xModel, const OUString& rType);
/// Remove an (XResource, key, value) statement in the graph of type rType, if it exists. staticvoid removeStatement(const rtl::Reference<SwXTextDocument>& xModel, const OUString& rType, const css::uno::Reference<css::rdf::XResource>& xSubject, const OUString& rKey, const OUString& rValue);
/// Remove all statements in the graph of type rType, if any exists. staticvoid clearStatements(const rtl::Reference<SwXTextDocument>& xModel, const OUString& rType, const css::uno::Reference<css::rdf::XResource>& xSubject);
/// Gets all (rTextNode, key, value) statements in RDF graphs of type rType. static std::map<OUString, OUString> getTextNodeStatements(const OUString& rType, SwTextNode& rTextNode);
/// Add an (rTextNode, key, value) statement in the graph of type rType -- or if it does not exist, create a graph at rPath first. staticvoid addTextNodeStatement(const OUString& rType, const OUString& rPath, SwTextNode& rTextNode, const OUString& rKey, const OUString& rValue);
/// Remove an (rTextNode, key, value) statement in the graph of type rType. staticvoid removeTextNodeStatement(const OUString& rType, SwTextNode& rTextNode, const OUString& rKey, const OUString& rValue);
/// Update an (rTextNode, key, value) statement in the graph of type rType from old value to new. Creates the graph at rPath if doesn't exist. staticvoid updateTextNodeStatement(const OUString& rType, const OUString& rPath, SwTextNode& rTextNode, const OUString& rKey, const OUString& rOldValue, const OUString& rNewValue);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.