ddr-models 2.11.0 → 3.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.travis.yml +7 -6
- data/Gemfile +2 -3
- data/Rakefile +5 -5
- data/app/controllers/users/sessions_controller.rb +5 -0
- data/app/helpers/models_helper.rb +7 -0
- data/app/models/attachment.rb +3 -5
- data/app/models/collection.rb +12 -79
- data/app/models/component.rb +8 -67
- data/app/models/item.rb +8 -73
- data/app/models/target.rb +6 -5
- data/config/initializers/active_fedora_base.rb +11 -30
- data/config/initializers/{active_fedora_datastream.rb → active_fedora_file.rb} +1 -1
- data/config/initializers/devise.rb +2 -3
- data/config/initializers/subscriptions.rb +2 -19
- data/ddr-models.gemspec +10 -14
- data/lib/ddr/actions/fixity_check.rb +1 -1
- data/lib/ddr/actions/virus_check.rb +17 -10
- data/lib/ddr/auth.rb +6 -38
- data/lib/ddr/auth/ability.rb +1 -5
- data/lib/ddr/auth/ability_definitions/collection_ability_definitions.rb +0 -16
- data/lib/ddr/auth/ability_definitions/datastream_ability_definitions.rb +10 -4
- data/lib/ddr/auth/ability_definitions/role_based_ability_definitions.rb +16 -9
- data/lib/ddr/auth/ability_factory.rb +25 -2
- data/lib/ddr/auth/abstract_ability.rb +1 -2
- data/lib/ddr/auth/auth_context.rb +0 -18
- data/lib/ddr/auth/auth_context_factory.rb +2 -0
- data/lib/ddr/auth/group.rb +0 -6
- data/lib/ddr/auth/grouper_gateway.rb +0 -24
- data/lib/ddr/auth/permissions.rb +1 -12
- data/lib/ddr/auth/role_based_access_controls_enforcement.rb +5 -5
- data/lib/ddr/auth/roles.rb +1 -11
- data/lib/ddr/auth/roles/role_set.rb +0 -7
- data/lib/ddr/auth/roles/roles_datastream.rb +9 -0
- data/lib/ddr/contacts.rb +25 -0
- data/lib/ddr/datastreams.rb +10 -28
- data/lib/ddr/datastreams/datastream_behavior.rb +30 -100
- data/lib/ddr/datastreams/descriptive_metadata_datastream.rb +28 -31
- data/lib/ddr/datastreams/fits_datastream.rb +9 -22
- data/lib/ddr/datastreams/metadata_datastream.rb +17 -31
- data/lib/ddr/derivatives.rb +13 -16
- data/lib/ddr/derivatives/derivative.rb +68 -0
- data/lib/ddr/derivatives/{generator.rb → generators/generator.rb} +11 -7
- data/lib/ddr/derivatives/generators/png_generator.rb +23 -0
- data/lib/ddr/derivatives/generators/ptif_generator.rb +56 -0
- data/lib/ddr/derivatives/multires_image.rb +59 -0
- data/lib/ddr/derivatives/thumbnail.rb +36 -0
- data/lib/ddr/events.rb +0 -1
- data/lib/ddr/events/deletion_event.rb +9 -5
- data/lib/ddr/events/event.rb +8 -13
- data/lib/ddr/events/fixity_check_event.rb +0 -6
- data/lib/ddr/events/ingestion_event.rb +9 -5
- data/lib/ddr/events/update_event.rb +4 -17
- data/lib/ddr/index.rb +4 -4
- data/lib/ddr/index/abstract_query_result.rb +4 -3
- data/lib/ddr/index/connection.rb +9 -28
- data/lib/ddr/index/csv_query_result.rb +32 -47
- data/lib/ddr/index/field.rb +1 -11
- data/lib/ddr/index/fields.rb +16 -99
- data/lib/ddr/index/filter.rb +30 -103
- data/lib/ddr/index/filters.rb +19 -0
- data/lib/ddr/index/query.rb +11 -58
- data/lib/ddr/index/query_builder.rb +36 -147
- data/lib/ddr/index/query_clause.rb +19 -79
- data/lib/ddr/index/query_result.rb +4 -36
- data/lib/ddr/index/query_value.rb +18 -0
- data/lib/ddr/index/response.rb +2 -19
- data/lib/ddr/jobs.rb +12 -0
- data/lib/ddr/jobs/fits_file_characterization.rb +51 -0
- data/lib/ddr/jobs/permanent_id.rb +23 -0
- data/lib/ddr/managers.rb +1 -0
- data/lib/ddr/managers/derivatives_manager.rb +53 -93
- data/lib/ddr/managers/permanent_id_manager.rb +91 -0
- data/lib/ddr/managers/technical_metadata_manager.rb +10 -24
- data/lib/ddr/managers/workflow_manager.rb +10 -29
- data/lib/ddr/models.rb +50 -101
- data/lib/ddr/models/access_controllable.rb +12 -0
- data/lib/ddr/models/admin_set.rb +5 -16
- data/lib/ddr/models/base.rb +45 -165
- data/lib/ddr/models/describable.rb +19 -21
- data/lib/ddr/models/engine.rb +11 -39
- data/lib/ddr/models/error.rb +0 -3
- data/lib/ddr/models/file_management.rb +36 -72
- data/lib/ddr/models/finding_aid.rb +2 -35
- data/lib/ddr/models/fixity_checkable.rb +4 -0
- data/lib/ddr/models/governable.rb +3 -1
- data/lib/ddr/models/has_admin_metadata.rb +82 -56
- data/lib/ddr/models/has_attachments.rb +3 -1
- data/lib/ddr/models/has_children.rb +3 -7
- data/lib/ddr/models/has_content.rb +35 -32
- data/lib/ddr/models/has_multires_image.rb +7 -12
- data/lib/ddr/models/has_struct_metadata.rb +44 -6
- data/lib/ddr/models/has_thumbnail.rb +1 -4
- data/lib/ddr/models/indexing.rb +97 -186
- data/lib/ddr/models/licenses/admin_policy_license.rb +11 -0
- data/lib/ddr/models/licenses/effective_license.rb +9 -0
- data/lib/ddr/models/licenses/inherited_license.rb +9 -0
- data/lib/ddr/models/licenses/license.rb +21 -0
- data/lib/ddr/models/licenses/parent_license.rb +11 -0
- data/lib/ddr/models/metadata/descriptive_metadata.rb +50 -0
- data/lib/ddr/models/metadata/metadata.rb +37 -0
- data/lib/ddr/models/metadata/metadata_mapper.rb +32 -0
- data/lib/ddr/models/metadata/metadata_mappers.rb +18 -0
- data/lib/ddr/models/metadata/metadata_term.rb +24 -0
- data/lib/ddr/models/metadata/metadata_vocabularies.rb +18 -0
- data/lib/ddr/models/metadata/metadata_vocabulary.rb +34 -0
- data/lib/ddr/models/solr_document.rb +24 -156
- data/lib/ddr/models/struct_div.rb +63 -0
- data/lib/ddr/models/structure.rb +39 -175
- data/lib/ddr/models/version.rb +1 -1
- data/lib/ddr/models/year_facet.rb +118 -60
- data/lib/ddr/notifications.rb +12 -10
- data/lib/ddr/utils.rb +15 -28
- data/lib/ddr/vocab.rb +17 -15
- data/lib/ddr/vocab/asset.rb +17 -42
- data/lib/ddr/vocab/contact.rb +7 -5
- data/lib/ddr/vocab/display.rb +8 -6
- data/lib/ddr/vocab/duke_terms.rb +10 -8
- data/lib/ddr/vocab/rdf_vocabulary_parser.rb +39 -37
- data/lib/ddr/vocab/roles.rb +19 -17
- data/lib/ddr/vocab/sources/duketerms.rdf +8 -22
- data/lib/ddr/vocab/vocabulary.rb +26 -26
- data/spec/auth/ability_factory_spec.rb +1 -18
- data/spec/auth/ability_spec.rb +15 -119
- data/spec/auth/effective_permissions_spec.rb +1 -1
- data/spec/auth/effective_roles_spec.rb +1 -1
- data/spec/auth/ldap_gateway_spec.rb +9 -0
- data/spec/contacts/contacts_spec.rb +26 -0
- data/spec/controllers/including_role_based_access_controls_enforcement_spec.rb +5 -5
- data/spec/derivatives/multires_image_spec.rb +48 -0
- data/spec/derivatives/png_generator_spec.rb +8 -13
- data/spec/derivatives/ptif_generator_spec.rb +11 -9
- data/spec/derivatives/thumbnail_spec.rb +48 -0
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/db/schema.rb +23 -25
- data/spec/factories/attachment_factories.rb +2 -2
- data/spec/factories/collection_factories.rb +2 -3
- data/spec/factories/component_factories.rb +2 -2
- data/spec/factories/item_factories.rb +2 -2
- data/spec/factories/structure_factories.rb +2 -8
- data/spec/factories/test_model_factories.rb +12 -4
- data/spec/fixtures/fits/document.xml +44 -42
- data/spec/fixtures/fits/image.xml +41 -42
- data/spec/helpers/models_helper_spec.rb +11 -0
- data/spec/index/filter_spec.rb +30 -208
- data/spec/index/filters_spec.rb +17 -0
- data/spec/index/query_spec.rb +10 -82
- data/spec/jobs/fits_file_characterization_spec.rb +52 -0
- data/spec/managers/derivatives_manager_spec.rb +105 -107
- data/spec/managers/technical_metadata_manager_spec.rb +27 -34
- data/spec/models/active_fedora_base_spec.rb +105 -5
- data/spec/models/active_fedora_datastream_spec.rb +39 -106
- data/spec/models/admin_set_spec.rb +10 -43
- data/spec/models/attachment_spec.rb +2 -3
- data/spec/models/collection_spec.rb +11 -225
- data/spec/models/component_spec.rb +4 -106
- data/spec/models/descriptive_metadata_spec.rb +38 -0
- data/spec/models/effective_license_spec.rb +64 -0
- data/spec/models/events_spec.rb +59 -52
- data/spec/models/file_management_spec.rb +13 -113
- data/spec/models/finding_aid_spec.rb +8 -31
- data/spec/models/has_admin_metadata_spec.rb +122 -131
- data/spec/models/has_children_spec.rb +3 -3
- data/spec/models/has_struct_metadata_spec.rb +37 -50
- data/spec/models/indexing_spec.rb +23 -160
- data/spec/models/item_spec.rb +2 -133
- data/spec/models/license_spec.rb +24 -0
- data/spec/models/solr_document_spec.rb +47 -236
- data/spec/models/struct_div_spec.rb +70 -0
- data/spec/models/structure_spec.rb +11 -89
- data/spec/models/target_spec.rb +2 -4
- data/spec/models/year_facet_spec.rb +23 -50
- data/spec/spec_helper.rb +13 -17
- data/spec/support/ezid_mock_identifier.rb +2 -2
- data/spec/support/shared_examples_for_auth_contexts.rb +0 -33
- data/spec/support/shared_examples_for_ddr_models.rb +94 -142
- data/spec/support/shared_examples_for_describables.rb +36 -31
- data/spec/support/shared_examples_for_governables.rb +2 -3
- data/spec/support/shared_examples_for_has_content.rb +46 -101
- data/spec/support/shared_examples_for_indexing.rb +6 -6
- data/spec/support/shared_examples_for_non_collection_models.rb +1 -32
- data/spec/support/structural_metadata_helper.rb +59 -230
- data/spec/utils_spec.rb +2 -0
- metadata +96 -229
- data/.ruby-version +0 -1
- data/config/initializers/rsolr_monkey_patches.rb +0 -7
- data/config/initializers/rubydora_monkey_patch.rb +0 -11
- data/config/locales/ddr-models.en.yml +0 -81
- data/db/migrate/20161021201011_add_permanent_id_to_events.rb +0 -8
- data/lib/ddr/auth/ability_definitions/admin_set_ability_definitions.rb +0 -9
- data/lib/ddr/auth/ability_definitions/lock_ability_definitions.rb +0 -13
- data/lib/ddr/auth/ability_definitions/publication_ability_definitions.rb +0 -16
- data/lib/ddr/datastreams/administrative_metadata_datastream.rb +0 -75
- data/lib/ddr/datastreams/caption_datastream.rb +0 -5
- data/lib/ddr/datastreams/content_datastream.rb +0 -17
- data/lib/ddr/datastreams/delete_external_files.rb +0 -29
- data/lib/ddr/datastreams/external_file_datastream.rb +0 -80
- data/lib/ddr/datastreams/intermediate_file_datastream.rb +0 -5
- data/lib/ddr/datastreams/multires_image_datastream.rb +0 -5
- data/lib/ddr/datastreams/streamable_media_datastream.rb +0 -5
- data/lib/ddr/derivatives/png_generator.rb +0 -17
- data/lib/ddr/derivatives/ptif_generator.rb +0 -55
- data/lib/ddr/derivatives/update_derivatives.rb +0 -25
- data/lib/ddr/events/deaccession_event.rb +0 -8
- data/lib/ddr/index/field_attribute.rb +0 -22
- data/lib/ddr/index/query_params.rb +0 -40
- data/lib/ddr/index/sort_order.rb +0 -28
- data/lib/ddr/models/cache.rb +0 -20
- data/lib/ddr/models/captionable.rb +0 -37
- data/lib/ddr/models/contact.rb +0 -23
- data/lib/ddr/models/file_characterization.rb +0 -37
- data/lib/ddr/models/has_intermediate_file.rb +0 -41
- data/lib/ddr/models/language.rb +0 -31
- data/lib/ddr/models/media_type.rb +0 -22
- data/lib/ddr/models/permanent_id.rb +0 -240
- data/lib/ddr/models/rights_statement.rb +0 -25
- data/lib/ddr/models/streamable.rb +0 -37
- data/lib/ddr/models/structures/agent.rb +0 -49
- data/lib/ddr/models/structures/component_type_term.rb +0 -29
- data/lib/ddr/models/structures/div.rb +0 -64
- data/lib/ddr/models/structures/f_locat.rb +0 -54
- data/lib/ddr/models/structures/file.rb +0 -52
- data/lib/ddr/models/structures/file_grp.rb +0 -35
- data/lib/ddr/models/structures/file_sec.rb +0 -22
- data/lib/ddr/models/structures/fptr.rb +0 -31
- data/lib/ddr/models/structures/mets_hdr.rb +0 -37
- data/lib/ddr/models/structures/mptr.rb +0 -49
- data/lib/ddr/models/structures/struct_map.rb +0 -40
- data/lib/ddr/models/with_content_file.rb +0 -37
- data/spec/datastreams/external_file_datastream_spec.rb +0 -48
- data/spec/dummy/config/structure_component_type.yml +0 -18
- data/spec/fixtures/abcd1234.vtt +0 -38
- data/spec/fixtures/arrow1rightred_e0.gif +0 -0
- data/spec/fixtures/extractedText1.txt +0 -1
- data/spec/fixtures/extractedText2.txt +0 -1
- data/spec/fixtures/extractedText3.txt +0 -3
- data/spec/fixtures/imageA.jpg +0 -0
- data/spec/fixtures/imageB.jpg +0 -0
- data/spec/index/csv_query_result_spec.rb +0 -44
- data/spec/index/fields_spec.rb +0 -380
- data/spec/index/query_builder_spec.rb +0 -140
- data/spec/index/query_clause_spec.rb +0 -68
- data/spec/models/cache_spec.rb +0 -32
- data/spec/models/contact_spec.rb +0 -56
- data/spec/models/descriptive_metadata_datastream_spec.rb +0 -139
- data/spec/models/file_characterization_spec.rb +0 -39
- data/spec/models/language_spec.rb +0 -59
- data/spec/models/media_type_spec.rb +0 -46
- data/spec/models/permanent_id_spec.rb +0 -432
- data/spec/models/rights_statement_spec.rb +0 -55
- data/spec/models/structures/agent_spec.rb +0 -30
- data/spec/models/structures/component_type_term_spec.rb +0 -14
- data/spec/models/structures/div_spec.rb +0 -26
- data/spec/models/structures/f_locat_spec.rb +0 -78
- data/spec/models/structures/file_grp_spec.rb +0 -23
- data/spec/models/structures/file_sec_spec.rb +0 -22
- data/spec/models/structures/file_spec.rb +0 -60
- data/spec/models/structures/fptr_spec.rb +0 -23
- data/spec/models/structures/mets_hdr_spec.rb +0 -26
- data/spec/models/structures/mptr_spec.rb +0 -25
- data/spec/models/structures/struct_map_spec.rb +0 -24
- data/spec/models/with_content_file_spec.rb +0 -37
- data/spec/support/shared_examples_for_associations.rb +0 -8
- data/spec/support/shared_examples_for_captionable.rb +0 -23
- data/spec/support/shared_examples_for_has_intermediate_file.rb +0 -28
- data/spec/support/shared_examples_for_publication.rb +0 -43
- data/spec/support/shared_examples_for_streamable_media.rb +0 -23
@@ -1,63 +1,65 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<fits xmlns="http://hul.harvard.edu/ois/xml/ns/fits/fits_output" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/fits/fits_output http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd" version="
|
2
|
+
<fits xmlns="http://hul.harvard.edu/ois/xml/ns/fits/fits_output" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/fits/fits_output http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd" version="0.8.5" timestamp="7/3/15 8:29 PM">
|
3
3
|
<identification>
|
4
|
-
<identity format="Portable Document Format" mimetype="application/pdf" toolname="FITS" toolversion="
|
5
|
-
<tool toolname="
|
6
|
-
<tool toolname="
|
7
|
-
<tool toolname="
|
8
|
-
<tool toolname="
|
9
|
-
<tool toolname="NLNZ Metadata Extractor" toolversion="3.
|
4
|
+
<identity format="Portable Document Format" mimetype="application/pdf" toolname="FITS" toolversion="0.8.5">
|
5
|
+
<tool toolname="Jhove" toolversion="1.5" />
|
6
|
+
<tool toolname="file utility" toolversion="5.04" />
|
7
|
+
<tool toolname="Exiftool" toolversion="9.13" />
|
8
|
+
<tool toolname="Droid" toolversion="6.1.3" />
|
9
|
+
<tool toolname="NLNZ Metadata Extractor" toolversion="3.4GA" />
|
10
10
|
<tool toolname="ffident" toolversion="0.2" />
|
11
|
-
<tool toolname="Tika" toolversion="1.
|
12
|
-
<version toolname="
|
13
|
-
<externalIdentifier toolname="Droid" toolversion="6.3" type="puid">fmt/20</externalIdentifier>
|
11
|
+
<tool toolname="Tika" toolversion="1.3" />
|
12
|
+
<version toolname="Jhove" toolversion="1.5">1.6</version>
|
13
|
+
<externalIdentifier toolname="Droid" toolversion="6.1.3" type="puid">fmt/20</externalIdentifier>
|
14
14
|
</identity>
|
15
15
|
</identification>
|
16
16
|
<fileinfo>
|
17
|
-
<size toolname="Jhove" toolversion="1.
|
18
|
-
<creatingApplicationName toolname="Exiftool" toolversion="
|
19
|
-
<
|
20
|
-
<lastmodified toolname="
|
21
|
-
<
|
17
|
+
<size toolname="Jhove" toolversion="1.5">3786205</size>
|
18
|
+
<creatingApplicationName toolname="Exiftool" toolversion="9.13" status="CONFLICT">Adobe Acrobat Pro 11.0.3 Paper Capture Plug-in/PREMIS Editorial Committee</creatingApplicationName>
|
19
|
+
<creatingApplicationName toolname="NLNZ Metadata Extractor" toolversion="3.4GA" status="CONFLICT">Adobe Acrobat Pro 11.0.3 Paper Capture Plug-in/Acrobat PDFMaker 11 for Word</creatingApplicationName>
|
20
|
+
<lastmodified toolname="Exiftool" toolversion="9.13" status="CONFLICT">2015:06:25 21:45:24-04:00</lastmodified>
|
21
|
+
<lastmodified toolname="Tika" toolversion="1.3" status="CONFLICT">2015-06-08T21:22:35Z</lastmodified>
|
22
|
+
<created toolname="Exiftool" toolversion="9.13" status="SINGLE_RESULT">2015:06:05 15:16:23-04:00</created>
|
22
23
|
<filepath toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">/Users/dc/Downloads/premis-3-0-final.pdf</filepath>
|
23
24
|
<filename toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">premis-3-0-final.pdf</filename>
|
24
|
-
<md5checksum toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">
|
25
|
-
<fslastmodified toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">
|
25
|
+
<md5checksum toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">432ab76d650bfdc8f8d4a98cea9634bb</md5checksum>
|
26
|
+
<fslastmodified toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">1435283124000</fslastmodified>
|
26
27
|
</fileinfo>
|
27
28
|
<filestatus>
|
28
|
-
<well-formed toolname="Jhove" toolversion="1.
|
29
|
-
<valid toolname="Jhove" toolversion="1.
|
29
|
+
<well-formed toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">true</well-formed>
|
30
|
+
<valid toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">false</valid>
|
31
|
+
<message toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">Invalid page tree node offset=390028</message>
|
32
|
+
<message toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">Outlines contain recursive references.</message>
|
30
33
|
</filestatus>
|
31
34
|
<metadata>
|
32
35
|
<document>
|
33
|
-
<title toolname="
|
34
|
-
<
|
35
|
-
<
|
36
|
-
<
|
37
|
-
<
|
38
|
-
<isTagged toolname="
|
39
|
-
<
|
40
|
-
<
|
41
|
-
<
|
42
|
-
<
|
43
|
-
<
|
44
|
-
<hasForms toolname="NLNZ Metadata Extractor" toolversion="3.
|
36
|
+
<title toolname="Jhove" toolversion="1.5" status="CONFLICT">CONTENTS</title>
|
37
|
+
<title toolname="Exiftool" toolversion="9.13" status="CONFLICT">PREMIS Data Dictionary for Preservation Metadata, Version 3.0</title>
|
38
|
+
<author toolname="Exiftool" toolversion="9.13">PREMIS Editorial Committee</author>
|
39
|
+
<language toolname="Jhove" toolversion="1.5">en</language>
|
40
|
+
<pageCount toolname="Exiftool" toolversion="9.13">282</pageCount>
|
41
|
+
<isTagged toolname="Jhove" toolversion="1.5" status="CONFLICT">no</isTagged>
|
42
|
+
<isTagged toolname="NLNZ Metadata Extractor" toolversion="3.4GA" status="CONFLICT">yes</isTagged>
|
43
|
+
<hasOutline toolname="Jhove" toolversion="1.5">yes</hasOutline>
|
44
|
+
<hasAnnotations toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">no</hasAnnotations>
|
45
|
+
<isRightsManaged toolname="Exiftool" toolversion="9.13" status="SINGLE_RESULT">no</isRightsManaged>
|
46
|
+
<isProtected toolname="Exiftool" toolversion="9.13">no</isProtected>
|
47
|
+
<hasForms toolname="NLNZ Metadata Extractor" toolversion="3.4GA" status="SINGLE_RESULT">yes</hasForms>
|
48
|
+
<subject toolname="Tika" toolversion="1.3" status="SINGLE_RESULT">PREMIS</subject>
|
45
49
|
</document>
|
46
50
|
</metadata>
|
47
|
-
<statistics fitsExecutionTime="
|
48
|
-
<tool toolname="MediaInfo" toolversion="0.7.75" status="did not run" />
|
51
|
+
<statistics fitsExecutionTime="2977">
|
49
52
|
<tool toolname="OIS Audio Information" toolversion="0.1" status="did not run" />
|
50
53
|
<tool toolname="ADL Tool" toolversion="0.1" status="did not run" />
|
51
|
-
<tool toolname="
|
52
|
-
<tool toolname="
|
53
|
-
<tool toolname="
|
54
|
-
<tool toolname="
|
55
|
-
<tool toolname="
|
56
|
-
<tool toolname="
|
57
|
-
<tool toolname="OIS File Information" toolversion="0.2" executionTime="141" />
|
54
|
+
<tool toolname="Jhove" toolversion="1.5" executionTime="1034" />
|
55
|
+
<tool toolname="file utility" toolversion="5.04" executionTime="912" />
|
56
|
+
<tool toolname="Exiftool" toolversion="9.13" executionTime="842" />
|
57
|
+
<tool toolname="Droid" toolversion="6.1.3" executionTime="336" />
|
58
|
+
<tool toolname="NLNZ Metadata Extractor" toolversion="3.4GA" executionTime="2192" />
|
59
|
+
<tool toolname="OIS File Information" toolversion="0.2" executionTime="351" />
|
58
60
|
<tool toolname="OIS XML Metadata" toolversion="0.2" status="did not run" />
|
59
|
-
<tool toolname="ffident" toolversion="0.2" executionTime="
|
60
|
-
<tool toolname="Tika" toolversion="1.
|
61
|
+
<tool toolname="ffident" toolversion="0.2" executionTime="410" />
|
62
|
+
<tool toolname="Tika" toolversion="1.3" executionTime="2911" />
|
61
63
|
</statistics>
|
62
64
|
</fits>
|
63
65
|
|
@@ -1,60 +1,59 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<fits xmlns="http://hul.harvard.edu/ois/xml/ns/fits/fits_output" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/fits/fits_output http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd" version="
|
2
|
+
<fits xmlns="http://hul.harvard.edu/ois/xml/ns/fits/fits_output" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/fits/fits_output http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd" version="0.8.5" timestamp="7/28/15 4:34 PM">
|
3
3
|
<identification>
|
4
|
-
<identity format="JPEG File Interchange Format" mimetype="image/jpeg" toolname="FITS" toolversion="
|
5
|
-
<tool toolname="
|
6
|
-
<tool toolname="
|
7
|
-
<tool toolname="
|
8
|
-
<tool toolname="
|
9
|
-
<tool toolname="NLNZ Metadata Extractor" toolversion="3.
|
10
|
-
<version toolname="
|
11
|
-
<externalIdentifier toolname="Droid" toolversion="6.3" type="puid">fmt/43</externalIdentifier>
|
4
|
+
<identity format="JPEG File Interchange Format" mimetype="image/jpeg" toolname="FITS" toolversion="0.8.5">
|
5
|
+
<tool toolname="Jhove" toolversion="1.5" />
|
6
|
+
<tool toolname="file utility" toolversion="5.04" />
|
7
|
+
<tool toolname="Exiftool" toolversion="9.13" />
|
8
|
+
<tool toolname="Droid" toolversion="6.1.3" />
|
9
|
+
<tool toolname="NLNZ Metadata Extractor" toolversion="3.4GA" />
|
10
|
+
<version toolname="Jhove" toolversion="1.5">1.01</version>
|
11
|
+
<externalIdentifier toolname="Droid" toolversion="6.1.3" type="puid">fmt/43</externalIdentifier>
|
12
12
|
</identity>
|
13
13
|
</identification>
|
14
14
|
<fileinfo>
|
15
|
-
<size toolname="Jhove" toolversion="1.
|
16
|
-
<creatingApplicationName toolname="Jhove" toolversion="1.
|
17
|
-
<
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<
|
15
|
+
<size toolname="Jhove" toolversion="1.5">94497</size>
|
16
|
+
<creatingApplicationName toolname="Jhove" toolversion="1.5">File source: https://commons.wikimedia.org/wiki/File:Dante_Gabriel_Rossetti_-_Joan_of_Arc_(1882).jpg</creatingApplicationName>
|
17
|
+
<lastmodified toolname="Exiftool" toolversion="9.13" status="SINGLE_RESULT">2015:07:28 10:19:55-04:00</lastmodified>
|
18
|
+
<filepath toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">/Users/dc/Downloads/Joan_of_Arc.jpg</filepath>
|
19
|
+
<filename toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">Joan_of_Arc.jpg</filename>
|
20
|
+
<md5checksum toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">bc575fbcbffff0248f5da3dddf8afd69</md5checksum>
|
21
|
+
<fslastmodified toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">1438093195000</fslastmodified>
|
21
22
|
</fileinfo>
|
22
23
|
<filestatus>
|
23
|
-
<well-formed toolname="Jhove" toolversion="1.
|
24
|
-
<valid toolname="Jhove" toolversion="1.
|
24
|
+
<well-formed toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">true</well-formed>
|
25
|
+
<valid toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">true</valid>
|
25
26
|
</filestatus>
|
26
27
|
<metadata>
|
27
28
|
<image>
|
28
|
-
<byteOrder toolname="Jhove" toolversion="1.
|
29
|
-
<compressionScheme toolname="Jhove" toolversion="1.
|
30
|
-
<imageWidth toolname="Jhove" toolversion="1.
|
31
|
-
<imageHeight toolname="
|
32
|
-
<colorSpace toolname="Jhove" toolversion="1.
|
33
|
-
<iccProfileName toolname="Exiftool" toolversion="
|
34
|
-
<YCbCrSubSampling toolname="Exiftool" toolversion="
|
35
|
-
<samplingFrequencyUnit toolname="Jhove" toolversion="1.
|
36
|
-
<xSamplingFrequency toolname="
|
37
|
-
<ySamplingFrequency toolname="
|
38
|
-
<bitsPerSample toolname="Jhove" toolversion="1.
|
39
|
-
<samplesPerPixel toolname="Jhove" toolversion="1.
|
40
|
-
<lightSource toolname="NLNZ Metadata Extractor" toolversion="3.
|
41
|
-
<iccProfileVersion toolname="Exiftool" toolversion="
|
29
|
+
<byteOrder toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">big endian</byteOrder>
|
30
|
+
<compressionScheme toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">JPEG (old-style)</compressionScheme>
|
31
|
+
<imageWidth toolname="Jhove" toolversion="1.5">500</imageWidth>
|
32
|
+
<imageHeight toolname="Jhove" toolversion="1.5">569</imageHeight>
|
33
|
+
<colorSpace toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">YCbCr</colorSpace>
|
34
|
+
<iccProfileName toolname="Exiftool" toolversion="9.13" status="SINGLE_RESULT">c2</iccProfileName>
|
35
|
+
<YCbCrSubSampling toolname="Exiftool" toolversion="9.13" status="SINGLE_RESULT">1 1</YCbCrSubSampling>
|
36
|
+
<samplingFrequencyUnit toolname="Jhove" toolversion="1.5">in.</samplingFrequencyUnit>
|
37
|
+
<xSamplingFrequency toolname="Jhove" toolversion="1.5">128</xSamplingFrequency>
|
38
|
+
<ySamplingFrequency toolname="Jhove" toolversion="1.5">128</ySamplingFrequency>
|
39
|
+
<bitsPerSample toolname="Jhove" toolversion="1.5">8 8 8</bitsPerSample>
|
40
|
+
<samplesPerPixel toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">3</samplesPerPixel>
|
41
|
+
<lightSource toolname="NLNZ Metadata Extractor" toolversion="3.4GA" status="SINGLE_RESULT">unknown</lightSource>
|
42
|
+
<iccProfileVersion toolname="Exiftool" toolversion="9.13" status="SINGLE_RESULT">2.1.0</iccProfileVersion>
|
42
43
|
</image>
|
43
44
|
</metadata>
|
44
|
-
<statistics fitsExecutionTime="
|
45
|
-
<tool toolname="MediaInfo" toolversion="0.7.75" status="did not run" />
|
45
|
+
<statistics fitsExecutionTime="897">
|
46
46
|
<tool toolname="OIS Audio Information" toolversion="0.1" status="did not run" />
|
47
47
|
<tool toolname="ADL Tool" toolversion="0.1" status="did not run" />
|
48
|
-
<tool toolname="
|
49
|
-
<tool toolname="
|
50
|
-
<tool toolname="
|
51
|
-
<tool toolname="
|
52
|
-
<tool toolname="
|
53
|
-
<tool toolname="
|
54
|
-
<tool toolname="OIS File Information" toolversion="0.2" executionTime="148" />
|
48
|
+
<tool toolname="Jhove" toolversion="1.5" executionTime="728" />
|
49
|
+
<tool toolname="file utility" toolversion="5.04" executionTime="662" />
|
50
|
+
<tool toolname="Exiftool" toolversion="9.13" executionTime="718" />
|
51
|
+
<tool toolname="Droid" toolversion="6.1.3" executionTime="85" />
|
52
|
+
<tool toolname="NLNZ Metadata Extractor" toolversion="3.4GA" executionTime="664" />
|
53
|
+
<tool toolname="OIS File Information" toolversion="0.2" executionTime="82" />
|
55
54
|
<tool toolname="OIS XML Metadata" toolversion="0.2" status="did not run" />
|
56
|
-
<tool toolname="ffident" toolversion="0.2" executionTime="
|
57
|
-
<tool toolname="Tika" toolversion="1.
|
55
|
+
<tool toolname="ffident" toolversion="0.2" executionTime="315" />
|
56
|
+
<tool toolname="Tika" toolversion="1.3" executionTime="240" />
|
58
57
|
</statistics>
|
59
58
|
</fits>
|
60
59
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe ModelsHelper, type: :helper do
|
4
|
+
|
5
|
+
describe 'admin_set_full_name' do
|
6
|
+
it "should call I18n to translate the slug" do
|
7
|
+
expect(I18n).to receive(:t).with('ddr.admin_set.foo')
|
8
|
+
helper.admin_set_full_name('foo')
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/spec/index/filter_spec.rb
CHANGED
@@ -1,224 +1,46 @@
|
|
1
1
|
module Ddr::Index
|
2
2
|
RSpec.describe Filter do
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
describe "and the clauses are equal" do
|
9
|
-
subject { described_class.new(clauses: ["foo:bar", "spam:eggs"]) }
|
10
|
-
let(:other) { described_class.new(clauses: ["foo:bar", "spam:eggs"]) }
|
11
|
-
specify { expect(subject).to eq other }
|
12
|
-
end
|
13
|
-
describe "and the clauses are not equal" do
|
14
|
-
subject { described_class.new(clauses: ["foo:bar", "bam:baz"]) }
|
15
|
-
let(:other) { described_class.new(clauses: ["foo:bar", "spam:eggs"]) }
|
16
|
-
specify { expect(subject).not_to eq other }
|
17
|
-
end
|
18
|
-
end
|
19
|
-
describe "when the other is not a Filter instance" do
|
20
|
-
subject { described_class.new(clauses: ["foo:bar", "spam:eggs"]) }
|
21
|
-
let(:other) { double(clauses: ["foo:bar", "spam:eggs"]) }
|
22
|
-
specify { expect(subject).not_to eq other }
|
4
|
+
describe "#where(conditions)" do
|
5
|
+
it "should add raw query filters for the field, value hash of conditions" do
|
6
|
+
subject.where("foo"=>"bar", "spam"=>"eggs", "stuff"=>["dog", "cat", "bird"])
|
7
|
+
expect(subject.clauses).to eq(["{!term f=foo}bar", "{!term f=spam}eggs", "stuff:(dog OR cat OR bird)"])
|
23
8
|
end
|
24
9
|
end
|
25
10
|
|
26
|
-
describe "
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
its(:clauses) {
|
31
|
-
are_expected.to eq([QueryClause.term(:is_governed_by, "info:fedora/test:1")])
|
32
|
-
}
|
33
|
-
end
|
34
|
-
describe "with an ID" do
|
35
|
-
subject { described_class.is_governed_by("test:1") }
|
36
|
-
its(:clauses) {
|
37
|
-
are_expected.to eq([QueryClause.term(:is_governed_by, "info:fedora/test:1")])
|
38
|
-
}
|
39
|
-
end
|
40
|
-
describe "with a URI" do
|
41
|
-
subject { described_class.is_governed_by("info:fedora/test:1") }
|
42
|
-
its(:clauses) {
|
43
|
-
are_expected.to eq([QueryClause.term(:is_governed_by, "info:fedora/test:1")])
|
44
|
-
}
|
45
|
-
end
|
46
|
-
end
|
47
|
-
describe ".is_member_of_collection" do
|
48
|
-
describe "with an object" do
|
49
|
-
subject { described_class.is_member_of_collection(Item.new(pid: "test:1")) }
|
50
|
-
its(:clauses) {
|
51
|
-
are_expected.to eq([QueryClause.term(:is_member_of_collection, "info:fedora/test:1")])
|
52
|
-
}
|
53
|
-
end
|
54
|
-
describe "with an ID" do
|
55
|
-
subject { described_class.is_member_of_collection("test:1") }
|
56
|
-
its(:clauses) {
|
57
|
-
are_expected.to eq([QueryClause.term(:is_member_of_collection, "info:fedora/test:1")])
|
58
|
-
}
|
59
|
-
end
|
60
|
-
describe "with a URI" do
|
61
|
-
subject { described_class.is_member_of_collection("info:fedora/test:1") }
|
62
|
-
its(:clauses) {
|
63
|
-
are_expected.to eq([QueryClause.term(:is_member_of_collection, "info:fedora/test:1")])
|
64
|
-
}
|
65
|
-
end
|
66
|
-
end
|
67
|
-
describe ".is_part_of" do
|
68
|
-
describe "with an object" do
|
69
|
-
subject { described_class.is_part_of(Item.new(pid: "test:1")) }
|
70
|
-
its(:clauses) {
|
71
|
-
are_expected.to eq([QueryClause.term(:is_part_of, "info:fedora/test:1")])
|
72
|
-
}
|
73
|
-
end
|
74
|
-
describe "with an ID" do
|
75
|
-
subject { described_class.is_part_of("test:1") }
|
76
|
-
its(:clauses) {
|
77
|
-
are_expected.to eq([QueryClause.term(:is_part_of, "info:fedora/test:1")])
|
78
|
-
}
|
79
|
-
end
|
80
|
-
describe "with a URI" do
|
81
|
-
subject { described_class.is_part_of("info:fedora/test:1") }
|
82
|
-
its(:clauses) {
|
83
|
-
are_expected.to eq([QueryClause.term(:is_part_of, "info:fedora/test:1")])
|
84
|
-
}
|
85
|
-
end
|
86
|
-
end
|
87
|
-
describe ".has_content" do
|
88
|
-
subject { described_class.has_content }
|
89
|
-
its(:clauses) {
|
90
|
-
are_expected.to eq([QueryClause.where(:active_fedora_model, ["Component", "Attachment", "Target"])])
|
91
|
-
}
|
92
|
-
end
|
93
|
-
describe ".model" do
|
94
|
-
describe "with a single model" do
|
95
|
-
subject { described_class.model("Component") }
|
96
|
-
its(:clauses) {
|
97
|
-
are_expected.to eq([QueryClause.where(:active_fedora_model, "Component")])
|
98
|
-
}
|
99
|
-
end
|
100
|
-
describe "with a list of models" do
|
101
|
-
subject { described_class.model("Component", "Attachment", "Target") }
|
102
|
-
its(:clauses) {
|
103
|
-
are_expected.to eq([QueryClause.where(:active_fedora_model, ["Component", "Attachment", "Target"])])
|
104
|
-
}
|
105
|
-
end
|
106
|
-
end
|
107
|
-
describe ".where" do
|
108
|
-
subject { described_class.where("foo"=>"bar", "spam"=>"eggs", "stuff"=>["dog", "cat", "bird"]) }
|
109
|
-
its(:clauses) {
|
110
|
-
are_expected.to eq([QueryClause.where("foo", "bar"),
|
111
|
-
QueryClause.where("spam", "eggs"),
|
112
|
-
QueryClause.where("stuff", ["dog", "cat", "bird"])
|
113
|
-
])
|
114
|
-
}
|
115
|
-
end
|
116
|
-
describe ".raw" do
|
117
|
-
subject { described_class.raw("foo:bar", "spam:eggs") }
|
118
|
-
its(:clauses) { are_expected.to eq(["foo:bar", "spam:eggs"]) }
|
119
|
-
end
|
120
|
-
describe ".negative" do
|
121
|
-
subject { described_class.negative("foo", "bar") }
|
122
|
-
its(:clauses) { are_expected.to eq([QueryClause.negative("foo", "bar")]) }
|
123
|
-
end
|
124
|
-
describe ".present" do
|
125
|
-
subject { described_class.present("foo") }
|
126
|
-
its(:clauses) { are_expected.to eq([QueryClause.present("foo")]) }
|
127
|
-
end
|
128
|
-
describe ".absent" do
|
129
|
-
subject { described_class.absent("foo") }
|
130
|
-
its(:clauses) { are_expected.to eq([QueryClause.absent("foo")]) }
|
131
|
-
end
|
132
|
-
describe ".before_days" do
|
133
|
-
subject { described_class.before_days("foo", 60) }
|
134
|
-
its(:clauses) { are_expected.to eq([QueryClause.before_days("foo", 60)]) }
|
135
|
-
end
|
136
|
-
describe ".before" do
|
137
|
-
subject { described_class.before("foo", DateTime.parse("Thu, 27 Aug 2015 17:42:34 -0400")) }
|
138
|
-
its(:clauses) {
|
139
|
-
are_expected.to eq([QueryClause.before("foo", DateTime.parse("Thu, 27 Aug 2015 17:42:34 -0400"))])
|
140
|
-
}
|
141
|
-
end
|
142
|
-
describe ".join" do
|
143
|
-
subject {
|
144
|
-
described_class.join(from: :id, to: :collection_uri, where: {admin_set: "dvs"})
|
145
|
-
}
|
146
|
-
its(:clauses) {
|
147
|
-
are_expected.to eq([QueryClause.join(from: :id, to: :collection_uri, where: {admin_set: "dvs"})])
|
148
|
-
}
|
149
|
-
end
|
150
|
-
describe ".regexp" do
|
151
|
-
subject { described_class.regexp("foo", "foo/bar.*") }
|
152
|
-
its(:clauses) {
|
153
|
-
are_expected.to eq([QueryClause.regexp("foo", "foo/bar.*")])
|
154
|
-
}
|
11
|
+
describe "#raw(*clauses)" do
|
12
|
+
it "should add the clauses w/o escaping" do
|
13
|
+
subject.raw("foo:bar", "spam:eggs")
|
14
|
+
expect(subject.clauses).to eq(["foo:bar", "spam:eggs"])
|
155
15
|
end
|
156
16
|
end
|
157
17
|
|
158
|
-
describe "
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
expect(subject.clauses).to eq([QueryClause.where("foo", "bar"),
|
163
|
-
QueryClause.where("spam", "eggs"),
|
164
|
-
QueryClause.where("stuff", ["dog", "cat", "bird"])
|
165
|
-
])
|
166
|
-
end
|
167
|
-
end
|
168
|
-
describe "#where_not" do
|
169
|
-
it "adds negative query clauses for the hash of conditions" do
|
170
|
-
subject.where_not("foo"=>"bar", "spam"=>"eggs", "stuff"=>["dog", "cat", "bird"])
|
171
|
-
expect(subject.clauses).to eq([QueryClause.negative("foo", "bar"),
|
172
|
-
QueryClause.negative("spam", "eggs"),
|
173
|
-
QueryClause.negative("stuff", "dog"),
|
174
|
-
QueryClause.negative("stuff", "cat"),
|
175
|
-
QueryClause.negative("stuff", "bird")
|
176
|
-
])
|
177
|
-
end
|
178
|
-
end
|
179
|
-
describe "#raw" do
|
180
|
-
it "adds the query clauses w/o escaping" do
|
181
|
-
subject.raw("foo:bar", "spam:eggs")
|
182
|
-
expect(subject.clauses).to eq(["foo:bar", "spam:eggs"])
|
183
|
-
end
|
184
|
-
end
|
185
|
-
describe "#negative" do
|
186
|
-
it "adds a negation query clause" do
|
187
|
-
subject.negative("foo", "bar")
|
188
|
-
expect(subject.clauses).to eq([QueryClause.negative("foo", "bar")])
|
189
|
-
end
|
190
|
-
end
|
191
|
-
describe "#present" do
|
192
|
-
it "adds a \"field present\" query clause" do
|
193
|
-
subject.present("foo")
|
194
|
-
expect(subject.clauses).to eq([QueryClause.present("foo")])
|
195
|
-
end
|
196
|
-
end
|
197
|
-
describe "#absent" do
|
198
|
-
it "adds a \"field not present\" query clause" do
|
199
|
-
subject.absent("foo")
|
200
|
-
expect(subject.clauses).to eq([QueryClause.absent("foo")])
|
201
|
-
end
|
202
|
-
end
|
203
|
-
describe "#before_days" do
|
204
|
-
it "adds a date range query clause" do
|
205
|
-
subject.before_days("foo", 60)
|
206
|
-
expect(subject.clauses).to eq([QueryClause.before_days("foo", 60)])
|
207
|
-
end
|
18
|
+
describe "#present(field)" do
|
19
|
+
it "should add a \"field present\" clause" do
|
20
|
+
subject.present("foo")
|
21
|
+
expect(subject.clauses).to eq(["foo:[* TO *]"])
|
208
22
|
end
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "#absent(field)" do
|
26
|
+
it "should add a \"field not present\" clause" do
|
27
|
+
subject.absent("foo")
|
28
|
+
expect(subject.clauses).to eq(["-foo:[* TO *]"])
|
214
29
|
end
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "#before_days(field, days)" do
|
33
|
+
it "should add a date range query clause" do
|
34
|
+
subject.before_days("foo", 60)
|
35
|
+
expect(subject.clauses).to eq(["foo:[* TO NOW-60DAYS]"])
|
220
36
|
end
|
37
|
+
end
|
221
38
|
|
39
|
+
describe "#before(field, date_time)" do
|
40
|
+
it "should add a date range query clause" do
|
41
|
+
subject.before("foo", DateTime.parse("Thu, 27 Aug 2015 17:42:34 -0400"))
|
42
|
+
expect(subject.clauses).to eq(["foo:[* TO 2015-08-27T21:42:34Z]"])
|
43
|
+
end
|
222
44
|
end
|
223
45
|
|
224
46
|
end
|