diff --git a/.gitignore b/.gitignore
index ae5cbdb8..d5374069 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,5 @@
/deploy.properties
/build.properties
/runtime.properties
+/ontology/public/catalog-v0001.xml
+
diff --git a/build.xml b/build.xml
index ba031f79..c19a9b9a 100644
--- a/build.xml
+++ b/build.xml
@@ -69,8 +69,10 @@
- In Step 4, you defined the location of the Vitro home directory,
+ In Step 4, you defined the location of the VIVO home directory,
by specifying
At the top level of the VIVO distribution directory, you will find a file called
-
+
+
+ Languages (in addition to American English) that will be built into your
+ VIVO site. The languages must be found in the
+
+ languages
directory of the VIVO distribution.
+ See
+ the VIVO Wiki for more information.
+
+
+ languages.addToBuild
+
+
+ es_MX
+
+ 5. Specify runtime properties
vitro.home
in the build.properties
file.
Create that directory now.
example.runtime.properties
. Copy this to the Vitro home directory you have created,
+ example.runtime.properties
. Copy this to the VIVO home directory you have created,
renaming the copy to runtime.properties
.
Edit the file to suit your installation, as described in the following table.
+ The RDF files that initialize the data model have moved, in both the distribution and + the runtime locations. + In the distribution, they have been collected in one place, and reorganized to use + a more consistent naming scheme. During the build process, they are copied to a + location within the VIVO home directory, instead of residing in the webapp itself. +
++ If you have modified these RDF files, or added files of your own, you must adjust to + the new locations accordingly. + +
+/WEB-INF/ontologies/app/application.owl +/WEB-INF/ontologies/app/aboutPage.n3 +/WEB-INF/ontologies/app/menu.n3 +/WEB-INF/ontologies/app/profilePageType.n3 +/WEB-INF/ontologies/app/loadedAtStartup/displayModelListViews.rdf +/WEB-INF/ontologies/app/loadedAtStartup/homePageDataGetters.n3 +/WEB-INF/ontologies/app/loadedAtStartup/localeSelectionGUI.n3 +/WEB-INF/ontologies/app/loadedAtStartup/vivoListViewConfig.rdf +/WEB-INF/ontologies/app/loadedAtStartup/vivoOrganizationDataGetters.n3 +/WEB-INF/ontologies/app/loadedAtStartup/vivoSearchProhibited.n3 +/WEB-INF/ontologies/app/menuload/displayTBOX.n3 +/WEB-INF/ontologies/app/menuload/displayDisplay.n3 +/WEB-INF/init-data/initialSiteConfig.rdf +/WEB-INF/ontologies/user/abox/geopolitical.ver1.1-11-18-11-individual-labels.rdf +/WEB-INF/ontologies/user/abox/vocabularySource-labels.n3 +/WEB-INF/ontologies/user/tbox/vitro-0.7-annotations.rdf +/WEB-INF/ontologies/user/tbox/geopolitical-ver1.1-11-18-11-annotations.rdf +/WEB-INF/ontologies/user/tbox/scires-1.5-annotations.rdf +/WEB-INF/ontologies/user/tbox/vivo-core-1.5-annotations.rdf +/WEB-INF/ontologies/user/tbox/isDefinedBy-1.5-annotations.rdf +/WEB-INF/ontologies/user/applicationMetadata/propertygroups.rdf +/WEB-INF/ontologies/user/applicationMetadata/classgroups.rdf +/WEB-INF/filegraph/abox/us-states.rdf +/WEB-INF/filegraph/abox/geopolitical.abox.ver1.1-11-18-11.owl +/WEB-INF/filegraph/abox/academicDegree.rdf +/WEB-INF/filegraph/abox/documentStatus.owl +/WEB-INF/filegraph/abox/continents.n3 +/WEB-INF/filegraph/abox/vocabularySource.n3 +/WEB-INF/filegraph/abox/dateTimeValuePrecision.owl +/WEB-INF/filegraph/tbox/vitroPublic.owl +/WEB-INF/filegraph/tbox/vivo-dcterms-1.5.owl +/WEB-INF/filegraph/tbox/scires-1.5.owl +/WEB-INF/filegraph/tbox/vivo-core-1.5.owl +/WEB-INF/filegraph/tbox/vivo-c4o-1.5.owl +/WEB-INF/filegraph/tbox/geopolitical.tbox.ver1.1-11-18-11.owl +/WEB-INF/filegraph/tbox/vivo-fabio-1.5.owl +/WEB-INF/filegraph/tbox/vivo-skos-1.5.owl +/WEB-INF/filegraph/tbox/vivo-event-1.5.owl +/WEB-INF/filegraph/tbox/vivo-foaf-1.5.owl +/WEB-INF/filegraph/tbox/vitro-0.7.owl +/WEB-INF/filegraph/tbox/vivo-pws-1.5.owl +/WEB-INF/filegraph/tbox/isDefinedBy-1.5.owl +/WEB-INF/filegraph/tbox/vivo-dcelements-1.5.owl +/WEB-INF/filegraph/tbox/vivo-bibo-1.5.owl+ +
rdf/display/firsttime/aboutPage.n3 +rdf/display/firsttime/application.owl +rdf/display/firsttime/menu.n3 +rdf/display/firsttime/profilePageType.n3 +rdf/display/everytime/displayModelListViews.rdf +rdf/display/everytime/homePageDataGetters.n3 +rdf/display/everytime/localeSelectionGUI.n3 +rdf/display/everytime/vivoListViewConfig.rdf +rdf/display/everytime/vivoOrganizationDataGetters.n3 +rdf/display/everytime/vivoSearchProhibited.n3 +rdf/displayTbox/everytime/displayTBOX.n3 +rdf/displayDisplay/everytime/displayDisplay.n3 +rdf/applicationMetadata/firsttime/classgroups.rdf +rdf/applicationMetadata/firsttime/initialSiteConfig.rdf +rdf/applicationMetadata/firsttime/propertygroups.rdf +rdf/abox/firsttime/geopolitical.ver1.1-11-18-11-individual-labels.rdf +rdf/abox/firsttime/vocabularySource-labels.n3 +rdf/abox/filegraph/abox/academicDegree.rdf +rdf/abox/filegraph/abox/continents.n3 +rdf/abox/filegraph/abox/dateTimeValuePrecision.owl +rdf/abox/filegraph/abox/documentStatus.owl +rdf/abox/filegraph/abox/geopolitical.abox.ver1.1-11-18-11.owl +rdf/abox/filegraph/abox/us-states.rdf +rdf/abox/filegraph/abox/vocabularySource.n3 +rdf/tbox/firsttime/geopolitical-ver1.1-11-18-11-annotations.rdf +rdf/tbox/firsttime/isDefinedBy-1.5-annotations.rdf +rdf/tbox/firsttime/scires-1.5-annotations.rdf +rdf/tbox/firsttime/vitro-0.7-annotations.rdf +rdf/tbox/firsttime/vivo-core-1.5-annotations.rdf +rdf/tbox/filegraph/tbox/geopolitical.tbox.ver1.1-11-18-11.owl +rdf/tbox/filegraph/tbox/isDefinedBy-1.5.owl +rdf/tbox/filegraph/tbox/scires-1.5.owl +rdf/tbox/filegraph/tbox/vitro-0.7.owl +rdf/tbox/filegraph/tbox/vitroPublic.owl +rdf/tbox/filegraph/tbox/vivo-bibo-1.5.owl +rdf/tbox/filegraph/tbox/vivo-c4o-1.5.owl +rdf/tbox/filegraph/tbox/vivo-core-1.5.owl +rdf/tbox/filegraph/tbox/vivo-dcelements-1.5.owl +rdf/tbox/filegraph/tbox/vivo-dcterms-1.5.owl +rdf/tbox/filegraph/tbox/vivo-event-1.5.owl +rdf/tbox/filegraph/tbox/vivo-fabio-1.5.owl +rdf/tbox/filegraph/tbox/vivo-foaf-1.5.owl +rdf/tbox/filegraph/tbox/vivo-pws-1.5.owl +rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl+
+ If you are using a three-tier build process, you will need to add a single line + to the build script so the RDF files will be merged properly across the tiers. So this: +
<patternset id="appbase.patterns"> +<include name="src/**/*" /> +<include name="lib/**/*" /> +<include name="test/**/*" /> +<include name="themes/**/*" /> +<include name="config/*.properties" /> +<include name="config/*.txt" /> +<include name="config/jarlist/*.txt" /> +<include name="config/solr/*" /> +<include name="context.xml" /> +</patternset>+ becomes this: +
<patternset id="appbase.patterns"> +<include name="src/**/*" /> +<include name="lib/**/*" /> +<include name="rdf/**/*" /> +<include name="test/**/*" /> +<include name="themes/**/*" /> +<include name="config/*.properties" /> +<include name="config/*.txt" /> +<include name="config/jarlist/*.txt" /> +<include name="config/solr/*" /> +<include name="context.xml" /> +</patternset>+ + +
+ VIVO 1.6 includes limited support for other languages, in addition to American English. + This limited support is described as read-only support on public-facing + pages. +
++ Read-only means that there is no provision for editing multi-language + data or displays. Property values, ontology labels, etc. must all be provided in RDF files + and ingested or otherwise inserted into the data model. The Page Management user interface + does not support maintaining pages in multiple languages. +
++ Public-facing means that most of the pages used for site adminstration + are only presented in American English. +
++ These two pages in the VIVO Wiki describe how to + + Build VIVO with multiple languages and how to + + Add a new language to VIVO. +
+@@ -260,7 +419,7 @@ -
1. Download the new distribution file and unpack it into a new @@ -268,9 +427,9 @@
2. Separate your existing deploy.properties
file into two files,
- as described below. The new build.properties
file is stored in
- the top level of the VIVO distribution directory. The new runtime.properties
- file is stored in your Vitro home directory.
+ as described below. Store the new build.properties
file in
+ the top level of the VIVO distribution directory. Store the new runtime.properties
+ file in your VIVO home directory.
+ Property Name + | ++ Example Value + | +
---|---|
+ Languages (in addition to American English) that will be built into your
+ VIVO site. The languages must be found in the
+ languages directory of the VIVO distribution.
+ See
+ the VIVO Wiki for more information.
+ |
+ |
+ languages.addToBuild + | ++ es_MX + | +
The properties below are new to runtime.properties
. They are optional,
so you need not add them, unless you want a value other than the default.
@@ -514,6 +712,11 @@
+
+ 4. Apply any previous changes you have made to the RDF initialization files. + See the section on the Auto-loaded RDF files + above for more details. +
5. Stop Apache Tomcat and from your VIVO source directory, run ant diff --git a/example.build.properties b/example.build.properties index 16c2b598..64fb99f2 100644 --- a/example.build.properties +++ b/example.build.properties @@ -37,3 +37,10 @@ webapp.name = vivo # This includes uploaded files (usually images) and the search index. # vitro.home = /usr/local/vivo/home + +# +# Additional languages to be built into your VIVO site. The locales specified +# here must appear as sub-directories of [vivo]/languages in the distribution. +# Find more information on the VIVO Wiki (https://wiki.duraspace.org/display/VIVO). +# +#languages.addToBuild = diff --git a/productMods/WEB-INF/ontologies/user/applicationMetadata/classgroups_labels_es.n3 b/languages/example/rdf/applicationMetadata/firsttime/classgroups_labels_es.n3 similarity index 100% rename from productMods/WEB-INF/ontologies/user/applicationMetadata/classgroups_labels_es.n3 rename to languages/example/rdf/applicationMetadata/firsttime/classgroups_labels_es.n3 diff --git a/productMods/WEB-INF/ontologies/user/applicationMetadata/propertygroups_labels_es.n3 b/languages/example/rdf/applicationMetadata/firsttime/propertygroups_labels_es.n3 similarity index 100% rename from productMods/WEB-INF/ontologies/user/applicationMetadata/propertygroups_labels_es.n3 rename to languages/example/rdf/applicationMetadata/firsttime/propertygroups_labels_es.n3 diff --git a/productMods/WEB-INF/ontologies/app/loadedAtStartup/aboutPage_es.n3 b/languages/example/rdf/display/firsttime/aboutPage_es.n3 similarity index 95% rename from productMods/WEB-INF/ontologies/app/loadedAtStartup/aboutPage_es.n3 rename to languages/example/rdf/display/firsttime/aboutPage_es.n3 index 8d8ddd69..74f7a3c4 100644 --- a/productMods/WEB-INF/ontologies/app/loadedAtStartup/aboutPage_es.n3 +++ b/languages/example/rdf/display/firsttime/aboutPage_es.n3 @@ -7,7 +7,7 @@ about:ABOUTDG """
La aplicación VIVO permite el descubrimiento de los investigadores a través de las instituciones. Los participantes en la red se encuentran instituciones con instalaciones locales de VIVO o con la investigación y el descubrimiento de aplicaciones de perfiles que pueden proporcionar datos web compatibles semánticas. Por tanto, la información accesible a través de la búsqueda de VIVO y capacidad de exploración se residir y ser controlado a nivel local, dentro de vivos institucionales o de otras aplicaciones web compatibles con semánticos.
-VIVO es una aplicación web semántica código abierto originalmente desarrollado e implementado en Cornell. Cuando se instala y se rellena con el contenido en una institución, que permite el descubrimiento de la investigación y de becas en todas las disciplinas de esta institución. VIVO compatible con la navegación y una función de búsqueda que devuelve resultados facetas para una rápida recuperación de la información deseada. Contenido en cualquier instalación VIVO local puede mantenerse manualmente o puesto en la base de datos de forma automática de los sistemas locales de registro, tales como recursos humanos, carreras impulsadas, becas, cursos, y bases de datos de la actividad docente.
+VIVO es una aplicación web semántica código abierto originalmente desarrollado e implementado en Cornell. Cuando se instala y se rellena con el contenido en una institución, que permite el descubrimiento de la investigación y de becas en todas las disciplinas de esta institución. VIVO compatible con la navegación y una función de búsqueda que devuelve resultados facetas para una rápida recuperación de la información deseada. Contenido en cualquier instalación VIVO local puede mantenerse manualmente o puesto en la base de datos de forma automática de los sistemas locales de registro, tales como recursos humanos, becas, cursos, y bases de datos de la actividad docente.
Ver más información sobre el Proyecto VIVO.
+ <#list submissionErrors?keys as errorFieldName>
+ <#if errorFieldName == "firstName">
+ ${i18n().enter_first_name}
+ <#elseif errorFieldName == "lastName">
+ ${i18n().enter_last_name}
+ <#elseif errorFieldName == "label">
+ ${i18n().enter_a_name}
+ #if>
+
+ #list>
+
${i18n().individuals_with_dept(firstRow['raLabel'],raLink)} ${i18n().view_all_individuals_in_dept}
+diff --git a/productMods/templates/freemarker/edit/forms/js/addConcept.js b/productMods/templates/freemarker/edit/forms/js/addConcept.js index 5eb9318c..d650d349 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'); @@ -202,7 +203,9 @@ var addConceptForm = { var definedBy = conceptResult.definedBy; var type = conceptResult.type; var uri = conceptResult.uri; - return addConceptForm.generateIndividualConceptDisplay(uri, label, definition, type, definedBy, isBestMatch); + //this will be null if there are no alternate labels + var altLabels = conceptResult.altLabelList; + return addConceptForm.generateIndividualConceptDisplay(uri, label, altLabels, definition, type, definedBy, isBestMatch); }, //This should now return all best matches in one array and other results in another parseResults:function(resultsArray) { @@ -236,31 +239,35 @@ 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) { + generateIndividualConceptDisplay: function(cuiURI, label, altLabels, definition, type, definedBy, isBestMatch) { var htmlAdd = "
The VIVO application enables the discovery of researchers across institutions. Participants in the network include institutions with local installations of VIVO or those with research discovery and profiling applications that can provide semantic web-compliant data. The information accessible through VIVO's search and browse capability will therefore reside and be controlled locally, within institutional VIVOs or other semantic web-compliant applications.
-VIVO is an open source semantic web application originally developed and implemented at Cornell. When installed and populated with content at an institution, it enables the discovery of research and scholarship across disciplines at that institution. VIVO supports browsing and a search function which returns faceted results for rapid retrieval of desired information. Content in any local VIVO installation may be maintained manually or brought into the database in automated ways from local systems of record, such as HR, RBIs, grants, course, and faculty activity databases.
+VIVO is an open source semantic web application originally developed and implemented at Cornell. When installed and populated with content at an institution, it enables the discovery of research and scholarship across disciplines at that institution. VIVO supports browsing and a search function which returns faceted results for rapid retrieval of desired information. Content in any local VIVO installation may be maintained manually or brought into the database in automated ways from local systems of record, such as human resources, scholarships, grants, course, and faculty activity databases.
See more information on the VIVO Project.
").replaceAll("\n", "
");
+ }
+
+
}
diff --git a/src/edu/cornell/mannlib/semservices/util/XMLGregorianCalendarConverter.java b/src/edu/cornell/mannlib/semservices/util/XMLGregorianCalendarConverter.java
index 180bd4f9..2caaf4ce 100644
--- a/src/edu/cornell/mannlib/semservices/util/XMLGregorianCalendarConverter.java
+++ b/src/edu/cornell/mannlib/semservices/util/XMLGregorianCalendarConverter.java
@@ -1,3 +1,5 @@
+/* $This file is distributed under the terms of the license in /doc/license.txt$ */
+
/*
* $Id: XMLGregorianCalendarConverter.java 28642 2006-10-25 13:41:54Z jdamick $
diff --git a/src/edu/cornell/mannlib/semservices/util/XMLUtils.java b/src/edu/cornell/mannlib/semservices/util/XMLUtils.java
index 82fafd9c..f4735ea4 100644
--- a/src/edu/cornell/mannlib/semservices/util/XMLUtils.java
+++ b/src/edu/cornell/mannlib/semservices/util/XMLUtils.java
@@ -3,6 +3,7 @@
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 +82,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 +123,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 +162,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 92%
rename from src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/BeanToJsonSerializer.java
rename to src/edu/cornell/mannlib/semservices/view/BeanToJsonSerializer.java
index 8c26e5d4..13d4d859 100644
--- a/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/BeanToJsonSerializer.java
+++ b/src/edu/cornell/mannlib/semservices/view/BeanToJsonSerializer.java
@@ -1,4 +1,18 @@
-package edu.cornell.mannlib.vitro.webapp.utils.ConceptSearchService;
+/* $This file is distributed under the terms of the license in /doc/license.txt$ */
+
+/*
+ * $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..23f4e1bf 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
@@ -16,8 +16,17 @@ import javax.servlet.http.HttpSession;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import com.hp.hpl.jena.ontology.OntModel;
+import com.hp.hpl.jena.query.Query;
+import com.hp.hpl.jena.query.QueryExecution;
+import com.hp.hpl.jena.query.QueryExecutionFactory;
+import com.hp.hpl.jena.query.QueryFactory;
+import com.hp.hpl.jena.query.QuerySolution;
+import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.rdf.model.Literal;
import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.vocabulary.OWL;
import com.hp.hpl.jena.vocabulary.RDF;
import com.hp.hpl.jena.vocabulary.RDFS;
import com.hp.hpl.jena.vocabulary.XSD;
@@ -27,11 +36,13 @@ import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty;
import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
+import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.AddAssociatedConceptsPreprocessor;
+import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.ConceptSemanticTypesPreprocessor;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
import edu.cornell.mannlib.vitro.webapp.utils.ConceptSearchService.ConceptSearchServiceUtils;
/**
@@ -45,9 +56,9 @@ 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#";
+ private static String SKOSConceptType = "http://www.w3.org/2004/02/skos/core#Concept";
@Override
public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) {
EditConfigurationVTwo editConfiguration = new EditConfigurationVTwo();
@@ -84,7 +95,9 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements
setTemplate(editConfiguration, vreq);
// No validators required here
// Add preprocessors
- addPreprocessors(editConfiguration, vreq.getWebappDaoFactory());
+ addPreprocessors(editConfiguration,
+ ModelAccess.on(vreq).getJenaOntModel(),
+ ModelAccess.on(vreq).getOntModelSelector().getTBoxModel());
// Adding additional data, specifically edit mode
addFormSpecificData(editConfiguration, vreq);
// One override for basic functionality, changing url pattern
@@ -168,10 +181,15 @@ 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
+ //concept semantic type uri is a placeholder which is actually processed in the sparql update preprocessor
private List
<#-- Label -->
- <@p.label individual editable labelCount/>
+ <@p.label individual editable labelCount localesCount/>
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
<#assign title = propertyGroups.pullProperty("${core}preferredTitle")!>
diff --git a/themes/wilma/templates/page-home.ftl b/themes/wilma/templates/page-home.ftl
index 5a02ac10..8547e0b8 100644
--- a/themes/wilma/templates/page-home.ftl
+++ b/themes/wilma/templates/page-home.ftl
@@ -97,6 +97,7 @@
stateString: '${i18n().map_state_string}',
statewideLocations: '${i18n().statewide_locations}',
researchersInString: '${i18n().researchers_in}',
+ inString: '${i18n().in}',
noFacultyFound: '${i18n().no_faculty_found}',
placeholderImage: '${i18n().placeholder_image}',
viewAllFaculty: '${i18n().view_all_faculty}',
@@ -108,7 +109,7 @@
if ( $('input.search-homepage').css('text-align') == "right" ) {
$('input.search-homepage').attr("value","${i18n().limit_search} \u2192");
}
-
+ <@lh.getGeoResearcherCount/>