Change PropertyKey class name and namespace (#386)
* Change PropertyKey class name and namespace * Fix prefix/namespace error found in code review.
This commit is contained in:
parent
c527de5ad8
commit
a22aa37394
14 changed files with 31468 additions and 31469 deletions
|
@ -68,13 +68,13 @@ public class TranslationConverter {
|
||||||
protected static final String THEMES_PATH = "/themes/";
|
protected static final String THEMES_PATH = "/themes/";
|
||||||
private static final String TEMPLATE_BODY = ""
|
private static final String TEMPLATE_BODY = ""
|
||||||
+ "?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#NamedIndividual> .\n"
|
+ "?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#NamedIndividual> .\n"
|
||||||
+ "?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core/properties/vocabulary#PropertyKey> .\n"
|
+ "?uri <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#UILabel> .\n"
|
||||||
+ "?uri <http://vivoweb.org/ontology/core/properties/vocabulary#hasApp> ?application .\n"
|
+ "?uri <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasApp> ?application .\n"
|
||||||
+ "?uri <http://vivoweb.org/ontology/core/properties/vocabulary#hasKey> ?key .\n";
|
+ "?uri <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasKey> ?key .\n";
|
||||||
private static final String TEMPLATE_LABEL = ""
|
private static final String TEMPLATE_LABEL = ""
|
||||||
+ "?uri <http://www.w3.org/2000/01/rdf-schema#label> ?label .\n";
|
+ "?uri <http://www.w3.org/2000/01/rdf-schema#label> ?label .\n";
|
||||||
private static final String TEMPLATE_THEME = ""
|
private static final String TEMPLATE_THEME = ""
|
||||||
+ "?uri <http://vivoweb.org/ontology/core/properties/vocabulary#hasTheme> ?theme .\n";
|
+ "?uri <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasTheme> ?theme .\n";
|
||||||
|
|
||||||
private static final String queryWithTheme(String langTag) {
|
private static final String queryWithTheme(String langTag) {
|
||||||
return
|
return
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class TranslationProvider {
|
||||||
private static final Log log = LogFactory.getLog(TranslationProvider.class);
|
private static final Log log = LogFactory.getLog(TranslationProvider.class);
|
||||||
private static final I18nLogger i18nLogger = new I18nLogger();
|
private static final I18nLogger i18nLogger = new I18nLogger();
|
||||||
private static final String QUERY = ""
|
private static final String QUERY = ""
|
||||||
+ "PREFIX : <http://vivoweb.org/ontology/core/properties/vocabulary#>\n"
|
+ "PREFIX : <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#>\n"
|
||||||
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n"
|
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n"
|
||||||
+ "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n"
|
+ "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n"
|
||||||
+ "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> \n"
|
+ "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> \n"
|
||||||
|
|
|
@ -22,11 +22,11 @@ import stubs.javax.servlet.ServletContextStub;
|
||||||
public class TranslationConverterTest {
|
public class TranslationConverterTest {
|
||||||
|
|
||||||
private static final String WILMA = "wilma";
|
private static final String WILMA = "wilma";
|
||||||
private static final String HAS_THEME = "http://vivoweb.org/ontology/core/properties/vocabulary#hasTheme";
|
private static final String HAS_THEME = "http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasTheme";
|
||||||
private static final String VITRO = "Vitro";
|
private static final String VITRO = "Vitro";
|
||||||
private static final String VIVO = "VIVO";
|
private static final String VIVO = "VIVO";
|
||||||
private static final String HAS_APP = "http://vivoweb.org/ontology/core/properties/vocabulary#hasApp";
|
private static final String HAS_APP = "http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasApp";
|
||||||
private static final String HAS_KEY = "http://vivoweb.org/ontology/core/properties/vocabulary#hasKey";
|
private static final String HAS_KEY = "http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasKey";
|
||||||
private static final String ROOT_PATH = "src/test/resources/edu/cornell/mannlib/vitro/webapp/i18n/TranslationConverterTest/root";
|
private static final String ROOT_PATH = "src/test/resources/edu/cornell/mannlib/vitro/webapp/i18n/TranslationConverterTest/root";
|
||||||
private static final String INIT_N3_FILE = "src/test/resources/edu/cornell/mannlib/vitro/webapp/i18n/TranslationConverterTest/modelInitContent.n3";
|
private static final String INIT_N3_FILE = "src/test/resources/edu/cornell/mannlib/vitro/webapp/i18n/TranslationConverterTest/modelInitContent.n3";
|
||||||
ServletContextStub ctx = new ServletContextStub();
|
ServletContextStub ctx = new ServletContextStub();
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||||
|
|
||||||
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663600>
|
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663600>
|
||||||
a owl:NamedIndividual , <http://vivoweb.org/ontology/core/properties/vocabulary#PropertyKey> ;
|
a owl:NamedIndividual , <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#UILabel> ;
|
||||||
rdfs:label "value from n3 file"@en-US ;
|
rdfs:label "value from n3 file"@en-US ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasApp>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasApp>
|
||||||
"VIVO" ;
|
"VIVO" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasKey>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasKey>
|
||||||
"property_to_overwrite" .
|
"property_to_overwrite" .
|
||||||
|
|
|
@ -4,74 +4,74 @@
|
||||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||||
|
|
||||||
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663600>
|
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663600>
|
||||||
a owl:NamedIndividual , <http://vivoweb.org/ontology/core/properties/vocabulary#PropertyKey> ;
|
a owl:NamedIndividual , <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#UILabel> ;
|
||||||
rdfs:label "testkey VIVO no theme en-US"@en-US ;
|
rdfs:label "testkey VIVO no theme en-US"@en-US ;
|
||||||
rdfs:label "testkey VIVO no theme de-DE"@de-DE ;
|
rdfs:label "testkey VIVO no theme de-DE"@de-DE ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasApp>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasApp>
|
||||||
"VIVO" ;
|
"VIVO" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasKey>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasKey>
|
||||||
"testkey" .
|
"testkey" .
|
||||||
|
|
||||||
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663601>
|
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663601>
|
||||||
a owl:NamedIndividual , <http://vivoweb.org/ontology/core/properties/vocabulary#PropertyKey> ;
|
a owl:NamedIndividual , <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#UILabel> ;
|
||||||
rdfs:label "testkey Vitro no theme en-US"@en-US ;
|
rdfs:label "testkey Vitro no theme en-US"@en-US ;
|
||||||
rdfs:label "testkey Vitro no theme de-DE"@de-DE ;
|
rdfs:label "testkey Vitro no theme de-DE"@de-DE ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasApp>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasApp>
|
||||||
"Vitro" ;
|
"Vitro" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasKey>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasKey>
|
||||||
"testkey" .
|
"testkey" .
|
||||||
|
|
||||||
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663602>
|
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663602>
|
||||||
a owl:NamedIndividual , <http://vivoweb.org/ontology/core/properties/vocabulary#PropertyKey> ;
|
a owl:NamedIndividual , <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#UILabel> ;
|
||||||
rdfs:label "testkey VIVO wilma en-US"@en-US ;
|
rdfs:label "testkey VIVO wilma en-US"@en-US ;
|
||||||
rdfs:label "testkey VIVO wilma de-DE"@de-DE ;
|
rdfs:label "testkey VIVO wilma de-DE"@de-DE ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasApp>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasApp>
|
||||||
"VIVO" ;
|
"VIVO" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasTheme>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasTheme>
|
||||||
"wilma" ;
|
"wilma" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasKey>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasKey>
|
||||||
"testkey" .
|
"testkey" .
|
||||||
|
|
||||||
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663603>
|
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663603>
|
||||||
a owl:NamedIndividual , <http://vivoweb.org/ontology/core/properties/vocabulary#PropertyKey> ;
|
a owl:NamedIndividual , <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#UILabel> ;
|
||||||
rdfs:label "testkey Vitro wilma en-US"@en-US ;
|
rdfs:label "testkey Vitro wilma en-US"@en-US ;
|
||||||
rdfs:label "testkey Vitro wilma de-DE"@de-DE ;
|
rdfs:label "testkey Vitro wilma de-DE"@de-DE ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasApp>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasApp>
|
||||||
"Vitro" ;
|
"Vitro" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasTheme>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasTheme>
|
||||||
"wilma" ;
|
"wilma" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasKey>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasKey>
|
||||||
"testkey" .
|
"testkey" .
|
||||||
|
|
||||||
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663604>
|
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663604>
|
||||||
a owl:NamedIndividual , <http://vivoweb.org/ontology/core/properties/vocabulary#PropertyKey> ;
|
a owl:NamedIndividual , <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#UILabel> ;
|
||||||
rdfs:label "testkey Vitro vitro en-US"@en-US ;
|
rdfs:label "testkey Vitro vitro en-US"@en-US ;
|
||||||
rdfs:label "testkey Vitro vitro de-DE"@de-DE ;
|
rdfs:label "testkey Vitro vitro de-DE"@de-DE ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasApp>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasApp>
|
||||||
"Vitro" ;
|
"Vitro" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasTheme>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasTheme>
|
||||||
"vitro" ;
|
"vitro" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasKey>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasKey>
|
||||||
"testkey" .
|
"testkey" .
|
||||||
|
|
||||||
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663605>
|
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663605>
|
||||||
a owl:NamedIndividual , <http://vivoweb.org/ontology/core/properties/vocabulary#PropertyKey> ;
|
a owl:NamedIndividual , <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#UILabel> ;
|
||||||
rdfs:label "testkey_app_fallback Vitro wilma en-US"@en-US ;
|
rdfs:label "testkey_app_fallback Vitro wilma en-US"@en-US ;
|
||||||
rdfs:label "testkey_app_fallback Vitro wilma de-DE"@de-DE ;
|
rdfs:label "testkey_app_fallback Vitro wilma de-DE"@de-DE ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasApp>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasApp>
|
||||||
"Vitro" ;
|
"Vitro" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasTheme>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasTheme>
|
||||||
"wilma" ;
|
"wilma" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasKey>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasKey>
|
||||||
"testkey_app_fallback" .
|
"testkey_app_fallback" .
|
||||||
|
|
||||||
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663606>
|
<urn:uuid:8c80dbf5-adda-41d5-a6fe-d5efde663606>
|
||||||
a owl:NamedIndividual , <http://vivoweb.org/ontology/core/properties/vocabulary#PropertyKey> ;
|
a owl:NamedIndividual , <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#UILabel> ;
|
||||||
rdfs:label "testkey_app_fallback Vitro no theme en-US"@en-US ;
|
rdfs:label "testkey_app_fallback Vitro no theme en-US"@en-US ;
|
||||||
rdfs:label "testkey_app_fallback Vitro no theme de-DE"@de-DE ;
|
rdfs:label "testkey_app_fallback Vitro no theme de-DE"@de-DE ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasApp>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasApp>
|
||||||
"Vitro" ;
|
"Vitro" ;
|
||||||
<http://vivoweb.org/ontology/core/properties/vocabulary#hasKey>
|
<http://vivoweb.org/ontology/vitro/ui-label/vocabulary#hasKey>
|
||||||
"testkey_app_fallback" .
|
"testkey_app_fallback" .
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,39 +1,38 @@
|
||||||
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||||
@prefix prop-data: <http://vivoweb.org/ontology/core/properties/individual#> .
|
@prefix uil: <http://vivoweb.org/ontology/vitro/ui-label/vocabulary#> .
|
||||||
@prefix prop: <http://vivoweb.org/ontology/core/properties/vocabulary#> .
|
|
||||||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
||||||
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
||||||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||||
|
|
||||||
prop:hasPackage rdf:type owl:DatatypeProperty ;
|
uil:hasPackage rdf:type owl:DatatypeProperty ;
|
||||||
rdfs:domain prop:PropertyKey ;
|
rdfs:domain uil:UILabel ;
|
||||||
rdfs:label "has package" ;
|
rdfs:label "has package" ;
|
||||||
rdfs:range xsd:string .
|
rdfs:range xsd:string .
|
||||||
|
|
||||||
prop:hasKey rdf:type owl:DatatypeProperty ;
|
uil:hasKey rdf:type owl:DatatypeProperty ;
|
||||||
rdfs:comment "Value of the key" ;
|
rdfs:comment "value of the key" ;
|
||||||
rdfs:domain prop:PropertyKey ;
|
rdfs:domain uil:UILabel ;
|
||||||
rdfs:label "Propertie file url " ;
|
rdfs:label "has key" ;
|
||||||
rdfs:range xsd:string .
|
rdfs:range xsd:string .
|
||||||
|
|
||||||
prop:hasTheme rdf:type owl:DatatypeProperty ;
|
uil:hasTheme rdf:type owl:DatatypeProperty ;
|
||||||
rdfs:domain prop:PropertyKey ;
|
rdfs:domain uil:UILabel ;
|
||||||
rdfs:label "has theme" ;
|
rdfs:label "has theme" ;
|
||||||
rdfs:range xsd:string .
|
rdfs:range xsd:string .
|
||||||
|
|
||||||
prop:PropertyKey rdf:type owl:Class ;
|
uil:UILabel rdf:type owl:Class ;
|
||||||
rdfs:label skos:Concept ;
|
rdfs:label skos:Concept ;
|
||||||
rdfs:subClassOf owl:Thing ;
|
rdfs:subClassOf owl:Thing ;
|
||||||
rdfs:subClassOf skos:Concept .
|
rdfs:subClassOf skos:Concept .
|
||||||
|
|
||||||
prop:ftlUrl rdf:type owl:DatatypeProperty ;
|
uil:ftlUrl rdf:type owl:DatatypeProperty ;
|
||||||
rdfs:comment "Points to the FTL file containing the key" ;
|
rdfs:comment "Points to the Freemarker template (.ftl) file containing the key." ;
|
||||||
rdfs:domain prop:PropertyKey ;
|
rdfs:domain uil:UILabel ;
|
||||||
rdfs:label "ftl file url" ;
|
rdfs:label ".ftl file url" ;
|
||||||
rdfs:range xsd:anyURI .
|
rdfs:range xsd:anyURI .
|
||||||
|
|
||||||
prop:hasApp rdf:type owl:DatatypeProperty ;
|
uil:hasApp rdf:type owl:DatatypeProperty ;
|
||||||
rdfs:domain prop:PropertyKey ;
|
rdfs:domain uil:UILabel ;
|
||||||
rdfs:label "has application" ;
|
rdfs:label "has application" ;
|
||||||
rdfs:range xsd:string .
|
rdfs:range xsd:string .
|
||||||
|
|
Loading…
Add table
Reference in a new issue