Permalink
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
2 parents a0de214 + 7f77bef commit adb462994be60756b8d80b53761c5658427d31de @tdonohue tdonohue committed Aug 27, 2012
Showing 333 changed files with 18,486 additions and 6,244 deletions.
View
@@ -1,6 +1,11 @@
## Ignore the MVN compiled output directories from version tracking
target/
+## Ignore project files created by Eclipse
+.settings/
+.project
+.classpath
+
## Ignore project files created by IntelliJ IDEA
*.iml
*.ipr
@@ -15,4 +20,4 @@ dist/
nbdist/
nbactions.xml
nb-configuration.xml
-META-INF/
+META-INF/
View
@@ -34,7 +34,7 @@ DAMAGE.
DSpace uses third-party libraries which may be distributed under
-different licenses to the above. These licenses are located in
-the lib/licenses directory. You must agree to the terms of these
-licenses, in addition to the above DSpace source code license, in
-order to use this software.
+different licenses to the above. Information about these licenses
+is detailed in the LICENSES_THIRD_PARTY file at the root of the source
+tree. You must agree to the terms of these licenses, in addition to
+the above DSpace source code license, in order to use this software.
View
@@ -0,0 +1,108 @@
+DSpace uses third-party libraries which may be distributed under different
+licenses. We have attempted to list all of these third party libraries and
+their licenses below (however the most up-to-date information can be found
+via Maven, see NOTE #2 at bottom of this page).
+
+You must agree to the terms of these licenses, in addition to the DSpace
+source code license, in order to use this software.
+
+--------------------------------------------------
+Third party Java libraries listed by License type
+[Format: Name (Maven Project) - URL]
+--------------------------------------------------
+
+Apache Software License, Version 2.0 (http://opensource.org/licenses/apache2.0)
+ * Ant-Contrib Tasks (ant-contrib:*) - http://ant-contrib.sourceforge.net/
+ * Apache Abdera (org.apache.abdera::*) - http://projects.apache.org/projects/abdera.html
+ * Apache Ant (org.apache.ant:*) - http://ant.apache.org/
+ * Apache Axis (axis:*) - http://axis.apache.org/axis/
+ * Apache Cocoon (org.apache.cocoon:*) - http://cocoon.apache.org/2.2/license.html
+ * Apache Commons CLI (commons-cli:*) - http://commons.apache.org/cli/license.html
+ * Apache Commons Codec (commons-codec:*) - http://commons.apache.org/codec/license.html
+ * Apache Commons Collections (commons-collections:*) - http://commons.apache.org/collections/license.html
+ * Apache Commons DBCP (commons-dbcp:*) - http://commons.apache.org/dbcp/license.html
+ * Apache Commons Discovery (commons-discovery:*) - http://commons.apache.org/discovery/license.html
+ * Apache Commons FileUpload (commons-fileupload:*) - http://commons.apache.org/fileupload/license.html
+ * Apache Commons HTTP Client (commons-httpclient:*) - http://commons.apache.org/httpclient/license.html
+ * Apache Commons IO (commons-io:*) - http://commons.apache.org/io/license.html
+ * Apache Commons JXPath (commons-jxpath:*) - http://commons.apache.org/jxpath/license.html
+ * Apache Commons Lang (commons-lang:*) - http://commons.apache.org/lang/license.html
+ * Apache Commons Logging (commons-logging:*) - http://commons.apache.org/logging/license.html
+ * Apache Commons Pool (commons-pool:*) - http://commons.apache.org/pool/license.html
+ * Apache Commons Validator (commons-validator:*) - http://commons.apache.org/validator/license.html
+ * Apache Jakarta ORO (oro:*) - http://svn.apache.org/repos/asf/jakarta/oro/trunk/LICENSE
+ * Apache log4j (log4j:*) : http://logging.apache.org/log4j/
+ * Apache Lucene (org.apache.lucene:*) - http://lucene.apache.org/
+ * Apache PDFBox (org.apache.pdfbox:*) - http://pdfbox.apache.org/
+ * Apache POI (org.apache.poi:*) - http://poi.apache.org/
+ * Apache Solr (org.apache.solr:*) - http://lucene.apache.org/solr/
+ * Apache Xerces (xerces:*) - http://xerces.apache.org/
+ * Apache XML Commons (xml-apis:*) - http://xerces.apache.org/xml-commons/licenses.html
+ * Apache XML Project (xalan:*) - http://xml.apache.org/xalan-j/#license
+ * Databene ContiPerf (org.databene:contiperf) - http://databene.org/contiperf
+ * Rome (net.java.dev.rome:*, org.rometools:*, rome:*) - http://rometools.org/
+ * Spring Framework (org.springframework:*) - http://www.springsource.org/spring-framework
+ * SWORD Libraries (org.swordapp:*) - http://mvnrepository.com/artifact/org.swordapp/server/2.0
+
+BSD License (http://www.opensource.org/licenses/BSD-3-Clause)
+ * DNSJava (org.dspace.dnsjava:dnsjava)- http://www.xbill.org/dnsjava/dnsjava-current/README
+ * Foresite Toolkit (com.googlecode.foresite-toolkit:*) - http://code.google.com/p/foresite-toolkit/
+ * Jaxen (jaxen:*) - http://jaxen.codehaus.org/license.html
+ * YUI (com.yahoo.platform.yui:*) - http://yuilibrary.com/license/
+
+Common Development and Distribution License (CDDL) v1.0 (http://www.opensource.org/licenses/CDDL-1.0)
+ * JavaBeans Activation Framework (javax.activation:*) - http://www.opensource.org/licenses/CDDL-1.0
+ * Java Mail (javax.mail:*) - http://www.opensource.org/licenses/CDDL-1.0
+ * JAX-RPC (javax.xml:jaxrpc-api) - http://java.net/projects/jax-rpc/
+
+Common Public License v1.0 (http://www.opensource.org/licenses/cpl1.0)
+ * JUnit (junit:*) - http://junit.org/license
+ * WSDL4J (wsdl4j:*) - http://sourceforge.net/projects/wsdl4j/
+
+Lesser GPL (http://www.opensource.org/licenses/LGPL-2.1)
+ * Text-mining (org.dspace.dependencies:dspace-tm-extractors) - http://code.google.com/p/text-mining/
+ * MaxMind GeoIP (org.dspace.dependencies:dspace-geoip) - http://geoip.cvs.sourceforge.net/viewvc/geoip/java/LICENSE
+
+MIT / X11 License (or adaptations) (http://www.opensource.org/licenses/MIT)
+ * Bouncy Castle (org.bouncycastle:*) - http://www.bouncycastle.org/licence.html
+ * jmockit (org.dspace.dependencies.jmockit:dspace-jmockit) - http://code.google.com/p/jmockit/
+ * SLF4J (org.slf4j:*) - http://www.slf4j.org/license.html
+
+Mozilla Public License (http://www.opensource.org/licenses/MPL-2.0)
+ * H2 database (com.h2database:*) - http://www.h2database.com/html/license.html
+
+Other Open Source Licenses:
+ * ICU4J (com.ibm.icu:icu4j) - ICU License : http://source.icu-project.org/repos/icu/icu/trunk/license.html
+ * JDOM (jdom:*) - JDOM License : https://github.com/hunterhacker/jdom/blob/master/LICENSE.txt
+ * PostgreSQL (postgresql:*) - PostgreSQL License (BSD-based): http://www.postgresql.org/about/licence/
+
+----
+NOTE #1: Some individual web application files in DSpace (e.g. Javascript
+libraries, CSS Frameworks) may have their own open source license. In that
+scenario, we place a copy of the full text of the license alongside the
+licensed files. You can locate these additional licenses in our codebase
+by searching for files with a ".LICENSE" file extension.
+----
+
+----
+NOTE #2: Although we try to keep this libraries list current, the latest
+information about DSpace third party libraries can be found by running the
+following Maven command(s):
+
+mvn project-info-reports:dependencies
+
+This generates a "[project]/target/site/dependencies.html" report under every
+DSpace project directory. This report lists all dependencies and their license
+(if it can be determined by Maven).
+
+Additionally, you may wish to run:
+
+mvn project-info-reports:dependancy-convergence
+
+This generates a summary report at
+"[dspace]/target/site/dependancy-convergence.html" which lists all dependencies
+of all DSpace projects (though it does not list license information)
+
+For more information see the maven-project-info-reports-plugin:
+http://maven.apache.org/plugins/maven-project-info-reports-plugin/
+----
View
6 README
@@ -3,12 +3,12 @@ Installation instructions are included in this release package under
- dspace/docs/DSpace-Manual.pdf
DSpace version information can be viewed online at
- - https://wiki.duraspace.org/display/DSDOC/History
+ - https://wiki.duraspace.org/display/DSDOC/
Documentation for the most recent stable release(s) may be downloaded
or viewed online at
- http://www.dspace.org/latest-release/
- - http://wiki.duraspace.org/display/DSDOC/
+ - https://wiki.duraspace.org/display/DSDOC/
In addition, a listing of all known contributors to DSpace software can be
found online at:
@@ -51,4 +51,4 @@ places to seek help, news articles and lists of other users, please see:
DSpace source code licensing information available online at:
- http://www.dspace.org/license/
-Copyright (c) 2002-2011, DuraSpace. All rights reserved.
+Copyright (c) 2002-2012, DuraSpace. All rights reserved.
View
@@ -0,0 +1,137 @@
+# DSpace build.properties
+# This file should be customised to suit your build environment.
+# Note that not all configuration is handled here, only the most common properties that tend to differ between build environments.
+# For adjusting global settings or more complex settings, edit the relevant config file.
+
+##########################
+# SERVER CONFIGURATION #
+##########################
+
+# DSpace installation directory. Data will be stored within this directory
+dspace.dir=/dspace
+
+# DSpace host name - should match base URL. Do not include port number
+dspace.hostname = localhost
+
+# DSpace base host URL. Include port number etc.
+dspace.baseUrl = http://localhost:8080
+
+# Name of the site
+dspace.name = DSpace at My University
+
+# Solr server
+solr.server=http://localhost:8080/solr
+
+# Default language for metadata values
+default.language = en_US
+
+##########################
+# DATABASE CONFIGURATION #
+##########################
+
+# Database name ("oracle", or "postgres")
+db.name=postgres
+
+# Uncomment the appropriate block below for your database.
+# postgres
+db.driver=org.postgresql.Driver
+db.url=jdbc:postgresql://localhost:5432/dspace
+db.username=dspace
+db.password=dspace
+
+# oracle
+#db.driver= oracle.jdbc.OracleDriver
+#db.url=jdbc:oracle:thin:@//localhost:1521/xe
+#db.username=dspace
+#db.password=dspace
+
+# Schema name - if your database contains multiple schemas, you can avoid problems with
+# retrieving the definitions of duplicate object names by specifying
+# the schema name here that is used for DSpace by uncommenting the following entry
+db.schema =
+
+# Maximum number of DB connections in pool
+db.maxconnections = 30
+
+# Maximum time to wait before giving up if all connections in pool are busy (milliseconds)
+db.maxwait = 5000
+
+# Maximum number of idle connections in pool (-1 = unlimited)
+db.maxidle = -1
+
+# Determine if prepared statement should be cached. (default is true)
+db.statementpool = true
+
+# Specify a name for the connection pool (useful if you have multiple applications sharing Tomcat's dbcp)
+# If not specified, defaults to 'dspacepool'
+db.poolname = dspacepool
+
+#######################
+# EMAIL CONFIGURATION #
+#######################
+
+# SMTP mail server
+mail.server = smtp.example.com
+
+# SMTP mail server authentication username and password (if required)
+# mail.server.username = myusername
+# mail.server.password = mypassword
+mail.server.username=
+mail.server.password=
+
+# SMTP mail server alternate port (defaults to 25)
+mail.server.port = 25
+
+# From address for mail
+mail.from.address = dspace-noreply@myu.edu
+
+# Currently limited to one recipient!
+mail.feedback.recipient = dspace-help@myu.edu
+
+# General site administration (Webmaster) e-mail
+mail.admin = dspace-help@myu.edu
+
+# Recipient for server errors and alerts
+#mail.alert.recipient = email-address-here
+mail.alert.recipient=
+
+# Recipient for new user registration emails
+#mail.registration.notify = email-address-here
+mail.registration.notify=
+
+
+########################
+# HANDLE CONFIGURATION #
+########################
+
+# Canonical Handle URL prefix
+#
+# By default, DSpace is configured to use http://hdl.handle.net/
+# as the canonical URL prefix when generating dc.identifier.uri
+# during submission, and in the 'identifier' displayed in JSPUI
+# item record pages.
+#
+# If you do not subscribe to CNRI's handle service, you can change this
+# to match the persistent URL service you use, or you can force DSpace
+# to use your site's URL, eg.
+#handle.canonical.prefix = ${dspace.url}/handle/
+#
+# Note that this will not alter dc.identifer.uri metadata for existing
+# items (only for subsequent submissions), but it will alter the URL
+# in JSPUI's 'identifier' message on item record pages for existing items.
+#
+# If omitted, the canonical URL prefix will be http://hdl.handle.net/
+handle.canonical.prefix = http://hdl.handle.net/
+
+# CNRI Handle prefix
+handle.prefix = 123456789
+
+#######################
+# PROXY CONFIGURATION #
+#######################
+# uncomment and specify both properties if proxy server required
+# proxy server for external http requests - use regular hostname without port number
+http.proxy.host =
+
+# port number of proxy server
+http.proxy.port =
View
@@ -91,7 +91,7 @@
</part>
</parts>
<properties>
- <default.dspace.dir>${project.build.directory}/testing/dspace</default.dspace.dir>
+ <dspace.dir>${project.build.directory}/testing/dspace</dspace.dir>
</properties>
</output>
</outputs>
@@ -111,6 +111,7 @@
<configuration>
<systemPropertyVariables>
<dspace.dir>${project.build.directory}/testing/dspace</dspace.dir>
+ <dspace.dir.static>${basedir}/src/test/data/dspaceFolder</dspace.dir.static>
<dspace.configuration>${project.build.directory}/testing/dspace.cfg.woven</dspace.configuration>
<db.schema.path>${project.build.directory}/testing/dspace/etc/h2/database_schema.sql</db.schema.path>
<dspace.log.init.disable>true</dspace.log.init.disable>
No changes.
@@ -7,6 +7,7 @@
*/
package org.dspace.app.util;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -65,6 +66,9 @@
/** is the entry closed to vocabulary terms? */
private boolean closedVocabulary = false;
+ /** allowed document types */
+ private List<String> typeBind = null;
+
/**
* The scope of the input sets, this restricts hidden metadata fields from
* view during workflow processing.
@@ -118,6 +122,17 @@ public DCInput(Map<String, String> fieldMap, Map<String, List<String>> listMap)
String closedVocabularyStr = fieldMap.get("closedVocabulary");
closedVocabulary = "true".equalsIgnoreCase(closedVocabularyStr)
|| "yes".equalsIgnoreCase(closedVocabularyStr);
+
+ // parsing of the <type-bind> element (using the colon as split separator)
+ typeBind = new ArrayList<String>();
+ String typeBindDef = fieldMap.get("type-bind");
+ if(typeBindDef != null && typeBindDef.trim().length() > 0) {
+ String[] types = typeBindDef.split(",");
+ for(String type : types) {
+ typeBind.add( type.trim() );
+ }
+ }
+
}
/**
@@ -376,4 +391,16 @@ public boolean isClosedVocabulary() {
return closedVocabulary;
}
+ /**
+ * Decides if this field is valid for the document type
+ * @param typeName Document type name
+ * @return true when there is no type restriction or typeName is allowed
+ */
+ public boolean isAllowedFor(String typeName) {
+ if(typeBind.size() == 0)
+ return true;
+
+ return typeBind.contains(typeName);
+ }
+
}
Oops, something went wrong.

0 comments on commit adb4629

Please sign in to comment.