README.md in activefedora-aggregation-0.1.0 vs README.md in activefedora-aggregation-0.2.0

- old
+ new

@@ -1,23 +1,55 @@ +[![Gem Version](https://badge.fury.io/rb/activefedora-aggregation.svg)](http://badge.fury.io/rb/activefedora-aggregation) [![Build Status](https://travis-ci.org/curationexperts/activefedora-aggregation.svg?branch=v0.1.0)](https://travis-ci.org/curationexperts/activefedora-aggregation) # ActiveFedora::Aggregation Aggregations for ActiveFedora. ### Example ```ruby class GenericFile < ActiveFedora::Base end -generic_file1 = GenericFile.create -generic_file2 = GenericFile.create +generic_file1 = GenericFile.create(id: 'file1') +generic_file2 = GenericFile.create(id: 'file2') class Image < ActiveFedora::Base aggregates :generic_files end -image = Image.create +image = Image.create(id: 'my_image') image.generic_files = [generic_file2, generic_file1] image.save ``` Now the "generic\_files" method returns an ordered list of GenericFile objects. + +Here's what the graph looks like: + +```ttl +<http://127.0.0.1:8983/fedora/rest/dev/my_image> a <http://www.w3.org/ns/ldp#RDFSource>, + <http://www.w3.org/ns/ldp#Container>; + <http://www.w3.org/ns/ldp#contains> <http://127.0.0.1:8983/fedora/rest/dev/my_image/files>; + <info:fedora/fedora-system:def/model#hasModel> "Image" . + +<http://127.0.0.1:8983/fedora/rest/dev/my_image/files> a <http://www.w3.org/ns/ldp#RDFSource>, + <http://www.w3.org/ns/ldp#Container>; + <http://www.iana.org/assignments/relation/first> <http://127.0.0.1:8983/fedora/rest/dev/my_image/files/5a5af870-594b-4966-93f6-0348402583f0>; + <http://www.iana.org/assignments/relation/last> <http://127.0.0.1:8983/fedora/rest/dev/my_image/files/9cc70b3d-c9d7-4cfc-b504-adbcb0bdfb3d>; + <http://www.w3.org/ns/ldp#contains> <http://127.0.0.1:8983/fedora/rest/dev/my_image/files/5a5af870-594b-4966-93f6-0348402583f0>, + <http://127.0.0.1:8983/fedora/rest/dev/my_image/files/9cc70b3d-c9d7-4cfc-b504-adbcb0bdfb3d>; + <info:fedora/fedora-system:def/model#hasModel> "ActiveFedora::Aggregation::ProxyContainer" . + +<http://127.0.0.1:8983/fedora/rest/dev/my_image/files/5a5af870-594b-4966-93f6-0348402583f0> a <http://www.w3.org/ns/ldp#RDFSource>, + <http://www.w3.org/ns/ldp#Container>; + <http://www.iana.org/assignments/relation/next> <http://127.0.0.1:8983/fedora/rest/dev/my_image/files/9cc70b3d-c9d7-4cfc-b504-adbcb0bdfb3d>; + <http://www.openarchives.org/ore/terms/proxyFor> <http://127.0.0.1:8983/fedora/rest/dev/file2>; + <http://www.openarchives.org/ore/terms/proxyIn> <http://127.0.0.1:8983/fedora/rest/dev/my_image/files>; + <info:fedora/fedora-system:def/model#hasModel> "ActiveFedora::Aggregation::Proxy" . + +<http://127.0.0.1:8983/fedora/rest/dev/my_image/files/9cc70b3d-c9d7-4cfc-b504-adbcb0bdfb3d> a <http://www.w3.org/ns/ldp#RDFSource>, + <http://www.w3.org/ns/ldp#Container>; + <http://www.iana.org/assignments/relation/prev> <http://127.0.0.1:8983/fedora/rest/dev/my_image/files/5a5af870-594b-4966-93f6-0348402583f0>; + <http://www.openarchives.org/ore/terms/proxyFor> <http://127.0.0.1:8983/fedora/rest/dev/file1>; + <http://www.openarchives.org/ore/terms/proxyIn> <http://127.0.0.1:8983/fedora/rest/dev/my_image/files>; + <info:fedora/fedora-system:def/model#hasModel> "ActiveFedora::Aggregation::Proxy" . +```