The RDF associated with a document. More...
#include <pd_DocumentRDF.h>
Public Member Functions | |
PD_DocumentRDF (PD_Document *doc) | |
virtual | ~PD_DocumentRDF () |
UT_Error | setupWithPieceTable () |
If the document changes its m_pPieceTable it needs to call here too. | |
bool | haveSemItems () const |
Does this document have any semantic items like contacts, events etc. | |
virtual PD_ObjectList | getObjects (const PD_URI &s, const PD_URI &p) |
Get a list of all the objects which have the given subject and predicate. | |
virtual PD_URIList | getSubjects (const PD_URI &p, const PD_Object &o) |
Get a list of all the subjects which have the given predicate and object. | |
virtual PD_URIList | getAllSubjects () |
virtual POCol | getArcsOut (const PD_URI &s) |
Get the predicate and objects which have the given subject. | |
virtual bool | contains (const PD_URI &s, const PD_URI &p, const PD_Object &o) |
Test if the given triple is in the RDF or not. | |
virtual bool | contains (const PD_RDFStatement &st) |
virtual long | getTripleCount () |
Get the total number of triples in the model. | |
virtual PD_RDFModelIterator | begin () |
virtual PD_RDFModelIterator | end () |
virtual void | dumpModel (const std::string &headerMsg="dumpModel()") |
Dump the model as debug messages. | |
virtual PD_DocumentRDFMutationHandle | createMutation () |
The single way that you can update the document RDF is through an PD_DocumentRDFMutation. | |
void | handleCollabEvent (const gchar **szAtts, const gchar **szProps) |
Internal method: used by AbiCollab to update the RDF. | |
PD_RDFModelHandle | getRDFAtPosition (PT_DocPosition pos) |
PD_RDFModelHandle | getRDFForID (const std::string &xmlid) |
std::list< pf_Frag_Object * > | getObjectsInScopeOfTypesForRange (std::set< PTObjectType > objectTypes, std::pair< PT_DocPosition, PT_DocPosition > range) |
std::set< std::string > & | addXMLIDsForObjects (std::set< std::string > &ret, std::list< pf_Frag_Object * > objectList) |
PT_DocPosition | addXMLIDsForBlockAndTableCellForPosition (std::set< std::string > &col, PT_DocPosition pos) |
void | addRDFForID (const std::string &xmlid, PD_DocumentRDFMutationHandle &m) |
std::set< std::string > & | addRelevantIDsForPosition (std::set< std::string > &ret, PT_DocPosition pos) |
std::set< std::string > & | addRelevantIDsForRange (std::set< std::string > &ret, PD_DocumentRange *range) |
std::set< std::string > & | addRelevantIDsForRange (std::set< std::string > &ret, std::pair< PT_DocPosition, PT_DocPosition > range) |
std::set< std::string > & | getAllIDs (std::set< std::string > &ret) |
std::pair< PT_DocPosition, PT_DocPosition > | getIDRange (const std::string &xmlid) const |
PD_RDFModelHandle | createRestrictedModelForXMLIDs (const std::string &writeID, const std::set< std::string > &xmlids) |
PD_RDFModelHandle | createRestrictedModelForXMLIDs (const std::set< std::string > &xmlids) |
virtual void | maybeSetDocumentDirty () |
void | runMilestone2Test () |
void | runMilestone2Test2 () |
void | dumpObjectMarkersFromDocument () |
void | runPlay () |
std::string | makeLegalXMLID (const std::string &s) |
void | relinkRDFToNewXMLID (const std::string &oldxmlid, const std::string &newxmlid, bool deepCopyRDF=false) |
PD_RDFModelHandle | createScratchModel () |
PD_RDFSemanticItems | getAllSemanticObjects (const std::string &classRestriction="") |
PD_RDFSemanticItems | getSemanticObjects (const std::set< std::string > &xmlids) |
PD_RDFContacts | getContacts (PD_RDFModelHandle alternateModel=PD_RDFModelHandle((PD_RDFModel *) 0)) |
PD_RDFEvents | getEvents (PD_RDFModelHandle alternateModel=PD_RDFModelHandle((PD_RDFModel *) 0)) |
PD_RDFLocations | getLocations (PD_RDFModelHandle alternateModel=PD_RDFModelHandle((PD_RDFModel *) 0)) |
void | selectXMLIDs (const std::set< std::string > &xmlids, FV_View *pView=0) const |
void | showEditorWindow (const PD_RDFSemanticItems &cl) |
Static Public Member Functions | |
static std::string | getSPARQL_LimitedToXMLIDList (const std::set< std::string > &xmlids, const std::string &extraPreds="") |
static PD_URI | getManifestURI () |
static void | setSemanticItemFactory (PD_SemanticItemFactory *f) |
static void | setRDFDialogs (PD_RDFDialogs *d) |
static PD_SemanticItemFactory * | getSemanticItemFactory () |
static PD_RDFDialogs * | getRDFDialogs () |
Protected Member Functions | |
PD_ObjectList & | apGetObjects (const PP_AttrProp *AP, PD_ObjectList &ret, const PD_URI &s, const PD_URI &p) |
Internal method: Using the supplied AP, insert into ret a list of all the objects which have the given subject and predicate. | |
PD_URIList & | apGetSubjects (const PP_AttrProp *AP, PD_URIList &ret, const PD_URI &p, const PD_Object &o) |
Internal method: Using the supplied AP, insert into ret a list of all the subjects which have the given predicate and object. | |
PD_URIList & | apGetAllSubjects (const PP_AttrProp *AP, PD_URIList &ret) |
Internal method: Using the supplied AP, insert into ret a list of every subject in the model. | |
POCol & | apGetArcsOut (const PP_AttrProp *AP, POCol &ret, const PD_URI &s) |
Get the predicate and objects which have the given subject. | |
bool | apContains (const PP_AttrProp *AP, const PD_URI &s, const PD_URI &p, const PD_Object &o) |
Internal method: tests if the AP has the triple or not. | |
void | apDumpModel (const PP_AttrProp *AP, const std::string &headerMsg) |
Dump the model contained in the given AP as debug messages. | |
void | updateHaveSemItemsCache () |
Protected Attributes | |
PD_Document * | m_doc |
Private Member Functions | |
PD_Document * | getDocument (void) const |
pt_PieceTable * | getPieceTable (void) const |
void | setIndexAP (PT_AttrPropIndex idx) |
Change the AttrProp Index that we are using to store all the RDF. | |
PT_AttrPropIndex | getIndexAP (void) const |
Get the AttrProp index where we are storing all the RDF. | |
virtual const PP_AttrProp * | getAP (void) |
Get the AttrProp with all the RDF in it. | |
virtual UT_Error | setAP (PP_AttrProp *newAP) |
virtual bool | isStandAlone () const |
std::set< std::string > & | priv_addRelevantIDsForPosition (std::set< std::string > &ret, PT_DocPosition pos, PT_DocPosition searchBackThisFar=0) |
PD_RDFLocations & | addLocations (PD_RDFLocations &ret, bool isGeo84, const std::string sparql, PD_RDFModelHandle alternateModel) |
Private Attributes | |
PT_AttrPropIndex | m_indexAP |
bool | m_haveSemItems |
Static Private Attributes | |
static PD_SemanticItemFactory * | s_SemanticItemFactory |
static PD_RDFDialogs * | s_RDFDialogs |
Friends | |
class | PD_DocumentRDFMutation |
class | RDFModel_SPARQLLimited |
class | PD_RDFMutation_XMLIDLimited |
class | PD_RDFSemanticItem |
The RDF associated with a document.
The RDFModel interface can be used to query all the RDF for this document. Use createMutation() to create an object which allows you to update the RDF in batch.
To find the RDF which is associated with an element use getRDFAtPosition() and getRDFForID() which return a submodel.
PD_DocumentRDF::PD_DocumentRDF | ( | PD_Document * | doc | ) | [explicit] |
References UT_DEBUGMSG.
PD_DocumentRDF::~PD_DocumentRDF | ( | ) | [virtual] |
References UT_DEBUGMSG.
PD_RDFLocations & PD_DocumentRDF::addLocations | ( | PD_RDFLocations & | ret, | |
bool | isGeo84, | |||
const std::string | sparql, | |||
PD_RDFModelHandle | alternateModel | |||
) | [private] |
References PD_SemanticItemFactory::createLocation(), PD_RDFQuery::executeQuery(), getDocument(), PD_Document::getDocumentRDF(), getSemanticItemFactory(), UT_DEBUGMSG, and UT_UNUSED.
Referenced by getLocations().
void PD_DocumentRDF::addRDFForID | ( | const std::string & | xmlid, | |
PD_DocumentRDFMutationHandle & | m | |||
) |
References getAllSubjects(), getArcsOut(), PD_URI::toString(), and UT_DEBUGMSG.
Referenced by getRDFAtPosition(), and getRDFForID().
std::set< std::string > & PD_DocumentRDF::addRelevantIDsForPosition | ( | std::set< std::string > & | ret, | |
PT_DocPosition | pos | |||
) |
References addRelevantIDsForRange().
Referenced by getRDFAtPosition().
std::set< std::string > & PD_DocumentRDF::addRelevantIDsForRange | ( | std::set< std::string > & | ret, | |
PD_DocumentRange * | range | |||
) |
References PD_DocumentRange::m_pos1, and PD_DocumentRange::m_pos2.
Referenced by addRelevantIDsForPosition().
std::set< std::string > & PD_DocumentRDF::addRelevantIDsForRange | ( | std::set< std::string > & | ret, | |
std::pair< PT_DocPosition, PT_DocPosition > | range | |||
) |
PT_DocPosition PD_DocumentRDF::addXMLIDsForBlockAndTableCellForPosition | ( | std::set< std::string > & | col, | |
PT_DocPosition | pos | |||
) |
References PD_Document::getAPIFromSDH(), PP_AttrProp::getAttribute(), PD_Document::getAttrProp(), getDocument(), PD_Document::getFragFromPosition(), getPieceTable(), pf_Frag::getPos(), pt_PieceTable::getStruxOfTypeFromPosition(), PTX_Block, PTX_SectionCell, v, and xxx_UT_DEBUGMSG.
Referenced by addRelevantIDsForRange().
std::set< std::string > & PD_DocumentRDF::addXMLIDsForObjects | ( | std::set< std::string > & | ret, | |
std::list< pf_Frag_Object * > | objectList | |||
) |
bool PD_DocumentRDF::apContains | ( | const PP_AttrProp * | AP, | |
const PD_URI & | s, | |||
const PD_URI & | p, | |||
const PD_Object & | o | |||
) | [protected] |
Internal method: tests if the AP has the triple or not.
References decodePOCol(), gchar, PP_AttrProp::getProperty(), and PD_URI::toString().
Referenced by PD_DocumentRDFMutation::add(), contains(), and PD_RDFModelFromStartEndPos::contains().
void PD_DocumentRDF::apDumpModel | ( | const PP_AttrProp * | AP, | |
const std::string & | headerMsg | |||
) | [protected] |
Dump the model contained in the given AP as debug messages.
References decodePOCol(), gchar, PP_AttrProp::getNthProperty(), PP_AttrProp::getPropertyCount(), getTripleCount(), m_indexAP, szName, UT_DEBUG_ONLY_ARG, and UT_DEBUGMSG.
Referenced by dumpModel(), and PD_RDFModelFromStartEndPos::dumpModel().
PD_URIList & PD_DocumentRDF::apGetAllSubjects | ( | const PP_AttrProp * | AP, | |
PD_URIList & | ret | |||
) | [protected] |
Internal method: Using the supplied AP, insert into ret a list of every subject in the model.
If you want to get all triples, then first get all subjects and then use getArcsOut() to get the predicate-object combinations for each of the subjects.
References gchar, PP_AttrProp::getNthProperty(), PP_AttrProp::getPropertyCount(), and szName.
Referenced by getAllSubjects(), and PD_RDFModelFromStartEndPos::getAllSubjects().
POCol & PD_DocumentRDF::apGetArcsOut | ( | const PP_AttrProp * | AP, | |
POCol & | ret, | |||
const PD_URI & | s | |||
) | [protected] |
Get the predicate and objects which have the given subject.
This can be thought of as all the arcs from the node at 's' in the RDF graph.
References decodePOCol(), gchar, PP_AttrProp::getProperty(), and PD_URI::toString().
Referenced by getArcsOut(), and PD_RDFModelFromStartEndPos::getArcsOut().
PD_ObjectList & PD_DocumentRDF::apGetObjects | ( | const PP_AttrProp * | AP, | |
PD_ObjectList & | ret, | |||
const PD_URI & | s, | |||
const PD_URI & | p | |||
) | [protected] |
Internal method: Using the supplied AP, insert into ret a list of all the objects which have the given subject and predicate.
For example: emu has legs emu has eyes would give { legs, eyes }
References decodePOCol(), gchar, PP_AttrProp::getProperty(), and PD_URI::toString().
Referenced by getObjects(), and PD_RDFModelFromStartEndPos::getObjects().
PD_URIList & PD_DocumentRDF::apGetSubjects | ( | const PP_AttrProp * | AP, | |
PD_URIList & | ret, | |||
const PD_URI & | p, | |||
const PD_Object & | o | |||
) | [protected] |
Internal method: Using the supplied AP, insert into ret a list of all the subjects which have the given predicate and object.
For example: emu has legs emu has eyes human has legs when called with ( has, legs ) would give { emu, human }
References decodePOCol(), gchar, PP_AttrProp::getNthProperty(), PP_AttrProp::getPropertyCount(), and szName.
Referenced by getSubjects(), and PD_RDFModelFromStartEndPos::getSubjects().
PD_RDFModelIterator PD_DocumentRDF::begin | ( | ) | [virtual] |
Implements PD_RDFModel.
References getAP(), getDocument(), and PD_Document::getDocumentRDF().
Referenced by runMilestone2Test2().
Test if the given triple is in the RDF or not.
Reimplemented from PD_RDFModel.
Reimplemented in PD_RDFModelFromStartEndPos.
References apContains(), and getAP().
Referenced by PD_DocumentRDFMutation::add(), and contains().
bool PD_DocumentRDF::contains | ( | const PD_RDFStatement & | st | ) | [virtual] |
Reimplemented from PD_RDFModel.
References contains(), PD_RDFStatement::getObject(), PD_RDFStatement::getPredicate(), and PD_RDFStatement::getSubject().
PD_DocumentRDFMutationHandle PD_DocumentRDF::createMutation | ( | ) | [virtual] |
The single way that you can update the document RDF is through an PD_DocumentRDFMutation.
This is where you get one of those.
Implements PD_RDFModel.
Reimplemented in RDFModel_SPARQLLimited, and RDFModel_XMLIDLimited.
References PD_DocumentRDFMutation.
Referenced by getRDFAtPosition(), getRDFForID(), handleCollabEvent(), relinkRDFToNewXMLID(), and runMilestone2Test().
PD_RDFModelHandle PD_DocumentRDF::createRestrictedModelForXMLIDs | ( | const std::string & | writeID, | |
const std::set< std::string > & | xmlids | |||
) |
References getDocument(), PD_Document::getDocumentRDF(), and UT_DEBUGMSG.
Referenced by createRestrictedModelForXMLIDs().
PD_RDFModelHandle PD_DocumentRDF::createRestrictedModelForXMLIDs | ( | const std::set< std::string > & | xmlids | ) |
References createRestrictedModelForXMLIDs().
PD_RDFModelHandle PD_DocumentRDF::createScratchModel | ( | ) |
References getDocument().
void PD_DocumentRDF::dumpModel | ( | const std::string & | headerMsg = "dumpModel()" |
) | [virtual] |
Dump the model as debug messages.
Reimplemented from PD_RDFModel.
Reimplemented in PD_RDFModelFromStartEndPos.
References apDumpModel(), getAP(), m_doc, UT_DEBUG_ONLY_ARG, and UT_DEBUGMSG.
Referenced by runMilestone2Test().
void PD_DocumentRDF::dumpObjectMarkersFromDocument | ( | ) |
References PD_Document::dumpDoc(), gchar, PD_Document::getAPIFromSDH(), PP_AttrProp::getAttribute(), pt_PieceTable::getAttrProp(), PD_Document::getAttrProp(), pt_PieceTable::getBounds(), getDocument(), pt_PieceTable::getFragFromPosition(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag_Object::getObjectType(), pf_Frag::getPieceTable(), getPieceTable(), pt_PieceTable::getStruxOfTypeFromPosition(), pf_Frag::getType(), m_doc, PT_XMLID, PTX_Block, UT_DEBUGMSG, and v.
PD_RDFModelIterator PD_DocumentRDF::end | ( | void | ) | [virtual] |
Implements PD_RDFModel.
std::set< std::string > & PD_DocumentRDF::getAllIDs | ( | std::set< std::string > & | ret | ) |
References getDocument(), PD_Document::getFragFromPosition(), pf_Frag::getNext(), pf_Frag::getXMLID(), and UT_DEBUGMSG.
PD_RDFSemanticItems PD_DocumentRDF::getAllSemanticObjects | ( | const std::string & | classRestriction = "" |
) |
References getContacts(), getEvents(), and getLocations().
Referenced by updateHaveSemItemsCache().
PD_URIList PD_DocumentRDF::getAllSubjects | ( | ) | [virtual] |
Reimplemented from PD_RDFModel.
Reimplemented in PD_RDFModelFromStartEndPos.
References apGetAllSubjects(), and getAP().
Referenced by addRDFForID(), and getTripleCount().
const PP_AttrProp * PD_DocumentRDF::getAP | ( | void | ) | [private, virtual] |
Get the AttrProp with all the RDF in it.
Reimplemented in PD_RDFModelFromAP, PD_RDFModelFromStartEndPos, and RDFModel_SPARQLLimited.
References pt_VarSet::getAP(), getIndexAP(), getPieceTable(), and pt_PieceTable::getVarSet().
Referenced by begin(), contains(), dumpModel(), getAllSubjects(), getArcsOut(), getObjects(), getSubjects(), PD_DocumentRDFMutation::handleAddAndRemove(), and PD_DocumentRDFMutation::PD_DocumentRDFMutation().
Get the predicate and objects which have the given subject.
This can be thought of as all the arcs from the node at 's' in the RDF graph.
Reimplemented from PD_RDFModel.
Reimplemented in PD_RDFModelFromStartEndPos.
References apGetArcsOut(), and getAP().
Referenced by addRDFForID(), getTripleCount(), and runMilestone2Test2().
PD_RDFContacts PD_DocumentRDF::getContacts | ( | PD_RDFModelHandle | alternateModel = PD_RDFModelHandle((PD_RDFModel*)0) |
) |
References PD_SemanticItemFactory::createContact(), PD_RDFQuery::executeQuery(), getDocument(), PD_Document::getDocumentRDF(), getSemanticItemFactory(), and UT_DEBUGMSG.
Referenced by getAllSemanticObjects(), getSemanticObjects(), and runPlay().
PD_Document * PD_DocumentRDF::getDocument | ( | void | ) | const [private] |
References m_doc.
Referenced by addLocations(), addXMLIDsForBlockAndTableCellForPosition(), begin(), PD_DocumentRDFMutation::commit(), PD_DocumentRDFMutation::createBNode(), createRestrictedModelForXMLIDs(), createScratchModel(), dumpObjectMarkersFromDocument(), getAllIDs(), getContacts(), getEvents(), getIDRange(), getRDFAtPosition(), priv_addRelevantIDsForPosition(), and relinkRDFToNewXMLID().
PD_RDFEvents PD_DocumentRDF::getEvents | ( | PD_RDFModelHandle | alternateModel = PD_RDFModelHandle((PD_RDFModel*)0) |
) |
References PD_SemanticItemFactory::createEvent(), PD_RDFQuery::executeQuery(), getDocument(), PD_Document::getDocumentRDF(), getSemanticItemFactory(), and UT_DEBUGMSG.
Referenced by getAllSemanticObjects(), getSemanticObjects(), and runPlay().
std::pair< PT_DocPosition, PT_DocPosition > PD_DocumentRDF::getIDRange | ( | const std::string & | xmlid | ) | const |
References getDocument(), PD_Document::getFragFromPosition(), RDFAnchor::getID(), pf_Frag::getLength(), pf_Frag::getNext(), pf_Frag_Object::getObjectType(), pf_Frag::getPos(), pf_Frag_Strux::getStruxType(), pf_Frag::getType(), pf_Frag::getXMLID(), PTX_Block, and PTX_SectionCell.
Referenced by runPlay(), and selectXMLIDs().
PT_AttrPropIndex PD_DocumentRDF::getIndexAP | ( | void | ) | const [private] |
PD_RDFLocations PD_DocumentRDF::getLocations | ( | PD_RDFModelHandle | alternateModel = PD_RDFModelHandle((PD_RDFModel*)0) |
) |
References addLocations(), and UT_DEBUGMSG.
Referenced by getAllSemanticObjects(), and getSemanticObjects().
PD_URI PD_DocumentRDF::getManifestURI | ( | ) | [static] |
PD_ObjectList PD_DocumentRDF::getObjects | ( | const PD_URI & | s, | |
const PD_URI & | p | |||
) | [virtual] |
Get a list of all the objects which have the given subject and predicate.
For example: emu has legs emu has eyes would give { legs, eyes }
Reimplemented from PD_RDFModel.
Reimplemented in PD_RDFModelFromStartEndPos.
References apGetObjects(), and getAP().
Referenced by PD_DocumentRDFMutation::remove().
std::list< pf_Frag_Object * > PD_DocumentRDF::getObjectsInScopeOfTypesForRange | ( | std::set< PTObjectType > | objectTypes, | |
std::pair< PT_DocPosition, PT_DocPosition > | range | |||
) |
References PP_AttrProp::getAttribute(), pt_PieceTable::getAttrProp(), pt_PieceTable::getFragFromPosition(), RDFAnchor::getID(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag_Object::getObjectType(), pf_Frag::getPieceTable(), getPieceTable(), pf_Frag::getPos(), pf_Frag::getType(), RDFAnchor::isEnd(), PT_XMLID, PTO_Bookmark, PTO_RDFAnchor, v, and xxx_UT_DEBUGMSG.
Referenced by addRelevantIDsForRange().
pt_PieceTable * PD_DocumentRDF::getPieceTable | ( | void | ) | const [private] |
PD_RDFModelHandle PD_DocumentRDF::getRDFAtPosition | ( | PT_DocPosition | pos | ) |
References addRDFForID(), addRelevantIDsForPosition(), createMutation(), getDocument(), and UT_DEBUG_ONLY_ARG.
PD_RDFDialogs * PD_DocumentRDF::getRDFDialogs | ( | ) | [static] |
References s_RDFDialogs.
Referenced by runInsertReferenceDialog(), and runSemanticStylesheetsDialog().
PD_RDFModelHandle PD_DocumentRDF::getRDFForID | ( | const std::string & | xmlid | ) |
References addRDFForID(), createMutation(), and m_doc.
PD_SemanticItemFactory * PD_DocumentRDF::getSemanticItemFactory | ( | ) | [static] |
References s_SemanticItemFactory.
Referenced by addLocations(), PD_RDFSemanticItem::createSemanticItem(), getContacts(), and getEvents().
PD_RDFSemanticItems PD_DocumentRDF::getSemanticObjects | ( | const std::set< std::string > & | xmlids | ) |
References getContacts(), getEvents(), and getLocations().
std::string PD_DocumentRDF::getSPARQL_LimitedToXMLIDList | ( | const std::set< std::string > & | xmlids, | |
const std::string & | extraPreds = "" | |||
) | [static] |
Referenced by Defun1(), RDFModel_XMLIDLimited::getSparql(), and relinkRDFToNewXMLID().
PD_URIList PD_DocumentRDF::getSubjects | ( | const PD_URI & | p, | |
const PD_Object & | o | |||
) | [virtual] |
Get a list of all the subjects which have the given predicate and object.
For example: emu has legs emu has eyes human has legs when called with ( has, legs ) would give { emu, human }
Reimplemented from PD_RDFModel.
Reimplemented in PD_RDFModelFromStartEndPos.
References apGetSubjects(), and getAP().
Referenced by runMilestone2Test2().
long PD_DocumentRDF::getTripleCount | ( | ) | [virtual] |
Get the total number of triples in the model.
This can be relatively expensive to calculate. So definately don't keep on doing it in a loop.
Reimplemented from PD_RDFModel.
References getAllSubjects(), and getArcsOut().
Referenced by apDumpModel().
void PD_DocumentRDF::handleCollabEvent | ( | const gchar ** | szAtts, | |
const gchar ** | szProps | |||
) |
Internal method: used by AbiCollab to update the RDF.
References createMutation().
bool PD_DocumentRDF::haveSemItems | ( | ) | const |
Does this document have any semantic items like contacts, events etc.
References m_haveSemItems.
bool PD_DocumentRDF::isStandAlone | ( | ) | const [private, virtual] |
Reimplemented in PD_RDFModelFromAP, and PD_RDFModelFromStartEndPos.
Referenced by PD_DocumentRDFMutation::commit().
std::string PD_DocumentRDF::makeLegalXMLID | ( | const std::string & | s | ) |
void PD_DocumentRDF::maybeSetDocumentDirty | ( | ) | [virtual] |
Reimplemented in PD_RDFModelFromAP.
References PD_Document::forceDirty(), PD_RDFModel::incremenetVersion(), and m_doc.
Referenced by PD_DocumentRDFMutation::commit().
std::set< std::string > & PD_DocumentRDF::priv_addRelevantIDsForPosition | ( | std::set< std::string > & | ret, | |
PT_DocPosition | pos, | |||
PT_DocPosition | searchBackThisFar = 0 | |||
) | [private] |
References PD_Document::getAPIFromSDH(), PP_AttrProp::getAttribute(), PD_Document::getAttrProp(), pt_PieceTable::getAttrProp(), getDocument(), pt_PieceTable::getFragFromPosition(), RDFAnchor::getID(), pf_Frag::getIndexAP(), pf_Frag::getLength(), pf_Frag_Object::getObjectType(), pf_Frag::getPieceTable(), getPieceTable(), pf_Frag::getPos(), pt_PieceTable::getStruxOfTypeFromPosition(), pf_Frag::getType(), RDFAnchor::isEnd(), PT_XMLID, PTX_Block, PTX_SectionCell, UT_DEBUGMSG, and v.
void PD_DocumentRDF::relinkRDFToNewXMLID | ( | const std::string & | oldxmlid, | |
const std::string & | newxmlid, | |||
bool | deepCopyRDF = false | |||
) |
void PD_DocumentRDF::runMilestone2Test | ( | ) |
References createMutation(), dumpModel(), m_doc, runMilestone2Test2(), and UT_DEBUGMSG.
void PD_DocumentRDF::runMilestone2Test2 | ( | ) |
References begin(), getArcsOut(), PD_RDFModel::getObject(), PD_RDFModel::getSubject(), getSubjects(), PD_URI::toString(), and UT_DEBUGMSG.
Referenced by runMilestone2Test().
void PD_DocumentRDF::runPlay | ( | ) |
References getContacts(), getEvents(), getIDRange(), and UT_DEBUGMSG.
void PD_DocumentRDF::selectXMLIDs | ( | const std::set< std::string > & | xmlids, | |
FV_View * | pView = 0 | |||
) | const |
UT_Error PD_DocumentRDF::setAP | ( | PP_AttrProp * | newAP | ) | [private, virtual] |
Reimplemented in PD_RDFModelFromAP, and PD_RDFModelFromStartEndPos.
References pt_VarSet::addIfUniqueAP(), getPieceTable(), pt_PieceTable::getVarSet(), PP_AttrProp::markReadOnly(), PP_AttrProp::prune(), and setIndexAP().
Referenced by PD_DocumentRDFMutation::handleAddAndRemove().
void PD_DocumentRDF::setIndexAP | ( | PT_AttrPropIndex | idx | ) | [private] |
Change the AttrProp Index that we are using to store all the RDF.
This is used by PD_DocumentRDFMutation to commit it's changes.
References m_indexAP.
Referenced by setAP().
void PD_DocumentRDF::setRDFDialogs | ( | PD_RDFDialogs * | d | ) | [static] |
References s_RDFDialogs.
Referenced by PD_RDFDialogsGTK::PD_RDFDialogsGTK().
void PD_DocumentRDF::setSemanticItemFactory | ( | PD_SemanticItemFactory * | f | ) | [static] |
References s_SemanticItemFactory.
Referenced by AP_SemanticItemFactoryGTK::AP_SemanticItemFactoryGTK().
UT_Error PD_DocumentRDF::setupWithPieceTable | ( | ) |
If the document changes its m_pPieceTable it needs to call here too.
In various places like PD_Document::_importFile the document creates a new piecetable and thus must notify the DocumentRDF of this change so we can update our AttrProp indexes and the like.
References pt_VarSet::addIfUniqueAP(), getPieceTable(), pt_PieceTable::getVarSet(), m_indexAP, and UT_DEBUGMSG.
void PD_DocumentRDF::showEditorWindow | ( | const PD_RDFSemanticItems & | cl | ) |
void PD_DocumentRDF::updateHaveSemItemsCache | ( | ) | [protected] |
References getAllSemanticObjects(), and m_haveSemItems.
Referenced by PD_DocumentRDFMutation::commit().
friend class PD_DocumentRDFMutation [friend] |
Referenced by createMutation().
friend class PD_RDFMutation_XMLIDLimited [friend] |
Referenced by RDFModel_XMLIDLimited::createMutation().
friend class PD_RDFSemanticItem [friend] |
friend class RDFModel_SPARQLLimited [friend] |
PD_Document* PD_DocumentRDF::m_doc [protected] |
bool PD_DocumentRDF::m_haveSemItems [private] |
Referenced by haveSemItems(), and updateHaveSemItemsCache().
PT_AttrPropIndex PD_DocumentRDF::m_indexAP [private] |
Referenced by apDumpModel(), getIndexAP(), setIndexAP(), and setupWithPieceTable().
PD_RDFDialogs * PD_DocumentRDF::s_RDFDialogs [static, private] |
Referenced by getRDFDialogs(), and setRDFDialogs().
PD_SemanticItemFactory * PD_DocumentRDF::s_SemanticItemFactory [static, private] |
Referenced by getSemanticItemFactory(), and setSemanticItemFactory().