sufia 0.0.1.pre1 → 0.0.1.pre2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -2
- data/Gemfile +2 -1
- data/README.md +19 -15
- data/Rakefile +2 -0
- data/app/controllers/batch_controller.rb +2 -3
- data/app/controllers/contact_form_controller.rb +1 -0
- data/app/controllers/dashboard_controller.rb +2 -2
- data/app/controllers/generic_files_controller.rb +24 -12
- data/app/controllers/mailbox_controller.rb +2 -2
- data/app/controllers/single_use_link_controller.rb +5 -5
- data/app/controllers/users_controller.rb +10 -10
- data/app/helpers/{application_helper.rb → sufia_helper.rb} +5 -13
- data/app/models/audit_job.rb +3 -4
- data/app/models/batch.rb +2 -0
- data/app/models/batch_update_job.rb +4 -6
- data/app/models/checksum_audit_log.rb +2 -0
- data/app/models/contact_form.rb +2 -0
- data/app/models/content_delete_event_job.rb +1 -1
- data/app/models/content_deposit_event_job.rb +2 -2
- data/app/models/content_new_version_event_job.rb +2 -2
- data/app/models/content_restored_version_event_job.rb +2 -2
- data/app/models/content_update_event_job.rb +2 -2
- data/app/models/datastreams/properties_datastream.rb +1 -1
- data/app/models/domain_term.rb +1 -0
- data/app/models/event_job.rb +1 -1
- data/app/models/generic_file.rb +5 -4
- data/app/models/local_authority.rb +1 -0
- data/app/models/local_authority_entry.rb +1 -0
- data/app/models/single_use_link.rb +2 -2
- data/app/models/user_edit_profile_event_job.rb +1 -1
- data/app/models/user_follow_event_job.rb +2 -2
- data/app/models/user_unfollow_event_job.rb +2 -2
- data/app/models/version_committer.rb +1 -0
- data/app/views/_footer.html.erb +21 -0
- data/app/views/_logo.html.erb +3 -0
- data/app/views/_masthead.html.erb +38 -0
- data/app/views/_user_util_links.html.erb +14 -43
- data/app/views/catalog/_document_list.html.erb +0 -7
- data/app/views/catalog/_home_text.html.erb +4 -4
- data/app/views/catalog/_recent_document.html.erb +5 -5
- data/app/views/contact_form/_directions.html.erb +4 -0
- data/app/views/contact_form/new.html.erb +2 -4
- data/app/views/dashboard/_document_list.html.erb +1 -8
- data/app/views/dashboard/_facets.html.erb +1 -1
- data/app/views/dashboard/_index_partials/_list_files.html.erb +1 -1
- data/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +6 -6
- data/app/views/dashboard/_search_form.html.erb +1 -1
- data/app/views/dashboard/index.html.erb +26 -25
- data/app/views/generic_files/_media_display.html.erb +5 -5
- data/app/views/generic_files/_permission.html.erb +11 -11
- data/app/views/generic_files/edit.html.erb +10 -8
- data/app/views/generic_files/show.html.erb +16 -12
- data/app/views/layouts/error.html.erb +2 -53
- data/app/views/layouts/hydra-head.html.erb +2 -21
- data/app/views/mailbox/index.html.erb +1 -1
- data/app/views/static/about.html.erb +2 -65
- data/app/views/static/help.html.erb +1 -721
- data/app/views/users/_search_form.html.erb +1 -1
- data/app/views/users/edit.html.erb +6 -3
- data/config/locales/sufia.en.yml +6 -0
- data/config/routes.rb +1 -3
- data/features/browse_dashboard_files.feature +1 -1
- data/features/display_dashboard.feature +1 -1
- data/features/step_definitions/fixture_steps.rb +2 -2
- data/features/step_definitions/user_steps.rb +12 -8
- data/features/support/env.rb +9 -0
- data/features/support/paths.rb +21 -21
- data/lib/generators/sufia/sufia_generator.rb +46 -4
- data/lib/generators/sufia/templates/catalog_controller.rb +2 -2
- data/lib/generators/sufia/templates/config/redis_config.rb +20 -0
- data/lib/generators/sufia/templates/config/sufia.rb +29 -0
- data/lib/generators/sufia/templates/migrations/add_groups_to_users.rb +0 -4
- data/lib/sufia.rb +22 -15
- data/lib/sufia/active_fedora/redis.rb +49 -0
- data/lib/{generators/sufia/templates/config/active_record_base_redis.rb → sufia/active_record/redis.rb} +1 -16
- data/lib/sufia/controller.rb +1 -2
- data/lib/sufia/http_header_auth.rb +9 -0
- data/lib/sufia/role_mapper.rb +1 -0
- data/lib/sufia/user.rb +24 -6
- data/lib/sufia/version.rb +1 -1
- data/lib/tasks/fixtures.rake +245 -0
- data/spec/.gitignore +1 -0
- data/spec/active_fedora/unsaved_digital_object_spec.rb +2 -2
- data/spec/config/host_to_vhost_spec.rb +8 -8
- data/spec/controllers/batch_controller_spec.rb +6 -6
- data/spec/controllers/catalog_controller_spec.rb +2 -0
- data/spec/controllers/dashboard_controller_spec.rb +13 -10
- data/spec/controllers/downloads_controller_spec.rb +8 -8
- data/spec/controllers/generic_files_controller_spec.rb +46 -44
- data/spec/controllers/mailbox_controller_spec.rb +6 -12
- data/spec/controllers/sessions_controller_spec.rb +8 -6
- data/spec/controllers/single_use_link_controller_spec.rb +9 -14
- data/spec/controllers/users_controller_spec.rb +49 -49
- data/spec/{factories.rb → factories/users.rb} +6 -3
- data/spec/fixtures/scholarsphere/scholarsphere_test2.foxml.erb +2 -2
- data/spec/fixtures/scholarsphere/scholarsphere_test3.foxml.erb +2 -2
- data/spec/fixtures/scholarsphere/scholarsphere_test4.foxml.erb +2 -2
- data/spec/fixtures/scholarsphere/scholarsphere_test6.foxml.erb +2 -2
- data/spec/fixtures/scholarsphere/sufia_scholarsphere1.descMeta.txt +12 -0
- data/spec/fixtures/scholarsphere/sufia_scholarsphere1.foxml.erb +79 -0
- data/spec/fixtures/scholarsphere/sufia_scholarsphere1.txt +1 -0
- data/spec/fixtures/scholarsphere/{scholarsphere_test1.foxml.erb → sufia_test1.foxml.erb} +6 -6
- data/spec/fixtures/scholarsphere/{scholarsphere_test5.foxml.erb → sufia_test5.foxml.erb} +5 -5
- data/spec/fixtures/scholarsphere_generic_stub.foxml.erb +5 -5
- data/spec/lib/{scholarsphere → sufia}/id_service_spec.rb +5 -5
- data/spec/lib/{scholarsphere → sufia}/role_mapper_spec.rb +5 -2
- data/spec/models/audit_job_spec.rb +1 -1
- data/spec/models/batch_spec.rb +2 -2
- data/spec/models/batch_update_job_spec.rb +5 -5
- data/spec/models/checksum_audit_log_spec.rb +1 -1
- data/spec/models/event_jobs_spec.rb +19 -19
- data/spec/models/file_content_datastream_spec.rb +6 -6
- data/spec/models/fits_datastream_spec.rb +1 -1
- data/spec/models/generic_file_spec.rb +8 -9
- data/spec/models/local_authority_spec.rb +3 -3
- data/spec/models/single_use_link_spec.rb +5 -5
- data/spec/models/unzip_job_spec.rb +1 -1
- data/spec/models/user_spec.rb +5 -26
- data/spec/rake/scholarsphere_fixtures_spec.rb +13 -12
- data/spec/routing/route_spec.rb +4 -41
- data/spec/spec_helper.rb +14 -4
- data/spec/support/Gemfile +21 -0
- data/spec/support/config/redis.yml +6 -0
- data/spec/support/lib/generators/test_app_generator.rb +40 -0
- data/sufia.gemspec +4 -2
- data/tasks/cucumber.rake +0 -6
- data/tasks/jetty.rake +40 -0
- data/tasks/scholarsphere-dev.rake +57 -17
- data/tasks/scholarsphere-fixtures.rake +16 -63
- metadata +74 -55
- data/.rvmrc +0 -59
- data/LICENSE +0 -22
- data/app/assets/images/site_images/logo_psuss_logotype.png +0 -0
- data/app/assets/images/site_images/logo_psuss_shield.png +0 -0
- data/lib/generators/sufia/templates/config/active_fedora_base_redis.rb +0 -54
- data/lib/sufia/ldap.rb +0 -123
- data/spec/fixtures/hydra_test_default_partials.foxml.xml +0 -80
- data/spec/fixtures/hydra_test_generic_content.foxml.xml +0 -138
- data/spec/fixtures/hydra_test_generic_image.foxml.xml +0 -395
- data/spec/fixtures/hydra_test_no_model.foxml.xml +0 -79
- data/spec/fixtures/hydrangea_fixture_archivist_only_mods_article.foxml.xml +0 -1212
- data/spec/fixtures/hydrangea_fixture_file_asset1.foxml.xml +0 -4946
- data/spec/fixtures/hydrangea_fixture_mods_article1.foxml.xml +0 -234
- data/spec/fixtures/hydrangea_fixture_mods_article2.foxml.xml +0 -177
- data/spec/fixtures/hydrangea_fixture_mods_article3.foxml.xml +0 -170
- data/spec/fixtures/hydrangea_fixture_mods_dataset1.foxml.xml +0 -187
- data/spec/fixtures/hydrangea_fixture_uploaded_svg1.foxml.xml +0 -676
- data/spec/fixtures/hydrus_admin_class1.foxml.xml +0 -176
- data/spec/fixtures/libra-oa_1.foxml.xml +0 -2324
- data/spec/fixtures/libra-oa_2.foxml.xml +0 -2422
- data/spec/fixtures/libra-oa_7.foxml.xml +0 -1735
data/.rvmrc
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
4
|
-
# development environment upon cd'ing into the directory
|
5
|
-
|
6
|
-
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
|
7
|
-
environment_id="ruby-1.9.3-p125@scholarsphere"
|
8
|
-
rubygems_version="1.8.23"
|
9
|
-
|
10
|
-
# Install rubies when used instead of only displaying a warning and exiting
|
11
|
-
rvm_install_on_use_flag=1
|
12
|
-
|
13
|
-
#
|
14
|
-
# Uncomment following line if you want options to be set only for given project.
|
15
|
-
#
|
16
|
-
# PROJECT_JRUBY_OPTS=( --1.9 )
|
17
|
-
|
18
|
-
#
|
19
|
-
# First we attempt to load the desired environment directly from the environment
|
20
|
-
# file. This is very fast and efficient compared to running through the entire
|
21
|
-
# CLI and selector. If you want feedback on which environment was used then
|
22
|
-
# insert the word 'use' after --create as this triggers verbose mode.
|
23
|
-
#
|
24
|
-
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
|
25
|
-
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] ; then
|
26
|
-
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
27
|
-
|
28
|
-
if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]; then
|
29
|
-
. "${rvm_path:-$HOME/.rvm}/hooks/after_use"
|
30
|
-
fi
|
31
|
-
else
|
32
|
-
# If the environment file has not yet been created, use the RVM CLI to select.
|
33
|
-
if ! rvm --create "$environment_id"; then
|
34
|
-
echo "Failed to create RVM environment '${environment_id}'."
|
35
|
-
exit 1
|
36
|
-
fi
|
37
|
-
fi
|
38
|
-
|
39
|
-
#
|
40
|
-
# If you use an RVM gemset file to install a list of gems (*.gems), you can have
|
41
|
-
# it be automatically loaded. Uncomment the following and adjust the filename if
|
42
|
-
# necessary.
|
43
|
-
#
|
44
|
-
# filename=".gems"
|
45
|
-
# if [[ -s "$filename" ]] ; then
|
46
|
-
# rvm gemset import "$filename" | grep -v already | grep -v listed | grep -v complete | sed '/^$/d'
|
47
|
-
# fi
|
48
|
-
|
49
|
-
# Use the specified rubygems_version
|
50
|
-
if [[ -n "${rubygems_version}" && ("$(gem --version)" != ${rubygems_version}) ]] ; then
|
51
|
-
rvm rubygems "${rubygems_version}"
|
52
|
-
fi
|
53
|
-
|
54
|
-
# Ensure that Bundler is installed, install it if it is not.
|
55
|
-
if ! (command -v bundle > /dev/null) ; then
|
56
|
-
printf "The rubygem 'bundler' is not installed, installing it now.\n"
|
57
|
-
gem install bundler
|
58
|
-
fi
|
59
|
-
|
data/LICENSE
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2012 TODO: Write your name
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
Binary file
|
Binary file
|
@@ -1,54 +0,0 @@
|
|
1
|
-
# Copyright © 2012 The Pennsylvania State University
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
require 'nest'
|
16
|
-
|
17
|
-
ActiveFedora::Base.class_eval do
|
18
|
-
def stream
|
19
|
-
Nest.new(self.class.name, $redis)[to_param]
|
20
|
-
rescue
|
21
|
-
nil
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.stream
|
25
|
-
Nest.new(name, $redis)
|
26
|
-
rescue
|
27
|
-
nil
|
28
|
-
end
|
29
|
-
|
30
|
-
def events(size=-1)
|
31
|
-
stream[:event].lrange(0, size).map do |event_id|
|
32
|
-
{
|
33
|
-
action: $redis.hget("events:#{event_id}", "action"),
|
34
|
-
timestamp: $redis.hget("events:#{event_id}", "timestamp")
|
35
|
-
}
|
36
|
-
end
|
37
|
-
rescue
|
38
|
-
[]
|
39
|
-
end
|
40
|
-
|
41
|
-
def create_event(action, timestamp)
|
42
|
-
event_id = $redis.incr("events:latest_id")
|
43
|
-
$redis.hmset("events:#{event_id}", "action", action, "timestamp", timestamp)
|
44
|
-
event_id
|
45
|
-
rescue
|
46
|
-
nil
|
47
|
-
end
|
48
|
-
|
49
|
-
def log_event(event_id)
|
50
|
-
stream[:event].lpush(event_id)
|
51
|
-
rescue
|
52
|
-
nil
|
53
|
-
end
|
54
|
-
end
|
data/lib/sufia/ldap.rb
DELETED
@@ -1,123 +0,0 @@
|
|
1
|
-
# A bucket to put ldap related methods into the user module
|
2
|
-
module Sufia::Ldap
|
3
|
-
|
4
|
-
module User
|
5
|
-
extend ActiveSupport::Concern
|
6
|
-
included do
|
7
|
-
# Workaround to retry LDAP calls a number of times
|
8
|
-
include ::Sufia::Utils
|
9
|
-
end
|
10
|
-
def populate_attributes
|
11
|
-
#update exist cache
|
12
|
-
exist = ldap_exist!
|
13
|
-
logger.warn "No ldapentry exists for #{login}" unless exist
|
14
|
-
return unless exist
|
15
|
-
|
16
|
-
begin
|
17
|
-
entry = directory_attributes.first
|
18
|
-
rescue
|
19
|
-
logger.warn "Error getting directory entry: #{Hydra::LDAP.connection.get_operation_result.message}"
|
20
|
-
return
|
21
|
-
end
|
22
|
-
attrs = {}
|
23
|
-
attrs[:email] = entry[:mail].first rescue nil
|
24
|
-
attrs[:display_name] = entry[:displayname].first rescue nil
|
25
|
-
attrs[:address] = entry[:postaladdress].first.gsub('$', "\n") rescue nil
|
26
|
-
attrs[:admin_area] = entry[:psadminarea].first rescue nil
|
27
|
-
attrs[:department] = entry[:psdepartment].first rescue nil
|
28
|
-
attrs[:title] = entry[:title].first rescue nil
|
29
|
-
attrs[:office] = entry[:psofficelocation].first.gsub('$', "\n") rescue nil
|
30
|
-
attrs[:chat_id] = entry[:pschatname].first rescue nil
|
31
|
-
attrs[:website] = entry[:labeleduri].first.gsub('$', "\n") rescue nil
|
32
|
-
attrs[:affiliation] = entry[:edupersonprimaryaffiliation].first rescue nil
|
33
|
-
attrs[:telephone] = entry[:telephonenumber].first rescue nil
|
34
|
-
update_attributes(attrs)
|
35
|
-
|
36
|
-
# update the group cache also
|
37
|
-
groups!
|
38
|
-
end
|
39
|
-
|
40
|
-
def ldap_exist?
|
41
|
-
if (ldap_last_update.blank? || ((Time.now-ldap_last_update) > 24*60*60 ))
|
42
|
-
return ldap_exist!
|
43
|
-
end
|
44
|
-
return ldap_available
|
45
|
-
end
|
46
|
-
|
47
|
-
def ldap_exist!
|
48
|
-
exist = retry_unless(7.times, lambda { Hydra::LDAP.connection.get_operation_result.code == 53 }) do
|
49
|
-
Hydra::LDAP.does_user_exist?(Net::LDAP::Filter.eq('uid', login))
|
50
|
-
end rescue false
|
51
|
-
if Hydra::LDAP.connection.get_operation_result.code == 0
|
52
|
-
logger.debug "exist = #{exist}"
|
53
|
-
attrs = {}
|
54
|
-
attrs[:ldap_available] = exist
|
55
|
-
attrs[:ldap_last_update] = Time.now
|
56
|
-
update_attributes(attrs)
|
57
|
-
# TODO: Should we retry here if the code is 51-53???
|
58
|
-
else
|
59
|
-
logger.warn "LDAP error checking exists for #{login}, reason (code: #{Hydra::LDAP.connection.get_operation_result.code}): #{Hydra::LDAP.connection.get_operation_result.message}"
|
60
|
-
return false
|
61
|
-
end
|
62
|
-
return exist
|
63
|
-
end
|
64
|
-
|
65
|
-
def directory_attributes(attrs=[])
|
66
|
-
UserLdap.directory_attributes(login, attrs)
|
67
|
-
end
|
68
|
-
|
69
|
-
# Groups that user is a member of
|
70
|
-
def groups
|
71
|
-
if (groups_last_update.blank? || ((Time.now-groups_last_update) > 24*60*60 ))
|
72
|
-
return groups!
|
73
|
-
end
|
74
|
-
return self.group_list.split(";?;")
|
75
|
-
end
|
76
|
-
|
77
|
-
def groups!
|
78
|
-
list = self.class.groups(login)
|
79
|
-
|
80
|
-
if Hydra::LDAP.connection.get_operation_result.code == 0
|
81
|
-
list.sort!
|
82
|
-
logger.debug "groups = #{list}"
|
83
|
-
attrs = {}
|
84
|
-
attrs[:ldap_na] = false
|
85
|
-
attrs[:group_list] = list.join(";?;")
|
86
|
-
attrs[:groups_last_update] = Time.now
|
87
|
-
update_attributes(attrs)
|
88
|
-
# TODO: Should we retry here if the code is 51-53???
|
89
|
-
else
|
90
|
-
logger.warn "Error getting groups for #{login} reason: #{Hydra::LDAP.connection.get_operation_result.message}"
|
91
|
-
return []
|
92
|
-
end
|
93
|
-
return list
|
94
|
-
end
|
95
|
-
|
96
|
-
module ClassMethods
|
97
|
-
def directory_attributes(login, attrs=[])
|
98
|
-
attrs = retry_unless(7.times, lambda { Hydra::LDAP.connection.get_operation_result.code == 53 }) do
|
99
|
-
Hydra::LDAP.get_user(Net::LDAP::Filter.eq('uid', login), attrs)
|
100
|
-
end rescue []
|
101
|
-
return attrs
|
102
|
-
end
|
103
|
-
|
104
|
-
def groups(login)
|
105
|
-
groups = retry_unless(7.times, lambda { Hydra::LDAP.connection.get_operation_result.code == 53 }) do
|
106
|
-
Hydra::LDAP.groups_for_user(Net::LDAP::Filter.eq('uid', login)) do |result|
|
107
|
-
result.first[:psmemberof].select{ |y| y.starts_with? 'cn=umg/' }.map{ |x| x.sub(/^cn=/, '').sub(/,dc=psu,dc=edu/, '') }
|
108
|
-
end rescue []
|
109
|
-
end
|
110
|
-
return groups
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
end
|
115
|
-
|
116
|
-
module Controller
|
117
|
-
def has_access?
|
118
|
-
unless current_user.ldap_exist?
|
119
|
-
render :template => '/error/401', :layout => "error", :formats => [:html], :status => 401
|
120
|
-
end
|
121
|
-
end
|
122
|
-
end
|
123
|
-
end
|
@@ -1,80 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<foxml:digitalObject VERSION="1.1" PID="hydra:test_default_partials" xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
|
3
|
-
<foxml:objectProperties>
|
4
|
-
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
|
5
|
-
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE=""/>
|
6
|
-
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
|
7
|
-
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2011-07-14T12:34:56.666Z"/>
|
8
|
-
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2011-07-14T12:34:56.666Z"/>
|
9
|
-
</foxml:objectProperties>
|
10
|
-
|
11
|
-
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
|
12
|
-
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2011-07-14T12:34:56.666Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="406">
|
13
|
-
<foxml:xmlContent>
|
14
|
-
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:srw_dc="info:srw/schema/1/dc-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
15
|
-
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
|
16
|
-
<dc:identifier>hydra:test_default_partials</dc:identifier>
|
17
|
-
<dc:description>a hydra test object with an (active)fedora model that has no specialized view partials</dc:description>
|
18
|
-
</oai_dc:dc>
|
19
|
-
</foxml:xmlContent>
|
20
|
-
</foxml:datastreamVersion>
|
21
|
-
</foxml:datastream>
|
22
|
-
|
23
|
-
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
|
24
|
-
<foxml:datastreamVersion ID="RELS-EXT.0" LABEL="" CREATED="2011-07-14T12:34:56.666Z" MIMETYPE="text/xml" SIZE="302">
|
25
|
-
<foxml:xmlContent>
|
26
|
-
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rel="info:fedora/fedora-system:def/relations-external#" xmlns:hydra="http://projecthydra.org/ns/relations#">
|
27
|
-
<rdf:Description rdf:about="info:fedora/hydra:test_default_partials">
|
28
|
-
<hasModel xmlns="info:fedora/fedora-system:def/relations-external#" rdf:resource="info:fedora/afmodel:CommonMetadataAsset"></hasModel>
|
29
|
-
</rdf:Description>
|
30
|
-
</rdf:RDF>
|
31
|
-
</foxml:xmlContent>
|
32
|
-
</foxml:datastreamVersion>
|
33
|
-
</foxml:datastream>
|
34
|
-
|
35
|
-
<foxml:datastream ID="descMetadata" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
|
36
|
-
<foxml:datastreamVersion ID="descMetadata.0" LABEL="" CREATED="2011-07-14T12:34:56.666Z" MIMETYPE="text/xml" SIZE="276">
|
37
|
-
<foxml:xmlContent>
|
38
|
-
<mods:mods xmlns:mods="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd">
|
39
|
-
<mods:titleInfo>
|
40
|
-
<mods:title>test object for default partials</mods:title>
|
41
|
-
</mods:titleInfo>
|
42
|
-
<mods:abstract>a hydra test object with an (active)fedora model that has no specialized view partials</mods:abstract>
|
43
|
-
<mods:identifier type="local">hydra:test_default_partials</mods:identifier>
|
44
|
-
</mods:mods>
|
45
|
-
</foxml:xmlContent>
|
46
|
-
</foxml:datastreamVersion>
|
47
|
-
</foxml:datastream>
|
48
|
-
|
49
|
-
<foxml:datastream ID="rightsMetadata" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
|
50
|
-
<foxml:datastreamVersion ID="rightsMetadata.0" LABEL="" CREATED="2011-07-14T12:34:56.666Z" MIMETYPE="text/xml" SIZE="302">
|
51
|
-
<foxml:xmlContent>
|
52
|
-
<rightsMetadata xmlns="http://hydra-collab.stanford.edu/schemas/rightsMetadata/v1" version="0.1">
|
53
|
-
<access type="discover">
|
54
|
-
<machine>
|
55
|
-
<group>public</group>
|
56
|
-
</machine>
|
57
|
-
</access>
|
58
|
-
<access type="read">
|
59
|
-
<human/>
|
60
|
-
<machine>
|
61
|
-
<group>researcher</group>
|
62
|
-
<group>public</group>
|
63
|
-
<group>patron</group>
|
64
|
-
<group>donor</group>
|
65
|
-
</machine>
|
66
|
-
</access>
|
67
|
-
<access type="edit">
|
68
|
-
<human/>
|
69
|
-
<machine>
|
70
|
-
<person>archivist1</person>
|
71
|
-
<group>archivist</group>
|
72
|
-
<group>admin_policy_object_editor</group>
|
73
|
-
</machine>
|
74
|
-
</access>
|
75
|
-
</rightsMetadata>
|
76
|
-
</foxml:xmlContent>
|
77
|
-
</foxml:datastreamVersion>
|
78
|
-
</foxml:datastream>
|
79
|
-
|
80
|
-
</foxml:digitalObject>
|
@@ -1,138 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<foxml:digitalObject VERSION="1.1" PID="hydra:test_generic_content" xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
|
3
|
-
<foxml:objectProperties>
|
4
|
-
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
|
5
|
-
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE=""/>
|
6
|
-
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
|
7
|
-
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2011-07-14T01:28:47.221Z"/>
|
8
|
-
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2011-07-14T01:30:56.432Z"/>
|
9
|
-
</foxml:objectProperties>
|
10
|
-
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
|
11
|
-
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2011-07-14T01:28:47.221Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="341">
|
12
|
-
<foxml:xmlContent>
|
13
|
-
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
|
14
|
-
<dc:identifier>hydra:test_generic_content</dc:identifier>
|
15
|
-
<dc:description>A test object using the GenericContent (active)fedora model</dc:description>
|
16
|
-
</oai_dc:dc>
|
17
|
-
</foxml:xmlContent>
|
18
|
-
</foxml:datastreamVersion>
|
19
|
-
</foxml:datastream>
|
20
|
-
<foxml:datastream ID="descMetadata" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
|
21
|
-
<foxml:datastreamVersion ID="descMetadata.1" LABEL="" CREATED="2011-07-14T01:30:13.169Z" MIMETYPE="text/xml" SIZE="1552">
|
22
|
-
<foxml:xmlContent>
|
23
|
-
<mods xmlns="http://www.loc.gov/mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd">
|
24
|
-
<titleInfo lang="">
|
25
|
-
<title>generic content</title>
|
26
|
-
</titleInfo>
|
27
|
-
<name type="personal">
|
28
|
-
<namePart type="given">Orlob</namePart>
|
29
|
-
<namePart type="family">Gryphon</namePart>
|
30
|
-
<affiliation>Fantasy</affiliation>
|
31
|
-
<role>
|
32
|
-
<roleTerm authority="marcrelator" type="text"/>
|
33
|
-
</role>
|
34
|
-
<description>Mythical Creatures</description>
|
35
|
-
</name>
|
36
|
-
<typeOfResource/>
|
37
|
-
<genre authority="marcgt"/>
|
38
|
-
<language>
|
39
|
-
<languageTerm authority="iso639-2b" type="code"/>
|
40
|
-
</language>
|
41
|
-
<physicalDescription>
|
42
|
-
<extent/>
|
43
|
-
</physicalDescription>
|
44
|
-
<abstract>A test object using the GenericContent (active)fedora model</abstract>
|
45
|
-
<subject>
|
46
|
-
<topic>flying creatures</topic>
|
47
|
-
</subject>
|
48
|
-
<relatedItem type="host">
|
49
|
-
<titleInfo>
|
50
|
-
<title/>
|
51
|
-
</titleInfo>
|
52
|
-
<identifier type="issn"/>
|
53
|
-
<originInfo>
|
54
|
-
<publisher/>
|
55
|
-
<dateIssued/>
|
56
|
-
</originInfo>
|
57
|
-
<part>
|
58
|
-
<detail type="volume">
|
59
|
-
<number/>
|
60
|
-
</detail>
|
61
|
-
<detail type="number">
|
62
|
-
<number/>
|
63
|
-
</detail>
|
64
|
-
<extent unit="pages">
|
65
|
-
<start/>
|
66
|
-
<end/>
|
67
|
-
</extent>
|
68
|
-
<date/>
|
69
|
-
</part>
|
70
|
-
</relatedItem>
|
71
|
-
<location>
|
72
|
-
<url/>
|
73
|
-
</location>
|
74
|
-
</mods>
|
75
|
-
</foxml:xmlContent>
|
76
|
-
</foxml:datastreamVersion>
|
77
|
-
</foxml:datastream>
|
78
|
-
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
|
79
|
-
<foxml:datastreamVersion ID="RELS-EXT.0" LABEL="" CREATED="2011-07-14T01:28:49.031Z" MIMETYPE="text/xml" SIZE="277">
|
80
|
-
<foxml:xmlContent>
|
81
|
-
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
82
|
-
<rdf:Description rdf:about="info:fedora/hydra:test_generic_content">
|
83
|
-
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/afmodel:GenericContent"/>
|
84
|
-
</rdf:Description>
|
85
|
-
</rdf:RDF>
|
86
|
-
</foxml:xmlContent>
|
87
|
-
</foxml:datastreamVersion>
|
88
|
-
</foxml:datastream>
|
89
|
-
<foxml:datastream ID="rightsMetadata" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
|
90
|
-
<foxml:datastreamVersion ID="rightsMetadata.1" LABEL="" CREATED="2011-07-14T01:30:56.432Z" MIMETYPE="text/xml" SIZE="777">
|
91
|
-
<foxml:xmlContent>
|
92
|
-
<rightsMetadata xmlns="http://hydra-collab.stanford.edu/schemas/rightsMetadata/v1" version="0.1">
|
93
|
-
<copyright>
|
94
|
-
<human/>
|
95
|
-
<machine>
|
96
|
-
<uvalicense>no</uvalicense>
|
97
|
-
</machine>
|
98
|
-
</copyright>
|
99
|
-
<access type="discover">
|
100
|
-
<human/>
|
101
|
-
<machine/>
|
102
|
-
</access>
|
103
|
-
<access type="read">
|
104
|
-
<human/>
|
105
|
-
<machine>
|
106
|
-
<group>researcher</group>
|
107
|
-
<group>public</group>
|
108
|
-
<group>patron</group>
|
109
|
-
<group>donor</group>
|
110
|
-
</machine>
|
111
|
-
</access>
|
112
|
-
<access type="edit">
|
113
|
-
<human/>
|
114
|
-
<machine>
|
115
|
-
<person>archivist1</person>
|
116
|
-
<group>archivist</group>
|
117
|
-
<group>admin_policy_object_editor</group>
|
118
|
-
</machine>
|
119
|
-
</access>
|
120
|
-
<embargo>
|
121
|
-
<human/>
|
122
|
-
<machine/>
|
123
|
-
</embargo>
|
124
|
-
</rightsMetadata>
|
125
|
-
</foxml:xmlContent>
|
126
|
-
</foxml:datastreamVersion>
|
127
|
-
</foxml:datastream>
|
128
|
-
<foxml:datastream ID="properties" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
|
129
|
-
<foxml:datastreamVersion ID="properties.0" LABEL="" CREATED="2011-07-14T01:28:49.367Z" MIMETYPE="text/xml" SIZE="99">
|
130
|
-
<foxml:xmlContent>
|
131
|
-
<fields>
|
132
|
-
<collection>generic_content</collection>
|
133
|
-
<depositor>archivist1</depositor>
|
134
|
-
</fields>
|
135
|
-
</foxml:xmlContent>
|
136
|
-
</foxml:datastreamVersion>
|
137
|
-
</foxml:datastream>
|
138
|
-
</foxml:digitalObject>
|