Public Types | Public Member Functions

ResourceValue Class Reference

Models a Sparql IRI reference. More...

Inheritance diagram for ResourceValue:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Type { Invalid, Iri, PrefixedName }

Public Member Functions

 ResourceValue ()
 Constructs an empty, invalid ResourceValue.
CUBI_EXPLICIT ResourceValue (const QUrl &iri)
 Constructs a ResourceValue from its IRI.
CUBI_EXPLICIT ResourceValue (const QString &name, ResourceValue::Type type=Iri)
 Constructs a ResourceValue from its prefixed name.
bool operator== (const ResourceValue &other) const
bool operator!= (const ResourceValue &other) const
Type resourceType () const
 Returns the type of the value.
void setIri (const QUrl &iri)
 Sets the IRI of the ResourceValue from a QUrl.
void setIri (const QString &iri)
 Sets the IRI of the ResourceValue from a QString.
QString iri () const
 Returns the IRI of the ResourceValue.
void setName (const QString &name)
 Sets the name of the ResourceValueData.
QString name () const
 Returns the name of the ResourceValue.

Detailed Description

Models a Sparql IRI reference.


Member Function Documentation

QString ResourceValue::iri (  )  const

Returns the IRI of the ResourceValue.

If called on a value of type ResourceValue::PrefixedName, returns a converted value.

QString ResourceValue::name (  )  const

Returns the name of the ResourceValue.

If called on a value of type ResourceValue::Iri, returns a converted value.

ResourceValue::Type ResourceValue::resourceType (  )  const

Returns the type of the value.

The type can be one of

  • ResourceValue::Invalid an invalid (unset) value
  • ResourceValue::Iri a complete IRI reference (like <iriref>)
  • ResourceValue::PrefixedName a prefixed name (like ns:Name)
void ResourceValue::setIri ( const QUrl &  iri  ) 

Sets the IRI of the ResourceValue from a QUrl.

This function also sets the type of the value to ResourceValue::Iri.

void ResourceValue::setIri ( const QString &  iri  ) 

Sets the IRI of the ResourceValue from a QString.

This function also sets the type of the value to ResourceValue::Iri.

void ResourceValue::setName ( const QString &  name  ) 

Sets the name of the ResourceValueData.

This function also sets the type of the value to ResourceValue::PrefixedName.


The documentation for this class was generated from the following files:
 All Classes Functions Enumerations