LibreOffice Module sw (master)  1
Static Public Member Functions | List of all members
SwRDFHelper Class Reference

Provides access to RDF metadata on core objects. More...

#include <rdfhelper.hxx>

Static Public Member Functions

static css::uno::Sequence< css::uno::Reference< css::rdf::XURI > > getGraphNames (const css::uno::Reference< css::rdf::XDocumentMetadataAccess > &xDocumentMetadataAccess, const css::uno::Reference< css::rdf::XURI > &xType)
 Gets all graph-names in RDF of a given type. More...
 
static css::uno::Sequence< css::uno::Reference< css::rdf::XURI > > getGraphNames (const css::uno::Reference< css::frame::XModel > &xModel, const OUString &rType)
 Gets all graph-names in RDF of a given type. More...
 
static std::map< OUString, OUString > getStatements (const css::uno::Reference< css::frame::XModel > &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 given the graph-names. More...
 
static std::map< OUString, OUString > getStatements (const css::uno::Reference< css::frame::XModel > &xModel, const OUString &rType, const css::uno::Reference< css::rdf::XResource > &xSubject)
 Gets all (XResource, key, value) statements in RDF graphs of type rType. More...
 
static void addStatement (const css::uno::Reference< css::frame::XModel > &xModel, const OUString &rType, const OUString &rPath, const css::uno::Reference< css::rdf::XResource > &xSubject, const OUString &rKey, const OUString &rValue)
 Add an (XResource, key, value) statement in the graph of type rType – or if it does not exist, create a graph at rPath first. More...
 
static bool hasMetadataGraph (const css::uno::Reference< css::frame::XModel > &xModel, const OUString &rType)
 Check if a graph of type rType exists. More...
 
static void removeStatement (const css::uno::Reference< css::frame::XModel > &xModel, const OUString &rType, const css::uno::Reference< css::rdf::XResource > &xSubject, const OUString &rKey, const OUString &rValue)
 Remove an (XResource, key, value) statement in the graph of type rType, if it exists. More...
 
static void cloneStatements (const css::uno::Reference< css::frame::XModel > &xSrcModel, const css::uno::Reference< css::frame::XModel > &xDstModel, const OUString &rType, const css::uno::Reference< css::rdf::XResource > &xSrcSubject, const css::uno::Reference< css::rdf::XResource > &xDstSubject)
 Clone all statements in the graph of type rType, if any exists, from one subject to another. More...
 
static void clearStatements (const css::uno::Reference< css::frame::XModel > &xModel, const OUString &rType, const css::uno::Reference< css::rdf::XResource > &xSubject)
 Remove all statements in the graph of type rType, if any exists. More...
 
static std::map< OUString, OUString > getTextNodeStatements (const OUString &rType, SwTextNode &rTextNode)
 Gets all (rTextNode, key, value) statements in RDF graphs of type rType. More...
 
static void addTextNodeStatement (const OUString &rType, const OUString &rPath, SwTextNode &rTextNode, const OUString &rKey, const OUString &rValue)
 Add an (rTextNode, key, value) statement in the graph of type rType – or if it does not exist, create a graph at rPath first. More...
 
static void removeTextNodeStatement (const OUString &rType, SwTextNode &rTextNode, const OUString &rKey, const OUString &rValue)
 Remove an (rTextNode, key, value) statement in the graph of type rType. More...
 
static void updateTextNodeStatement (const OUString &rType, const OUString &rPath, SwTextNode &rTextNode, const OUString &rKey, const OUString &rOldValue, const OUString &rNewValue)
 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. More...
 

Detailed Description

Provides access to RDF metadata on core objects.

Definition at line 36 of file rdfhelper.hxx.

Member Function Documentation

void SwRDFHelper::addStatement ( const css::uno::Reference< css::frame::XModel > &  xModel,
const OUString &  rType,
const OUString &  rPath,
const css::uno::Reference< css::rdf::XResource > &  xSubject,
const OUString &  rKey,
const OUString &  rValue 
)
static

Add an (XResource, key, value) statement in the graph of type rType – or if it does not exist, create a graph at rPath first.

Definition at line 99 of file rdfhelper.cxx.

References comphelper::getProcessComponentContext().

Referenced by lcl_ApplyParagraphClassification(), and SwEditShell::RestoreMetadataFieldsAndValidateParagraphSignatures().

void SwRDFHelper::addTextNodeStatement ( const OUString &  rType,
const OUString &  rPath,
SwTextNode rTextNode,
const OUString &  rKey,
const OUString &  rValue 
)
static

Add an (rTextNode, key, value) statement in the graph of type rType – or if it does not exist, create a graph at rPath first.

Definition at line 207 of file rdfhelper.cxx.

References SwXParagraph::CreateXParagraph(), SfxObjectShell::GetBaseModel(), SwNode::GetDoc(), and SwDoc::GetDocShell().

Referenced by SwFltControlStack::SetAttrInDoc().

void SwRDFHelper::clearStatements ( const css::uno::Reference< css::frame::XModel > &  xModel,
const OUString &  rType,
const css::uno::Reference< css::rdf::XResource > &  xSubject 
)
static

Remove all statements in the graph of type rType, if any exists.

Definition at line 148 of file rdfhelper.cxx.

References comphelper::getProcessComponentContext().

Referenced by SwTextNode::DestroyAttr().

void SwRDFHelper::cloneStatements ( const css::uno::Reference< css::frame::XModel > &  xSrcModel,
const css::uno::Reference< css::frame::XModel > &  xDstModel,
const OUString &  rType,
const css::uno::Reference< css::rdf::XResource > &  xSrcSubject,
const css::uno::Reference< css::rdf::XResource > &  xDstSubject 
)
static

Clone all statements in the graph of type rType, if any exists, from one subject to another.

Definition at line 173 of file rdfhelper.cxx.

References comphelper::getProcessComponentContext().

static css::uno::Sequence<css::uno::Reference<css::rdf::XURI> > SwRDFHelper::getGraphNames ( const css::uno::Reference< css::rdf::XDocumentMetadataAccess > &  xDocumentMetadataAccess,
const css::uno::Reference< css::rdf::XURI > &  xType 
)
static

Gets all graph-names in RDF of a given type.

Referenced by SwEditShell::RestoreMetadataFieldsAndValidateParagraphSignatures().

css::uno::Sequence< uno::Reference< css::rdf::XURI > > SwRDFHelper::getGraphNames ( const css::uno::Reference< css::frame::XModel > &  xModel,
const OUString &  rType 
)
static

Gets all graph-names in RDF of a given type.

Definition at line 41 of file rdfhelper.cxx.

References comphelper::getProcessComponentContext().

static std::map<OUString, OUString> SwRDFHelper::getStatements ( const css::uno::Reference< css::frame::XModel > &  xModel,
const css::uno::Sequence< css::uno::Reference< css::rdf::XURI >> &  rGraphNames,
const css::uno::Reference< css::rdf::XResource > &  xSubject 
)
static

Gets all (XResource, key, value) statements in RDF graphs given the graph-names.

Referenced by SwEditShell::RestoreMetadataFieldsAndValidateParagraphSignatures().

std::map< OUString, OUString > SwRDFHelper::getStatements ( const css::uno::Reference< css::frame::XModel > &  xModel,
const OUString &  rType,
const css::uno::Reference< css::rdf::XResource > &  xSubject 
)
static

Gets all (XResource, key, value) statements in RDF graphs of type rType.

Definition at line 92 of file rdfhelper.cxx.

std::map< OUString, OUString > SwRDFHelper::getTextNodeStatements ( const OUString &  rType,
SwTextNode rTextNode 
)
static

Gets all (rTextNode, key, value) statements in RDF graphs of type rType.

Definition at line 201 of file rdfhelper.cxx.

References SwXParagraph::CreateXParagraph(), SfxObjectShell::GetBaseModel(), SwNode::GetDoc(), and SwDoc::GetDocShell().

Referenced by WW8Export::AppendSmartTags(), and DocxAttributeOutput::EndParagraphProperties().

bool SwRDFHelper::hasMetadataGraph ( const css::uno::Reference< css::frame::XModel > &  xModel,
const OUString &  rType 
)
static

Check if a graph of type rType exists.

Definition at line 122 of file rdfhelper.cxx.

References comphelper::getProcessComponentContext().

Referenced by SwEditShell::ClassifyDocPerHighestParagraphClass().

void SwRDFHelper::removeStatement ( const css::uno::Reference< css::frame::XModel > &  xModel,
const OUString &  rType,
const css::uno::Reference< css::rdf::XResource > &  xSubject,
const OUString &  rKey,
const OUString &  rValue 
)
static

Remove an (XResource, key, value) statement in the graph of type rType, if it exists.

Definition at line 130 of file rdfhelper.cxx.

References comphelper::getProcessComponentContext().

Referenced by lcl_ApplyParagraphClassification().

void SwRDFHelper::removeTextNodeStatement ( const OUString &  rType,
SwTextNode rTextNode,
const OUString &  rKey,
const OUString &  rValue 
)
static

Remove an (rTextNode, key, value) statement in the graph of type rType.

Definition at line 213 of file rdfhelper.cxx.

References SwXParagraph::CreateXParagraph(), SfxObjectShell::GetBaseModel(), SwNode::GetDoc(), SwDoc::GetDocShell(), and comphelper::getProcessComponentContext().

void SwRDFHelper::updateTextNodeStatement ( const OUString &  rType,
const OUString &  rPath,
SwTextNode rTextNode,
const OUString &  rKey,
const OUString &  rOldValue,
const OUString &  rNewValue 
)
static

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.

Definition at line 230 of file rdfhelper.cxx.

References SwXParagraph::CreateXParagraph(), SfxObjectShell::GetBaseModel(), SwNode::GetDoc(), SwDoc::GetDocShell(), and comphelper::getProcessComponentContext().


The documentation for this class was generated from the following files: