Public Member Functions | Protected Attributes

PD_URI Class Reference

An RDF URI. More...

#include <pd_DocumentRDF.h>

Inheritance diagram for PD_URI:
PD_Object PD_Literal

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

PD_URI::PD_URI ( const std::string &  v = ""  ) 
virtual PD_URI::~PD_URI (  )  [inline, virtual]

Member Function Documentation

const char* PD_URI::c_str (  )  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 PD_URI b  )  const

References m_value.

bool PD_URI::operator== ( const std::string &  b  )  const

References m_value.

bool PD_URI::operator== ( const PD_URI b  )  const

References m_value.

PD_URI PD_URI::prefixedToURI ( const PD_RDFModelHandle model  )  const
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.

See also:
write()

Reimplemented in PD_Object.

References m_value, and readLengthPrefixedString().

Referenced by splitPO().

bool PD_URI::write ( std::ostream &  ss  )  const [virtual]

Write the URI to the given stream.

See also:
read()

Reimplemented in PD_Object.

References createLengthPrefixedString(), and m_value.

Referenced by combinePO().


Member Data Documentation


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