class ROF::Translators::JsonldToRof::StatementHandler::UriSubjectHandler
Responsible for accumulating the ROF
data for a URI based resource
Public Class Methods
new(statement, accumulator)
click to toggle source
# File lib/rof/translators/jsonld_to_rof/statement_handler.rb, line 51 def initialize(statement, accumulator) @accumulator = accumulator @statement = statement end
Public Instance Methods
call()
click to toggle source
# File lib/rof/translators/jsonld_to_rof/statement_handler.rb, line 56 def call handle_subject handle_predicate_and_object @accumulator end
Private Instance Methods
handle_predicate_and_object()
click to toggle source
# File lib/rof/translators/jsonld_to_rof/statement_handler.rb, line 64 def handle_predicate_and_object PredicateObjectHandler.call(@statement.predicate, @statement.object, @accumulator) end
handle_subject()
click to toggle source
Handle the various CurateND environments instead of just curate.nd.edu
# File lib/rof/translators/jsonld_to_rof/statement_handler.rb, line 70 def handle_subject return nil unless @statement.subject.to_s =~ ROF::Translators::JsonldToRof::REGEXP_FOR_A_CURATE_RDF_SUBJECT pid = "und:#{$1}" @accumulator.add_pid(pid) end