1RDF::Trine::Node::LiterUasle(r3)Contributed Perl DocumenRtDaFt:i:oTnrine::Node::Literal(3)
2
3
4
6 RDF::Trine::Node::Literal - RDF Node class for literals
7
9 This document describes RDF::Trine::Node::Literal version 1.019
10
12 Beyond the methods documented below, this class inherits methods from
13 the RDF::Trine::Node class.
14
15 "new ( $string, $lang, $datatype, $canonical_flag )"
16 Returns a new Literal structure.
17
18 "literal_value"
19 Returns the string value of the literal.
20
21 "literal_value_language"
22 Returns the language tag of the ltieral.
23
24 "literal_datatype"
25 Returns the datatype of the literal.
26
27 "value"
28 Returns the literal value.
29
30 "sse"
31 Returns the SSE string for this literal.
32
33 "as_string"
34 Returns a string representation of the node.
35
36 "as_ntriples"
37 Returns the node in a string form suitable for NTriples
38 serialization.
39
40 "type"
41 Returns the type string of this node.
42
43 "has_language"
44 Returns true if this literal is language-tagged, false otherwise.
45
46 "has_datatype"
47 Returns true if this literal is datatyped, false otherwise.
48
49 "equal ( $node )"
50 Returns true if the two nodes are equal, false otherwise.
51
52 "canonicalize"
53 Returns a new literal node object whose value is in canonical form
54 (where applicable).
55
56 "canonicalize_literal_value ( $string, $datatype, $warn )"
57 If $datatype is a recognized datatype, returns the canonical
58 lexical representation of the value $string. Otherwise returns
59 $string.
60
61 Currently, xsd:integer, xsd:decimal, and xsd:boolean are
62 canonicalized. Additionally, invalid lexical forms for xsd:float,
63 xsd:double, and xsd:dateTime will trigger a warning.
64
65 "is_canonical_lexical_form"
66 "is_valid_lexical_form"
67 Returns true if the node is of a recognized datatype and has a
68 valid lexical form for that datatype. If the lexical form is
69 invalid, returns false. If the datatype is unrecognized, returns
70 zero-but-true.
71
72 "is_numeric_type"
73 Returns true if the literal is a known (xsd) numeric type.
74
75 "numeric_value"
76 Returns the numeric value of the literal (even if the literal isn't
77 a known numeric type.
78
80 Please report any bugs or feature requests to through the GitHub web
81 interface at <https://github.com/kasei/perlrdf/issues>.
82
84 Gregory Todd Williams "<gwilliams@cpan.org>"
85
87 Copyright (c) 2006-2012 Gregory Todd Williams. This program is free
88 software; you can redistribute it and/or modify it under the same terms
89 as Perl itself.
90
91
92
93perl v5.32.1 2021-01-27 RDF::Trine::Node::Literal(3)