Skip to content

Commit

Permalink
Merge pull request #516 from projecthydra/remove_registered_predicates
Browse files Browse the repository at this point in the history
Removed unused ActiveTriples predicates
  • Loading branch information
awead committed Oct 29, 2014
2 parents d69f0a6 + 894c751 commit fda9c28
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/active_fedora/attribute_methods/dirty.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Dirty

def set_value(*val)
attribute = val.first
unless [:has_model, :modified_date, :ldp_contains, :ldp_member].include? attribute
unless [:has_model, :modified_date].include? attribute
attribute_will_change!(attribute)
end
super
Expand Down
2 changes: 1 addition & 1 deletion lib/active_fedora/attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def attribute_names

# Attributes that are asserted about this RdfSource (not on a datastream)
def local_attributes
outgoing_reflections.values.map { |reflection| reflection.foreign_key.to_s } + properties.keys - ['has_model', 'create_date', 'modified_date', 'ldp_member', 'ldp_contains']
outgoing_reflections.values.map { |reflection| reflection.foreign_key.to_s } + properties.keys - ['has_model', 'create_date', 'modified_date']
end

def defined_attributes
Expand Down
2 changes: 0 additions & 2 deletions lib/active_fedora/fedora_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ module FedoraAttributes
property :has_model, predicate: RDF::URI.new("http://fedora.info/definitions/v4/rels-ext#hasModel")
property :create_date, predicate: ActiveFedora::Rdf::Fcrepo.created
property :modified_date, predicate: ActiveFedora::Rdf::Fcrepo.lastModified
property :ldp_member, predicate: ActiveFedora::Rdf::Ldp.member
property :ldp_contains, predicate: ActiveFedora::Rdf::Ldp.contains

# Hack until https://github.com/no-reply/ActiveTriples/pull/37 is merged
def create_date_with_first
Expand Down
4 changes: 0 additions & 4 deletions lib/active_fedora/rdf/fedora_rdf_resource.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
module ActiveFedora
class FedoraRdfResource < ActiveTriples::Resource
# TODO is this duplicating code with FedoraAttributes?
property :last_modified, predicate: ActiveFedora::Rdf::Fcrepo.lastModified
property :ldp_member, predicate: ActiveFedora::Rdf::Ldp.member
property :ldp_contains, predicate: ActiveFedora::Rdf::Ldp.contains

# This overrides ActiveTriples to cast id (e.g. /test-1) to a fully qualifed URI
def get_uri(uri_or_str)
Expand Down

0 comments on commit fda9c28

Please sign in to comment.