Class: RDFObject::Resource
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- RDFObject::Resource
- Includes:
- Node
- Defined in:
- lib/rdf_objects/rdf_resource.rb
Instance Attribute Summary collapse
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(uri) ⇒ Resource
constructor
A new instance of Resource.
- #ntriples_format ⇒ Object
- #xml_object_attribute ⇒ Object
- #xml_subject_attribute ⇒ Object
Methods included from Node
#==, #[], #assert, #assertion_exists?, #assertions, #describe, #empty_graph?, #object_to_json_hash, #prefix_for, #rdf_description_block, #register_vocabulary, #relate, #to_json, #to_json_hash, #to_ntriples, #to_xml
Constructor Details
Instance Attribute Details
#table ⇒ Object (readonly)
Returns the value of attribute table.
253 254 255 |
# File 'lib/rdf_objects/rdf_resource.rb', line 253 def table @table end |
Instance Method Details
#ntriples_format ⇒ Object
269 270 271 |
# File 'lib/rdf_objects/rdf_resource.rb', line 269 def ntriples_format "<#{uri}>" end |
#xml_object_attribute ⇒ Object
265 266 267 |
# File 'lib/rdf_objects/rdf_resource.rb', line 265 def xml_object_attribute "rdf:resource=\"#{CGI.escapeHTML(self.uri)}\"" end |
#xml_subject_attribute ⇒ Object
261 262 263 |
# File 'lib/rdf_objects/rdf_resource.rb', line 261 def xml_subject_attribute "rdf:about=\"#{CGI.escapeHTML(self.uri)}\"" end |