diff --git a/LICENCE.txt b/LICENCE.txt
new file mode 100644
index 0000000..54fec5d
--- /dev/null
+++ b/LICENCE.txt
@@ -0,0 +1,23 @@
+The MIT License
+
+Copyright (c) 2012, University of Oxford
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
diff --git a/README.txt b/README.txt
index 96c65d7..3db4301 100644
--- a/README.txt
+++ b/README.txt
@@ -8,118 +8,11 @@ RDF-enhanced storage API, pairtree-backed.
Installation and dependancies
=============================
-- [I would advise using virtualenv]
+The dependancies are listed in the file docs/Dependancies.pdf
+The installation instructions are available at docs/Databank_VM_Installation.txt
-Dependancies:
+For further infromation visit http://www.dataflow.ox.ac.uk/
+The project wiki is available at http://dataflow-jira.bodleian.ox.ac.uk/jira/ or
+https://damssupport.ouls.ox.ac.uk/trac/databank/wiki/
-pylons==0.9.7
-pairtree==0.5.6-T
-rdfobject
-recordsilo
-simplejson
-solrpy
-
-redis (use the redis client that is compatible with your redis server - http://github.com/andymccurdy/redis-py/)
-
-
-- Change the settings in development.ini to suit your uses, specifically:
-
-redis.host = localhost
-
-granary.store = silos # Directory to storage directory. Can be absolute: /var/silos
-granary.uri_root = http://databank.bodleian.ox.ac.uk/objects/ # URI root - must end with /, # or :
-
-broadcast.to = redis
-broadcast.queue = silochanges # redis 'queue' to push audit messages to (create, delete, update or embargo change)
-
-solr.host = http://localhost:8983/solr # Unset this to ignore solr while testing
-
-Setup:
-======
-
-Create a file 'passwd' in the root directory of the application using 'htpasswd' or similar:
-
-$ htpasswd -c passwd admin
-[enter admin password]
-
-Add any users you wish to access or work with this application.
-
-Edit ./rdfdatabank/lib/ident_md.py - this has a variable _DATA which would best be replaced by a DB lookup or similar. For now, adjust it
-to suit your users - the important thing is the 'role'.
-
-Start up the redis-server and confirm that you can access it.
-
-You should be able to start the application now (as long as the application has access to r+w to the aforementioned 'silos' directory.)
-
-paster serve development.ini
-
-Then, go to localhost:5000/admin, and try to log in as the 'admin' account. You should then be able to create and manage silos and assign write-access to them to users.
-
-WGSI deployment:
-================
-
-Copy 'development.ini' to a file called 'production.ini' and make sure debug = false and that the 'silos' directory is
-owned by the web-server user (www-data for example). Recommendation is to have a separate silo directory for production use.
-
-Create a folder called 'egg-cache' and make sure that is writable by the web-server user too.
-
-Create a folder 'mod_wsgi' in the root of the application.
-
-Create a file within that called 'dispatch.wsgi' and put in the following:
-
----------------
-# Add the virtual Python environment site-packages directory to the path
-
-import pkg_resources
-pkg_resources.working_set.add_entry('/opt/rdfdatabank/src') # Path to application root
-
-# Avoid ``[Errno 13] Permission denied: '/var/www/.python-eggs'`` messages
-import os
-os.environ['PYTHON_EGG_CACHE'] = '/opt/rdfdatabank/src/egg-cache' # Path to writable directory for egg-cache
-
-# Load the Pylons application
-from paste.deploy import loadapp
-application = loadapp('config:/opt/rdfdatabank/src/production.ini') # Path to production.ini file
-
----------------
-
-In your apache2 configuration, you need an entry like:
-
- info on project goes here goes here... ${c.message} ${c.message} ${c.message} ${c.message} ${c.message} Alter Silo
-Background
+
+
+Documentation
+
+
+
+
\ No newline at end of file
diff --git a/rdfdatabank/templates/admin_siloview.html b/rdfdatabank/templates/admin_siloview.html
index f53191c..ce4a9ec 100644
--- a/rdfdatabank/templates/admin_siloview.html
+++ b/rdfdatabank/templates/admin_siloview.html
@@ -1,20 +1,22 @@
-# -*- coding: utf-8 -*-
-<%inherit file="/base.html" />
-<%def name="head_tags()">
- Admin Interface - ${c.silo_name}
-% if c.silo_name:
- Admin ${c.silo_name}
-% if c.message:
-
- Delete this silo - NO UNDO!
-
-% endif
-<%include file="/silo_metadata.html"/>
-
-<%include file="/alter_silo.html"/>
-
-
+# -*- coding: utf-8 -*-
+<%inherit file="/base.html" />
+<%def name="head_tags()">
+ Admin Interface - ${c.silo_name}
+% if c.silo_name:
+ Admin ${c.silo_name}
+% if c.message:
+
+% endif
+
+
+
+% endif
+Silo metadata
+<%include file="/silo_metadata.html"/>
+
+Update silo metadata
+<%include file="/alter_silo.html"/>
+
+
diff --git a/rdfdatabank/templates/admin_user.html b/rdfdatabank/templates/admin_user.html
index 182e637..7e3c178 100644
--- a/rdfdatabank/templates/admin_user.html
+++ b/rdfdatabank/templates/admin_user.html
@@ -1,37 +1,38 @@
-# -*- coding: utf-8 -*-
-<%inherit file="/base.html" />
-<%def name="head_tags()">
- Silo ${c.silo_name}
- User info for ${c.username}
-% if c.message:
-
-<%include file="/update_user.html"/>
+# -*- coding: utf-8 -*-
+<%inherit file="/base.html" />
+<%def name="head_tags()">
+ Silo ${c.silo_name}
+ User info for ${c.username}
+% if c.message:
+
+ Update user information
+<%include file="/update_user.html"/>
diff --git a/rdfdatabank/templates/admin_users.html b/rdfdatabank/templates/admin_users.html
index 7db49d8..fff3cc7 100644
--- a/rdfdatabank/templates/admin_users.html
+++ b/rdfdatabank/templates/admin_users.html
@@ -1,20 +1,20 @@
-# -*- coding: utf-8 -*-
-<%inherit file="/base.html" />
-<%def name="head_tags()">
- Users - ${c.silo_name}
- Users in ${c.silo_name}
-% if c.message:
-
-% if c.users:
-
- % for o in c.users:
-
-% endif
-
-<%include file="/register_new_user.html"/>
+# -*- coding: utf-8 -*-
+<%inherit file="/base.html" />
+<%def name="head_tags()">
+ Users of ${c.silo_name}
+% if c.message:
+
+% if c.users:
+
+ % for o in c.users:
+
+% endif
+
+Create new user
+<%include file="/register_new_user.html"/>
diff --git a/rdfdatabank/templates/alter_silo.html b/rdfdatabank/templates/alter_silo.html
index f83250d..8d06f3a 100644
--- a/rdfdatabank/templates/alter_silo.html
+++ b/rdfdatabank/templates/alter_silo.html
@@ -1,23 +1,23 @@
-# -*- coding: utf-8 -*-
-
+
+ diff --git a/rdfdatabank/templates/api.html b/rdfdatabank/templates/api.html index a740db5..b8da929 100644 --- a/rdfdatabank/templates/api.html +++ b/rdfdatabank/templates/api.html @@ -1,15 +1,15 @@ -# -*- coding: utf-8 -*- -<%inherit file="/base.html" /> -<%def name="head_tags()"> -To learn more about Databank visit the Databank wiki
-To learn more about Databank visit the Databank wiki
+Create new Silo
--
- +# -*- coding: utf-8 -*- +Embargoed: True
-Embargoed until: ${c.embargos[c.current][1]}
-% else: -Embargoed: False
-% endif -% endif - - -% if c.editor: -${c.manifest_pretty}
Embargo state: True - only those logged in and with edit rights can see item. False - Anyone can GET the item and it's files.
-Embargo date: Aim is for ISO8601 dates to provide embargo trigger events. Currently unused, unvalidated and unparsed.
-Editorial functions
+ + + + + + + + + + % if c.zipfiles: + + % endif +You are currently viewing the latest version (${c.version}) of the data package
+% elif c.version: +You are currently viewing version ${c.version} of the data package
+% elif c.versions: +You are currently viewing the latest version (${c.versions[-1]}) of the data package
+% else: +You are currently viewing the latest version of th data package
+% endif + +% if c.versions: +View other versions: + % for i in range(1, len(c.versions)-1): + % if c.version and c.versions[i] == c.version: + ${c.versions[i]} | + % else: + ${c.versions[i]} | + % endif + % endfor + % if c.version: + % if c.version == c.versions[-1]: + ${c.versions[-1]} + % else: + ${c.versions[-1]} + % endif + % else: + ${c.versions[-1]} + % endif +
+% endif +${c.manifest_pretty}
${c.manifest_pretty}
${c.message}
-% endif -% if c.resp_status: -Response code from Datacite: ${c.resp_status}
-% endif -% if c.resp_reason: -Response message from Datacite: ${c.resp_reason}
-% endif -DOIs available for this dataset
-DOI: ${c.version_doi}
-% endif - -% if c.editor: - <%include file="/create_doi.html"/> -% endif - -%if c.metadata: -Metadata associated with the DOI
-${c.metadata}-% endif - +# -*- coding: utf-8 -*- +<%inherit file="/base.html" /> +<%def name="head_tags()"> +
${c.message}
+% endif +% if c.resp_status: +Response code from Datacite: ${c.resp_status}
+% endif +% if c.resp_reason: +Response message from Datacite: ${c.resp_reason}
+% endif +DOIs available for this dataset
+DOI: ${c.version_doi}
+% endif + +% if c.editor: + <%include file="/create_doi.html"/> +% endif + +%if c.metadata: +Metadata associated with the DOI
+${c.metadata}+% endif + diff --git a/rdfdatabank/templates/embargo_form.html b/rdfdatabank/templates/embargo_form.html index e32d2b2..7b4c55b 100644 --- a/rdfdatabank/templates/embargo_form.html +++ b/rdfdatabank/templates/embargo_form.html @@ -1,27 +1,37 @@ -# -*- coding: utf-8 -*- - +# -*- coding: utf-8 -*- + diff --git a/rdfdatabank/templates/file_upload.html b/rdfdatabank/templates/file_upload.html index 89f25d4..3c5324a 100644 --- a/rdfdatabank/templates/file_upload.html +++ b/rdfdatabank/templates/file_upload.html @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- -
Add File to ${c.id}
-- diff --git a/rdfdatabank/templates/files_unpack.html b/rdfdatabank/templates/files_unpack.html index 7e57eb5..9430ea5 100644 --- a/rdfdatabank/templates/files_unpack.html +++ b/rdfdatabank/templates/files_unpack.html @@ -1,18 +1,20 @@ -# -*- coding: utf-8 -*- -% if c.zipfile: - -%endif +# -*- coding: utf-8 -*- +% if c.zipfile: + +%endif diff --git a/rdfdatabank/templates/files_unpack2.html b/rdfdatabank/templates/files_unpack2.html index a3798d5..799de04 100644 --- a/rdfdatabank/templates/files_unpack2.html +++ b/rdfdatabank/templates/files_unpack2.html @@ -1,12 +1,12 @@ -# -*- coding: utf-8 -*- -% if c.zipfile: - -%endif +# -*- coding: utf-8 -*- +% if c.zipfile: + +%endif diff --git a/rdfdatabank/templates/footer.html b/rdfdatabank/templates/footer.html index d3c2e9f..70b9c3c 100644 --- a/rdfdatabank/templates/footer.html +++ b/rdfdatabank/templates/footer.html @@ -1,3 +1,11 @@ -# -*- coding: utf-8 -*- -
Copyright resides with the noted authors/creators of the works held here, unless otherwise noted.
- +# -*- coding: utf-8 -*- + +Copyright resides with the noted authors/creators of the works held here, unless otherwise noted.
+ +The purpose of DataBank is to provide a pilot version of a robust and efficient system for the safe storage of and open access to (where appropriate) research data. Content could be described as data produced as a result of academic research.. Items might comprise files such as spreadsheets, databases, audio files and images (still and moving). Numerical or other data might be raw data or the data may have been manipulated or processed in some way.
- -DataBank is not intended to store large-scale data sets such as grid data or other vast data sets. Neither is it intended to replace national, subject or other established data collections. It is envisaged that the future role of DataBank will be to provide a secure and accessible store of small to medium-sized files which have no other option for similar safe storage.
- -Please note DataBank is a pilot system and still under development.
- -Users should adhere to the terms and conditions stated for each item.
- -The admin credentials used in this demo instance of Databank are
username: admin
Password: test
Data can be submitted into Databank by using the Databank API. The API provides a restful web interface to all of Databank's features. -
- - -Databank is written in Python. The Databank code is licensed under MIT and can be checked out from https://github.com/dataflow/RDFDatabank -
-For instructions on installing Databank, follow this document
- - Get in touch with the developers of Databank - -diff --git a/rdfdatabank/templates/home-prod.html b/rdfdatabank/templates/home-prod.html deleted file mode 100644 index 0c3a0cf..0000000 --- a/rdfdatabank/templates/home-prod.html +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file="/base.html" /> -<%def name="head_tags()"> -
Oxford DataBank is a small collection of non-bibliographic works created by Oxford researchers. The purpose of DataBank is to provide a pilot version of a robust and efficient system for the safe storage of and open access to (where appropriate) Oxford research data. Content could be described as .data produced as a result of academic research.. Items might comprise files such as spreadsheets, databases, audio files and images (still and moving). Numerical or other data might be raw data or the data may have been manipulated or processed in some way.
- -DataBank is not intended to store large-scale data sets such as grid data or other vast data sets. Neither is it intended to replace national, subject or other established data collections. It is envisaged that the future role of DataBank will be to provide a secure and accessible store of small to medium-sized files which have no other option for similar safe storage. The role of DataBank will be clarified as Oxford University works towards a solution for the storage of and access to its research data. Please note DataBank is a pilot system and still under development.
- -Users should adhere to the terms and conditions stated for each item.
- - diff --git a/rdfdatabank/templates/home.html b/rdfdatabank/templates/home.html index 9d9b580..976a170 100644 --- a/rdfdatabank/templates/home.html +++ b/rdfdatabank/templates/home.html @@ -1,53 +1,48 @@ -# -*- coding: utf-8 -*- -<%inherit file="/base.html" /> -<%def name="head_tags()"> -The purpose of DataBank is to provide a pilot version of a robust and efficient system for the safe storage of and open access to (where appropriate) research data. Content could be described as data produced as a result of academic research.. Items might comprise files such as spreadsheets, databases, audio files and images (still and moving). Numerical or other data might be raw data or the data may have been manipulated or processed in some way.
- -DataBank is not intended to store large-scale data sets such as grid data or other vast data sets. Neither is it intended to replace national, subject or other established data collections. It is envisaged that the future role of DataBank will be to provide a secure and accessible store of small to medium-sized files which have no other option for similar safe storage.
- -Please note DataBank is a pilot system and still under development.
- -Users should adhere to the terms and conditions stated for each item.
- -The admin credentials used in this demo instance of Databank are
username: admin
Password: test
Data can be submitted into Databank by using the Databank API. The API provides a restful web interface to all of Databank's features. -
- - -Databank is written in Python. The Databank code is licensed under MIT and can be checked out from https://github.com/dataflow/RDFDatabank -
-For instructions on installing Databank, follow this document
- - Get in touch with the developers of Databank - -+# -*- coding: utf-8 -*- +<%inherit file="/base.html" /> +<%def name="head_tags()"> +
Store, archive, publish and access your data from the web using Databank.
+DataBank has a simple restful api and uses a rdf-enhanced pair tree store which can be used by other data services to archive data in Databank, as is used by DataStage
+DataBank is a pilot system, still under devlopment.
+We are a part of the Dataflow project
+The admin credentials used in this demo instance of Databank are
username: admin
Password: test
Data can be submitted into Databank by using the Databank API. The API provides a restful web interface to all of Databank's features. +
+ +Databank is written in Python. The Databank code is licensed under MIT and can be checked out from https://github.com/dataflow/RDFDatabank +
+ +For instructions on installing Databank, follow this document
+ + Get in touch with the developers of Databank + diff --git a/rdfdatabank/templates/item_file_upload.html b/rdfdatabank/templates/item_file_upload.html index 6570d54..748f059 100644 --- a/rdfdatabank/templates/item_file_upload.html +++ b/rdfdatabank/templates/item_file_upload.html @@ -1,9 +1,10 @@ -# -*- coding: utf-8 -*- -Add File to ${c.id}/${c.path}
--
- +# -*- coding: utf-8 -*- + diff --git a/rdfdatabank/templates/items_api.html b/rdfdatabank/templates/items_api.html index 79691ec..7505239 100644 --- a/rdfdatabank/templates/items_api.html +++ b/rdfdatabank/templates/items_api.html @@ -1,160 +1,160 @@ -# -*- coding: utf-8 -*- -Sections
-API call to obtain a list of unpack end-points and unpack a zip file into a new / existing dataset
-Controller: items action: datasetview
-GET
-POST Unpack file. Create new dataset/update existing dataset with contents of upacked file
-filename | {name of file to be unpacked, including the path} |
Id | {(Optional)}. if Id is not supplied, the default dataset id for the new dataset will be {dataset_id}-{file_name} |
PUT, DELETE NOOP
-API call to read the contents of a zip-file (without having to unpack) and unpack a zip file into a new / existing dataset
-Controller: items action: itemview
-GET
-POST Unpack file. Create new dataset/update existing dataset with contents of upacked file
-filename | {name of file to be unpacked, including the path} |
Id | {(Optional)}. if Id is not supplied, the default dataset id for the new dataset will be {dataset_id}-{file_name} |
PUT, DELETE NOOP
-API call to retreive a file from the zip file
-Controller: items action: subitemview
-Sections
+API call to obtain a list of unpack end-points, read the contents of a zip-file (without unpacking) and unpack a zip file into a new / existing dataset
+Controller: items action: datasetview
+GET
+POST Unpack file. Create new dataset/update existing dataset with contents of upacked file
+filename | {name of file to be unpacked, including the path} |
Id | {(Optional)}. if Id is not supplied, the default dataset id for the new dataset will be {dataset_id}-{file_name} |
PUT, DELETE NOOP
+API call to read the contents of a zip-file (without having to unpack) and unpack a zip file into a new / existing dataset
+Controller: items action: itemview
+GET
+POST Unpack file. Create new dataset/update existing dataset with contents of upacked file
+filename | {name of file to be unpacked, including the path} |
Id | {(Optional)}. if Id is not supplied, the default dataset id for the new dataset will be {dataset_id}-{file_name} |
PUT, DELETE NOOP
+API call to retreive a file from the zip file
+Controller: items action: subitemview
+You do not have permission to view these files
- % endif -% else: -There are no files or folders in this path
-% endif -Editorial functions
+ + +You are currently viewing the latest version (${c.versions[-1]}) of the data package
+% elif c.version: +You are currently viewing version ${c.version} of the data package
+% elif c.versions: +You are currently viewing the latest version (${c.versions[-1]}) of the data package
+% else: +You are currently viewing the latest version of th data package
+% endif + +% if c.versions: +View other versions: + % for i in range(1, len(c.versions)-1): + % if c.version and c.versions[i] == c.version: + ${c.versions[i]} | + % else: + ${c.versions[i]} | + % endif + % endfor + % if c.version: + % if c.version == c.versions[-1]: + ${c.versions[-1]} + % else: + ${c.versions[-1]} + % endif + % else: + ${c.versions[-1]} + % endif +
+% endif +You do not have permission to view these files
+ % endif +There are no files or folders in this path
+% endif +List of keywords in the site goes here...
diff --git a/rdfdatabank/templates/list_of_datasets.html b/rdfdatabank/templates/list_of_datasets.html index e28b1b1..6c17a94 100644 --- a/rdfdatabank/templates/list_of_datasets.html +++ b/rdfdatabank/templates/list_of_datasets.html @@ -1,22 +1,35 @@ -# -*- coding: utf-8 -*- -% if c.silo_name: -Number of Datasets: ${n}
-% for item in sorted(c.items): -Number of Datasets: ${n}
+% if n > 0: ++ | +% if c.embargos and item in c.embargos and c.embargos[item]: + <% c.emb = c.embargos[item] %> + % if c.emb[0] == True or c.emb[0] == 1 or (isinstance(c.emb[0], basestring) and c.emb[0].strip().lower() in ['true', '1']): + % if (isinstance(c.emb[1], basestring) and c.emb[1].strip()): + Data package is embargoed until ${c.emb[1]} + % else: + Data package is embargoed indefinitely + % endif + % else: + Data package is openly accessible + % endif +% else: + Data package is openly accessible +% endif + | +
Number of silos: ${n}
- -% endif +# -*- coding: utf-8 -*- +<%inherit file="/base.html" /> +<%def name="head_tags()"> +Number of silos: ${n}
+${session.get('login_flash') | n}
-
- <% - del session['login_flash'] - session.save() - %> - % endif -%def> - -<%inherit file="/base.html" /> -
-
${session.get('login_flash') | n}
+
+ <% + del session['login_flash'] + session.save() + %> + % endif +%def> + +<%inherit file="/base.html" /> +
+
+ diff --git a/rdfdatabank/templates/logout.html b/rdfdatabank/templates/logout.html index 70a68ff..7b71542 100644 --- a/rdfdatabank/templates/logout.html +++ b/rdfdatabank/templates/logout.html @@ -1,14 +1,14 @@ -# -*- coding: utf-8 -*- -<%def name="head_tags()"> --% if c.message: -
You have successfully logged out.
-To login again click here
-- +# -*- coding: utf-8 -*- +<%def name="head_tags()"> +
+% if c.message: +
You have successfully logged out.
+To login again click here
++ diff --git a/rdfdatabank/templates/part_list.html b/rdfdatabank/templates/part_list.html index 57bcebc..df7b85e 100644 --- a/rdfdatabank/templates/part_list.html +++ b/rdfdatabank/templates/part_list.html @@ -1,35 +1,39 @@ -% if c.parts: -
Title |
+ % for v in c.metadata['title']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
Identifier(s) |
+ % for v in c.metadata['identifier']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
description |
+ % for v in c.metadata['description']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
creator |
+ % for v in c.metadata['creator']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
subject |
+ % for v in c.metadata['subject']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
abstract |
+ % for v in c.metadata['abstract']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
created |
+ % for v in c.metadata['created']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
Has version |
+ % for v in c.metadata['hasVersion']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
is Version of |
+ % for v in c.metadata['isVersionOf']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
license |
+ % for v in c.metadata['license']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
mediator |
+ % for v in c.metadata['mediator']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
modified |
+ % for v in c.metadata['modified']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
publisher |
+ % for v in c.metadata['publisher']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
rights |
+ % for v in c.metadata['rights']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
Is embargoed |
+ % for v in c.metadata['isEmbargoed']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
embargoed Until |
+ % for v in c.metadata['embargoedUntil']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
current Version |
+ % for v in c.metadata['currentVersion']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
doi |
+ % for v in c.metadata['doi']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
aggregates |
+ % for v in c.metadata['aggregates']:
+ % if isinstance(v, URIRef):
+ ${v} + % else: + ${v} + % endif + % endfor + |
-
- +# -*- coding: utf-8 -*- +-${c.readme_text} --
+${c.readme_text} ++
Create new user
--
- +# -*- coding: utf-8 -*- ++
+ diff --git a/rdfdatabank/templates/search.html b/rdfdatabank/templates/search.html index 49cfe76..0da2436 100644 --- a/rdfdatabank/templates/search.html +++ b/rdfdatabank/templates/search.html @@ -1,168 +1,168 @@ -# -*- coding: utf-8 -*- -<%inherit file="/base.html" /> - -<%def name="head_tags()"> --% if c.q and c.q != "*:*": - -% endif - | -Text : ${c.q |n} | -
- - | -Search within : ${c.types[c.typ] |n} | -
- - | -${c.field_names[facet]|n} : ${ item |n} | -
+% if c.q and c.q != "*:*": + +% endif + | +Text : ${c.q |n} | +
+ + | +Search within : ${c.types[c.typ] |n} | +
+ + | +${c.field_names[facet]|n} : ${ item |n} | +
Search interface goes here...
\ No newline at end of file diff --git a/rdfdatabank/templates/silo_admin.html b/rdfdatabank/templates/silo_admin.html index 8a3029f..369c352 100644 --- a/rdfdatabank/templates/silo_admin.html +++ b/rdfdatabank/templates/silo_admin.html @@ -1,15 +1,15 @@ -# -*- coding: utf-8 -*- -<%inherit file="/base.html" /> -<%def name="head_tags()"> -Silo Metadata
--
- +# -*- coding: utf-8 -*- ++
+ diff --git a/rdfdatabank/templates/siloview.html b/rdfdatabank/templates/siloview.html index ee9e945..b64417b 100644 --- a/rdfdatabank/templates/siloview.html +++ b/rdfdatabank/templates/siloview.html @@ -1,15 +1,15 @@ -# -*- coding: utf-8 -*- -<%inherit file="/base.html" /> -<%def name="head_tags()"> -Update user information
-- -
- +# -*- coding: utf-8 -*- ++ +
+ diff --git a/rdfdatabank/templates/zipfilesubitemview.html b/rdfdatabank/templates/zipfilesubitemview.html index 2e1ee5f..208574b 100644 --- a/rdfdatabank/templates/zipfilesubitemview.html +++ b/rdfdatabank/templates/zipfilesubitemview.html @@ -1,9 +1,9 @@ -# -*- coding: utf-8 -*- -<%inherit file="/base.html" /> -<%def name="head_tags()"> -TO BE DONE
-% endif +# -*- coding: utf-8 -*- +<%inherit file="/base.html" /> +<%def name="head_tags()"> +TO BE DONE
+% endif diff --git a/rdfdatabank/templates/zipfileview.html b/rdfdatabank/templates/zipfileview.html index bc2453f..3c4ce86 100644 --- a/rdfdatabank/templates/zipfileview.html +++ b/rdfdatabank/templates/zipfileview.html @@ -1,19 +1,19 @@ -# -*- coding: utf-8 -*- -<%inherit file="/base.html" /> -<%def name="head_tags()"> -${zf} ( ${h.bytes_to_english(c.zipfile_contents[zf][0])} )
-There are no contents avaialble
- % endif -% endif +# -*- coding: utf-8 -*- +<%inherit file="/base.html" /> +<%def name="head_tags()"> +${zf} ( ${h.bytes_to_english(c.zipfile_contents[zf][0])} )
+There are no contents avaialble
+ % endif +% endif diff --git a/rdfdatabank/tests/RDFDatabankConfig-Jenkins.py b/rdfdatabank/tests/RDFDatabankConfig-Jenkins.py index 38d9841..7e9be8a 100644 --- a/rdfdatabank/tests/RDFDatabankConfig-Jenkins.py +++ b/rdfdatabank/tests/RDFDatabankConfig-Jenkins.py @@ -1,25 +1,49 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# $Id: $ """ -Define configuration for RDFDatabank testing +Copyright (c) 2012 University of Oxford + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, --INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" -$Rev: $ +""" +Define configuration for RDFDatabank testing """ class RDFDatabankConfig: granary_uri_root="http://dataflow-jenkins.bodleian.ox.ac.uk" - - # Access to local test VM + + # Access to local VM endpointhost="localhost:5000" - #endpointpath="/sandbox/" - endpointpath="/test/" - endpointpath2="/test2/" + endpointpath="/sandbox/" + endpointpath2="/sandbox2/" + # Access credentials for testing from local dev VM as user endpointuser="sandbox_user" endpointpass="sandbox" + + # Access credentials for testing from local dev VM as admin + #endpointadminuser="admin" + #endpointadminpass="test" #Admin1 of silo1 endpointadminuser="admin" @@ -53,6 +77,6 @@ class RDFDatabankConfig: #Access credentials for generic user endpointgeneraluser = "" - endpointgeneralpass = "" + endpointgeneralpass = "" # End. diff --git a/rdfdatabank/tests/RDFDatabankConfig.py b/rdfdatabank/tests/RDFDatabankConfig.py index 6134a43..1d6c5e9 100644 --- a/rdfdatabank/tests/RDFDatabankConfig.py +++ b/rdfdatabank/tests/RDFDatabankConfig.py @@ -1,11 +1,30 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +""" +Copyright (c) 2012 University of Oxford + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -# $Id: $ +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, --INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -Define configuration for RDFDatabank testing -$Rev: $ +""" +Define configuration for RDFDatabank testing """ class RDFDatabankConfig: @@ -14,8 +33,8 @@ class RDFDatabankConfig: # Access via IP address endpointhost="localhost" - endpointpath="/test/" - endpointpath2="/test2/" + endpointpath="/sandbox/" + endpointpath2="/sandbox2/" endpointuser="sandbox_user" endpointpass="sandbox" @@ -52,6 +71,8 @@ class RDFDatabankConfig: #Access credentials for generic user endpointgeneraluser = "" - endpointgeneralpass = "" + endpointgeneralpass = "" + + # Later, may define methods to override these defaults, e.g. from a configuration file # End. diff --git a/rdfdatabank/tests/TestAdmin.py b/rdfdatabank/tests/TestAdmin.py index fb06fe3..88e03aa 100644 --- a/rdfdatabank/tests/TestAdmin.py +++ b/rdfdatabank/tests/TestAdmin.py @@ -1,11 +1,32 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# $Id: $ """ -Databank submission test cases +Copyright (c) 2012 University of Oxford + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, --INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" -$Rev: $ """ +Databank submission test cases +""" + import os, os.path from datetime import datetime, timedelta import sys diff --git a/rdfdatabank/tests/TestSubmission.py b/rdfdatabank/tests/TestSubmission.py index 8a2750c..6b3128f 100644 --- a/rdfdatabank/tests/TestSubmission.py +++ b/rdfdatabank/tests/TestSubmission.py @@ -1,12 +1,32 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +""" +Copyright (c) 2012 University of Oxford + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -# $Id: $ +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, --INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -Databank submission test cases -$Rev: $ """ +Databank submission test cases +""" + import os, os.path from datetime import datetime, timedelta from dateutil.relativedelta import * diff --git a/rdfdatabank/tests/TestSubmission_load.py b/rdfdatabank/tests/TestSubmission_load.py index 5a9b726..5f9832d 100644 --- a/rdfdatabank/tests/TestSubmission_load.py +++ b/rdfdatabank/tests/TestSubmission_load.py @@ -1,12 +1,32 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +""" +Copyright (c) 2012 University of Oxford + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -# $Id: $ +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, --INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -Databank submission test cases -$Rev: $ """ +Databank submission test cases +""" + import os, os.path from datetime import datetime, timedelta from time import sleep diff --git a/rdfdatabank/tests/TestSubmission_submitter.py b/rdfdatabank/tests/TestSubmission_submitter.py index 0087dcd..c89a5c3 100644 --- a/rdfdatabank/tests/TestSubmission_submitter.py +++ b/rdfdatabank/tests/TestSubmission_submitter.py @@ -1,12 +1,31 @@ #!/usr/bin/python -# $Id: $ # -*- coding: utf-8 -*- +""" +Copyright (c) 2012 University of Oxford + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, --INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" """ Databank submission test cases for user with role submitter. These tests are for a databank instance with visible metadata - -$Rev: $ """ import os, os.path import datetime diff --git a/rdfdatabank/tests/rdflib3/__init__.py b/rdfdatabank/tests/rdflib3/__init__.py deleted file mode 100644 index 4f48f18..0000000 --- a/rdfdatabank/tests/rdflib3/__init__.py +++ /dev/null @@ -1,76 +0,0 @@ -"""\ -A pure Python package providing the core RDF constructs. - -The packages is intended to provide the core RDF types and interfaces -for working with RDF. The package defines a plugin interface for -parsers, stores, and serializers that other packages can use to -implement parsers, stores, and serializers that will plug into the -rdflib package. - -The primary interface `rdflib` exposes to work with RDF is -`rdflib.graph.Graph`. - -A tiny example: - - >>> import rdflib - - >>> g = rdflib.Graph() - >>> result = g.parse("http://eikeon.com/foaf.rdf") - - >>> print "graph has %s statements." % len(g) - graph has 34 statements. - >>> - >>> for s, p, o in g: - ... if (s, p, o) not in g: - ... raise Exception("It better be!") - - >>> s = g.serialize(format='n3') - -""" -__docformat__ = "restructuredtext en" - -__version__ = "3.0.0" -__date__ = "2010/05/13" - -__all__ = [ - 'URIRef', - 'BNode', - 'Literal', - 'Variable', - - 'Namespace', - - 'Graph', - 'ConjunctiveGraph', - - 'RDF', - 'RDFS', - 'OWL', - 'XSD', - - 'util', - ] - -import sys -# generator expressions require 2.4 -assert sys.version_info >= (2, 4, 0), "rdflib requires Python 2.4 or higher" -del sys - -import logging -_LOGGER = logging.getLogger("rdflib") -_LOGGER.info("version: %s" % __version__) - - -from rdflib.term import URIRef, BNode, Literal, Variable - -from rdflib.namespace import Namespace - -from rdflib.graph import Graph, ConjunctiveGraph - -from rdflib.namespace import RDF, RDFS, OWL, XSD - -from rdflib import plugin -from rdflib import query - -from rdflib import util - diff --git a/rdfdatabank/tests/rdflib3/collection.py b/rdfdatabank/tests/rdflib3/collection.py deleted file mode 100644 index 94693a3..0000000 --- a/rdfdatabank/tests/rdflib3/collection.py +++ /dev/null @@ -1,258 +0,0 @@ -from rdflib.namespace import RDF -from rdflib.term import BNode -from rdflib.term import Literal -from rdflib.graph import Graph - -class Collection(object): - """ - See 3.3.5 Emulating container types: http://docs.python.org/ref/sequence-types.html#l2h-232 - - >>> from rdflib.graph import Graph - >>> listName = BNode() - >>> g = Graph('IOMemory') - >>> listItem1 = BNode() - >>> listItem2 = BNode() - >>> g.add((listName,RDF.first,Literal(1))) - >>> g.add((listName,RDF.rest,listItem1)) - >>> g.add((listItem1,RDF.first,Literal(2))) - >>> g.add((listItem1,RDF.rest,listItem2)) - >>> g.add((listItem2,RDF.rest,RDF.nil)) - >>> g.add((listItem2,RDF.first,Literal(3))) - >>> c=Collection(g,listName) - >>> print list(c) - [rdflib.term.Literal(u'1', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#integer')), rdflib.term.Literal(u'2', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#integer')), rdflib.term.Literal(u'3', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#integer'))] - >>> 1 in c - True - >>> len(c) - 3 - >>> c._get_container(1) == listItem1 - True - >>> c.index(Literal(2)) == 1 - True - """ - def __init__(self, graph, uri, seq=[]): - self.graph = graph - self.uri = uri or BNode() - for item in seq: - self.append(item) - - def n3(self): - """ - >>> from rdflib.graph import Graph - >>> listName = BNode() - >>> g = Graph('IOMemory') - >>> listItem1 = BNode() - >>> listItem2 = BNode() - >>> g.add((listName,RDF.first,Literal(1))) - >>> g.add((listName,RDF.rest,listItem1)) - >>> g.add((listItem1,RDF.first,Literal(2))) - >>> g.add((listItem1,RDF.rest,listItem2)) - >>> g.add((listItem2,RDF.rest,RDF.nil)) - >>> g.add((listItem2,RDF.first,Literal(3))) - >>> c=Collection(g,listName) - >>> print c.n3() - ( "1"^^