An RDF URI. More...
#include <pd_DocumentRDF.h>
Public Member Functions | |
PD_URI (const std::string &v="") | |
virtual | ~PD_URI () |
virtual std::string | toString () const |
get a std::string representation | |
int | length () const |
bool | isValid () const |
Only very basic tests for validity are performed. | |
bool | operator== (const PD_URI &b) const |
bool | operator== (const std::string &b) const |
bool | operator< (const PD_URI &b) const |
virtual bool | read (std::istream &ss) |
Deserialize the PD_URI from the given stream. | |
virtual bool | write (std::ostream &ss) const |
Write the URI to the given stream. | |
PD_URI | prefixedToURI (const PD_RDFModelHandle &model) const |
bool | empty () const |
const char * | c_str () const |
Protected Attributes | |
std::string | m_value |
An RDF URI.
This can be thought of as a std::string like object, but explicit support for namespaces and other RDF functionality might be added over time. For example, foaf:name mapping to the foaf URI vocab.
PD_URI::PD_URI | ( | const std::string & | v = "" |
) |
virtual PD_URI::~PD_URI | ( | ) | [inline, virtual] |
const char* PD_URI::c_str | ( | ) | const [inline] |
Referenced by PD_RDFSemanticItem::relationFind(), and AP_RDFContactGTK::updateFromEditorData().
bool PD_URI::empty | ( | ) | const [inline] |
bool PD_URI::isValid | ( | void | ) | const |
Only very basic tests for validity are performed.
The main use of this method is to detect default constructed PD_URI values
References m_value.
Referenced by PD_RDFModel::contains(), and RDFModel_SPARQLLimited::update().
int PD_URI::length | ( | ) | const [inline] |
bool PD_URI::operator== | ( | const std::string & | b | ) | const |
References m_value.
PD_URI PD_URI::prefixedToURI | ( | const PD_RDFModelHandle & | model | ) | const |
References toString().
Referenced by AP_UnixDialog_RDFEditor::onCellEdited().
bool PD_URI::read | ( | std::istream & | ss | ) | [virtual] |
Deserialize the PD_URI from the given stream.
I thought about using boost::serialization for this, as it is doing a similar thing. Using b::s though would have required a link dependancy.
Reimplemented in PD_Object.
References m_value, and readLengthPrefixedString().
Referenced by splitPO().
std::string PD_URI::toString | ( | ) | const [virtual] |
get a std::string representation
References m_value.
Referenced by s_AbiWord_1_Listener::_handleRDF(), PD_RDFMutation_XMLIDLimited::add(), PD_DocumentRDF::addRDFForID(), AP_UnixDialog_RDFEditor::addStatement(), PD_DocumentRDFMutation::apAdd(), PD_DocumentRDF::apContains(), PD_DocumentRDF::apGetArcsOut(), PD_DocumentRDF::apGetObjects(), PD_DocumentRDFMutation::apRemove(), AP_Dialog_RDFEditor::copyStatement(), PD_RDFContact::exportToFile(), PD_RDFSemanticItem::getProperty(), PD_RDFLocation::getXMLIDs(), PD_RDFSemanticItem::handleSubjectDefaultArgument(), PD_RDFSemanticItem::insert(), AP_UnixDialog_RDFEditor::onCellEdited(), PD_URIListCompare::operator()(), operator<<(), prefixedToURI(), PD_RDFSemanticItem::relationFind(), PD_DocumentRDF::relinkRDFToNewXMLID(), PD_DocumentRDFMutation::remove(), PD_DocumentRDF::runMilestone2Test2(), PD_RDFStatement::toString(), RDFModel_XMLIDLimited::update(), RDFModel_SPARQLLimited::update(), AP_RDFLocationGTK::updateFromEditorData(), AP_RDFEventGTK::updateFromEditorData(), AP_RDFContactGTK::updateFromEditorData(), PD_RDFSemanticItem::updateTriple_add(), and PD_RDFSemanticItem::updateTriple_remove().
bool PD_URI::write | ( | std::ostream & | ss | ) | const [virtual] |
Write the URI to the given stream.
Reimplemented in PD_Object.
References createLengthPrefixedString(), and m_value.
Referenced by combinePO().
std::string PD_URI::m_value [protected] |
Referenced by isValid(), operator<(), operator==(), PD_Object::read(), read(), toString(), PD_Object::write(), and write().