class Graffiti::RdfPropertyMap
Map of an internal RDF property into relational storage
Attributes
name of the field into which the property is mapped
if property range is not a literal, the field is a reference to the resource table
expanded uriref of the mapped property
expanded uriref of the property which this property is a subproperty of
if set, this property maps into the same table and field as its superproperty, and is qualified by an additional field named <field>_subproperty which refers to a uriref resource holding uriref of this subproperty
name of the table into which the property is mapped (property domain is an internal resource class mapped into this table)
name of transitive closure table for a transitive property
the format of a transitive closure table is:
- 'resource' field refers to the subject resource id - '<field>' property field and '<field>_subproperty' qualifier field (in case of subproperty) have the same name as in the main table - 'distance' field holds the distance from subject to object in the RDF graph
the transitive closure table is automatically updated by a trigger on every update of the main table
Public Class Methods
# File lib/graffiti/rdf_property_map.rb, line 36 def initialize(property, table, field) # fixme: support ambiguous mappings @property = property @table = table @field = field end
special qualifier field
# File lib/graffiti/rdf_property_map.rb, line 32 def RdfPropertyMap.qualifier_field(field, type = 'subproperty') field + '_' + type end
special qualifier map
' ' is added to the property name to make sure it can't clash with any valid property uriref
# File lib/graffiti/rdf_property_map.rb, line 26 def RdfPropertyMap.qualifier_property(property, type = 'subproperty') property + ' ' + type end
Public Instance Methods
set to true
if this property has subproperties
# File lib/graffiti/rdf_property_map.rb, line 72 def superproperty? @superproperty or false end