diff --git a/lib/agrovoc_ws.jar b/lib/agrovoc_ws.jar
deleted file mode 100644
index d8eb97b0..00000000
Binary files a/lib/agrovoc_ws.jar and /dev/null differ
diff --git a/lib/agrovocws-3.0.jar b/lib/agrovocws-3.0.jar
new file mode 100644
index 00000000..5581be71
Binary files /dev/null and b/lib/agrovocws-3.0.jar differ
diff --git a/lib/commons-beanutils.jar b/lib/commons-beanutils.jar
deleted file mode 100644
index b1b89c9c..00000000
Binary files a/lib/commons-beanutils.jar and /dev/null differ
diff --git a/lib/ehcache-spring-annotations-1.1.3.jar b/lib/ehcache-spring-annotations-1.1.3.jar
new file mode 100644
index 00000000..be81cf7f
Binary files /dev/null and b/lib/ehcache-spring-annotations-1.1.3.jar differ
diff --git a/lib/ezmorph-1.0.4.jar b/lib/ezmorph-1.0.4.jar
deleted file mode 100644
index 7625af67..00000000
Binary files a/lib/ezmorph-1.0.4.jar and /dev/null differ
diff --git a/lib/htmlparser.jar b/lib/htmlparser.jar
new file mode 100644
index 00000000..fad7a207
Binary files /dev/null and b/lib/htmlparser.jar differ
diff --git a/lib/json-lib-2.2.2-jdk15.jar b/lib/json-lib-2.2.2-jdk15.jar
deleted file mode 100644
index 27e7c7cc..00000000
Binary files a/lib/json-lib-2.2.2-jdk15.jar and /dev/null differ
diff --git a/lib/owlapi-bin.jar b/lib/owlapi-bin.jar
new file mode 100644
index 00000000..17ce372e
Binary files /dev/null and b/lib/owlapi-bin.jar differ
diff --git a/lib/skosapi-3-bin.jar b/lib/skosapi-3-bin.jar
new file mode 100644
index 00000000..8a484059
Binary files /dev/null and b/lib/skosapi-3-bin.jar differ
diff --git a/olddeploy.properties b/olddeploy.properties
new file mode 100644
index 00000000..f4c7ed7d
--- /dev/null
+++ b/olddeploy.properties
@@ -0,0 +1,162 @@
+# -----------------------------------------------------------------------------
+#
+# VIVO deployment properties
+#
+# This file is provided as example.deploy.properties.
+#
+# Save a copy of this file as deploy.properties, and edit the properties as
+# needed for your deployment.
+#
+# -----------------------------------------------------------------------------
+
+#
+# This namespace will be used when generating URIs for objects created in the
+# editor. Change it to reflect your own domain. For example, Cornell's
+# namespace is http://vivo.cornell.edu/individual/
+#
+# Note: it is essential that this namespace end with a trailing slash.
+#
+Vitro.defaultNamespace = http://vivo.mannlib.cornell.edu/individual/
+
+#
+# Where is the Vitro core directory?
+# In most deployments, this is set to ./vitro-core (It is not uncommon for this
+# setting to point elsewhere in development environments).
+# Examples:
+# vitro.core.dir = ./vitro-core
+# vitro.core.dir = ../vitro
+# vitro.core.dir = /usr/local/vitro/trunk
+vitro.core.dir = ../vivovitro
+
+#
+# The base install directory for your Tomcat server. The VIVO application
+# will be deployed in the /webapps directory below this base.
+#
+tomcat.home = C:/apache/apache-tomcat-7.0.40
+
+#
+# The name of the VIVO application. This will be used as the name of the
+# subdirectory within your Tomcat server's /webapps directory. It also appears
+# in the URL for the application. For example, http://my.vivo.server/vivo
+#
+webapp.name = vivo
+
+#
+# The location where the VIVO application will store the data that it creates.
+# This includes uploaded files (usually images) and the Lucene search index.
+#
+vitro.home.directory = C:/Users/hjk54/vivodata
+
+#
+# SMTP host which the "Contact Us" form can use to send mail. If this is left
+# empty, the "Contact Us" form will be disabled.
+#
+Vitro.smtpHost =appsmtp.mail.cornell.edu
+#Added these per Jim's instructions, TO DO: try without smtpHost line
+email.smtpHost = appsmtp.mail.cornell.edu
+email.replyTo = hjk54@cornell.edu
+
+#
+# The basic parameters for a database connection. Change the end of the
+# URL to reflect your database name (if it is not "vitro"). Change the username
+# and password to match the authorized database user you created. Increase the
+# maximum size of the database connection pool if you need to serve a greater
+# number of concurrent page requests.
+#
+#Test Empty database
+#VitroConnection.DataSource.url = jdbc:mysql://localhost/testvivo
+
+VitroConnection.DataSource.url = jdbc:mysql://localhost/vivodb
+VitroConnection.DataSource.username = vivouser
+VitroConnection.DataSource.password = vivopass
+#test migration
+#VitroConnection.DataSource.url = jdbc:mysql://localhost/migratetest
+#VitroConnection.DataSource.username = migrateuser
+#VitroConnection.DataSource.password = migratepassword
+
+#
+# The Jena triple store technology to use. SDB is Jena's SPARQL database;
+# this setting allows RDF data to scale beyond the limits of the JVM heap.
+# Set to RDB to use the older Jena RDB store with in-memory caching.
+#
+VitroConnection.DataSource.tripleStoreType = SDB
+
+#
+# The maximum number of active connections in the database connection pool.
+# Increase this value to support a greater number of concurrent page requests
+# with SDB. It is not necessary to adjust this value when using the
+# RDB configuration.
+#
+VitroConnection.DataSource.pool.maxActive = 40
+
+#
+# The maximum number of database connections that will be allowed
+# to remain idle in the connection pool. Default is 25%
+# of the maximum number of active connections.
+#
+VitroConnection.DataSource.pool.maxIdle = 10
+
+#
+# Parameters to change in order to use VIVO with a database other than
+# MySQL.
+#
+VitroConnection.DataSource.dbtype = MySQL
+VitroConnection.DataSource.driver = com.mysql.jdbc.Driver
+VitroConnection.DataSource.validationQuery = SELECT 1
+
+#
+# The name of your first admin user for the VIVO application. The password
+# for this user is initially set to "defaultAdmin", but you will be asked to
+# change the password the first time you log in.
+#
+initialAdminUser = defaultAdmin
+rootUser.emailAddress = hjk54@cornell.edu
+#
+# How is a logged-in user associated with a particular Individual? One way is
+# for the Individual to have a property whose value is the username of the user.
+# This value should be the URI for that property.
+#
+selfEditing.idMatchingProperty = http://vivo.mannlib.cornell.edu/ns#networkId
+
+#
+# If an external authentication system like Shibboleth or CUWebAuth is to be
+# used, these properties say how the login button should be labeled, and which
+# HTTP header will contain the user ID from the authentication system. If such
+# a system is not to be used, leave these commented out. Consult the
+# installation instructions for more details.
+#
+#externalAuth.buttonText = Log in using BearCat Shibboleth
+#externalAuth.netIdHeaderName = remote_userID
+
+#
+# The temporal graph visualization can require extensive machine resources.
+# This can have a particularly noticable impact on memory usage if
+# - VIVO is configured to use Jena SDB,
+# - The organization tree is deep,
+# - The number of grants and publications is large.
+# VIVO release 1.2 guards against this impact by disabling the temporal graph
+# visualization unless the "visualization.temporal" flag is set to "enabled".
+#
+# visualization.temporal = enabled
+
+#
+# The temporal graph visualization is used to compare different organizations/people
+# within an organization on parameters like number of publications or grants.
+# By default, the app will attempt to make its best guess at the top level
+# organization in your instance. If you're unhappy with this selection, uncomment out
+# the property below and set it to the URI of the organization individual you want to
+# identify as the top level organization. It will be used as the default whenever the
+# temporal graph visualization is rendered without being passed an explicit org.
+# For example, to use "Ponce School of Medicine" as the top organization:
+# visualization.topLevelOrg = http://vivo.psm.edu/individual/n2862
+#
+# visualization.topLevelOrg = http://vivo.mydomain.edu/individual/topLevelOrgURI
+
+#
+# Default type(s) for Google Refine Reconciliation Service
+# The format for this property is id, name; id1, name1; id2, name2 etc.
+# See Service Metadata from this page http://code.google.com/p/google-refine/wiki/ReconciliationServiceApi
+# for more information.
+Vitro.reconcile.defaultTypeList = http://vivoweb.org/ontology/core#Course, Course; http://vivoweb.org/ontology/core#Grant, Grant; http://aims.fao.org/aos/geopolitical.owl, Location; http://xmlns.com/foaf/0.1/Organization, Organization; http://xmlns.com/foaf/0.1/Person, Person; http://purl.org/ontology/bibo/Article, Publication
+#solr
+vitro.local.solr.url = http://localhost:8080/vivosolr
\ No newline at end of file
diff --git a/ontology/public/catalog-v001.xml b/ontology/public/catalog-v001.xml
new file mode 100644
index 00000000..1b92b5e2
--- /dev/null
+++ b/ontology/public/catalog-v001.xml
@@ -0,0 +1,5 @@
+
+
diff --git a/productMods/templates/freemarker/edit/forms/js/addConcept.js b/productMods/templates/freemarker/edit/forms/js/addConcept.js index 5eb9318c..94411ff9 100644 --- a/productMods/templates/freemarker/edit/forms/js/addConcept.js +++ b/productMods/templates/freemarker/edit/forms/js/addConcept.js @@ -54,6 +54,7 @@ var addConceptForm = { this.externalConceptURI = $('#conceptNode'); this.externalConceptLabel = $('#conceptLabel'); this.externalConceptSource = $('#conceptSource'); + this.externalConceptSemanticTypeLabel = $("#conceptSemanticTypeLabel"); //remove links this.removeConceptLinks = $('a.remove'); this.errors = $('#errors'); @@ -236,23 +237,27 @@ var addConceptForm = { } var i; var len = checkedElements.length; - var checkedConcept, checkedConceptElement, conceptLabel, conceptSource; + var checkedConcept, checkedConceptElement, conceptLabel, conceptSource, conceptSemanticType; var conceptNodes = []; var conceptLabels = []; var conceptSources = []; + var conceptSemanticTypes = []; checkedElements.each(function() { checkedConceptElement = $(this); checkedConcept = checkedConceptElement.val(); conceptLabel = checkedConceptElement.attr("label"); conceptSource = checkedConceptElement.attr("conceptDefinedBy"); + conceptSemanticType = checkedConceptElement.attr("conceptType"); conceptNodes.push(checkedConcept); conceptLabels.push(conceptLabel); conceptSources.push(conceptSource); + conceptSemanticTypes.push(conceptSemanticType); }); this.externalConceptURI.val(conceptNodes); this.externalConceptLabel.val(conceptLabels); this.externalConceptSource.val(conceptSources); + this.externalConceptSemanticTypeLabel.val(conceptSemanticTypes); return true; }, generateIndividualConceptDisplay: function(cuiURI, label, definition, type, definedBy, isBestMatch) { diff --git a/src/edu/cornell/mannlib/semservices/bo/BaseObject.java b/src/edu/cornell/mannlib/semservices/bo/BaseObject.java new file mode 100644 index 00000000..f8f199b4 --- /dev/null +++ b/src/edu/cornell/mannlib/semservices/bo/BaseObject.java @@ -0,0 +1,27 @@ +package edu.cornell.mannlib.semservices.bo; + +public class BaseObject { + /** + * Simple JavaBean domain object with an id property. + * Used as a base class for objects needing this property. + * + * @author Ken Krebs + * @author Juergen Hoeller + */ + private Integer id; + + public void setId(Integer id) { + this.id = id; + } + + public Integer getId() { + return id; + } + + public boolean isNew() { + return (this.id == null); + } + + + +} diff --git a/src/edu/cornell/mannlib/semservices/bo/Concept.java b/src/edu/cornell/mannlib/semservices/bo/Concept.java index f78aaeb0..b2739a27 100644 --- a/src/edu/cornell/mannlib/semservices/bo/Concept.java +++ b/src/edu/cornell/mannlib/semservices/bo/Concept.java @@ -1,7 +1,8 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - package edu.cornell.mannlib.semservices.bo; +import java.util.ArrayList; +import java.util.List; + public class Concept { private String definedBy; @@ -11,13 +12,22 @@ public class Concept { private String type; private String definition; private String uri; + private String schemeURI; + private List
").replaceAll("\n", "
");
+ }
+
+
}
diff --git a/src/edu/cornell/mannlib/semservices/util/TimeConverter.java b/src/edu/cornell/mannlib/semservices/util/TimeConverter.java
index ccd6147c..41a04448 100644
--- a/src/edu/cornell/mannlib/semservices/util/TimeConverter.java
+++ b/src/edu/cornell/mannlib/semservices/util/TimeConverter.java
@@ -1,5 +1,3 @@
-/* $This file is distributed under the terms of the license in /doc/license.txt$ */
-
package edu.cornell.mannlib.semservices.util;
import edu.cornell.mannlib.semservices.bo.Time;
import java.util.Date;
diff --git a/src/edu/cornell/mannlib/semservices/util/TimestampConverter.java b/src/edu/cornell/mannlib/semservices/util/TimestampConverter.java
index c4f3baa8..8c015ee3 100644
--- a/src/edu/cornell/mannlib/semservices/util/TimestampConverter.java
+++ b/src/edu/cornell/mannlib/semservices/util/TimestampConverter.java
@@ -1,5 +1,3 @@
-/* $This file is distributed under the terms of the license in /doc/license.txt$ */
-
package edu.cornell.mannlib.semservices.util;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
diff --git a/src/edu/cornell/mannlib/semservices/util/XMLGregorianCalendarConverter.java b/src/edu/cornell/mannlib/semservices/util/XMLGregorianCalendarConverter.java
index 180bd4f9..69d23eb9 100644
--- a/src/edu/cornell/mannlib/semservices/util/XMLGregorianCalendarConverter.java
+++ b/src/edu/cornell/mannlib/semservices/util/XMLGregorianCalendarConverter.java
@@ -1,5 +1,4 @@
/*
-
* $Id: XMLGregorianCalendarConverter.java 28642 2006-10-25 13:41:54Z jdamick $
*
* Copyright 2006- Revolution Health Group. All rights reserved.
diff --git a/src/edu/cornell/mannlib/semservices/util/XMLUtils.java b/src/edu/cornell/mannlib/semservices/util/XMLUtils.java
index 82fafd9c..5c6407c0 100644
--- a/src/edu/cornell/mannlib/semservices/util/XMLUtils.java
+++ b/src/edu/cornell/mannlib/semservices/util/XMLUtils.java
@@ -1,8 +1,7 @@
-/* $This file is distributed under the terms of the license in /doc/license.txt$ */
-
package edu.cornell.mannlib.semservices.util;
import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
@@ -81,7 +80,7 @@ public class XMLUtils {
public synchronized static Document parse(String xmlString)
throws IOException, SAXException, ParserConfigurationException {
StringReader reader = new StringReader(xmlString);
- InputSource inputSource = new InputSource(reader);
+ InputSource inputSource = new InputSource(reader);
return getDocumentBuilder().parse(inputSource);
}
@@ -122,6 +121,15 @@ public class XMLUtils {
serializer.serialize(doc);
}
+ public static String serializeDoctoString(Document doc) throws IOException {
+ XMLSerializer serializer = new XMLSerializer();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+
+ serializer.setOutputByteStream(bout);
+ serializer.serialize(doc);
+ return bout.toString();
+ }
+
/**
* @param xml
*/
@@ -152,6 +160,36 @@ public class XMLUtils {
}
+ /**
+ * @param xml
+ */
+ public static String prettyPrintToString(String xml) {
+ Source xmlInput = new StreamSource(new StringReader(xml));
+ StreamResult xmlOutput = new StreamResult(new StringWriter());
+ Transformer transformer = null;
+ try {
+ transformer = TransformerFactory.newInstance().newTransformer();
+ } catch (TransformerConfigurationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (TransformerFactoryConfigurationError e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ //transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "testing.dtd");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
+ try {
+ transformer.transform(xmlInput, xmlOutput);
+ } catch (TransformerException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ String formattedxml=xmlOutput.getWriter().toString();
+ return formattedxml;
+
+ }
+
/**
* @param node
*/
diff --git a/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/BeanToJsonSerializer.java b/src/edu/cornell/mannlib/semservices/view/BeanToJsonSerializer.java
similarity index 93%
rename from src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/BeanToJsonSerializer.java
rename to src/edu/cornell/mannlib/semservices/view/BeanToJsonSerializer.java
index 8c26e5d4..ddc58286 100644
--- a/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/BeanToJsonSerializer.java
+++ b/src/edu/cornell/mannlib/semservices/view/BeanToJsonSerializer.java
@@ -1,4 +1,16 @@
-package edu.cornell.mannlib.vitro.webapp.utils.ConceptSearchService;
+/*
+ * $Id: BeanToJsonSerializer.java 66350 2007-08-20 21:11:41Z xluan $
+ *
+ * Copyright 2006- Revolution Health Group. All rights reserved.
+ *
+ * This software is the confidential and proprietary information
+ * of Revolution Health Group. (Confidential Information).
+ * You shall not disclose such Confidential Information and shall
+ * use it only in accordance with the terms of the license
+ * agreement you entered into with Revolution Health Group.
+ *
+ */
+package edu.cornell.mannlib.semservices.view;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java
index a51c32f9..02f7efc0 100644
--- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java
+++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAssociatedConceptGenerator.java
@@ -46,7 +46,8 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements
private Log log = LogFactory.getLog(AddAssociatedConceptGenerator.class);
private String template = "addAssociatedConcept.ftl";
private static String SKOSConceptType = "http://www.w3.org/2004/02/skos/core#Concept";
-
+ //TODO: Set this to a dynamic mechanism
+ private static String VIVOCore = "http://vivoweb.org/ontology/core#";
@Override
public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) {
@@ -168,10 +169,13 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements
return n3Required;
}
- //Don't think there's any n3 optional here
+ //Optional N3, includes possibility of semantic type which may or may not be included
+ //label and source are independent of semantic type
private List