Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A mixin library for ActiveFedora. Generates dynamic finder methods operating against the FCRepo object search terms (DCES elements and object properties).

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.textile
Octocat-spinner-32 Rakefile
Octocat-spinner-32 active_fedora_finders.gemspec
README.textile

ActiveFedora::Finders

A mixin to allow use of dynamic finder methods (a la Rails) with ActiveFedora. These methods operate against the FCRepo Object Search.
Allowed fields are the 15 DCES metadata fields, and the FCRepo object properties, ie:

SINGLE_VALUE_FIELDS = [:pid, :cDate, :mDate, :label]
SYSTEM_FIELDS = SINGLE_VALUE_FIELDS.concat [:ownerId]
DC_FIELDS = [:contributor, :coverage, :creator, :date, :description, :format,
:identifier, :language, :publisher, :relation, :rights, :source,
:subject, :title, :type ]
SUPPORTED_ALTS = [:cdate, :create_date, :mdate, :modified_date, :owner_id]

Example:

class MyModel < ActiveFedora::Base
include ActiveFedora::RepositoryQuerying
end

obj = MyModel.search_repo(pid: “fedora-system:ContentModel-3.0”).first!

**

Roadmap:

0.1: dynamic finders, bang support
0.2 rubydora 1.x
0.3: Rubydora 1.0…2.0
0.4: AF 6.7+
0.5: Rails 4 and Hydra 7
0.6: support or_create|initialize
0.7: support _all and _last
0.8: support scopes

Something went wrong with that request. Please try again.