class LiteralValue


Module soprano
Namespace Soprano
Class LiteralValue
Inherits
\class LiteralValue literalvalue.h Soprano/LiteralValue

Represents a literal value of an RDF Node.

LiteralValue is based on QVariant to support a subset of the XML Schema types that are compatible with QT types.

The following types are supported natively including automatic type conversion. Other types are represented as strings.

  • int (Vocabulary.XMLSchema.xsdInt)
  • qlonglong (Vocabulary.XMLSchema.xsdLong)
  • unsigned int (Vocabulary.XMLSchema.unsignedInt)
  • qulonglong (Vocabulary.XMLSchema.unsignedLong)
  • bool (Vocabulary.XMLSchema.boolean)
  • double and float (Vocabulary.XMLSchema.xsdDouble) (float values are always converted to double)
  • QString (Vocabulary.XMLSchema.string or Vocabulary.RDF.XMLLiteral)
  • QDate (Vocabulary.XMLSchema.date)
  • QTime (Vocabulary.XMLSchema.time)
  • QDateTime (Vocabulary.XMLSchema.dateTime)
  • QByteArray (Vocabulary.XMLSchema.base64Binary)
  • Literal values can be converted from strings via fromString().

    Be aware that string literals in %Soprano always have type xsd:string. There is no direct support for rdfs:Literal. Backend implementations should honour this restriction.

    See also Vocabulary.XMLSchema

    Author Sebastian Trueg



    methods