-
Notifications
You must be signed in to change notification settings - Fork 12
.value
This wiki serves as structure documentation for .value design choice with voices pro and against.
excerpts from original chat:
timbl Like you can say in turtle
<#pi> = math:Pi, 3.14159 .
That will smush to a node which has two URIs, and the value a decimal number.
— https://gitter.im/rdfjs/public?at=56d61e05b01413547d894cff
timbl
In pi = 3.141
x = pi + 1
what is the name of x? what is the value of x?
x ’s name is ‘x’
x’s value is 4.141
that’s how i think of these things
— https://gitter.im/rdfjs/public?at=56d6264806ba9a282a285667
http://www.rubydoc.info/github/ruby-rdf/rdf/master/frames#RDF_Object_Model
RDF:URI & RDF:IRI as alias (.value) https://github.com/ruby-rdf/rdf/blob/develop/lib/rdf/model/uri.rb#L808-L819
##
# lexical representation of URI, either absolute or relative
# @return [String]
def value
@value ||= [
("#{scheme}:" if absolute?),
("//#{authority}" if authority),
path,
("?#{query}" if query),
("##{fragment}" if fragment)
].compact.join("")
end
RDF:Node for blank node (.id and no .value) https://github.com/ruby-rdf/rdf/blob/develop/lib/rdf/model/node.rb#L78-L86
# @return [String]
attr_accessor :id
##
# @param [#to_s] id
def initialize(id = nil)
id = nil if id.to_s.empty?
@id = (id || "g#{__id__.to_i.abs}").to_s
end
RDF:Literal (.value) https://github.com/ruby-rdf/rdf/blob/develop/lib/rdf/model/literal.rb#L177-L183
##
# Returns the value as a string.
#
# @return [String]
def value
@string || to_s
end
at the same time @gkellogg +1 using NamedNode https://gitter.im/rdfjs/Representation-Task-Force?at=56e5ecd06fde057c26866591
https://rdflib.readthedocs.org/en/stable/apidocs/rdflib.html#module-rdflib.term
- rdflib.term.URIRef
- rdflib.term.BNode
- rdflib.term.Literal ( .value )
uses value as parameter name for parent clas rdflib.term.Identifier
hash
str
- https://rdflib.readthedocs.org/en/stable/apidocs/rdflib.html#rdflib.term.URIRef.__str__
- https://rdflib.readthedocs.org/en/stable/apidocs/rdflib.html#rdflib.term.BNode.__str__
- https://rdflib.readthedocs.org/en/stable/apidocs/rdflib.html#rdflib.term.Literal.__str__
https://www.w3.org/TR/2012/REC-owl2-primer-20121211/#Entity_Declarations
:John rdf:type owl:NamedIndividual .
:Person rdf:type owl:Class .
:hasWife rdf:type owl:ObjectProperty .
:hasAge rdf:type owl:DatatypeProperty .
https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Named_Individuals
https://lists.w3.org/Archives/Public/public-data-shapes-wg/2014Dec/0274.html
ex:two rdf:type xsd:Integer .
ex:two ex:prime xsd:true .
https://www.w3.org/TR/rdf-schema/#ch_value
<http://www.example.com/2002/04/products#item10245>
<http://www.example.org/terms/weight> [
rdf:value 2.4 ;
<http://www.example.org/terms/units> <http://www.example.org/units/kilograms>
] .