Merge branch 'develop' of https://github.com/vivo-project/VIVO into develop
This commit is contained in:
commit
e032ceeca4
29 changed files with 267 additions and 83 deletions
|
@ -72,6 +72,7 @@
|
|||
<include name="rdf/**/*" />
|
||||
<include name="test/**/*" />
|
||||
<include name="themes/**/*" />
|
||||
<include name="languages/**/*" />
|
||||
<include name="config/*.properties" />
|
||||
<include name="config/*.txt" />
|
||||
<include name="config/jarlist/*.txt" />
|
||||
|
|
|
@ -316,18 +316,35 @@
|
|||
/usr/local/vivo/home
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Languages (in addition to American English) that will be built into your
|
||||
VIVO site. The languages must be found in the
|
||||
<code>languages</code> directory of the VIVO distribution.
|
||||
See <a href="https://wiki.duraspace.org/display/VIVO/Building+a+multi-language+VIVO+instance">
|
||||
the VIVO Wiki</a> for more information.
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="odd_row">
|
||||
<td>
|
||||
languages.addToBuild
|
||||
</td>
|
||||
<td>
|
||||
es_MX
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3 id="runtime_properties">5. Specify runtime properties </h3>
|
||||
<p>
|
||||
In <a href="#build_properties">Step 4</a>, you defined the location of the Vitro home directory,
|
||||
In <a href="#build_properties">Step 4</a>, you defined the location of the VIVO home directory,
|
||||
by specifying <code>vitro.home</code> in the <code>build.properties</code> file.
|
||||
Create that directory now.
|
||||
</p>
|
||||
<p>
|
||||
At the top level of the VIVO distribution directory, you will find a file called
|
||||
<code>example.runtime.properties</code>. Copy this to the Vitro home directory you have created,
|
||||
<code>example.runtime.properties</code>. Copy this to the VIVO home directory you have created,
|
||||
renaming the copy to <code>runtime.properties</code>.
|
||||
Edit the file to suit your installation, as described in the following table.
|
||||
</p>
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
<li><a href="#multiple">Multiple foaf:Person Profile Pages</a></li>
|
||||
<li><a href="#homePage">Home Page Re-design</a></li>
|
||||
<li><a href="#rdffiles">Auto-loaded RDF files move to the Home directory</a></li>
|
||||
<li><a href="#language">Support for additional languages</a></li>
|
||||
<li><a href="#BOGUS">ANYTHING ELSE?</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
|
@ -362,6 +363,30 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl</pre>
|
|||
</patternset></pre>
|
||||
</p>
|
||||
|
||||
<h4 id="language">Support for additional languages</h4>
|
||||
<p>
|
||||
VIVO 1.6 includes limited support for other languages, in addition to American English.
|
||||
This limited support is described as <em>read-only</em> support on <em>public-facing</em>
|
||||
pages.
|
||||
</p>
|
||||
<p>
|
||||
<em>Read-only</em> 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.
|
||||
</p>
|
||||
<p>
|
||||
<em>Public-facing</em> means that most of the pages used for site adminstration
|
||||
are only presented in American English.
|
||||
</p>
|
||||
<p>
|
||||
These two pages in the VIVO Wiki describe how to
|
||||
<a href="https://wiki.duraspace.org/display/VIVO/Building+a+multi-language+VIVO+instance">
|
||||
Build VIVO with multiple languages</a> and how to
|
||||
<a href="https://wiki.duraspace.org/display/VIVO/Adding+a+language+to+VIVO">
|
||||
Add a new language to VIVO</a>.
|
||||
</p>
|
||||
|
||||
<h4 id="BOGUS">ANYTHING ELSE?</h4>
|
||||
<p>
|
||||
</p>
|
||||
|
@ -394,7 +419,7 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl</pre>
|
|||
</ul>
|
||||
|
||||
|
||||
<h3 id="#upgrade_process">III. Upgrade Instructions</h3>
|
||||
<h3 id="upgrade_process">III. Upgrade Instructions</h3>
|
||||
|
||||
<p>
|
||||
1. Download the new distribution file and unpack it into a new
|
||||
|
@ -402,9 +427,9 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl</pre>
|
|||
</p>
|
||||
<p>
|
||||
2. Separate your existing <code>deploy.properties</code> file into two files,
|
||||
as described below. The new <code>build.properties</code> file is stored in
|
||||
the top level of the VIVO distribution directory. The new <code>runtime.properties</code>
|
||||
file is stored in your Vitro home directory.
|
||||
as described below. Store the new <code>build.properties</code> file in
|
||||
the top level of the VIVO distribution directory. Store the new <code>runtime.properties</code>
|
||||
file in your VIVO home directory.
|
||||
<br>
|
||||
</p>
|
||||
<table border='1' bordercolor="#CCCCCC" cellspacing="5">
|
||||
|
@ -441,9 +466,48 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl</pre>
|
|||
<p>
|
||||
If you prefer, you may start with <code>example.build.properties</code>
|
||||
and <code>example.runtime.properties</code>, make copies,
|
||||
and edit them to suit your installation.
|
||||
and edit them to suit your installation. Remember, the <code>runtime.properties</code> file
|
||||
goes into your VIVO home directory.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The properties below are new to <code>build.properties</code>. They are optional,
|
||||
so you need not add them unless you want a value other than the default.
|
||||
</p>
|
||||
<p>
|
||||
<!-- runtime.properties table from install.html -->
|
||||
</p>
|
||||
<table border='1' bordercolor="#CCCCCC" cellspacing="5">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
Property Name
|
||||
</th>
|
||||
<th>
|
||||
Example Value
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Languages (in addition to American English) that will be built into your
|
||||
VIVO site. The languages must be found in the
|
||||
<code>languages</code> directory of the VIVO distribution.
|
||||
See <a href="https://wiki.duraspace.org/display/VIVO/Building+a+multi-language+VIVO+instance">
|
||||
the VIVO Wiki</a> for more information.
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="odd_row blue">
|
||||
<td>
|
||||
languages.addToBuild
|
||||
</td>
|
||||
<td>
|
||||
es_MX
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
The properties below are new to <code>runtime.properties</code>. They are optional,
|
||||
so you need not add them, unless you want a value other than the default.
|
||||
|
|
|
@ -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 =
|
||||
|
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
@ -1,47 +0,0 @@
|
|||
<rdf:RDF
|
||||
xmlns:vitro-public="http://vitro.mannlib.cornell.edu/ns/vitro/public#"
|
||||
xmlns:c4o="http://purl.org/spar/c4o/"
|
||||
xmlns:ero="http://purl.obolibrary.org/obo/"
|
||||
xmlns:pvs="http://vivoweb.org/ontology/provenance-support#"
|
||||
xmlns:owl2="http://www.w3.org/2006/12/owl2-xml#"
|
||||
xmlns:scirr="http://vivoweb.org/ontology/scientific-research-resource#"
|
||||
xmlns:vivo="http://vivoweb.org/ontology/core#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:bibo="http://purl.org/ontology/bibo/"
|
||||
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#"
|
||||
xmlns:foaf="http://xmlns.com/foaf/0.1/"
|
||||
xmlns:scires="http://vivoweb.org/ontology/scientific-research#"
|
||||
xmlns:dcterms="http://purl.org/dc/terms/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
|
||||
xmlns:geo="http://aims.fao.org/aos/geopolitical.owl#"
|
||||
xmlns:skco="http://www.w3.org/2004/02/skos/core#"
|
||||
xmlns:event="http://purl.org/NET/c4dm/event.owl#"
|
||||
xmlns:dcelem="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
|
||||
xmlns:vann="http://purl.org/vocab/vann/"
|
||||
xmlns:skos="http://www.w3.org/2008/05/skos#"
|
||||
xmlns:swvs="http://www.w3.org/2003/06/sw-vocab-status/ns#"
|
||||
xmlns:owl="http://www.w3.org/2002/07/owl#"
|
||||
xmlns:fabio="http://purl.org/spar/fabio/"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
||||
|
||||
<owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal"
|
||||
>0.7</owl:versionInfo>
|
||||
|
||||
|
||||
<owl:Class rdf:about="http://vivoweb.org/ontology/core#ConceptSemanticType">
|
||||
<vitro:exampleAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
|
||||
>Semantic Type for given concept, for example UMLS's type returned for concepts</vitro:exampleAnnot>
|
||||
<vitro:descriptionAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
|
||||
>Semantic Type for given concept, for example UMLS's type returned for concepts.</vitro:descriptionAnnot>
|
||||
|
||||
<vitro:shortDef rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
|
||||
>Concept Semantic Type</vitro:shortDef>
|
||||
</owl:Class>
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://vivoweb.org/ontology/core#hasConceptSemanticType">
|
||||
<rdfs:range rdf:resource="http://vivoweb.org/ontology/core#ConceptSemanticType"/>
|
||||
<owl:inverseOf rdf:resource="http://vivoweb.org/ontology/core#isConceptSemanticTypeOf"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
</rdf:RDF>
|
Binary file not shown.
Before Width: | Height: | Size: 442 B |
|
@ -10,6 +10,9 @@
|
|||
<#if !labelCount??>
|
||||
<#assign labelCount = 0 >
|
||||
</#if>
|
||||
<#if !localesCount??>
|
||||
<#assign localesCount = 1>
|
||||
</#if>
|
||||
<#assign qrCodeIcon = "qr-code-icon.png">
|
||||
<#assign visRequestingTemplate = "foaf-person-2column">
|
||||
<section id="individual-intro" class="vcard person" role="region">
|
||||
|
@ -40,7 +43,7 @@
|
|||
<#else>
|
||||
<h1 class="vcard foaf-person fn" <#if !editable>style="float:left;border-right:1px solid #A6B1B0;"</#if>>
|
||||
<#-- Label -->
|
||||
<@p.label individual editable labelCount/>
|
||||
<@p.label individual editable labelCount localesCount/>
|
||||
</h1>
|
||||
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
|
||||
<#assign title = propertyGroups.pullProperty("${core}preferredTitle")!>
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
<#if !labelCount??>
|
||||
<#assign labelCount = 0 >
|
||||
</#if>
|
||||
<#if !localesCount??>
|
||||
<#assign localesCount = 1>
|
||||
</#if>
|
||||
<#assign qrCodeIcon = "qr-code-icon.png">
|
||||
<#assign individualImage>
|
||||
<@p.image individual=individual
|
||||
|
@ -52,7 +55,7 @@
|
|||
<div id="photo-wrapper">${individualImage}</div>
|
||||
<h1 class="vcard foaf-person fn" <#if !editable>style="float:left;border-right:1px solid #A6B1B0;"</#if>>
|
||||
<#-- Label -->
|
||||
<@p.label individual editable labelCount/>
|
||||
<@p.label individual editable labelCount localesCount/>
|
||||
</h1>
|
||||
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
|
||||
<#assign title = propertyGroups.pullProperty("${core}preferredTitle")!>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#--Some values for labels etc. may be different between vitro and other systems -->
|
||||
<#assign returnText = "${i18n().return_to_profile}" />
|
|
@ -51,6 +51,9 @@
|
|||
<#if existingConcept.vocabURI?has_content && existingConcept.vocabLabel?has_content>
|
||||
(${existingConcept.vocabLabel})
|
||||
</#if>
|
||||
<#if existingConcept.conceptSemanticTypeLabel?has_content>
|
||||
${existingConcept.conceptSemanticTypeLabel}
|
||||
</#if>
|
||||
</span>
|
||||
</span>
|
||||
<a href="${urls.base}/edit/primitiveRdfEdit" class="remove" title="${i18n().remove_capitalized}">${i18n().remove_capitalized}</a>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<http://link.informatics.stonybrook.edu/umls> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> .
|
||||
<http://aims.fao.org/aos/agrovoc/agrovocScheme> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> .
|
||||
<http://www.eionet.europa.eu/gemet/gemetThesaurus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> .
|
||||
<http://link.informatics.stonybrook.edu/umls> <http://www.w3.org/2000/01/rdf-schema#label> "UMLS"^^<http://www.w3.org/2001/XMLSchema#string> .
|
||||
<http://aims.fao.org/aos/agrovoc/agrovocScheme> <http://www.w3.org/2000/01/rdf-schema#label> "AGROVOC"^^<http://www.w3.org/2001/XMLSchema#string> .
|
||||
<http://www.eionet.europa.eu/gemet/gemetThesaurus> <http://www.w3.org/2000/01/rdf-schema#label> "GEMET"^^<http://www.w3.org/2001/XMLSchema#string> .
|
|
@ -1,3 +0,0 @@
|
|||
<http://link.informatics.stonybrook.edu/umls> <http://www.w3.org/2000/01/rdf-schema#label> "UMLS"^^<http://www.w3.org/2001/XMLSchema#string> .
|
||||
<http://aims.fao.org/aos/agrovoc/agrovocScheme> <http://www.w3.org/2000/01/rdf-schema#label> "AGROVOC"^^<http://www.w3.org/2001/XMLSchema#string> .
|
||||
<http://www.eionet.europa.eu/gemet/gemetThesaurus> <http://www.w3.org/2000/01/rdf-schema#label> "GEMET"^^<http://www.w3.org/2001/XMLSchema#string> .
|
|
@ -396,37 +396,38 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements
|
|||
}
|
||||
|
||||
|
||||
//To determine whether or not a concept is a user generated or one from an external vocab source.
|
||||
//we cannot rely on whether or not it is a skos concept because incorporating UMLS semantic network classes as
|
||||
//SKOS concept subclasses means that even concepts from an external vocab source might be considered SKOS concepts
|
||||
//Instead, we will simply determine whether a concept is defined by an external vocabulary source and use that
|
||||
//as the primary indicator of whether a concept is from an external vocabulary source or a user generated concept
|
||||
private List<AssociatedConceptInfo> getAssociatedConceptInfo(
|
||||
List<Individual> concepts, VitroRequest vreq) {
|
||||
List<AssociatedConceptInfo> info = new ArrayList<AssociatedConceptInfo>();
|
||||
for ( Individual conceptIndividual : concepts ) {
|
||||
boolean isSKOSConcept = false;
|
||||
boolean userGenerated = true;
|
||||
//Note that this isn't technically
|
||||
String conceptUri = conceptIndividual.getURI();
|
||||
String conceptLabel = conceptIndividual.getName();
|
||||
|
||||
//Check if SKOS Concept type
|
||||
List<ObjectPropertyStatement> osl = conceptIndividual.getObjectPropertyStatements(RDF.type.getURI());
|
||||
for(ObjectPropertyStatement os: osl) {
|
||||
if(os.getObjectURI().equals(SKOSConceptType)) {
|
||||
isSKOSConcept = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(isSKOSConcept) {
|
||||
//if the concept in question is skos - which would imply a user generated concept
|
||||
info.add(new AssociatedConceptInfo(conceptLabel, conceptUri, null, null, SKOSConceptType, null, null));
|
||||
} else {
|
||||
//Get the vocab source and vocab label
|
||||
//Check if defined by an external vocabulary source
|
||||
List<ObjectPropertyStatement> vocabList = conceptIndividual.getObjectPropertyStatements(RDFS.isDefinedBy.getURI());
|
||||
String vocabSource = null;
|
||||
String vocabLabel = null;
|
||||
if(vocabList != null && vocabList.size() > 0) {
|
||||
userGenerated = false;
|
||||
vocabSource = vocabList.get(0).getObjectURI();
|
||||
Individual sourceIndividual = EditConfigurationUtils.getIndividual(vreq, vocabSource);
|
||||
//Assuming name will get label
|
||||
vocabLabel = sourceIndividual.getName();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(userGenerated) {
|
||||
//if the concept in question is skos - which would imply a user generated concept
|
||||
info.add(new AssociatedConceptInfo(conceptLabel, conceptUri, null, null, SKOSConceptType, null, null));
|
||||
} else {
|
||||
String conceptSemanticTypeURI = null;
|
||||
String conceptSemanticTypeLabel = null;
|
||||
//Can a concept have multiple semantic types? Currently we are only returning the first one
|
||||
|
@ -439,7 +440,6 @@ public class AddAssociatedConceptGenerator extends VivoBaseGenerator implements
|
|||
conceptSemanticTypeLabel = typeAndLabel.get("semanticTypeLabel");
|
||||
}
|
||||
|
||||
|
||||
//Assuming this is from an external vocabulary source
|
||||
info.add(new AssociatedConceptInfo(conceptLabel, conceptUri, vocabSource, vocabLabel, null, conceptSemanticTypeURI, conceptSemanticTypeLabel));
|
||||
|
||||
|
|
|
@ -84,6 +84,8 @@ public class AddAssociatedConceptsPreprocessor extends
|
|||
//This will put the URI value in scope for the first semantic type label
|
||||
//and generate the rest if need be
|
||||
processConceptSemanticValues();
|
||||
//Also need to see if any broader or narrower uris for the concepts that already exist in the system
|
||||
//and set up the appropriate relationships between this concept and the broader/narrower uri
|
||||
if (numberConcepts > 1) {
|
||||
processConceptNodes(numberConcepts);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
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.Dataset;
|
||||
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.QuerySolutionMap;
|
||||
import com.hp.hpl.jena.query.Syntax;
|
||||
import com.hp.hpl.jena.rdf.model.Literal;
|
||||
import com.hp.hpl.jena.rdf.model.Model;
|
||||
import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||
import com.hp.hpl.jena.rdf.model.Property;
|
||||
import com.hp.hpl.jena.rdf.model.ResIterator;
|
||||
import com.hp.hpl.jena.rdf.model.Resource;
|
||||
import com.hp.hpl.jena.rdf.model.ResourceFactory;
|
||||
import com.hp.hpl.jena.rdf.model.Statement;
|
||||
import com.hp.hpl.jena.shared.Lock;
|
||||
import com.hp.hpl.jena.vocabulary.RDF;
|
||||
import com.hp.hpl.jena.vocabulary.RDFS;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.jena.DatasetWrapper;
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.jena.DatasetWrapperFactory;
|
||||
|
||||
//We are representing semantic types from the UMLS Semantic Network as OWL Classes
|
||||
//and this preprocessor will add the appropriate class information to the TBox
|
||||
|
||||
public class ConceptSemanticTypesPreprocessor implements ModelChangePreprocessor {
|
||||
|
||||
private static String VIVOCore = "http://vivoweb.org/ontology/core#";
|
||||
private static String SKOSConceptType = "http://www.w3.org/2004/02/skos/core#Concept";
|
||||
private Log log = LogFactory.getLog(ConceptSemanticTypesPreprocessor.class);
|
||||
|
||||
private OntModel toUpdateModel = null;
|
||||
|
||||
//Custom constructor
|
||||
public ConceptSemanticTypesPreprocessor(OntModel updateModel) {
|
||||
this.toUpdateModel = updateModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preprocess(Model retractionsModel, Model additionsModel,
|
||||
HttpServletRequest request) {
|
||||
//Run a construct query against the additions model
|
||||
String prefixes = "PREFIX rdfs:<" + RDFS.getURI() + "> " +
|
||||
"PREFIX owl:<http://www.w3.org/2002/07/owl#> " +
|
||||
"PREFIX rdf:<" + RDF.getURI() + ">" +
|
||||
"PREFIX skos:<http://www.w3.org/2004/02/skos/core#>";
|
||||
String constructQuery = prefixes + " CONSTRUCT { " +
|
||||
"?semanticType rdf:type owl:Class. " +
|
||||
"?semanticType rdfs:subClassOf skos:Concept . " +
|
||||
"?semanticType rdfs:label ?label. " +
|
||||
"} WHERE { " +
|
||||
"?concept rdf:type ?semanticType. " +
|
||||
"?semanticType rdfs:label ?label . " +
|
||||
"?semanticType rdfs:subClassOf skos:Concept . " +
|
||||
"}";
|
||||
|
||||
//Execute construct query
|
||||
Model constructedModel = ModelFactory.createDefaultModel();
|
||||
|
||||
|
||||
log.debug("CONSTRUCT query string " + constructQuery);
|
||||
|
||||
Query query = null;
|
||||
try {
|
||||
query = QueryFactory.create(constructQuery, Syntax.syntaxARQ);
|
||||
} catch(Throwable th){
|
||||
log.error("Could not create CONSTRUCT SPARQL query for query " +
|
||||
"string. " + th.getMessage());
|
||||
log.error(constructQuery);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
additionsModel.getLock().enterCriticalSection(Lock.READ);
|
||||
QueryExecution qe = null;
|
||||
try {
|
||||
qe = QueryExecutionFactory.create(
|
||||
query, additionsModel);
|
||||
qe.execConstruct(constructedModel);
|
||||
} catch (Exception e) {
|
||||
log.error("Error getting constructed model for query string " + constructQuery);
|
||||
} finally {
|
||||
if (qe != null) {
|
||||
qe.close();
|
||||
}
|
||||
additionsModel.getLock().leaveCriticalSection();
|
||||
}
|
||||
|
||||
//Add constructed model to the designated update model
|
||||
toUpdateModel.enterCriticalSection(Lock.WRITE);
|
||||
try {
|
||||
toUpdateModel.add(constructedModel);
|
||||
} catch (Exception e) {
|
||||
log.error("Error adding statements to update model for " + constructQuery);
|
||||
} finally {
|
||||
toUpdateModel.leaveCriticalSection();
|
||||
}
|
||||
|
||||
//Take this constructed model and remove from the additions model
|
||||
additionsModel.enterCriticalSection(Lock.WRITE);
|
||||
try {
|
||||
additionsModel.remove(constructedModel.listStatements().toList());
|
||||
} catch (Exception e) {
|
||||
log.error("Error removing statements from additions model for " + constructQuery);
|
||||
} finally {
|
||||
additionsModel.leaveCriticalSection();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -280,7 +280,6 @@ change_selection = change selection
|
|||
# custom form templates ( /templates/freemarker/edit/forms )
|
||||
#
|
||||
manage_concepts = Manage Concepts
|
||||
remove_capitalized = Remove
|
||||
no_concepts_specified = There are currently no concepts specified.
|
||||
return_to_profile = Return to Profile Page
|
||||
external_vocabulary_services = External Vocabulary Services
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
|
@ -11,6 +11,9 @@
|
|||
<#if !labelCount??>
|
||||
<#assign labelCount = 0 >
|
||||
</#if>
|
||||
<#if !localesCount??>
|
||||
<#assign localesCount = 1>
|
||||
</#if>
|
||||
<#assign visRequestingTemplate = "foaf-person-wilma">
|
||||
<section id="individual-intro" class="vcard person" role="region">
|
||||
|
||||
|
@ -55,7 +58,7 @@
|
|||
<#else>
|
||||
<h1 class="vcard foaf-person">
|
||||
<#-- Label -->
|
||||
<span class="fn"><@p.label individual editable labelCount/></span>
|
||||
<span class="fn"><@p.label individual editable labelCount localesCount/></span>
|
||||
|
||||
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
|
||||
<#assign title = propertyGroups.pullProperty("${core}preferredTitle")!>
|
||||
|
|
Loading…
Add table
Reference in a new issue