activefedora-aggregation 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f00db6b3c02104511eb24172593e567c17e1c84
|
4
|
+
data.tar.gz: 4cabc6488f7716bb5a9edd3a26c92c6b4eeebb33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f4a6f16a8dc168310c3f781aba33f6de48c0905e1e31fff72115a5d192019b9748ff34776d375d29dd8c89b4a0172025d1d01ab0118c3895e2d487d7e5ae9a4
|
7
|
+
data.tar.gz: d3d4369c5b6e5975ee180402500c37e3acc81fdd1de9bbb9aba400e0f239f5a3d31d75c26df0b12e2d2bb4ccb74190d21508b3f11010737b0b5197f64f938c45
|
data/README.md
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/activefedora-aggregation.svg)](http://badge.fury.io/rb/activefedora-aggregation) [![Build Status](https://circleci.com/gh/projecthydra-labs/activefedora-aggregation.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/projecthydra-labs/activefedora-aggregation)
|
2
2
|
# ActiveFedora::Aggregation
|
3
3
|
|
4
|
-
Aggregations for ActiveFedora
|
4
|
+
Aggregations for ActiveFedora: manage a group of related objects using predicates from the
|
5
|
+
[OAI-ORE data model](http://www.openarchives.org/ore/1.0/datamodel). Provides the foundation
|
6
|
+
for flexible relationships, including items appearing multiple times in a group,
|
7
|
+
flexible/optional ordering, etc.
|
8
|
+
|
9
|
+
Used extensively by [Hydra::PCDM](https://github.com/projecthydra-labs/hydra-pcdm/).
|
5
10
|
|
6
11
|
### Example
|
7
12
|
```ruby
|
@@ -21,4 +26,4 @@ image.save
|
|
21
26
|
|
22
27
|
```
|
23
28
|
|
24
|
-
Now the `
|
29
|
+
Now the `generic_files` method returns an ordered list of GenericFile objects.
|
@@ -69,16 +69,5 @@ module ActiveFedora::Aggregation
|
|
69
69
|
'ActiveFedora::Aggregation::Proxy'
|
70
70
|
end
|
71
71
|
|
72
|
-
def raise_on_type_mismatch(record)
|
73
|
-
super
|
74
|
-
if type_validator
|
75
|
-
type_validator.validate!(self,record)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
def type_validator
|
80
|
-
options[:type_validator]
|
81
|
-
end
|
82
|
-
|
83
72
|
end
|
84
73
|
end
|
@@ -2,9 +2,6 @@ module ActiveFedora::Aggregation
|
|
2
2
|
class Builder < ActiveFedora::Associations::Builder::CollectionAssociation
|
3
3
|
include ActiveFedora::AutosaveAssociation::AssociationBuilderExtension
|
4
4
|
self.macro = :aggregation
|
5
|
-
self.valid_options += [
|
6
|
-
:type_validator
|
7
|
-
]
|
8
5
|
|
9
6
|
def build
|
10
7
|
reflection = super
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activefedora-aggregation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07
|
11
|
+
date: 2015-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|