class Ldpath::Transform

Constants

Infinity

Attributes

prefixes[R]

Public Class Methods

default_prefixes() click to toggle source
# File lib/ldpath/transform.rb, line 6
def default_prefixes
  @default_prefixes ||= {
    "rdf"  => RDF::Vocabulary.new("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),
    "rdfs" => RDF::Vocabulary.new("http://www.w3.org/2000/01/rdf-schema#"),
    "owl"  => RDF::Vocabulary.new("http://www.w3.org/2002/07/owl#"),
    "skos" => RDF::Vocabulary.new("http://www.w3.org/2004/02/skos/core#"),
    "dc"   => RDF::Vocabulary.new("http://purl.org/dc/elements/1.1/"),
    "xsd"  => RDF::Vocabulary.new("http://www.w3.org/2001/XMLSchema#"), #          (LMF base index datatypes/XML Schema)
    "lmf"  => RDF::Vocabulary.new("http://www.newmedialab.at/lmf/types/1.0/"), #    (LMF extended index datatypes)
    "fn"   => RDF::Vocabulary.new("http://www.newmedialab.at/lmf/functions/1.0/"), # (LMF index functions)
    "foaf" => RDF::Vocabulary.new("http://xmlns.com/foaf/0.1/"),
    "info" => RDF::Vocabulary.new("info:"),
    "urn"  => RDF::Vocabulary.new("urn:")
  }
end

Public Instance Methods

apply(obj, context = nil) click to toggle source
Calls superclass method
# File lib/ldpath/transform.rb, line 23
def apply(obj, context = nil)
  context ||= {}
  context[:filters] ||= []
  context[:prefixes] ||= {}.merge(self.class.default_prefixes)
  @prefixes = context[:prefixes]
  super obj, context
end