diff --git a/languages/example/themes/wilma/i18n/all_es.properties b/languages/example/themes/wilma/i18n/all_es.properties
index de7ddaab..c779a684 100644
--- a/languages/example/themes/wilma/i18n/all_es.properties
+++ b/languages/example/themes/wilma/i18n/all_es.properties
@@ -109,6 +109,7 @@ websites = Websites
advisee_label = etiqueta aconsejado
advisor_label = etiqueta asesor
candidate = candidato
+candidate = candidatura
advisingRel_label = Etiqueta de advertencia
editor_abbreviated = Ed.
diff --git a/productMods/config/listViewConfig-additionalEmail.xml b/productMods/config/listViewConfig-additionalEmail.xml
index 50dc4188..70d90167 100644
--- a/productMods/config/listViewConfig-additionalEmail.xml
+++ b/productMods/config/listViewConfig-additionalEmail.xml
@@ -7,13 +7,14 @@
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
- SELECT DISTINCT ?vcard ?email
+ SELECT DISTINCT ?vcard
+ ?email
?emailAddress
WHERE {
?subject ?property ?vcard .
- ?vcard vcard:hasEmail ?email
- OPTIONAL { ?email vcard:email ?emailAddress }
- MINUS {?email a vcard:Work}
+ ?vcard vcard:hasEmail ?email .
+ ?email vcard:email ?emailAddress
+ MINUS {?email a vcard:Work}
}
@@ -24,16 +25,9 @@
?vcard vcard:hasEmail ?email .
?email ?emailProperty ?emailValue
} WHERE {
- {
- ?subject ?property ?vcard
- } UNION {
- ?subject ?property ?vcard .
- ?vcard vcard:hasEmail ?email
- } UNION {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email .
?email ?emailProperty ?emailValue
- }
}
diff --git a/productMods/config/listViewConfig-adviseeIn.xml b/productMods/config/listViewConfig-adviseeIn.xml
index 293bca38..b7d6e261 100644
--- a/productMods/config/listViewConfig-adviseeIn.xml
+++ b/productMods/config/listViewConfig-adviseeIn.xml
@@ -33,14 +33,11 @@
OPTIONAL { ?advisingRel rdfs:label ?advisingRelLabel }
OPTIONAL { ?advisingRel core:relates ?advisor .
?advisor a foaf:Person .
- ?advisor <http://purl.obolibrary.org/obo/RO_0000053> ?advisorRole .
- ?advisorRole a core:AdvisorRole .
OPTIONAL { ?advisor rdfs:label ?advisorLabel }
}
- OPTIONAL { ?advisingRel core:relates ?degree .
- ?degree a core:AcademicDegree .
- OPTIONAL { ?degree rdfs:label ?degreeLabel }
- OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
+ OPTIONAL { ?advisingRel core:degreeCandidacy ?degree .
+ ?degree rdfs:label ?degreeLabel .
+ ?degree core:abbreviation ?degreeAbbr
}
OPTIONAL { ?advisingRel vitro:mostSpecificType ?subclass .
@@ -76,31 +73,18 @@
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
CONSTRUCT {
?subject ?property ?adviseeRole .
- ?adviseeRole a core:AdviseeRole .
?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
- ?advisingRel a core:AdvisingRelationship .
- ?advisingRel ?advisingRelProperty ?advisingRelValue .
?advisingRel rdfs:label ?advisingRelLabel .
} WHERE {
{
?subject ?property ?adviseeRole .
?adviseeRole a core:AdviseeRole .
?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship
} UNION {
?subject ?property ?adviseeRole .
?adviseeRole a core:AdviseeRole .
?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
- ?advisingRel a core:AdvisingRelationship .
- ?advisingRel ?advisingRelProperty ?advisingRelValue
- } UNION {
- ?subject ?property ?adviseeRole .
- ?adviseeRole a core:AdviseeRole .
- ?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel ?advisingRelProperty ?advisingRelValue .
?advisingRel rdfs:label ?advisingRelLabel
@@ -118,15 +102,13 @@
?subject ?property ?adviseeRole .
?adviseeRole a core:AdviseeRole .
?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel core:relates ?advisor .
?advisor a foaf:Person .
- ?advisor rdfs:label ?advisorLabel .
?advisor <http://purl.obolibrary.org/obo/RO_0000053> ?advisorRole .
+ ?advisor rdfs:label ?advisorLabel .
?advisorRole a core:AdvisorRole .
- ?advisingRel core:relates ?degree .
- ?degree a core:AcademicDegree .
+ ?advisingRel core:degreeCandidacy ?degree .
?degree rdfs:label ?degreeLabel .
?degree core:abbreviation ?degreeAbbr
} WHERE {
@@ -134,54 +116,23 @@
?subject ?property ?adviseeRole .
?adviseeRole a core:AdviseeRole .
?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
} UNION {
?subject ?property ?adviseeRole .
?adviseeRole a core:AdviseeRole .
?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
- ?advisingRel a core:AdvisingRelationship .
- ?advisingRel core:relates ?advisor .
- ?advisor a foaf:Person .
- ?advisor <http://purl.obolibrary.org/obo/RO_0000053> ?advisorRole .
- ?advisorRole a core:AdvisorRole
- } UNION {
- ?subject ?property ?adviseeRole .
- ?adviseeRole a core:AdviseeRole .
- ?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel core:relates ?advisor .
?advisor a foaf:Person .
?advisor <http://purl.obolibrary.org/obo/RO_0000053> ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisor rdfs:label ?advisorLabel
- } UNION {
+ } UNION {
?subject ?property ?adviseeRole .
?adviseeRole a core:AdviseeRole .
?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
- ?advisingRel core:relates ?degree .
- ?degree a core:AcademicDegree .
- } UNION {
- ?subject ?property ?adviseeRole .
- ?adviseeRole a core:AdviseeRole .
- ?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
- ?advisingRel a core:AdvisingRelationship .
- ?advisingRel core:relates ?degree .
- ?degree a core:AcademicDegree .
- ?degree rdfs:label ?degreeLabel
- } UNION {
- ?subject ?property ?adviseeRole .
- ?adviseeRole a core:AdviseeRole .
- ?adviseeRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
- ?advisingRel a core:AdvisingRelationship .
- ?advisingRel core:relates ?degree .
- ?degree a core:AcademicDegree .
+ ?advisingRel core:degreeCandidacy ?degree .
?degree rdfs:label ?degreeLabel .
?degree core:abbreviation ?degreeAbbr
}
@@ -192,20 +143,20 @@
PREFIX core: <http://vivoweb.org/ontology/core#>
CONSTRUCT {
?subject ?property ?adviseeRole .
- ?adviseeRole a core:AdviseeRole .
?adviseeRole core:relatedBy ?advisingRel .
?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
- ?award core:dateTimeInterval ?dateTimeInterval .
+ ?advisingRel core:dateTimeInterval ?dateTimeInterval .
+ ?advisingRel core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
} WHERE {
- ?subject ?property ?advisingRel .
+ ?subject ?property ?adviseeRole .
?adviseeRole a core:AdviseeRole .
?adviseeRole core:relatedBy ?advisingRel .
?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
- ?award core:dateTimeInterval ?dateTimeInterval .
+ ?advisingRel core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
@@ -215,11 +166,10 @@
PREFIX core: <http://vivoweb.org/ontology/core#>
CONSTRUCT {
?subject ?property ?adviseeRole .
- ?adviseeRole a core:AdviseeRole .
?adviseeRole core:relatedBy ?advisingRel .
?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
- ?award core:dateTimeInterval ?dateTimeInterval .
+ ?advisingRel core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
} WHERE {
@@ -228,7 +178,7 @@
?adviseeRole core:relatedBy ?advisingRel .
?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
- ?award core:dateTimeInterval ?dateTimeInterval .
+ ?advisingRel core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
diff --git a/productMods/config/listViewConfig-advisorIn.xml b/productMods/config/listViewConfig-advisorIn.xml
index e1254bda..71f60a20 100644
--- a/productMods/config/listViewConfig-advisorIn.xml
+++ b/productMods/config/listViewConfig-advisorIn.xml
@@ -4,16 +4,16 @@
-
- PREFIX foaf: <http://xmlns.com/foaf/0.1/>
- PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
- PREFIX bibo: <http://purl.org/ontology/bibo/>
- PREFIX core: <http://vivoweb.org/ontology/core#>
- PREFIX owl: <http://www.w3.org/2002/07/owl#>
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+
+ PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+ PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
+ PREFIX bibo: <http://purl.org/ontology/bibo/>
+ PREFIX core: <http://vivoweb.org/ontology/core#>
+ PREFIX owl: <http://www.w3.org/2002/07/owl#>
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
- SELECT DISTINCT ?subclass
+ SELECT DISTINCT ?subclass
?advisorRole
?advisingRel
?advisingRelLabel
@@ -28,9 +28,8 @@
WHERE {
?subject ?property ?advisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
LET ( ?localName := afn:localname(?advisingRel) )
- OPTIONAL { ?advisingRel rdfs:label ?advisingRelLabel }
+ OPTIONAL { ?advisingRel rdfs:label ?advisingRelLabel }
OPTIONAL { ?advisingRel core:relates ?advisee .
?advisee a foaf:Person .
?advisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole .
@@ -43,41 +42,46 @@
}
OPTIONAL { ?advisingRel vitro:mostSpecificType ?subclass .
- ?subclass rdfs:subClassOf core:AdvisingRelationship
+ ?subclass rdfs:subClassOf core:AdvisingRelationship
}
-
- OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval
+
+ OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
- ?dateTimeStartValue core:dateTime ?dateTimeStart
+ ?dateTimeStartValue core:dateTime ?dateTimeStart
}
- }
- OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval
+ }
+ OPTIONAL { ?advisingRel core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
- }
+ }
- } ORDER BY ?subclass DESC(?dateTimeEnd)
+ } ORDER BY ?subclass DESC(?dateTimeEnd)
PREFIX core: <http://vivoweb.org/ontology/core#>
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+ PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
CONSTRUCT {
- ?subclass rdfs:subClassOf core:AdvisingRelationship
+ ?advisingRel vitro:mostSpecificType ?subclass .
+ ?subclass rdfs:subClassOf core:AdvisingRelationship
} WHERE {
- ?subclass rdfs:subClassOf core:AdvisingRelationship
+ ?subject ?property ?advisorRole .
+ ?advisorRole core:relatedBy ?advisingRel .
+ ?advisingRel a core:AdvisingRelationship .
+ ?advisingRel vitro:mostSpecificType ?subclass .
+ ?subclass rdfs:subClassOf core:AdvisingRelationship
}
-
+
PREFIX core: <http://vivoweb.org/ontology/core#>
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
- CONSTRUCT {
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+ CONSTRUCT {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel ?advisingRelProperty ?advisingRelValue .
?advisingRel rdfs:label ?advisingRelLabel .
@@ -86,45 +90,39 @@
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
- ?advisingRel a core:AdvisingRelationship
+ ?advisingRel a core:AdvisingRelationship
} UNION {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
- ?advisingRel ?advisingRelProperty ?advisingRelValue
} UNION {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
- ?advisingRel ?advisingRelProperty ?advisingRelValue .
?advisingRel rdfs:label ?advisingRelLabel
- }
+ }
}
PREFIX bibo: <http://purl.org/ontology/bibo/>
- PREFIX core: <http://vivoweb.org/ontology/core#>
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+ PREFIX core: <http://vivoweb.org/ontology/core#>
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
CONSTRUCT {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel core:relates ?advisee .
?advisee a foaf:Person .
?advisee rdfs:label ?adviseeLabel .
?advisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole .
?adviseeRole a core:AdviseeRole .
- ?advisingRel core:relates ?degree .
+ ?advisingRel core:degreeCandidacy ?degree .
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeLabel .
?degree core:abbreviation ?degreeAbbr
@@ -133,23 +131,20 @@
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
- } UNION {
- ?subject ?property ?advisorRole .
- ?advisorRole a core:AdvisorRole .
- ?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
- ?advisingRel a core:AdvisingRelationship .
- ?advisingRel core:relates ?advisee .
- ?advisee a foaf:Person .
- ?advisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole .
- ?adviseeRole a core:AdviseeRole
} UNION {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
+ ?advisingRel a core:AdvisingRelationship .
+ ?advisingRel core:relates ?advisee .
+ ?advisee a foaf:Person .
+ ?advisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole .
+ ?adviseeRole a core:AdviseeRole
+ } UNION {
+ ?subject ?property ?advisorRole .
+ ?advisorRole a core:AdvisorRole .
+ ?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel core:relates ?advisee .
?advisee a foaf:Person .
@@ -160,61 +155,63 @@
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel core:degreeCandidacy ?degree .
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeLabel .
+ } UNION {
+ ?subject ?property ?advisorRole .
+ ?advisorRole a core:AdvisorRole .
+ ?advisorRole core:relatedBy ?advisingRel .
+ ?advisingRel a core:AdvisingRelationship .
+ ?advisingRel core:degreeCandidacy ?degree .
+ ?degree a core:AcademicDegree .
?degree core:abbreviation ?degreeAbbr
}
- }
+ }
- PREFIX core: <http://vivoweb.org/ontology/core#>
- CONSTRUCT {
+ PREFIX core: <http://vivoweb.org/ontology/core#>
+ CONSTRUCT {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
- ?dateTimeStartValue core:dateTime ?dateTimeStart
+ ?dateTimeStartValue core:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
- ?dateTimeStartValue core:dateTime ?dateTimeStart
- }
+ ?dateTimeStartValue core:dateTime ?dateTimeStart
+ }
- PREFIX core: <http://vivoweb.org/ontology/core#>
- CONSTRUCT {
+ PREFIX core: <http://vivoweb.org/ontology/core#>
+ CONSTRUCT {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
- ?dateTimeEndValue core:dateTime ?dateTimeEnd
+ ?dateTimeEndValue core:dateTime ?dateTimeEnd
} WHERE {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
- ?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
- ?dateTimeEndValue core:dateTime ?dateTimeEnd
- }
-
+ ?dateTimeEndValue core:dateTime ?dateTimeEnd
+ }
+
propStatement-advisorIn.ftl
diff --git a/productMods/config/listViewConfig-authorInAuthorship.xml b/productMods/config/listViewConfig-authorInAuthorship.xml
index 401eaad6..755ceff4 100644
--- a/productMods/config/listViewConfig-authorInAuthorship.xml
+++ b/productMods/config/listViewConfig-authorInAuthorship.xml
@@ -131,7 +131,6 @@
?infoResource core:hasPublicationVenue ?publishedIn .
?publishedIn rdfs:label ?journal
}
-
}
diff --git a/productMods/config/listViewConfig-awardOrHonor.xml b/productMods/config/listViewConfig-awardOrHonor.xml
index 14e49603..b4f07be7 100644
--- a/productMods/config/listViewConfig-awardOrHonor.xml
+++ b/productMods/config/listViewConfig-awardOrHonor.xml
@@ -63,10 +63,12 @@
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:relates ?award .
?award a core:Award .
- ?award core:relatedBy ?awardReceipt .
+ ?award core:relatedBy ?awardReceipt .
?award rdfs:label ?awardLabel .
?award core:assignedBy ?assignedBy .
- ?assignedBy rdfs:label ?assignedByLabel
+ ?assignedBy rdfs:label ?assignedByLabel .
+ ?awardReceipt core:dateTimeValue ?dateTimeValue .
+ ?dateTimeValue core:dateTime ?dateTime
} WHERE {
{
?subject ?property ?awardReceipt .
@@ -75,13 +77,6 @@
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt rdfs:label ?receiptLabel
- } UNION {
- ?subject ?property ?awardReceipt .
- ?awardReceipt a core:AwardReceipt .
- ?awardReceipt rdfs:label ?receiptLabel .
- ?awardReceipt core:relates ?award .
- ?award a core:Award .
- ?award core:relatedBy ?awardReceipt
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
@@ -96,19 +91,13 @@
?awardReceipt rdfs:label ?receiptLabel .
?awardReceipt core:relates ?award .
?award a core:Award .
- ?award core:relatedBy ?awardReceipt .
- ?award rdfs:label ?awardLabel .
- ?award core:assignedBy ?assignedBy
+ ?award core:assignedBy ?assignedBy .
+ ?assignedBy rdfs:label ?assignedByLabel
} UNION {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
- ?awardReceipt rdfs:label ?receiptLabel .
- ?awardReceipt core:relates ?award .
- ?award a core:Award .
- ?award core:relatedBy ?awardReceipt .
- ?award rdfs:label ?awardLabel .
- ?award core:assignedBy ?assignedBy .
- ?assignedBy rdfs:label ?assignedByLabel
+ ?awardReceipt core:dateTimeValue ?dateTimeValue .
+ ?dateTimeValue core:dateTime ?dateTime
}
}
@@ -146,22 +135,5 @@
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
-
-
- PREFIX core: <http://vivoweb.org/ontology/core#>
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
- CONSTRUCT {
- ?subject ?property ?awardReceipt .
- ?awardReceipt a core:AwardReceipt .
- ?awardReceipt core:dateTimeValue ?dateTimeValue .
- ?dateTimeValue core:dateTime ?dateTime
- } WHERE {
- ?subject ?property ?awardReceipt .
- ?awardReceipt a core:AwardReceipt .
- ?awardReceipt core:dateTimeValue ?dateTimeValue .
- ?dateTimeValue core:dateTime ?dateTime
- }
-
-
propStatement-awardOrHonor.ftl
diff --git a/productMods/config/listViewConfig-editorship.xml b/productMods/config/listViewConfig-editorship.xml
index 35491465..cda8e845 100644
--- a/productMods/config/listViewConfig-editorship.xml
+++ b/productMods/config/listViewConfig-editorship.xml
@@ -17,10 +17,10 @@
?infoResource ?infoResourceName
?dateTime
WHERE {
- ?subject ?property ?editorship .
- ?editorship core:relates ?infoResource .
- ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
- ?infoResource rdfs:label ?infoResourceName .
+ ?subject ?property ?editorship .
+ ?editorship core:relates ?infoResource .
+ ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
+ ?infoResource rdfs:label ?infoResourceName .
OPTIONAL { ?infoResource vitro:mostSpecificType ?subclass }
OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue .
@@ -60,47 +60,30 @@
?subject ?property ?editorship .
?editorship core:relates ?infoResource .
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
- ?infoResource rdfs:label ?infoResourceName
+ ?infoResource rdfs:label ?infoResourceName .
+ ?infoResource core:dateTimeValue ?dateTimeValue .
+ ?dateTimeValue core:dateTime ?dateTime
} WHERE {
{
?subject ?property ?editorship .
?editorship a core:Editorship
}
UNION {
- ?subject ?property ?editorship .
- ?editorship a core:Editorship .
- ?editorship core:relates ?infoResource .
- ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030>
- } UNION {
?subject ?property ?editorship .
?editorship a core:Editorship .
?editorship core:relates ?infoResource .
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
?infoResource rdfs:label ?infoResourceName
- }
+ } UNION {
+ ?subject ?property ?editorship .
+ ?editorship a core:Editorship .
+ ?editorship core:relates ?infoResource .
+ ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
+ ?infoResource core:dateTimeValue ?dateTimeValue .
+ ?dateTimeValue core:dateTime ?dateTime
+ }
}
-
-
- PREFIX core: <http://vivoweb.org/ontology/core#>
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
- PREFIX bibo: <http://purl.org/ontology/bibo/>
- CONSTRUCT {
- ?subject ?property ?editorship .
- ?editorship a core:Editorship .
- ?editorship core:relates ?infoResource .
- ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
- ?infoResource core:dateTimeValue ?dateTimeValue .
- ?dateTimeValue core:dateTime ?dateTime
- } WHERE {
- ?subject ?property ?editorship .
- ?editorship a core:Editorship .
- ?editorship core:relates ?infoResource .
- ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
- ?infoResource core:dateTimeValue ?dateTimeValue .
- ?dateTimeValue core:dateTime ?dateTime
- }
-
-
+
propStatement-editorship.ftl
diff --git a/productMods/config/listViewConfig-educationalTraining.xml b/productMods/config/listViewConfig-educationalTraining.xml
index 20d78be3..863b44bc 100644
--- a/productMods/config/listViewConfig-educationalTraining.xml
+++ b/productMods/config/listViewConfig-educationalTraining.xml
@@ -11,9 +11,8 @@
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
- SELECT DISTINCT ?subclass
+ SELECT DISTINCT ?subclass
?edTraining
- ?typeName
?org ?orgName
?degreeName ?degreeAbbr
?majorField ?deptOrSchool ?info
@@ -21,10 +20,7 @@
WHERE {
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess
- OPTIONAL {?edTraining vitro:mostSpecificType ?subclass .
- ?trainingType rdfs:subClassOf core:EducationalProcess .
- ?trainingType rdfs:label ?typeName
- }
+ OPTIONAL { ?edTraining vitro:mostSpecificType ?subclass . }
OPTIONAL { ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree .
?awardedDegree core:relates ?degree .
?degree a core:AcademicDegree
@@ -52,11 +48,14 @@
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <http://vivoweb.org/ontology/core#>
+ PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
CONSTRUCT {
- ?subclass rdfs:subClassOf core:EducationalProcess .
+ ?edTraining vitro:mostSpecificType ?subclass
} WHERE {
- ?subclass rdfs:subClassOf core:EducationalProcess .
+ ?subject ?property ?edTraining .
+ ?edTraining a core:EducationalProcess .
+ ?edTraining vitro:mostSpecificType ?subclass .
}
@@ -81,11 +80,6 @@
?edTraining a core:EducationalProcess .
?edTraining ?edTrainingProp ?edTrainingValue
}
- UNION {
- ?subject ?property ?edTraining .
- ?edTraining a core:EducationalProcess .
- ?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree .
- }
UNION {
?subject ?property ?edTraining .
?edTraining a core:EducationalProcess .
@@ -143,33 +137,6 @@
}
-
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
- PREFIX core: <http://vivoweb.org/ontology/core#>
- PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
- CONSTRUCT {
- ?subject ?property ?edTraining .
- ?edTraining a core:EducationalProcess .
- ?edTraining vitro:mostSpecificType ?trainingType .
- ?trainingType rdfs:subClassOf core:EducationalTraining .
- ?trainingType rdfs:label ?typeName
- } WHERE {
- {
- ?subject ?property ?edTraining .
- ?edTraining a core:EducationalProcess .
- ?edTraining vitro:mostSpecificType ?trainingType .
- ?trainingType rdfs:subClassOf core:EducationalTraining
- } UNION
- {
- ?subject ?property ?edTraining .
- ?edTraining a core:EducationalProcess .
- ?edTraining vitro:mostSpecificType ?trainingType .
- ?trainingType rdfs:subClassOf core:EducationalTraining .
- ?trainingType rdfs:label ?typeName
- }
- }
-
-
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <http://vivoweb.org/ontology/core#>
diff --git a/productMods/config/listViewConfig-faxNumber.xml b/productMods/config/listViewConfig-faxNumber.xml
index af509c32..fa3addcb 100644
--- a/productMods/config/listViewConfig-faxNumber.xml
+++ b/productMods/config/listViewConfig-faxNumber.xml
@@ -12,9 +12,8 @@
WHERE {
?subject ?property ?vcard .
?vcard vcard:hasTelephone ?phone .
- ?phone a vcard:Fax
- OPTIONAL { ?phone vcard:telephone ?number }
-
+ ?phone a vcard:Fax .
+ ?phone vcard:telephone ?number
}
@@ -26,18 +25,10 @@
?phone a vcard:Fax .
?phone ?phoneProperty ?phoneValue
} WHERE {
- {
- ?subject ?property ?vcard
- } UNION {
- ?subject ?property ?vcard .
- ?vcard vcard:hasTelephone ?phone .
- ?phone a vcard:Fax
- } UNION {
?subject ?property ?vcard .
?vcard vcard:hasTelephone ?phone .
?phone a vcard:Fax .
?phone ?phoneProperty ?phoneValue
- }
}
diff --git a/productMods/config/listViewConfig-fullName.xml b/productMods/config/listViewConfig-fullName.xml
index 98953c4e..9e8adc65 100644
--- a/productMods/config/listViewConfig-fullName.xml
+++ b/productMods/config/listViewConfig-fullName.xml
@@ -34,9 +34,6 @@
} WHERE {
{
?subject ?property ?vcard
- } UNION {
- ?subject ?property ?vcard .
- ?vcard vcard:hasName ?fullName
} UNION {
?subject ?property ?vcard .
?vcard vcard:hasName ?fullName .
diff --git a/productMods/config/listViewConfig-hasAttendeeRole.xml b/productMods/config/listViewConfig-hasAttendeeRole.xml
index a09eeba6..1bd7bc9c 100644
--- a/productMods/config/listViewConfig-hasAttendeeRole.xml
+++ b/productMods/config/listViewConfig-hasAttendeeRole.xml
@@ -175,24 +175,12 @@
} WHERE {
{
- ?subject ?property ?role .
- ?role a vivo:AttendeeRole .
- ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
- ?event2 a event:Event .
- ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2
- } UNION {
?subject ?property ?role .
?role a vivo:AttendeeRole .
?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
?event2 a event:Event .
?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2 .
?event2 rdfs:label ?event2Label
- } UNION {
- ?subject ?property ?role .
- ?role a vivo:AttendeeRole .
- ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
- ?event2 a event:Event .
- ?event2 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1
} UNION {
?subject ?property ?role .
?role a vivo:AttendeeRole .
@@ -221,13 +209,6 @@
?event2 rdfs:label ?event2Label
} WHERE {
{
- ?subject ?property ?role .
- ?role a vivo:AttendeeRole .
- ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
- ?event2 a event:Event .
- ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 .
- ?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2
- } UNION {
?subject ?property ?role .
?role a vivo:AttendeeRole .
?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
@@ -235,13 +216,6 @@
?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 .
?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?event2 .
?event2 rdfs:label ?event2Label
- } UNION {
- ?subject ?property ?role .
- ?role a vivo:AttendeeRole .
- ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
- ?event2 a event:Event .
- ?event2 <http://purl.obolibrary.org/obo/BFO_0000051> ?event3 .
- ?event3 <http://purl.obolibrary.org/obo/BFO_0000051> ?event1
} UNION {
?subject ?property ?role .
?role a vivo:AttendeeRole .
@@ -270,24 +244,12 @@
} WHERE {
{
- ?subject ?property ?role .
- ?role a vivo:AttendeeRole .
- ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
- ?series a vivo:EventSeries .
- ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?series
- } UNION {
?subject ?property ?role .
?role a vivo:AttendeeRole .
?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
?series a vivo:EventSeries .
?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?series .
?series rdfs:label ?seriesLabel
- } UNION {
- ?subject ?property ?role .
- ?role a vivo:AttendeeRole .
- ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
- ?series a vivo:EventSeries .
- ?series <http://purl.obolibrary.org/obo/BFO_0000051> ?event1
} UNION {
?subject ?property ?role .
?role a vivo:AttendeeRole .
@@ -315,13 +277,6 @@
?series rdfs:label ?seriesLabel
} WHERE {
{
- ?subject ?property ?role .
- ?role a vivo:AttendeeRole .
- ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
- ?series a vivo:EventSeries .
- ?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 .
- ?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?series
- } UNION {
?subject ?property ?role .
?role a vivo:AttendeeRole .
?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
@@ -329,13 +284,6 @@
?event1 <http://purl.obolibrary.org/obo/BFO_0000050> ?event3 .
?event3 <http://purl.obolibrary.org/obo/BFO_0000050> ?series .
?series rdfs:label ?seriesLabel
- } UNION {
- ?subject ?property ?role .
- ?role a vivo:AttendeeRole .
- ?role <http://purl.obolibrary.org/obo/BFO_0000054> ?event1 .
- ?series a vivo:EventSeries .
- ?series <http://purl.obolibrary.org/obo/BFO_0000051> ?event3 .
- ?workshop <http://purl.obolibrary.org/obo/BFO_0000051> ?event1
} UNION {
?subject ?property ?role .
?role a vivo:AttendeeRole .
diff --git a/productMods/config/listViewConfig-hasEditorRole.xml b/productMods/config/listViewConfig-hasEditorRole.xml
index fbae2795..0d2b7854 100644
--- a/productMods/config/listViewConfig-hasEditorRole.xml
+++ b/productMods/config/listViewConfig-hasEditorRole.xml
@@ -69,11 +69,6 @@
?role a core:EditorRole .
?role core:roleContributesTo ?activity .
?activity rdfs:label ?activityName .
- } UNION {
- ?subject ?property ?role .
- ?role a core:EditorRole .
- ?role core:roleContributesTo ?activity .
- ?activity vitro:mostSpecificType ?subclass
} UNION {
?subject ?property ?role .
?role a core:EditorRole .
diff --git a/productMods/config/listViewConfig-personInPosition.xml b/productMods/config/listViewConfig-personInPosition.xml
index 6c161705..6922110b 100644
--- a/productMods/config/listViewConfig-personInPosition.xml
+++ b/productMods/config/listViewConfig-personInPosition.xml
@@ -1,168 +1,174 @@
-
-
-
-
-
-
-
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
- PREFIX core: <http://vivoweb.org/ontology/core#>
- PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
- PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
-
- SELECT DISTINCT ?subclass
- ?position
- ?positionTitle
- ?hrJobTitle
- ?rank
- ?org ?orgName
- ?middleOrg ?middleOrgName
- ?outerOrg ?outerOrgName
- ?dateTimeStart ?dateTimeEnd WHERE {
- ?subject ?property ?position
- OPTIONAL { ?position core:relates ?org .
- ?org rdfs:label ?orgName
- OPTIONAL { ?org core:subOrganizationWithin ?middleOrg .
- ?middleOrg rdfs:label ?middleOrgName
- OPTIONAL { ?middleOrg core:subOrganizationWithin ?outerOrg .
- ?outerOrg rdfs:label ?outerOrgName
- }
- }
- }
- OPTIONAL { ?position rdfs:label ?positionTitle }
- OPTIONAL { ?position core:hrJobTitle ?hrJobTitle }
- OPTIONAL { ?position core:rank ?rank }
- OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval
- OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
- ?dateTimeStartValue core:dateTime ?dateTimeStart
- }
- OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
- ?dateTimeEndValue core:dateTime ?dateTimeEnd
- }
- }
-
- OPTIONAL { ?position vitro:mostSpecificType ?subclass .
- ?subclass rdfs:subClassOf core:Position
- }
-
-
- FILTER ( bound(?org) )
-
- } ORDER BY ?subclass DESC(?dateTimeEnd) ?rank
-
-
-
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
- PREFIX core: <http://vivoweb.org/ontology/core#>
- PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
- CONSTRUCT {
- ?subject ?property ?position .
- ?position vitro:mostSpecificType ?subclass .
- ?subclass rdfs:subClassOf core:Position
- } WHERE {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position vitro:mostSpecificType ?subclass .
- ?subclass rdfs:subClassOf core:Position
- }
-
-
-
- PREFIX core: <http://vivoweb.org/ontology/core#>
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
- PREFIX foaf: <http://xmlns.com/foaf/0.1/>
- CONSTRUCT {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position ?positionProperty ?positionValue .
- ?org rdfs:label ?orgName .
- ?org core:subOrganizationWithin ?middleOrg .
- ?middleOrg rdfs:label ?middleOrgName .
- ?middleOrg core:subOrganizationWithin ?outerOrg .
- ?outerOrg rdfs:label ?outerOrgName
- } WHERE {
- {
- ?subject ?property ?position .
- ?position a core:Position .
- } UNION {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position ?positionProperty ?positionValue
- } UNION {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position core:rank ?rank
- } UNION {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position core:relates ?org .
- ?org a foaf:Organization .
- ?org rdfs:label ?orgName
- } UNION {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position core:relates ?org .
- ?org a foaf:Organization .
- ?org core:subOrganizationWithin ?middleOrg
- } UNION {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position core:relates ?org .
- ?org a foaf:Organization .
- ?org core:subOrganizationWithin ?middleOrg .
- ?middleOrg rdfs:label ?middleOrgName
- } UNION {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position core:relates ?org .
- ?org a foaf:Organization .
- ?org core:subOrganizationWithin ?middleOrg .
- ?middleOrg core:subOrganizationWithin ?outerOrg
- } UNION {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position core:positionInOrganization ?org .
- ?org a foaf:Organization .
- ?org core:subOrganizationWithin ?middleOrg .
- ?middleOrg core:subOrganizationWithin ?outerOrg .
- ?outerOrg rdfs:label ?outerOrgName
- }
- }
-
-
-
- PREFIX core: <http://vivoweb.org/ontology/core#>
- CONSTRUCT {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position core:dateTimeInterval ?dateTimeInterval .
- ?dateTimeInterval core:start ?dateTimeStartValue .
- ?dateTimeStartValue core:dateTime ?dateTimeStart
- } WHERE {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position core:dateTimeInterval ?dateTimeInterval .
- ?dateTimeInterval core:start ?dateTimeStartValue .
- ?dateTimeStartValue core:dateTime ?dateTimeStart
- }
-
-
-
- PREFIX core: <http://vivoweb.org/ontology/core#>
- CONSTRUCT {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position core:dateTimeInterval ?dateTimeInterval .
- ?dateTimeInterval core:end ?dateTimeEndValue .
- ?dateTimeEndValue core:dateTime ?dateTimeEnd
- } WHERE {
- ?subject ?property ?position .
- ?position a core:Position .
- ?position core:dateTimeInterval ?dateTimeInterval .
- ?dateTimeInterval core:end ?dateTimeEndValue .
- ?dateTimeEndValue core:dateTime ?dateTimeEnd
- }
-
-
- propStatement-personInPosition.ftl
-
+
+
+
+
+
+
+
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+ PREFIX core: <http://vivoweb.org/ontology/core#>
+ PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
+ PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
+ PREFIX obo: <http://purl.obolibrary.org/obo/>
+
+ SELECT DISTINCT ?subclass
+ ?position
+ ?positionTitle
+ ?hrJobTitle
+ ?rank
+ ?org ?orgName
+ ?middleOrg ?middleOrgName
+ ?outerOrg ?outerOrgName
+ ?dateTimeStart ?dateTimeEnd WHERE {
+ ?subject ?property ?position
+ OPTIONAL { ?position core:relates ?org .
+ ?org rdfs:label ?orgName
+ OPTIONAL { ?org obo:BFO_0000050 ?middleOrg .
+ ?middleOrg rdfs:label ?middleOrgName
+ OPTIONAL { ?middleOrg obo:BFO_0000050 ?outerOrg .
+ ?outerOrg rdfs:label ?outerOrgName
+ }
+ }
+ }
+ OPTIONAL { ?position rdfs:label ?positionTitle }
+ OPTIONAL { ?position core:hrJobTitle ?hrJobTitle }
+ OPTIONAL { ?position core:rank ?rank }
+ OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval
+ OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
+ ?dateTimeStartValue core:dateTime ?dateTimeStart
+ }
+ OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
+ ?dateTimeEndValue core:dateTime ?dateTimeEnd
+ }
+ }
+
+ OPTIONAL { ?position vitro:mostSpecificType ?subclass .
+ ?subclass rdfs:subClassOf core:Position
+ }
+
+
+ FILTER ( bound(?org) )
+
+ } ORDER BY ?subclass DESC(?dateTimeEnd) ?rank
+
+
+
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+ PREFIX core: <http://vivoweb.org/ontology/core#>
+ PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
+ CONSTRUCT {
+ ?subject ?property ?position .
+ ?position vitro:mostSpecificType ?subclass .
+ ?subclass rdfs:subClassOf core:Position
+ } WHERE {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position vitro:mostSpecificType ?subclass .
+ ?subclass rdfs:subClassOf core:Position
+ }
+
+
+
+ PREFIX core: <http://vivoweb.org/ontology/core#>
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+ PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+ PREFIX obo: <http://purl.obolibrary.org/obo/>
+ CONSTRUCT {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position ?positionProperty ?positionValue .
+ ?org rdfs:label ?orgName .
+ ?org obo:BFO_0000050 ?middleOrg .
+ ?middleOrg rdfs:label ?middleOrgName .
+ ?middleOrg obo:BFO_0000050 ?outerOrg .
+ ?outerOrg rdfs:label ?outerOrgName
+ } WHERE {
+ {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ } UNION {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position ?positionProperty ?positionValue
+ } UNION {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position core:rank ?rank
+ } UNION {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position core:relates ?org .
+ ?org a foaf:Organization .
+ ?org rdfs:label ?orgName
+ } UNION {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position core:relates ?org .
+ ?org a foaf:Organization .
+ ?org obo:BFO_0000050 ?middleOrg
+ } UNION {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position core:relates ?org .
+ ?org a foaf:Organization .
+ ?org obo:BFO_0000050 ?middleOrg .
+ ?middleOrg rdfs:label ?middleOrgName
+ } UNION {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position core:relates ?org .
+ ?org a foaf:Organization .
+ ?org obo:BFO_0000050 ?middleOrg .
+ ?middleOrg obo:BFO_0000050 ?outerOrg
+ } UNION {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position core:positionInOrganization ?org .
+ ?org a foaf:Organization .
+ ?org obo:BFO_0000050 ?middleOrg .
+ ?middleOrg obo:BFO_0000050 ?outerOrg .
+ ?outerOrg rdfs:label ?outerOrgName
+ }
+ }
+
+
+
+ PREFIX core: <http://vivoweb.org/ontology/core#>
+ CONSTRUCT {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position core:dateTimeInterval ?dateTimeInterval .
+ ?dateTimeInterval core:start ?dateTimeStartValue .
+ ?dateTimeStartValue core:dateTime ?dateTimeStart .
+ ?dateTimeInterval core:end ?dateTimeEndValue .
+ ?dateTimeEndValue core:dateTime ?dateTimeEnd
+ } WHERE {
+ ?subject ?property ?position .
+ ?position a core:Position .
+ ?position core:dateTimeInterval ?dateTimeInterval .
+ ?dateTimeInterval core:start ?dateTimeStartValue .
+ ?dateTimeStartValue core:dateTime ?dateTimeStart .
+ ?dateTimeInterval core:end ?dateTimeEndValue .
+ ?dateTimeEndValue core:dateTime ?dateTimeEnd
+ }
+
+
+ propStatement-personInPosition.ftl
+
diff --git a/productMods/config/listViewConfig-primaryEmail.xml b/productMods/config/listViewConfig-primaryEmail.xml
index 7f749dd4..e2562593 100644
--- a/productMods/config/listViewConfig-primaryEmail.xml
+++ b/productMods/config/listViewConfig-primaryEmail.xml
@@ -12,8 +12,8 @@
WHERE {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email .
- ?email a vcard:Work
- OPTIONAL { ?email vcard:email ?emailAddress }
+ ?email a vcard:Work .
+ ?email vcard:email ?emailAddress
}
@@ -26,18 +26,10 @@
?email a vcard:Work .
?email ?emailProperty ?emailValue
} WHERE {
- {
- ?subject ?property ?vcard
- } UNION {
- ?subject ?property ?vcard .
- ?vcard vcard:hasEmail ?email .
- ?email a vcard:Work
- } UNION {
?subject ?property ?vcard .
?vcard vcard:hasEmail ?email .
?email a vcard:Work .
?email ?emailProperty ?emailValue
- }
}
diff --git a/productMods/config/listViewConfig-telephoneNumber.xml b/productMods/config/listViewConfig-telephoneNumber.xml
index b1ac2c0c..c6edb497 100644
--- a/productMods/config/listViewConfig-telephoneNumber.xml
+++ b/productMods/config/listViewConfig-telephoneNumber.xml
@@ -11,9 +11,9 @@
?number
WHERE {
?subject ?property ?vcard .
- ?vcard vcard:hasTelephone ?phone
- OPTIONAL { ?phone vcard:telephone ?number }
- MINUS {?phone a vcard:Fax}
+ ?vcard vcard:hasTelephone ?phone .
+ ?phone vcard:telephone ?number
+ MINUS {?phone a vcard:Fax}
}
@@ -24,16 +24,9 @@
?vcard vcard:hasTelephone ?phone .
?phone ?phoneProperty ?phoneValue
} WHERE {
- {
- ?subject ?property ?vcard
- } UNION {
- ?subject ?property ?vcard .
- ?vcard vcard:hasTelephone ?phone
- } UNION {
?subject ?property ?vcard .
?vcard vcard:hasTelephone ?phone .
?phone ?phoneProperty ?phoneValue
- }
}
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-adviseeIn.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-adviseeIn.ftl
index 745da733..780765d4 100644
--- a/productMods/templates/freemarker/body/partials/individual/propStatement-adviseeIn.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-adviseeIn.ftl
@@ -22,7 +22,7 @@
#if>
<#if statement.degreeLabel??>
${statement.degreeAbbr!statement.degreeLabel!}
- <#if statement.dateTimeStart?? || statement.dateTimeEnd?? > ${i18n().candidate},<#else> ${i18n().candidate}#if>
+ <#if statement.dateTimeStart?? || statement.dateTimeEnd?? > ${i18n().candidacy},<#else> ${i18n().candidacy}#if>
#if>
<#elseif statement.advisingRelLabel??>
${statement.advisingRelLabel!statement.localName}
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-advisorIn.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-advisorIn.ftl
index 00814e57..341c3299 100644
--- a/productMods/templates/freemarker/body/partials/individual/propStatement-advisorIn.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-advisorIn.ftl
@@ -29,5 +29,5 @@
#if>
#local>
- ${linkedIndividual} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
+ ${linkedIndividual} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
#macro>
\ No newline at end of file
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl
index 937c930b..9c61e94a 100644
--- a/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-awardOrHonor.ftl
@@ -15,9 +15,9 @@
<#local linkedIndividual>
<#if statement.award??>
- ${statement.awardLabel!statement.localName!}
+ ${statement.awardLabel!}
<#else>
- ${statement.receiptLabel!statement.localName!}
+ ${statement.receiptLabel!}
#if>
#local>
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl
index 5d4fc91b..3521a717 100644
--- a/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-educationalTraining.ftl
@@ -33,6 +33,6 @@
#if>
#local>
- <@s.join [ degree, linkedIndividual!, statement.deptOrSchool!, statement.info! ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" false/>
+ <@s.join [ degree, linkedIndividual!, statement.deptOrSchool!, statement.info! ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" false/>
-#macro>
\ No newline at end of file
+#macro>
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-hasEditReviewRole.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-hasEditReviewRole.ftl
index b7210b9f..6ead71df 100644
--- a/productMods/templates/freemarker/body/partials/individual/propStatement-hasEditReviewRole.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-hasEditReviewRole.ftl
@@ -24,5 +24,5 @@
#local>
<#-- If property is collated, then subclass label is redundant information -->
- ${linkedIndividual} <#if ! property.collatedBySubclass> (${statement.subclassLabel!})#if> ${dateTime!}
+ ${linkedIndividual} <#if (! property.collatedBySubclass) && statement.subclassLabel?has_content> (${statement.subclassLabel!})#if> ${dateTime!}
#macro>
\ No newline at end of file
diff --git a/productMods/templates/freemarker/edit/forms/js/advisorRelationshipUtils.js b/productMods/templates/freemarker/edit/forms/js/advisorRelationshipUtils.js
index efa89fe4..ab991c22 100644
--- a/productMods/templates/freemarker/edit/forms/js/advisorRelationshipUtils.js
+++ b/productMods/templates/freemarker/edit/forms/js/advisorRelationshipUtils.js
@@ -25,6 +25,7 @@ var advisorRelUtils = {
this.form = $('#personHasAdvisingRelationship');
this.adRelshiplabel = $('#advisingRelLabel');
this.advisee = $('#advisee');
+ this.fauxLabel = $('#maskLabelBuilding');
this.subjArea = $('#SubjectArea');
this.firstName = $('#firstName');
this.lastName = $('#lastName');
@@ -56,6 +57,7 @@ var advisorRelUtils = {
this.form.submit(function() {
advisorRelUtils.resolveAdviseeNames();
advisorRelUtils.buildAdvisingRelLabel();
+
});
},
@@ -75,9 +77,16 @@ var advisorRelUtils = {
lastName = this.advisee.val();
name = lastName;
+
if (firstName) {
name += ', ' + firstName;
}
+
+ // we don't want the user to see the label getting built, so hide the acSelector
+ // field and display a bogus field that just has the last name in it.
+ this.fauxLabel.val(lastName);
+ this.advisee.hide();
+ this.fauxLabel.show();
this.advisee.val(name);
this.lastName.val(lastName);
}
diff --git a/productMods/templates/freemarker/edit/forms/personHasAdvisorRelationship.ftl b/productMods/templates/freemarker/edit/forms/personHasAdvisorRelationship.ftl
index e1e3d332..71dc39ac 100644
--- a/productMods/templates/freemarker/edit/forms/personHasAdvisorRelationship.ftl
+++ b/productMods/templates/freemarker/edit/forms/personHasAdvisorRelationship.ftl
@@ -124,6 +124,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
+
diff --git a/rdf/display/everytime/PropertyConfig.n3 b/rdf/display/everytime/PropertyConfig.n3
index 22793314..7f2b7bd0 100644
--- a/rdf/display/everytime/PropertyConfig.n3
+++ b/rdf/display/everytime/PropertyConfig.n3
@@ -69,7 +69,7 @@ local:hasServiceProviderRoleContext a :ConfigContext ;
local:hasServiceProviderRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "service to the profession" ;
- vitro:displayRankAnnot 1;
+ vitro:displayRankAnnot 20;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddServiceProviderRoleToPersonGenerator"^^ ;
@@ -129,7 +129,7 @@ local:hasTeacherRoleContext a :ConfigContext ;
local:hasTeacherRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "teaching activities" ;
- vitro:displayRankAnnot 1;
+ vitro:displayRankAnnot 20;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddTeacherRoleToPersonGenerator"^^ ;
@@ -219,7 +219,7 @@ local:hasResearcherRoleContext a :ConfigContext ;
local:hasResearcherRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasRole.xml"^^xsd:string ;
:displayName "research activities" ;
- vitro:displayRankAnnot 10;
+ vitro:displayRankAnnot 15;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddResearcherRoleToPersonGenerator"^^ ;
@@ -234,7 +234,7 @@ local:hasInvestigatorRoleContext a :ConfigContext ;
local:hasInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ;
:displayName "investigator on" ;
- vitro:displayRankAnnot 25;
+ vitro:displayRankAnnot 30;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator"^^ ;
@@ -249,7 +249,7 @@ local:hasPrincipalInvestigatorRoleContext a :ConfigContext ;
local:hasPrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ;
:displayName "principal investigator on" ;
- vitro:displayRankAnnot 15;
+ vitro:displayRankAnnot 20;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator"^^ ;
@@ -264,7 +264,7 @@ local:hasCo-PrincipalInvestigatorRoleContext a :ConfigContext ;
local:hasCo-PrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-hasInvestigatorRole.xml"^^xsd:string ;
:displayName "co-principal investigator on" ;
- vitro:displayRankAnnot 20;
+ vitro:displayRankAnnot 25;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddGrantRoleToPersonGenerator"^^ ;
diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisorRelationshipGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisorRelationshipGenerator.java
index 285bd7b6..68d02e4e 100644
--- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisorRelationshipGenerator.java
+++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAdvisorRelationshipGenerator.java
@@ -93,7 +93,7 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery);
conf.addSparqlForExistingUris("advisingRelType", advisingRelTypeQuery);
- conf.addSparqlForExistingUris("advisorRole", existingAdvisorRoleQuery);
+ conf.addSparqlForExistingUris("advisingRelationship", existingAdvisingRelQuery);
conf.addSparqlForExistingUris("adviseeRole", existingAdviseeRoleQuery);
conf.addSparqlForExistingUris("existingSubjArea", subjAreaQuery);
conf.addSparqlForExistingUris("existingAdvisee", adviseeQuery);
@@ -286,41 +286,63 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
/* Queries for editing an existing entry */
+ final static String existingAdvisingRelQuery =
+ "SELECT ?advisingRelationship WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
+ "}";
+
final static String advisingRelTypeQuery =
"PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" +
"SELECT ?advisingRelType WHERE { \n" +
- " ?advisingRelationship vitro:mostSpecificType ?advisingRelType . \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
+ " ?advisingRelationship vitro:mostSpecificType ?advisingRelType . \n" +
+ "}";
+
+ final static String advisingRelLabelQuery =
+ "SELECT ?existingAdvisingRelLabel WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
+ " ?advisingRelationship <" + label + "> ?existingAdvisingRelLabel . \n" +
"}";
final static String adviseeQuery =
"SELECT ?existingAdvisee WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship ?existingAdvisee . \n" +
+ " ?existingAdvisee ?advisingRelationship . \n" +
" ?existingAdvisee a <" + adviseeClass + "> . \n" +
- " FILTER (?person != ?existingAdvisee) . \n" +
- "}";
-
- final static String existingAdvisorRoleQuery =
- "SELECT ?existingAdvisorRole WHERE { \n" +
- "?advisingRelationship ?existingAdvisorRole . \n" +
- "?existingAdvisorRole a <" + advisorRoleClass + "> . \n" +
- "}";
-
- final static String existingAdviseeRoleQuery =
- "SELECT ?existingAdviseeRole WHERE { \n" +
- " ?advisingRelationship ?existingAdviseeRole . \n" +
- " ?existingAdviseeRole a <" + adviseeRoleClass + "> . \n" +
+ " ?existingAdvisee ?existingAdviseeRole . \n" +
+ " ?existingAdviseeRole a <" + adviseeRoleClass + "> . \n" +
"}";
final static String adviseeLabelQuery =
"SELECT ?existingAdviseeLabel WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship ?existingAdvisee . \n" +
+ " ?existingAdvisee ?advisingRelationship . \n" +
" ?existingAdvisee a <" + adviseeClass + "> . \n" +
" ?existingAdvisee <" + label + "> ?existingAdviseeLabel . \n" +
- " FILTER (?person != ?existingAdvisee) . \n" +
+ " ?existingAdvisee ?existingAdviseeRole . \n" +
+ " ?existingAdviseeRole a <" + adviseeRoleClass + "> . \n" +
+ "}";
+
+ final static String existingAdviseeRoleQuery =
+ "SELECT ?existingAdviseeRole WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
+ " ?advisingRelationship ?existingAdviseeRole . \n" +
+ " ?existingAdviseeRole ?advisingRelationship . \n" +
+ " ?existingAdviseeRole a <" + adviseeRoleClass + "> . \n" +
"}";
final static String subjAreaQuery =
"SELECT ?existingSubjArea WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship ?existingSubjArea . \n" +
" ?existingSubjArea a . \n" +
" ?existingSubjArea ?type \n" +
@@ -328,25 +350,26 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String subjAreaLabelQuery =
"SELECT ?existingSubjAreaLabel WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship ?existingSubjArea . \n" +
" ?existingSubjArea a . \n" +
" ?existingSubjArea <" + label + "> ?existingSubjAreaLabel . \n" +
" ?existingSubjArea ?type \n" +
"}";
- final static String advisingRelLabelQuery =
- "SELECT ?existingAdvisingRelLabel WHERE { \n" +
- " ?advisingRelationship <" + label + "> ?existingAdvisingRelLabel . \n" +
- "}";
-
final static String degreeQuery =
"SELECT ?existingDegree WHERE {\n"+
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship ?existingDegree . \n" +
" ?existingDegree a <" + degreeClass + "> . \n" +
"}";
final static String existingStartDateQuery =
"SELECT ?existingDateStart WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?startNode . \n" +
@@ -355,6 +378,8 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String existingEndDateQuery =
"SELECT ?existingEndDate WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n " +
" ?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
@@ -363,11 +388,15 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String existingIntervalNodeQuery =
"SELECT ?existingIntervalNode WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?existingIntervalNode . \n" +
" ?existingIntervalNode a <" + intervalType + "> . }";
final static String existingStartNodeQuery =
"SELECT ?existingStartNode WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?existingStartNode . \n" +
@@ -375,6 +404,8 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String existingEndNodeQuery =
"SELECT ?existingEndNode WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToEnd + "> ?existingEndNode . \n" +
@@ -382,6 +413,8 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String existingStartPrecisionQuery =
"SELECT ?existingStartPrecision WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?startNode . \n" +
@@ -390,6 +423,8 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String existingEndPrecisionQuery =
"SELECT ?existingEndPrecision WHERE { \n" +
+ " ?advisorRole ?advisingRelationship . \n" +
+ " ?advisingRelationship ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
diff --git a/themes/wilma/i18n/all.properties b/themes/wilma/i18n/all.properties
index c01b1dbb..1f90bda2 100644
--- a/themes/wilma/i18n/all.properties
+++ b/themes/wilma/i18n/all.properties
@@ -109,6 +109,7 @@ websites = Websites
advisee_label = advisee label
advisor_label = advisor label
candidate = candidate
+candidacy = candidacy
advisingRel_label = advisory label
editor_abbreviated = Ed.
diff --git a/utilities/ISF-transition/obsoleteUris/directory_walker.rb b/utilities/ISF-transition/obsoleteUris/directory_walker.rb
new file mode 100644
index 00000000..c7c87ea8
--- /dev/null
+++ b/utilities/ISF-transition/obsoleteUris/directory_walker.rb
@@ -0,0 +1,64 @@
+require 'find'
+
+class DirectoryWalker
+ # ------------------------------------------------------------------------------------
+ private
+ # ------------------------------------------------------------------------------------
+
+ def start_walking()
+ Find.find(@directory_root) do |path|
+ if FileTest.directory?(path)
+ if File.basename(path).start_with?(".")
+ Find.prune # Don't look any further into this directory.
+ else
+ next
+ end
+ elsif @known_exceptions.skip?(path)
+ Find.prune
+ else
+ scan_file(path)
+ end
+ end
+ end
+
+ def scan_file(path)
+ @report.register_file(path)
+ lines = File.readlines(path)
+ lines.each_index do |index|
+ line_number = index + 1
+ line = lines[index].strip
+ scan_line(path, line_number, line) unless @known_exceptions.skip?(path, line_number)
+ end
+ end
+
+ def scan_line(path, line_number, line)
+ @obsolete_uris.uris.each do |uri|
+ next if @known_exceptions.skip?(path, line_number, uri)
+ @report.add_event(Event.new(path, line_number, line, uri)) if line =~ Regexp.new(Regexp.quote(uri))
+ end
+ if @complete
+ @obsolete_uris.localnames.each do |localname|
+ term = ":#{localname}"
+ next if @known_exceptions.skip?(path, line_number, term)
+ @report.add_event(Event.new(path, line_number, line, term)) if line =~ Regexp.new(Regexp.quote(term))
+ end
+ end
+ end
+
+ # ------------------------------------------------------------------------------------
+ public
+ # ------------------------------------------------------------------------------------
+
+ def initialize(directory_root, obsolete_uris, known_exceptions, report, complete)
+ @directory_root = File.expand_path(directory_root)
+ @obsolete_uris = obsolete_uris
+ @known_exceptions = known_exceptions
+ @report = report
+ @complete = complete
+ end
+
+ def walk()
+ start_walking()
+ end
+
+end
diff --git a/utilities/ISF-transition/obsoleteUris/event.rb b/utilities/ISF-transition/obsoleteUris/event.rb
new file mode 100644
index 00000000..5222a123
--- /dev/null
+++ b/utilities/ISF-transition/obsoleteUris/event.rb
@@ -0,0 +1,21 @@
+class Event
+ # ------------------------------------------------------------------------------------
+ private
+ # ------------------------------------------------------------------------------------
+
+ # ------------------------------------------------------------------------------------
+ public
+ # ------------------------------------------------------------------------------------
+
+ def initialize(path, line_number, line, string)
+ @path = path
+ @line_number = line_number
+ @line = line
+ @string = string
+ @is_localname = string[0] == ?:
+ end
+
+ def to_s()
+ "#{@path} \n #{@line_number} #{@line} \n #{@string} #{@is_localname ? "Localname" : "URI"}"
+ end
+end
diff --git a/utilities/ISF-transition/obsoleteUris/known_exceptions.rb b/utilities/ISF-transition/obsoleteUris/known_exceptions.rb
new file mode 100644
index 00000000..b948752c
--- /dev/null
+++ b/utilities/ISF-transition/obsoleteUris/known_exceptions.rb
@@ -0,0 +1,77 @@
+class KnownExceptionsError < StandardError; end
+
+class ExtensionSkipper
+ def initialize(extension)
+ @extension = extension
+ end
+
+ def skip?(path, line, uri)
+ return File.extname(path) == @extension
+ end
+end
+
+class PathSkipper
+ def initialize(root_path, relative_path)
+ @root_path = root_path
+ @absolute_path = File.expand_path(relative_path, @root_path)
+ end
+
+ def skip?(path, line, uri)
+ return @absolute_path == File.expand_path(path, @root_path)
+ end
+end
+
+class LineSkipper
+ def initialize(root_path, relative_path, line_number)
+ @inner = PathSkipper.new(root_path, relative_path)
+ @line_number = line_number
+ end
+
+ def skip?(path, line, uri)
+ return @inner.skip?(path, line, uri) && line == @line_number
+ end
+end
+
+class KnownExceptions
+ # ------------------------------------------------------------------------------------
+ private
+ # ------------------------------------------------------------------------------------
+
+ def parse_file(file)
+ skippers = []
+ File.readlines(file).each do |line|
+ # ignore blank lines, and lines starting with '#' or '!'.
+ line.strip!
+ next if line.length == 0 || line[0..0] == '#' || line[0] == ?!
+
+ if line =~ /^\.[^\/]*$/
+ skippers << ExtensionSkipper.new(line)
+ elsif line =~ /^(\S+)\s*$/
+ skippers << PathSkipper.new(@root_path, $1)
+ elsif line =~ /^(\S+)\s*(\d+)\s*$/
+ skippers << LineSkipper.new(@root_path, $1, $2.to_i)
+ else
+ raise "BOGUS line in known_exceptions file: '#{line}'"
+ end
+ end
+ skippers
+ end
+
+ # ------------------------------------------------------------------------------------
+ public
+ # ------------------------------------------------------------------------------------
+
+ def initialize(root_path, file)
+ @root_path = File.expand_path(root_path)
+ @skippers = parse_file(file)
+ end
+
+ def skip?(file, line_number = -1, string = "@!#IMPOSSIBLE#!@")
+ @skippers.each() do |skipper|
+ if skipper.skip?(file, line_number, string)
+ return true
+ end
+ end
+ false
+ end
+end
diff --git a/utilities/ISF-transition/obsoleteUris/obsoleteUriChecker.rb b/utilities/ISF-transition/obsoleteUris/obsoleteUriChecker.rb
new file mode 100644
index 00000000..27463d8b
--- /dev/null
+++ b/utilities/ISF-transition/obsoleteUris/obsoleteUriChecker.rb
@@ -0,0 +1,120 @@
+=begin
+--------------------------------------------------------------------------------
+
+A utility that scans the code base for the presence of URIs that were made
+obsolete by the ISF transition.
+
+Accept a file of obsolete URIs.
+ Blank lines or lines beginning with '#' are comments.
+ Each non-comment line contains an obsolete URI.
+
+Accept a file of known exceptions.
+ Blank lines or lines beginning with '#' are comments.
+ Each non-comment line is in one of these forms:
+ .xxx - denotes an extension that is exempt from scanning
+ [filepath] - denotes a path, relative to the codebase root, of a
+ file that should not be scanned.
+ [filepath] [line number] - denotes a particular line in a file for
+ which no error should be reported.
+ [filepath] [line number] [uri] - denotes a particular line in a file
+ on which the given uri will not be reported.
+
+The command line will look like this:
+ ruby obsoleteUriChecker.rb [complete]
+Where:
+ directory_root - the path to the top if the directory tree we are scanning
+ obsolete_uri_file - the path to the file that lists the obsolete URIs
+ known_exceptions_file - the path to the file that lists the events that we should ignore
+ complete - optional parameter; if present, check for :localname as well as for the full URL.
+
+E.g.:
+ ruby obsoleteUriChecker.rb ../../.. ../../../productMods/WEB-INF/ontologies/update/diff.tab.txt known_exceptions.txt complete
+
+--------------------------------------------------------------------------------
+=end
+
+$: << File.dirname(File.expand_path(__FILE__))
+require 'known_exceptions'
+require 'obsolete_uris'
+require 'report'
+require 'event'
+require 'directory_walker'
+
+class UsageError < StandardError; end
+
+class ObsoleteUriChecker
+ # ------------------------------------------------------------------------------------
+ private
+ # ------------------------------------------------------------------------------------
+
+ #
+ # Parse the arguments and complain if they don't make sense.
+ #
+ def parse_arguments(args)
+ raise UsageError, "usage is: obsoleteUriChecker.rb [complete]" unless (3..4).include?(args.length)
+
+ if args[3]
+ raise UsageError, "If provided, the 4th argument must be 'complete'" unless args[3].downcase == 'complete'
+ complete = true
+ else
+ complete = false
+ end
+
+ directory_root = args[0]
+ raise UsageError, "Directory '#{directory_root}' does not exist." unless File.exist?(directory_root)
+ raise UsageError, "Directory '#{directory_root}' is not a directory." unless File.directory?(directory_root)
+
+ obsolete_uri_file = args[1]
+ raise UsageError, "File '#{obsolete_uri_file}' does not exist." unless File.exist?(obsolete_uri_file)
+ obsolete_uris = ObsoleteUris.new(obsolete_uri_file)
+
+ known_exceptions_file = args[2]
+ raise UsageError, "File '#{known_exceptions_file}' does not exist." unless File.exist?(known_exceptions_file)
+ known_exceptions = KnownExceptions.new(directory_root, known_exceptions_file)
+
+ return directory_root, obsolete_uris, known_exceptions, complete
+ end
+
+ # ------------------------------------------------------------------------------------
+ public
+ # ------------------------------------------------------------------------------------
+
+ def initialize(args)
+ @report = Report.new(args)
+ @directory_root, @obsolete_uris, @known_exceptions, @complete = parse_arguments(args)
+ rescue UsageError => e
+ puts "\n----------------\nUsage error\n----------------\n\n#{e}\n\n----------------\n\n"
+ exit
+ rescue ObsoleteUrisError => e
+ puts "\n----------------\nObsolete Uris file is invalid\n----------------\n\n#{e}\n\n----------------\n\n"
+ exit
+ rescue KnownExceptionsError => e
+ puts "\n----------------\Known Exceptions file is invalid\n----------------\n\n#{e}\n\n----------------\n\n"
+ exit
+ end
+
+ def scan()
+ walker = DirectoryWalker.new(@directory_root, @obsolete_uris, @known_exceptions, @report, @complete)
+ walker.walk
+ end
+
+ def report()
+ @report.report()
+ end
+end
+
+#
+#
+# ------------------------------------------------------------------------------------
+# Standalone calling.
+#
+# Do this if this program was called from the command line. That is, if the command
+# expands to the path of this file.
+# ------------------------------------------------------------------------------------
+#
+
+if File.expand_path($0) == File.expand_path(__FILE__)
+ checker = ObsoleteUriChecker.new(ARGV)
+ checker.scan()
+ checker.report()
+end
diff --git a/utilities/ISF-transition/obsoleteUris/obsolete_uris.rb b/utilities/ISF-transition/obsoleteUris/obsolete_uris.rb
new file mode 100644
index 00000000..48909721
--- /dev/null
+++ b/utilities/ISF-transition/obsoleteUris/obsolete_uris.rb
@@ -0,0 +1,42 @@
+class ObsoleteUrisError < StandardError; end
+
+class ObsoleteUris
+ # ------------------------------------------------------------------------------------
+ private
+ # ------------------------------------------------------------------------------------
+
+ def get_localname(uri)
+ delimiter = uri.rindex(/[\/#]/)
+ return uri[delimiter+1..-1] if delimiter
+ raise "BOGUS URI in obsolete_uris file -- no localname: '#{uri}'"
+ end
+
+ # ------------------------------------------------------------------------------------
+ public
+ # ------------------------------------------------------------------------------------
+
+ def initialize(file)
+ @uris = []
+ @localnames = []
+ File.read(file).split(/[\r\n]+/).each do |line|
+ # ignore blank lines, and lines starting with '#' or '!'.
+ line.strip!
+ next if line.length == 0 || line[0..0] == '#' || line[0] == ?!
+
+ if line =~ /^(\S+)/
+ @uris << $1
+ @localnames << get_localname($1)
+ else
+ raise "BOGUS line in obsolete_uris file: '#{line}'"
+ end
+ end
+ end
+
+ def uris()
+ @uris
+ end
+
+ def localnames()
+ @localnames
+ end
+end
diff --git a/utilities/ISF-transition/obsoleteUris/report.rb b/utilities/ISF-transition/obsoleteUris/report.rb
new file mode 100644
index 00000000..3794dafe
--- /dev/null
+++ b/utilities/ISF-transition/obsoleteUris/report.rb
@@ -0,0 +1,55 @@
+class Report
+ # ------------------------------------------------------------------------------------
+ private
+ # ------------------------------------------------------------------------------------
+
+ def state_arguments()
+ puts
+ puts "-----------------------------------------------------------------"
+ puts " directory to scan = #{@args[0]}"
+ puts " obsolete_uris_file = #{@args[1]}"
+ puts " known exceptions file = #{@args[2]}"
+ puts " complete = #{!@args[3].nil?}"
+ puts "-----------------------------------------------------------------"
+ puts
+ end
+
+ def file_summary()
+ puts " scanned #{@file_count} files"
+ @extensions_count.sort.each do |pair|
+ puts " #{pair[0]} #{pair[1]}"
+ end
+ end
+
+ def list_events()
+ @events.each do |event|
+ puts "Event: #{event}"
+ end
+ end
+
+ # ------------------------------------------------------------------------------------
+ public
+ # ------------------------------------------------------------------------------------
+
+ def initialize(args)
+ @args = args;
+ @file_count = 0
+ @extensions_count = Hash.new(0)
+ @events = []
+ end
+
+ def register_file(path)
+ @file_count += 1
+ @extensions_count[File.extname(path)] += 1
+ end
+
+ def add_event(event)
+ @events << event
+ end
+
+ def report()
+ state_arguments()
+ file_summary()
+ list_events()
+ end
+end
diff --git a/utilities/LoadTesting/scripts/_captureTomcatLogs b/utilities/LoadTesting/scripts/_captureTomcatLogs
index e5ddbbaf..e64b7028 100755
--- a/utilities/LoadTesting/scripts/_captureTomcatLogs
+++ b/utilities/LoadTesting/scripts/_captureTomcatLogs
@@ -10,18 +10,16 @@ directory, for possible inspection later.
--------------------------------------------------------------------------------
=end
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
require 'date'
-require "#{File.dirname(__FILE__)}/subscripts/loadParms"
def figure_time_stamp()
return DateTime.now.strftime("%Y-%m-%d_%H-%M-%S")
end
-Dir.chdir("/home/jeb228/LoadTesting/versions/#{@version_name}") do |path|
- @tomcat_logs_dir = "#{path}/tomcatLogs"
- if (! File.directory?(@tomcat_logs_dir))
- Dir.mkdir(@tomcat_logs_dir)
- end
+@tomcat_logs_dir = version_file('tomcatLogs')
+if (! File.directory?(@tomcat_logs_dir))
+ Dir.mkdir(@tomcat_logs_dir)
end
Dir.chdir(@tomcat_logs_dir) do |path|
@@ -30,6 +28,6 @@ Dir.chdir(@tomcat_logs_dir) do |path|
end
Dir.chdir(@this_logs_dir) do |path|
- system('cp ~/LoadTesting/tomcat/logs/* .')
+ system("cp #{@home}/tomcat/logs/* .")
end
diff --git a/utilities/LoadTesting/scripts/_clearTomcatLogs b/utilities/LoadTesting/scripts/_clearTomcatLogs
index 51062961..a239a52d 100755
--- a/utilities/LoadTesting/scripts/_clearTomcatLogs
+++ b/utilities/LoadTesting/scripts/_clearTomcatLogs
@@ -9,4 +9,6 @@ Remove any Tomcat logs.
--------------------------------------------------------------------------------
=end
-puts system("rm ~/LoadTesting/tomcat/logs/*")
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
+
+puts system("rm #{@home}/tomcat/logs/*")
diff --git a/utilities/LoadTesting/scripts/_deploy b/utilities/LoadTesting/scripts/_deploy
index 2457d5ad..f0605611 100755
--- a/utilities/LoadTesting/scripts/_deploy
+++ b/utilities/LoadTesting/scripts/_deploy
@@ -13,12 +13,12 @@ template. Then run the build script.
--------------------------------------------------------------------------------
=end
-require "#{File.dirname(__FILE__)}/subscripts/loadParms"
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
require 'erb'
-def build_deploy_properties
- File.open(@deploy_properties_source) do |source_file|
- File.open(@deploy_properties_target, 'w') do |target_file|
+def process_template_file(source, target)
+ File.open(source) do |source_file|
+ File.open(target, 'w') do |target_file|
raw = source_file.read()
cooked = ERB.new(raw).result
target_file.write(cooked)
@@ -26,14 +26,18 @@ def build_deploy_properties
end
end
-puts system("rm -r ~/LoadTesting/tomcat/webapps/vivo*")
-puts system("rm -r ~/LoadTesting/tomcat/conf/Catalina/localhost/vivo*")
+puts system("rm -r #{@home}/tomcat/webapps/vivo*")
+puts system("rm -r #{@home}/tomcat/conf/Catalina/localhost/vivo*")
+puts system("rm -r #{@home}/tomcat/work/Catalina/localhost/vivo*")
-@deploy_properties_source = "/home/jeb228/LoadTesting/distros/#{@distro_name}/deploy.properties.template"
-@deploy_properties_target = "/home/jeb228/LoadTesting/distros/#{@distro_name}/vivo/deploy.properties"
-build_deploy_properties()
-
-Dir.chdir("/home/jeb228/LoadTesting/distros/#{@distro_name}/vivo") do |path|
- system "ant clean deploy"
+if (@is_git)
+ process_template_file(distro_file("build.properties.template"), distro_file("VIVO/build.properties"))
+ process_template_file(distro_file("runtime.properties.template"), version_file("data/runtime.properties"))
+ Dir.chdir(distro_file("VIVO")) { |path| system "ant clean deploy" }
+else
+ process_template_file(distro_file("deploy.properties.template"), distro_file("vivo/deploy.properties"))
+ Dir.chdir(distro_file("vivo")) { |path| system "ant clean deploy" }
end
+
+
diff --git a/utilities/LoadTesting/scripts/_fakeUploadedFiles b/utilities/LoadTesting/scripts/_fakeUploadedFiles
index d813b577..27843920 100755
--- a/utilities/LoadTesting/scripts/_fakeUploadedFiles
+++ b/utilities/LoadTesting/scripts/_fakeUploadedFiles
@@ -13,14 +13,14 @@ the data model.
--------------------------------------------------------------------------------
=end
-require "#{File.dirname(__FILE__)}/subscripts/loadParms"
-require "#{File.dirname(__FILE__)}/subscripts/upload_file_faker"
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
+require "subscripts/upload_file_faker"
properties = {}
-properties["uploads_directory"] = "/home/jeb228/LoadTesting/versions/#{@version_name}/data/uploads"
-properties["file_info_file"] = "/home/jeb228/LoadTesting/modelData/#{@site_name}/imageFileInfo.csv"
-properties["template_file"] = "#{File.dirname(__FILE__)}/subscripts/dummy_image_file.jpg"
+properties["uploads_directory"] = version_file('data/uploads')
+properties["file_info_file"] = "#{@home}/modelData/#{@site_name}/imageFileInfo.csv"
+properties["template_file"] = "#{@home}/scripts/subscripts/dummy_image_file.jpg"
if ARGV.length == 1 && ARGV[0] == "doit"
properties["scan_only"] = "false"
diff --git a/utilities/LoadTesting/scripts/_lessVivoLog b/utilities/LoadTesting/scripts/_lessVivoLog
index 9043b914..c650f9e1 100755
--- a/utilities/LoadTesting/scripts/_lessVivoLog
+++ b/utilities/LoadTesting/scripts/_lessVivoLog
@@ -9,4 +9,6 @@ View the VIVO log in Tomcat.
--------------------------------------------------------------------------------
=end
-puts system("less ~/LoadTesting/tomcat/logs/vivo.all.log")
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
+
+puts system("less #{@home}/tomcat/logs/vivo.all.log")
diff --git a/utilities/LoadTesting/scripts/_mergeTestResults b/utilities/LoadTesting/scripts/_mergeTestResults
index 176bfec1..963917ae 100755
--- a/utilities/LoadTesting/scripts/_mergeTestResults
+++ b/utilities/LoadTesting/scripts/_mergeTestResults
@@ -10,14 +10,14 @@ into an HTML file so we can easily compare them.
--------------------------------------------------------------------------------
=end
-require "#{File.dirname(__FILE__)}/subscripts/loadParms"
-require "#{File.dirname(__FILE__)}/subscripts/test_result_merger"
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
+require 'subscripts/test_result_merger'
properties = {}
-source_dir = "/home/jeb228/LoadTesting/testinfo/results/#{@site_name}"
+source_dir = "#{@home}/testinfo/results/#{@site_name}"
properties["source_directory"] = source_dir
-properties["target_directory"] = "/var/www/html/loadTesting/"
+properties["target_directory"] = "#{@home}/webpages/"
properties["site_name"] = "#{@site_name}"
suggestions = []
@@ -38,5 +38,3 @@ trm = TestResultMerger.new(properties)
trm.merge
puts "TestResultMerger was successful."
-
-
diff --git a/utilities/LoadTesting/scripts/_runTest b/utilities/LoadTesting/scripts/_runTest
index c73156db..d76de644 100755
--- a/utilities/LoadTesting/scripts/_runTest
+++ b/utilities/LoadTesting/scripts/_runTest
@@ -13,15 +13,15 @@ Use XSL to create an HTML version of the results.
--------------------------------------------------------------------------------
=end
-require "#{File.dirname(__FILE__)}/subscripts/loadParms"
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
def locate_files()
test_full_name = "#{@test_name}#{@test_suffix}"
- test_source_dir = "/home/jeb228/LoadTesting/testinfo/tests/#{@test_name}"
+ test_source_dir = test_file("tests/#{@test_name}")
@test_jmx_file = "#{test_source_dir}/#{test_full_name}.jmx"
raise "Test file doesn't exist: '#{@test_jmx_file}'." unless File.file?(@test_jmx_file)
- result_dir = "/home/jeb228/LoadTesting/testinfo/results/#{@site_name}"
+ result_dir = test_file("results/#{@site_name}")
Dir.mkdir(result_dir) unless File.directory?(result_dir)
@test_jtl_file = "#{result_dir}/#{test_full_name}.jtl"
@@ -33,7 +33,7 @@ def locate_files()
@test_html_file = "#{result_dir}/#{test_full_name}.html"
File.delete(@test_html_file) if File.file?(@test_html_file)
- data_dir = "/home/jeb228/LoadTesting/modelData/#{@site_name}"
+ data_dir = "#{@home}/modelData/#{@site_name}"
@person_uris_file = "#{data_dir}/personUris.csv"
raise "Person URIs file doesn't exist: '#{@person_uris_file}'" unless File.file?(@person_uris_file)
@infoResource_uris_file = "#{data_dir}/infoResourceUris.csv"
@@ -41,7 +41,7 @@ def locate_files()
@author_uris_file = "#{data_dir}/authorUris.csv"
raise "Author URIs file doesn't exist: '#{@author_uris_file}'" unless File.file?(@author_uris_file)
- @xsl_stylesheet_file = "/home/jeb228/LoadTesting/jmeter/jakarta-jmeter-2.4/extras/jmeter-results-report_21.xsl"
+ @xsl_stylesheet_file = "#{@home}/jmeter/jakarta-jmeter-2.4/extras/jmeter-results-report_21.xsl"
end
def prepare_jmeter_properties()
@@ -87,7 +87,7 @@ locate_files()
prepare_jmeter_properties()
test_the_webapp()
-Dir.chdir("/home/jeb228/LoadTesting/jmeter/jakarta-jmeter-2.4/bin") do |path|
+Dir.chdir("#{@home}/jmeter/jakarta-jmeter-2.4/bin") do |path|
puts "RUNNING TESTS"
system "./jmeter -n -t #{@test_jmx_file} -l #{@test_jtl_file} -j #{@test_log_file} #{@jmeter_properties}"
puts "CONVERTING TO HTML"
diff --git a/utilities/LoadTesting/scripts/_setTest b/utilities/LoadTesting/scripts/_setTest
index 7aa1d27c..05c36de3 100755
--- a/utilities/LoadTesting/scripts/_setTest
+++ b/utilities/LoadTesting/scripts/_setTest
@@ -12,12 +12,18 @@ Record that selection, along with the desired number of iterations and threads.
--------------------------------------------------------------------------------
=end
-@test_parms_file = "#{File.dirname(__FILE__)}/subscripts/_current_test.rb"
+begin
+ require File.expand_path('subscripts/common', File.dirname(__FILE__))
+rescue LoadError => e
+ puts e
+end
+
+@test_parms_file = "#{@home}/scripts/subscripts/_current_test.rb"
# Find out what tests we have available
def build_test_list()
@test_names = []
- Dir.foreach("/home/jeb228/LoadTesting/testinfo/tests") do |filename|
+ Dir.foreach(test_file('tests')) do |filename|
@test_names.push(filename) unless filename[0,1] == "."
end
@test_names.sort!
diff --git a/utilities/LoadTesting/scripts/_setVersion b/utilities/LoadTesting/scripts/_setVersion
index c715176e..5b94190f 100755
--- a/utilities/LoadTesting/scripts/_setVersion
+++ b/utilities/LoadTesting/scripts/_setVersion
@@ -10,12 +10,18 @@ record that choice.
--------------------------------------------------------------------------------
=end
-@version_parms_file = "#{File.dirname(__FILE__)}/subscripts/_current_version.rb"
+begin
+ require File.expand_path('subscripts/common', File.dirname(__FILE__))
+rescue LoadError => e
+ puts e
+end
+
+@version_parms_file = "#{@home}/scripts/subscripts/_current_version.rb"
# Find out what versions we have available
def build_version_list()
@version_names = []
- Dir.foreach("/home/jeb228/LoadTesting/versions") do |filename|
+ Dir.foreach("#{@home}/versions") do |filename|
@version_names.push(filename) unless (filename[0,1] == "_") || (filename[0,1] == ".")
end
@version_names.sort!
diff --git a/utilities/LoadTesting/scripts/_startTomcat b/utilities/LoadTesting/scripts/_startTomcat
index d511dc4a..feab3194 100755
--- a/utilities/LoadTesting/scripts/_startTomcat
+++ b/utilities/LoadTesting/scripts/_startTomcat
@@ -8,5 +8,8 @@ Duh
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
=end
-puts system("~/LoadTesting/tomcat/bin/startup.sh")
+
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
+
+puts system("#{@home}/tomcat/bin/startup.sh")
diff --git a/utilities/LoadTesting/scripts/_status b/utilities/LoadTesting/scripts/_status
index 1e36e9c1..371269a0 100755
--- a/utilities/LoadTesting/scripts/_status
+++ b/utilities/LoadTesting/scripts/_status
@@ -8,13 +8,14 @@ Show the SVN status of the currently-selected distro, both VIVO and Vitro.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
=end
-require "#{File.dirname(__FILE__)}/subscripts/loadParms"
-Dir.chdir("/home/jeb228/LoadTesting/distros/#{@distro_name}/vitro") do |path|
- system "svn status -u"
-end
-
-Dir.chdir("/home/jeb228/LoadTesting/distros/#{@distro_name}/vivo") do |path|
- system "svn status -u"
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
+
+if (@is_git)
+ Dir.chdir(distro_file('Vitro')) { |path| system "svn status -u" }
+ Dir.chdir(distro_file('VIVO')) { |path| system "svn status -u" }
+else
+ Dir.chdir(distro_file('vitro')) { |path| system "svn status -u" }
+ Dir.chdir(distro_file('vivo')) { |path| system "svn status -u" }
end
diff --git a/utilities/LoadTesting/scripts/_stopTomcat b/utilities/LoadTesting/scripts/_stopTomcat
index 13faf73f..fb39ad8f 100755
--- a/utilities/LoadTesting/scripts/_stopTomcat
+++ b/utilities/LoadTesting/scripts/_stopTomcat
@@ -9,5 +9,7 @@ Duh
--------------------------------------------------------------------------------
=end
-puts system("~/LoadTesting/tomcat/bin/shutdown.sh")
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
+
+puts system("#{@home}/tomcat/bin/shutdown.sh")
diff --git a/utilities/LoadTesting/scripts/_tailTomcatLogs b/utilities/LoadTesting/scripts/_tailTomcatLogs
index 7c04c69c..4ffdaf3d 100755
--- a/utilities/LoadTesting/scripts/_tailTomcatLogs
+++ b/utilities/LoadTesting/scripts/_tailTomcatLogs
@@ -9,4 +9,6 @@ Start following the tails of all of the logs in Tomcat.
--------------------------------------------------------------------------------
=end
-puts system("tail -f ~/LoadTesting/tomcat/logs/*")
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
+
+puts system("tail -f #{@home}/tomcat/logs/*")
diff --git a/utilities/LoadTesting/scripts/_update b/utilities/LoadTesting/scripts/_update
index fcae8f09..f90aed3c 100755
--- a/utilities/LoadTesting/scripts/_update
+++ b/utilities/LoadTesting/scripts/_update
@@ -9,13 +9,12 @@ Use SVN to get the latest revisions to the currently-selected distro.
--------------------------------------------------------------------------------
=end
-require "#{File.dirname(__FILE__)}/subscripts/loadParms"
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
-Dir.chdir("/home/jeb228/LoadTesting/distros/#{@distro_name}/vitro") do |path|
- system "svn update"
+if (@is_git)
+ Dir.chdir(distro_file('Vitro')) { |path| system "git pull" }
+ Dir.chdir(distro_file('VIVO')) { |path| system "git pull" }
+else
+ Dir.chdir(distro_file('vitro')) { |path| system "svn update" }
+ Dir.chdir(distro_file('vivo')) { |path| system "svn update" }
end
-
-Dir.chdir("/home/jeb228/LoadTesting/distros/#{@distro_name}/vivo") do |path|
- system "svn update"
-end
-
diff --git a/utilities/LoadTesting/scripts/_whichTest b/utilities/LoadTesting/scripts/_whichTest
index 079da541..95ff0b70 100755
--- a/utilities/LoadTesting/scripts/_whichTest
+++ b/utilities/LoadTesting/scripts/_whichTest
@@ -9,7 +9,7 @@ What is the currently-selected test?
--------------------------------------------------------------------------------
=end
-require "#{File.dirname(__FILE__)}/subscripts/loadParms"
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
puts "Current test is #{@test_name}, #{@test_threads} threads, #{@test_iterations} iterations"
diff --git a/utilities/LoadTesting/scripts/_whichVersion b/utilities/LoadTesting/scripts/_whichVersion
index c2004aeb..576b4044 100755
--- a/utilities/LoadTesting/scripts/_whichVersion
+++ b/utilities/LoadTesting/scripts/_whichVersion
@@ -9,7 +9,7 @@ What is the currently-selected version?
--------------------------------------------------------------------------------
=end
-require "#{File.dirname(__FILE__)}/subscripts/loadParms"
+require File.expand_path('subscripts/common', File.dirname(__FILE__))
puts "Current version is #{@version_name}"
diff --git a/utilities/LoadTesting/scripts/subscripts/_current_test.rb b/utilities/LoadTesting/scripts/subscripts/_current_test.rb
deleted file mode 100644
index e959c45f..00000000
--- a/utilities/LoadTesting/scripts/subscripts/_current_test.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-# what is the current test, and how many times will it run?
-@test_name = 'SimpleTests'
-@test_threads = '1'
-@test_iterations = '40'
diff --git a/utilities/LoadTesting/scripts/subscripts/_current_version.rb b/utilities/LoadTesting/scripts/subscripts/_current_version.rb
deleted file mode 100644
index df99bc07..00000000
--- a/utilities/LoadTesting/scripts/subscripts/_current_version.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-# what is the current version under test?
-@version_name = 'cornell1.4'
diff --git a/utilities/LoadTesting/scripts/subscripts/common.rb b/utilities/LoadTesting/scripts/subscripts/common.rb
new file mode 100644
index 00000000..8f9d5758
--- /dev/null
+++ b/utilities/LoadTesting/scripts/subscripts/common.rb
@@ -0,0 +1,33 @@
+#
+# The path to the LoadTesting directory. Everything is based on this
+#
+@home = File.expand_path("../..", File.dirname(__FILE__))
+
+#
+# 'require' should look in the scripts directory
+#
+$: << File.expand_path('scripts', @home)
+
+#
+# convenience methods to access files
+#
+def version_file(path)
+ "#{@home}/versions/#{@version_name}/#{path}"
+end
+
+def distro_file(path)
+ "#{@home}/distros/#{@distro_name}/#{path}"
+end
+
+def site_file(path)
+ "#{@home}/sites/#{@site_name}/#{path}"
+end
+
+def test_file(path)
+ "#{@home}/testinfo/#{path}"
+end
+
+#
+# All of the scripts need to load these parms. (Except _setVersion and _setTest)
+#
+require 'subscripts/loadParms'
diff --git a/utilities/LoadTesting/scripts/subscripts/loadParms.rb b/utilities/LoadTesting/scripts/subscripts/loadParms.rb
index ba161043..66deb7eb 100755
--- a/utilities/LoadTesting/scripts/subscripts/loadParms.rb
+++ b/utilities/LoadTesting/scripts/subscripts/loadParms.rb
@@ -1,6 +1,6 @@
-require "#{File.dirname(__FILE__)}/_current_version"
-require "#{File.dirname(__FILE__)}/_current_test"
-require "/home/jeb228/LoadTesting/versions/#{@version_name}/version_properties"
-require "/home/jeb228/LoadTesting/distros/#{@distro_name}/distro_properties"
-require "/home/jeb228/LoadTesting/sites/#{@site_name}/site_properties"
+require 'subscripts/_current_version'
+require 'subscripts/_current_test'
+require version_file('version_properties')
+require distro_file('distro_properties')
+require site_file('site_properties')