Class: ActiveFedora::RDFXMLWriter
- Inherits:
-
RDF::RDFXML::Writer
- Object
- RDF::RDFXML::Writer
- ActiveFedora::RDFXMLWriter
- Defined in:
- lib/active_fedora/rdf_xml_writer.rb
Overview
an rdf:type assertion is present; this is incompatible with Fedora 3
Instance Method Summary collapse
-
#subject(subject, options = {}) ⇒ Nokogiri::XML::Element, {Namespace}
Display a subject.
- #type_of(type, subject) ⇒ Object
Instance Method Details
#subject(subject, options = {}) ⇒ Nokogiri::XML::Element, {Namespace}
Display a subject.
If the Haml template contains an entry matching the subject’s rdf:type URI, that entry will be used as the template for this subject and it’s properties.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/active_fedora/rdf_xml_writer.rb', line 29 def subject(subject, = {}) return if is_done?(subject) subject_done(subject) properties = properties_for_subject(subject) typeof = type_of(properties[RDF.type.to_s], subject) prop_list = order_properties(properties) add_debug {"subject: #{curie.inspect}, typeof: #{typeof.inspect}, props: #{prop_list.inspect}"} render_opts = {:typeof => typeof, :property_values => properties}.merge() render_subject_template(subject, prop_list, render_opts) end |
#type_of(type, subject) ⇒ Object
45 46 47 |
# File 'lib/active_fedora/rdf_xml_writer.rb', line 45 def type_of(type, subject) "" end |