class CamTool::EdgeValidator

Public Class Methods

new() click to toggle source
# File lib/camtool/edge_validator.rb, line 3
def initialize
end

Public Instance Methods

relation(k, v) click to toggle source
# File lib/camtool/edge_validator.rb, line 31
def relation k, v
  puts v
  abort "relation should not be used"
end
used(k, v) click to toggle source
# File lib/camtool/edge_validator.rb, line 6
def used k, v
  abort "used prov:entity is of wrong type:  #{v}." unless is_entity? v['prov:entity']
  abort "used prov:activity is of wrong type: #{v}." unless is_activity? v['prov:activity']
end
wasAssociatedWith(k, v) click to toggle source
# File lib/camtool/edge_validator.rb, line 26
def wasAssociatedWith k, v
  abort "wasAssociatedWith prov:activity is of wrong type:  #{v}." unless is_activity? v['prov:activity']
  abort "wasAssociatedWith prov:agent is of wrong type: #{v}." unless is_agent? v['prov:agent']
end
wasDerivedFrom(k, v) click to toggle source
# File lib/camtool/edge_validator.rb, line 16
def wasDerivedFrom k, v
  abort "wasDerivedFrom prov:usedEntity is of wrong type:  #{v}." unless is_entity? v['prov:usedEntity']
  abort "wasDerivedFrom prov:generatedEntity is of wrong type: #{v}." unless is_entity? v['prov:generatedEntity']
end
wasGeneratedBy(k, v) click to toggle source
# File lib/camtool/edge_validator.rb, line 11
def wasGeneratedBy k, v
  abort "wasGeneratedBy prov:entity is of wrong type:  #{v}." unless is_entity? v['prov:entity']
  abort "wasGeneratedBy prov:activity is of wrong type: #{v}." unless is_activity? v['prov:activity']
end
wasInformedBy(k, v) click to toggle source
# File lib/camtool/edge_validator.rb, line 21
def wasInformedBy k, v
  abort "wasInformedBy prov:informant is of wrong type:  #{v}." unless is_activity? v['prov:informant']
  abort "wasInformedBy prov:informed is of wrong type: #{v}." unless is_activity? v['prov:informed']
end