RDF::Lazy::Literal(3) Literal node in a RDF::Lazy graph

DESCRIPTION

You should not directly create instances of this class. See RDF::Lazy::Node for general node properties.

METHODS

str

Return the literal string value of this node.

esc

Return the HTML-encoded literal string value.

lang ( [ $pattern ] )

Return the language tag (a BCP 47 language tag locator), if this node has one, or test whether the language tag matches a pattern. For instance use 'de' for plain German (but not 'de-AT') or 'de-' for plain German or any German dialect.

is_...

Return whether this node matches a given language tag, for instance

    $node->is_en   # equivalent to $node->lang('en')
    $node->is_en_  # equivalent to $node->lang('en-')

datatype ( [ @types ] )

Return the datatype (as RDF::Lazy::Resource, if this node has one. Can also be used to checks whether the datatype matches, for instance:

    $node->datatype('xsd:integer','xsd:double');