class MyModel < ActiveFedora::Base
end
class MyDatastream < ActiveFedora::RDFDatastream
property :foo, predicate: ActiveTriples:Resource.new('http://example.com#foo'),
end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyDatastream < ActiveFedora::NTriplesRDFDatastream | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyDatastream < ActiveFedora::NTriplesRDFDatastream | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyDatastream < ActiveFedora::NTriplesRDFDatastream | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyDatastream < ActiveFedora::RDFDatastream | |
property :foo, predicate: ActiveTriples::Resource.new('http://example.com#foo'), class_name: 'Foo' | |
end | |
my_ds = MyDatastream.new | |
# I would expect this to whine.. but it doesn. | |
my_ds.foo = "this is definitely not a Foo" |
app/models/generic_file.rb
class GenericFile < ActiveFedora::Base
has_metadata 'descMetadata', type: MediaAnnotationDatastream
has_attributes :title_attributes, datastream: 'descMetadata', multiple: true
attr_accessible :title_attributes # <== needs to be changed to use strong params, yes?
end
app/models/datastream/media_annotation_datastream.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Suppose DogBehavior and Dog are defined in a gem. | |
module DogBehavior | |
def go_pee | |
puts "i am now peeing" | |
end | |
end | |
class Dog | |
include DogBehavior | |
end |
OlderNewer