From 10252bafacdd08a662f6eb6ee944285d64e0646d Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Thu, 23 Nov 2017 10:15:38 +0200 Subject: [PATCH 001/173] adding limited support for showing skosxl:prefLabels --- model/Concept.php | 22 ++++++++++++++++++++- model/LabelSkosXL.php | 41 ++++++++++++++++++++++++++++++++++++++++ resource/css/styles.css | 2 +- view/concept-shared.twig | 2 +- 4 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 model/LabelSkosXL.php diff --git a/model/Concept.php b/model/Concept.php index 05bd7c791..93dc98c61 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -127,7 +127,7 @@ public function getLabel() return EasyRdf\Literal::create($label, $lang); } } - + // 4. label in any language, including literal with empty language tag $label = $this->resource->label(); if ($label !== null) { @@ -138,6 +138,26 @@ public function getLabel() return ""; } + public function hasXlLabel() + { + if ($this->resource->hasProperty('skosxl:prefLabel')) { + return true; + } + return false; + } + + public function getXlLabel() + { + $labels = $this->resource->allResources('skosxl:prefLabel'); + foreach($labels as $labres) { + $label = $labres->getLiteral('skosxl:literalForm'); + if ($label->getLang() == $this->clang) { + return new LabelSkosXL($this->model, $labres); + } + } + return 'BING'; + } + /** * Returns a notation for the concept or null if it has not been defined. * @return string eg. '999' diff --git a/model/LabelSkosXL.php b/model/LabelSkosXL.php new file mode 100644 index 000000000..b6be39fea --- /dev/null +++ b/model/LabelSkosXL.php @@ -0,0 +1,41 @@ +resource->allResources('skosxl:prefLabel'); + foreach($labels as $labres) { + $label = $labres->getLiteral('skosxl:literalForm'); + if ($label->getLang() == $this->clang) { + return $label; + } + } + return $label; + } + + public function getProperties() { + $ret = array(); + $props = $this->resource->properties(); + foreach($props as $prop) { + if ($prop !== 'skosxl:prefLabel') { + $ret[$prop] = $this->resource->get($prop); + } + } + return $ret; + } + + public function getLiteral() { + return $this->resource->getLiteral('skosxl:literalForm')->getValue(); + } + + public function __toString() { + return $this->resource->getLiteral('skosxl:literalForm')->getValue(); + } +} diff --git a/resource/css/styles.css b/resource/css/styles.css index e82bb3290..762e1686a 100644 --- a/resource/css/styles.css +++ b/resource/css/styles.css @@ -532,7 +532,7 @@ ul.dropdown-menu > li:last-child > input { min-width: 400px; } -.qtip-skosmos * { +.qtip-skosmos *, .reified-tooltip > p > span { color: #fff; font-size: 14px; font-weight: 400; diff --git a/view/concept-shared.twig b/view/concept-shared.twig index dd6e528ff..dd75f0d2d 100644 --- a/view/concept-shared.twig +++ b/view/concept-shared.twig @@ -49,7 +49,7 @@ {% else %}
{% if concept.notation %}{{ concept.notation }}{% endif %} - {{ concept.label }} + {% if concept.hasXlLabel %}
{% for key, val in concept.xlLabel.properties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{{ concept.xlLabel }}{% else %}{{ concept.label }}{% endif %}
{% endif %}
From 88beb7f6810003e7f1e286c97d300f30f480ba2f Mon Sep 17 00:00:00 2001 From: Thomas Francart Date: Mon, 4 Dec 2017 11:59:17 +0100 Subject: [PATCH 002/173] Added SPARQL query to query for super properties of a property --- model/sparql/GenericSparql.php | 42 +++++++++++++++++++++++++ tests/GenericSparqlTest.php | 12 +++++++ tests/test-vocab-data/myns-ontology.ttl | 21 +++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 tests/test-vocab-data/myns-ontology.ttl diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index 544229b6e..181daf3c9 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -1358,6 +1358,48 @@ public function queryLabel($uri, $lang) { return null; } } + + /** + * Generates a SPARQL query to retrieve the super properties of a given property URI. + * Note this must be executed in the graph where this information is available. + * @param string $uri + * @return string sparql query string + */ + private function generateSubPropertyOfQuery($uri) { + $fcl = $this->generateFromClause(); + $query = << rdfs:subPropertyOf ?superProperty +} +EOQ; + return $query; + } + + /** + * Query the super properties of a provided property URI. + * @param string $uri URI of a propertyes + * @return array array super properties, or null if none exist + */ + public function querySuperProperties($uri) { + $query = $this->generateSubPropertyOfQuery($uri); + $result = $this->query($query); + $ret = array(); + foreach ($result as $row) { + if (isset($row->superProperty)) { + $ret[] = $row->superProperty->getUri(); + } + + } + + if (sizeof($ret) > 0) { + // return result + return $ret; + } else { + // no result, return null + return null; + } + } /** diff --git a/tests/GenericSparqlTest.php b/tests/GenericSparqlTest.php index 7afc2065e..15fb16b7a 100644 --- a/tests/GenericSparqlTest.php +++ b/tests/GenericSparqlTest.php @@ -922,4 +922,16 @@ public function testQueryConceptsWithExtraFields() $this->assertEquals(array('en' => 'Bass'), $actual[0]['prefLabels']); $this->assertEquals(array(0 => array('uri' => 'http://www.skosmos.skos/test/ta1')), $actual[0]['skos:broader']); } + + /** + * @covers GenericSparql::querySuperProperties + */ + public function testQuerySuperProperties() + { + $this->sparql = new GenericSparql('http://localhost:3030/ds/sparql', '?graph', $this->model); + $actual = $this->sparql->querySuperProperties('http://example.com/myns#property'); + $this->assertEquals(1, sizeof($actual)); + $expected = array('http://example.com/myns#superProperty'); + $this->assertEquals($actual, $expected); + } } diff --git a/tests/test-vocab-data/myns-ontology.ttl b/tests/test-vocab-data/myns-ontology.ttl new file mode 100644 index 000000000..e82ccc9d1 --- /dev/null +++ b/tests/test-vocab-data/myns-ontology.ttl @@ -0,0 +1,21 @@ +@prefix prefix: . +@prefix skos: . +@prefix owl: . +@prefix rdfs: . +@prefix my: . +@prefix xsd: . + + a owl:Ontology . + +my:superProperty a owl:DatatypeProperty ; + rdfs:domain skos:Concept ; + rdfs:label "my super property"@en ; + rdfs:range xsd:string . + +my:property a owl:DatatypeProperty ; + rdfs:domain skos:Concept ; + rdfs:label "my property"@en ; + rdfs:subPropertyOf my:superProperty ; + rdfs:range xsd:string . + + From 0fc6f907ebfd199d978c44aa0ffffcbadf127e2b Mon Sep 17 00:00:00 2001 From: Thomas Francart Date: Mon, 4 Dec 2017 13:13:54 +0100 Subject: [PATCH 003/173] Used graph-agnostic queries through default endpoint to retrieve label and superproperty of a property. --- model/Concept.php | 27 +++++++++++++++++++-------- tests/test-vocab-data/dup.ttl | 11 +++++++---- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 05bd7c791..2ddbfbca6 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -319,8 +319,10 @@ public function getProperties() $properties['skos:narrower'] = $membersArray; } } - + foreach ($longUris as &$prop) { + // storing full URI without brackets in a separate variable + $longUri = $prop; if (EasyRdf\RdfNamespace::shorten($prop) !== null) { // shortening property labels if possible $prop = $sprop = EasyRdf\RdfNamespace::shorten($prop); @@ -330,11 +332,17 @@ public function getProperties() // EasyRdf requires full URIs to be in angle brackets if (!in_array($prop, $this->DELETED_PROPERTIES) || ($this->isGroup() === false && $prop === 'skos:member')) { - $propres = new EasyRdf\Resource($prop, $this->graph); - $proplabel = $propres->label($this->getEnvLang()) ? $propres->label($this->getEnvLang()) : $propres->label(); - $superprop = $propres->get('rdfs:subPropertyOf') ? $propres->get('rdfs:subPropertyOf')->getURI() : null; + // retrieve property label and super properties from default SPARQL endoint + // note that this imply that the property has an rdf:type declared for the query to work + $envLangLabels = $this->model->getDefaultSparql()->queryLabel($longUri, $this->getEnvLang()); + $proplabel = ($envLangLabels)?$envLangLabels[$this->getEnvLang()]:$this->model->getDefaultSparql()->queryLabel($longUri, '')['']; + + // we're reading only one super property, even if there are multiple ones + $superprops = $this->model->getDefaultSparql()->querySuperProperties($longUri); + $superprop = ($superprops)?$superprops[0]:null; if ($superprop) { - $superprop = EasyRdf\RdfNamespace::shorten($superprop) ? EasyRdf\RdfNamespace::shorten($superprop) : $superprop; + $withBrackets = "<".$superprop.">"; + $superprop = EasyRdf\RdfNamespace::shorten($withBrackets) ? EasyRdf\RdfNamespace::shorten($withBrackets) : $superprop; } $propobj = new ConceptProperty($prop, $proplabel, $superprop); @@ -344,9 +352,12 @@ public function getProperties() } // searching for subproperties of literals too - foreach ($this->graph->allResources($prop, 'rdfs:subPropertyOf') as $subi) { - $suburi = EasyRdf\RdfNamespace::shorten($subi->getUri()) ? EasyRdf\RdfNamespace::shorten($subi->getUri()) : $subi->getUri(); - $duplicates[$suburi] = $prop; + if($superprops) { + foreach ($superprops as $subi) { + $withBrackets = "<".$subi.">"; + $suburi = EasyRdf\RdfNamespace::shorten($withBrackets) ? EasyRdf\RdfNamespace::shorten($withBrackets) : $subi; + $duplicates[$suburi] = $prop; + } } // Iterating through every literal and adding these to the data object. diff --git a/tests/test-vocab-data/dup.ttl b/tests/test-vocab-data/dup.ttl index 821509b8a..1f31e070a 100644 --- a/tests/test-vocab-data/dup.ttl +++ b/tests/test-vocab-data/dup.ttl @@ -31,15 +31,18 @@ dup:d5 a skos:Concept ; dup:prop4 "Identical property value"@en; skos:prefLabel "Not a subproperty"@en . -dup:prop1 +# in order for getLabel query to work, a type has to be declared +# on the properties + +dup:prop1 a owl:DatatypeProperty ; rdfs:label "Very nice property"@en . -dup:prop2 +dup:prop2 a owl:DatatypeProperty ; rdfs:subPropertyOf dup:prop1 ; rdfs:label "Nearly as nice subproperty"@en . -dup:prop3 +dup:prop3 a owl:DatatypeProperty ; rdfs:label "Nice-ish property"@en . -dup:prop4 +dup:prop4 a owl:DatatypeProperty ; rdfs:label "Not at all a subproperty"@en . From 0448f42b14b4b147c765fd0943d12e408a822135 Mon Sep 17 00:00:00 2001 From: Thomas Francart Date: Mon, 4 Dec 2017 14:40:54 +0100 Subject: [PATCH 004/173] Fixed call to Namespace.shorten(). Added types to property declarations in test files. --- model/Concept.php | 6 ++---- tests/test-vocab-data/date.ttl | 3 ++- tests/test-vocab-data/sub.ttl | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 2ddbfbca6..c60281dd0 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -341,8 +341,7 @@ public function getProperties() $superprops = $this->model->getDefaultSparql()->querySuperProperties($longUri); $superprop = ($superprops)?$superprops[0]:null; if ($superprop) { - $withBrackets = "<".$superprop.">"; - $superprop = EasyRdf\RdfNamespace::shorten($withBrackets) ? EasyRdf\RdfNamespace::shorten($withBrackets) : $superprop; + $superprop = EasyRdf\RdfNamespace::shorten($superprop) ? EasyRdf\RdfNamespace::shorten($superprop) : $superprop; } $propobj = new ConceptProperty($prop, $proplabel, $superprop); @@ -354,8 +353,7 @@ public function getProperties() // searching for subproperties of literals too if($superprops) { foreach ($superprops as $subi) { - $withBrackets = "<".$subi.">"; - $suburi = EasyRdf\RdfNamespace::shorten($withBrackets) ? EasyRdf\RdfNamespace::shorten($withBrackets) : $subi; + $suburi = EasyRdf\RdfNamespace::shorten($subi) ? EasyRdf\RdfNamespace::shorten($subi) : $subi; $duplicates[$suburi] = $prop; } } diff --git a/tests/test-vocab-data/date.ttl b/tests/test-vocab-data/date.ttl index c04c37f70..06fb8967f 100644 --- a/tests/test-vocab-data/date.ttl +++ b/tests/test-vocab-data/date.ttl @@ -8,6 +8,7 @@ @prefix skosmos: . @prefix xml: . @prefix xsd: . +@prefix owl: . date:d1 a skos:Concept, meta:TestClass ; dc:created "2000-01-03T12:46:39+03:00"^^xsd:dateTime ; @@ -19,7 +20,7 @@ date:d2 a skos:Concept, meta:TestClass ; date:ownDate "1986-21-00"^^xsd:date ; #invalid on purpose skos:prefLabel "Broken date"@en . -date:ownDate +date:ownDate a owl:DatatypeProperty ; rdfs:label "This is also a dateTime" . a owl:Ontology ; diff --git a/tests/test-vocab-data/sub.ttl b/tests/test-vocab-data/sub.ttl index 27deedd03..24edb17cd 100644 --- a/tests/test-vocab-data/sub.ttl +++ b/tests/test-vocab-data/sub.ttl @@ -14,6 +14,6 @@ sub:d1 a skos:Concept ; skos:prefLabel "Has a hidden property"@en ; sub:prop1 "Do not show this"@en . -sub:prop1 +sub:prop1 a owl:DatatypeProperty ; rdfs:subPropertyOf skos:hiddenLabel ; rdfs:label "This subproperty should not be shown in the UI"@en . From 59bc3e07fdfd48c560ce091563c642062afb8cbc Mon Sep 17 00:00:00 2001 From: Thomas Francart Date: Thu, 30 Nov 2017 12:36:23 +0100 Subject: [PATCH 005/173] Issue 666 - squash commits (#8) * Added preferredVocabUri parameter to Model::guessVocabularyFromURI() * Added preferredVocabUri parameter to Model::guessVocabularyFromURI() * Comment just to have one additionnal commit * Compared vocab on IDs rather than URIs * Add the preferred vocabulary parameter when calling guessVocabularyFromURI * Comments --- model/Concept.php | 3 ++- model/ConceptMappingPropertyValue.php | 8 +++++--- model/Model.php | 20 ++++++++++++++++---- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 05bd7c791..83e4af39a 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -250,7 +250,8 @@ public function getMappingProperties() if (isset($ret[$prop])) { // checking if the target vocabulary can be found at the skosmos endpoint $exuri = $val->getUri(); - $exvoc = $this->model->guessVocabularyFromURI($exuri); + // if multiple vocabularies are found, the following method will return in priority the current vocabulary of the concept + $exvoc = $this->model->guessVocabularyFromURI($exuri, $this->vocab->getId()); // if not querying the uri itself if (!$exvoc) { $response = null; diff --git a/model/ConceptMappingPropertyValue.php b/model/ConceptMappingPropertyValue.php index a6c2ffaa9..75e27111f 100644 --- a/model/ConceptMappingPropertyValue.php +++ b/model/ConceptMappingPropertyValue.php @@ -47,7 +47,8 @@ private function queryLabel($lang) $lang = $this->clang; } - $exvocab = $this->model->guessVocabularyFromURI($this->resource->getUri()); + // if multiple vocabularies are found, the following method will return in priority the current vocabulary of the mapping + $exvocab = $this->model->guessVocabularyFromURI($this->resource->getUri(), $this->vocab->getId()); if ($this->resource->label($lang) !== null) { // current language return $this->resource->label($lang); @@ -79,7 +80,7 @@ public function getUri() public function getExVocab() { - $exvocab = $this->model->guessVocabularyFromURI($this->getUri()); + $exvocab = $this->model->guessVocabularyFromURI($this->getUri(), $this->vocab->getId()); return $exvocab; } @@ -90,7 +91,8 @@ public function getVocab() public function getVocabName() { - $exvocab = $this->model->guessVocabularyFromURI($this->resource->getUri()); + // if multiple vocabularies are found, the following method will return in priority the current vocabulary of the mapping + $exvocab = $this->model->guessVocabularyFromURI($this->resource->getUri(), $this->vocab->getId()); if ($exvocab) { return $exvocab->getTitle(); } diff --git a/model/Model.php b/model/Model.php index 2452b2109..ca5c204b1 100644 --- a/model/Model.php +++ b/model/Model.php @@ -529,16 +529,27 @@ public function getVocabularyByGraph($graph, $endpoint = null) * * @param Vocabulary[] $vocabs vocabularies to search * @param string $uri URI to look for + * @param $preferredVocabId string ID of the preferred vocabulary to return if more than one is found * @return Vocabulary the vocabulary with the URI */ - private function disambiguateVocabulary($vocabs, $uri) + private function disambiguateVocabulary($vocabs, $uri, $preferredVocabId = null) { // if there is only one candidate vocabulary, return it if (sizeof($vocabs) == 1) { return $vocabs[0]; } + // if there are multiple vocabularies and one is the preferred vocabulary, return it + if($preferredVocabId != null) { + foreach ($vocabs as $vocab) { + if($vocab->getId() == $preferredVocabId) { + return $vocab; + } + } + } + + // no preferred vocabulary, or it was not found, search in which vocabulary the concept has a label foreach ($vocabs as $vocab) { if ($vocab->getConceptLabel($uri, null) !== null) return $vocab; @@ -553,9 +564,10 @@ private function disambiguateVocabulary($vocabs, $uri) * vocabulary URI spaces. * * @param $uri string URI to search + * @param $preferredVocabId string ID of the preferred vocabulary to return if more than one is found * @return Vocabulary vocabulary of this URI, or null if not found */ - public function guessVocabularyFromURI($uri) + public function guessVocabularyFromURI($uri, $preferredVocabId = null) { if ($this->vocabsByUriSpace === null) { // initialize cache $this->vocabsByUriSpace = array(); @@ -569,13 +581,13 @@ public function guessVocabularyFromURI($uri) $namespace = substr($uri, 0, -strlen($res->localName())); if (array_key_exists($namespace, $this->vocabsByUriSpace)) { $vocabs = $this->vocabsByUriSpace[$namespace]; - return $this->disambiguateVocabulary($vocabs, $uri); + return $this->disambiguateVocabulary($vocabs, $uri, $preferredVocabId); } // didn't work, try to match with each URI space separately foreach ($this->vocabsByUriSpace as $urispace => $vocabs) { if (strpos($uri, $urispace) === 0) { - return $this->disambiguateVocabulary($vocabs, $uri); + return $this->disambiguateVocabulary($vocabs, $uri, $preferredVocabId); } } From 7b235c5397783947f3f152954b4332528a928f89 Mon Sep 17 00:00:00 2001 From: Thomas Francart Date: Wed, 22 Nov 2017 07:55:57 +0100 Subject: [PATCH 006/173] 1. Ability to fetch and return dct:subject of ConceptSchemes in the list of Concept schemes. 2. Ability to fetch and return multiple concept schemes for which a concept is a top concept in the parent hierarchy (new 'tops' key in the JSON-LD result) --- controller/RestController.php | 40 ++++++++++++- model/Vocabulary.php | 4 +- model/VocabularyConfig.php | 18 ++++++ model/sparql/GenericSparql.php | 27 +++++++-- tests/GenericSparqlTest.php | 45 ++++++++++++++- .../test-vocab-data/test-concept-schemes.ttl | 56 +++++++++++++++++++ tests/testvocabularies.ttl | 13 +++++ 7 files changed, 193 insertions(+), 10 deletions(-) create mode 100644 tests/test-vocab-data/test-concept-schemes.ttl diff --git a/controller/RestController.php b/controller/RestController.php index 0e22e6fab..9b4e2e333 100644 --- a/controller/RestController.php +++ b/controller/RestController.php @@ -734,6 +734,30 @@ public function hierarchy($request) if (empty($results)) { return $this->returnError('404', 'Not Found', "Could not find concept <{$request->getUri()}>"); } + + + // set the "top" key from the "tops" key + foreach ($results as $value) { + $uri = $value['uri']; + if (isset($value['tops'])) { + if ($request->getVocab()->getConfig()->getMainConceptSchemeURI() != null) { + foreach ($results[$uri]['tops'] as $top) { + // if a value in 'tops' matches the main concept scheme of the vocabulary, take it + if ($top == $request->getVocab()->getConfig()->getMainConceptSchemeURI()) { + $results[$uri]['top'] = $top; + break; + } + } + // if the main concept scheme was not found, set 'top' to the first 'tops' (sorted alphabetically on the URIs) + if (! isset($results[$uri]['top'])) { + $results[$uri]['top'] = $results[$uri]['tops'][0]; + } + } else { + // no main concept scheme set on the vocab, take the first value of 'tops' (sorted alphabetically) + $results[$uri]['top'] = $results[$uri]['tops'][0]; + } + } + } if ($request->getVocab()->getConfig()->getShowHierarchy()) { $schemes = $request->getVocab()->getConceptSchemes($request->getLang()); @@ -748,7 +772,7 @@ public function hierarchy($request) $topconcepts = $request->getVocab()->getTopConcepts(array_keys($schemes), $request->getLang()); foreach ($topconcepts as $top) { if (!isset($results[$top['uri']])) { - $results[$top['uri']] = array('uri' => $top['uri'], 'top' => $top['topConceptOf'], 'prefLabel' => $top['label'], 'hasChildren' => $top['hasChildren']); + $results[$top['uri']] = array('uri' => $top['uri'], 'top'=>$top['topConceptOf'], 'tops'=>array($top['topConceptOf']), 'prefLabel' => $top['label'], 'hasChildren' => $top['hasChildren']); if (isset($top['notation'])) { $results[$top['uri']]['notation'] = $top['notation']; } @@ -758,7 +782,19 @@ public function hierarchy($request) } $ret = array_merge_recursive($this->context, array( - '@context' => array('onki' => 'http://schema.onki.fi/onki#', 'prefLabel' => 'skos:prefLabel', 'notation' => 'skos:notation', 'narrower' => array('@id' => 'skos:narrower', '@type' => '@id'), 'broader' => array('@id' => 'skos:broader', '@type' => '@id'), 'broaderTransitive' => array('@id' => 'skos:broaderTransitive', '@container' => '@index'), 'top' => array('@id' => 'skos:topConceptOf', '@type' => '@id'), 'hasChildren' => 'onki:hasChildren', '@language' => $request->getLang()), + '@context' => array( + 'onki' => 'http://schema.onki.fi/onki#', + 'prefLabel' => 'skos:prefLabel', + 'notation' => 'skos:notation', + 'narrower' => array('@id' => 'skos:narrower', '@type' => '@id'), + 'broader' => array('@id' => 'skos:broader', '@type' => '@id'), + 'broaderTransitive' => array('@id' => 'skos:broaderTransitive', '@container' => '@index'), + 'top' => array('@id' => 'skos:topConceptOf', '@type' => '@id'), + // the tops key will contain all the concept scheme values, while top (singular) contains a single value + 'tops' => array('@id' => 'skos:topConceptOf', '@type' => '@id'), + 'hasChildren' => 'onki:hasChildren', + '@language' => $request->getLang() + ), 'uri' => $request->getUri(), 'broaderTransitive' => $results) ); diff --git a/model/Vocabulary.php b/model/Vocabulary.php index 194a0f64d..d9a055a47 100644 --- a/model/Vocabulary.php +++ b/model/Vocabulary.php @@ -217,9 +217,9 @@ public function getConceptSchemes($lang = '') public function getDefaultConceptScheme() { - $conceptScheme = $this->resource->get("skosmos:mainConceptScheme"); + $conceptScheme = $this->config->getMainConceptSchemeURI(); if ($conceptScheme) { - return $conceptScheme->getUri(); + return $conceptScheme; } // mainConceptScheme not explicitly set, guess it diff --git a/model/VocabularyConfig.php b/model/VocabularyConfig.php index 5df0fcd36..10b0e34cd 100644 --- a/model/VocabularyConfig.php +++ b/model/VocabularyConfig.php @@ -172,6 +172,24 @@ public function getDataURLs() return $ret; } + /** + * Returns the main Concept Scheme URI of that Vocabulary, + * or null if not set. + * @return string concept scheme URI or null + */ + + public function getMainConceptSchemeURI() + { + $val = $this->resource->getResource("skosmos:mainConceptScheme"); + if ($val) { + return $val->getURI(); + } + + return null; + } + + + /** * Returns the class URI used for concept groups in this vocabulary, * or null if not set. diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index 7cd61d449..560e20697 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -595,9 +595,14 @@ public function queryConceptScheme($conceptscheme) { private function generateQueryConceptSchemesQuery($lang) { $fcl = $this->generateFromClause(); $query = <<title)) { $conceptscheme['title'] = $row->title->getValue(); } + // add dct:subject and their labels in the result + if(isset($row->domain) && isset($row->domainLabel)){ + $conceptscheme['subject']['uri']=$row->domain->getURI(); + $conceptscheme['subject']['prefLabel']=$row->domainLabel->getValue(); + } $ret[$row->cs->getURI()] = $conceptscheme; } @@ -1736,6 +1747,7 @@ public function queryTopConcepts($conceptSchemes, $lang, $fallback) { /** * Generates a sparql query for finding the hierarchy for a concept. + * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. * @param string $uri concept uri. * @param string $lang * @param string $fallback language to use if label is not available in the preferred language @@ -1746,7 +1758,8 @@ private function generateParentListQuery($uri, $lang, $fallback, $props) { $propertyClause = implode('|', $props); $query = << a skos:Concept . OPTIONAL { @@ -1810,8 +1823,12 @@ private function transformParentListResults($result, $lang) if (isset($row->exact)) { $ret[$uri]['exact'] = $row->exact->getUri(); } - if (isset($row->top)) { - $ret[$uri]['top'] = $row->top->getUri(); + if (isset($row->tops)) { + $topConceptsList=array(); + $topConceptsList=explode(" ", $row->tops->getValue()); + // sort to garantee an alphabetical ordering of the URI + sort($topConceptsList); + $ret[$uri]['tops'] = $topConceptsList; } if (isset($row->children)) { if (!isset($ret[$uri]['narrower'])) { diff --git a/tests/GenericSparqlTest.php b/tests/GenericSparqlTest.php index d1b86aeae..f987522f7 100644 --- a/tests/GenericSparqlTest.php +++ b/tests/GenericSparqlTest.php @@ -350,6 +350,49 @@ public function testQueryConceptSchemes() $this->assertEquals('Test conceptscheme', $label['label']); } } + + /** + * @covers GenericSparql::queryConceptSchemes + * @covers GenericSparql::generateQueryConceptSchemesQuery + * @covers GenericSparql::transformQueryConceptSchemesResults + */ + public function testQueryConceptSchemesSubject() + { + $sparql = new GenericSparql('http://localhost:3030/ds/sparql', 'http://www.skosmos.skos/test-concept-schemes/', $this->model); + + $actual = $sparql->queryConceptSchemes('en'); + $expected = array( + 'http://exemple.fr/domains' => array( + 'prefLabel' => 'Special Domains Concept Scheme' + ), + 'http://exemple.fr/mt1' => array( + 'prefLabel' => 'Micro-Thesaurus 1', + 'subject' => array( + 'uri' => 'http://exemple.fr/d1', + 'prefLabel' => 'Domain 1' + ) + ), + 'http://exemple.fr/mt2' => array( + 'prefLabel' => 'Micro-Thesaurus 2', + 'subject' => array( + 'uri' => 'http://exemple.fr/d1', + 'prefLabel' => 'Domain 1' + ) + ), + 'http://exemple.fr/mt3' => array( + 'prefLabel' => 'Micro-Thesaurus 3', + 'subject' => array( + 'uri' => 'http://exemple.fr/d2', + 'prefLabel' => 'Domain 2' + ) + ), + 'http://exemple.fr/thesaurus' => array( + 'prefLabel' => 'The Thesaurus' + ), + ); + + $this->assertEquals($expected, $actual); + } /** * @covers GenericSparql::queryConcepts @@ -762,7 +805,7 @@ public function testQueryParentList() ); $props = array ( 'uri' => 'http://www.skosmos.skos/test/ta1', - 'top' => 'http://www.skosmos.skos/test/conceptscheme', + 'tops' => array('http://www.skosmos.skos/test/conceptscheme'), 'prefLabel' => 'Fish', ); $narrowers = array ( diff --git a/tests/test-vocab-data/test-concept-schemes.ttl b/tests/test-vocab-data/test-concept-schemes.ttl new file mode 100644 index 000000000..9dca0ce4d --- /dev/null +++ b/tests/test-vocab-data/test-concept-schemes.ttl @@ -0,0 +1,56 @@ +@prefix skos: . +@prefix ex: . +@prefix dcterms: . + +ex:thesaurus a skos:ConceptScheme ; + skos:prefLabel "The Thesaurus"@en . + +ex:mt1 a skos:ConceptScheme ; + skos:prefLabel "Micro-Thesaurus 1"@en ; + dcterms:subject ex:d1 . + +ex:mt2 a skos:ConceptScheme ; + skos:prefLabel "Micro-Thesaurus 2"@en ; + dcterms:subject ex:d1 . + +ex:mt3 a skos:ConceptScheme ; + skos:prefLabel "Micro-Thesaurus 3"@en ; + dcterms:subject ex:d2 . + +### Begin Domains + +ex:domains a skos:ConceptScheme ; + skos:prefLabel "Special Domains Concept Scheme"@en . + +ex:d1 a skos:Concept ; + skos:inScheme ex:domains ; + skos:topConceptOf ex:domains ; + skos:prefLabel "Domain 1"@en . + +ex:d2 a skos:Concept ; + skos:inScheme ex:domains ; + skos:topConceptOf ex:domains ; + skos:prefLabel "Domain 2"@en . + +#### End Domains + +ex:c1 a skos:Concept ; + skos:prefLabel "Concept 1"@en ; + skos:inScheme ex:thesaurus , ex:mt1 ; + skos:topConceptOf ex:thesaurus , ex:mt1 ; + skos:narrower ex:c1.1 . + +ex:c1.1 a skos:Concept ; + skos:prefLabel "Concept 1.1"@en ; + skos:inScheme ex:thesaurus , ex:mt1 ; + skos:broader ex:c1 . + +ex:c2 a skos:Concept ; + skos:prefLabel "Concept 2"@en ; + skos:inScheme ex:thesaurus , ex:mt2 ; + skos:topConceptOf ex:thesaurus , ex:mt2 . + +ex:c3 a skos:Concept ; + skos:prefLabel "Concept 3"@en ; + skos:inScheme ex:thesaurus , ex:mt3 ; + skos:topConceptOf ex:thesaurus , ex:mt3 . \ No newline at end of file diff --git a/tests/testvocabularies.ttl b/tests/testvocabularies.ttl index 27302227f..5e824a2ea 100644 --- a/tests/testvocabularies.ttl +++ b/tests/testvocabularies.ttl @@ -76,6 +76,19 @@ skosmos:sparqlGraph . +:test-concept-schemes a skosmos:Vocabulary, void:Dataset ; + dc11:title "Test concept schemes"@en ; + dc:subject :cat_general ; + void:dataDump , + ; + void:uriSpace "http://www.exemple.fr/"; + skosmos:arrayClass isothes:ThesaurusArray ; + skosmos:groupClass skos:Collection ; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:defaultLanguage "en"; + skosmos:sparqlGraph . + :showDeprecated a skosmos:Vocabulary, void:Dataset ; dc11:title "Show deprecated test vocabulary"@en ; dc:subject :cat_general ; From 5978fd523ff89471b4556ecf219d10787cc816fd Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Tue, 19 Dec 2017 10:43:29 +0200 Subject: [PATCH 007/173] skos-xl labels should now work --- model/Concept.php | 14 ++++++------- model/ConceptPropertyValueLiteral.php | 30 +++++++++++++++++++++++++-- resource/css/styles.css | 20 ++++++++++++++++++ view/concept-shared.twig | 8 +++---- 4 files changed, 58 insertions(+), 14 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 93dc98c61..e0c5be0b2 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -138,9 +138,9 @@ public function getLabel() return ""; } - public function hasXlLabel() + public function hasXlLabel($prop = 'prefLabel') { - if ($this->resource->hasProperty('skosxl:prefLabel')) { + if ($this->resource->hasProperty('skosxl:' . $prop)) { return true; } return false; @@ -155,7 +155,7 @@ public function getXlLabel() return new LabelSkosXL($this->model, $labres); } } - return 'BING'; + return null; } /** @@ -371,7 +371,7 @@ public function getProperties() // Iterating through every literal and adding these to the data object. foreach ($this->resource->allLiterals($sprop) as $val) { - $literal = new ConceptPropertyValueLiteral($val, $prop); + $literal = new ConceptPropertyValueLiteral($this->model, $this->vocab, $this->resource, $val, $prop); // only add literals when they match the content/hit language or have no language defined if (isset($ret[$prop]) && ($literal->getLang() === $this->clang || $literal->getLang() === null)) { $ret[$prop]->addValue($literal); @@ -613,8 +613,8 @@ public function getForeignLabels() foreach ($labels as $lit) { // filtering away subsets of the current language eg. en vs en-GB if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) { - $prop = in_array($lit, $prefLabels) ? 'skos:prefLabel' : 'skos:altLabel'; - $ret[$this->literalLanguageToString($lit)][] = new ConceptPropertyValueLiteral($lit, $prop); + $prop = in_array($lit, $prefLabels) ? 'skos:prefLabel' : 'skos:altLabel'; + $ret[$this->literalLanguageToString($lit)][] = new ConceptPropertyValueLiteral($this->model, $this->vocab, $this->resource, $lit, $prop); } } ksort($ret); @@ -631,7 +631,7 @@ public function getAllLabels($property) // shortening property labels if possible, EasyRdf requires full URIs to be in angle brackets $property = (EasyRdf\RdfNamespace::shorten($property) !== null) ? EasyRdf\RdfNamespace::shorten($property) : "<$property>"; foreach ($this->resource->allLiterals($property) as $lit) { - $labels[Punic\Language::getName($lit->getLang(), $this->getEnvLang())][] = new ConceptPropertyValueLiteral($lit, $property); + $labels[Punic\Language::getName($lit->getLang(), $this->getEnvLang())][] = new ConceptPropertyValueLiteral($this->model, $this->vocab, $this->resource, $lit, $property); } ksort($labels); return $labels; diff --git a/model/ConceptPropertyValueLiteral.php b/model/ConceptPropertyValueLiteral.php index 52247a730..039fabfad 100644 --- a/model/ConceptPropertyValueLiteral.php +++ b/model/ConceptPropertyValueLiteral.php @@ -3,15 +3,16 @@ /** * Class for handling concept property values. */ -class ConceptPropertyValueLiteral +class ConceptPropertyValueLiteral extends VocabularyDataObject { /** the literal object for the property value */ private $literal; /** property type */ private $type; - public function __construct($literal, $prop) + public function __construct($model, $vocab, $resource, $literal, $prop) { + parent::__construct($model, $vocab, $resource); $this->literal = $literal; $this->type = $prop; } @@ -64,4 +65,29 @@ public function getNotation() return null; } + public function hasXlProperties() + { + $ret = array(); + $graph = $this->resource->getGraph(); + $resources = $graph->resourcesMatching('skosxl:literalForm', $this->literal); + return !empty($resources); + } + + public function getXlProperties() + { + $ret = array(); + $graph = $this->resource->getGraph(); + $resources = $graph->resourcesMatching('skosxl:literalForm', $this->literal); + foreach ($resources as $xlres) { + foreach ($xlres->properties() as $prop) { + foreach($graph->allLiterals($xlres, $prop) as $val) { + if ($prop !== 'rdf:type') { + $ret[$prop] = $val; + } + } + } + } + return $ret; + } + } diff --git a/resource/css/styles.css b/resource/css/styles.css index 762e1686a..db4950f71 100644 --- a/resource/css/styles.css +++ b/resource/css/styles.css @@ -547,12 +547,25 @@ ul.dropdown-menu > li:last-child > input { display: none; margin-top: 5px; width: 100%; + +} + +.reified-property-value { + float: left; } .reified-property-value > img { width: 18px; } +span.xl-label > img { + margin: -2px 2px 0 0; +} + +span.xl-pref-label > img { + margin: 10px 2px; +} + /* front page stuff ***************************/ .welcome-box, .right-box, #vocabulary-list { @@ -1203,6 +1216,13 @@ tr { border-bottom: 0; } +.other-languages > .col-xs-6.versal.replaced { + padding-right: 0; +} + +.other-languages.first-of-language > .col-xs-6.versal-pref.replaced { + padding-right: 0; +} .search-results-property-table tr.other-languages > td:last-child { border-bottom: none; diff --git a/view/concept-shared.twig b/view/concept-shared.twig index dd75f0d2d..79b71088d 100644 --- a/view/concept-shared.twig +++ b/view/concept-shared.twig @@ -49,7 +49,7 @@ {% else %}
{% if concept.notation %}{{ concept.notation }}{% endif %} - {% if concept.hasXlLabel %}
{% for key, val in concept.xlLabel.properties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{{ concept.xlLabel }}{% else %}{{ concept.label }}{% endif %} + {% if concept.hasXlLabel %}
{% for key, val in concept.xlLabel.properties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{{ concept.xlLabel }}{% else %}{{ concept.label }}{% endif %}
{% endif %}
@@ -82,7 +82,6 @@ {% if propval.isReified %} {# e.g. skos:definition's with resource values #} {% if propval.notation %}{{ propval.notation }} {% endif %} {{ propval.label(request.contentLang) }}
{% for key, val in propval.reifiedPropertyValues %}

{{ key }}: {{ val.label(request.contentLang) }}

{% endfor %}
- {% else %} {% if propval.notation %}{{ propval.notation }} {% endif %} {{ propval.label(request.contentLang) }} {% endif %} @@ -99,8 +98,7 @@ {% endif %} {% elseif property.type == 'rdf:type' %}

{{ propval.label|trans }}

{% else %} {# Literals (no URI), eg. alternative labels as properties #} - {% if propval.lang == request.contentLang or propval.lang == null or not request.contentLang and propval.lang == request.lang %} - {% if propval.containsHtml %}{{ propval.label|raw }}{% else %}{{ propval.label }}{% endif %}{% if propval.lang and (request.contentLang and propval.lang != request.contentLang or explicit_langcodes) %} ({{ propval.lang }}){% endif %}

+ {% if propval.lang == request.contentLang or propval.lang == null or not request.contentLang and propval.lang == request.lang %}{% if propval.hasXlProperties %}
{% for key, val in propval.getXlProperties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' and val != '' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{% endif %}{% if propval.containsHtml %}{{ propval.label|raw }}{% else %}{{ propval.label }}{% endif %}{% if propval.lang and (request.contentLang and propval.lang != request.contentLang or explicit_langcodes) %} ({{ propval.lang }}){% endif %}

{% endif %} {% endif %} @@ -149,7 +147,7 @@ {% for language,labels in concept.foreignLabels %} {% for value in labels %}
-
{{ value.label }}
+
{% if value.hasXlProperties %}
{% for key, val in value.getXlProperties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' and val != '' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{% endif %}{{ value.label }}
{% if prevlang != language %}

{{ language }}

{% endif %}
{% set prevlang = language %} From f424cd61912b7a2ce8af55787f7272fd90531fbc Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Tue, 19 Dec 2017 12:38:04 +0200 Subject: [PATCH 008/173] fixing the preflabel right pad --- resource/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/css/styles.css b/resource/css/styles.css index db4950f71..c2b9305da 100644 --- a/resource/css/styles.css +++ b/resource/css/styles.css @@ -1220,7 +1220,7 @@ tr { padding-right: 0; } -.other-languages.first-of-language > .col-xs-6.versal-pref.replaced { +.other-languages.first-of-language > .col-xs-6.versal-pref { padding-right: 0; } From 632169aae50e3ec1441cc6b277804350b05e10a9 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Tue, 19 Dec 2017 13:22:49 +0200 Subject: [PATCH 009/173] fixing the unit tests --- tests/ConceptPropertyValueLiteralTest.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/ConceptPropertyValueLiteralTest.php b/tests/ConceptPropertyValueLiteralTest.php index 5591a9dc1..f801c2c08 100644 --- a/tests/ConceptPropertyValueLiteralTest.php +++ b/tests/ConceptPropertyValueLiteralTest.php @@ -25,7 +25,8 @@ protected function setUp() { */ public function testConstructor() { $litmock = $this->getMockBuilder('EasyRdf\Literal')->disableOriginalConstructor()->getMock(); - $prop = new ConceptPropertyValueLiteral($litmock, 'skosmos:someProperty'); + $resmock = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); + $prop = new ConceptPropertyValueLiteral($this->model, $this->vocab, $resmock, $litmock, 'skosmos:someProperty'); $this->assertEquals(null, $prop->__toString()); } @@ -101,7 +102,8 @@ public function testToString() { */ public function testToStringEmpty() { $litmock = $this->getMockBuilder('EasyRdf\Literal')->disableOriginalConstructor()->getMock(); - $lit = new ConceptPropertyValueLiteral($litmock, 'skosmos:testType'); + $resmock = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); + $lit = new ConceptPropertyValueLiteral($this->model, $this->vocab, $resmock, $litmock, 'skosmos:testType'); $this->assertEquals('', $lit); } @@ -110,7 +112,8 @@ public function testToStringEmpty() { */ public function testGetNotation() { $litmock = $this->getMockBuilder('EasyRdf\Literal')->disableOriginalConstructor()->getMock(); - $lit = new ConceptPropertyValueLiteral($litmock, 'skosmos:testType'); + $resmock = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); + $lit = new ConceptPropertyValueLiteral($this->model, $this->vocab, $resmock, $litmock, 'skosmos:testType'); $this->assertEquals(null, $lit->getNotation()); } @@ -120,7 +123,8 @@ public function testGetNotation() { public function testGetContainsHtmlWhenThereIsNone() { $litmock = $this->getMockBuilder('EasyRdf\Literal')->disableOriginalConstructor()->getMock(); $litmock->method('getValue')->will($this->returnValue('a regular literal')); - $lit = new ConceptPropertyValueLiteral($litmock, 'skosmos:testType'); + $resmock = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); + $lit = new ConceptPropertyValueLiteral($this->model, $this->vocab, $resmock, $litmock, 'skosmos:testType'); $this->assertFalse($lit->getContainsHtml()); } @@ -130,7 +134,8 @@ public function testGetContainsHtmlWhenThereIsNone() { public function testGetContainsHtmlWhenThereIsOnlyAOpeningTag() { $litmock = $this->getMockBuilder('EasyRdf\Literal')->disableOriginalConstructor()->getMock(); $litmock->method('getValue')->will($this->returnValue('a literal with broken html')); - $lit = new ConceptPropertyValueLiteral($litmock, 'skosmos:testType'); + $resmock = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); + $lit = new ConceptPropertyValueLiteral($this->model, $this->vocab, $resmock, $litmock, 'skosmos:testType'); $this->assertFalse($lit->getContainsHtml()); } @@ -140,7 +145,8 @@ public function testGetContainsHtmlWhenThereIsOnlyAOpeningTag() { public function testGetContainsHtml() { $litmock = $this->getMockBuilder('EasyRdf\Literal')->disableOriginalConstructor()->getMock(); $litmock->method('getValue')->will($this->returnValue('a literal with valid html')); - $lit = new ConceptPropertyValueLiteral($litmock, 'skosmos:testType'); + $resmock = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); + $lit = new ConceptPropertyValueLiteral($this->model, $this->vocab, $resmock, $litmock, 'skosmos:testType'); $this->assertTrue($lit->getContainsHtml()); } } From 0ef48fd577b9fe18fb31e40dca9e89badf326c7c Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Tue, 19 Dec 2017 14:40:17 +0200 Subject: [PATCH 010/173] fixing the skosxl qtips not appearing after ajaxing content, related to #533 --- resource/js/docready.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resource/js/docready.js b/resource/js/docready.js index 0eea7d1ad..79ddd94b8 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -70,6 +70,17 @@ $(function() { // DOCUMENT READY if (settings.url.indexOf('search') !== -1 && $autocomplete.length > 0 && $autocomplete[0].offsetHeight === 302) { $(".tt-dropdown-menu").mCustomScrollbar({ alwaysShowScrollbar: 1, scrollInertia: 0 }); } + + $('.reified-property-value').each(function() { + $(this).qtip({ + content: $(this).next('.reified-tooltip'), + position: { my: 'top left', at: 'top left' }, + style: { classes: 'qtip-skosmos' }, + show: { delay: 100 }, + hide: { fixed: true, delay: 400 } + }); + }); + countAndSetOffset(); hideCrumbs(); From 4e422d5c5770b6a501b92378ae734eb8181c8feb Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Tue, 19 Dec 2017 15:12:09 +0200 Subject: [PATCH 011/173] removing unused ?member variable, fixes #655 --- model/sparql/GenericSparql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index ae235d92e..601293351 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -1799,7 +1799,7 @@ private function generateParentListQuery($uri, $lang, $fallback, $props) { $fcl = $this->generateFromClause(); $propertyClause = implode('|', $props); $query = << Date: Tue, 19 Dec 2017 15:15:49 +0200 Subject: [PATCH 012/173] moving mapping concept notations inside the a element, related to #623 --- view/concept-shared.twig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/view/concept-shared.twig b/view/concept-shared.twig index 79b71088d..29b11bc39 100644 --- a/view/concept-shared.twig +++ b/view/concept-shared.twig @@ -183,8 +183,7 @@ {% if propval.label %}
- {% if propval.notation %}{{ propval.notation }}{% endif %} - {{ propval.label(request.contentLang) }} + {% if propval.notation %}{{ propval.notation }}{% endif %}{{ propval.label(request.contentLang) }} {% if propval.label.lang and (propval.label.lang != request.contentLang) or (explicit_langcodes and propval.label.lang) %} ({{ propval.label(request.contentLang).lang }}){% endif %}
{% set vocabname = propval.vocabname %} From 8359d9b6e1c50414e7fa11015c28b4f69aa690f0 Mon Sep 17 00:00:00 2001 From: Thomas Francart Date: Tue, 19 Dec 2017 16:13:02 +0100 Subject: [PATCH 013/173] Read property label from current vocabulary before querying the default graph --- model/Concept.php | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index c60281dd0..317b4487a 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -331,14 +331,27 @@ public function getProperties() } // EasyRdf requires full URIs to be in angle brackets - if (!in_array($prop, $this->DELETED_PROPERTIES) || ($this->isGroup() === false && $prop === 'skos:member')) { - // retrieve property label and super properties from default SPARQL endoint + if (!in_array($prop, $this->DELETED_PROPERTIES) || ($this->isGroup() === false && $prop === 'skos:member')) { + + // retrieve property label and super properties from the current vocabulary first // note that this imply that the property has an rdf:type declared for the query to work - $envLangLabels = $this->model->getDefaultSparql()->queryLabel($longUri, $this->getEnvLang()); - $proplabel = ($envLangLabels)?$envLangLabels[$this->getEnvLang()]:$this->model->getDefaultSparql()->queryLabel($longUri, '')['']; + $envLangLabels = $this->vocab->getSparql()->queryLabel($longUri, $this->getEnvLang()); + $proplabel = ($envLangLabels)?$envLangLabels[$this->getEnvLang()]:$this->vocab->getSparql()->queryLabel($longUri, '')['']; + + // if not found in current vocabulary, look up in the default graph to be able + // to read an ontology loaded in a separate graph + if(!$proplabel) { + $envLangLabels = $this->model->getDefaultSparql()->queryLabel($longUri, $this->getEnvLang()); + $proplabel = ($envLangLabels)?$envLangLabels[$this->getEnvLang()]:$this->model->getDefaultSparql()->queryLabel($longUri, '')['']; + } + + $superprops = $this->vocab->getSparql()->querySuperProperties($longUri); + // also look up superprops in the default graph if not found in current vocabulary + if(!$superprops) { + $superprops = $this->model->getDefaultSparql()->querySuperProperties($longUri); + } // we're reading only one super property, even if there are multiple ones - $superprops = $this->model->getDefaultSparql()->querySuperProperties($longUri); $superprop = ($superprops)?$superprops[0]:null; if ($superprop) { $superprop = EasyRdf\RdfNamespace::shorten($superprop) ? EasyRdf\RdfNamespace::shorten($superprop) : $superprop; From 02d872dafcd6fa10e4d0512a2a91557b46f5da00 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Thu, 21 Dec 2017 08:00:11 +0200 Subject: [PATCH 014/173] updating the composer dependencies before 1.10 release --- composer.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 60a80f8a1..75f86f3dc 100644 --- a/composer.json +++ b/composer.json @@ -30,28 +30,28 @@ } }, "require": { - "components/jquery": "1.12.*", + "components/jquery": "2.2.*", "components/jqueryui": "1.12.*", - "components/handlebars.js": "v1.3.0", + "components/handlebars.js": "v4.0.11", "davidstutz/bootstrap-multiselect": "v0.9.13", "easyrdf/easyrdf": "0.10.0-alpha.1", - "twig/twig": "1.29.*", - "twig/extensions": "1.4.*", + "twig/twig": "1.35.*", + "twig/extensions": "1.5.*", "twitter/bootstrap": "3.2.*", "twitter/typeahead.js": "v0.10.5", "willdurand/negotiation": "1.5.*", "vakata/jstree": "3.3.*", - "punic/punic": "1.6.0", + "punic/punic": "1.6.5", "ml/json-ld": "1.*", "medialize/uri.js": "1.18.2", "ext-gettext": "*", - "monolog/monolog": "^1.22" + "monolog/monolog": "1.23.*" }, "require-dev": { - "phpunit/phpunit": "4.8 - 5.1", + "phpunit/phpunit": "4.8 - 5.3.5", "umpirsky/twig-gettext-extractor": "1.1.*", "phpdocumentor/phpdocumentor": "2.*", - "codeclimate/php-test-reporter": "0.3.2", + "codeclimate/php-test-reporter": "0.4.4", "symfony/dom-crawler": "3.2.6", "mockery/mockery": "1.0.0-alpha1" }, From 41f54ffb0d0a62f63b03f17e813ded4e6b56b258 Mon Sep 17 00:00:00 2001 From: Thomas Francart Date: Wed, 3 Jan 2018 16:57:00 +0100 Subject: [PATCH 015/173] Look for property label and superproperties in the current EasyRdf Model rather than making another SPARQL query. --- model/Concept.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 317b4487a..df3a5739d 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -332,20 +332,24 @@ public function getProperties() // EasyRdf requires full URIs to be in angle brackets if (!in_array($prop, $this->DELETED_PROPERTIES) || ($this->isGroup() === false && $prop === 'skos:member')) { - - // retrieve property label and super properties from the current vocabulary first - // note that this imply that the property has an rdf:type declared for the query to work - $envLangLabels = $this->vocab->getSparql()->queryLabel($longUri, $this->getEnvLang()); - $proplabel = ($envLangLabels)?$envLangLabels[$this->getEnvLang()]:$this->vocab->getSparql()->queryLabel($longUri, '')['']; + // retrieve property label and super properties from the current vocabulary first + $propres = new EasyRdf\Resource($prop, $this->graph); + $proplabel = $propres->label($this->getEnvLang()) ? $propres->label($this->getEnvLang()) : $propres->label(); // if not found in current vocabulary, look up in the default graph to be able // to read an ontology loaded in a separate graph + // note that this imply that the property has an rdf:type declared for the query to work if(!$proplabel) { $envLangLabels = $this->model->getDefaultSparql()->queryLabel($longUri, $this->getEnvLang()); $proplabel = ($envLangLabels)?$envLangLabels[$this->getEnvLang()]:$this->model->getDefaultSparql()->queryLabel($longUri, '')['']; } - $superprops = $this->vocab->getSparql()->querySuperProperties($longUri); + // look for superproperties in the current graph + $superprops = null; + foreach ($this->graph->allResources($prop, 'rdfs:subPropertyOf') as $subi) { + $superprops[] = $subi->getUri(); + } + // also look up superprops in the default graph if not found in current vocabulary if(!$superprops) { $superprops = $this->model->getDefaultSparql()->querySuperProperties($longUri); From 07c1286f185b96c170d5b9cdb8e5a59cf5130483 Mon Sep 17 00:00:00 2001 From: Thomas Francart Date: Fri, 5 Jan 2018 13:17:15 +0100 Subject: [PATCH 016/173] Use locale-based sort to sort values in concept page --- model/ConceptProperty.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/ConceptProperty.php b/model/ConceptProperty.php index 998945266..39caf3d1c 100644 --- a/model/ConceptProperty.php +++ b/model/ConceptProperty.php @@ -86,7 +86,7 @@ private function sortValues() { if (!empty($this->values)) { uksort($this->values, function($a, $b) { - return strnatcasecmp($a,$b); + return strcoll(strtolower($a),strtolower($b)); }); } $this->is_sorted = true; From 7fdcb18ef89736fad33467be83feaa665f18dcaf Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Mon, 8 Jan 2018 12:41:29 +0200 Subject: [PATCH 017/173] initializing the superprops variable as an empty array --- model/Concept.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index bc7e91603..13ceada61 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -366,13 +366,13 @@ public function getProperties() } // look for superproperties in the current graph - $superprops = null; + $superprops = array(); foreach ($this->graph->allResources($prop, 'rdfs:subPropertyOf') as $subi) { $superprops[] = $subi->getUri(); } // also look up superprops in the default graph if not found in current vocabulary - if(!$superprops) { + if(!$superprops || empty($superprops)) { $superprops = $this->model->getDefaultSparql()->querySuperProperties($longUri); } From 7c2e1f45ee0d4179776be60a73b6d4ef70923f00 Mon Sep 17 00:00:00 2001 From: kouralex Date: Wed, 10 Jan 2018 13:57:29 +0200 Subject: [PATCH 018/173] pulled files from master --- model/Concept.php | 111 ++++++++++++++++++++++++++ model/ConceptMappingPropertyValue.php | 57 +++++++++---- model/PluginRegister.php | 64 +++++++++++---- view/scripts.twig | 6 ++ 4 files changed, 208 insertions(+), 30 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 13ceada61..0d5cf4756 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -282,6 +282,85 @@ public function getMappingProperties() if ($response) { $ret[$prop]->addValue(new ConceptMappingPropertyValue($this->model, $this->vocab, $response, $prop), $this->clang); + //var_dump($ret[$prop]); + //@TODO + + $ext_longUris = $response->propertyUris(); + $search_for_prop = $this->getVocab()->getConfig()->getPlugins()->getExtProperties(); + + /*foreach ($ext_longUris as &$prop2) { + if (EasyRdf\RdfNamespace::shorten($prop2) !== null) { + // shortening property labels if possible + $prop2 = $sprop = EasyRdf\RdfNamespace::shorten($prop2); + } else { + $prop2 = $sprop2 = "<$prop2>"; + } + } + // EasyRdf requires full URIs to be in angle brackets + */ + + // either this foreach or hasProperty + + $save = array($exuri => array()); + + foreach ($ext_longUris as &$prop2) { + if (in_array($prop2, $search_for_prop)) { + + $resList = $response->allResources('<' . $prop2 . '>'); + $readyResList = array(); + array_walk($resList, function(&$value, $key) use (&$readyResList, &$prop2) { + $value = $value->toRdfPhp(); + $readyResList[$prop2][$key] = $value; + }); + //var_dump($readyResList); + $litList = $response->allLiterals('<' . $prop2 . '>'); + array_walk($litList, function(&$value) { + $value = $value->toRdfPhp(); + }); + + if (isset($readyResList[$prop2])) { + $save[$exuri] = $readyResList; + } + else { + $save[$exuri][$prop2] = $litList; + } + + //var_dump($propres2->toRdfPhp()); + //echo $response->getUri(); + //var_dump($prop2); + } + } + + //var_dump($save); + //var_dump($response->toRdfPhp()); + //var_dump($response->getGraph()->toRdfPhp()); + + $this->graph->parse($save, 'php'); + /* + + var_dump($ext_longUris); + + foreach ($search_for_prop as $extProp) { + //$this->graph->parse($response->getGraph()->toRdfPhp(), 'php'); + //echo $extProp; + //var_dump($response->getGraph()->resourcesMatching($extProp)); + foreach ($response->getGraph()->resourcesMatching($extProp) as $match) { + echo $extProp; + var_dump($match->propertyUris()); + var_dump($match); + } + //$this->graph->parse($response->getGraph()->resourcesMatching($extProp)); + } + //var_dump($response->getGraph()->resources()); + var_dump($response->getGraph()->toRdfPhp()); + var_dump($response->getGraph()); + //var_dump($response); + var_dump($this->resource); + */ + //exit(); + //exit(); + //$this->graph + //$this->graph->parse($response->getGraph()->serialise("rdfxml"),"rdfxml"); continue; } } @@ -663,4 +742,36 @@ public function getAllLabels($property) ksort($labels); return $labels; } + + /** + * Dump concept graph as JSON-LD. + */ + public function dumpJsonLd() { + + $context = array( + 'skos' => 'http://www.w3.org/2004/02/skos/core#', + 'isothes' => 'http://purl.org/iso25964/skos-thes#', + 'rdfs' => 'http://www.w3.org/2000/01/rdf-schema#', + 'owl' => 'http://www.w3.org/2002/07/owl#', + 'dct' => 'http://purl.org/dc/terms/', + 'dc11' => 'http://purl.org/dc/elements/1.1/', + 'uri' => '@id', + 'type' => '@type', + 'lang' => '@language', + 'value' => '@value', + 'graph' => '@graph', + 'label' => 'rdfs:label', + 'prefLabel' => 'skos:prefLabel', + 'altLabel' => 'skos:altLabel', + 'hiddenLabel' => 'skos:hiddenLabel', + 'broader' => 'skos:broader', + 'narrower' => 'skos:narrower', + 'related' => 'skos:related', + 'inScheme' => 'skos:inScheme', + ); + $compactJsonLD = \ML\JsonLD\JsonLD::compact($this->graph->serialise('jsonld'), json_encode($context)); + $results = \ML\JsonLD\JsonLD::toString($compactJsonLD); + + return $results; + } } diff --git a/model/ConceptMappingPropertyValue.php b/model/ConceptMappingPropertyValue.php index 75e27111f..547847506 100644 --- a/model/ConceptMappingPropertyValue.php +++ b/model/ConceptMappingPropertyValue.php @@ -41,26 +41,22 @@ public function getLabel($lang = '') return $label; } - private function queryLabel($lang) + private function queryLabel($lang = '') { if ($this->clang) { $lang = $this->clang; } - // if multiple vocabularies are found, the following method will return in priority the current vocabulary of the mapping - $exvocab = $this->model->guessVocabularyFromURI($this->resource->getUri(), $this->vocab->getId()); - if ($this->resource->label($lang) !== null) { // current language - return $this->resource->label($lang); - } elseif ($this->resource->label() !== null) { // any language - return $this->resource->label(); - } elseif ($this->resource->getLiteral('rdf:value', $lang) !== null) { // current language - return $this->resource->getLiteral('rdf:value', $lang); - } elseif ($this->resource->getLiteral('rdf:value') !== null) { // any language - return $this->resource->getLiteral('rdf:value'); + $label = $this->getResourceLabel($this->resource, $lang); + if ($label) { + return $label; } - // if the resource is from a another vocabulary known by the skosmos instance + // if multiple vocabularies are found, the following method will return in priority the current vocabulary of the mapping + $exvocab = $this->model->guessVocabularyFromURI($this->resource->getUri(), $this->vocab->getId()); + + // if the resource is from another vocabulary known by the skosmos instance if ($exvocab) { $label = $this->getExternalLabel($exvocab, $this->getUri(), $lang) ? $this->getExternalLabel($exvocab, $this->getUri(), $lang) : $this->getExternalLabel($exvocab, $this->getUri(), $exvocab->getConfig()->getDefaultLanguage()); if ($label) { @@ -73,6 +69,24 @@ private function queryLabel($lang) return $label; } + private function getResourceLabel($res, $lang = '') { + + if ($this->clang) { + $lang = $this->clang; + } + + if ($res->label($lang) !== null) { // current language + return $res->label($lang); + } elseif ($res->label() !== null) { // any language + return $res->label(); + } elseif ($res->getLiteral('rdf:value', $lang) !== null) { // current language + return $res->getLiteral('rdf:value', $lang); + } elseif ($res->getLiteral('rdf:value') !== null) { // any language + return $res->getLiteral('rdf:value'); + } + return null; + } + public function getUri() { return $this->resource->getUri(); @@ -89,19 +103,29 @@ public function getVocab() return $this->vocab; } - public function getVocabName() + public function getVocabName($lang = '') { + + if ($this->clang) { + $lang = $this->clang; + } + // if multiple vocabularies are found, the following method will return in priority the current vocabulary of the mapping $exvocab = $this->model->guessVocabularyFromURI($this->resource->getUri(), $this->vocab->getId()); if ($exvocab) { - return $exvocab->getTitle(); + return $exvocab->getTitle($lang); } + // @codeCoverageIgnoreStart $scheme = $this->resource->get('skos:inScheme'); if ($scheme) { $schemeResource = $this->model->getResourceFromUri($scheme->getUri()); - if ($schemeResource && $schemeResource->label()) { - return $schemeResource->label()->getValue(); + if ($schemeResource) { + $schemaName = $this->getResourceLabel($schemeResource); + if ($schemaName) { + //var_dump($schemaName); + return $schemaName; + } } } // got a label for the concept, but not the scheme - use the host name as scheme label @@ -125,3 +149,4 @@ public function getNotation() } } + diff --git a/model/PluginRegister.php b/model/PluginRegister.php index ec13e4c8d..0e1a21370 100644 --- a/model/PluginRegister.php +++ b/model/PluginRegister.php @@ -6,12 +6,12 @@ class PluginRegister { public function __construct($requestedPlugins=array()) { $this->requestedPlugins = $requestedPlugins; } - + /** * Returns the plugin configurations found from plugin folders inside the plugins folder * @return array */ - protected function getPlugins() + protected function getPlugins() { $plugins = array(); $pluginconfs = glob('plugins/*/plugin.json'); @@ -25,32 +25,38 @@ protected function getPlugins() } /** - * Returns the plugin configurations found from plugin folders + * Returns the plugin configurations found from plugin folders * inside the plugins folder filtered by filetype. * @param string $type filetype e.g. 'css', 'js' or 'template' + * @param boolean $raw interpret $type values as raw text instead of files * @return array */ - private function filterPlugins($type) { + private function filterPlugins($type, $raw=false) { $plugins = $this->getPlugins(); $ret = array(); if (!empty($plugins)) { foreach ($plugins as $name => $files) { if (isset($files[$type])) { $ret[$name] = array(); - foreach ($files[$type] as $file) { - array_push($ret[$name], 'plugins/' . $name . '/' . $file); + if ($raw) { + $ret[$name] = $files[$type]; + } + else { + foreach ($files[$type] as $file) { + array_push($ret[$name], 'plugins/' . $name . '/' . $file); + } } } - } + } } return $ret; } /** - * Returns the plugin configurations found from plugin folders + * Returns the plugin configurations found from plugin folders * inside the plugins folder filtered by plugin name (the folder name). * @param string $type filetype e.g. 'css', 'js' or 'template' - * @param array $names the plugin name strings (foldernames) in an array + * @param array $names the plugin name strings (foldernames) in an array * @return array */ private function filterPluginsByName($type, $names) { @@ -65,7 +71,7 @@ private function filterPluginsByName($type, $names) { /** * Returns an array of javascript filepaths - * @param array $names the plugin name strings (foldernames) in an array + * @param array $names the plugin name strings (foldernames) in an array * @return array */ public function getPluginsJS($names=null) { @@ -78,7 +84,7 @@ public function getPluginsJS($names=null) { /** * Returns an array of css filepaths - * @param array $names the plugin name strings (foldernames) in an array + * @param array $names the plugin name strings (foldernames) in an array * @return array */ public function getPluginsCSS($names=null) { @@ -91,7 +97,7 @@ public function getPluginsCSS($names=null) { /** * Returns an array of template filepaths - * @param array $names the plugin name strings (foldernames) in an array + * @param array $names the plugin name strings (foldernames) in an array * @return array */ public function getPluginsTemplates($names=null) { @@ -104,7 +110,7 @@ public function getPluginsTemplates($names=null) { /** * Returns an array of template files contents as strings - * @param array $names the plugin name strings (foldernames) in an array + * @param array $names the plugin name strings (foldernames) in an array * @return array */ public function getTemplates($names=null) { @@ -124,7 +130,7 @@ public function getTemplates($names=null) { } /** - * Returns an array of javascript function names to call when loading a new concept + * Returns an array of javascript function names to call when loading a new concept * @return array */ public function getCallbacks() { @@ -138,4 +144,34 @@ public function getCallbacks() { } return $ret; } + + /** + * Returns an array that is flattened from its possibly multidimensional form + * copied from https://stackoverflow.com/a/1320156 + * @return array + */ + protected function flatten($array) { + $return = array(); + array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; }); + return $return; + } + + /** + * Returns a flattened array containing the external properties we are interested in saving + * @return array + */ + public function getExtProperties() { + + $defaultValues = ["http://purl.org/dc/elements/1.1/title", "http://purl.org/dc/terms/title", + "http://www.w3.org/2004/02/skos/core#prefLabel", "http://www.w3.org/2000/01/rdf-schema#label", + "http://www.w3.org/2004/02/skos/core#inScheme", "http://www.w3.org/2002/07/owl#sameAs", + "http://www.w3.org/2004/02/skos/core#exactMatch", "http://www.w3.org/2004/02/skos/core#closeMatch", + "http://rdfs.org/ns/void#inDataset"]; + + $ret = array_merge($defaultValues, $this->filterPlugins('ext-properties', true)); + + // flatten and remove duplicates + return array_unique($this->flatten($ret)); + } } + diff --git a/view/scripts.twig b/view/scripts.twig index 78d75af08..a81b1f9ad 100644 --- a/view/scripts.twig +++ b/view/scripts.twig @@ -27,6 +27,11 @@ var uriSpace = "{{ request.vocab.uriSpace }}"; var showNotation = {% if request.vocab and request.vocab.config.showNotation == false %}false{% else %}true{% endif %}; +{% if request.page == 'page' and search_results and search_results|length == 1 %} + +{% endif %} @@ -47,3 +52,4 @@ var showNotation = {% if request.vocab and request.vocab.config.showNotation == {% for files in request.plugins.pluginsJS %}{% for file in files %}{% endfor %}{% endfor %} {% if request.plugins.callbacks %}{% endif %} + From 17456a2d113486a185a30442c7df451875dc2d9a Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Tue, 9 Jan 2018 13:56:03 +1300 Subject: [PATCH 019/173] Issue #665 Remove SERVICE_LOGO old constant and related code --- config.inc.dist | 3 --- controller/WebController.php | 4 ---- model/GlobalConfig.php | 8 -------- tests/GlobalConfigTest.php | 9 --------- 4 files changed, 24 deletions(-) diff --git a/config.inc.dist b/config.inc.dist index d792b8ea8..d73532109 100644 --- a/config.inc.dist +++ b/config.inc.dist @@ -49,9 +49,6 @@ define ("LOG_FILE_NAME", NULL); # customize the service name define("SERVICE_NAME", "Skosmos"); -// customize the service logo by pointing to your logo here. -define("SERVICE_LOGO", "./resource/pics/logo.png"); - // customize the css by adding your own stylesheet define("CUSTOM_CSS", "resource/css/stylesheet.css"); diff --git a/controller/WebController.php b/controller/WebController.php index 340fd699f..c2f9635eb 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -43,10 +43,6 @@ public function __construct($model) $this->twig->addGlobal("BaseHref", $this->getBaseHref()); // setting the service name string from the config.inc $this->twig->addGlobal("ServiceName", $this->model->getConfig()->getServiceName()); - // setting the service logo location from the config.inc - if ($this->model->getConfig()->getServiceLogo() !== null) { - $this->twig->addGlobal("ServiceLogo", $this->model->getConfig()->getServiceLogo()); - } // setting the service custom css file from the config.inc if ($this->model->getConfig()->getCustomCss() !== null) { diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index e1bce9d5d..030e95a48 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -184,14 +184,6 @@ public function getServiceTagline() return $this->getConstant('SERVICE_TAGLINE', null); } - /** - * @return string - */ - public function getServiceLogo() - { - return $this->getConstant('SERVICE_LOGO', null); - } - /** * @return string */ diff --git a/tests/GlobalConfigTest.php b/tests/GlobalConfigTest.php index 6ab8094fa..5987f3539 100644 --- a/tests/GlobalConfigTest.php +++ b/tests/GlobalConfigTest.php @@ -118,15 +118,6 @@ public function testgetServiceTaglineDefaultValue() { $this->assertEquals(null, $actual); } - /** - * @covers GlobalConfig::getServiceLogo - * @covers GlobalConfig::getConstant - */ - public function testServiceLogoDefaultValue() { - $actual = $this->config->getServiceLogo(); - $this->assertEquals(null, $actual); - } - /** * @covers GlobalConfig::getCustomCss * @covers GlobalConfig::getConstant From d10c4f6a795005563c02926bbbd810d4940a39d1 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Tue, 9 Jan 2018 13:59:09 +1300 Subject: [PATCH 020/173] Add Jena Fuseki to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2c3d730c5..e524b3c8a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ report components composer.phar composer.lock +tests/jena-fuseki* From cb3abd447e9fe01dd2e6be7caf44427e3ae6ce58 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 12 Jan 2018 09:12:49 +0200 Subject: [PATCH 021/173] updating composer packages, related to #684 --- composer.json | 19 +++++++++---------- controller/Controller.php | 2 +- controller/RestController.php | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 75f86f3dc..4c4aa22f5 100644 --- a/composer.json +++ b/composer.json @@ -8,11 +8,11 @@ "type": "package", "package": { "name": "medialize/uri.js", - "version": "1.18.2", + "version": "1.19.0", "source": { "url": "https://github.com/medialize/URI.js.git", "type": "git", - "reference": "v1.18.2" + "reference": "v1.19.0" } } }, @@ -35,24 +35,23 @@ "components/handlebars.js": "v4.0.11", "davidstutz/bootstrap-multiselect": "v0.9.13", "easyrdf/easyrdf": "0.10.0-alpha.1", - "twig/twig": "1.35.*", + "twig/twig": "2.4.*", "twig/extensions": "1.5.*", - "twitter/bootstrap": "3.2.*", + "twitter/bootstrap": "3.3.*", "twitter/typeahead.js": "v0.10.5", - "willdurand/negotiation": "1.5.*", + "willdurand/negotiation": "2.3.*", "vakata/jstree": "3.3.*", "punic/punic": "1.6.5", "ml/json-ld": "1.*", - "medialize/uri.js": "1.18.2", + "medialize/uri.js": "1.19.0", "ext-gettext": "*", "monolog/monolog": "1.23.*" }, "require-dev": { - "phpunit/phpunit": "4.8 - 5.3.5", - "umpirsky/twig-gettext-extractor": "1.1.*", - "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "4.8 - 5.4.5", + "umpirsky/twig-gettext-extractor": "1.3.*", "codeclimate/php-test-reporter": "0.4.4", - "symfony/dom-crawler": "3.2.6", + "symfony/dom-crawler": "3.4.3", "mockery/mockery": "1.0.0-alpha1" }, "autoload": { diff --git a/controller/Controller.php b/controller/Controller.php index d9058d6ec..03ae006a7 100644 --- a/controller/Controller.php +++ b/controller/Controller.php @@ -21,7 +21,7 @@ class Controller public function __construct($model) { $this->model = $model; - $this->negotiator = new \Negotiation\FormatNegotiator(); + $this->negotiator = new \Negotiation\Negotiator(); // Specify the location of the translation tables bindtextdomain('skosmos', 'resource/translations'); diff --git a/controller/RestController.php b/controller/RestController.php index 9b4e2e333..825d55054 100644 --- a/controller/RestController.php +++ b/controller/RestController.php @@ -30,7 +30,7 @@ private function returnJson($data) } // otherwise negotiate suitable format for the response and return that - $negotiator = new \Negotiation\FormatNegotiator(); + $negotiator = new \Negotiation\Negotiator(); $priorities = array('application/json', 'application/ld+json'); $best = filter_input(INPUT_SERVER, 'HTTP_ACCEPT', FILTER_SANITIZE_STRING) ? $negotiator->getBest(filter_input(INPUT_SERVER, 'HTTP_ACCEPT', FILTER_SANITIZE_STRING), $priorities) : null; $format = ($best !== null) ? $best->getValue() : $priorities[0]; From cfbaac6bfbfe41f6ae8d7a90bed0e0cae000bd4e Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 12 Jan 2018 09:17:37 +0200 Subject: [PATCH 022/173] running travis with php 7.0, related to #684 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ed7ffc09a..6a26a0d49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ sudo: required dist: trusty language: php php: - - "5.6" + - "7.0" install: - composer install cache: From db0318d18be1ec6e1ee35f06fbe111983cb950ed Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 12 Jan 2018 12:32:05 +0200 Subject: [PATCH 023/173] migrating to phpunit 6, related to #684 --- composer.json | 2 +- tests/BreadcrumbTest.php | 2 +- tests/ConceptMappingPropertyValueTest.php | 2 +- tests/ConceptPropertyTest.php | 2 +- tests/ConceptPropertyValueLiteralTest.php | 4 ++-- tests/ConceptPropertyValueTest.php | 2 +- tests/ConceptSearchParametersTest.php | 2 +- tests/ConceptTest.php | 4 ++-- tests/DataObjectTest.php | 2 +- tests/FeedbackTest.php | 2 +- tests/GenericSparqlTest.php | 2 +- tests/GlobalConfigTest.php | 2 +- tests/JenaTextSparqlTest.php | 2 +- tests/ModelTest.php | 4 ++-- tests/PluginRegisterTest.php | 2 +- tests/RequestTest.php | 2 +- tests/VocabularyCategoryTest.php | 2 +- tests/VocabularyConfigTest.php | 6 +++--- tests/VocabularyDataObjectTest.php | 2 +- tests/VocabularyTest.php | 6 +++--- 20 files changed, 27 insertions(+), 27 deletions(-) diff --git a/composer.json b/composer.json index 4c4aa22f5..721e806ca 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,7 @@ "monolog/monolog": "1.23.*" }, "require-dev": { - "phpunit/phpunit": "4.8 - 5.4.5", + "phpunit/phpunit": "4.8 - 6.5.5", "umpirsky/twig-gettext-extractor": "1.3.*", "codeclimate/php-test-reporter": "0.4.4", "symfony/dom-crawler": "3.4.3", diff --git a/tests/BreadcrumbTest.php b/tests/BreadcrumbTest.php index d24a5073d..a1714ad3d 100644 --- a/tests/BreadcrumbTest.php +++ b/tests/BreadcrumbTest.php @@ -1,6 +1,6 @@ model->getVocabulary('dates'); diff --git a/tests/ConceptPropertyValueTest.php b/tests/ConceptPropertyValueTest.php index 5ed0177ab..338263a32 100644 --- a/tests/ConceptPropertyValueTest.php +++ b/tests/ConceptPropertyValueTest.php @@ -1,6 +1,6 @@ model->searchConcepts(); diff --git a/tests/PluginRegisterTest.php b/tests/PluginRegisterTest.php index 6154e7a14..a56e511e8 100644 --- a/tests/PluginRegisterTest.php +++ b/tests/PluginRegisterTest.php @@ -1,6 +1,6 @@ model->getVocabulary('testdiff'); @@ -164,7 +164,7 @@ public function testGetDataURLs() { /** * @covers VocabularyConfig::getDataURLs - * @expectedException PHPUnit_Framework_Error_Warning + * @expectedException PHPUnit\Framework\Error\Warning */ public function testGetDataURLsNotGuessable() { $vocab = $this->model->getVocabulary('test'); diff --git a/tests/VocabularyDataObjectTest.php b/tests/VocabularyDataObjectTest.php index 33fb9a14d..5f4224938 100644 --- a/tests/VocabularyDataObjectTest.php +++ b/tests/VocabularyDataObjectTest.php @@ -1,7 +1,7 @@ getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); - $vocabstub = $this->getMock('Vocabulary', array('getConceptTransitiveBroaders'), array($model, $resource)); + $vocabstub = $this->getMockBuilder('Vocabulary')->setMethods(array('getConceptTransitiveBroaders'))->setConstructorArgs(array($model, $resource))->getMock(); $vocabstub->method('getConceptTransitiveBroaders')->willReturn(array ( 'http://www.yso.fi/onto/yso/p4762' => array ( 'label' => 'objects', ), 'http://www.yso.fi/onto/yso/p1674' => array ( 'label' => 'physical whole', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p4762', ), ), 'http://www.yso.fi/onto/yso/p14606' => array ( 'label' => 'layers', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p1674', ), ), )); $result = $vocabstub->getBreadCrumbs('en', 'http://www.yso.fi/onto/yso/p14606'); foreach($result['breadcrumbs'][0] as $crumb) @@ -312,7 +312,7 @@ public function testGetBreadCrumbs() { public function testGetBreadCrumbsShortening() { $model = new Model(new GlobalConfig('/../tests/testconfig.inc')); $resource = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); - $vocabstub = $this->getMock('Vocabulary', array('getConceptTransitiveBroaders'), array($model, $resource)); + $vocabstub = $this->getMockBuilder('Vocabulary')->setMethods(array('getConceptTransitiveBroaders'))->setConstructorArgs(array($model, $resource))->getMock(); $vocabstub->method('getConceptTransitiveBroaders')->willReturn(array ( 'http://www.yso.fi/onto/yso/p4762' => array ( 'label' => 'objects', ), 'http://www.yso.fi/onto/yso/p13871' => array ( 'label' => 'thai language', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p10834', ), ), 'http://www.yso.fi/onto/yso/p556' => array ( 'label' => 'languages', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p2881', ), ), 'http://www.yso.fi/onto/yso/p8965' => array ( 'label' => 'Sino-Tibetan languages', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p556', ), ), 'http://www.yso.fi/onto/yso/p3358' => array ( 'label' => 'systems', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p4762', ), ), 'http://www.yso.fi/onto/yso/p10834' => array ( 'label' => 'Tai languages', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p8965', ), ), 'http://www.yso.fi/onto/yso/p2881' => array ( 'label' => 'cultural systems', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p3358', ), ), ) ); $result = $vocabstub->getBreadCrumbs('en', 'http://www.yso.fi/onto/yso/p13871'); $this->assertEquals(6, sizeof($result['breadcrumbs'][0])); From cc4fb520238ad55580eda768d8260ace1ecc0a4a Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 12 Jan 2018 13:22:14 +0200 Subject: [PATCH 024/173] moving to new codeclimate reporter --- .travis.yml | 9 +++++++-- composer.json | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a26a0d49..385073eda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,19 +10,24 @@ cache: - $HOME/.composer - vendor before_script: + - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + - chmod +x ./cc-test-reporter + - ./cc-test-reporter before-build - cd tests - sh ./init_fuseki.sh - cd .. +script: + - bundle exec rspec after_script: + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - pkill -f 'java -Xmx1200M -jar' - - vendor/bin/test-reporter --stdout > codeclimate.json - - "curl -X POST -d @codeclimate.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v0.1.1)' https://codeclimate.com/test_reports" addons: code_climate: repo_token: fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c env: - FUSEKI_VERSION=3.4.0 - FUSEKI_VERSION=SNAPSHOT + - CC_TEST_REPORTER_ID=fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c matrix: allow_failures: - env: FUSEKI_VERSION=SNAPSHOT diff --git a/composer.json b/composer.json index 721e806ca..7b841f1ec 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,6 @@ "require-dev": { "phpunit/phpunit": "4.8 - 6.5.5", "umpirsky/twig-gettext-extractor": "1.3.*", - "codeclimate/php-test-reporter": "0.4.4", "symfony/dom-crawler": "3.4.3", "mockery/mockery": "1.0.0-alpha1" }, From 8846b26c551248e766a0a91dd3684079a8236db6 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 12 Jan 2018 13:27:34 +0200 Subject: [PATCH 025/173] removing copypaste error --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 385073eda..463da82fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,6 @@ before_script: - cd tests - sh ./init_fuseki.sh - cd .. -script: - - bundle exec rspec after_script: - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - pkill -f 'java -Xmx1200M -jar' From fa607274ffd611df40651ee956e7ea0d1bf9ac0d Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 12 Jan 2018 14:02:35 +0200 Subject: [PATCH 026/173] updating the mockery package, related to #684 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7b841f1ec..ad0fba600 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "phpunit/phpunit": "4.8 - 6.5.5", "umpirsky/twig-gettext-extractor": "1.3.*", "symfony/dom-crawler": "3.4.3", - "mockery/mockery": "1.0.0-alpha1" + "mockery/mockery": "1.0" }, "autoload": { "classmap": ["controller/", "model/", "model/sparql/"] From 20a21fae0ca946cf17b0db22df54ffd09778a97d Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 12 Jan 2018 15:23:21 +0200 Subject: [PATCH 027/173] moving old dependencies to composer, related to #684 --- composer.json | 5 ++++- resource/js/jquery.mousewheel.min.js | 12 ------------ resource/js/jquery.qtip.min.js | 4 ---- resource/js/waypoints.min.js | 8 -------- view/scripts.twig | 8 ++++---- 5 files changed, 8 insertions(+), 29 deletions(-) delete mode 100644 resource/js/jquery.mousewheel.min.js delete mode 100644 resource/js/jquery.qtip.min.js delete mode 100644 resource/js/waypoints.min.js diff --git a/composer.json b/composer.json index ad0fba600..3e653502b 100644 --- a/composer.json +++ b/composer.json @@ -35,6 +35,7 @@ "components/handlebars.js": "v4.0.11", "davidstutz/bootstrap-multiselect": "v0.9.13", "easyrdf/easyrdf": "0.10.0-alpha.1", + "etdsolutions/waypoints": "4.0.0", "twig/twig": "2.4.*", "twig/extensions": "1.5.*", "twitter/bootstrap": "3.3.*", @@ -45,7 +46,9 @@ "ml/json-ld": "1.*", "medialize/uri.js": "1.19.0", "ext-gettext": "*", - "monolog/monolog": "1.23.*" + "monolog/monolog": "1.23.*", + "newerton/jquery-mousewheel": "dev-master", + "grimmlink/qtip2": "3.0.3" }, "require-dev": { "phpunit/phpunit": "4.8 - 6.5.5", diff --git a/resource/js/jquery.mousewheel.min.js b/resource/js/jquery.mousewheel.min.js deleted file mode 100644 index fc07ba56a..000000000 --- a/resource/js/jquery.mousewheel.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) - * Licensed under the MIT License (LICENSE.txt). - * - * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. - * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. - * Thanks to: Seamus Leahy for adding deltaX and deltaY - * - * Version: 3.0.6 - * - * Requires: 1.2.2+ - */ -(function(a){function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=!0,g=0,h=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),h=e,c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS&&(h=0,g=-1*e),c.wheelDeltaY!==undefined&&(h=c.wheelDeltaY/120),c.wheelDeltaX!==undefined&&(g=-1*c.wheelDeltaX/120),d.unshift(b,e,g,h),(a.event.dispatch||a.event.handle).apply(this,d)}var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,!1);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); diff --git a/resource/js/jquery.qtip.min.js b/resource/js/jquery.qtip.min.js deleted file mode 100644 index e2a958e32..000000000 --- a/resource/js/jquery.qtip.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/* qTip2 v2.2.1 | Plugins: tips | Styles: core css3 | qtip2.com | Licensed MIT | Mon Sep 08 2014 17:43:49 */ - -!function(a,b,c){!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.qtip&&a(jQuery)}(function(d){"use strict";function e(a,b,c,e){this.id=c,this.target=a,this.tooltip=D,this.elements={target:a},this._id=P+"-"+c,this.timers={img:{}},this.options=b,this.plugins={},this.cache={event:{},target:d(),disabled:C,attr:e,onTooltip:C,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=C}function f(a){return a===D||"object"!==d.type(a)}function g(a){return!(d.isFunction(a)||a&&a.attr||a.length||"object"===d.type(a)&&(a.jquery||a.then))}function h(a){var b,c,e,h;return f(a)?C:(f(a.metadata)&&(a.metadata={type:a.metadata}),"content"in a&&(b=a.content,f(b)||b.jquery||b.done?b=a.content={text:c=g(b)?C:b}:c=b.text,"ajax"in b&&(e=b.ajax,h=e&&e.once!==C,delete b.ajax,b.text=function(a,b){var f=c||d(this).attr(b.options.content.attr)||"Loading...",g=d.ajax(d.extend({},e,{context:b})).then(e.success,D,e.error).then(function(a){return a&&h&&b.set("content.text",a),a},function(a,c,d){b.destroyed||0===a.status||b.set("content.text",c+": "+d)});return h?f:(b.set("content.text",f),g)}),"title"in b&&(d.isPlainObject(b.title)&&(b.button=b.title.button,b.title=b.title.text),g(b.title||C)&&(b.title=C))),"position"in a&&f(a.position)&&(a.position={my:a.position,at:a.position}),"show"in a&&f(a.show)&&(a.show=a.show.jquery?{target:a.show}:a.show===B?{ready:B}:{event:a.show}),"hide"in a&&f(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide}),"style"in a&&f(a.style)&&(a.style={classes:a.style}),d.each(O,function(){this.sanitize&&this.sanitize(a)}),a)}function i(a,b){for(var c,d=0,e=a,f=b.split(".");e=e[f[d++]];)d0?setTimeout(d.proxy(a,this),b):void a.call(this)}function m(a){this.tooltip.hasClass(Z)||(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=l.call(this,function(){this.toggle(B,a)},this.options.show.delay))}function n(a){if(!this.tooltip.hasClass(Z)&&!this.destroyed){var b=d(a.relatedTarget),c=b.closest(T)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else this.timers.hide=l.call(this,function(){this.toggle(C,a)},this.options.hide.delay,this)}}function o(a){!this.tooltip.hasClass(Z)&&this.options.hide.inactive&&(clearTimeout(this.timers.inactive),this.timers.inactive=l.call(this,function(){this.hide(a)},this.options.hide.inactive))}function p(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function q(a,c,e){d(b.body).delegate(a,(c.split?c:c.join("."+P+" "))+"."+P,function(){var a=w.api[d.attr(this,R)];a&&!a.disabled&&e.apply(a,arguments)})}function r(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):D,p="html5"===f.metadata.type&&o?o[f.metadata.name]:D,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(B,{},w.defaults,f,"object"==typeof q?h(q):D,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===C||!j)return C;k.content.text=j}if(i.container.length||(i.container=m),i.target===C&&(i.target=n),k.show.target===C&&(k.show.target=n),k.show.solo===B&&(k.show.solo=i.container.closest("body")),k.hide.target===C&&(k.hide.target=n),k.position.viewport===B&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new y(i.at,B),i.my=new y(i.my),a.data(P))if(k.overwrite)a.qtip("destroy",!0);else if(k.overwrite===C)return C;return a.attr(Q,c),k.suppress&&(l=a.attr("title"))&&a.removeAttr("title").attr(_,l).attr("title",""),g=new e(a,k,c,!!j),a.data(P,g),g}function s(a){return a.charAt(0).toUpperCase()+a.slice(1)}function t(a,b){var d,e,f=b.charAt(0).toUpperCase()+b.slice(1),g=(b+" "+ob.join(f+" ")+f).split(" "),h=0;if(nb[b])return a.css(nb[b]);for(;d=g[h++];)if((e=a.css(d))!==c)return nb[b]=d,e}function u(a,b){return Math.ceil(parseFloat(t(a,b)))}function v(a,b){this._ns="tip",this.options=b,this.offset=b.offset,this.size=[b.width,b.height],this.init(this.qtip=a)}var w,x,y,z,A,B=!0,C=!1,D=null,E="x",F="y",G="width",H="height",I="top",J="left",K="bottom",L="right",M="center",N="shift",O={},P="qtip",Q="data-hasqtip",R="data-qtip-id",S=["ui-widget","ui-tooltip"],T="."+P,U="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),V=P+"-fixed",W=P+"-default",X=P+"-focus",Y=P+"-hover",Z=P+"-disabled",$="_replacedByqTip",_="oldtitle",ab={ie:function(){for(var a=4,c=b.createElement("div");(c.innerHTML="")&&c.getElementsByTagName("i")[0];a+=1);return a>4?a:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||C};x=e.prototype,x._when=function(a){return d.when.apply(d,a)},x.render=function(a){if(this.rendered||this.destroyed)return this;var b,c=this,e=this.options,f=this.cache,g=this.elements,h=e.content.text,i=e.content.title,j=e.content.button,k=e.position,l=("."+this._id+" ",[]);return d.attr(this.target[0],"aria-describedby",this._id),f.posClass=this._createPosClass((this.position={my:k.my,at:k.at}).my),this.tooltip=g.tooltip=b=d("
",{id:this._id,"class":[P,W,e.style.classes,f.posClass].join(" "),width:e.style.width||"",height:e.style.height||"",tracking:"mouse"===k.target&&k.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":C,"aria-describedby":this._id+"-content","aria-hidden":B}).toggleClass(Z,this.disabled).attr(R,this.id).data(P,this).appendTo(k.container).append(g.content=d("
",{"class":P+"-content",id:this._id+"-content","aria-atomic":B})),this.rendered=-1,this.positioning=B,i&&(this._createTitle(),d.isFunction(i)||l.push(this._updateTitle(i,C))),j&&this._createButton(),d.isFunction(h)||l.push(this._updateContent(h,C)),this.rendered=B,this._setWidget(),d.each(O,function(a){var b;"render"===this.initialize&&(b=this(c))&&(c.plugins[a]=b)}),this._unassignEvents(),this._assignEvents(),this._when(l).then(function(){c._trigger("render"),c.positioning=C,c.hiddenDuringWait||!e.show.ready&&!a||c.toggle(B,f.event,C),c.hiddenDuringWait=C}),w.api[this.id]=this,this},x.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=B;var a,b=this.target,c=b.attr(_);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),d.each(this.plugins,function(){this.destroy&&this.destroy()});for(a in this.timers)clearTimeout(this.timers[a]);b.removeData(P).removeAttr(R).removeAttr(Q).removeAttr("aria-describedby"),this.options.suppress&&c&&b.attr("title",c).removeAttr(_),this._unassignEvents(),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=D,delete w.api[this.id]}}return this.destroyed?this.target:(a===B&&"hide"!==this.triggering||!this.rendered?b.call(this):(this.tooltip.one("tooltiphidden",d.proxy(b,this)),!this.triggering&&this.hide()),this.target)},z=x.checks={builtin:{"^id$":function(a,b,c,e){var f=c===B?w.nextid:c,g=P+"-"+f;f!==C&&f.length>0&&!d("#"+g).length?(this._id=g,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=e},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a,b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){return c?(c&&!this.elements.title&&this._createTitle(),void this._updateTitle(c)):this._removeTitle()},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"==typeof c&&(this.position[b]=a[b]=new y(c,"at"===b))},"^position.container$":function(a,b,c){this.rendered&&this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(B)||this.toggle(B))},"^style.classes$":function(a,b,c,d){this.rendered&&this.tooltip.removeClass(d).addClass(c)},"^style.(width|height)":function(a,b,c){this.rendered&&this.tooltip.css(b,c)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(a,b,c){this.rendered&&this.tooltip.toggleClass(W,!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a,b,c){this.rendered&&this.tooltip[(d.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var a=this.options.position;this.tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},x.get=function(a){if(this.destroyed)return this;var b=i(this.options,a.toLowerCase()),c=b[0][b[1]];return c.precedance?c.string():c};var bb=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,cb=/^prerender|show\.ready/i;x.set=function(a,b){if(this.destroyed)return this;{var c,e=this.rendered,f=C,g=this.options;this.checks}return"string"==typeof a?(c=a,a={},a[c]=b):a=d.extend({},a),d.each(a,function(b,c){if(e&&cb.test(b))return void delete a[b];var h,j=i(g,b.toLowerCase());h=j[0][j[1]],j[0][j[1]]=c&&c.nodeType?d(c):c,f=bb.test(b)||f,a[b]=[j[0],j[1],c,h]}),h(g),this.positioning=B,d.each(a,d.proxy(j,this)),this.positioning=C,this.rendered&&this.tooltip[0].offsetWidth>0&&f&&this.reposition("mouse"===g.position.target?D:this.cache.event),this},x._update=function(a,b){var c=this,e=this.cache;return this.rendered&&a?(d.isFunction(a)&&(a=a.call(this.elements.target,e.event,this)||""),d.isFunction(a.then)?(e.waiting=B,a.then(function(a){return e.waiting=C,c._update(a,b)},D,function(a){return c._update(a,b)})):a===C||!a&&""!==a?C:(a.jquery&&a.length>0?b.empty().append(a.css({display:"block",visibility:"visible"})):b.html(a),this._waitForContent(b).then(function(a){c.rendered&&c.tooltip[0].offsetWidth>0&&c.reposition(e.event,!a.length)}))):C},x._waitForContent=function(a){var b=this.cache;return b.waiting=B,(d.fn.imagesLoaded?a.imagesLoaded():d.Deferred().resolve([])).done(function(){b.waiting=C}).promise()},x._updateContent=function(a,b){this._update(a,this.elements.content,b)},x._updateTitle=function(a,b){this._update(a,this.elements.title,b)===C&&this._removeTitle(C)},x._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(),a.titlebar=d("
",{"class":P+"-titlebar "+(this.options.style.widget?k("header"):"")}).append(a.title=d("
",{id:b,"class":P+"-title","aria-atomic":B})).insertBefore(a.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(a){d(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(a){d(this).toggleClass("ui-state-hover","mouseover"===a.type)}),this.options.content.button&&this._createButton()},x._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=D,a!==C&&this.reposition())},x._createPosClass=function(a){return P+"-pos-"+(a||this.options.position.my).abbrev()},x.reposition=function(c,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=B;var f,g,h,i,j=this.cache,k=this.tooltip,l=this.options.position,m=l.target,n=l.my,o=l.at,p=l.viewport,q=l.container,r=l.adjust,s=r.method.split(" "),t=k.outerWidth(C),u=k.outerHeight(C),v=0,w=0,x=k.css("position"),y={left:0,top:0},z=k[0].offsetWidth>0,A=c&&"scroll"===c.type,D=d(a),E=q[0].ownerDocument,F=this.mouse;if(d.isArray(m)&&2===m.length)o={x:J,y:I},y={left:m[0],top:m[1]};else if("mouse"===m)o={x:J,y:I},(!r.mouse||this.options.hide.distance)&&j.origin&&j.origin.pageX?c=j.origin:!c||c&&("resize"===c.type||"scroll"===c.type)?c=j.event:F&&F.pageX&&(c=F),"static"!==x&&(y=q.offset()),E.body.offsetWidth!==(a.innerWidth||E.documentElement.clientWidth)&&(g=d(b.body).offset()),y={left:c.pageX-y.left+(g&&g.left||0),top:c.pageY-y.top+(g&&g.top||0)},r.mouse&&A&&F&&(y.left-=(F.scrollX||0)-D.scrollLeft(),y.top-=(F.scrollY||0)-D.scrollTop());else{if("event"===m?c&&c.target&&"scroll"!==c.type&&"resize"!==c.type?j.target=d(c.target):c.target||(j.target=this.elements.target):"event"!==m&&(j.target=d(m.jquery?m:this.elements.target)),m=j.target,m=d(m).eq(0),0===m.length)return this;m[0]===b||m[0]===a?(v=ab.iOS?a.innerWidth:m.width(),w=ab.iOS?a.innerHeight:m.height(),m[0]===a&&(y={top:(p||m).scrollTop(),left:(p||m).scrollLeft()})):O.imagemap&&m.is("area")?f=O.imagemap(this,m,o,O.viewport?s:C):O.svg&&m&&m[0].ownerSVGElement?f=O.svg(this,m,o,O.viewport?s:C):(v=m.outerWidth(C),w=m.outerHeight(C),y=m.offset()),f&&(v=f.width,w=f.height,g=f.offset,y=f.position),y=this.reposition.offset(m,y,q),(ab.iOS>3.1&&ab.iOS<4.1||ab.iOS>=4.3&&ab.iOS<4.33||!ab.iOS&&"fixed"===x)&&(y.left-=D.scrollLeft(),y.top-=D.scrollTop()),(!f||f&&f.adjustable!==C)&&(y.left+=o.x===L?v:o.x===M?v/2:0,y.top+=o.y===K?w:o.y===M?w/2:0)}return y.left+=r.x+(n.x===L?-t:n.x===M?-t/2:0),y.top+=r.y+(n.y===K?-u:n.y===M?-u/2:0),O.viewport?(h=y.adjusted=O.viewport(this,y,l,v,w,t,u),g&&h.left&&(y.left+=g.left),g&&h.top&&(y.top+=g.top),h.my&&(this.position.my=h.my)):y.adjusted={left:0,top:0},j.posClass!==(i=this._createPosClass(this.position.my))&&k.removeClass(j.posClass).addClass(j.posClass=i),this._trigger("move",[y,p.elem||p],c)?(delete y.adjusted,e===C||!z||isNaN(y.left)||isNaN(y.top)||"mouse"===m||!d.isFunction(l.effect)?k.css(y):d.isFunction(l.effect)&&(l.effect.call(k,this,d.extend({},y)),k.queue(function(a){d(this).css({opacity:"",height:""}),ab.ie&&this.style.removeAttribute("filter"),a()})),this.positioning=C,this):this},x.reposition.offset=function(a,c,e){function f(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}if(!e[0])return c;var g,h,i,j,k=d(a[0].ownerDocument),l=!!ab.ie&&"CSS1Compat"!==b.compatMode,m=e[0];do"static"!==(h=d.css(m,"position"))&&("fixed"===h?(i=m.getBoundingClientRect(),f(k,-1)):(i=d(m).position(),i.left+=parseFloat(d.css(m,"borderLeftWidth"))||0,i.top+=parseFloat(d.css(m,"borderTopWidth"))||0),c.left-=i.left+(parseFloat(d.css(m,"marginLeft"))||0),c.top-=i.top+(parseFloat(d.css(m,"marginTop"))||0),g||"hidden"===(j=d.css(m,"overflow"))||"visible"===j||(g=d(m)));while(m=m.offsetParent);return g&&(g[0]!==k[0]||l)&&f(g,1),c};var db=(y=x.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,M).toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!b;var c=a.charAt(0);this.precedance="t"===c||"b"===c?F:E}).prototype;db.invert=function(a,b){this[a]=this[a]===J?L:this[a]===L?J:b||this[a]},db.string=function(a){var b=this.x,c=this.y,d=b!==c?"center"===b||"center"!==c&&(this.precedance===F||this.forceY)?[c,b]:[b,c]:[b];return a!==!1?d.join(" "):d},db.abbrev=function(){var a=this.string(!1);return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")},db.clone=function(){return new y(this.string(),this.forceY)},x.toggle=function(a,c){var e=this.cache,f=this.options,g=this.tooltip;if(c){if(/over|enter/.test(c.type)&&e.event&&/out|leave/.test(e.event.type)&&f.show.target.add(c.target).length===f.show.target.length&&g.has(c.relatedTarget).length)return this;e.event=d.event.fix(c)}if(this.waiting&&!a&&(this.hiddenDuringWait=B),!this.rendered)return a?this.render(1):this;if(this.destroyed||this.disabled)return this;var h,i,j,k=a?"show":"hide",l=this.options[k],m=(this.options[a?"hide":"show"],this.options.position),n=this.options.content,o=this.tooltip.css("width"),p=this.tooltip.is(":visible"),q=a||1===l.target.length,r=!c||l.target.length<2||e.target[0]===c.target;return(typeof a).search("boolean|number")&&(a=!p),h=!g.is(":animated")&&p===a&&r,i=h?D:!!this._trigger(k,[90]),this.destroyed?this:(i!==C&&a&&this.focus(c),!i||h?this:(d.attr(g[0],"aria-hidden",!a),a?(this.mouse&&(e.origin=d.event.fix(this.mouse)),d.isFunction(n.text)&&this._updateContent(n.text,C),d.isFunction(n.title)&&this._updateTitle(n.title,C),!A&&"mouse"===m.target&&m.adjust.mouse&&(d(b).bind("mousemove."+P,this._storeMouse),A=B),o||g.css("width",g.outerWidth(C)),this.reposition(c,arguments[2]),o||g.css("width",""),l.solo&&("string"==typeof l.solo?d(l.solo):d(T,l.solo)).not(g).not(l.target).qtip("hide",d.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete e.origin,A&&!d(T+'[tracking="true"]:visible',l.solo).not(g).length&&(d(b).unbind("mousemove."+P),A=C),this.blur(c)),j=d.proxy(function(){a?(ab.ie&&g[0].style.removeAttribute("filter"),g.css("overflow",""),"string"==typeof l.autofocus&&d(this.options.show.autofocus,g).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):g.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(a?"visible":"hidden")},this),l.effect===C||q===C?(g[k](),j()):d.isFunction(l.effect)?(g.stop(1,1),l.effect.call(g,this),g.queue("fx",function(a){j(),a()})):g.fadeTo(90,a?1:0,j),a&&l.target.trigger("qtip-"+this.id+"-inactive"),this))},x.show=function(a){return this.toggle(B,a)},x.hide=function(a){return this.toggle(C,a)},x.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=d(T),c=this.tooltip,e=parseInt(c[0].style.zIndex,10),f=w.zindex+b.length;return c.hasClass(X)||this._trigger("focus",[f],a)&&(e!==f&&(b.each(function(){this.style.zIndex>e&&(this.style.zIndex=this.style.zIndex-1)}),b.filter("."+X).qtip("blur",a)),c.addClass(X)[0].style.zIndex=f),this},x.blur=function(a){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(X),this._trigger("blur",[this.tooltip.css("zIndex")],a),this)},x.disable=function(a){return this.destroyed?this:("toggle"===a?a=!(this.rendered?this.tooltip.hasClass(Z):this.disabled):"boolean"!=typeof a&&(a=B),this.rendered&&this.tooltip.toggleClass(Z,a).attr("aria-disabled",a),this.disabled=!!a,this)},x.enable=function(){return this.disable(C)},x._createButton=function(){var a=this,b=this.elements,c=b.tooltip,e=this.options.content.button,f="string"==typeof e,g=f?e:"Close tooltip";b.button&&b.button.remove(),b.button=e.jquery?e:d("",{"class":"qtip-close "+(this.options.style.widget?"":P+"-icon"),title:g,"aria-label":g}).prepend(d("",{"class":"ui-icon ui-icon-close",html:"×"})),b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){return c.hasClass(Z)||a.hide(b),C})},x._updateButton=function(a){if(!this.rendered)return C;var b=this.elements.button;a?this._createButton():b.remove()},x._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass(Z);c.removeClass(Z),Z=a?"ui-state-disabled":"qtip-disabled",c.toggleClass(Z,d),c.toggleClass("ui-helper-reset "+k(),a).toggleClass(W,this.options.style.def&&!a),b.content&&b.content.toggleClass(k("content"),a),b.titlebar&&b.titlebar.toggleClass(k("header"),a),b.button&&b.button.toggleClass(P+"-icon",!a)},x._storeMouse=function(a){return(this.mouse=d.event.fix(a)).type="mousemove",this},x._bind=function(a,b,c,e,f){if(a&&c&&b.length){var g="."+this._id+(e?"-"+e:"");return d(a).bind((b.split?b:b.join(g+" "))+g,d.proxy(c,f||this)),this}},x._unbind=function(a,b){return a&&d(a).unbind("."+this._id+(b?"-"+b:"")),this},x._trigger=function(a,b,c){var e=d.Event("tooltip"+a);return e.originalEvent=c&&d.extend({},c)||this.cache.event||D,this.triggering=a,this.tooltip.trigger(e,[this].concat(b||[])),this.triggering=C,!e.isDefaultPrevented()},x._bindEvents=function(a,b,c,e,f,g){var h=c.filter(e).add(e.filter(c)),i=[];h.length&&(d.each(b,function(b,c){var e=d.inArray(c,a);e>-1&&i.push(a.splice(e,1)[0])}),i.length&&(this._bind(h,i,function(a){var b=this.rendered?this.tooltip[0].offsetWidth>0:!1;(b?g:f).call(this,a)}),c=c.not(h),e=e.not(h))),this._bind(c,a,f),this._bind(e,b,g)},x._assignInitialEvents=function(a){function b(a){return this.disabled||this.destroyed?C:(this.cache.event=a&&d.event.fix(a),this.cache.target=a&&d(a.target),clearTimeout(this.timers.show),void(this.timers.show=l.call(this,function(){this.render("object"==typeof a||c.show.ready)},c.prerender?0:c.show.delay)))}var c=this.options,e=c.show.target,f=c.hide.target,g=c.show.event?d.trim(""+c.show.event).split(" "):[],h=c.hide.event?d.trim(""+c.hide.event).split(" "):[];this._bind(this.elements.target,["remove","removeqtip"],function(){this.destroy(!0)},"destroy"),/mouse(over|enter)/i.test(c.show.event)&&!/mouse(out|leave)/i.test(c.hide.event)&&h.push("mouseleave"),this._bind(e,"mousemove",function(a){this._storeMouse(a),this.cache.onTarget=B}),this._bindEvents(g,h,e,f,b,function(){return this.timers?void clearTimeout(this.timers.show):C}),(c.show.ready||c.prerender)&&b.call(this,a)},x._assignEvents=function(){var c=this,e=this.options,f=e.position,g=this.tooltip,h=e.show.target,i=e.hide.target,j=f.container,k=f.viewport,l=d(b),q=(d(b.body),d(a)),r=e.show.event?d.trim(""+e.show.event).split(" "):[],s=e.hide.event?d.trim(""+e.hide.event).split(" "):[];d.each(e.events,function(a,b){c._bind(g,"toggle"===a?["tooltipshow","tooltiphide"]:["tooltip"+a],b,null,g)}),/mouse(out|leave)/i.test(e.hide.event)&&"window"===e.hide.leave&&this._bind(l,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)}),e.hide.fixed?i=i.add(g.addClass(V)):/mouse(over|enter)/i.test(e.show.event)&&this._bind(i,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+e.hide.event).indexOf("unfocus")>-1&&this._bind(j.closest("html"),["mousedown","touchstart"],function(a){var b=d(a.target),c=this.rendered&&!this.tooltip.hasClass(Z)&&this.tooltip[0].offsetWidth>0,e=b.parents(T).filter(this.tooltip[0]).length>0;b[0]===this.target[0]||b[0]===this.tooltip[0]||e||this.target.has(b[0]).length||!c||this.hide(a)}),"number"==typeof e.hide.inactive&&(this._bind(h,"qtip-"+this.id+"-inactive",o,"inactive"),this._bind(i.add(g),w.inactiveEvents,o)),this._bindEvents(r,s,h,i,m,n),this._bind(h.add(g),"mousemove",function(a){if("number"==typeof e.hide.distance){var b=this.cache.origin||{},c=this.options.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&this.hide(a)}this._storeMouse(a)}),"mouse"===f.target&&f.adjust.mouse&&(e.hide.event&&this._bind(h,["mouseenter","mouseleave"],function(a){return this.cache?void(this.cache.onTarget="mouseenter"===a.type):C}),this._bind(l,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(Z)&&this.tooltip[0].offsetWidth>0&&this.reposition(a)})),(f.adjust.resize||k.length)&&this._bind(d.event.special.resize?k:q,"resize",p),f.adjust.scroll&&this._bind(q.add(f.container),"scroll",p)},x._unassignEvents=function(){var c=this.options,e=c.show.target,f=c.hide.target,g=d.grep([this.elements.target[0],this.rendered&&this.tooltip[0],c.position.container[0],c.position.viewport[0],c.position.container.closest("html")[0],a,b],function(a){return"object"==typeof a});e&&e.toArray&&(g=g.concat(e.toArray())),f&&f.toArray&&(g=g.concat(f.toArray())),this._unbind(g)._unbind(g,"destroy")._unbind(g,"inactive")},d(function(){q(T,["mouseenter","mouseleave"],function(a){var b="mouseenter"===a.type,c=d(a.currentTarget),e=d(a.relatedTarget||a.target),f=this.options;b?(this.focus(a),c.hasClass(V)&&!c.hasClass(Z)&&clearTimeout(this.timers.hide)):"mouse"===f.position.target&&f.position.adjust.mouse&&f.hide.event&&f.show.target&&!e.closest(f.show.target[0]).length&&this.hide(a),c.toggleClass(Y,b)}),q("["+R+"]",U,o)}),w=d.fn.qtip=function(a,b,e){var f=(""+a).toLowerCase(),g=D,i=d.makeArray(arguments).slice(1),j=i[i.length-1],k=this[0]?d.data(this[0],P):D;return!arguments.length&&k||"api"===f?k:"string"==typeof a?(this.each(function(){var a=d.data(this,P);if(!a)return B;if(j&&j.timeStamp&&(a.cache.event=j),!b||"option"!==f&&"options"!==f)a[f]&&a[f].apply(a,i);else{if(e===c&&!d.isPlainObject(b))return g=a.get(b),C;a.set(b,e)}}),g!==D?g:this):"object"!=typeof a&&arguments.length?void 0:(k=h(d.extend(B,{},a)),this.each(function(a){var b,c;return c=d.isArray(k.id)?k.id[a]:k.id,c=!c||c===C||c.length<1||w.api[c]?w.nextid++:c,b=r(d(this),c,k),b===C?B:(w.api[c]=b,d.each(O,function(){"initialize"===this.initialize&&this(b)}),void b._assignInitialEvents(j))}))},d.qtip=e,w.api={},d.each({attr:function(a,b){if(this.length){var c=this[0],e="title",f=d.data(c,"qtip");if(a===e&&f&&"object"==typeof f&&f.options.suppress)return arguments.length<2?d.attr(c,_):(f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",b),this.attr(_,b))}return d.fn["attr"+$].apply(this,arguments)},clone:function(a){var b=(d([]),d.fn["clone"+$].apply(this,arguments));return a||b.filter("["+_+"]").attr("title",function(){return d.attr(this,_)}).removeAttr(_),b}},function(a,b){if(!b||d.fn[a+$])return B;var c=d.fn[a+$]=d.fn[a];d.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}}),d.ui||(d["cleanData"+$]=d.cleanData,d.cleanData=function(a){for(var b,c=0;(b=d(a[c])).length;c++)if(b.attr(Q))try{b.triggerHandler("removeqtip")}catch(e){}d["cleanData"+$].apply(this,arguments)}),w.version="2.2.1",w.nextid=0,w.inactiveEvents=U,w.zindex=15e3,w.defaults={prerender:C,id:C,overwrite:B,suppress:B,content:{text:B,attr:"title",title:C,button:C},position:{my:"top left",at:"bottom right",target:C,container:C,viewport:C,adjust:{x:0,y:0,mouse:B,scroll:B,resize:B,method:"flipinvert flipinvert"},effect:function(a,b){d(this).animate(b,{duration:200,queue:C})}},show:{target:C,event:"mouseenter",effect:B,delay:90,solo:C,ready:C,autofocus:C},hide:{target:C,event:"mouseleave",effect:B,delay:0,fixed:C,inactive:C,leave:"window",distance:C},style:{classes:"",widget:C,width:C,height:C,def:B},events:{render:D,move:D,show:D,hide:D,toggle:D,visible:D,hidden:D,focus:D,blur:D}};var eb,fb="margin",gb="border",hb="color",ib="background-color",jb="transparent",kb=" !important",lb=!!b.createElement("canvas").getContext,mb=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,nb={},ob=["Webkit","O","Moz","ms"];if(lb)var pb=a.devicePixelRatio||1,qb=function(){var a=b.createElement("canvas").getContext("2d");return a.backingStorePixelRatio||a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||1}(),rb=pb/qb;else var sb=function(a,b,c){return"'};d.extend(v.prototype,{init:function(a){var b,c;c=this.element=a.elements.tip=d("
",{"class":P+"-tip"}).prependTo(a.tooltip),lb?(b=d("").appendTo(this.element)[0].getContext("2d"),b.lineJoin="miter",b.miterLimit=1e5,b.save()):(b=sb("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(b+b),a._bind(d("*",c).add(c),["click","mousedown"],function(a){a.stopPropagation()},this._ns)),a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&(a.y===I||a.y===M&&this.element.position().top+this.size[1]/2+this.options.offsetl&&!mb.test(e[1])&&(e[0]=e[1]),this.border=l=p.border!==B?p.border:l):this.border=l=0,k=this.size=this._calculateSize(b),n.css({width:k[0],height:k[1],lineHeight:k[1]+"px"}),j=b.precedance===F?[s(r.x===J?l:r.x===L?k[0]-q[0]-l:(k[0]-q[0])/2),s(r.y===I?k[1]-q[1]:0)]:[s(r.x===J?k[0]-q[0]:0),s(r.y===I?l:r.y===K?k[1]-q[1]-l:(k[1]-q[1])/2)],lb?(g=o[0].getContext("2d"),g.restore(),g.save(),g.clearRect(0,0,6e3,6e3),h=this._calculateTip(r,q,rb),i=this._calculateTip(r,this.size,rb),o.attr(G,k[0]*rb).attr(H,k[1]*rb),o.css(G,k[0]).css(H,k[1]),this._drawCoords(g,i),g.fillStyle=e[1],g.fill(),g.translate(j[0]*rb,j[1]*rb),this._drawCoords(g,h),g.fillStyle=e[0],g.fill()):(h=this._calculateTip(r),h="m"+h[0]+","+h[1]+" l"+h[2]+","+h[3]+" "+h[4]+","+h[5]+" xe",j[2]=l&&/^(r|b)/i.test(b.string())?8===ab.ie?2:1:0,o.css({coordsize:k[0]+l+" "+(k[1]+l),antialias:""+(r.string().indexOf(M)>-1),left:j[0]-j[2]*Number(f===E),top:j[1]-j[2]*Number(f===F),width:k[0]+l,height:k[1]+l}).each(function(a){var b=d(this);b[b.prop?"prop":"attr"]({coordsize:k[0]+l+" "+(k[1]+l),path:h,fillcolor:e[0],filled:!!a,stroked:!a}).toggle(!(!l&&!a)),!a&&b.html(sb("stroke",'weight="'+2*l+'px" color="'+e[1]+'" miterlimit="1000" joinstyle="miter"'))})),a.opera&&setTimeout(function(){m.tip.css({display:"inline-block",visibility:"visible"})},1),c!==C&&this.calculate(b,k)},calculate:function(a,b){if(!this.enabled)return C;var c,e,f=this,g=this.qtip.elements,h=this.element,i=this.options.offset,j=(g.tooltip.hasClass("ui-widget"),{});return a=a||this.corner,c=a.precedance,b=b||this._calculateSize(a),e=[a.x,a.y],c===E&&e.reverse(),d.each(e,function(d,e){var h,k,l;e===M?(h=c===F?J:I,j[h]="50%",j[fb+"-"+h]=-Math.round(b[c===F?0:1]/2)+i):(h=f._parseWidth(a,e,g.tooltip),k=f._parseWidth(a,e,g.content),l=f._parseRadius(a),j[e]=Math.max(-f.border,d?k:i+(l>h?l:-h))) -}),j[a[c]]-=b[c===E?0:1],h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(j),j},reposition:function(a,b,d){function e(a,b,c,d,e){a===N&&j.precedance===b&&k[d]&&j[c]!==M?j.precedance=j.precedance===E?F:E:a!==N&&k[d]&&(j[b]=j[b]===M?k[d]>0?d:e:j[b]===d?e:d)}function f(a,b,e){j[a]===M?p[fb+"-"+b]=o[a]=g[fb+"-"+b]-k[b]:(h=g[e]!==c?[k[b],-g[b]]:[-k[b],g[b]],(o[a]=Math.max(h[0],h[1]))>h[0]&&(d[b]-=k[b],o[b]=C),p[g[e]!==c?e:b]=o[a])}if(this.enabled){var g,h,i=b.cache,j=this.corner.clone(),k=d.adjusted,l=b.options.position.adjust.method.split(" "),m=l[0],n=l[1]||l[0],o={left:C,top:C,x:0,y:0},p={};this.corner.fixed!==B&&(e(m,E,F,J,L),e(n,F,E,I,K),(j.string()!==i.corner.string()||i.cornerTop!==k.top||i.cornerLeft!==k.left)&&this.update(j,C)),g=this.calculate(j),g.right!==c&&(g.left=-g.right),g.bottom!==c&&(g.top=-g.bottom),g.user=this.offset,(o.left=m===N&&!!k.left)&&f(E,J,L),(o.top=n===N&&!!k.top)&&f(F,I,K),this.element.css(p).toggle(!(o.x&&o.y||j.x===M&&o.y||j.y===M&&o.x)),d.left-=g.left.charAt?g.user:m!==N||o.top||!o.left&&!o.top?g.left+this.border:0,d.top-=g.top.charAt?g.user:n!==N||o.left||!o.left&&!o.top?g.top+this.border:0,i.cornerLeft=k.left,i.cornerTop=k.top,i.corner=j.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),eb=O.tip=function(a){return new v(a,a.options.style.tip)},eb.initialize="render",eb.sanitize=function(a){if(a.style&&"tip"in a.style){var b=a.style.tip;"object"!=typeof b&&(b=a.style.tip={corner:b}),/string|boolean/i.test(typeof b.corner)||(b.corner=B)}},z.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(B,w.defaults,{style:{tip:{corner:B,mimic:C,width:6,height:6,border:B,offset:0}}})})}(window,document); diff --git a/resource/js/waypoints.min.js b/resource/js/waypoints.min.js deleted file mode 100644 index b9098f82a..000000000 --- a/resource/js/waypoints.min.js +++ /dev/null @@ -1,8 +0,0 @@ -// Generated by CoffeeScript 1.6.2 -/*! -jQuery Waypoints - v2.0.5 -Copyright (c) 2011-2014 Caleb Troughton -Licensed under the MIT license. -https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt -*/ -(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;c={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};this.element[u]=this.id;c[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||a)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(a&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete c[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=this.element[w])!=null?o:[];i.push(this.id);this.element[w]=i}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=t[w];if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;e=n.extend({},n.fn[g].defaults,e);if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=c[i[0][u]];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke.call(this,"disable")},enable:function(){return d._invoke.call(this,"enable")},destroy:function(){return d._invoke.call(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=c[n(t)[0][u]];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.on("load.waypoints",function(){return n[m]("refresh")})})}).call(this); \ No newline at end of file diff --git a/view/scripts.twig b/view/scripts.twig index 78d75af08..f2cc7184d 100644 --- a/view/scripts.twig +++ b/view/scripts.twig @@ -34,14 +34,14 @@ var showNotation = {% if request.vocab and request.vocab.config.showNotation == - + + + + - - - {% for files in request.plugins.pluginsJS %}{% for file in files %}{% endfor %}{% endfor %} From 8ab9cddd20da567d736b3757165740c367b6d284 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 12 Jan 2018 15:52:45 +0200 Subject: [PATCH 028/173] loading the remaining dependencies that were not managed by composer as a composer package, related to #684 --- composer.json | 26 ++++++++++++++++++++++ resource/js/jquery.mCustomScrollbar.min.js | 2 -- resource/js/lscache.min.js | 1 - view/scripts.twig | 4 ++-- 4 files changed, 28 insertions(+), 5 deletions(-) delete mode 100644 resource/js/jquery.mCustomScrollbar.min.js delete mode 100644 resource/js/lscache.min.js diff --git a/composer.json b/composer.json index 3e653502b..39560144b 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,30 @@ } } }, + "lscache": { + "type": "package", + "package": { + "name": "pamelafox/lscache", + "version": "1.0.5", + "source": { + "url": "https://github.com/pamelafox/lscache.git", + "type": "git", + "reference": "1.0.5" + } + } + }, + "malihu-custom-scrollbar": { + "type": "package", + "package": { + "name": "malihu/malihu-custom-scrollbar-plugin", + "version": "3.1.5", + "source": { + "url": "https://github.com/malihu/malihu-custom-scrollbar-plugin.git", + "type": "git", + "reference": "3.1.5" + } + } + }, "bootstrap-multiselect": { "type": "package", "package": { @@ -48,6 +72,8 @@ "ext-gettext": "*", "monolog/monolog": "1.23.*", "newerton/jquery-mousewheel": "dev-master", + "pamelafox/lscache": "1.0.5", + "malihu/malihu-custom-scrollbar-plugin": "3.1.5", "grimmlink/qtip2": "3.0.3" }, "require-dev": { diff --git a/resource/js/jquery.mCustomScrollbar.min.js b/resource/js/jquery.mCustomScrollbar.min.js deleted file mode 100644 index 7c47907ff..000000000 --- a/resource/js/jquery.mCustomScrollbar.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* == malihu jquery custom scrollbar plugin == Version: 3.0.2, License: MIT License (MIT) */ -(function(h,l,m,d){var e="mCustomScrollbar",a="mCS",k=".mCustomScrollbar",f={setWidth:false,setHeight:false,setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:true,autoHideScrollbar:false,autoExpandScrollbar:false,alwaysShowScrollbar:0,snapAmount:null,snapOffset:0,mouseWheel:{enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false,disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{enable:false,scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:true,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoExpandHorizontalScroll:false,autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:true,updateOnImageLoad:true,updateOnSelectorChange:false},theme:"light",callbacks:{onScrollStart:false,onScroll:false,onTotalScroll:false,onTotalScrollBack:false,whileScrolling:false,onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:true},live:false,liveSelector:null},j=0,o={},c=function(p){if(o[p]){clearTimeout(o[p]);g._delete.call(null,o[p])}},i=(l.attachEvent&&!l.addEventListener)?1:0,n=false,b={init:function(q){var q=h.extend(true,{},f,q),p=g._selector.call(this);if(q.live){var s=q.liveSelector||this.selector||k,r=h(s);if(q.live==="off"){c(s);return}o[s]=setTimeout(function(){r.mCustomScrollbar(q);if(q.live==="once"&&r.length){c(s)}},500)}else{c(s)}q.setWidth=(q.set_width)?q.set_width:q.setWidth;q.setHeight=(q.set_height)?q.set_height:q.setHeight;q.axis=(q.horizontalScroll)?"x":g._findAxis.call(null,q.axis);q.scrollInertia=q.scrollInertia<17?17:q.scrollInertia;if(typeof q.mouseWheel!=="object"&&q.mouseWheel==true){q.mouseWheel={enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false}}q.mouseWheel.scrollAmount=!q.mouseWheelPixels?q.mouseWheel.scrollAmount:q.mouseWheelPixels;q.mouseWheel.normalizeDelta=!q.advanced.normalizeMouseWheelDelta?q.mouseWheel.normalizeDelta:q.advanced.normalizeMouseWheelDelta;q.scrollButtons.scrollType=g._findScrollButtonsType.call(null,q.scrollButtons.scrollType);g._theme.call(null,q);return h(p).each(function(){var u=h(this);if(!u.data(a)){u.data(a,{idx:++j,opt:q,scrollRatio:{y:null,x:null},overflowed:null,bindEvents:false,tweenRunning:false,sequential:{},langDir:u.css("direction"),cbOffsets:null,trigger:null});var w=u.data(a).opt,v=u.data("mcs-axis"),t=u.data("mcs-scrollbar-position"),x=u.data("mcs-theme");if(v){w.axis=v}if(t){w.scrollbarPosition=t}if(x){w.theme=x;g._theme.call(null,w)}g._pluginMarkup.call(this);b.update.call(null,u)}})},update:function(q){var p=q||g._selector.call(this);return h(p).each(function(){var t=h(this);if(t.data(a)){var v=t.data(a),u=v.opt,r=h("#mCSB_"+v.idx+"_container"),s=[h("#mCSB_"+v.idx+"_dragger_vertical"),h("#mCSB_"+v.idx+"_dragger_horizontal")];if(!r.length){return}if(v.tweenRunning){g._stop.call(null,t)}if(t.hasClass("mCS_disabled")){t.removeClass("mCS_disabled")}if(t.hasClass("mCS_destroyed")){t.removeClass("mCS_destroyed")}g._maxHeight.call(this);g._expandContentHorizontally.call(this);if(u.axis!=="y"&&!u.advanced.autoExpandHorizontalScroll){r.css("width",g._contentWidth(r.children()))}v.overflowed=g._overflowed.call(this);g._scrollbarVisibility.call(this);if(u.autoDraggerLength){g._setDraggerLength.call(this)}g._scrollRatio.call(this);g._bindEvents.call(this);var w=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];if(u.axis!=="x"){if(!v.overflowed[0]){g._resetContentPosition.call(this);if(u.axis==="y"){g._unbindEvents.call(this)}else{if(u.axis==="yx"&&v.overflowed[1]){g._scrollTo.call(this,t,w[1].toString(),{dir:"x",dur:0,overwrite:"none"})}}}else{if(s[0].height()>s[0].parent().height()){g._resetContentPosition.call(this)}else{g._scrollTo.call(this,t,w[0].toString(),{dir:"y",dur:0,overwrite:"none"})}}}if(u.axis!=="y"){if(!v.overflowed[1]){g._resetContentPosition.call(this);if(u.axis==="x"){g._unbindEvents.call(this)}else{if(u.axis==="yx"&&v.overflowed[0]){g._scrollTo.call(this,t,w[0].toString(),{dir:"y",dur:0,overwrite:"none"})}}}else{if(s[1].width()>s[1].parent().width()){g._resetContentPosition.call(this)}else{g._scrollTo.call(this,t,w[1].toString(),{dir:"x",dur:0,overwrite:"none"})}}}g._autoUpdate.call(this)}})},scrollTo:function(r,q){if(typeof r=="undefined"||r==null){return}var p=g._selector.call(this);return h(p).each(function(){var u=h(this);if(u.data(a)){var x=u.data(a),w=x.opt,v={trigger:"external",scrollInertia:w.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:false,callbacks:true,onStart:true,onUpdate:true,onComplete:true},s=h.extend(true,{},v,q),y=g._arr.call(this,r),t=s.scrollInertia<17?17:s.scrollInertia;y[0]=g._to.call(this,y[0],"y");y[1]=g._to.call(this,y[1],"x");if(s.moveDragger){y[0]*=x.scrollRatio.y;y[1]*=x.scrollRatio.x}s.dur=t;setTimeout(function(){if(y[0]!==null&&typeof y[0]!=="undefined"&&w.axis!=="x"&&x.overflowed[0]){s.dir="y";s.overwrite="all";g._scrollTo.call(this,u,y[0].toString(),s)}if(y[1]!==null&&typeof y[1]!=="undefined"&&w.axis!=="y"&&x.overflowed[1]){s.dir="x";s.overwrite="none";g._scrollTo.call(this,u,y[1].toString(),s)}},60)}})},stop:function(){var p=g._selector.call(this);return h(p).each(function(){var q=h(this);if(q.data(a)){g._stop.call(null,q)}})},disable:function(q){var p=g._selector.call(this);return h(p).each(function(){var r=h(this);if(r.data(a)){var t=r.data(a),s=t.opt;g._autoUpdate.call(this,"remove");g._unbindEvents.call(this);if(q){g._resetContentPosition.call(this)}g._scrollbarVisibility.call(this,true);r.addClass("mCS_disabled")}})},destroy:function(){var p=g._selector.call(this);return h(p).each(function(){var s=h(this);if(s.data(a)){var u=s.data(a),t=u.opt,q=h("#mCSB_"+u.idx),r=h("#mCSB_"+u.idx+"_container"),v=h(".mCSB_"+u.idx+"_scrollbar");if(t.live){c(p)}g._autoUpdate.call(this,"remove");g._unbindEvents.call(this);g._resetContentPosition.call(this);s.removeData(a);g._delete.call(null,this.mcs);v.remove();q.replaceWith(r.contents());s.removeClass(e+" _"+a+"_"+u.idx+" mCS-autoHide mCS-dir-rtl mCS_no_scrollbar mCS_disabled").addClass("mCS_destroyed")}})}},g={_selector:function(){return(typeof h(this)!=="object"||h(this).length<1)?k:this},_theme:function(s){var r=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],q=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],p=["minimal","minimal-dark"],u=["minimal","minimal-dark"],t=["minimal","minimal-dark"];s.autoDraggerLength=h.inArray(s.theme,r)>-1?false:s.autoDraggerLength;s.autoExpandScrollbar=h.inArray(s.theme,q)>-1?false:s.autoExpandScrollbar;s.scrollButtons.enable=h.inArray(s.theme,p)>-1?false:s.scrollButtons.enable;s.autoHideScrollbar=h.inArray(s.theme,u)>-1?true:s.autoHideScrollbar;s.scrollbarPosition=h.inArray(s.theme,t)>-1?"outside":s.scrollbarPosition},_findAxis:function(p){return(p==="yx"||p==="xy"||p==="auto")?"yx":(p==="x"||p==="horizontal")?"x":"y"},_findScrollButtonsType:function(p){return(p==="stepped"||p==="pixels"||p==="step"||p==="click")?"stepped":"stepless"},_pluginMarkup:function(){var y=h(this),x=y.data(a),r=x.opt,t=r.autoExpandScrollbar?" mCSB_scrollTools_onDrag_expand":"",B=["
","
"],u=r.axis==="yx"?"mCSB_vertical_horizontal":r.axis==="x"?"mCSB_horizontal":"mCSB_vertical",w=r.axis==="yx"?B[0]+B[1]:r.axis==="x"?B[1]:B[0],v=r.axis==="yx"?"
":"",s=r.autoHideScrollbar?" mCS-autoHide":"",p=(r.axis!=="x"&&x.langDir==="rtl")?" mCS-dir-rtl":"";if(r.setWidth){y.css("width",r.setWidth)}if(r.setHeight){y.css("height",r.setHeight)}r.setLeft=(r.axis!=="y"&&x.langDir==="rtl")?"989999px":r.setLeft;y.addClass(e+" _"+a+"_"+x.idx+s+p).wrapInner("
");var q=h("#mCSB_"+x.idx),z=h("#mCSB_"+x.idx+"_container");if(r.axis!=="y"&&!r.advanced.autoExpandHorizontalScroll){z.css("width",g._contentWidth(z.children()))}if(r.scrollbarPosition==="outside"){if(y.css("position")==="static"){y.css("position","relative")}y.css("overflow","visible");q.addClass("mCSB_outside").after(w)}else{q.addClass("mCSB_inside").append(w);z.wrap(v)}g._scrollButtons.call(this);var A=[h("#mCSB_"+x.idx+"_dragger_vertical"),h("#mCSB_"+x.idx+"_dragger_horizontal")];A[0].css("min-height",A[0].height());A[1].css("min-width",A[1].width())},_contentWidth:function(p){return Math.max.apply(Math,p.map(function(){return h(this).outerWidth(true)}).get())},_expandContentHorizontally:function(){var q=h(this),s=q.data(a),r=s.opt,p=h("#mCSB_"+s.idx+"_container");if(r.advanced.autoExpandHorizontalScroll&&r.axis!=="y"){p.css({position:"absolute",width:"auto"}).wrap("
").css({width:(Math.ceil(p[0].getBoundingClientRect().right+0.4)-Math.floor(p[0].getBoundingClientRect().left)),position:"relative"}).unwrap()}},_scrollButtons:function(){var s=h(this),u=s.data(a),t=u.opt,q=h(".mCSB_"+u.idx+"_scrollbar:first"),r=["","","",""],p=[(t.axis==="x"?r[2]:r[0]),(t.axis==="x"?r[3]:r[1]),r[2],r[3]];if(t.scrollButtons.enable){q.prepend(p[0]).append(p[1]).next(".mCSB_scrollTools").prepend(p[2]).append(p[3])}},_maxHeight:function(){var t=h(this),w=t.data(a),v=w.opt,r=h("#mCSB_"+w.idx),q=t.css("max-height"),s=q.indexOf("%")!==-1,p=t.css("box-sizing");if(q!=="none"){var u=s?t.parent().height()*parseInt(q)/100:parseInt(q);if(p==="border-box"){u-=((t.innerHeight()-t.height())+(t.outerHeight()-t.innerHeight()))}r.css("max-height",Math.round(u))}},_setDraggerLength:function(){var u=h(this),s=u.data(a),p=h("#mCSB_"+s.idx),v=h("#mCSB_"+s.idx+"_container"),y=[h("#mCSB_"+s.idx+"_dragger_vertical"),h("#mCSB_"+s.idx+"_dragger_horizontal")],t=[p.height()/v.outerHeight(false),p.width()/v.outerWidth(false)],q=[parseInt(y[0].css("min-height")),Math.round(t[0]*y[0].parent().height()),parseInt(y[1].css("min-width")),Math.round(t[1]*y[1].parent().width())],r=i&&(q[1]q.height(),p>q.width()]},_resetContentPosition:function(){var t=h(this),v=t.data(a),u=v.opt,q=h("#mCSB_"+v.idx),r=h("#mCSB_"+v.idx+"_container"),s=[h("#mCSB_"+v.idx+"_dragger_vertical"),h("#mCSB_"+v.idx+"_dragger_horizontal")];g._stop(t);if((u.axis!=="x"&&!v.overflowed[0])||(u.axis==="y"&&v.overflowed[0])){s[0].add(r).css("top",0)}if((u.axis!=="y"&&!v.overflowed[1])||(u.axis==="x"&&v.overflowed[1])){var p=dx=0;if(v.langDir==="rtl"){p=q.width()-r.outerWidth(false);dx=Math.abs(p/v.scrollRatio.x)}r.css("left",p);s[1].css("left",dx)}},_bindEvents:function(){var r=h(this),t=r.data(a),s=t.opt;if(!t.bindEvents){g._draggable.call(this);if(s.contentTouchScroll){g._contentDraggable.call(this)}if(s.mouseWheel.enable){function q(){p=setTimeout(function(){if(!h.event.special.mousewheel){q()}else{clearTimeout(p);g._mousewheel.call(r[0])}},1000)}var p;q()}g._draggerRail.call(this);g._wrapperScroll.call(this);if(s.advanced.autoScrollOnFocus){g._focus.call(this)}if(s.scrollButtons.enable){g._buttons.call(this)}if(s.keyboard.enable){g._keyboard.call(this)}t.bindEvents=true}},_unbindEvents:function(){var s=h(this),t=s.data(a),p=a+"_"+t.idx,u=".mCSB_"+t.idx+"_scrollbar",r=h("#mCSB_"+t.idx+",#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,"+u+" .mCSB_draggerContainer,#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_horizontal,"+u+">a"),q=h("#mCSB_"+t.idx+"_container");if(t.bindEvents){h(m).unbind("."+p);r.each(function(){h(this).unbind("."+p)});clearTimeout(s[0]._focusTimeout);g._delete.call(null,s[0]._focusTimeout);clearTimeout(t.sequential.step);g._delete.call(null,t.sequential.step);clearTimeout(q[0].onCompleteTimeout);g._delete.call(null,q[0].onCompleteTimeout);t.bindEvents=false}},_scrollbarVisibility:function(q){var t=h(this),v=t.data(a),u=v.opt,p=h("#mCSB_"+v.idx+"_container_wrapper"),r=p.length?p:h("#mCSB_"+v.idx+"_container"),w=[h("#mCSB_"+v.idx+"_scrollbar_vertical"),h("#mCSB_"+v.idx+"_scrollbar_horizontal")],s=[w[0].find(".mCSB_dragger"),w[1].find(".mCSB_dragger")];if(u.axis!=="x"){if(v.overflowed[0]&&!q){w[0].add(s[0]).add(w[0].children("a")).css("display","block");r.removeClass("mCS_no_scrollbar_y mCS_y_hidden")}else{if(u.alwaysShowScrollbar){if(u.alwaysShowScrollbar!==2){s[0].add(w[0].children("a")).css("display","none")}r.removeClass("mCS_y_hidden")}else{w[0].css("display","none");r.addClass("mCS_y_hidden")}r.addClass("mCS_no_scrollbar_y")}}if(u.axis!=="y"){if(v.overflowed[1]&&!q){w[1].add(s[1]).add(w[1].children("a")).css("display","block");r.removeClass("mCS_no_scrollbar_x mCS_x_hidden")}else{if(u.alwaysShowScrollbar){if(u.alwaysShowScrollbar!==2){s[1].add(w[1].children("a")).css("display","none")}r.removeClass("mCS_x_hidden")}else{w[1].css("display","none");r.addClass("mCS_x_hidden")}r.addClass("mCS_no_scrollbar_x")}}if(!v.overflowed[0]&&!v.overflowed[1]){t.addClass("mCS_no_scrollbar")}else{t.removeClass("mCS_no_scrollbar")}},_coordinates:function(q){var p=q.type;switch(p){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return[q.originalEvent.pageY,q.originalEvent.pageX];break;case"touchstart":case"touchmove":case"touchend":var r=q.originalEvent.touches[0]||q.originalEvent.changedTouches[0];return[r.pageY,r.pageX];break;default:return[q.pageY,q.pageX]}},_draggable:function(){var u=h(this),s=u.data(a),p=s.opt,r=a+"_"+s.idx,t=["mCSB_"+s.idx+"_dragger_vertical","mCSB_"+s.idx+"_dragger_horizontal"],v=h("#mCSB_"+s.idx+"_container"),w=h("#"+t[0]+",#"+t[1]),A,y,z;w.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,function(E){E.stopImmediatePropagation();E.preventDefault();if(!g._mouseBtnLeft(E)){return}n=true;if(i){m.onselectstart=function(){return false}}x(false);g._stop(u);A=h(this);var F=A.offset(),G=g._coordinates(E)[0]-F.top,B=g._coordinates(E)[1]-F.left,D=A.height()+F.top,C=A.width()+F.left;if(G0&&B0){y=G;z=B}g._onDragClasses(A,"active",p.autoExpandScrollbar)}).bind("touchmove."+r,function(C){C.stopImmediatePropagation();C.preventDefault();var D=A.offset(),E=g._coordinates(C)[0]-D.top,B=g._coordinates(C)[1]-D.left;q(y,z,E,B)});h(m).bind("mousemove."+r+" pointermove."+r+" MSPointerMove."+r,function(C){if(A){var D=A.offset(),E=g._coordinates(C)[0]-D.top,B=g._coordinates(C)[1]-D.left;if(y===E){return}q(y,z,E,B)}}).add(w).bind("mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r,function(B){if(A){g._onDragClasses(A,"active",p.autoExpandScrollbar);A=null}n=false;if(i){m.onselectstart=null}x(true)});function x(B){var C=v.find("iframe");if(!C.length){return}var D=!B?"none":"auto";C.css("pointer-events",D)}function q(D,E,G,B){v[0].idleTimer=p.scrollInertia<233?250:0;if(A.attr("id")===t[1]){var C="x",F=((A[0].offsetLeft-E)+B)*s.scrollRatio.x}else{var C="y",F=((A[0].offsetTop-D)+G)*s.scrollRatio.y}g._scrollTo(u,F.toString(),{dir:C,drag:true})}},_contentDraggable:function(){var y=h(this),K=y.data(a),I=K.opt,F=a+"_"+K.idx,v=h("#mCSB_"+K.idx),z=h("#mCSB_"+K.idx+"_container"),w=[h("#mCSB_"+K.idx+"_dragger_vertical"),h("#mCSB_"+K.idx+"_dragger_horizontal")],E,G,L,M,C=[],D=[],H,A,u,t,J,x,r=0,q,s=I.axis==="yx"?"none":"all";z.bind("touchstart."+F+" pointerdown."+F+" MSPointerDown."+F,function(N){if(!g._pointerTouch(N)||n){return}var O=z.offset();E=g._coordinates(N)[0]-O.top;G=g._coordinates(N)[1]-O.left}).bind("touchmove."+F+" pointermove."+F+" MSPointerMove."+F,function(Q){if(!g._pointerTouch(Q)||n){return}Q.stopImmediatePropagation();A=g._getTime();var P=v.offset(),S=g._coordinates(Q)[0]-P.top,U=g._coordinates(Q)[1]-P.left,R="mcsLinearOut";C.push(S);D.push(U);if(K.overflowed[0]){var O=w[0].parent().height()-w[0].height(),T=((E-S)>0&&(S-E)>-(O*K.scrollRatio.y))}if(K.overflowed[1]){var N=w[1].parent().width()-w[1].width(),V=((G-U)>0&&(U-G)>-(N*K.scrollRatio.x))}if(T||V){Q.preventDefault()}x=I.axis==="yx"?[(E-S),(G-U)]:I.axis==="x"?[null,(G-U)]:[(E-S),null];z[0].idleTimer=250;if(K.overflowed[0]){B(x[0],r,R,"y","all",true)}if(K.overflowed[1]){B(x[1],r,R,"x",s,true)}});v.bind("touchstart."+F+" pointerdown."+F+" MSPointerDown."+F,function(N){if(!g._pointerTouch(N)||n){return}N.stopImmediatePropagation();g._stop(y);H=g._getTime();var O=v.offset();L=g._coordinates(N)[0]-O.top;M=g._coordinates(N)[1]-O.left;C=[];D=[]}).bind("touchend."+F+" pointerup."+F+" MSPointerUp."+F,function(P){if(!g._pointerTouch(P)||n){return}P.stopImmediatePropagation();u=g._getTime();var N=v.offset(),T=g._coordinates(P)[0]-N.top,V=g._coordinates(P)[1]-N.left;if((u-A)>30){return}J=1000/(u-H);var Q="mcsEaseOut",R=J<2.5,W=R?[C[C.length-2],D[D.length-2]]:[0,0];t=R?[(T-W[0]),(V-W[1])]:[T-L,V-M];var O=[Math.abs(t[0]),Math.abs(t[1])];J=R?[Math.abs(t[0]/4),Math.abs(t[1]/4)]:[J,J];var U=[Math.abs(z[0].offsetTop)-(t[0]*p((O[0]/J[0]),J[0])),Math.abs(z[0].offsetLeft)-(t[1]*p((O[1]/J[1]),J[1]))];x=I.axis==="yx"?[U[0],U[1]]:I.axis==="x"?[null,U[1]]:[U[0],null];q=[(O[0]*4)+I.scrollInertia,(O[1]*4)+I.scrollInertia];var S=parseInt(I.contentTouchScroll)||0;x[0]=O[0]>S?x[0]:0;x[1]=O[1]>S?x[1]:0;if(K.overflowed[0]){B(x[0],q[0],Q,"y",s,false)}if(K.overflowed[1]){B(x[1],q[1],Q,"x",s,false)}});function p(P,N){var O=[N*1.5,N*2,N/1.5,N/2];if(P>90){return N>4?O[0]:O[3]}else{if(P>60){return N>3?O[3]:O[2]}else{if(P>30){return N>8?O[1]:N>6?O[0]:N>4?N:O[2]}else{return N>8?N:O[3]}}}}function B(P,R,S,O,N,Q){if(!P){return}g._scrollTo(y,P.toString(),{dur:R,scrollEasing:S,dir:O,overwrite:N,drag:Q})}},_mousewheel:function(){var s=h(this),u=s.data(a),t=u.opt,q=a+"_"+u.idx,p=h("#mCSB_"+u.idx),r=[h("#mCSB_"+u.idx+"_dragger_vertical"),h("#mCSB_"+u.idx+"_dragger_horizontal")];p.bind("mousewheel."+q,function(z,D){g._stop(s);if(g._disableMousewheel(s,z.target)){return}var B=t.mouseWheel.deltaFactor!=="auto"?parseInt(t.mouseWheel.deltaFactor):(i&&z.deltaFactor<100)?100:z.deltaFactor<40?40:z.deltaFactor||100;if(t.axis==="x"||t.mouseWheel.axis==="x"){var w="x",C=[Math.round(B*u.scrollRatio.x),parseInt(t.mouseWheel.scrollAmount)],y=t.mouseWheel.scrollAmount!=="auto"?C[1]:C[0]>=p.width()?p.width()*0.9:C[0],E=Math.abs(h("#mCSB_"+u.idx+"_container")[0].offsetLeft),A=r[1][0].offsetLeft,x=r[1].parent().width()-r[1].width(),v=z.deltaX||z.deltaY||D}else{var w="y",C=[Math.round(B*u.scrollRatio.y),parseInt(t.mouseWheel.scrollAmount)],y=t.mouseWheel.scrollAmount!=="auto"?C[1]:C[0]>=p.height()?p.height()*0.9:C[0],E=Math.abs(h("#mCSB_"+u.idx+"_container")[0].offsetTop),A=r[0][0].offsetTop,x=r[0].parent().height()-r[0].height(),v=z.deltaY||D}if((w==="y"&&!u.overflowed[0])||(w==="x"&&!u.overflowed[1])){return}if(t.mouseWheel.invert){v=-v}if(t.mouseWheel.normalizeDelta){v=v<0?-1:1}if((v>0&&A!==0)||(v<0&&A!==x)||t.mouseWheel.preventDefault){z.stopImmediatePropagation();z.preventDefault()}g._scrollTo(s,(E-(v*y)).toString(),{dir:w})})},_disableMousewheel:function(r,t){var p=t.nodeName.toLowerCase(),q=r.data(a).opt.mouseWheel.disableOver,s=["select","textarea"];return h.inArray(p,q)>-1&&!(h.inArray(p,s)>-1&&!h(t).is(":focus"))},_draggerRail:function(){var s=h(this),t=s.data(a),q=a+"_"+t.idx,r=h("#mCSB_"+t.idx+"_container"),u=r.parent(),p=h(".mCSB_"+t.idx+"_scrollbar .mCSB_draggerContainer");p.bind("touchstart."+q+" pointerdown."+q+" MSPointerDown."+q,function(v){n=true}).bind("touchend."+q+" pointerup."+q+" MSPointerUp."+q,function(v){n=false}).bind("click."+q,function(z){if(h(z.target).hasClass("mCSB_draggerContainer")||h(z.target).hasClass("mCSB_draggerRail")){g._stop(s);var w=h(this),y=w.find(".mCSB_dragger");if(w.parent(".mCSB_scrollTools_horizontal").length>0){if(!t.overflowed[1]){return}var v="x",x=z.pageX>y.offset().left?-1:1,A=Math.abs(r[0].offsetLeft)-(x*(u.width()*0.9))}else{if(!t.overflowed[0]){return}var v="y",x=z.pageY>y.offset().top?-1:1,A=Math.abs(r[0].offsetTop)-(x*(u.height()*0.9))}g._scrollTo(s,A.toString(),{dir:v,scrollEasing:"mcsEaseInOut"})}})},_focus:function(){var r=h(this),t=r.data(a),s=t.opt,p=a+"_"+t.idx,q=h("#mCSB_"+t.idx+"_container"),u=q.parent();q.bind("focusin."+p,function(x){var w=h(m.activeElement),y=q.find(".mCustomScrollBox").length,v=0;if(!w.is(s.advanced.autoScrollOnFocus)){return}g._stop(r);clearTimeout(r[0]._focusTimeout);r[0]._focusTimer=y?(v+17)*y:0;r[0]._focusTimeout=setTimeout(function(){var C=[w.offset().top-q.offset().top,w.offset().left-q.offset().left],B=[q[0].offsetTop,q[0].offsetLeft],z=[(B[0]+C[0]>=0&&B[0]+C[0]=0&&B[0]+C[1]a");q.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(z){z.preventDefault();if(!g._mouseBtnLeft(z)){return}var y=h(this).attr("class");p.type=v.scrollButtons.scrollType;switch(z.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if(p.type==="stepped"){return}n=true;w.tweenRunning=false;x("on",y);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if(p.type==="stepped"){return}n=false;if(p.dir){x("off",y)}break;case"click":if(p.type!=="stepped"||w.tweenRunning){return}x("on",y);break}function x(A,B){p.scrollAmount=v.snapAmount||v.scrollButtons.scrollAmount;g._sequentialScroll.call(this,u,A,B)}})},_keyboard:function(){var u=h(this),t=u.data(a),q=t.opt,x=t.sequential,s=a+"_"+t.idx,r=h("#mCSB_"+t.idx),w=h("#mCSB_"+t.idx+"_container"),p=w.parent(),v="input,textarea,select,datalist,keygen,[contenteditable='true']";r.attr("tabindex","0").bind("blur."+s+" keydown."+s+" keyup."+s,function(D){switch(D.type){case"blur":if(t.tweenRunning&&x.dir){y("off",null)}break;case"keydown":case"keyup":var A=D.keyCode?D.keyCode:D.which,B="on";if((q.axis!=="x"&&(A===38||A===40))||(q.axis!=="y"&&(A===37||A===39))){if(((A===38||A===40)&&!t.overflowed[0])||((A===37||A===39)&&!t.overflowed[1])){return}if(D.type==="keyup"){B="off"}if(!h(m.activeElement).is(v)){D.preventDefault();D.stopImmediatePropagation();y(B,A)}}else{if(A===33||A===34){if(t.overflowed[0]||t.overflowed[1]){D.preventDefault();D.stopImmediatePropagation()}if(D.type==="keyup"){g._stop(u);var C=A===34?-1:1;if(q.axis==="x"||(q.axis==="yx"&&t.overflowed[1]&&!t.overflowed[0])){var z="x",E=Math.abs(w[0].offsetLeft)-(C*(p.width()*0.9))}else{var z="y",E=Math.abs(w[0].offsetTop)-(C*(p.height()*0.9))}g._scrollTo(u,E.toString(),{dir:z,scrollEasing:"mcsEaseInOut"})}}else{if(A===35||A===36){if(!h(m.activeElement).is(v)){if(t.overflowed[0]||t.overflowed[1]){D.preventDefault();D.stopImmediatePropagation()}if(D.type==="keyup"){if(q.axis==="x"||(q.axis==="yx"&&t.overflowed[1]&&!t.overflowed[0])){var z="x",E=A===35?Math.abs(p.width()-w.outerWidth(false)):0}else{var z="y",E=A===35?Math.abs(p.height()-w.outerHeight(false)):0}g._scrollTo(u,E.toString(),{dir:z,scrollEasing:"mcsEaseInOut"})}}}}}break}function y(F,G){x.type=q.keyboard.scrollType;x.scrollAmount=q.snapAmount||q.keyboard.scrollAmount;if(x.type==="stepped"&&t.tweenRunning){return}g._sequentialScroll.call(this,u,F,G)}})},_sequentialScroll:function(r,u,s){var w=r.data(a),q=w.opt,y=w.sequential,x=h("#mCSB_"+w.idx+"_container"),p=y.type==="stepped"?true:false;switch(u){case"on":y.dir=[(s==="mCSB_buttonRight"||s==="mCSB_buttonLeft"||s===39||s===37?"x":"y"),(s==="mCSB_buttonUp"||s==="mCSB_buttonLeft"||s===38||s===37?-1:1)];g._stop(r);if(g._isNumeric(s)&&y.type==="stepped"){return}t(p);break;case"off":v();if(p||(w.tweenRunning&&y.dir)){t(true)}break}function t(z){var F=y.type!=="stepped",J=!z?1000/60:F?q.scrollInertia/1.5:q.scrollInertia,B=!z?2.5:F?7.5:40,I=[Math.abs(x[0].offsetTop),Math.abs(x[0].offsetLeft)],E=[w.scrollRatio.y>10?10:w.scrollRatio.y,w.scrollRatio.x>10?10:w.scrollRatio.x],C=y.dir[0]==="x"?I[1]+(y.dir[1]*(E[1]*B)):I[0]+(y.dir[1]*(E[0]*B)),H=y.dir[0]==="x"?I[1]+(y.dir[1]*parseInt(y.scrollAmount)):I[0]+(y.dir[1]*parseInt(y.scrollAmount)),G=y.scrollAmount!=="auto"?H:C,D=!z?"mcsLinear":F?"mcsLinearOut":"mcsEaseInOut",A=!z?false:true;if(z&&J<17){G=y.dir[0]==="x"?I[1]:I[0]}g._scrollTo(r,G.toString(),{dir:y.dir[0],scrollEasing:D,dur:J,onComplete:A});if(z){y.dir=false;return}clearTimeout(y.step);y.step=setTimeout(function(){t()},J)}function v(){clearTimeout(y.step);g._stop(r)}},_arr:function(r){var q=h(this).data(a).opt,p=[];if(typeof r==="function"){r=r()}if(!(r instanceof Array)){p[0]=r.y?r.y:r.x||q.axis==="x"?null:r;p[1]=r.x?r.x:r.y||q.axis==="y"?null:r}else{p=r.length>1?[r[0],r[1]]:q.axis==="x"?[null,r[0]]:[r[0],null]}if(typeof p[0]==="function"){p[0]=p[0]()}if(typeof p[1]==="function"){p[1]=p[1]()}return p},_to:function(v,w){if(v==null||typeof v=="undefined"){return}var C=h(this),B=C.data(a),u=B.opt,D=h("#mCSB_"+B.idx+"_container"),r=D.parent(),F=typeof v;if(!w){w=u.axis==="x"?"x":"y"}var q=w==="x"?D.outerWidth(false):D.outerHeight(false),x=w==="x"?D.offset().left:D.offset().top,E=w==="x"?D[0].offsetLeft:D[0].offsetTop,z=w==="x"?"left":"top";switch(F){case"function":return v();break;case"object":if(v.nodeType){var A=w==="x"?h(v).offset().left:h(v).offset().top}else{if(v.jquery){if(!v.length){return}var A=w==="x"?v.offset().left:v.offset().top}}return A-x;break;case"string":case"number":if(g._isNumeric.call(null,v)){return Math.abs(v)}else{if(v.indexOf("%")!==-1){return Math.abs(q*parseInt(v)/100)}else{if(v.indexOf("-=")!==-1){return Math.abs(E-parseInt(v.split("-=")[1]))}else{if(v.indexOf("+=")!==-1){var s=(E+parseInt(v.split("+=")[1]));return s>=0?0:Math.abs(s)}else{if(v.indexOf("px")!==-1&&g._isNumeric.call(null,v.split("px")[0])){return Math.abs(v.split("px")[0])}else{if(v==="top"||v==="left"){return 0}else{if(v==="bottom"){return Math.abs(r.height()-D.outerHeight(false))}else{if(v==="right"){return Math.abs(r.width()-D.outerWidth(false))}else{if(v==="first"||v==="last"){var y=D.find(":"+v),A=w==="x"?h(y).offset().left:h(y).offset().top;return A-x}else{if(h(v).length){var A=w==="x"?h(v).offset().left:h(v).offset().top;return A-x}else{D.css(z,v);b.update.call(null,C[0]);return}}}}}}}}}}break}},_autoUpdate:function(q){var t=h(this),F=t.data(a),z=F.opt,v=h("#mCSB_"+F.idx+"_container");if(q){clearTimeout(v[0].autoUpdate);g._delete.call(null,v[0].autoUpdate);return}var s=v.parent(),p=[h("#mCSB_"+F.idx+"_scrollbar_vertical"),h("#mCSB_"+F.idx+"_scrollbar_horizontal")],D=function(){return[p[0].is(":visible")?p[0].outerHeight(true):0,p[1].is(":visible")?p[1].outerWidth(true):0]},E=y(),x,u=[v.outerHeight(false),v.outerWidth(false),s.height(),s.width(),D()[0],D()[1]],H,B=G(),w;C();function C(){clearTimeout(v[0].autoUpdate);v[0].autoUpdate=setTimeout(function(){if(z.advanced.updateOnSelectorChange){x=y();if(x!==E){r();E=x;return}}if(z.advanced.updateOnContentResize){H=[v.outerHeight(false),v.outerWidth(false),s.height(),s.width(),D()[0],D()[1]];if(H[0]!==u[0]||H[1]!==u[1]||H[2]!==u[2]||H[3]!==u[3]||H[4]!==u[4]||H[5]!==u[5]){r();u=H}}if(z.advanced.updateOnImageLoad){w=G();if(w!==B){v.find("img").each(function(){A(this.src)});B=w}}if(z.advanced.updateOnSelectorChange||z.advanced.updateOnContentResize||z.advanced.updateOnImageLoad){C()}},60)}function G(){var I=0;if(z.advanced.updateOnImageLoad){I=v.find("img").length}return I}function A(L){var I=new Image();function K(M,N){return function(){return N.apply(M,arguments)}}function J(){this.onload=null;r()}I.onload=K(I,J);I.src=L}function y(){if(z.advanced.updateOnSelectorChange===true){z.advanced.updateOnSelectorChange="*"}var I=0,J=v.find(z.advanced.updateOnSelectorChange);if(z.advanced.updateOnSelectorChange&&J.length>0){J.each(function(){I+=h(this).height()+h(this).width()})}return I}function r(){clearTimeout(v[0].autoUpdate);b.update.call(null,t[0])}},_snapAmount:function(r,p,q){return(Math.round(r/p)*p-q)},_stop:function(p){var r=p.data(a),q=h("#mCSB_"+r.idx+"_container,#mCSB_"+r.idx+"_container_wrapper,#mCSB_"+r.idx+"_dragger_vertical,#mCSB_"+r.idx+"_dragger_horizontal");q.each(function(){g._stopTween.call(this)})},_scrollTo:function(q,s,u){var I=q.data(a),E=I.opt,D={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:false,dur:E.scrollInertia,overwrite:"all",callbacks:true,onStart:true,onUpdate:true,onComplete:true},u=h.extend(D,u),G=[u.dur,(u.drag?0:u.dur)],v=h("#mCSB_"+I.idx),B=h("#mCSB_"+I.idx+"_container"),K=E.callbacks.onTotalScrollOffset?g._arr.call(q,E.callbacks.onTotalScrollOffset):[0,0],p=E.callbacks.onTotalScrollBackOffset?g._arr.call(q,E.callbacks.onTotalScrollBackOffset):[0,0];I.trigger=u.trigger;if(E.snapAmount){s=g._snapAmount(s,E.snapAmount,E.snapOffset)}switch(u.dir){case"x":var x=h("#mCSB_"+I.idx+"_dragger_horizontal"),z="left",C=B[0].offsetLeft,H=[v.width()-B.outerWidth(false),x.parent().width()-x.width()],r=[s,(s/I.scrollRatio.x)],L=K[1],J=p[1],A=L>0?L/I.scrollRatio.x:0,w=J>0?J/I.scrollRatio.x:0;break;case"y":var x=h("#mCSB_"+I.idx+"_dragger_vertical"),z="top",C=B[0].offsetTop,H=[v.height()-B.outerHeight(false),x.parent().height()-x.height()],r=[s,(s/I.scrollRatio.y)],L=K[0],J=p[0],A=L>0?L/I.scrollRatio.y:0,w=J>0?J/I.scrollRatio.y:0;break}if(r[1]<0){r=[0,0]}else{if(r[1]>=H[1]){r=[H[0],H[1]]}else{r[0]=-r[0]}}clearTimeout(B[0].onCompleteTimeout);if(!I.tweenRunning&&((C===0&&r[0]>=0)||(C===H[0]&&r[0]<=H[0]))){return}g._tweenTo.call(null,x[0],z,Math.round(r[1]),G[1],u.scrollEasing);g._tweenTo.call(null,B[0],z,Math.round(r[0]),G[0],u.scrollEasing,u.overwrite,{onStart:function(){if(u.callbacks&&u.onStart&&!I.tweenRunning){if(t("onScrollStart")){F();E.callbacks.onScrollStart.call(q[0])}I.tweenRunning=true;g._onDragClasses(x);I.cbOffsets=y()}},onUpdate:function(){if(u.callbacks&&u.onUpdate){if(t("whileScrolling")){F();E.callbacks.whileScrolling.call(q[0])}}},onComplete:function(){if(u.callbacks&&u.onComplete){if(E.axis==="yx"){clearTimeout(B[0].onCompleteTimeout)}var M=B[0].idleTimer||0;B[0].onCompleteTimeout=setTimeout(function(){if(t("onScroll")){F();E.callbacks.onScroll.call(q[0])}if(t("onTotalScroll")&&r[1]>=H[1]-A&&I.cbOffsets[0]){F();E.callbacks.onTotalScroll.call(q[0])}if(t("onTotalScrollBack")&&r[1]<=w&&I.cbOffsets[1]){F();E.callbacks.onTotalScrollBack.call(q[0])}I.tweenRunning=false;B[0].idleTimer=0;g._onDragClasses(x,"hide")},M)}}});function t(M){return I&&E.callbacks[M]&&typeof E.callbacks[M]==="function"}function y(){return[E.callbacks.alwaysTriggerOffsets||C>=H[0]+L,E.callbacks.alwaysTriggerOffsets||C<=-J]}function F(){var O=[B[0].offsetTop,B[0].offsetLeft],P=[x[0].offsetTop,x[0].offsetLeft],M=[B.outerHeight(false),B.outerWidth(false)],N=[v.height(),v.width()];q[0].mcs={content:B,top:O[0],left:O[1],draggerTop:P[0],draggerLeft:P[1],topPct:Math.round((100*Math.abs(O[0]))/(Math.abs(M[0])-N[0])),leftPct:Math.round((100*Math.abs(O[1]))/(Math.abs(M[1])-N[1])),direction:u.dir}}},_tweenTo:function(r,u,s,q,A,t,J){var J=J||{},G=J.onStart||function(){},B=J.onUpdate||function(){},H=J.onComplete||function(){},z=g._getTime(),x,v=0,D=r.offsetTop,E=r.style;if(u==="left"){D=r.offsetLeft}var y=s-D;r._mcsstop=0;if(t!=="none"){C()}p();function I(){if(r._mcsstop){return}if(!v){G.call()}v=g._getTime()-z;F();if(v>=r._mcstime){r._mcstime=(v>r._mcstime)?v+x-(v-r._mcstime):v+x-1;if(r._mcstime0){r._mcscurrVal=w(r._mcstime,D,y,q,A);E[u]=Math.round(r._mcscurrVal)+"px"}else{E[u]=s+"px"}B.call()}function p(){x=1000/60;r._mcstime=v+x;_request=(!l.requestAnimationFrame)?function(K){F();return setTimeout(K,0.01)}:l.requestAnimationFrame;r._mcsid=_request(I)}function C(){if(r._mcsid==null){return}if(!l.requestAnimationFrame){clearTimeout(r._mcsid)}else{l.cancelAnimationFrame(r._mcsid)}r._mcsid=null}function w(M,L,Q,P,N){switch(N){case"linear":case"mcsLinear":return Q*M/P+L;break;case"mcsLinearOut":M/=P;M--;return Q*Math.sqrt(1-M*M)+L;break;case"easeInOutSmooth":M/=P/2;if(M<1){return Q/2*M*M+L}M--;return -Q/2*(M*(M-2)-1)+L;break;case"easeInOutStrong":M/=P/2;if(M<1){return Q/2*Math.pow(2,10*(M-1))+L}M--;return Q/2*(-Math.pow(2,-10*M)+2)+L;break;case"easeInOut":case"mcsEaseInOut":M/=P/2;if(M<1){return Q/2*M*M*M+L}M-=2;return Q/2*(M*M*M+2)+L;break;case"easeOutSmooth":M/=P;M--;return -Q*(M*M*M*M-1)+L;break;case"easeOutStrong":return Q*(-Math.pow(2,-10*M/P)+1)+L;break;case"easeOut":case"mcsEaseOut":default:var O=(M/=P)*M,K=O*M;return L+Q*(0.499999999999997*K*O+-2.5*O*O+5.5*K+-6.5*O+4*M)}}},_getTime:function(){if(l.performance&&l.performance.now){return l.performance.now()}else{if(l.performance&&l.performance.webkitNow){return l.performance.webkitNow()}else{if(Date.now){return Date.now()}else{return new Date().getTime()}}}},_stopTween:function(){var p=this;if(p._mcsid==null){return}if(!l.requestAnimationFrame){clearTimeout(p._mcsid)}else{l.cancelAnimationFrame(p._mcsid)}p._mcsid=null;p._mcsstop=1},_delete:function(r){try{delete r}catch(q){r=null}},_mouseBtnLeft:function(p){return !(p.which&&p.which!==1)},_pointerTouch:function(q){var p=q.originalEvent.pointerType;return !(p&&p!=="touch"&&p!==2)},_isNumeric:function(p){return !isNaN(parseFloat(p))&&isFinite(p)}};h.fn[e]=function(p){if(b[p]){return b[p].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof p==="object"||!p){return b.init.apply(this,arguments)}else{h.error("Method "+p+" does not exist")}}};h[e]=function(p){if(b[p]){return b[p].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof p==="object"||!p){return b.init.apply(this,arguments)}else{h.error("Method "+p+" does not exist")}}};h[e].defaults=f;l[e]=true;h(l).load(function(){h(k)[e]()})})(jQuery,window,document); \ No newline at end of file diff --git a/resource/js/lscache.min.js b/resource/js/lscache.min.js deleted file mode 100644 index 8c45fc2fd..000000000 --- a/resource/js/lscache.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a,b){"function"==typeof define&&define.amd?define([],b):"undefined"!=typeof module&&module.exports?module.exports=b():a.lscache=b()}(this,function(){function a(){var a="__lscachetest__",b=a;if(void 0!==i)return i;try{f(a,b),g(a),i=!0}catch(c){i=!1}return i}function b(){return void 0===j&&(j=null!=window.JSON),j}function c(a){return a+l}function d(){return Math.floor((new Date).getTime()/n)}function e(a){return localStorage.getItem(k+p+a)}function f(a,b){localStorage.removeItem(k+p+a),localStorage.setItem(k+p+a,b)}function g(a){localStorage.removeItem(k+p+a)}function h(a,b){q&&"console"in window&&"function"==typeof window.console.warn&&(window.console.warn("lscache - "+a),b&&window.console.warn("lscache - The error was: "+b.message))}var i,j,k="lscache-",l="-cacheexpiration",m=10,n=6e4,o=Math.floor(864e13/n),p="",q=!1,r={set:function(i,j,n){if(a()){if("string"!=typeof j){if(!b())return;try{j=JSON.stringify(j)}catch(q){return}}try{f(i,j)}catch(q){if("QUOTA_EXCEEDED_ERR"!==q.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==q.name&&"QuotaExceededError"!==q.name)return void h("Could not add item with key '"+i+"'",q);for(var r,s=[],t=0;t0;)r=s.pop(),h("Cache is full, removing item with key '"+i+"'"),g(r.key),g(c(r.key)),x-=r.size;try{f(i,j)}catch(q){return void h("Could not add item with key '"+i+"', perhaps it's too big?",q)}}n?f(c(i),(d()+n).toString(m)):g(c(i))}},get:function(f){if(!a())return null;var h=c(f),i=e(h);if(i){var j=parseInt(i,m);if(d()>=j)return g(f),g(h),null}var k=e(f);if(!k||!b())return k;try{return JSON.parse(k)}catch(l){return k}},remove:function(b){return a()?(g(b),void g(c(b))):null},supported:function(){return a()},flush:function(){if(a())for(var b=localStorage.length-1;b>=0;--b){var c=localStorage.key(b);0===c.indexOf(k+p)&&localStorage.removeItem(c)}},setBucket:function(a){p=a},resetBucket:function(){p=""},enableWarnings:function(a){q=a}};return r}); \ No newline at end of file diff --git a/view/scripts.twig b/view/scripts.twig index f2cc7184d..ba014ab00 100644 --- a/view/scripts.twig +++ b/view/scripts.twig @@ -38,11 +38,11 @@ var showNotation = {% if request.vocab and request.vocab.config.showNotation == + + - - {% for files in request.plugins.pluginsJS %}{% for file in files %}{% endfor %}{% endfor %} {% if request.plugins.callbacks %}{% endif %} From 1ef321ef27394060c7242d2f730b31b793df58a9 Mon Sep 17 00:00:00 2001 From: Bart van Leeuwen Date: Sat, 13 Jan 2018 14:30:04 +0100 Subject: [PATCH 029/173] Fix hard crash on missng skosxl:literalForm If skosxl:literalForm is missing on a label resource the $label variable remains uninitialzed and causes a hard crash --- model/Concept.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/Concept.php b/model/Concept.php index 13ceada61..ed6525147 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -151,7 +151,7 @@ public function getXlLabel() $labels = $this->resource->allResources('skosxl:prefLabel'); foreach($labels as $labres) { $label = $labres->getLiteral('skosxl:literalForm'); - if ($label->getLang() == $this->clang) { + if ($label !== null && $label->getLang() == $this->clang) { return new LabelSkosXL($this->model, $labres); } } From 43c1aaa03bfcd128cf825e2e36a442fe3469319e Mon Sep 17 00:00:00 2001 From: kouralex Date: Mon, 15 Jan 2018 16:27:52 +0200 Subject: [PATCH 030/173] finished jsonld augmentation --- model/Concept.php | 147 ++++++++++++++++++------------------- model/PluginRegister.php | 12 +-- model/VocabularyConfig.php | 29 ++++++-- 3 files changed, 93 insertions(+), 95 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 0d5cf4756..b8a43be73 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -44,6 +44,31 @@ class Concept extends VocabularyDataObject 'owl:sameAs', ); + /** default external properties we are interested in saving/displaying from mapped external objects */ + private $DEFAULT_EXT_PROPERTIES = array( + "http://purl.org/dc/elements/1.1/title", + "http://purl.org/dc/terms/title", + "http://www.w3.org/2004/02/skos/core#prefLabel", + "http://www.w3.org/2004/02/skos/core#exactMatch", + "http://www.w3.org/2004/02/skos/core#closeMatch", + "http://www.w3.org/2004/02/skos/core#inScheme", + "http://www.w3.org/2000/01/rdf-schema#label", + "http://www.w3.org/2000/01/rdf-schema#isDefinedBy", + "http://www.w3.org/2002/07/owl#sameAs", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", + "http://rdfs.org/ns/void#inDataset", + "http://rdfs.org/ns/void#sparqlEndpoint", + "http://rdfs.org/ns/void#uriLookupEndpoint", + "http://schema.org/about", + "http://schema.org/description", + "http://schema.org/inLanguage", + "http://schema.org/name", + "http://schema.org/isPartOf", + "http://www.wikidata.org/prop/direct/P31", + "http://www.wikidata.org/prop/direct/P625", + "http://wikiba.se/ontology-beta#wikiGroup" + ); + /** * Initializing the concept object requires the following parameters. * @param Model $model @@ -242,6 +267,47 @@ public function getFoundByType() return $this->foundbytype; } + public function processExternalResource($response) + { + $exGraph = $response->getGraph(); + //d($exGraph->reversePropertyUris($response)); + // catch external subjects that have $response as object + $extSubjects = $exGraph->resourcesMatching("http://schema.org/about", $response); + + $search_for_properties = array_unique(array_merge( + $this->DEFAULT_EXT_PROPERTIES, + $this->getVocab()->getConfig()->getExtProperties(), + $this->getVocab()->getConfig()->getPlugins()->getExtProperties() + )); + + $this->addExternalTriplesToGraph($response, $search_for_properties, False); + + foreach ($extSubjects as $extSubject) { + $this->addExternalTriplesToGraph($extSubject, $search_for_properties, True); + } + + } + + public function addExternalTriplesToGraph($resource, $properties, $inverse=False) + { + foreach ($properties as $prop) { + if ($resource->hasProperty($prop)) { + + $resList = $resource->allResources('<' . $prop . '>'); + + foreach ($resList as $res) { + $this->graph->addResource($resource, $prop, $res); + } + + $litList = $resource->allLiterals('<' . $prop . '>'); + + foreach ($litList as $lit) { + $this->graph->addLiteral($resource, $prop, $lit); + } + } + } + } + public function getMappingProperties() { $ret = array(); @@ -282,85 +348,12 @@ public function getMappingProperties() if ($response) { $ret[$prop]->addValue(new ConceptMappingPropertyValue($this->model, $this->vocab, $response, $prop), $this->clang); - //var_dump($ret[$prop]); //@TODO - $ext_longUris = $response->propertyUris(); - $search_for_prop = $this->getVocab()->getConfig()->getPlugins()->getExtProperties(); - - /*foreach ($ext_longUris as &$prop2) { - if (EasyRdf\RdfNamespace::shorten($prop2) !== null) { - // shortening property labels if possible - $prop2 = $sprop = EasyRdf\RdfNamespace::shorten($prop2); - } else { - $prop2 = $sprop2 = "<$prop2>"; - } - } - // EasyRdf requires full URIs to be in angle brackets - */ - - // either this foreach or hasProperty - - $save = array($exuri => array()); - - foreach ($ext_longUris as &$prop2) { - if (in_array($prop2, $search_for_prop)) { - - $resList = $response->allResources('<' . $prop2 . '>'); - $readyResList = array(); - array_walk($resList, function(&$value, $key) use (&$readyResList, &$prop2) { - $value = $value->toRdfPhp(); - $readyResList[$prop2][$key] = $value; - }); - //var_dump($readyResList); - $litList = $response->allLiterals('<' . $prop2 . '>'); - array_walk($litList, function(&$value) { - $value = $value->toRdfPhp(); - }); - - if (isset($readyResList[$prop2])) { - $save[$exuri] = $readyResList; - } - else { - $save[$exuri][$prop2] = $litList; - } - - //var_dump($propres2->toRdfPhp()); - //echo $response->getUri(); - //var_dump($prop2); - } - } - - //var_dump($save); - //var_dump($response->toRdfPhp()); - //var_dump($response->getGraph()->toRdfPhp()); - - $this->graph->parse($save, 'php'); - /* - - var_dump($ext_longUris); - - foreach ($search_for_prop as $extProp) { - //$this->graph->parse($response->getGraph()->toRdfPhp(), 'php'); - //echo $extProp; - //var_dump($response->getGraph()->resourcesMatching($extProp)); - foreach ($response->getGraph()->resourcesMatching($extProp) as $match) { - echo $extProp; - var_dump($match->propertyUris()); - var_dump($match); - } - //$this->graph->parse($response->getGraph()->resourcesMatching($extProp)); - } - //var_dump($response->getGraph()->resources()); - var_dump($response->getGraph()->toRdfPhp()); - var_dump($response->getGraph()); - //var_dump($response); - var_dump($this->resource); - */ - //exit(); - //exit(); - //$this->graph - //$this->graph->parse($response->getGraph()->serialise("rdfxml"),"rdfxml"); + Kint::$max_depth = 4; + + $this->processExternalResource($response); + continue; } } diff --git a/model/PluginRegister.php b/model/PluginRegister.php index 0e1a21370..89bdada72 100644 --- a/model/PluginRegister.php +++ b/model/PluginRegister.php @@ -161,17 +161,7 @@ protected function flatten($array) { * @return array */ public function getExtProperties() { - - $defaultValues = ["http://purl.org/dc/elements/1.1/title", "http://purl.org/dc/terms/title", - "http://www.w3.org/2004/02/skos/core#prefLabel", "http://www.w3.org/2000/01/rdf-schema#label", - "http://www.w3.org/2004/02/skos/core#inScheme", "http://www.w3.org/2002/07/owl#sameAs", - "http://www.w3.org/2004/02/skos/core#exactMatch", "http://www.w3.org/2004/02/skos/core#closeMatch", - "http://rdfs.org/ns/void#inDataset"]; - - $ret = array_merge($defaultValues, $this->filterPlugins('ext-properties', true)); - - // flatten and remove duplicates - return array_unique($this->flatten($ret)); + return array_unique($this->flatten($this->filterPlugins('ext-properties', true))); } } diff --git a/model/VocabularyConfig.php b/model/VocabularyConfig.php index 10b0e34cd..21b5888d2 100644 --- a/model/VocabularyConfig.php +++ b/model/VocabularyConfig.php @@ -34,7 +34,22 @@ private function getBoolean($property, $default = false) return $default; } - + + /** + * Returns an array of URIs based on a property from the vocabularies.ttl configuration. + * @param string $property the property to query + */ + private function getResources($property) + { + $resources = $this->resource->allResources($property); + $ret = array(); + foreach ($resources as $res) { + $ret[] = $res->getURI(); + } + + return $ret; + } + /** * Returns a boolean value based on a literal value from the vocabularies.ttl configuration. * @param string $property the property to query @@ -308,12 +323,12 @@ public function getShowLangCodes() */ public function getIndexClasses() { - $resources = $this->resource->allResources("skosmos:indexShowClass"); - $ret = array(); - foreach ($resources as $res) { - $ret[] = $res->getURI(); - } - return $ret; + return $this->getResources("skosmos:indexShowClass"); + } + + public function getExtProperties() + { + return $this->getResources("skosmos:externalProperty"); } /** From 3a105ad1c68315648205a24604bf1006874fc2e3 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Tue, 16 Jan 2018 13:25:56 +0200 Subject: [PATCH 031/173] cleaned code and added phpdoc --- model/Concept.php | 45 +++++++++++++++++++++++--------------- model/PluginRegister.php | 5 +++-- model/VocabularyConfig.php | 5 +++++ 3 files changed, 35 insertions(+), 20 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index b8a43be73..a00a9efc1 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -267,42 +267,54 @@ public function getFoundByType() return $this->foundbytype; } - public function processExternalResource($response) + /** + * Processes a single external resource i.e., adds the properties from + * 1) $this->$DEFAULT_EXT_PROPERTIES + * 2) VocabConfig external properties + * 3) Possible plugin defined external properties + * to $this->graph + * @param EasyRdf\Resource $res + */ + public function processExternalResource($res) { - $exGraph = $response->getGraph(); - //d($exGraph->reversePropertyUris($response)); - // catch external subjects that have $response as object - $extSubjects = $exGraph->resourcesMatching("http://schema.org/about", $response); + $exGraph = $res->getGraph(); + // catch external subjects that have $res as object + $extSubjects = $exGraph->resourcesMatching("http://schema.org/about", $res); - $search_for_properties = array_unique(array_merge( + $propList = array_unique(array_merge( $this->DEFAULT_EXT_PROPERTIES, $this->getVocab()->getConfig()->getExtProperties(), $this->getVocab()->getConfig()->getPlugins()->getExtProperties() )); - $this->addExternalTriplesToGraph($response, $search_for_properties, False); + $this->addExternalTriplesToGraph($res, $propList); foreach ($extSubjects as $extSubject) { - $this->addExternalTriplesToGraph($extSubject, $search_for_properties, True); + $this->addExternalTriplesToGraph($extSubject, $propList); } } - public function addExternalTriplesToGraph($resource, $properties, $inverse=False) + /** + * Adds resource properties to $this->graph + * @param EasyRdf\Resource $res + * @param string[] $props Property URIs + */ + public function addExternalTriplesToGraph($res, $props) { - foreach ($properties as $prop) { - if ($resource->hasProperty($prop)) { + foreach ($props as $prop) { + if ($res->hasProperty($prop)) { - $resList = $resource->allResources('<' . $prop . '>'); + $resList = $res->allResources('<' . $prop . '>'); foreach ($resList as $res) { - $this->graph->addResource($resource, $prop, $res); + $this->graph->addResource($res, $prop, $res); } - $litList = $resource->allLiterals('<' . $prop . '>'); + $litList = $res->allLiterals('<' . $prop . '>'); foreach ($litList as $lit) { - $this->graph->addLiteral($resource, $prop, $lit); + $this->graph->addLiteral($res, $prop, $lit); } } } @@ -348,9 +360,6 @@ public function getMappingProperties() if ($response) { $ret[$prop]->addValue(new ConceptMappingPropertyValue($this->model, $this->vocab, $response, $prop), $this->clang); - //@TODO - - Kint::$max_depth = 4; $this->processExternalResource($response); diff --git a/model/PluginRegister.php b/model/PluginRegister.php index 89bdada72..e54a915cd 100644 --- a/model/PluginRegister.php +++ b/model/PluginRegister.php @@ -148,7 +148,8 @@ public function getCallbacks() { /** * Returns an array that is flattened from its possibly multidimensional form * copied from https://stackoverflow.com/a/1320156 - * @return array + * @param mixed[] $array Flattens this input array + * @return array Flattened input */ protected function flatten($array) { $return = array(); @@ -158,7 +159,7 @@ protected function flatten($array) { /** * Returns a flattened array containing the external properties we are interested in saving - * @return array + * @return string[] */ public function getExtProperties() { return array_unique($this->flatten($this->filterPlugins('ext-properties', true))); diff --git a/model/VocabularyConfig.php b/model/VocabularyConfig.php index 21b5888d2..09dd0d8fc 100644 --- a/model/VocabularyConfig.php +++ b/model/VocabularyConfig.php @@ -38,6 +38,7 @@ private function getBoolean($property, $default = false) /** * Returns an array of URIs based on a property from the vocabularies.ttl configuration. * @param string $property the property to query + * @return string[] List of URIs */ private function getResources($property) { @@ -326,6 +327,10 @@ public function getIndexClasses() return $this->getResources("skosmos:indexShowClass"); } + /** + * Returns skosmos:externalProperty values set in the vocabularies.ttl config. + * @return array array of external property URIs (can be empty) + */ public function getExtProperties() { return $this->getResources("skosmos:externalProperty"); From 6cfa51f7b8b22927a575ecc15f16546355a3600e Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Thu, 18 Jan 2018 12:46:04 +0200 Subject: [PATCH 032/173] Implements CBD solution for blank nodes and adds reification nodes --- model/Concept.php | 78 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 65 insertions(+), 13 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 3403df8c2..e02cdf429 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -275,7 +275,7 @@ public function getFoundByType() * to $this->graph * @param EasyRdf\Resource $res */ - public function processExternalResource($res) + private function processExternalResource($res) { $exGraph = $res->getGraph(); // catch external subjects that have $res as object @@ -287,10 +287,11 @@ public function processExternalResource($res) $this->getVocab()->getConfig()->getPlugins()->getExtProperties() )); - $this->addExternalTriplesToGraph($res, $propList); + $seen = array(); + $this->addExternalTriplesToGraph($res, $seen, $propList); foreach ($extSubjects as $extSubject) { - $this->addExternalTriplesToGraph($extSubject, $propList); + $this->addExternalTriplesToGraph($extSubject, $seen, $propList); } } @@ -298,23 +299,74 @@ public function processExternalResource($res) /** * Adds resource properties to $this->graph * @param EasyRdf\Resource $res - * @param string[] $props Property URIs + * @param string[] $seen Processed resources so far + * @param string[] $props (optional) limit to these property URIs */ - public function addExternalTriplesToGraph($res, $props) + private function addExternalTriplesToGraph($res, &$seen, $props=null) { - foreach ($props as $prop) { - if ($res->hasProperty($prop)) { + if (array_key_exists($res->getUri(), $seen)) { + return; + } - $resList = $res->allResources('<' . $prop . '>'); + $seen[$res->getUri()] = True; - foreach ($resList as $res) { - $this->graph->addResource($res, $prop, $res); + if ($res->isBNode() || is_null($props)) { + foreach ($res->propertyUris() as $prop) { + $this->addPropertyValues($res, $prop, $seen); + } + } + else { + foreach ($props as $prop) { + if ($res->hasProperty($prop)) { + $this->addPropertyValues($res, $prop, $seen); } + } + } + } + + /** + * Adds values of a single single property of a resource to $this->graph + * implements Concise Bounded Description definition + * @param EasyRdf\Resource $res + * @param string $prop + * @param string[] $seen Processed resources so far + */ + private function addPropertyValues($res, $prop, &$seen) { + + $resList = $res->allResources('<' . $prop . '>'); + + foreach ($resList as $res2) { + if ($res2->isBNode()) { + $this->addExternalTriplesToGraph($res2, $seen); + } + $this->graph->addResource($res, $prop, $res2); + + $pos_reifs = $res->getGraph()->resourcesMatching("http://www.w3.org/1999/02/22-rdf-syntax#object", $res2); + foreach ($pos_reifs as $pos_reif) { + if ($pos_reif->isA("http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement") && + $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#predicate", $prop) && + $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#subject", $res)) { + $this->addExternalTriplesToGraph($pos_reif, $seen); + } + } + } + + $litList = $res->allLiterals('<' . $prop . '>'); + + foreach ($litList as $lit) { + $datatypeRes = $res->getGraph()->resource($lit->getDatatypeUri()); + if ($datatypeRes->isBNode()) { + $this->addExternalTriplesToGraph($datatypeRes, $seen); + } - $litList = $res->allLiterals('<' . $prop . '>'); + $this->graph->addLiteral($res, $prop, $lit); - foreach ($litList as $lit) { - $this->graph->addLiteral($res, $prop, $lit); + $pos_reifs = $res->getGraph()->resourcesMatching("http://www.w3.org/1999/02/22-rdf-syntax#object", $lit); + foreach ($pos_reifs as $pos_reif) { + if ($pos_reif->isA("http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement") && + $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#predicate", $prop) && + $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#subject", $res)) { + $this->addExternalTriplesToGraph($pos_reif, $seen); } } } From 7bb88dd879d644c6db12db7c202cee038a4f6581 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Thu, 18 Jan 2018 13:01:37 +0200 Subject: [PATCH 033/173] refactored duplicate code --- model/Concept.php | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index e02cdf429..2e94197d3 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -331,8 +331,8 @@ private function addExternalTriplesToGraph($res, &$seen, $props=null) * @param string $prop * @param string[] $seen Processed resources so far */ - private function addPropertyValues($res, $prop, &$seen) { - + private function addPropertyValues($res, $prop, &$seen) + { $resList = $res->allResources('<' . $prop . '>'); foreach ($resList as $res2) { @@ -340,15 +340,7 @@ private function addPropertyValues($res, $prop, &$seen) { $this->addExternalTriplesToGraph($res2, $seen); } $this->graph->addResource($res, $prop, $res2); - - $pos_reifs = $res->getGraph()->resourcesMatching("http://www.w3.org/1999/02/22-rdf-syntax#object", $res2); - foreach ($pos_reifs as $pos_reif) { - if ($pos_reif->isA("http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement") && - $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#predicate", $prop) && - $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#subject", $res)) { - $this->addExternalTriplesToGraph($pos_reif, $seen); - } - } + $this->addReifications($res, $prop, $res2, $seen); } $litList = $res->allLiterals('<' . $prop . '>'); @@ -360,14 +352,25 @@ private function addPropertyValues($res, $prop, &$seen) { } $this->graph->addLiteral($res, $prop, $lit); + $this->addReifications($res, $prop, $lit, $seen); + } + } - $pos_reifs = $res->getGraph()->resourcesMatching("http://www.w3.org/1999/02/22-rdf-syntax#object", $lit); - foreach ($pos_reifs as $pos_reif) { - if ($pos_reif->isA("http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement") && - $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#predicate", $prop) && - $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#subject", $res)) { - $this->addExternalTriplesToGraph($pos_reif, $seen); - } + /** + * Adds reifications of a triple to $this->graph + * @param EasyRdf\Resource $sub + * @param string $pred + * @param EasyRdf\Resource|EasyRdf\Literal $obj + * @param string[] $seen Processed resources so far + */ + private function addReifications($sub, $pred, $obj, &$seen) + { + $pos_reifs = $res->getGraph()->resourcesMatching("http://www.w3.org/1999/02/22-rdf-syntax#object", $obj); + foreach ($pos_reifs as $pos_reif) { + if ($pos_reif->isA("http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement") && + $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#predicate", $pred) && + $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#subject", $sub)) { + $this->addExternalTriplesToGraph($pos_reif, $seen); } } } From 31b75493591aa96f314f2271739fd573a822a1b0 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 19 Jan 2018 16:40:49 +0200 Subject: [PATCH 034/173] adding a configurable property that enables defining a priority for label fallback languages, related to #688 --- model/Concept.php | 23 +++++++++++++++-------- model/VocabularyConfig.php | 17 +++++++++++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index ed6525147..569cd5742 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -113,13 +113,8 @@ public function getLabel() if ($this->resource->label($lang) !== null) { return $this->resource->label($lang); } - - // 2. label in the vocabulary default language - if ($this->resource->label($this->vocab->getConfig()->getDefaultLanguage()) !== null) { - return $this->resource->label($this->vocab->getConfig()->getDefaultLanguage()); - } - - // 3. label in a subtag of the current language + + // 2. label in a subtag of the current language // We need to check all the labels in case one of them matches a subtag of the current language foreach($this->resource->allLiterals('skos:prefLabel') as $label) { // the label lang code is a subtag of the UI lang eg. en-GB - create a new literal with the main language @@ -128,7 +123,19 @@ public function getLabel() } } - // 4. label in any language, including literal with empty language tag + // 3. label in the vocabulary default language + foreach ($this->vocab->getConfig()->getFallbackLanguages() as $fallback) { + if ($this->resource->label($fallback) !== null) { + return $this->resource->label($fallback); + } + } + + // 4. label in the vocabulary default language + if ($this->resource->label($this->vocab->getConfig()->getDefaultLanguage()) !== null) { + return $this->resource->label($this->vocab->getConfig()->getDefaultLanguage()); + } + + // 5. label in any language, including literal with empty language tag $label = $this->resource->label(); if ($label !== null) { return $label->getLang() ? $label->getValue() . " (" . $label->getLang() . ")" : $label->getValue(); diff --git a/model/VocabularyConfig.php b/model/VocabularyConfig.php index 10b0e34cd..2c5dcc3ed 100644 --- a/model/VocabularyConfig.php +++ b/model/VocabularyConfig.php @@ -448,4 +448,21 @@ public function getTypes($lang = null) } return $ret; } + + /** + * Returns an array of fallback languages that is ordered by priority and + * defined in the vocabulary configuration as a collection. + * @return array of language code strings + */ + public function getFallbackLanguages() + { + $ret = array(); + foreach ($this->resource->get('skosmos:fallbackLanguages') as $lang) { + $ret[] .= $lang; + } + if (empty($ret)) { // using the vocabulary default language as a fallback. + $ret[] = $this->getDefaultLanguage(); + } + return $ret; + } } From 4264c48f7c312456b8caa97ff8aec8c4daca5750 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Mon, 22 Jan 2018 10:41:46 +0200 Subject: [PATCH 035/173] improving the fallback language order feature, related to #688 --- model/Concept.php | 37 +++++++++++++------------------------ model/VocabularyConfig.php | 18 ++++++++++++------ 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 569cd5742..06cb5e91c 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -108,37 +108,26 @@ public function getDeprecated() */ public function getLabel() { - $lang = $this->clang; - // 1. label in current language - if ($this->resource->label($lang) !== null) { - return $this->resource->label($lang); - } - - // 2. label in a subtag of the current language - // We need to check all the labels in case one of them matches a subtag of the current language - foreach($this->resource->allLiterals('skos:prefLabel') as $label) { - // the label lang code is a subtag of the UI lang eg. en-GB - create a new literal with the main language - if ($label !== null && strpos($label->getLang(), $lang . '-') === 0) { - return EasyRdf\Literal::create($label, $lang); - } - } - - // 3. label in the vocabulary default language - foreach ($this->vocab->getConfig()->getFallbackLanguages() as $fallback) { + foreach ($this->vocab->getConfig()->getLanguageOrder($this->clang) as $fallback) { if ($this->resource->label($fallback) !== null) { return $this->resource->label($fallback); } + // We need to check all the labels in case one of them matches a subtag of the current language + foreach($this->resource->allLiterals('skos:prefLabel') as $label) { + // the label lang code is a subtag of the UI lang eg. en-GB - create a new literal with the main language + if ($label !== null && strpos($label->getLang(), $fallback . '-') === 0) { + return EasyRdf\Literal::create($label, $fallback); + } + } } - // 4. label in the vocabulary default language - if ($this->resource->label($this->vocab->getConfig()->getDefaultLanguage()) !== null) { - return $this->resource->label($this->vocab->getConfig()->getDefaultLanguage()); - } - - // 5. label in any language, including literal with empty language tag + // Last resort: label in any language, including literal with empty language tag $label = $this->resource->label(); if ($label !== null) { - return $label->getLang() ? $label->getValue() . " (" . $label->getLang() . ")" : $label->getValue(); + if (!$label->getLang()) { + $label->getValue(); + } + return $label->getValue() . " (" . $label->getLang() . ")"; } // empty diff --git a/model/VocabularyConfig.php b/model/VocabularyConfig.php index 2c5dcc3ed..4f6ad6023 100644 --- a/model/VocabularyConfig.php +++ b/model/VocabularyConfig.php @@ -452,16 +452,22 @@ public function getTypes($lang = null) /** * Returns an array of fallback languages that is ordered by priority and * defined in the vocabulary configuration as a collection. + * Additionally, the chosen content language is inserted with the highest priority + * and the vocab default language is inserted with the lowest priority. + * @param string $clang * @return array of language code strings */ - public function getFallbackLanguages() + public function getLanguageOrder($clang) { - $ret = array(); - foreach ($this->resource->get('skosmos:fallbackLanguages') as $lang) { - $ret[] .= $lang; + $ret = array($clang); + $fallbacks = !empty($this->resource->get('skosmos:fallbackLanguages')) ? $this->resource->get('skosmos:fallbackLanguages') : array(); + foreach ($fallbacks as $lang) { + if (!in_array($lang, $ret)) { + $ret[] = (string)$lang; // Literal to string conversion + } } - if (empty($ret)) { // using the vocabulary default language as a fallback. - $ret[] = $this->getDefaultLanguage(); + if (!in_array($this->getDefaultLanguage(), $ret)) { + $ret[] = (string)$this->getDefaultLanguage(); } return $ret; } From 548ef9e212b3011c8acfd92fca4e7ebfebfa3b01 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Mon, 22 Jan 2018 11:52:17 +0200 Subject: [PATCH 036/173] fixing the missing prefLabel language tag when showing a fallback label, related to #688 --- view/concept-shared.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/concept-shared.twig b/view/concept-shared.twig index 29b11bc39..5e123dca1 100644 --- a/view/concept-shared.twig +++ b/view/concept-shared.twig @@ -49,7 +49,7 @@
{% else %}
{% if concept.notation %}{{ concept.notation }}{% endif %} - {% if concept.hasXlLabel %}
{% for key, val in concept.xlLabel.properties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{{ concept.xlLabel }}{% else %}{{ concept.label }}{% endif %} + {% if concept.hasXlLabel %}
{% for key, val in concept.xlLabel.properties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{{ concept.xlLabel }}{% else %}{{ concept.label }}{% if concept.label.lang != request.contentLang %} ({{ concept.label.lang }}){% endif %}{% endif %}
{% endif %}
From 902e9be32539fdb2e8baad32a3ce2745365ef1b7 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Mon, 22 Jan 2018 12:17:05 +0200 Subject: [PATCH 037/173] adding a few tests for getLanguageOrder(), related to #688 --- tests/VocabularyConfigTest.php | 17 +++++++++++++++++ tests/testvocabularies.ttl | 1 + 2 files changed, 18 insertions(+) diff --git a/tests/VocabularyConfigTest.php b/tests/VocabularyConfigTest.php index ca7b88f9a..0e00b91b4 100644 --- a/tests/VocabularyConfigTest.php +++ b/tests/VocabularyConfigTest.php @@ -362,4 +362,21 @@ public function testGetTypesWhenNotSet() { $vocab = $this->model->getVocabulary('testdiff'); $this->assertEquals(array(), $vocab->getConfig()->getTypes('en')); } + + /** + * @covers VocabularyConfig::getLanguageOrder + */ + public function testGetLanguageOrderNotSet() { + $vocab = $this->model->getVocabulary('test'); + $this->assertEquals(array('en'), $vocab->getConfig()->getLanguageOrder('en')); + } + + /** + * @covers VocabularyConfig::getLanguageOrder + */ + public function testGetLanguageOrder() { + $vocab = $this->model->getVocabulary('subtag'); + $this->assertEquals(array('en', 'fr', 'de', 'sv'), $vocab->getConfig()->getLanguageOrder('en')); + $this->assertEquals(array('fi', 'fr', 'de', 'sv', 'en'), $vocab->getConfig()->getLanguageOrder('fi')); + } } diff --git a/tests/testvocabularies.ttl b/tests/testvocabularies.ttl index 5e824a2ea..dee85b9f7 100644 --- a/tests/testvocabularies.ttl +++ b/tests/testvocabularies.ttl @@ -179,6 +179,7 @@ void:uriSpace "http://www.skosmos.skos/subtag/"; void:sparqlEndpoint ; skosmos:language "en"; + skosmos:fallbackLanguages ( "fr" "de" "sv" ) ; skosmos:sparqlGraph ; skosmos:sparqlDialect "JenaText" . From aacc68ca31accfb594fcab9dbf24366a0e334b93 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Mon, 22 Jan 2018 14:40:37 +0200 Subject: [PATCH 038/173] using the configurable fallback languages for the concept property value labels as well, related to #688 --- model/Concept.php | 2 +- model/ConceptPropertyValue.php | 17 +++++++++++++++++ view/concept-shared.twig | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 06cb5e91c..88da9619b 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -125,7 +125,7 @@ public function getLabel() $label = $this->resource->label(); if ($label !== null) { if (!$label->getLang()) { - $label->getValue(); + return $label->getValue(); } return $label->getValue() . " (" . $label->getLang() . ")"; } diff --git a/model/ConceptPropertyValue.php b/model/ConceptPropertyValue.php index 5e1e3604c..fa529e312 100644 --- a/model/ConceptPropertyValue.php +++ b/model/ConceptPropertyValue.php @@ -40,6 +40,22 @@ public function getLabel($lang = '') if ($this->clang) { $lang = $this->clang; } + if ($this->vocab->getConfig()->getLanguageOrder($lang)) { + foreach ($this->vocab->getConfig()->getLanguageOrder($lang) as $fallback) { + if ($this->resource->label($fallback) !== null) { + return $this->resource->label($fallback); + } + // We need to check all the labels in case one of them matches a subtag of the current language + if ($this->resource->allLiterals('skos:prefLabel')) { + foreach($this->resource->allLiterals('skos:prefLabel') as $label) { + // the label lang code is a subtag of the UI lang eg. en-GB - create a new literal with the main language + if ($label !== null && strpos($label->getLang(), $fallback . '-') === 0) { + return EasyRdf\Literal::create($label, $fallback); + } + } + } + } + } if ($this->resource->label($lang) !== null) { // current language return $this->resource->label($lang); @@ -52,6 +68,7 @@ public function getLabel($lang = '') } elseif ($this->resource->getLiteral('rdf:value') !== null) { // any language return $this->resource->getLiteral('rdf:value'); } + // uri if no label is found $label = $this->resource->shorten() ? $this->resource->shorten() : $this->getUri(); return $label; } diff --git a/view/concept-shared.twig b/view/concept-shared.twig index 5e123dca1..a48556e88 100644 --- a/view/concept-shared.twig +++ b/view/concept-shared.twig @@ -86,7 +86,7 @@
{% if propval.notation %}{{ propval.notation }} {% endif %} {{ propval.label(request.contentLang) }} {% endif %} {% endif %} - {% if propval.lang and (propval.lang != request.lang or explicit_langcodes) %} ({{ propval.label.lang }}){% endif %} + {% if propval.label.lang and (propval.label.lang != request.lang or explicit_langcodes) %} ({{ propval.label(request.contentLang).lang }}){% endif %} {% if propval.SubMembers %}
{# if property is a group concept that has sub properties #} {% for sub_member in propval.SubMembers %} {{ sub_member.label(request.contentLang) }} From f0613eadb6d157364dae9341ffdba75733e3d438 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Mon, 22 Jan 2018 15:59:26 +0200 Subject: [PATCH 039/173] using the skosmos:feedbackLanguages for the rest api hierarchy fallback, related to #688 --- model/Concept.php | 2 +- model/Vocabulary.php | 2 +- view/concept-shared.twig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 88da9619b..9bbc6a6a2 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -127,7 +127,7 @@ public function getLabel() if (!$label->getLang()) { return $label->getValue(); } - return $label->getValue() . " (" . $label->getLang() . ")"; + return EasyRdf\Literal::create($label->getValue(), $label->getLang()); } // empty diff --git a/model/Vocabulary.php b/model/Vocabulary.php index d9a055a47..8b0bc50d4 100644 --- a/model/Vocabulary.php +++ b/model/Vocabulary.php @@ -302,7 +302,7 @@ public function getLabelStatistics() public function getConceptHierarchy($uri, $lang) { $lang = $lang ? $lang : $this->getEnvLang(); - $fallback = $this->config->getDefaultLanguage(); + $fallback = count($this->config->getLanguageOrder()) > 1 ? $this->config->getLanguageOrder()[1] : $this->config->getDefaultLanguage(); $props = $this->config->getHierarchyProperty(); return $this->getSparql()->queryParentList($uri, $lang, $fallback, $props); } diff --git a/view/concept-shared.twig b/view/concept-shared.twig index a48556e88..bae3b37ae 100644 --- a/view/concept-shared.twig +++ b/view/concept-shared.twig @@ -49,7 +49,7 @@
{% else %}
{% if concept.notation %}{{ concept.notation }}{% endif %} - {% if concept.hasXlLabel %}
{% for key, val in concept.xlLabel.properties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{{ concept.xlLabel }}{% else %}{{ concept.label }}{% if concept.label.lang != request.contentLang %} ({{ concept.label.lang }}){% endif %}{% endif %} + {% if concept.hasXlLabel %}
{% for key, val in concept.xlLabel.properties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{{ concept.xlLabel }}{% else %}{{ concept.label }}{% if concept.label.lang != request.contentLang and concept.label.lang != '' %} ({{ concept.label.lang }}){% endif %}{% endif %}
{% endif %}
From 858968c39046da5815134a9f4205b044dc076a19 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Mon, 22 Jan 2018 16:19:17 +0200 Subject: [PATCH 040/173] fixing missing lang parameter from a getLanguageOrder-call, related to #688 --- model/Vocabulary.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/Vocabulary.php b/model/Vocabulary.php index 8b0bc50d4..94b250993 100644 --- a/model/Vocabulary.php +++ b/model/Vocabulary.php @@ -302,7 +302,7 @@ public function getLabelStatistics() public function getConceptHierarchy($uri, $lang) { $lang = $lang ? $lang : $this->getEnvLang(); - $fallback = count($this->config->getLanguageOrder()) > 1 ? $this->config->getLanguageOrder()[1] : $this->config->getDefaultLanguage(); + $fallback = count($this->config->getLanguageOrder($lang)) > 1 ? $this->config->getLanguageOrder($lang)[1] : $this->config->getDefaultLanguage(); $props = $this->config->getHierarchyProperty(); return $this->getSparql()->queryParentList($uri, $lang, $fallback, $props); } From 6eab8899d90c1e697fb6fb673eb9464879a116fc Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Tue, 23 Jan 2018 10:01:51 +0200 Subject: [PATCH 041/173] code style cleanup: removing trailing whitespaces --- controller/Controller.php | 2 +- controller/EntityController.php | 4 +- controller/Honeypot.php | 2 +- controller/RestController.php | 44 ++++++------ controller/WebController.php | 6 +- entity.php | 4 +- model/Cache.php | 6 +- model/Concept.php | 24 +++---- model/ConceptProperty.php | 2 +- model/ConceptPropertyValue.php | 2 +- model/ConceptSearchParameters.php | 48 ++++++------- model/DataObject.php | 4 +- model/GlobalConfig.php | 86 +++++++++++------------ model/LabelSkosXL.php | 4 +- model/Model.php | 18 ++--- model/PluginRegister.php | 22 +++--- model/Request.php | 2 +- model/SkosmosTurtleParser.php | 2 +- model/Vocabulary.php | 10 +-- model/VocabularyConfig.php | 22 +++--- tests/BreadcrumbTest.php | 4 +- tests/ConceptMappingPropertyValueTest.php | 14 ++-- tests/ConceptPropertyTest.php | 4 +- tests/ConceptPropertyValueLiteralTest.php | 6 +- tests/ConceptPropertyValueTest.php | 16 ++--- tests/ConceptSearchParametersTest.php | 40 +++++------ tests/ConceptTest.php | 52 +++++++------- tests/DataObjectTest.php | 4 +- tests/GenericSparqlTest.php | 78 ++++++++++---------- tests/GlobalConfigTest.php | 4 +- tests/JenaTextSparqlTest.php | 20 +++--- tests/ModelTest.php | 58 +++++++-------- tests/PluginRegisterTest.php | 18 ++--- tests/RequestTest.php | 34 ++++----- tests/VocabularyCategoryTest.php | 14 ++-- tests/VocabularyConfigTest.php | 60 ++++++++-------- tests/VocabularyDataObjectTest.php | 4 +- tests/VocabularyTest.php | 68 +++++++++--------- 38 files changed, 405 insertions(+), 407 deletions(-) diff --git a/controller/Controller.php b/controller/Controller.php index 03ae006a7..b4087505b 100644 --- a/controller/Controller.php +++ b/controller/Controller.php @@ -73,7 +73,7 @@ protected function negotiateFormat($choices, $accept, $format) } return $format; } - + // if there was no proposed format, negotiate a suitable format header('Vary: Accept'); // inform caches that a decision was made based on Accept header $best = $this->negotiator->getBest($accept, $choices); diff --git a/controller/EntityController.php b/controller/EntityController.php index afba507f8..3ccd38f70 100644 --- a/controller/EntityController.php +++ b/controller/EntityController.php @@ -19,7 +19,7 @@ private function redirectREST($vocab, $uri, $targetFormat) $url = $baseurl . "rest/v1/$vocid/data?$query"; $this->redirect303($url); } - + private function redirectWeb($vocab, $uri) { $baseurl = $this->getBaseHref(); @@ -65,7 +65,7 @@ public function redirect($request) { $requestedFormat = $request->getQueryParam('format'); $targetFormat = $this->negotiateFormat($supportedFormats, $request->getServerConstant('HTTP_ACCEPT'), $requestedFormat); - + if (in_array($targetFormat, $restFormats)) { $this->redirectREST($request->getVocab(), $request->getUri(), $targetFormat); } else { diff --git a/controller/Honeypot.php b/controller/Honeypot.php index 052363fe6..509e66d2c 100644 --- a/controller/Honeypot.php +++ b/controller/Honeypot.php @@ -63,7 +63,7 @@ public function validateHoneytime($value, $parameters) if ($this->disabled) { return true; } - + // Get the decrypted time $value = $this->decryptTime($value); // The current time should be greater than the time the form was built + the speed option diff --git a/controller/RestController.php b/controller/RestController.php index 825d55054..dc86ce441 100644 --- a/controller/RestController.php +++ b/controller/RestController.php @@ -28,7 +28,7 @@ private function returnJson($data) echo filter_input(INPUT_GET, 'callback', FILTER_UNSAFE_RAW) . "(" . json_encode($data) . ");"; return; } - + // otherwise negotiate suitable format for the response and return that $negotiator = new \Negotiation\Negotiator(); $priorities = array('application/json', 'application/ld+json'); @@ -96,11 +96,11 @@ public function vocabularies($request) return $this->returnJson($ret); } - + private function constructSearchParameters($request) { $parameters = new ConceptSearchParameters($request, $this->model->getConfig(), true); - + $vocabs = $request->getQueryParam('vocab'); # optional // convert to vocids array to support multi-vocabulary search $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : array(); @@ -109,7 +109,7 @@ private function constructSearchParameters($request) $vocabObjects[] = $this->model->getVocabulary($vocid); } $parameters->setVocabularies($vocabObjects); - return $parameters; + return $parameters; } private function transformSearchResults($request, $results) @@ -136,7 +136,7 @@ private function transformSearchResults($request, $results) 'uri' => '', 'results' => $results, ); - + if (isset($results[0]['prefLabels'])) { $ret['@context']['prefLabels'] = array('@id' => 'skos:prefLabel', '@container' => '@language'); } @@ -220,7 +220,7 @@ public function vocabularyInformation($request) 'languages' => array_values($vocab->getConfig()->getLanguages()), 'conceptschemes' => $conceptschemes, ); - + if ($vocab->getConfig()->getTypes($request->getLang())) { $ret['type'] = $vocab->getConfig()->getTypes($request->getLang()); } @@ -235,8 +235,8 @@ public function vocabularyInformation($request) public function vocabularyStatistics($request) { $this->setLanguageProperties($request->getLang()); - $arrayClass = $request->getVocab()->getConfig()->getArrayClassURI(); - $groupClass = $request->getVocab()->getConfig()->getGroupClassURI(); + $arrayClass = $request->getVocab()->getConfig()->getArrayClassURI(); + $groupClass = $request->getVocab()->getConfig()->getGroupClassURI(); $vocabStats = $request->getVocab()->getStatistics($request->getQueryParam('lang'), $arrayClass, $groupClass); $types = array('http://www.w3.org/2004/02/skos/core#Concept', 'http://www.w3.org/2004/02/skos/core#Collection', $arrayClass, $groupClass); $subTypes = array(); @@ -361,7 +361,7 @@ public function types($request) return $this->returnError(400, "Bad Request", "lang parameter missing"); } $this->setLanguageProperties($request->getLang()); - + $queriedtypes = $this->model->getTypes($vocid, $request->getLang()); $types = array(); @@ -390,7 +390,7 @@ public function types($request) return $this->returnJson($ret); } - + private function findLookupHits($results, $label, $lang) { $hits = array(); @@ -409,7 +409,7 @@ private function findLookupHits($results, $label, $lang) } } if (sizeof($hits) > 0) return $hits; - + if ($lang === null) { // case 1A: exact match on preferred label in any language foreach ($results as $res) { @@ -420,7 +420,7 @@ private function findLookupHits($results, $label, $lang) } } if (sizeof($hits) > 0) return $hits; - + // case 2A: case-insensitive match on preferred label in any language foreach ($results as $res) { if (strtolower($res['matchedPrefLabel']) == strtolower($label)) { @@ -449,9 +449,9 @@ private function findLookupHits($results, $label, $lang) } if (sizeof($hits) > 0) return $hits; - return $hits; + return $hits; } - + private function transformLookupResults($lang, $hits) { if (sizeof($hits) == 0) { @@ -473,7 +473,7 @@ private function transformLookupResults($lang, $hits) $ret['@context']['@language'] = $lang; } - return $ret; + return $ret; } /** @@ -537,7 +537,7 @@ private function redirectToVocabData($request) { header("Location: " . $urls[$format]); } - + private function returnDataResults($results, $format) { if ($format == 'application/ld+json' || $format == 'application/json') { // further compact JSON-LD document using a context @@ -627,7 +627,7 @@ public function label($request) return $this->returnJson($ret); } - + private function transformPropertyResults($uri, $lang, $objects, $propname, $propuri) { $results = array(); @@ -640,9 +640,9 @@ private function transformPropertyResults($uri, $lang, $objects, $propname, $pro 'uri' => $uri, $propname => $results) ); - return $ret; + return $ret; } - + private function transformTransitivePropertyResults($uri, $lang, $objects, $tpropname, $tpropuri, $dpropname, $dpropuri) { $results = array(); @@ -734,12 +734,12 @@ public function hierarchy($request) if (empty($results)) { return $this->returnError('404', 'Not Found', "Could not find concept <{$request->getUri()}>"); } - - + + // set the "top" key from the "tops" key foreach ($results as $value) { $uri = $value['uri']; - if (isset($value['tops'])) { + if (isset($value['tops'])) { if ($request->getVocab()->getConfig()->getMainConceptSchemeURI() != null) { foreach ($results[$uri]['tops'] as $top) { // if a value in 'tops' matches the main concept scheme of the vocabulary, take it diff --git a/controller/WebController.php b/controller/WebController.php index c2f9635eb..4a93c1d22 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -159,7 +159,7 @@ public function guessLanguage($vocid = null) } /** - * Determines a css class that controls width and positioning of the vocabulary list element. + * Determines a css class that controls width and positioning of the vocabulary list element. * The layout is wider if the left/right box templates have not been provided. * @return string css class for the container eg. 'voclist-wide' or 'voclist-right' */ @@ -189,7 +189,7 @@ public function invokeVocabularies($request) $categoryLabel = $this->model->getClassificationLabel($request->getLang()); $sortedVocabs = $this->model->getVocabularyList(false, true); $langList = $this->model->getLanguages($request->getLang()); - $listStyle = $this->listStyle(); + $listStyle = $this->listStyle(); // render template echo $template->render( @@ -221,7 +221,7 @@ public function invokeVocabularyConcept($request) return; } $template = (in_array('skos:Concept', $results[0]->getType()) || in_array('skos:ConceptScheme', $results[0]->getType())) ? $this->twig->loadTemplate('concept-info.twig') : $this->twig->loadTemplate('group-contents.twig'); - + $crumbs = $vocab->getBreadCrumbs($request->getContentLang(), $uri); echo $template->render(array( 'search_results' => $results, diff --git a/entity.php b/entity.php index 79e37840d..3533b304b 100644 --- a/entity.php +++ b/entity.php @@ -12,8 +12,8 @@ $model = new Model($config); $controller = new EntityController($model); $request = new Request($model); - - + + $controller->redirect($request); } catch (Exception $e) { diff --git a/model/Cache.php b/model/Cache.php index 1a2fa3fc1..7e5598cf0 100644 --- a/model/Cache.php +++ b/model/Cache.php @@ -3,7 +3,7 @@ /** * Wrapper class for key-value caching. Currently supports APC and APCu. */ -class Cache +class Cache { /** @@ -25,12 +25,12 @@ public function fetch($key) { public function store($key, $value, $ttl=3600) { if (function_exists('apc_store')) { return apc_store($key, $value); - } + } else if (function_exists('apcu_store')) { return apcu_store($key, $value, $ttl); } } - + public function isAvailable() { return ((function_exists('apc_store') && function_exists('apc_fetch')) || (function_exists('apcu_store') && function_exists('apcu_fetch'))); } diff --git a/model/Concept.php b/model/Concept.php index 9bbc6a6a2..b7f457508 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -128,7 +128,7 @@ public function getLabel() return $label->getValue(); } return EasyRdf\Literal::create($label->getValue(), $label->getLang()); - } + // empty return ""; @@ -336,7 +336,7 @@ public function getProperties() $properties['skos:narrower'] = $membersArray; } } - + foreach ($longUris as &$prop) { // storing full URI without brackets in a separate variable $longUri = $prop; @@ -348,32 +348,32 @@ public function getProperties() } // EasyRdf requires full URIs to be in angle brackets - if (!in_array($prop, $this->DELETED_PROPERTIES) || ($this->isGroup() === false && $prop === 'skos:member')) { - // retrieve property label and super properties from the current vocabulary first + if (!in_array($prop, $this->DELETED_PROPERTIES) || ($this->isGroup() === false && $prop === 'skos:member')) { + // retrieve property label and super properties from the current vocabulary first $propres = new EasyRdf\Resource($prop, $this->graph); $proplabel = $propres->label($this->getEnvLang()) ? $propres->label($this->getEnvLang()) : $propres->label(); - + // if not found in current vocabulary, look up in the default graph to be able // to read an ontology loaded in a separate graph // note that this imply that the property has an rdf:type declared for the query to work if(!$proplabel) { $envLangLabels = $this->model->getDefaultSparql()->queryLabel($longUri, $this->getEnvLang()); $proplabel = ($envLangLabels)?$envLangLabels[$this->getEnvLang()]:$this->model->getDefaultSparql()->queryLabel($longUri, '')['']; - } - + } + // look for superproperties in the current graph $superprops = array(); foreach ($this->graph->allResources($prop, 'rdfs:subPropertyOf') as $subi) { $superprops[] = $subi->getUri(); } - + // also look up superprops in the default graph if not found in current vocabulary if(!$superprops || empty($superprops)) { $superprops = $this->model->getDefaultSparql()->querySuperProperties($longUri); } - + // we're reading only one super property, even if there are multiple ones - $superprop = ($superprops)?$superprops[0]:null; + $superprop = ($superprops)?$superprops[0]:null; if ($superprop) { $superprop = EasyRdf\RdfNamespace::shorten($superprop) ? EasyRdf\RdfNamespace::shorten($superprop) : $superprop; } @@ -521,11 +521,11 @@ public function getDate() $ret = ''; if ($this->resource->get('dc:modified')) { $modified = (string) $this->resource->get('dc:modified'); - $ret = gettext('skosmos:modified') . ' ' . $modified; + $ret = gettext('skosmos:modified') . ' ' . $modified; } if ($this->resource->get('dc:created')) { $created .= (string) $this->resource->get('dc:created'); - $ret .= ' ' . gettext('skosmos:created') . ' ' . $created; + $ret .= ' ' . gettext('skosmos:created') . ' ' . $created; } } return $ret; diff --git a/model/ConceptProperty.php b/model/ConceptProperty.php index 998945266..64355022a 100644 --- a/model/ConceptProperty.php +++ b/model/ConceptProperty.php @@ -100,7 +100,7 @@ public function getType() { return $this->prop; } - + /** * Returns property supertype (?property skos:subPropertyOf ?super) as a string. * @return string eg. 'skos:hiddenLabel'. diff --git a/model/ConceptPropertyValue.php b/model/ConceptPropertyValue.php index fa529e312..d606ddf83 100644 --- a/model/ConceptPropertyValue.php +++ b/model/ConceptPropertyValue.php @@ -133,7 +133,7 @@ public function getNotation() public function isReified() { return (!$this->resource->label() && $this->resource->getLiteral('rdf:value')); } - + public function getReifiedPropertyValues() { $ret = array(); $props = $this->resource->propertyUris(); diff --git a/model/ConceptSearchParameters.php b/model/ConceptSearchParameters.php index 2ea5b8697..635247300 100644 --- a/model/ConceptSearchParameters.php +++ b/model/ConceptSearchParameters.php @@ -13,7 +13,7 @@ class ConceptSearchParameters private $hidden; private $unique; - public function __construct($request, $config, $rest = false) + public function __construct($request, $config, $rest = false) { $this->request = $request; $this->config = $config; @@ -22,15 +22,15 @@ public function __construct($request, $config, $rest = false) $this->unique = $request->getQueryParamBoolean('unique', false); } - public function getLang() + public function getLang() { if ($this->rest && $this->request->getQueryParam('labellang')) { return $this->request->getQueryParam('labellang'); } return $this->request->getLang(); - } + } - public function getVocabs() + public function getVocabs() { if ($this->vocabs) { return $this->vocabs; @@ -39,7 +39,7 @@ public function getVocabs() return array($this->request->getVocab()); } return array(); - } + } public function getVocabIds() { @@ -52,12 +52,12 @@ public function getVocabIds() return $ret; } - public function setVocabularies($vocabs) + public function setVocabularies($vocabs) { $this->vocabs = $vocabs; } - - public function getArrayClass() + + public function getArrayClass() { if (sizeof($this->getVocabs()) == 1) { // search within vocabulary $vocabs = $this->getVocabs(); @@ -65,8 +65,8 @@ public function getArrayClass() } return null; } - - public function getSearchTerm() + + public function getSearchTerm() { $term = $this->request->getQueryParamRaw('q') ? $this->request->getQueryParamRaw('q') : $this->request->getQueryParamRaw('query'); if (!$term && $this->rest) @@ -77,13 +77,13 @@ public function getSearchTerm() } return strpos($term, "*") === false ? $term . "*" : $term; // default to prefix search } - - public function getContentLang() + + public function getContentLang() { return $this->request->getContentLang(); } - - public function getSearchLang() + + public function getSearchLang() { if ($this->rest) { return $this->request->getQueryParam('lang'); @@ -102,7 +102,7 @@ private function getDefaultTypeLimit() return array_filter($type, 'strlen'); } - public function getTypeLimit() + public function getTypeLimit() { $type = $this->request->getQueryParam('type') !== '' ? $this->request->getQueryParam('type') : null; if ($type && strpos($type, ' ')) { @@ -127,22 +127,22 @@ private function getQueryParamArray($name) { return $this->request->getQueryParam($name) ? explode(' ', urldecode($this->request->getQueryParam($name))) : null; } - public function getGroupLimit() + public function getGroupLimit() { return $this->getQueryParam('group'); } - - public function getParentLimit() + + public function getParentLimit() { return $this->getQueryParam('parent'); } - - public function getSchemeLimit() + + public function getSchemeLimit() { return $this->getQueryParamArray('scheme'); } - public function getOffset() + public function getOffset() { return ($this->request->getQueryParam('offset') && is_numeric($this->request->getQueryParam('offset')) && $this->request->getQueryParam('offset') >= 0) ? $this->request->getQueryParam('offset') : 0; } @@ -166,15 +166,15 @@ public function setUnique($unique) { public function getAdditionalFields() { return $this->getQueryParamArray('fields'); } - + public function getHidden() { return $this->hidden; } - + public function setHidden($hidden) { $this->hidden = $hidden; } - + public function getRest() { return $this->rest; } diff --git a/model/DataObject.php b/model/DataObject.php index 121848923..ea7f11946 100644 --- a/model/DataObject.php +++ b/model/DataObject.php @@ -118,11 +118,11 @@ protected function mycompare($a, $b) //if neither in $order, then a simple alphabetic sort... return ($a < $b) ? -1 : 1; } - + /** * Getter function to retrieve the ui language from the locale. */ - public function getEnvLang() + public function getEnvLang() { // get language from locale, same as used by gettext, set by Controller return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index 030e95a48..e2881851a 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -6,7 +6,7 @@ class GlobalConfig { private $languages; - public function __construct($config_name='/../config.inc') + public function __construct($config_name='/../config.inc') { try { $file_path = dirname(__FILE__) . $config_name; @@ -22,7 +22,7 @@ public function __construct($config_name='/../config.inc') return; } } - + private function getConstant($name, $default) { if (defined($name) && constant($name)) { @@ -34,100 +34,100 @@ private function getConstant($name, $default) /** * Returns the UI languages specified in the configuration or defaults to * only show English - * @return array + * @return array */ - public function getLanguages() + public function getLanguages() { if ($this->languages) { return $this->languages; } return array('en' => 'en_GB.utf8'); } - + /** * Returns the vocabulary configuration file specified the configuration * or vocabularies.ttl if not found. * @return string */ - public function getVocabularyConfigFile() + public function getVocabularyConfigFile() { return $this->getConstant('VOCABULARIES_FILE', 'vocabularies.ttl'); } - + /** * Returns the external HTTP request timeout in seconds or the default value * of 5 seconds if not specified in the configuration. * @return integer */ - public function getHttpTimeout() + public function getHttpTimeout() { return $this->getConstant('HTTP_TIMEOUT', 5); } - + /** * Returns the SPARQL HTTP request timeout in seconds or the default value * of 20 seconds if not specified in the configuration. * @return integer */ - public function getSparqlTimeout() + public function getSparqlTimeout() { return $this->getConstant('SPARQL_TIMEOUT', 20); } - + /** * Returns the sparql endpoint address defined in the configuration. If - * not then defaulting to http://localhost:3030/ds/sparql + * not then defaulting to http://localhost:3030/ds/sparql * @return string */ - public function getDefaultEndpoint() + public function getDefaultEndpoint() { return $this->getConstant('DEFAULT_ENDPOINT', 'http://localhost:3030/ds/sparql'); } - + /** * @return string */ - public function getSparqlGraphStore() + public function getSparqlGraphStore() { return $this->getConstant('SPARQL_GRAPH_STORE', null); } - + /** * Returns the maximum number of items to return in transitive queries if defined * in the configuration or the default value of 1000. - * @return integer + * @return integer */ - public function getDefaultTransitiveLimit() + public function getDefaultTransitiveLimit() { return $this->getConstant('DEFAULT_TRANSITIVE_LIMIT', 1000); } - + /** * Returns the maximum number of items to load at a time if defined * in the configuration or the default value of 20. - * @return integer + * @return integer */ - public function getSearchResultsSize() + public function getSearchResultsSize() { return $this->getConstant('SEARCH_RESULTS_SIZE', 20); } - + /** * Returns the configured location for the twig template cache and if not * defined defaults to "/tmp/skosmos-template-cache" * @return string */ - public function getTemplateCache() + public function getTemplateCache() { return $this->getConstant('TEMPLATE_CACHE', '/tmp/skosmos-template-cache'); } - + /** - * Returns the defined sparql-query extension eg. "JenaText" or + * Returns the defined sparql-query extension eg. "JenaText" or * if not defined falling back to SPARQL 1.1 * @return string */ - public function getDefaultSparqlDialect() + public function getDefaultSparqlDialect() { return $this->getConstant('DEFAULT_SPARQL_DIALECT', 'Generic'); } @@ -136,20 +136,20 @@ public function getDefaultSparqlDialect() * Returns the feedback address defined in the configuration. * @return string */ - public function getFeedbackAddress() + public function getFeedbackAddress() { return $this->getConstant('FEEDBACK_ADDRESS', null); } - + /** * Returns true if exception logging has been configured. - * @return boolean + * @return boolean */ - public function getLogCaughtExceptions() + public function getLogCaughtExceptions() { return $this->getConstant('LOG_CAUGHT_EXCEPTIONS', FALSE); } - + /** * Returns true if browser console logging has been enabled, * @return boolean @@ -171,51 +171,51 @@ public function getLoggingFilename() /** * @return string */ - public function getServiceName() + public function getServiceName() { return $this->getConstant('SERVICE_NAME', 'Skosmos'); } - + /** * @return string */ - public function getServiceTagline() + public function getServiceTagline() { return $this->getConstant('SERVICE_TAGLINE', null); } - + /** * @return string */ - public function getCustomCss() + public function getCustomCss() { return $this->getConstant('CUSTOM_CSS', null); } - + /** * @return boolean */ - public function getUiLanguageDropdown() + public function getUiLanguageDropdown() { return $this->getConstant('UI_LANGUAGE_DROPDOWN', FALSE); } - + /** * @return string */ - public function getBaseHref() + public function getBaseHref() { return $this->getConstant('BASE_HREF', null); } - + /** * @return string */ - public function getGlobalPlugins() + public function getGlobalPlugins() { return explode(' ', $this->getConstant('GLOBAL_PLUGINS', null)); } - + /** * @return boolean */ diff --git a/model/LabelSkosXL.php b/model/LabelSkosXL.php index b6be39fea..5dff748b2 100644 --- a/model/LabelSkosXL.php +++ b/model/LabelSkosXL.php @@ -32,10 +32,10 @@ public function getProperties() { } public function getLiteral() { - return $this->resource->getLiteral('skosxl:literalForm')->getValue(); + return $this->resource->getLiteral('skosxl:literalForm')->getValue(); } public function __toString() { - return $this->resource->getLiteral('skosxl:literalForm')->getValue(); + return $this->resource->getLiteral('skosxl:literalForm')->getValue(); } } diff --git a/model/Model.php b/model/Model.php index ca5c204b1..a124481e8 100644 --- a/model/Model.php +++ b/model/Model.php @@ -105,7 +105,7 @@ private function parseVocabularies($filename) /** * Registers RDF namespaces from the vocabularies.ttl file for use by EasyRdf (e.g. serializing) */ - + private function initializeNamespaces() { foreach ($this->namespaces as $prefix => $fullUri) { if ($prefix != '' && EasyRdf\RdfNamespace::get($prefix) === null) // if not already defined @@ -114,7 +114,7 @@ private function initializeNamespaces() { } } } - + /** * Configures the logging facility */ @@ -138,7 +138,7 @@ private function initializeLogging() { $this->logger->pushHandler($nullHandler); } } - + /** * Return the logging facility * @return object logger @@ -170,7 +170,7 @@ public function getVersion() * Return all the vocabularies available. * @param boolean $categories whether you want everything included in a subarray of * a category. - * @param boolean $shortname set to true if you want the vocabularies sorted by + * @param boolean $shortname set to true if you want the vocabularies sorted by * their shortnames instead of ther titles. */ public function getVocabularyList($categories = true, $shortname = false) @@ -522,7 +522,7 @@ public function getVocabularyByGraph($graph, $endpoint = null) } } - + /** * When multiple vocabularies share same URI namespace, return the * vocabulary in which the URI is actually defined (has a label). @@ -539,7 +539,7 @@ private function disambiguateVocabulary($vocabs, $uri, $preferredVocabId = null) if (sizeof($vocabs) == 1) { return $vocabs[0]; } - + // if there are multiple vocabularies and one is the preferred vocabulary, return it if($preferredVocabId != null) { foreach ($vocabs as $vocab) { @@ -548,7 +548,7 @@ private function disambiguateVocabulary($vocabs, $uri, $preferredVocabId = null) } } } - + // no preferred vocabulary, or it was not found, search in which vocabulary the concept has a label foreach ($vocabs as $vocab) { if ($vocab->getConceptLabel($uri, null) !== null) @@ -633,13 +633,13 @@ public function getResourceFromUri($uri) { // prevent parsing errors for sources which return invalid JSON (see #447) // 1. Unregister the legacy RDF/JSON parser, we don't want to use it - EasyRdf\Format::unregister('json'); + EasyRdf\Format::unregister('json'); // 2. Add "application/json" as a possible MIME type for the JSON-LD format $jsonld = EasyRdf\Format::getFormat('jsonld'); $mimetypes = $jsonld->getMimeTypes(); $mimetypes['application/json'] = 0.5; $jsonld->setMimeTypes($mimetypes); - + // using apc cache for the resource if available if ($this->cache->isAvailable()) { // @codeCoverageIgnoreStart diff --git a/model/PluginRegister.php b/model/PluginRegister.php index ec13e4c8d..7d9c5f46e 100644 --- a/model/PluginRegister.php +++ b/model/PluginRegister.php @@ -6,12 +6,12 @@ class PluginRegister { public function __construct($requestedPlugins=array()) { $this->requestedPlugins = $requestedPlugins; } - + /** * Returns the plugin configurations found from plugin folders inside the plugins folder * @return array */ - protected function getPlugins() + protected function getPlugins() { $plugins = array(); $pluginconfs = glob('plugins/*/plugin.json'); @@ -25,7 +25,7 @@ protected function getPlugins() } /** - * Returns the plugin configurations found from plugin folders + * Returns the plugin configurations found from plugin folders * inside the plugins folder filtered by filetype. * @param string $type filetype e.g. 'css', 'js' or 'template' * @return array @@ -41,16 +41,16 @@ private function filterPlugins($type) { array_push($ret[$name], 'plugins/' . $name . '/' . $file); } } - } + } } return $ret; } /** - * Returns the plugin configurations found from plugin folders + * Returns the plugin configurations found from plugin folders * inside the plugins folder filtered by plugin name (the folder name). * @param string $type filetype e.g. 'css', 'js' or 'template' - * @param array $names the plugin name strings (foldernames) in an array + * @param array $names the plugin name strings (foldernames) in an array * @return array */ private function filterPluginsByName($type, $names) { @@ -65,7 +65,7 @@ private function filterPluginsByName($type, $names) { /** * Returns an array of javascript filepaths - * @param array $names the plugin name strings (foldernames) in an array + * @param array $names the plugin name strings (foldernames) in an array * @return array */ public function getPluginsJS($names=null) { @@ -78,7 +78,7 @@ public function getPluginsJS($names=null) { /** * Returns an array of css filepaths - * @param array $names the plugin name strings (foldernames) in an array + * @param array $names the plugin name strings (foldernames) in an array * @return array */ public function getPluginsCSS($names=null) { @@ -91,7 +91,7 @@ public function getPluginsCSS($names=null) { /** * Returns an array of template filepaths - * @param array $names the plugin name strings (foldernames) in an array + * @param array $names the plugin name strings (foldernames) in an array * @return array */ public function getPluginsTemplates($names=null) { @@ -104,7 +104,7 @@ public function getPluginsTemplates($names=null) { /** * Returns an array of template files contents as strings - * @param array $names the plugin name strings (foldernames) in an array + * @param array $names the plugin name strings (foldernames) in an array * @return array */ public function getTemplates($names=null) { @@ -124,7 +124,7 @@ public function getTemplates($names=null) { } /** - * Returns an array of javascript function names to call when loading a new concept + * Returns an array of javascript function names to call when loading a new concept * @return array */ public function getCallbacks() { diff --git a/model/Request.php b/model/Request.php index 772142e60..3416c14f9 100644 --- a/model/Request.php +++ b/model/Request.php @@ -124,7 +124,7 @@ public function getRequestUri() { return $this->getServerConstant('HTTP_HOST') . $this->getServerConstant('REQUEST_URI'); } - + /** * Returns the relative page url eg. '/yso/fi/search?clang=en&q=cat' * @return string the relative url of the page diff --git a/model/SkosmosTurtleParser.php b/model/SkosmosTurtleParser.php index f13865b6e..2b3b74773 100644 --- a/model/SkosmosTurtleParser.php +++ b/model/SkosmosTurtleParser.php @@ -15,7 +15,7 @@ public function getNamespaces() } /** - * A lot faster since we're now only reading the next 4 bytes + * A lot faster since we're now only reading the next 4 bytes * instead of the whole string. * Gets the next character to be returned by read(). */ diff --git a/model/Vocabulary.php b/model/Vocabulary.php index 94b250993..cb20f47e8 100644 --- a/model/Vocabulary.php +++ b/model/Vocabulary.php @@ -583,9 +583,9 @@ public function verifyVocabularyLanguage($lang) /** * Returns a list of recently changed or entirely new concepts. - * @param string $clang content language for the labels + * @param string $clang content language for the labels * @param string $lang UI language for the dates - * @return Array + * @return Array */ public function getChangeList($prop, $clang, $lang, $offset) { @@ -601,13 +601,13 @@ public function getChangeList($prop, $clang, $lang, $offset) public function getTitle($lang=null) { return $this->config->getTitle($lang); } - + public function getShortName() { return $this->config->getShortName(); } - + public function getId() { return $this->config->getId(); } - + } diff --git a/model/VocabularyConfig.php b/model/VocabularyConfig.php index 4f6ad6023..50d1dc329 100644 --- a/model/VocabularyConfig.php +++ b/model/VocabularyConfig.php @@ -7,7 +7,7 @@ class VocabularyConfig extends DataObject { private $plugins; - public function __construct($resource, $globalPlugins=array()) + public function __construct($resource, $globalPlugins=array()) { $this->resource = $resource; $plugins = $this->resource->allLiterals('skosmos:usePlugin'); @@ -34,7 +34,7 @@ private function getBoolean($property, $default = false) return $default; } - + /** * Returns a boolean value based on a literal value from the vocabularies.ttl configuration. * @param string $property the property to query @@ -95,7 +95,7 @@ public function getAlphabeticalFull() public function getShortName() { $shortname = $this->getLiteral('skosmos:shortName'); - if ($shortname) + if ($shortname) return $shortname; // if no shortname exists fall back to the id @@ -130,7 +130,7 @@ public function sortByNotation() { return $this->getBoolean('skosmos:sortByNotation'); } - + /** * Returns a boolean value set in the vocabularies.ttl config. * @return boolean @@ -177,19 +177,17 @@ public function getDataURLs() * or null if not set. * @return string concept scheme URI or null */ - + public function getMainConceptSchemeURI() { $val = $this->resource->getResource("skosmos:mainConceptScheme"); if ($val) { return $val->getURI(); } - + return null; } - - - + /** * Returns the class URI used for concept groups in this vocabulary, * or null if not set. @@ -347,7 +345,7 @@ public function getDefaultSidebarView() } } - if ($this->showAlphabeticalIndex() === false) { + if ($this->showAlphabeticalIndex() === false) { if ($this->getShowHierarchy()) { return 'hierarchy'; } else if ($this->getGroupClassURI()) { @@ -396,7 +394,7 @@ public function getHierarchyProperty() $ret = array(); foreach ($resources as $res) { $prop = $res->getURI(); - if (EasyRdf\RdfNamespace::shorten($prop) !== null) // prefixing if possible + if (EasyRdf\RdfNamespace::shorten($prop) !== null) // prefixing if possible { $prop = EasyRdf\RdfNamespace::shorten($prop); } @@ -423,7 +421,7 @@ public function showAlphabeticalIndex() { return $this->getBoolean('skosmos:showAlphabeticalIndex', true); } - + /** * Returns a boolean value set in the vocabularies.ttl config. * @return boolean diff --git a/tests/BreadcrumbTest.php b/tests/BreadcrumbTest.php index a1714ad3d..3d6f199b6 100644 --- a/tests/BreadcrumbTest.php +++ b/tests/BreadcrumbTest.php @@ -2,7 +2,7 @@ class BreadcrumbTest extends PHPUnit\Framework\TestCase { - + /** * @covers Breadcrumb::__construct * @covers Breadcrumb::getUri @@ -23,7 +23,7 @@ public function testHideLabel() { $bc->hideLabel(); $this->assertEquals('...', $bc->getPrefLabel()); } - + /** * @covers Breadcrumb::getHiddenLabel */ diff --git a/tests/ConceptMappingPropertyValueTest.php b/tests/ConceptMappingPropertyValueTest.php index 21c732d76..5bea5eb16 100644 --- a/tests/ConceptMappingPropertyValueTest.php +++ b/tests/ConceptMappingPropertyValueTest.php @@ -2,7 +2,7 @@ class ConceptMappingPropertyValueTest extends PHPUnit\Framework\TestCase { - private $model; + private $model; private $concept; private $vocab; private $props; @@ -21,7 +21,7 @@ protected function setUp() { $this->concept = $concepts[0]; $this->props = $this->concept->getMappingProperties(); } - + /** * @covers ConceptMappingPropertyValue::__construct */ @@ -125,7 +125,7 @@ public function testGetExVocab() { $this->assertInstanceOf('Vocabulary', $propvals['Eelhttp://www.skosmos.skos/test/ta115']->getExVocab()); $this->assertEquals('test', $propvals['Eelhttp://www.skosmos.skos/test/ta115']->getExVocab()->getId()); } - + /** * @covers ConceptMappingPropertyValue::getVocabName */ @@ -133,7 +133,7 @@ public function testGetVocabNameWithExternalVocabulary() { $propvals = $this->props['skos:exactMatch']->getValues(); $this->assertEquals('Test ontology', $propvals['Eelhttp://www.skosmos.skos/test/ta115']->getVocabName()); } - + /** * @covers ConceptMappingPropertyValue::getUri */ @@ -141,7 +141,7 @@ public function testGetUri() { $propvals = $this->props['skos:exactMatch']->getValues(); $this->assertEquals('http://www.skosmos.skos/test/ta115', $propvals['Eelhttp://www.skosmos.skos/test/ta115']->getUri()); } - + /** * @covers ConceptMappingPropertyValue::getVocab */ @@ -149,7 +149,7 @@ public function testGetVocab() { $propvals = $this->props['skos:exactMatch']->getValues(); $this->assertEquals($this->vocab, $propvals['Eelhttp://www.skosmos.skos/test/ta115']->getVocab()); } - + /** * @covers ConceptMappingPropertyValue::getType */ @@ -157,7 +157,7 @@ public function testGetType() { $propvals = $this->props['skos:exactMatch']->getValues(); $this->assertEquals('skos:exactMatch', $propvals['Eelhttp://www.skosmos.skos/test/ta115']->getType()); } - + /** * @covers ConceptMappingPropertyValue::__toString */ diff --git a/tests/ConceptPropertyTest.php b/tests/ConceptPropertyTest.php index f7e9ff04e..f46329db8 100644 --- a/tests/ConceptPropertyTest.php +++ b/tests/ConceptPropertyTest.php @@ -2,7 +2,7 @@ class ConceptPropertyTest extends PHPUnit\Framework\TestCase { - private $model; + private $model; protected function setUp() { require_once 'testconfig.inc'; @@ -96,7 +96,7 @@ public function testAddValue() { public function testGetPropertiesSubClassOfHiddenLabel() { $vocab = $this->model->getVocabulary('subclass'); - $results = $vocab->getConceptInfo('http://www.skosmos.skos/sub/d1', 'en'); + $results = $vocab->getConceptInfo('http://www.skosmos.skos/sub/d1', 'en'); $concept = reset($results); $props = $concept->getProperties(); $this->assertEquals('skos:hiddenLabel', $props['subclass:prop1']->getSubPropertyOf()); diff --git a/tests/ConceptPropertyValueLiteralTest.php b/tests/ConceptPropertyValueLiteralTest.php index a01712b69..8ee4eb2b2 100644 --- a/tests/ConceptPropertyValueLiteralTest.php +++ b/tests/ConceptPropertyValueLiteralTest.php @@ -2,7 +2,7 @@ class ConceptPropertyValueLiteralTest extends PHPUnit\Framework\TestCase { - private $model; + private $model; private $concept; private $vocab; @@ -127,7 +127,7 @@ public function testGetContainsHtmlWhenThereIsNone() { $lit = new ConceptPropertyValueLiteral($this->model, $this->vocab, $resmock, $litmock, 'skosmos:testType'); $this->assertFalse($lit->getContainsHtml()); } - + /** * @covers ConceptPropertyValueLiteral::getContainsHtml */ @@ -138,7 +138,7 @@ public function testGetContainsHtmlWhenThereIsOnlyAOpeningTag() { $lit = new ConceptPropertyValueLiteral($this->model, $this->vocab, $resmock, $litmock, 'skosmos:testType'); $this->assertFalse($lit->getContainsHtml()); } - + /** * @covers ConceptPropertyValueLiteral::getContainsHtml */ diff --git a/tests/ConceptPropertyValueTest.php b/tests/ConceptPropertyValueTest.php index 338263a32..48390950e 100644 --- a/tests/ConceptPropertyValueTest.php +++ b/tests/ConceptPropertyValueTest.php @@ -2,10 +2,10 @@ class ConceptPropertyValueTest extends PHPUnit\Framework\TestCase { - private $model; + private $model; private $concept; private $vocab; - + protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); @@ -57,7 +57,7 @@ public function testGetLabelLiteral() { $this->assertEquals('english lit', $mapping->getLabel('en')); $this->assertEquals('default lit', $mapping->getLabel()); } - + /** * @covers ConceptPropertyValue::getType */ @@ -66,7 +66,7 @@ public function testGetType() { $propvals = $props['skos:narrower']->getValues(); $this->assertEquals('skos:narrower', $propvals['Crucian carphttp://www.skosmos.skos/test/ta121']->getType()); } - + /** * @covers ConceptPropertyValue::getUri */ @@ -75,7 +75,7 @@ public function testGetUri() { $propvals = $props['skos:narrower']->getValues(); $this->assertEquals('http://www.skosmos.skos/test/ta121', $propvals['Crucian carphttp://www.skosmos.skos/test/ta121']->getUri()); } - + /** * @covers ConceptPropertyValue::getVocab */ @@ -114,7 +114,7 @@ public function testGetNotationWhenThereIsNone() { $propval = new ConceptPropertyValue($this->model, $this->vocab, $mockres, 'en'); $this->assertEquals(null, $propval->getNotation()); } - + /** * @covers ConceptPropertyValue::__toString */ @@ -125,7 +125,7 @@ public function testToStringWhenSortByNotationNotSet() { $propvals = $props['skos:broader']->getValues(); $this->assertEquals('Carp', (string)$propvals['665Carphttp://www.skosmos.skos/test/ta112']); } - + /** * @covers ConceptPropertyValue::__toString */ @@ -144,7 +144,7 @@ public function testToStringWithNotation() { $propval = new ConceptPropertyValue($this->model, $mockvoc, $mockres, null); $this->assertEquals('T3STTerm label', (string)$propval); } - + /** * @covers ConceptPropertyValue::__toString */ diff --git a/tests/ConceptSearchParametersTest.php b/tests/ConceptSearchParametersTest.php index e5984f27f..4530eec7c 100644 --- a/tests/ConceptSearchParametersTest.php +++ b/tests/ConceptSearchParametersTest.php @@ -2,7 +2,7 @@ class ConceptSearchParametersTest extends PHPUnit\Framework\TestCase { - private $model; + private $model; private $request; protected function setUp() { @@ -11,7 +11,7 @@ protected function setUp() { $this->request = $this->getMockBuilder('Request')->disableOriginalConstructor()->getMock(); $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); } - + protected function tearDown() { $this->params = null; } @@ -24,7 +24,7 @@ public function testConstructorAndSearchLimit() { $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc'), true); $this->assertEquals(0, $params->getSearchLimit()); } - + /** * @covers ConceptSearchParameters::getLang */ @@ -45,10 +45,10 @@ public function testGetVocabs() { $this->assertEquals(array(), $params->getVocabs()); $this->request->method('getVocab')->will($this->returnValue('vocfromrequest')); $this->assertEquals(array('vocfromrequest'), $params->getVocabs()); - $params->setVocabularies(array('something')); + $params->setVocabularies(array('something')); $this->assertEquals(array('something'), $params->getVocabs()); } - + /** * @covers ConceptSearchParameters::getVocabids */ @@ -70,7 +70,7 @@ public function testGetVocabids() { $params = new ConceptSearchParameters($mockreq, new GlobalConfig('/../tests/testconfig.inc'), true); $this->assertEquals(array('test'), $params->getVocabids()); } - + /** * @covers ConceptSearchParameters::getSearchTerm */ @@ -82,7 +82,7 @@ public function testGetSearchTerm() { $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc'), true); $this->assertEquals('test', $params->getSearchTerm()); } - + /** * @covers ConceptSearchParameters::getTypeLimit * @covers ConceptSearchParameters::getDefaultTypeLimit @@ -93,7 +93,7 @@ public function testGetTypeLimitNoQueryParam() { $params = new ConceptSearchParameters($mockreq, new GlobalConfig('/../tests/testconfig.inc')); $this->assertEquals(array('skos:Concept', 'http://purl.org/iso25964/skos-thes#ThesaurusArray', 'http://www.w3.org/2004/02/skos/core#Collection'), $params->getTypeLimit()); } - + /** * @covers ConceptSearchParameters::getTypeLimit * @covers ConceptSearchParameters::getDefaultTypeLimit @@ -104,7 +104,7 @@ public function testGetTypeLimit() { $this->request->method('getQueryParam')->will($this->returnValue('isothes:ThesaurusArray+skos:Collection')); $this->assertEquals(array('isothes:ThesaurusArray', 'skos:Collection'), $params->getTypeLimit()); } - + /** * @covers ConceptSearchParameters::getTypeLimit * @covers ConceptSearchParameters::getDefaultTypeLimit @@ -114,7 +114,7 @@ public function testGetTypeLimitOnlyOne() { $this->request->method('getQueryParam')->will($this->returnValue('skos:Collection')); $this->assertEquals(array('skos:Collection'), $params->getTypeLimit()); } - + /** * @covers ConceptSearchParameters::getUnique * @covers ConceptSearchParameters::setUnique @@ -125,7 +125,7 @@ public function testGetAndSetUnique() { $params->setUnique(true); $this->assertEquals(true, $params->getUnique()); } - + /** * @covers ConceptSearchParameters::getHidden * @covers ConceptSearchParameters::setHidden @@ -136,7 +136,7 @@ public function testGetAndSetHidden() { $params->setHidden(false); $this->assertEquals(false, $params->getHidden()); } - + /** * @covers ConceptSearchParameters::getArrayClass */ @@ -144,7 +144,7 @@ public function testGetArrayClassWithoutVocabulary() { $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); $this->assertEquals(null, $params->getArrayClass()); } - + /** * @covers ConceptSearchParameters::getArrayClass */ @@ -153,7 +153,7 @@ public function testGetArrayClass() { $params->setVocabularies(array($this->model->getVocabulary('test'))); $this->assertEquals('http://purl.org/iso25964/skos-thes#ThesaurusArray', $params->getArrayClass()); } - + /** * @covers ConceptSearchParameters::getSchemeLimit * @covers ConceptSearchParameters::getQueryParam @@ -164,7 +164,7 @@ public function testGetSchemeLimit() { $this->request->method('getQueryParam')->will($this->returnValue('http://www.skosmos.skos/test/ http://www.skosmos.skos/date/')); $this->assertEquals(array(0 => 'http://www.skosmos.skos/test/', 1 => 'http://www.skosmos.skos/date/'), $params->getSchemeLimit()); } - + /** * @covers ConceptSearchParameters::getContentLang */ @@ -173,7 +173,7 @@ public function testGetContentLang() { $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); $this->assertEquals('de', $params->getContentLang()); } - + /** * @covers ConceptSearchParameters::getSearchLang */ @@ -185,7 +185,7 @@ public function testGetSearchLang() { $this->request->method('getQueryParam')->will($this->returnValue('on')); //anylang=on $this->assertEquals('', $params->getSearchLang()); } - + /** * @covers ConceptSearchParameters::getOffset */ @@ -194,7 +194,7 @@ public function testGetOffsetNonNumeric() { $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); $this->assertEquals(0, $params->getOffset()); } - + /** * @covers ConceptSearchParameters::getOffset */ @@ -203,7 +203,7 @@ public function testGetOffsetValid() { $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); $this->assertEquals(25, $params->getOffset()); } - + /** * @covers ConceptSearchParameters::getAdditionalFields */ @@ -215,7 +215,7 @@ public function testGetAdditionalField() { $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); $this->assertEquals(array('broader'), $params->getAdditionalFields()); } - + /** * @covers ConceptSearchParameters::getAdditionalFields */ diff --git a/tests/ConceptTest.php b/tests/ConceptTest.php index 2a44e8867..de7e02aac 100644 --- a/tests/ConceptTest.php +++ b/tests/ConceptTest.php @@ -2,7 +2,7 @@ class ConceptTest extends PHPUnit\Framework\TestCase { - private $model; + private $model; private $concept; protected function setUp() { @@ -28,7 +28,7 @@ public function testConstructor() $this->assertInstanceOf('Concept', $concept); $this->assertEquals('Test ontology', $concept->getVocabTitle()); } - + /** * @covers Concept::getUri */ @@ -37,7 +37,7 @@ public function testGetUri() $uri = $this->concept->getURI(); $this->assertEquals('http://www.skosmos.skos/test/ta112', $uri); } - + /** * @covers Concept::getDeprecated */ @@ -46,7 +46,7 @@ public function testGetConceptNotDeprecated() $deprecated = $this->concept->getDeprecated(); $this->assertEquals(false, $deprecated); } - + /** * @covers Concept::getVocab */ @@ -55,7 +55,7 @@ public function testGetVocab() $voc = $this->concept->getVocab(); $this->assertInstanceOf('Vocabulary', $voc); } - + /** * @covers Concept::getVocabTitle */ @@ -64,7 +64,7 @@ public function testGetVocabTitle() $title = $this->concept->getVocabTitle(); $this->assertEquals('Test ontology', $title); } - + /** * @covers Concept::getShortName */ @@ -82,7 +82,7 @@ public function testGetFoundByWhenNotSet() $fb = $this->concept->getFoundBy(); $this->assertEquals(null, $fb); } - + /** * @covers Concept::setFoundBy * @covers Concept::getFoundByType @@ -97,7 +97,7 @@ public function testSetFoundBy() $this->assertEquals('testing matched label', $fb); $this->assertEquals('alt', $fbtype); } - + /** * @covers Concept::getForeignLabels * @covers Concept::literalLanguageToString @@ -108,7 +108,7 @@ public function testGetForeignLabels() $this->assertEquals('Karppi', $labels['Finnish'][0]->getLabel()); } - + /** * @covers Concept::getAllLabels */ @@ -120,7 +120,7 @@ public function testGetAllLabels() $this->assertEquals('Iljettävä limanuljaska', $labels['Finnish'][0]->getLabel()); $this->assertEquals('any fish belonging to the order Anguilliformes', $labels['English'][0]->getLabel()); } - + /** * @covers Concept::getProperties * @covers ConceptProperty::getValues @@ -143,7 +143,7 @@ public function testGetPropertiesLiteralValue() public function testGetPropertiesCorrectNumberOfProperties() { $props = $this->concept->getProperties(); - + $this->assertEquals(6, sizeof($props)); } @@ -159,9 +159,9 @@ public function testGetPropertiesCorrectOrderOfProperties() $props = $this->concept->getProperties(); $expected = array (0 => 'rdf:type', 1=> 'skos:broader',2 => 'skos:narrower',3 => 'skos:altLabel',4 => 'skos:scopeNote',5 => 'http://www.skosmos.skos/testprop'); $this->assertEquals($expected, array_keys($props)); - + } - + /** * @covers Concept::getProperties * @covers ConceptProperty::getValues @@ -169,7 +169,7 @@ public function testGetPropertiesCorrectOrderOfProperties() */ public function testGetPropertiesAlphabeticalSortingOfPropertyValues() { - $results = $this->vocab->getConceptInfo('http://www.skosmos.skos/test/ta1', 'en'); + $results = $this->vocab->getConceptInfo('http://www.skosmos.skos/test/ta1', 'en'); $concept = reset($results); $props = $concept->getProperties(); $prevlabel; @@ -180,7 +180,7 @@ public function testGetPropertiesAlphabeticalSortingOfPropertyValues() $prevlabel = $label; } } - + /** * @covers Concept::getMappingProperties * @covers ConceptProperty::getValues @@ -193,7 +193,7 @@ public function testGetMappingPropertiesWithIdenticalLabels() { $values = $props['skos:closeMatch']->getValues(); $this->assertCount(2, $values); } - + /** * @covers Concept::removeDuplicatePropertyValues * @covers Concept::getProperties @@ -205,7 +205,7 @@ public function testRemoveDuplicatePropertyValues() { $props = $concept->getProperties(); $this->assertCount(1, $props); } - + /** * @covers Concept::removeDuplicatePropertyValues * @covers Concept::getProperties @@ -283,7 +283,7 @@ public function testGetPropertiesTypes() $this->assertEquals('Test class', $propvals['Test classhttp://www.skosmos.skos/test-meta/TestClass']->getLabel()); $this->assertEquals('http://www.skosmos.skos/test-meta/TestClass', $propvals['Test classhttp://www.skosmos.skos/test-meta/TestClass']->getUri()); } - + /** * @covers Concept::getNotation */ @@ -294,7 +294,7 @@ public function testGetNotationWhenNull() $concept = $concepts[0]; $this->assertEquals(null, $concept->getNotation()); } - + /** * @covers Concept::getNotation */ @@ -302,7 +302,7 @@ public function testGetNotation() { $this->assertEquals('665', $this->concept->getNotation()); } - + /** * @covers Concept::getLabel */ @@ -310,7 +310,7 @@ public function testGetLabelCurrentLanguage() { $this->assertEquals('Carp', $this->concept->getLabel()->getValue()); } - + /** * @covers Concept::getLabel */ @@ -321,7 +321,7 @@ public function testGetLabelWhenNull() $concept = $vocab->getConceptInfo("http://www.skosmos.skos/test/ta120", "en"); $this->assertEquals(null, $concept[0]->getLabel()); } - + /** * @covers Concept::getLabel * @covers Concept::setContentLang @@ -333,7 +333,7 @@ public function testGetLabelResortingToVocabDefault() $this->assertEquals('pl', $this->concept->getContentLang()); $this->assertEquals('Carp', $this->concept->getLabel()->getValue()); } - + /** * @covers Concept::getArrayProperties * @covers Concept::getGroupProperties @@ -350,7 +350,7 @@ public function testGetGroupProperties() $groups = $concept[0]->getGroupProperties(); $this->assertEmpty($groups); } - + /** * @covers Concept::getGroupProperties * @covers Concept::getReverseResources @@ -391,7 +391,7 @@ public function testGetPropertiesWithNarrowersPartOfACollection() } } } - + /** * @covers Concept::getProperties */ @@ -408,7 +408,7 @@ public function testGetPropertiesDefinitionLiteral() { * @covers Concept::getProperties * @covers ConceptProperty::getValues */ - + public function testGetPropertiesDefinitionResource() { $vocab = $this->model->getVocabulary('test'); $concepts = $vocab->getConceptInfo('http://www.skosmos.skos/test/ta122', 'en'); diff --git a/tests/DataObjectTest.php b/tests/DataObjectTest.php index 5b4cf92bf..339042b81 100644 --- a/tests/DataObjectTest.php +++ b/tests/DataObjectTest.php @@ -12,7 +12,7 @@ class DataObjectTest extends PHPUnit\Framework\TestCase */ public function testConstructorNoArguments() { - new DataObject(null, null); + new DataObject(null, null); } - + } diff --git a/tests/GenericSparqlTest.php b/tests/GenericSparqlTest.php index 8b1881085..18e1b8e91 100644 --- a/tests/GenericSparqlTest.php +++ b/tests/GenericSparqlTest.php @@ -2,8 +2,8 @@ class GenericSparqlTest extends PHPUnit\Framework\TestCase { - private $model; - private $graph; + private $model; + private $graph; private $sparql; private $vocab; private $params; @@ -17,7 +17,7 @@ protected function setUp() { $this->params = $this->getMockBuilder('ConceptSearchParameters')->disableOriginalConstructor()->getMock(); $this->sparql = new GenericSparql('http://localhost:3030/ds/sparql', $this->graph, $this->model); } - + /** * @covers GenericSparql::__construct */ @@ -25,7 +25,7 @@ public function testConstructor() { $gs = new GenericSparql('http://localhost:3030/ds/sparql', $this->graph, $this->model); $this->assertInstanceOf('GenericSparql', $gs); } - + /** * @covers GenericSparql::getGraph */ @@ -43,7 +43,7 @@ public function testCountConcepts() { $actual = $this->sparql->countConcepts(); $this->assertEquals(16, $actual['http://www.w3.org/2004/02/skos/core#Concept']['count']); } - + /** * @covers GenericSparql::countLangConcepts * @covers GenericSparql::generateCountLangConceptsQuery @@ -54,7 +54,7 @@ public function testCountLangConceptsOneLang() { $this->assertEquals(11, $actual['en']['skos:prefLabel']); $this->assertEquals(1, $actual['en']['skos:altLabel']); } - + /** * @covers GenericSparql::countLangConcepts * @covers GenericSparql::generateCountLangConceptsQuery @@ -66,7 +66,7 @@ public function testCountLangConceptsMultipleLangs() { $this->assertEquals(1, $actual['en']['skos:altLabel']); $this->assertEquals(2, $actual['fi']['skos:prefLabel']); } - + /** * @covers GenericSparql::queryFirstCharacters * @covers GenericSparql::generateFirstCharactersQuery @@ -85,7 +85,7 @@ public function testQueryLabelWhenConceptNotFound() { $actual = $this->sparql->queryLabel('http://notfound', null); $this->assertEquals(null, $actual); } - + /** * @covers GenericSparql::queryLabel */ @@ -93,7 +93,7 @@ public function testQueryLabelWhenLabelNotFound() { $actual = $this->sparql->queryLabel('http://www.skosmos.skos/test/ta120', null); $this->assertEquals(array(), $actual); } - + /** * @covers GenericSparql::queryConceptsAlphabetical * @covers GenericSparql::generateAlphabeticalListQuery @@ -124,7 +124,7 @@ public function testQueryConceptsAlphabetical() { ); $this->assertEquals($expected, $actual); } - + /** * @covers GenericSparql::queryConceptsAlphabetical * @covers GenericSparql::generateAlphabeticalListQuery @@ -150,7 +150,7 @@ public function testQueryConceptsAlphabeticalLimit() { ); $this->assertEquals($expected, $actual); } - + /** * @covers GenericSparql::queryConceptsAlphabetical * @covers GenericSparql::generateAlphabeticalListQuery @@ -176,7 +176,7 @@ public function testQueryConceptsAlphabeticalLimitAndOffset() { ); $this->assertEquals($expected, $actual); } - + /** * @covers GenericSparql::queryConceptsAlphabetical * @covers GenericSparql::generateAlphabeticalListQuery @@ -200,7 +200,7 @@ public function testQueryConceptsAlphabeticalSpecialChars() { $this->assertEquals(1, sizeof($actual)); $this->assertEquals('-"special" character \\example\\', $actual[0]['prefLabel']); } - + /** * @covers GenericSparql::queryConceptsAlphabetical * @covers GenericSparql::generateAlphabeticalListQuery @@ -212,7 +212,7 @@ public function testQueryConceptsAlphabeticalNumbers() { $this->assertEquals(1, sizeof($actual)); $this->assertContains("3D", $actual[0]['prefLabel']); } - + /** * @covers GenericSparql::queryConceptsAlphabetical * @covers GenericSparql::generateAlphabeticalListQuery @@ -350,7 +350,7 @@ public function testQueryConceptSchemes() $this->assertEquals('Test conceptscheme', $label['label']); } } - + /** * @covers GenericSparql::queryConceptSchemes * @covers GenericSparql::generateQueryConceptSchemesQuery @@ -359,7 +359,7 @@ public function testQueryConceptSchemes() public function testQueryConceptSchemesSubject() { $sparql = new GenericSparql('http://localhost:3030/ds/sparql', 'http://www.skosmos.skos/test-concept-schemes/', $this->model); - + $actual = $sparql->queryConceptSchemes('en'); $expected = array( 'http://exemple.fr/domains' => array( @@ -390,7 +390,7 @@ public function testQueryConceptSchemesSubject() 'prefLabel' => 'The Thesaurus' ), ); - + $this->assertEquals($expected, $actual); } @@ -439,8 +439,8 @@ public function testQueryConceptsMultipleSchemes() $this->assertEquals('http://www.skosmos.skos/multiple-schemes/c1-in-cs1', $actual[0]['uri']); $this->assertEquals('http://www.skosmos.skos/multiple-schemes/c2-in-cs2', $actual[1]['uri']); } - - + + /** * @covers GenericSparql::queryConcepts * @covers GenericSparql::generateConceptSearchQueryCondition @@ -558,7 +558,7 @@ public function testQueryConceptsExactTerm() $this->assertEquals(1, sizeof($actual)); $this->assertEquals('Bass', $actual[0]['prefLabel']); } - + /** * @covers GenericSparql::queryConcepts * @covers GenericSparql::generateConceptSearchQueryCondition @@ -577,7 +577,7 @@ public function testQueryConceptsAsteriskBeforeTerm() foreach($actual as $match) $this->assertContains('bass', $match['prefLabel'], '',true); } - + /** * @covers GenericSparql::queryConcepts * @covers GenericSparql::generateConceptSearchQueryCondition @@ -596,7 +596,7 @@ public function testQueryConceptsAsteriskBeforeAndAfterTerm() foreach($actual as $match) $this->assertContains('bass', $match['prefLabel'], '',true); } - + /** * @covers GenericSparql::queryLabel * @covers GenericSparql::generateLabelQuery @@ -617,7 +617,7 @@ public function testQueryLabel() $expected = array('en' => 'Carp'); $this->assertEquals($expected, $actual); } - + /** * @covers GenericSparql::queryLabel * @covers GenericSparql::generateLabelQuery @@ -640,7 +640,7 @@ public function testQueryPropertyForBroaderThatExists() $expected = array('http://www.skosmos.skos/test/ta1' => array('label' => 'Fish')); $this->assertEquals($expected, $actual); } - + /** * @covers GenericSparql::queryProperty * @covers GenericSparql::transformPropertyQueryResults @@ -652,7 +652,7 @@ public function testQueryPropertyForNarrowerThatDoesntExist() $expected = array(); $this->assertEquals($expected, $actual); } - + /** * @covers GenericSparql::queryProperty * @covers GenericSparql::transformPropertyQueryResults @@ -673,22 +673,22 @@ public function testQueryTransitiveProperty() { $actual = $this->sparql->queryTransitiveProperty('http://www.skosmos.skos/test/ta111', array('skos:broader'), 'en', '10'); $expected = array( - 'http://www.skosmos.skos/test/ta111' => + 'http://www.skosmos.skos/test/ta111' => array( 'label' => 'Tuna', - 'direct' => + 'direct' => array ( 0 => 'http://www.skosmos.skos/test/ta1', ), ), - 'http://www.skosmos.skos/test/ta1' => + 'http://www.skosmos.skos/test/ta1' => array ( 'label' => 'Fish', ) ); $this->assertEquals($expected, $actual); } - + /** * @covers GenericSparql::queryTransitiveProperty * @covers GenericSparql::generateTransitivePropertyQuery @@ -698,22 +698,22 @@ public function testQueryTransitivePropertyLongerPath() { $actual = $this->sparql->queryTransitiveProperty('http://www.skosmos.skos/test/ta122', array('skos:broader'), 'en', '10'); $expected = array( - 'http://www.skosmos.skos/test/ta122' => + 'http://www.skosmos.skos/test/ta122' => array ( 'label' => 'Black sea bass', - 'direct' => + 'direct' => array ( 0 => 'http://www.skosmos.skos/test/ta116', ), ), - 'http://www.skosmos.skos/test/ta1' => + 'http://www.skosmos.skos/test/ta1' => array ( 'label' => 'Fish', ), - 'http://www.skosmos.skos/test/ta116' => + 'http://www.skosmos.skos/test/ta116' => array ( 'label' => 'Bass', - 'direct' => + 'direct' => array ( 0 => 'http://www.skosmos.skos/test/ta1', ), @@ -738,7 +738,7 @@ public function testQueryChildren() foreach ($expected as $uri) $this->assertArrayHasKey($uri, $actual_uris); } - + /** * @covers GenericSparql::queryChildren * @covers GenericSparql::generateChildQuery @@ -789,7 +789,7 @@ public function testQueryParentList() 'http://www.skosmos.skos/test/ta116' => array ( 'uri' => 'http://www.skosmos.skos/test/ta116', 'prefLabel' => 'Bass', - 'broader' => + 'broader' => array ( 0 => 'http://www.skosmos.skos/test/ta1', ), @@ -797,7 +797,7 @@ public function testQueryParentList() 'http://www.skosmos.skos/test/ta122' => array ( 'uri' => 'http://www.skosmos.skos/test/ta122', 'prefLabel' => 'Black sea bass', - 'broader' => + 'broader' => array ( 0 => 'http://www.skosmos.skos/test/ta116', ), @@ -896,7 +896,7 @@ public function testListConceptGroupContentsExcludingDeprecatedConcept() $this->assertEquals('http://www.skosmos.skos/groups/ta113', $actual[0]['uri']); $this->assertEquals(1, sizeof($actual)); } - + /** * @covers GenericSparql::listConceptGroupContents * @covers GenericSparql::generateConceptGroupContentsQuery @@ -989,7 +989,7 @@ public function testQueryConceptsWithExtraFields() $this->assertEquals(array('en' => 'Bass'), $actual[0]['prefLabels']); $this->assertEquals(array(0 => array('uri' => 'http://www.skosmos.skos/test/ta1')), $actual[0]['skos:broader']); } - + /** * @covers GenericSparql::querySuperProperties */ diff --git a/tests/GlobalConfigTest.php b/tests/GlobalConfigTest.php index b25f1bada..ad01b3985 100644 --- a/tests/GlobalConfigTest.php +++ b/tests/GlobalConfigTest.php @@ -2,8 +2,8 @@ class GlobalConfigTest extends PHPUnit\Framework\TestCase { - - private $config; + + private $config; protected function setUp() { putenv("LC_ALL=en_GB.utf8"); diff --git a/tests/JenaTextSparqlTest.php b/tests/JenaTextSparqlTest.php index 4f951e10e..0aa42df21 100644 --- a/tests/JenaTextSparqlTest.php +++ b/tests/JenaTextSparqlTest.php @@ -2,8 +2,8 @@ class JenaTextSparqlTest extends PHPUnit\Framework\TestCase { - private $model; - private $graph; + private $model; + private $graph; private $sparql; private $vocab; private $params; @@ -17,7 +17,7 @@ protected function setUp() { $this->params = $this->getMockBuilder('ConceptSearchParameters')->disableOriginalConstructor()->getMock(); $this->sparql = new JenaTextSparql('http://localhost:3030/ds/sparql', $this->graph, $this->model); } - + /** * @covers JenaTextSparql::__construct */ @@ -25,7 +25,7 @@ public function testConstructor() { $gs = new JenaTextSparql('http://localhost:3030/ds/sparql', $this->graph, $this->model); $this->assertInstanceOf('JenaTextSparql', $gs); } - + /** * @covers JenaTextSparql::generateAlphabeticalListQuery */ @@ -53,7 +53,7 @@ public function testQueryConceptsAlphabetical() { ); $this->assertEquals($expected, $actual); } - + /** * @covers JenaTextSparql::generateAlphabeticalListQuery */ @@ -75,7 +75,7 @@ public function testQueryConceptsAlphabeticalLimit() { ); $this->assertEquals($expected, $actual); } - + /** * @covers JenaTextSparql::generateAlphabeticalListQuery */ @@ -97,7 +97,7 @@ public function testQueryConceptsAlphabeticalLimitAndOffset() { ); $this->assertEquals($expected, $actual); } - + /** * @covers JenaTextSparql::generateAlphabeticalListQuery */ @@ -115,7 +115,7 @@ public function testQueryConceptsAlphabeticalSpecialChars() { $this->assertEquals(1, sizeof($actual)); $this->assertEquals('-"special" character \\example\\', $actual[0]['prefLabel']); } - + /** * @covers JenaTextSparql::generateAlphabeticalListQuery */ @@ -124,7 +124,7 @@ public function testQueryConceptsAlphabeticalNumbers() { $this->assertEquals(1, sizeof($actual)); $this->assertContains("3D", $actual[0]['prefLabel']); } - + /** * @covers JenaTextSparql::generateAlphabeticalListQuery */ @@ -146,7 +146,7 @@ public function testQueryConcepts() $this->assertEquals(1, sizeof($actual)); $this->assertEquals('Bass', $actual[0]['prefLabel']); } - + /** * @covers JenaTextSparql::createTextQueryCondition * @covers JenaTextSparql::generateConceptSearchQueryCondition diff --git a/tests/ModelTest.php b/tests/ModelTest.php index 0b02c5037..7fcf79168 100644 --- a/tests/ModelTest.php +++ b/tests/ModelTest.php @@ -4,7 +4,7 @@ class ModelTest extends PHPUnit\Framework\TestCase { private $params; private $model; - + protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); @@ -17,7 +17,7 @@ protected function setUp() { protected function tearDown() { $this->params = null; } - + /** * @covers Model::__construct */ @@ -25,7 +25,7 @@ public function testConstructorWithConfig() { new Model(new GlobalConfig('/../tests/testconfig.inc')); } - + /** * @covers Model::getVersion */ @@ -33,7 +33,7 @@ public function testGetVersion() { $version = $this->model->getVersion(); $this->assertNotEmpty($version); } - + /** * @covers Model::getVocabularyList */ @@ -43,7 +43,7 @@ public function testGetVocabularyList() { foreach($category as $vocab) $this->assertInstanceOf('Vocabulary', $vocab); } - + /** * @covers Model::getVocabularyCategories */ @@ -52,7 +52,7 @@ public function testGetVocabularyCategories() { foreach($categories as $category) $this->assertInstanceOf('VocabularyCategory', $category); } - + /** * @covers Model::getVocabulariesInCategory */ @@ -61,7 +61,7 @@ public function testGetVocabulariesInCategory() { foreach($category as $vocab) $this->assertInstanceOf('Vocabulary', $vocab); } - + /** * @covers Model::getVocabulary */ @@ -69,11 +69,11 @@ public function testGetVocabularyById() { $vocab = $this->model->getVocabulary('test'); $this->assertInstanceOf('Vocabulary', $vocab); } - + /** * @covers Model::getVocabulary * @expectedException \Exception - * @expectedExceptionMessage Vocabulary id 'thisshouldnotbefound' not found in configuration + * @expectedExceptionMessage Vocabulary id 'thisshouldnotbefound' not found in configuration */ public function testGetVocabularyByFalseId() { $vocab = $this->model->getVocabulary('thisshouldnotbefound'); @@ -87,7 +87,7 @@ public function testGetVocabularyByGraphUri() { $vocab = $this->model->getVocabularyByGraph('http://www.skosmos.skos/test/'); $this->assertInstanceOf('Vocabulary', $vocab); } - + /** * @covers Model::getVocabularyByGraph * @expectedException \Exception @@ -97,7 +97,7 @@ public function testGetVocabularyByInvalidGraphUri() { $vocab = $this->model->getVocabularyByGraph('http://no/address'); $this->assertInstanceOf('Vocabulary', $vocab); } - + /** * @covers Model::guessVocabularyFromURI */ @@ -106,7 +106,7 @@ public function testGuessVocabularyFromURI() { $this->assertInstanceOf('Vocabulary', $vocab); $this->assertEquals('test', $vocab->getId()); } - + /** */ public function testGuessVocabularyFromURIThatIsNotFound() { @@ -121,7 +121,7 @@ public function testGetDefaultSparql() { $sparql = $this->model->getDefaultSparql(); $this->assertInstanceOf('GenericSparql', $sparql); } - + /** * @covers Model::getSparqlImplementation */ @@ -129,7 +129,7 @@ public function testGetSparqlImplementation() { $sparql = $this->model->getSparqlImplementation('JenaText', 'http://api.dev.finto.fi/sparql', 'http://www.yso.fi/onto/test/'); $this->assertInstanceOf('JenaTextSparql', $sparql); } - + /** * @covers Model::searchConcepts */ @@ -138,7 +138,7 @@ public function testSearchWithEmptyTerm() { $result = $this->model->searchConcepts($this->params); $this->assertEquals(array(), $result); } - + /** * @covers Model::searchConcepts */ @@ -147,7 +147,7 @@ public function testSearchWithOnlyWildcard() { $result = $this->model->searchConcepts($this->params); $this->assertEquals(array(), $result); } - + /** * @covers Model::searchConcepts */ @@ -158,7 +158,7 @@ public function testSearchWithOnlyMultipleWildcards() { $this->params->method('getSearchTerm')->will($this->returnValue('******')); $this->assertEquals(array(), $result); } - + /** * @covers Model::searchConcepts * @expectedException PHPUnit\Framework\Error\Error @@ -186,7 +186,7 @@ public function testSearchConceptsWithOneVocabCaseInsensitivity() { $this->assertEquals('http://www.skosmos.skos/test/ta116', $result[0]['uri']); $this->assertEquals('Bass', $result[0]['prefLabel']); } - + /** * @covers Model::searchConcepts */ @@ -208,7 +208,7 @@ public function testSearchConceptsWithAllVocabsCaseInsensitivity() { $this->assertEquals('http://www.skosmos.skos/test/ta116', $result[0]['uri']); $this->assertEquals('Bass', $result[0]['prefLabel']); } - + /** * @covers Model::searchConcepts */ @@ -252,7 +252,7 @@ public function testSearchConceptsUnique() { $result = $this->model->searchConcepts($params); $this->assertCount(2, $result); } - + /** * @covers Model::searchConcepts */ @@ -265,7 +265,7 @@ public function testSearchConceptsIncludingDeprecated() { $this->assertCount(1, $result); $this->assertEquals('http://www.skosmos.skos/groups/ta111', $result[0]['uri']); } - + /** * @covers Model::searchConcepts */ @@ -280,7 +280,7 @@ public function testSearchConceptsWithOneVocabLanguageSubtag() { $this->assertEquals('http://www.skosmos.skos/subtag/p1', $result[0]['uri']); $this->assertEquals('Neighbour', $result[0]['prefLabel']); } - + /** * @covers Model::searchConceptsAndInfo */ @@ -290,12 +290,12 @@ public function testSearchConceptsAndInfoWithOneVocabCaseInsensitivity() { $this->assertEquals('http://www.skosmos.skos/test/ta116', $result['results'][0]->getUri()); $this->assertEquals(1, $result['count']); } - + /** * Test for issue #387: make sure namespaces defined in vocabularies.ttl are used for RDF export * @covers Model::getRDF */ - + public function testGetRdfCustomPrefix() { $result = $this->model->getRDF('prefix', 'http://www.skosmos.skos/prefix/p1', 'text/turtle'); $this->assertContains("@prefix my: .", $result); @@ -341,7 +341,7 @@ public function testGetRDFWithVocidAndURIasTurtle() { $expectedGraph->parse($expected, "turtle"); $this->assertTrue(EasyRdf\Isomorphic::isomorphic($resultGraph, $expectedGraph)); } - + /** * @covers Model::getRDF */ @@ -388,7 +388,7 @@ public function testGetRDFWithURIasTurtle() { */ public function testGetRDFWithVocidAndURIasJSON() { $result = $this->model->getRDF('test', 'http://www.skosmos.skos/test/ta116', 'application/json'); - + $resultGraph = new EasyRdf\Graph(); $resultGraph->parse($result, "jsonld"); $expected = '[{"@id":"http://www.skosmos.skos/test-meta/TestClass","http://www.w3.org/2000/01/rdf-schema#label":[{"@value":"Test class","@language":"en"}],"@type":["http://www.w3.org/2002/07/owl#Class"]},{"@id":"http://www.skosmos.skos/test/conceptscheme","http://www.w3.org/2000/01/rdf-schema#label":[{"@value":"Test conceptscheme","@language":"en"}],"@type":["http://www.w3.org/2004/02/skos/core#ConceptScheme"]},{"@id":"http://www.skosmos.skos/test/ta1","http://www.w3.org/2004/02/skos/core#prefLabel":[{"@value":"Fish","@language":"en"}],"@type":["http://www.skosmos.skos/test-meta/TestClass","http://www.w3.org/2004/02/skos/core#Concept"],"http://www.w3.org/2004/02/skos/core#narrower":[{"@id":"http://www.skosmos.skos/test/ta116"}]},{"@id":"http://www.skosmos.skos/test/ta116","http://www.w3.org/2004/02/skos/core#inScheme":[{"@id":"http://www.skosmos.skos/test/conceptscheme"}],"http://www.w3.org/2004/02/skos/core#broader":[{"@id":"http://www.skosmos.skos/test/ta1"}],"http://www.w3.org/2004/02/skos/core#prefLabel":[{"@value":"Bass","@language":"en"}],"@type":["http://www.skosmos.skos/test-meta/TestClass","http://www.w3.org/2004/02/skos/core#Concept"]},{"@id":"http://www.skosmos.skos/test/ta122","http://www.w3.org/2004/02/skos/core#broader":[{"@id":"http://www.skosmos.skos/test/ta116"}]},{"@id":"http://www.w3.org/2002/07/owl#Class"},{"@id":"http://www.w3.org/2004/02/skos/core#Concept"},{"@id":"http://www.w3.org/2004/02/skos/core#ConceptScheme"},{"@id":"http://www.w3.org/2004/02/skos/core#broader","http://www.w3.org/2000/01/rdf-schema#label":[{"@value":"has broader","@language":"en"}]},{"@id":"http://www.w3.org/2004/02/skos/core#prefLabel","http://www.w3.org/2000/01/rdf-schema#label":[{"@value":"preferred label","@language":"en"}]}]'; @@ -523,7 +523,7 @@ public function testGetLanguages() { $expected = array('English' => 'en'); $this->assertEquals($expected, $languages); } - + /** * @covers Model::getResourceFromUri * @covers Model::getResourceLabel @@ -534,7 +534,7 @@ public function testGetResourceFromUri() { $this->assertInstanceOf('EasyRdf\Resource', $resource); $this->assertEquals('http://www.yso.fi/onto/yso/p19378', $resource->getURI()); } - + /** * @covers Model::getResourceLabel */ @@ -547,7 +547,7 @@ public function testGetResourceLabelAcceptAnyLanguageWhenDesiredNotFound() { $mockres->method('label')->will($this->returnValueMap($labelmap)); $this->assertEquals('test value', $this->model->getResourceLabel($mockres, 'en')); } - + /** * @covers Model::getResourceLabel */ diff --git a/tests/PluginRegisterTest.php b/tests/PluginRegisterTest.php index a56e511e8..13db14b2f 100644 --- a/tests/PluginRegisterTest.php +++ b/tests/PluginRegisterTest.php @@ -2,7 +2,7 @@ class PluginRegisterTest extends PHPUnit\Framework\TestCase { - private $model; + private $model; private $concept; private $mockpr; @@ -22,7 +22,7 @@ public function testConstructor() $plugins = new PluginRegister(); $this->assertInstanceOf('PluginRegister', $plugins); } - + /** * @covers PluginRegister::getPlugins * @covers PluginRegister::getPluginsJS @@ -32,7 +32,7 @@ public function testGetPluginsJS() $plugins = new PluginRegister(); $this->assertEquals(array(), $plugins->getPluginsJS()); } - + /** * @covers PluginRegister::getPlugins * @covers PluginRegister::getPluginsJS @@ -43,7 +43,7 @@ public function testGetPluginsJSWithName() { $this->assertEquals(array('global-plugin' => array('plugins/global-plugin/everywhere.js'), 'test-plugin' => array('plugins/test-plugin/first.js', 'plugins/test-plugin/second.min.js')), $this->mockpr->getPluginsJS(array('test-plugin'))); } - + /** * @covers PluginRegister::getPlugins * @covers PluginRegister::getPluginsJS @@ -54,7 +54,7 @@ public function testGetPluginsJSWithGlobalPlugin() { $this->assertEquals(array('global-plugin' => array('plugins/global-plugin/everywhere.js')), $this->mockpr->getPluginsJS()); } - + /** * @covers PluginRegister::getPluginsCSS */ @@ -63,7 +63,7 @@ public function testGetPluginsCSS() $plugins = new PluginRegister(); $this->assertEquals(array(), $plugins->getPluginsCSS()); } - + /** * @covers PluginRegister::getPluginsCSS * @covers PluginRegister::filterPlugins @@ -74,7 +74,7 @@ public function testGetPluginsCSSWithName() $plugins = new PluginRegister(); $this->assertEquals(array('test-plugin' => array('plugins/test-plugin/stylesheet.css')), $this->mockpr->getPluginsCSS(array('test-plugin'))); } - + /** * @covers PluginRegister::getPluginsTemplates */ @@ -83,7 +83,7 @@ public function testGetPluginsTemplates() $plugins = new PluginRegister(); $this->assertEquals(array(), $plugins->getPluginsTemplates()); } - + /** * @covers PluginRegister::getTemplates */ @@ -92,7 +92,7 @@ public function testGetTemplates() $plugins = new PluginRegister(); $this->assertEquals(array(), $plugins->getTemplates()); } - + /** * @covers PluginRegister::getCallbacks */ diff --git a/tests/RequestTest.php b/tests/RequestTest.php index e0152088f..b232fdd88 100644 --- a/tests/RequestTest.php +++ b/tests/RequestTest.php @@ -4,7 +4,7 @@ class RequestTest extends PHPUnit\Framework\TestCase { private $model; private $request; - + protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); @@ -16,21 +16,21 @@ protected function setUp() { $this->model = new Model($config); $this->request = new Request($this->model); } - + /** * @covers Request::__construct */ public function testConstructor() { $this->assertInstanceOf('Request', new Request($this->model)); } - + /** * @covers Request::getQueryParamBoolean */ public function testGetQueryParamBooleanDefaultValue() { $this->assertTrue($this->request->getQueryParamBoolean('notfoundatall', true)); } - + /** * @covers Request::getVocabList */ @@ -42,7 +42,7 @@ public function testGetVocabList() { } } } - + /** * @covers Request::setVocabids * @covers Request::getVocabid @@ -51,7 +51,7 @@ public function testSetVocabids() { $this->request->setVocabids(array('testing', 'setter')); $this->assertEquals(array('testing', 'setter'), $this->request->getVocabid()); } - + /** * @covers Request::setVocab * @covers Request::getVocab @@ -60,7 +60,7 @@ public function testSetVocab() { $this->request->setVocab('test'); $this->assertInstanceOf('Vocabulary', $this->request->getVocab()); } - + /** * @covers Request::setVocab * @covers Request::getVocabid @@ -69,7 +69,7 @@ public function testSetVocabWithMultipleVocabularies() { $this->request->setVocab('test dates'); $this->assertEquals('test dates', $this->request->getVocabid()); } - + /** * @covers Request::getVocabid */ @@ -77,7 +77,7 @@ public function testGetVocabid() { $this->request->setVocab('test'); $this->assertEquals('test', $this->request->getVocabId()); } - + /** * @covers Request::setUri * @covers Request::getUri @@ -87,7 +87,7 @@ public function testSetAndGetUri() { $this->request->setUri('www.skosmos.org'); $this->assertEquals('www.skosmos.org', $this->request->getUri()); } - + /** * @covers Request::setContentLang * @covers Request::getContentLang @@ -98,7 +98,7 @@ public function testSetContentLang() { $clang = $this->request->setContentLang('en'); $this->assertEquals('en', $this->request->getContentLang()); } - + /** * @covers Request::setContentLang * @covers Request::verifyContentLang @@ -107,7 +107,7 @@ public function testSetContentLangWhenNoVocabularyAvailable() { $clang = $this->request->setContentLang('fi'); $this->assertEquals('fi', $this->request->getContentLang()); } - + /** * @covers Request::setContentLang * @covers Request::getContentLang @@ -118,7 +118,7 @@ public function testSetContentLangWithUnsupportedLanguage() { $clang = $this->request->setContentLang('ru'); $this->assertEquals('en', $this->request->getContentLang()); } - + /** * @covers Request::setLang * @covers Request::getLang @@ -128,7 +128,7 @@ public function testSetAndGetLang() { $clang = $this->request->setLang('en'); $this->assertEquals('en', $this->request->getLang()); } - + /** * @covers Request::getLetter */ @@ -136,7 +136,7 @@ public function testGetLetterWhenNotSet() { $this->request->setVocab('test'); $this->assertEquals('A', $this->request->getLetter()); } - + /** * @covers Request::setLetter * @covers Request::getLetter @@ -146,7 +146,7 @@ public function testSetAndGetLetter() { $this->request->setLetter('X'); $this->assertEquals('X', $this->request->getLetter()); } - + /** * @covers Request::setPage * @covers Request::getPage @@ -155,5 +155,5 @@ public function testSetAndGetPage() { $this->request->setPage('index'); $this->assertEquals('index', $this->request->getPage()); } - + } diff --git a/tests/VocabularyCategoryTest.php b/tests/VocabularyCategoryTest.php index b1a465e75..55e96b7ec 100644 --- a/tests/VocabularyCategoryTest.php +++ b/tests/VocabularyCategoryTest.php @@ -2,7 +2,7 @@ class VocabularyCategoryTest extends PHPUnit\Framework\TestCase { - private $model; + private $model; private $mockres; protected function setUp() { @@ -12,16 +12,16 @@ protected function setUp() { $this->mockres = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); $this->mockres->method('localName')->will($this->returnValue('local name')); } - + /** * @covers VocabularyCategory::__construct * @expectedException Exception - * @expectedExceptionMessage Invalid constructor parameter given to DataObject. + * @expectedExceptionMessage Invalid constructor parameter given to DataObject. */ public function testConstructorWithInvalidParameters() { new VocabularyCategory('invalid', 'invalid'); } - + /** * @covers VocabularyCategory::__construct */ @@ -29,7 +29,7 @@ public function testConstructor() { $cat = new VocabularyCategory($this->model, $this->mockres); $this->assertInstanceOf('VocabularyCategory', $cat); } - + /** * @covers VocabularyCategory::getVocabularies */ @@ -40,7 +40,7 @@ public function testGetVocabularies() { $this->assertInstanceOf('Vocabulary', $voc); } } - + /** * @covers VocabularyCategory::getTitle */ @@ -48,7 +48,7 @@ public function testGetTitle() { $cat = new VocabularyCategory($this->model, $this->mockres); $this->assertEquals('local name', $cat->getTitle()); } - + /** * @covers VocabularyCategory::getTitle */ diff --git a/tests/VocabularyConfigTest.php b/tests/VocabularyConfigTest.php index 0e00b91b4..d888703c5 100644 --- a/tests/VocabularyConfigTest.php +++ b/tests/VocabularyConfigTest.php @@ -2,8 +2,8 @@ class VocabularyConfigTest extends PHPUnit\Framework\TestCase { - - private $model; + + private $model; protected function setUp() { putenv("LC_ALL=en_GB.utf8"); @@ -19,7 +19,7 @@ public function testGetIndexClassesNotSet() { $actual = $vocab->getConfig()->getIndexClasses(); $this->assertEquals(array(), $actual); } - + /** * @covers VocabularyConfig::getIndexClasses */ @@ -29,7 +29,7 @@ public function testGetIndexClasses() { $expected = array('http://www.skosmos.skos/test-meta/TestClass','http://www.skosmos.skos/test-meta/TestClass2'); $this->assertEquals($expected, $actual); } - + /** * @covers VocabularyConfig::getLanguages */ @@ -38,7 +38,7 @@ public function testGetLanguages() { $langs = $vocab->getConfig()->getLanguages(); $this->assertEquals(2, sizeof($langs)); } - + /** * @covers VocabularyConfig::getFeedbackRecipient */ @@ -47,7 +47,7 @@ public function testGetFeedbackRecipient() { $email = $vocab->getConfig()->getFeedbackRecipient(); $this->assertEquals('developer@vocabulary.org', $email); } - + /** * @covers VocabularyConfig::getExternalResourcesLoading */ @@ -56,7 +56,7 @@ public function testGetExternalResourcesLoadingWhenNotSet() { $external = $vocab->getConfig()->getExternalResourcesLoading(); $this->assertTrue($external); } - + /** * @covers VocabularyConfig::getDefaultSidebarView */ @@ -74,7 +74,7 @@ public function testGetDefaultSidebarViewWhenNotSet() { $default = $vocab->getConfig()->getDefaultSidebarView(); $this->assertEquals('alphabetical', $default); } - + /** * @covers VocabularyConfig::getShowLangCodes */ @@ -83,7 +83,7 @@ public function testGetShowLangCodesWhenSetToTrue() { $codes = $vocab->getConfig()->getShowLangCodes(); $this->assertTrue($codes); } - + /** * @covers VocabularyConfig::getShowLangCodes */ @@ -92,7 +92,7 @@ public function testGetShowLangCodesWhenNotSet() { $codes = $vocab->getConfig()->getShowLangCodes(); $this->assertFalse($codes); } - + /** * @covers VocabularyConfig::getDefaultLanguage * @covers VocabularyConfig::getLiteral @@ -102,7 +102,7 @@ public function testGetDefaultLanguage() { $lang = $vocab->getConfig()->getDefaultLanguage(); $this->assertEquals('en', $lang); } - + /** * @covers VocabularyConfig::getDefaultLanguage * @expectedException PHPUnit\Framework\Error\Error @@ -111,7 +111,7 @@ public function testGetDefaultLanguageWhenNotSet() { $vocab = $this->model->getVocabulary('testdiff'); $lang = $vocab->getConfig()->getDefaultLanguage(); } - + /** * @covers VocabularyConfig::getAlphabeticalFull */ @@ -120,7 +120,7 @@ public function testGetFullAlphabeticalIndex() { $boolean = $vocab->getConfig()->getAlphabeticalFull(); $this->assertEquals(true, $boolean); } - + /** * @covers VocabularyConfig::getAlphabeticalFull */ @@ -129,7 +129,7 @@ public function testGetFullAlphabeticalIndexWhenNotSet() { $boolean = $vocab->getConfig()->getAlphabeticalFull(); $this->assertEquals(false, $boolean); } - + /** * @covers VocabularyConfig::getShortName * @covers VocabularyConfig::getLiteral @@ -139,7 +139,7 @@ public function testGetShortName() { $name = $vocab->getConfig()->getShortName(); $this->assertEquals('Test short', $name); } - + /** * @covers VocabularyConfig::getShortName */ @@ -148,17 +148,17 @@ public function testGetShortNameNotDefined() { $name = $vocab->getConfig()->getShortName(); $this->assertEquals('testdiff', $name); } - + /** * @covers VocabularyConfig::getDataURLs */ public function testGetDataURLs() { $vocab = $this->model->getVocabulary('groups'); $url = $vocab->getConfig()->getDataURLs(); - ksort($url); // sort by mime type to make order deterministic + ksort($url); // sort by mime type to make order deterministic $this->assertEquals(array( - 'application/rdf+xml' => 'http://skosmos.skos/dump/test/groups', - 'text/turtle' => 'http://skosmos.skos/dump/test/groups.ttl', + 'application/rdf+xml' => 'http://skosmos.skos/dump/test/groups', + 'text/turtle' => 'http://skosmos.skos/dump/test/groups.ttl', ), $url); } @@ -170,7 +170,7 @@ public function testGetDataURLsNotGuessable() { $vocab = $this->model->getVocabulary('test'); $url = $vocab->getConfig()->getDataURLs(); } - + /** * @covers VocabularyConfig::getDataURLs */ @@ -188,7 +188,7 @@ public function testGetGroupClassURI() { $uri = $vocab->getConfig()->getGroupClassURI(); $this->assertEquals('http://www.w3.org/2004/02/skos/core#Collection', $uri); } - + /** * @covers VocabularyConfig::getGroupClassURI */ @@ -197,7 +197,7 @@ public function testGetGroupClassURINotSet() { $uri = $vocab->getConfig()->getGroupClassURI(); $this->assertEquals(null, $uri); } - + /** * @covers VocabularyConfig::getArrayClassURI */ @@ -206,7 +206,7 @@ public function testGetArrayClassURI() { $uri = $vocab->getConfig()->getArrayClassURI(); $this->assertEquals('http://purl.org/iso25964/skos-thes#ThesaurusArray', $uri); } - + /** * @covers VocabularyConfig::getArrayClassURI */ @@ -215,7 +215,7 @@ public function testGetArrayClassURINotSet() { $uri = $vocab->getConfig()->getArrayClassURI(); $this->assertEquals(null, $uri); } - + /** * @covers VocabularyConfig::getShowHierarchy */ @@ -225,7 +225,7 @@ public function testGetShowHierarchy() { $this->assertEquals(true, $uri); } - + /** * @covers VocabularyConfig::getShowHierarchy */ @@ -234,7 +234,7 @@ public function testGetShowHierarchySetToFalse() { $uri = $vocab->getConfig()->getShowHierarchy(); $this->assertEquals(false, $uri); } - + /** * @covers VocabularyConfig::getShowHierarchy */ @@ -243,7 +243,7 @@ public function testGetShowHierarchyNotSet() { $uri = $vocab->getConfig()->getShowHierarchy(); $this->assertEquals(false, $uri); } - + /** * @covers VocabularyConfig::getAdditionalSearchProperties */ @@ -260,7 +260,7 @@ public function testHasMultiLingualProperty() { $vocab = $this->model->getVocabulary('dates'); $this->assertEquals(true, $vocab->getConfig()->hasMultiLingualProperty('skos:altLabel')); } - + /** * @covers VocabularyConfig::hasMultiLingualProperty */ @@ -268,7 +268,7 @@ public function testHasMultiLingualPropertyWhenItIsNot() { $vocab = $this->model->getVocabulary('dates'); $this->assertEquals(false, $vocab->getConfig()->hasMultiLingualProperty('skos:exactMatch')); } - + /** * @covers VocabularyConfig::getTitle */ @@ -346,7 +346,7 @@ public function testGetTypes() { $vocab = $this->model->getVocabulary('test'); $this->assertEquals(array(0 => array('uri' => 'http://publications.europa.eu/resource/authority/dataset-type/ONTOLOGY', 'prefLabel' => 'Ontology')), $vocab->getConfig()->getTypes('en')); } - + /** * @covers VocabularyConfig::getShowDeprecated */ diff --git a/tests/VocabularyDataObjectTest.php b/tests/VocabularyDataObjectTest.php index 5f4224938..29efe880d 100644 --- a/tests/VocabularyDataObjectTest.php +++ b/tests/VocabularyDataObjectTest.php @@ -12,8 +12,8 @@ public function testConstructorNoArguments() $mockmod = $this->getMockBuilder('Model')->disableOriginalConstructor()->getMock(); $mockvoc = $this->getMockBuilder('Vocabulary')->disableOriginalConstructor()->getMock(); $mockres = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); - $vocdao = new VocabularyDataObject($mockmod, $mockvoc, $mockres); + $vocdao = new VocabularyDataObject($mockmod, $mockvoc, $mockres); $this->assertInstanceOf('VocabularyDataObject', $vocdao); } - + } diff --git a/tests/VocabularyTest.php b/tests/VocabularyTest.php index 1631ab698..47b24336f 100644 --- a/tests/VocabularyTest.php +++ b/tests/VocabularyTest.php @@ -4,8 +4,8 @@ class VocabularyTest extends \PHPUnit\Framework\TestCase { - - private $model; + + private $model; protected function setUp() { putenv("LC_ALL=en_GB.utf8"); @@ -21,7 +21,7 @@ public function testGetId() { $id = $vocab->getId(); $this->assertEquals('test', $id); } - + /** * @covers Vocabulary::getTitle */ @@ -30,7 +30,7 @@ public function testGetTitle() { $title = $vocab->getTitle(); $this->assertEquals('Test ontology', $title); } - + /** * @covers Vocabulary::getEndpoint */ @@ -48,7 +48,7 @@ public function testGetGraph() { $graph = $vocab->getGraph(); $this->assertEquals('http://www.skosmos.skos/testdiff/', $graph); } - + /** * @covers Vocabulary::getSparql */ @@ -57,7 +57,7 @@ public function testGetSparql() { $sparql = $vocab->getSparql(); $this->assertInstanceOf('GenericSparql', $sparql); } - + /** * @covers Vocabulary::getSparql */ @@ -66,7 +66,7 @@ public function testGetSparqlWithDialect() { $sparql = $vocab->getSparql(); $this->assertInstanceOf('JenaTextSparql', $sparql); } - + /** * @covers Vocabulary::getUriSpace */ @@ -75,7 +75,7 @@ public function testGetUriSpace() { $sparql = $vocab->getUriSpace(); $this->assertEquals('http://www.skosmos.skos/onto/testdiff#', $sparql); } - + /** * @covers Vocabulary::getLocalName */ @@ -84,7 +84,7 @@ public function testGetLocalName() { $name = $vocab->getLocalName('http://www.skosmos.skos/onto/testdiff#concept23'); $this->assertEquals('concept23', $name); } - + /** * @covers Vocabulary::getConceptURI */ @@ -93,7 +93,7 @@ public function testGetConceptURI() { $name = $vocab->getConceptURI('concept23'); $this->assertEquals('http://www.skosmos.skos/onto/testdiff#concept23', $name); } - + /** * @covers Vocabulary::getConceptURI */ @@ -102,7 +102,7 @@ public function testGetConceptURIWhenGivenAReadyURI() { $name = $vocab->getConceptURI('http://www.skosmos.skos/onto/testdiff#concept23'); $this->assertEquals('http://www.skosmos.skos/onto/testdiff#concept23', $name); } - + /** * @covers Vocabulary::getDefaultConceptScheme */ @@ -111,7 +111,7 @@ public function testGetDefaultConceptScheme() { $cs = $vocab->getDefaultConceptScheme(); $this->assertEquals('http://www.skosmos.skos/testdiff#conceptscheme', $cs); } - + /** * @covers Vocabulary::getDefaultConceptScheme */ @@ -120,7 +120,7 @@ public function testGetDefaultConceptSchemeNotSet() { $cs = $vocab->getDefaultConceptScheme(); $this->assertEquals('http://www.skosmos.skos/test/conceptscheme', $cs); } - + /** * @covers Vocabulary::getConceptSchemes */ @@ -132,7 +132,7 @@ public function testGetConceptSchemesFromFuseki() { $this->assertEquals('Test conceptscheme', $label['label']); } } - + /** * @covers Vocabulary::getLabelStatistics */ @@ -143,7 +143,7 @@ public function testGetLabelStatistics() { $this->assertEquals(11, $labels['skos:prefLabel']); } } - + /** * @covers Vocabulary::getStatistics */ @@ -152,7 +152,7 @@ public function testGetStatistics() { $stats = $vocab->getStatistics(); $this->assertEquals(16, $stats['http://www.w3.org/2004/02/skos/core#Concept']['count']); } - + /** * @covers Vocabulary::listConceptGroups */ @@ -162,7 +162,7 @@ public function testListConceptGroups() { $expected = array (0 => array ('uri' => 'http://www.skosmos.skos/groups/fish', 'hasMembers' => true, 'childGroups' => array('http://www.skosmos.skos/groups/sub'), 'prefLabel' => 'Fish'), 1 => array ('uri' => 'http://www.skosmos.skos/groups/fresh', 'hasMembers' => true, 'prefLabel' => 'Freshwater fish'), 2 => array ('uri' => 'http://www.skosmos.skos/groups/salt', 'hasMembers' => true, 'prefLabel' => 'Saltwater fish'),3 => array ('uri' => 'http://www.skosmos.skos/groups/sub', 'hasMembers' => true, 'prefLabel' => 'Submarine-like fish')); $this->assertEquals($expected, $cgroups); } - + /** * @covers Vocabulary::listConceptGroupContents */ @@ -172,7 +172,7 @@ public function testListConceptGroupContents() { $expected = array (0 => array ('uri' => 'http://www.skosmos.skos/groups/ta113','isSuper' => false,'hasMembers' => false,'type' => array (0 => 'skos:Concept'),'prefLabel' => 'Flatfish')); $this->assertEquals($expected, $cgroups); } - + /** * @covers Vocabulary::getAlphabet */ @@ -220,7 +220,7 @@ public function testGetInfoWithVersionInfo() { $info = $vocab->getInfo(); $this->assertEquals(array('2016-02-11j14:05:26Z someone@skosmos.skos (r1197)'), $info['owl:versionInfo']); } - + /** * @covers Vocabulary::getInfo */ @@ -240,7 +240,7 @@ public function testSearchConceptsAlphabetical() { $this->assertEquals('Grouped fish', $concepts[0]['prefLabel']); $this->assertEquals('Guppy', $concepts[1]['prefLabel']); } - + /** * @covers Vocabulary::searchConceptsAlphabetical */ @@ -249,7 +249,7 @@ public function testSearchConceptsAlphabeticalExcludingDeprecated() { $concepts = $vocab->searchConceptsAlphabetical('T', null, null, 'en'); $this->assertCount(0, $concepts); } - + /** * @covers Vocabulary::searchConceptsAlphabetical */ @@ -300,10 +300,10 @@ public function testGetBreadCrumbs() { $vocabstub = $this->getMockBuilder('Vocabulary')->setMethods(array('getConceptTransitiveBroaders'))->setConstructorArgs(array($model, $resource))->getMock(); $vocabstub->method('getConceptTransitiveBroaders')->willReturn(array ( 'http://www.yso.fi/onto/yso/p4762' => array ( 'label' => 'objects', ), 'http://www.yso.fi/onto/yso/p1674' => array ( 'label' => 'physical whole', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p4762', ), ), 'http://www.yso.fi/onto/yso/p14606' => array ( 'label' => 'layers', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p1674', ), ), )); $result = $vocabstub->getBreadCrumbs('en', 'http://www.yso.fi/onto/yso/p14606'); - foreach($result['breadcrumbs'][0] as $crumb) + foreach($result['breadcrumbs'][0] as $crumb) $this->assertInstanceOf('Breadcrumb', $crumb); } - + /** * @covers Vocabulary::getBreadCrumbs * @covers Vocabulary::combineCrumbs @@ -327,7 +327,7 @@ public function testGetBreadCrumbsCycle() { $model = new Model(new GlobalConfig('/../tests/testconfig.inc')); $vocab = $model->getVocabulary('cycle'); $result = $vocab->getBreadCrumbs('en', 'http://www.skosmos.skos/cycle/ta4'); - foreach ($result['breadcrumbs'][0] as $crumb) + foreach ($result['breadcrumbs'][0] as $crumb) $this->assertInstanceOf('Breadcrumb', $crumb); } @@ -339,7 +339,7 @@ public function testGetTopConcepts() { $prop = $vocab->getTopConcepts(); $this->assertEquals(array (0 => array ('uri' => 'http://www.skosmos.skos/test/ta1','label' => 'Fish','hasChildren' => true, 'topConceptOf' => 'http://www.skosmos.skos/test/conceptscheme')), $prop); } - + /** * @covers Vocabulary::getChangeList */ @@ -350,7 +350,7 @@ public function testGetChangeList() { $this->assertEquals(array('December 2011', 'February 2010', 'January 2000'), array_keys($months)); $this->assertEquals($expected, $months['February 2010']); } - + /** * @covers Vocabulary::verifyVocabularyLanguage */ @@ -359,7 +359,7 @@ public function testVerifyVocabularyLanguage() { $this->assertEquals('en', $vocab->verifyVocabularyLanguage('en')); $this->assertEquals('en', $vocab->verifyVocabularyLanguage('de')); } - + /** * @covers Vocabulary::getShortName */ @@ -367,7 +367,7 @@ public function testGetShortName() { $vocab = $this->model->getVocabulary('test'); $this->assertEquals('Test short', $vocab->getShortName()); } - + /** * @covers Vocabulary::getConceptLabel */ @@ -376,7 +376,7 @@ public function testGetConceptLabel() { $lits = $vocab->getConceptLabel('http://www.skosmos.skos/test/ta112', 'en'); $this->assertEquals('Carp', $lits['en']->getValue()); } - + /** * @covers Vocabulary::getConfig */ @@ -384,7 +384,7 @@ public function testGetConfig() { $vocab = $this->model->getVocabulary('test'); $this->assertInstanceOf('VocabularyConfig', $vocab->getConfig()); } - + /** * @covers Vocabulary::listConceptGroups */ @@ -394,7 +394,7 @@ public function testListConceptGroupsNoGroupsDefined() { $vocab = new Vocabulary($this->model, $mockres); $this->assertEquals(array(), $vocab->listConceptGroups()); } - + /** * @covers Vocabulary::listConceptGroupContents */ @@ -404,7 +404,7 @@ public function testListConceptGroupContentsNoGroupFound() { $vocab = new Vocabulary($this->model, $mockres); $this->assertEquals(array(), $vocab->listConceptGroups()); } - + /** * @covers Vocabulary::getConceptNarrowers */ @@ -414,7 +414,7 @@ public function testGetConceptNarrowers() { $this->assertEquals(array('http://www.skosmos.skos/test/ta121' => array('label' => 'Crucian carp')), $narrowers); $this->assertEquals(1, sizeof($narrowers)); } - + /** * @covers Vocabulary::getConceptBroaders */ @@ -424,7 +424,7 @@ public function testGetConceptBroaders() { $this->assertEquals(array('http://www.skosmos.skos/test/ta1' => array('label' => 'Fish')), $broaders); $this->assertEquals(1, sizeof($broaders)); } - + /** * @covers Vocabulary::getConceptInfo */ From 4999faf1f5efbfcca85f0e8197062796a11013cc Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Tue, 23 Jan 2018 11:26:14 +0200 Subject: [PATCH 042/173] whoops --- model/Concept.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/Concept.php b/model/Concept.php index b7f457508..9f4ada55a 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -128,7 +128,7 @@ public function getLabel() return $label->getValue(); } return EasyRdf\Literal::create($label->getValue(), $label->getLang()); - + } // empty return ""; From 622d25ac838750844d4e10260ef33ea7554fdca2 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Tue, 23 Jan 2018 13:33:32 +0200 Subject: [PATCH 043/173] Cleaned for PR and made tests --- model/Concept.php | 49 +++++++++++++++++++++++------------ model/DataObject.php | 8 ++++++ tests/ConceptTest.php | 45 ++++++++++++++++++++++++++++++-- tests/test-vocab-data/cbd.ttl | 44 +++++++++++++++++++++++++++++++ tests/testvocabularies.ttl | 10 +++++++ 5 files changed, 138 insertions(+), 18 deletions(-) create mode 100644 tests/test-vocab-data/cbd.ttl diff --git a/model/Concept.php b/model/Concept.php index 2e94197d3..2abc5db8f 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -275,7 +275,7 @@ public function getFoundByType() * to $this->graph * @param EasyRdf\Resource $res */ - private function processExternalResource($res) + public function processExternalResource($res) { $exGraph = $res->getGraph(); // catch external subjects that have $res as object @@ -307,7 +307,6 @@ private function addExternalTriplesToGraph($res, &$seen, $props=null) if (array_key_exists($res->getUri(), $seen)) { return; } - $seen[$res->getUri()] = True; if ($res->isBNode() || is_null($props)) { @@ -340,36 +339,54 @@ private function addPropertyValues($res, $prop, &$seen) $this->addExternalTriplesToGraph($res2, $seen); } $this->graph->addResource($res, $prop, $res2); - $this->addReifications($res, $prop, $res2, $seen); + $this->addResourceReifications($res, $prop, $res2, $seen); } $litList = $res->allLiterals('<' . $prop . '>'); foreach ($litList as $lit) { - $datatypeRes = $res->getGraph()->resource($lit->getDatatypeUri()); - if ($datatypeRes->isBNode()) { - $this->addExternalTriplesToGraph($datatypeRes, $seen); - } - $this->graph->addLiteral($res, $prop, $lit); - $this->addReifications($res, $prop, $lit, $seen); + $this->addLiteralReifications($res, $prop, $lit, $seen); + } + } + + /** + * Adds reifications of a triple having a literal object to $this->graph + * @param EasyRdf\Resource $sub + * @param string $pred + * @param EasyRdf\Literal $obj + * @param string[] $seen Processed resources so far + */ + private function addLiteralReifications($sub, $pred, $obj, &$seen) + { + $pos_reifs = $sub->getGraph()->resourcesMatching("rdf:subject", $sub); + foreach ($pos_reifs as $pos_reif) { + $lit = $pos_reif->getLiteral("rdf:object", $obj->getLang()); + + if (!is_null($lit) && $lit->getValue() === $obj->getValue() && + $pos_reif->isA("rdf:Statement") && + $pos_reif->hasProperty("rdf:predicate", new EasyRdf\Resource($pred, $sub->getGraph()))) + { + $this->addExternalTriplesToGraph($pos_reif, $seen); + } } } /** - * Adds reifications of a triple to $this->graph + * Adds reifications of a triple having a resource object to $this->graph * @param EasyRdf\Resource $sub * @param string $pred - * @param EasyRdf\Resource|EasyRdf\Literal $obj + * @param EasyRdf\Resource $obj * @param string[] $seen Processed resources so far */ - private function addReifications($sub, $pred, $obj, &$seen) + private function addResourceReifications($sub, $pred, $obj, &$seen) { - $pos_reifs = $res->getGraph()->resourcesMatching("http://www.w3.org/1999/02/22-rdf-syntax#object", $obj); + $pos_reifs = $sub->getGraph()->resourcesMatching("rdf:subject", $sub); foreach ($pos_reifs as $pos_reif) { - if ($pos_reif->isA("http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement") && - $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#predicate", $pred) && - $pos_reif->hasProperty("http://www.w3.org/1999/02/22-rdf-syntax#subject", $sub)) { + if ($pos_reif->isA("rdf:Statement") && + $pos_reif->hasProperty("rdf:object", $obj) && + $pos_reif->hasProperty("rdf:predicate", new EasyRdf\Resource($pred, $sub->getGraph()))) + { $this->addExternalTriplesToGraph($pos_reif, $seen); } } diff --git a/model/DataObject.php b/model/DataObject.php index 121848923..d9cfd35d1 100644 --- a/model/DataObject.php +++ b/model/DataObject.php @@ -127,4 +127,12 @@ public function getEnvLang() // get language from locale, same as used by gettext, set by Controller return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore } + + /** + * Getter function for retrieving the resource. + */ + public function getResource() + { + return $this->resource; + } } diff --git a/tests/ConceptTest.php b/tests/ConceptTest.php index 2a44e8867..04296b0b4 100644 --- a/tests/ConceptTest.php +++ b/tests/ConceptTest.php @@ -4,6 +4,8 @@ class ConceptTest extends PHPUnit\Framework\TestCase { private $model; private $concept; + private $cbdVocab; + private $cbdGraph; protected function setUp() { putenv("LC_ALL=en_GB.utf8"); @@ -16,6 +18,11 @@ protected function setUp() { $this->vocab = $this->model->getVocabulary('test'); $results = $this->vocab->getConceptInfo('http://www.skosmos.skos/test/ta112', 'en'); $this->concept = reset($results); + + $this->cbdVocab = $this->model->getVocabulary('cbd'); + $this->cbdGraph = new EasyRdf\Graph(); + $this->cbdGraph->parseFile("tests/test-vocab-data/cbd.ttl", "turtle"); + } /** @@ -391,7 +398,7 @@ public function testGetPropertiesWithNarrowersPartOfACollection() } } } - + /** * @covers Concept::getProperties */ @@ -408,7 +415,6 @@ public function testGetPropertiesDefinitionLiteral() { * @covers Concept::getProperties * @covers ConceptProperty::getValues */ - public function testGetPropertiesDefinitionResource() { $vocab = $this->model->getVocabulary('test'); $concepts = $vocab->getConceptInfo('http://www.skosmos.skos/test/ta122', 'en'); @@ -417,4 +423,39 @@ public function testGetPropertiesDefinitionResource() { $propvals = $props['skos:definition']->getValues(); $this->assertEquals('The black sea bass (Centropristis striata) is an exclusively marine fish.', $propvals['The black sea bass (Centropristis striata) is an exclusively marine fish.http://www.skosmos.skos/test/black_sea_bass_def']->getLabel()); } + + /** + * @covers Concept::addResourceReifications + * @covers Concept::addLiteralReifications + */ + public function testExternalResourceReifications() { + $concepts = $this->cbdVocab->getConceptInfo('http://www.skosmos.skos/cbd/test2', 'en'); + $concept = $concepts[0]; + + $res = $this->cbdGraph->resource('http://www.skosmos.skos/cbd/test1'); + + $concept->processExternalResource($res); + $json = $concept->dumpJsonLd(); + $error_count = substr_count($json, "REIFICATION_ERROR"); + $this->assertEquals($error_count, 0); + } + + /** + * @covers Concept::processExternalResource + * @covers Concept::addExternalTriplesToGraph + * @covers Concept::addPropertyValues + */ + public function testProcessExternalResource() { + $concepts = $this->cbdVocab->getConceptInfo('http://www.skosmos.skos/cbd/test2', 'en'); + $concept = $concepts[0]; + + $res = $this->cbdGraph->resource('http://www.skosmos.skos/cbd/test1'); + + $concept->processExternalResource($res); + $json = $concept->dumpJsonLd(); + $this->assertContains('HY', $json); + $this->assertContains('AK', $json); + $this->assertContains('OS', $json); + $this->assertContains("CONTAINS", $json); + } } diff --git a/tests/test-vocab-data/cbd.ttl b/tests/test-vocab-data/cbd.ttl new file mode 100644 index 000000000..f33f1ac71 --- /dev/null +++ b/tests/test-vocab-data/cbd.ttl @@ -0,0 +1,44 @@ +@prefix dc: . +@prefix cbd: . +@prefix foaf: . +@prefix skos: . +@prefix rdf: . +@prefix rdfs: . +@prefix schema: . + +cbd:aboutTest schema:about cbd:test1 ; + rdfs:label "Schema about test" ; + rdfs:comment "CONTAINS due to schema about link to cbd:test1" . + +cbd:test2 rdf:type skos:Concept ; + skos:prefLabel "concept"@en ; + rdfs:comment "The concept to test the tests against (i.e., Concept)" . + +_:person schema:about cbd:test1 ; + rdfs:isDefinedBy [ a foaf:Person ; + foaf:name "OS"@en ] . + +cbd:test1 dc:contributor [ a foaf:Person ; + foaf:name "HY"@en ] ; + dc:creator [ a foaf:Person ; + foaf:name "AK"@en ] ; + rdf:type skos:Concept ; + skos:prefLabel "cbd blank node test"@en . + +[] a rdf:Statement ; + rdf:subject cbd:test1 ; + rdf:predicate skos:prefLabel ; + rdf:object "cbd blank node test"@en ; + dc:contributor _:person . + +[] a rdf:Statement ; + rdf:subject cbd:test1 ; + rdf:predicate skos:prefLabel ; + rdf:object "cbd blank node test" ; + rdfs:comment "REIFICATION_ERROR due to missing language tag." . + +[] a rdf:Statement ; + rdf:subject cbd:test1 ; + rdf:predicate skos:prefLabel ; + rdf:object "cbd blank node test"@fi ; + rdfs:comment "REIFICATION_ERROR due to wrong language tag." . diff --git a/tests/testvocabularies.ttl b/tests/testvocabularies.ttl index 5e824a2ea..c4495896d 100644 --- a/tests/testvocabularies.ttl +++ b/tests/testvocabularies.ttl @@ -190,6 +190,16 @@ skosmos:language "fi"; skosmos:sparqlGraph . +:cbd a skosmos:Vocabulary, void:Dataset ; + dc11:title "A vocabulary for testing blank node processing and reification"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/cbd/"; + skosmos:externalProperty dc11:contributor ; + skosmos:externalProperty dc11:creator ; + skosmos:externalProperty rdfs:comment ; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . dc:format "application/rdf+xml" . From ff411bbd8972f982caf6dd879424b0ffe087c779 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Tue, 23 Jan 2018 14:01:44 +0200 Subject: [PATCH 044/173] add build/ directory to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e524b3c8a..469422cc4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ config.inc vocabularies.ttl +build vendor report components From 3c1a5287520e11fdc107031b4eaea4da3c8d2971 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Wed, 24 Jan 2018 12:19:04 +0200 Subject: [PATCH 045/173] fixes #690 --- resource/js/docready.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resource/js/docready.js b/resource/js/docready.js index 79ddd94b8..d82a43f3a 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -649,6 +649,11 @@ $(function() { // DOCUMENT READY var hit = data.results[i]; if (!hit.hiddenLabel) { hasNonHiddenMatch[hit.uri] = true; + } else if (hit.hiddenLabel) { + if (hasNonHiddenMatch[hit.uri] === false) { + delete data.results[i]; + } + hasNonHiddenMatch[hit.uri] = false; } } var context = data['@context']; From 60690e355ed84d7ff925e0bd38537adef89d1d6c Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 26 Jan 2018 13:34:40 +0200 Subject: [PATCH 046/173] using the configurable fallback language for the REST API children function as well --- model/Vocabulary.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/Vocabulary.php b/model/Vocabulary.php index cb20f47e8..a4ed92566 100644 --- a/model/Vocabulary.php +++ b/model/Vocabulary.php @@ -314,7 +314,7 @@ public function getConceptHierarchy($uri, $lang) public function getConceptChildren($uri, $lang) { $lang = $lang ? $lang : $this->getEnvLang(); - $fallback = $this->config->getDefaultLanguage(); + $fallback = count($this->config->getLanguageOrder($lang)) > 1 ? $this->config->getLanguageOrder($lang)[1] : $this->config->getDefaultLanguage(); $props = $this->config->getHierarchyProperty(); return $this->getSparql()->queryChildren($uri, $lang, $fallback, $props); } From 795dcf598ac622f2258d780b247d7416aa266da6 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 26 Jan 2018 14:21:32 +0200 Subject: [PATCH 047/173] filtering out hiddenLabels always when the concept has been found earlier, related to #690 --- resource/js/docready.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/js/docready.js b/resource/js/docready.js index d82a43f3a..7fcb7c951 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -650,7 +650,7 @@ $(function() { // DOCUMENT READY if (!hit.hiddenLabel) { hasNonHiddenMatch[hit.uri] = true; } else if (hit.hiddenLabel) { - if (hasNonHiddenMatch[hit.uri] === false) { + if (hasNonHiddenMatch[hit.uri]) { delete data.results[i]; } hasNonHiddenMatch[hit.uri] = false; From e4c2538dd1e676bbffc1b6177cef3a4801d032d6 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 26 Jan 2018 16:03:33 +0200 Subject: [PATCH 048/173] fixes #692 --- view/light.twig | 2 -- 1 file changed, 2 deletions(-) diff --git a/view/light.twig b/view/light.twig index c24386b06..ee712e92c 100644 --- a/view/light.twig +++ b/view/light.twig @@ -91,7 +91,6 @@
{% trans "By scheme" %} - {% for uri,type in types %} {% endfor %} From a2b3dccc7ba7ffa623f8357c4bc0da702b6b0df1 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 26 Jan 2018 16:58:15 +0200 Subject: [PATCH 049/173] applying a band aid for the broken mobile screen vocabulary info layout, related to #691 --- resource/css/styles.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resource/css/styles.css b/resource/css/styles.css index c2b9305da..3503179a2 100644 --- a/resource/css/styles.css +++ b/resource/css/styles.css @@ -1784,7 +1784,17 @@ body, .versal, h1, h2, p, .versal-bold { } +@media (max-width: 340px) { + .vocab-info-literals > table > tbody > tr > th { + max-width: 120px; + } + .vocab-info-literals > table > tbody > tr > td { + max-width: 180px; + } +} + @media (max-width: 400px) { + #navi3 { display: none; } From ca4aac5c3f859d6494d1e1d0b74a69944e6f6f98 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Mon, 29 Jan 2018 14:27:46 +0200 Subject: [PATCH 050/173] recoded long URIs as shortened versions as requested --- model/Concept.php | 86 +++++++++++++++++++++-------------- model/Model.php | 3 +- resource/js/scripts.js | 4 +- tests/ConceptTest.php | 3 +- tests/test-vocab-data/cbd.ttl | 20 ++++++-- tests/testvocabularies.ttl | 1 + 6 files changed, 76 insertions(+), 41 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 75780bcbd..32c021978 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -46,27 +46,26 @@ class Concept extends VocabularyDataObject /** default external properties we are interested in saving/displaying from mapped external objects */ private $DEFAULT_EXT_PROPERTIES = array( - "http://purl.org/dc/elements/1.1/title", - "http://purl.org/dc/terms/title", - "http://www.w3.org/2004/02/skos/core#prefLabel", - "http://www.w3.org/2004/02/skos/core#exactMatch", - "http://www.w3.org/2004/02/skos/core#closeMatch", - "http://www.w3.org/2004/02/skos/core#inScheme", - "http://www.w3.org/2000/01/rdf-schema#label", - "http://www.w3.org/2000/01/rdf-schema#isDefinedBy", - "http://www.w3.org/2002/07/owl#sameAs", - "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", - "http://rdfs.org/ns/void#inDataset", - "http://rdfs.org/ns/void#sparqlEndpoint", - "http://rdfs.org/ns/void#uriLookupEndpoint", - "http://schema.org/about", - "http://schema.org/description", - "http://schema.org/inLanguage", - "http://schema.org/name", - "http://schema.org/isPartOf", - "http://www.wikidata.org/prop/direct/P31", - "http://www.wikidata.org/prop/direct/P625", - "http://wikiba.se/ontology-beta#wikiGroup" + "dc11:title", + "dcterms:title", + "skos:prefLabel", + "skos:exactMatch", + "skos:closeMatch", + "skos:inScheme", + "rdfs:label", + "rdfs:isDefinedBy", + "owl:sameAs", + "rdf:type", + "void:inDataset", + "void:sparqlEndpoint", + "void:uriLookupEndpoint", + "schema:about", + "schema:description", + "schema:inLanguage", + "schema:name", + "schema:isPartOf", + "wdt:P31", + "wdt:P625" ); /** @@ -275,7 +274,7 @@ public function processExternalResource($res) { $exGraph = $res->getGraph(); // catch external subjects that have $res as object - $extSubjects = $exGraph->resourcesMatching("http://schema.org/about", $res); + $extSubjects = $exGraph->resourcesMatching("schema:about", $res); $propList = array_unique(array_merge( $this->DEFAULT_EXT_PROPERTIES, @@ -285,9 +284,13 @@ public function processExternalResource($res) $seen = array(); $this->addExternalTriplesToGraph($res, $seen, $propList); - foreach ($extSubjects as $extSubject) { - $this->addExternalTriplesToGraph($extSubject, $seen, $propList); + if ($extSubject->isBNode() && array_key_exists($extSubject->getUri(), $seen)) { + // already processed, skip + continue; + } + $seen[$extSubject->getUri()] = 1; + $this->addExternalTriplesToGraph($extSubject, $seen, $propList); } } @@ -300,10 +303,10 @@ public function processExternalResource($res) */ private function addExternalTriplesToGraph($res, &$seen, $props=null) { - if (array_key_exists($res->getUri(), $seen)) { + if (array_key_exists($res->getUri(), $seen) && $seen[$res->getUri()] === 0) { return; } - $seen[$res->getUri()] = True; + $seen[$res->getUri()] = 0; if ($res->isBNode() || is_null($props)) { foreach ($res->propertyUris() as $prop) { @@ -817,14 +820,13 @@ public function getAllLabels($property) * Dump concept graph as JSON-LD. */ public function dumpJsonLd() { - $context = array( - 'skos' => 'http://www.w3.org/2004/02/skos/core#', - 'isothes' => 'http://purl.org/iso25964/skos-thes#', - 'rdfs' => 'http://www.w3.org/2000/01/rdf-schema#', - 'owl' => 'http://www.w3.org/2002/07/owl#', - 'dct' => 'http://purl.org/dc/terms/', - 'dc11' => 'http://purl.org/dc/elements/1.1/', + 'skos' => EasyRdf\RdfNamespace::get("skos"), + 'isothes' => EasyRdf\RdfNamespace::get("isothes"), + 'rdfs' => EasyRdf\RdfNamespace::get("rdfs"), + 'owl' =>EasyRdf\RdfNamespace::get("owl"), + 'dct' => EasyRdf\RdfNamespace::get("dcterms"), + 'dc11' => EasyRdf\RdfNamespace::get("dc11"), 'uri' => '@id', 'type' => '@type', 'lang' => '@language', @@ -838,7 +840,25 @@ public function dumpJsonLd() { 'narrower' => 'skos:narrower', 'related' => 'skos:related', 'inScheme' => 'skos:inScheme', + 'schema' => EasyRdf\RdfNamespace::get("schema"), + 'wd' => EasyRdf\RdfNamespace::get("wd"), + 'wdt' => EasyRdf\RdfNamespace::get("wdt"), ); + $vocabPrefix = preg_replace('/\W+/', '', $this->vocab->getId()); // strip non-word characters + $vocabUriSpace = $this->vocab->getUriSpace(); + + if (!in_array($vocabUriSpace, $context, true)) { + if (!isset($context[$vocabPrefix])) { + $context[$vocabPrefix] = $vocabUriSpace; + } + else if ($context[$vocabPrefix] !== $vocabUriSpace) { + $i = 2; + while (isset($context[$vocabPrefix . $i]) && $context[$vocabPrefix . $i] !== $vocabUriSpace) { + $i += 1; + } + $context[$vocabPrefix . $i] = $vocabUriSpace; + } + } $compactJsonLD = \ML\JsonLD\JsonLD::compact($this->graph->serialise('jsonld'), json_encode($context)); $results = \ML\JsonLD\JsonLD::toString($compactJsonLD); diff --git a/model/Model.php b/model/Model.php index a124481e8..10210880a 100644 --- a/model/Model.php +++ b/model/Model.php @@ -4,10 +4,11 @@ * Setting some often needed namespace prefixes */ EasyRdf\RdfNamespace::set('skosmos', 'http://purl.org/net/skosmos#'); -EasyRdf\RdfNamespace::set('void', 'http://rdfs.org/ns/void#'); EasyRdf\RdfNamespace::set('skosext', 'http://purl.org/finnonto/schema/skosext#'); EasyRdf\RdfNamespace::set('isothes', 'http://purl.org/iso25964/skos-thes#'); EasyRdf\RdfNamespace::set('mads', 'http://www.loc.gov/mads/rdf/v1#'); +EasyRdf\RdfNamespace::set('wd', 'http://www.wikidata.org/entity/'); +EasyRdf\RdfNamespace::set('wdt', 'http://www.wikidata.org/prop/direct/'); /** * Model provides access to the data. diff --git a/resource/js/scripts.js b/resource/js/scripts.js index 35e77af3c..a731d3f5f 100644 --- a/resource/js/scripts.js +++ b/resource/js/scripts.js @@ -251,7 +251,9 @@ function makeCallbacks(data, pageType) { var variables = data ? data.substring(data.indexOf('var uri ='), data.indexOf('var uriSpace =')).split('\n') : ''; var newUri = data ? variables[0].substring(variables[0].indexOf('"')+1, variables[0].indexOf(';')-1) : window.uri; var newPrefs = data ? JSON.parse(variables[1].substring(variables[1].indexOf('['), variables[1].lastIndexOf(']')+1)) : window.prefLabels; - var params = {'uri': newUri, 'prefLabels': newPrefs, 'page': pageType}; + var embeddedJsonLd = $('script[type="application/ld+json"]')[0] ? JSON.parse($('script[type="application/ld+json"]')[0].innerHTML) : {}; + + var params = {'uri': newUri, 'prefLabels': newPrefs, 'page': pageType, "json-ld": embeddedJsonLd}; if (window.pluginCallbacks) { for (var i in window.pluginCallbacks) { diff --git a/tests/ConceptTest.php b/tests/ConceptTest.php index 21fea496a..9af2ea2f5 100644 --- a/tests/ConceptTest.php +++ b/tests/ConceptTest.php @@ -456,6 +456,7 @@ public function testProcessExternalResource() { $this->assertContains('HY', $json); $this->assertContains('AK', $json); $this->assertContains('OS', $json); - $this->assertContains("CONTAINS", $json); + $contains_count = substr_count($json, "CONTAINS"); + $this->assertEquals($contains_count, 3); } } diff --git a/tests/test-vocab-data/cbd.ttl b/tests/test-vocab-data/cbd.ttl index f33f1ac71..5cc91cbb4 100644 --- a/tests/test-vocab-data/cbd.ttl +++ b/tests/test-vocab-data/cbd.ttl @@ -1,4 +1,4 @@ -@prefix dc: . +@prefix dc11: . @prefix cbd: . @prefix foaf: . @prefix skos: . @@ -10,6 +10,14 @@ cbd:aboutTest schema:about cbd:test1 ; rdfs:label "Schema about test" ; rdfs:comment "CONTAINS due to schema about link to cbd:test1" . +_:seenTest rdfs:label "Seen test" ; + rdfs:comment "CONTAINS; Just to checl that the $seen works properly" . + +_:aboutBlankTest schema:about cbd:test1; + rdfs:label "Schema about blank test" ; + rdfs:comment "CONTAINS; Already referenced from cbd:test1" ; + dc11:relation _:seenTest . + cbd:test2 rdf:type skos:Concept ; skos:prefLabel "concept"@en ; rdfs:comment "The concept to test the tests against (i.e., Concept)" . @@ -18,18 +26,20 @@ _:person schema:about cbd:test1 ; rdfs:isDefinedBy [ a foaf:Person ; foaf:name "OS"@en ] . -cbd:test1 dc:contributor [ a foaf:Person ; +cbd:test1 dc11:contributor [ a foaf:Person ; foaf:name "HY"@en ] ; - dc:creator [ a foaf:Person ; + dc11:creator [ a foaf:Person ; foaf:name "AK"@en ] ; rdf:type skos:Concept ; - skos:prefLabel "cbd blank node test"@en . + skos:prefLabel "cbd blank node test"@en ; + dc11:relation _:aboutBlankTest ; + dc11:relation _:seenTest . [] a rdf:Statement ; rdf:subject cbd:test1 ; rdf:predicate skos:prefLabel ; rdf:object "cbd blank node test"@en ; - dc:contributor _:person . + dc11:contributor _:person . [] a rdf:Statement ; rdf:subject cbd:test1 ; diff --git a/tests/testvocabularies.ttl b/tests/testvocabularies.ttl index 13425b692..bd0a5437c 100644 --- a/tests/testvocabularies.ttl +++ b/tests/testvocabularies.ttl @@ -197,6 +197,7 @@ void:uriSpace "http://www.skosmos.skos/cbd/"; skosmos:externalProperty dc11:contributor ; skosmos:externalProperty dc11:creator ; + skosmos:externalProperty dc11:relation ; skosmos:externalProperty rdfs:comment ; void:sparqlEndpoint ; skosmos:language "en"; From ca070f2ac36aac77794866a314bbe3f2bc4200e9 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Tue, 30 Jan 2018 12:35:21 +0200 Subject: [PATCH 051/173] only querying for concept info when the search has found some results, related to #696 --- model/Model.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/Model.php b/model/Model.php index a124481e8..28cc8534d 100644 --- a/model/Model.php +++ b/model/Model.php @@ -356,6 +356,7 @@ public function searchConceptsAndInfo($params) $count = sizeof($allhits); $hits = array_slice($allhits, $params->getOffset(), $params->getSearchLimit()); + $ret = array(); $uris = array(); $vocabs = array(); $uniqueVocabs = array(); @@ -372,7 +373,9 @@ public function searchConceptsAndInfo($params) $arrayClass = null; $sparql = $this->getDefaultSparql(); } - $ret = $sparql->queryConceptInfo($uris, $arrayClass, $vocabs, $params->getSearchLang()); + if (sizeof($uris) > 0) { + $ret = $sparql->queryConceptInfo($uris, $arrayClass, $vocabs, $params->getSearchLang()); + } // For marking that the concept has been found through an alternative label, hidden // label or a label in another language From 7f31cf01b7dfb377ded0a06eaade4cfadf0253f2 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Sun, 4 Feb 2018 14:12:53 +0200 Subject: [PATCH 052/173] fix #701 updates embedded json-ld data correctly --- resource/js/docready.js | 3 +++ resource/js/scripts.js | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/resource/js/docready.js b/resource/js/docready.js index 7fcb7c951..bf220a57b 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -260,6 +260,8 @@ $(function() { // DOCUMENT READY var response = $('.content', data).html(); if (window.history.pushState) { window.history.pushState({url: historyUrl}, '', historyUrl); } $content.append(response); + + updateJsonLD(data); updateTitle(data); updateTopbarLang(data); makeCallbacks(data); @@ -288,6 +290,7 @@ $(function() { // DOCUMENT READY $content.empty().append($('.content', data).html()); initHierarchyQtip(); $('#hier-trigger').attr('href', event.target.href); + updateJsonLD(data); updateTitle(data); updateTopbarLang(data); makeCallbacks(data); diff --git a/resource/js/scripts.js b/resource/js/scripts.js index a731d3f5f..06afe4dba 100644 --- a/resource/js/scripts.js +++ b/resource/js/scripts.js @@ -88,6 +88,17 @@ function updateContent(data) { $('.content').append(response); } +function updateJsonLD(data) { + var $jsonld = $('script[type="application/ld+json"]'); + if ($jsonld[0]) { + $jsonld[0].innerHTML = "{}"; + var $newJsonLD = $(data).filter('script[type="application/ld+json"]'); + if ($newJsonLD[0]) { + $jsonld[0].innerHTML = $newJsonLD[0].innerHTML; + } + } +} + function updateTopbarLang(data) { $('#language').empty(); var langBut = $('#language', data).html(); From 990d7851ba0a1c588ef3b7cd79843768be6f68e6 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Sun, 4 Feb 2018 14:16:35 +0200 Subject: [PATCH 053/173] add language ordering to passed through variables to javascript --- view/scripts.twig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/view/scripts.twig b/view/scripts.twig index c3c63822b..c8e31d2d5 100644 --- a/view/scripts.twig +++ b/view/scripts.twig @@ -25,6 +25,9 @@ var prefLabels = [{"lang": "{{ search_results|first.label.lang }}","label": "{{ var uriSpace = "{{ request.vocab.uriSpace }}"; {% endif %} var showNotation = {% if request.vocab and request.vocab.config.showNotation == false %}false{% else %}true{% endif %}; +{% if request.vocab %} +var languageOrder = [{% for lang in request.vocab.config.languageOrder(request.contentLang) %}"{{ lang }}"{% if not loop.last %},{% endif %}{% endfor %}]; +{% endif %} {% if request.page == 'page' and search_results and search_results|length == 1 %} From 787ebc0422e1f339c21e45b6d8dae9e8507db199 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 9 Feb 2018 10:52:56 +0200 Subject: [PATCH 054/173] fixing wrong translations --- .../translations/fi/LC_MESSAGES/skosmos.mo | Bin 11098 -> 11094 bytes resource/translations/skosmos_fi.mo | Bin 11098 -> 11094 bytes resource/translations/skosmos_fi.po | 2 +- resource/translations/skosmos_sv.mo | Bin 11065 -> 11068 bytes resource/translations/skosmos_sv.po | 2 +- .../translations/sv/LC_MESSAGES/skosmos.mo | Bin 11065 -> 11068 bytes 6 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resource/translations/fi/LC_MESSAGES/skosmos.mo b/resource/translations/fi/LC_MESSAGES/skosmos.mo index 3f794b9d2b24463dc75ba7558f58b6ec7846262b..697793fb49f498e93c0cd199a1cb16f7a4ffa17a 100644 GIT binary patch delta 1467 zcmXZbTS$~a7{>8gbk$PV%r(!pYI!P+wlK+4kad}2trn$dXl14nn_xkG1QD^O6oG^h zMPPapWMV>KMqn33QUtPk6BHQ)l1R{9^nd(5SoSwF`_AEgXLhM^q4D``xAoU$Oij8m z`No)ina1qI7L3FJjK({T_c5FPV~odHOu>&BhdjQNRXkq|UvE2!{iduLGwcrCRzzIykMcjfbsDnlFrFHUfJNmH%kE0T~iHaY>1RTw_ z>>s8WP{uPDi*IoQ&ZABq#;v%Fi5NvE22;_CIj9ZFP#IRE)~Q8`YwA%6bUEYKaU1XAR^Z;VG=4Z4K<#N8`1ClUWK}fgQ&OwDy{{!VGsJS4|N5@sJIDKBCjx# z{mncLP56RMxP%Jy=h>N6ARlvpFHLMmRiGbF;~-YzDr#N{7pqE?p%SY_U2QY+PR#|> zK|>hN{$_**$(wNv;Coc2VJyb)r~`U<(kgi}u0J}|c$w3$a{3L9CoqlQTTxeW1>JZ9 zwN41F*EEJ{Xv09hok1(=4m(kQzl+GjH`h=LKE(Yvjaq08i|`-n?GzT+kF^?i({Ds2 zb_?|=hf$Aou7LWhvB1C{{E52Lj6&NI%%ET6^iQHn*o|6v0Cl%BSb<^GMqW;{3v*GK zH{f18g}TDKsClDB)L$9BVc-xhp$_1q?wa679q=q_ydQOd5b{jSIJ)rzD(*8X?i=z? zHGfd?-W~S1-?0{5jE_yaVjB{ok9PG2yL*H8n$w>o9`5Y9)ayIe(bny&JfrrcCnM~N QsylbStuHwFJG0C4AKLJi5dZ)H delta 1471 zcmXZbT}abW7{~Fma{2y}y*S@j>6T^2Dn_h<6 z@3UxZrtuzi@(-wzP2(1fp-S}!Rq9n#g;KnBWr}eZ{X=*GYfnx!Tu!1^x zJd>oAK|>p6qe@bW3Jf~|HK+<)LY2G~mGNCvhW)6@4Wi;+p(^nXRl#x80X{kXuc(c` zBL}t2JPl>^4|Ra}-F6AHP=WcVaUUjO(D}Urbrq*jadoJ;Ce((V=*2szD;Pk%a#1>Qqdaw!mFpR6Hc>yj~l?b5{t3q9EBl1qo zP1Hf7n9BZUkOs+{5e?uBD$^M5!@sBlX7Z#}@@(9Abg1!=)30#)5yvZ-&F{^qtGI`5 ze1uvjiq<5J0UFw{&Sz)PjJm^i)ZecgdHCi5YQZ54;RI@-H7vnRe*5i|q8@7{2CyEL zSTE{P4xk?Cw4eH`F~`7RTt?k#;a=MS=F&gz^czqmyoFl$3F>aA@EFEW8+ka*LG+8gbk$PV%r(!pYI!P+wlK+4kad}2trn$dXl14nn_xkG1QD^O6oG^h zMPPapWMV>KMqn33QUtPk6BHQ)l1R{9^nd(5SoSwF`_AEgXLhM^q4D``xAoU$Oij8m z`No)ina1qI7L3FJjK({T_c5FPV~odHOu>&BhdjQNRXkq|UvE2!{iduLGwcrCRzzIykMcjfbsDnlFrFHUfJNmH%kE0T~iHaY>1RTw_ z>>s8WP{uPDi*IoQ&ZABq#;v%Fi5NvE22;_CIj9ZFP#IRE)~Q8`YwA%6bUEYKaU1XAR^Z;VG=4Z4K<#N8`1ClUWK}fgQ&OwDy{{!VGsJS4|N5@sJIDKBCjx# z{mncLP56RMxP%Jy=h>N6ARlvpFHLMmRiGbF;~-YzDr#N{7pqE?p%SY_U2QY+PR#|> zK|>hN{$_**$(wNv;Coc2VJyb)r~`U<(kgi}u0J}|c$w3$a{3L9CoqlQTTxeW1>JZ9 zwN41F*EEJ{Xv09hok1(=4m(kQzl+GjH`h=LKE(Yvjaq08i|`-n?GzT+kF^?i({Ds2 zb_?|=hf$Aou7LWhvB1C{{E52Lj6&NI%%ET6^iQHn*o|6v0Cl%BSb<^GMqW;{3v*GK zH{f18g}TDKsClDB)L$9BVc-xhp$_1q?wa679q=q_ydQOd5b{jSIJ)rzD(*8X?i=z? zHGfd?-W~S1-?0{5jE_yaVjB{ok9PG2yL*H8n$w>o9`5Y9)ayIe(bny&JfrrcCnM~N QsylbStuHwFJG0C4AKLJi5dZ)H delta 1471 zcmXZbT}abW7{~Fma{2y}y*S@j>6T^2Dn_h<6 z@3UxZrtuzi@(-wzP2(1fp-S}!Rq9n#g;KnBWr}eZ{X=*GYfnx!Tu!1^x zJd>oAK|>p6qe@bW3Jf~|HK+<)LY2G~mGNCvhW)6@4Wi;+p(^nXRl#x80X{kXuc(c` zBL}t2JPl>^4|Ra}-F6AHP=WcVaUUjO(D}Urbrq*jadoJ;Ce((V=*2szD;Pk%a#1>Qqdaw!mFpR6Hc>yj~l?b5{t3q9EBl1qo zP1Hf7n9BZUkOs+{5e?uBD$^M5!@sBlX7Z#}@@(9Abg1!=)30#)5yvZ-&F{^qtGI`5 ze1uvjiq<5J0UFw{&Sz)PjJm^i)ZecgdHCi5YQZ54;RI@-H7vnRe*5i|q8@7{2CyEL zSTE{P4xk?Cw4eH`F~`7RTt?k#;a=MS=F&gz^czqmyoFl$3F>aA@EFEW8+ka*LG+9sDPe4V^S~==`vvqV;y?13s+z_ zDuL^HmfaYnLmPRB%HRnu!AVqRQ>X>zP#JwkjrZo;-|46XiclLaM^&a08EST-ACI8M zoyS$!XVFlphfouSQ5lS*52sO?&Y~9nj0)rm+T#MKKp||z?Whf3!z#RwD)~HW-U2E? zcY&>yP9s1^K5A!GsD)}#8SX=sEP@=TIfL5h71RcYa4C+W#!sN)yh2stgY*5-`TrAY z-WMc}Wq#3603Qdhz*(q3rH*B&2^&#IQtMccx+Be~jM`Bf?L^J*!$Q1@O6WPNl5bJt zW-*cV%{Lk<(IV>7{6<}t0JC*8g;<2es8ZLX7C4LtFoqR4jmq4!#$G4`^$H458>mLT zvR#;pUFv6j(@UcmZ=!DHYg8p>oc?*#nWnC_GcH60u0RE9aQY*tji15}QZ^7Eq#ZAIOwX4G>% zflBN)Zomhqjm;HNe+BqS2iL$PQwDv9Q6<}kLEM9?$Z5wO)cAhX*^gm4zCq3Viy_RU z-pYInhOrL+mmZZ^Zwd9+`@BI%4UVBQaF^N>a#8QT4s{75s7us=6wRE)B)o&#;4tcP zjU(5=%wRq)qMo&%U1{MGbm83*m$xCsv-@Z)-X4oz+Mj(Zt)?w{JQi#`*wP-XKBV@D aFYwNlykl}Oda^AZZHu$dfDa_D_#7 zRawTA8e=MRj0xc}^x;+XW1s6?4ALLQWPFY3IDx77376tmB&7L+D=?Vr%nxB4{R&i^ zZMnua2{aBepp6dU8a$56u^Z#@7G~lAuE!Ucf^)75sDQpaV*;3s44Dv?VHlTSCuU$5 zDuJ7Mw$m73KnHn@${>b`_zIWdd(;LqsEod&<|pPm{QxR~0@Q)aQI)AcrkZ`Y3R_U~ zF5^ng&^mn5Ud;_=RBUH&}QS0VV z33^vM+5sBb4CJ6rR*BlE8kON;RLL5V>ogZo2kk>0a1fJl1U3I9D$W~JB_`eeNB95F zsCDy59NYY&p#Xj^UV$@Efr?$rPzyGruB6(v2K7cFsEkgc4%&fQ--~PUIx3-Os7g+t z=1rrI{mnNTD$xS!(fmd|mP}UbYAh_qLe!nrpf+g6qj(y(;5aICUxBkx8tN;^Lmgl% zmSQcYVW-B~-}KNZ!8@o|`4&})DR+Dpb*CwXPR150@FrBCI(NJgb?_+0;YHL}(}g-% zKl*SGRq-LTM`(=Dh{x6_#ZgoS-gVA`EYx=&Mm@qt)FWy`ie@fh0zN<;a0vCd z#*pV=rZ68DP@ij%Q)%NO^x(so$6p^vuB+W2whpwmoQU=v$+{m{>^3wvow0VbojuhW WOUa(}B<^WH*A$I5S+V(?`qclj%a9sDPe4V^S~==`vvqV;y?13s+z_ zDuL^HmfaYnLmPRB%HRnu!AVqRQ>X>zP#JwkjrZo;-|46XiclLaM^&a08EST-ACI8M zoyS$!XVFlphfouSQ5lS*52sO?&Y~9nj0)rm+T#MKKp||z?Whf3!z#RwD)~HW-U2E? zcY&>yP9s1^K5A!GsD)}#8SX=sEP@=TIfL5h71RcYa4C+W#!sN)yh2stgY*5-`TrAY z-WMc}Wq#3603Qdhz*(q3rH*B&2^&#IQtMccx+Be~jM`Bf?L^J*!$Q1@O6WPNl5bJt zW-*cV%{Lk<(IV>7{6<}t0JC*8g;<2es8ZLX7C4LtFoqR4jmq4!#$G4`^$H458>mLT zvR#;pUFv6j(@UcmZ=!DHYg8p>oc?*#nWnC_GcH60u0RE9aQY*tji15}QZ^7Eq#ZAIOwX4G>% zflBN)Zomhqjm;HNe+BqS2iL$PQwDv9Q6<}kLEM9?$Z5wO)cAhX*^gm4zCq3Viy_RU z-pYInhOrL+mmZZ^Zwd9+`@BI%4UVBQaF^N>a#8QT4s{75s7us=6wRE)B)o&#;4tcP zjU(5=%wRq)qMo&%U1{MGbm83*m$xCsv-@Z)-X4oz+Mj(Zt)?w{JQi#`*wP-XKBV@D aFYwNlykl}Oda^AZZHu$dfDa_D_#7 zRawTA8e=MRj0xc}^x;+XW1s6?4ALLQWPFY3IDx77376tmB&7L+D=?Vr%nxB4{R&i^ zZMnua2{aBepp6dU8a$56u^Z#@7G~lAuE!Ucf^)75sDQpaV*;3s44Dv?VHlTSCuU$5 zDuJ7Mw$m73KnHn@${>b`_zIWdd(;LqsEod&<|pPm{QxR~0@Q)aQI)AcrkZ`Y3R_U~ zF5^ng&^mn5Ud;_=RBUH&}QS0VV z33^vM+5sBb4CJ6rR*BlE8kON;RLL5V>ogZo2kk>0a1fJl1U3I9D$W~JB_`eeNB95F zsCDy59NYY&p#Xj^UV$@Efr?$rPzyGruB6(v2K7cFsEkgc4%&fQ--~PUIx3-Os7g+t z=1rrI{mnNTD$xS!(fmd|mP}UbYAh_qLe!nrpf+g6qj(y(;5aICUxBkx8tN;^Lmgl% zmSQcYVW-B~-}KNZ!8@o|`4&})DR+Dpb*CwXPR150@FrBCI(NJgb?_+0;YHL}(}g-% zKl*SGRq-LTM`(=Dh{x6_#ZgoS-gVA`EYx=&Mm@qt)FWy`ie@fh0zN<;a0vCd z#*pV=rZ68DP@ij%Q)%NO^x(so$6p^vuB+W2whpwmoQU=v$+{m{>^3wvow0VbojuhW WOUa(}B<^WH*A$I5S+V(?`qclj%a Date: Fri, 9 Feb 2018 12:32:42 +0200 Subject: [PATCH 055/173] using a more specific selector for the sidebar custom scrollbar --- resource/js/hierarchy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/js/hierarchy.js b/resource/js/hierarchy.js index 19b069381..719c9775c 100644 --- a/resource/js/hierarchy.js +++ b/resource/js/hierarchy.js @@ -39,7 +39,7 @@ function invokeParentTree(tree) { }); $treeObject.on('loaded.jstree', function() { - if ($('.mCustomScrollbar').length === 0) { + if ($('#sidebar .mCustomScrollbar').length === 0) { $(".sidebar-grey").mCustomScrollbar(hierTreeConf); } if ($('.jstree-leaf-proper').length > 0) { From 3809d265e957afe0513127d86890459e8e4ed781 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 9 Feb 2018 12:55:21 +0200 Subject: [PATCH 056/173] fixing a bug with displaying language codes for fallback labels --- view/concept-shared.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/concept-shared.twig b/view/concept-shared.twig index bae3b37ae..b6b2c0afb 100644 --- a/view/concept-shared.twig +++ b/view/concept-shared.twig @@ -86,7 +86,7 @@ {% if propval.notation %}{{ propval.notation }} {% endif %} {{ propval.label(request.contentLang) }} {% endif %} {% endif %} - {% if propval.label.lang and (propval.label.lang != request.lang or explicit_langcodes) %} ({{ propval.label(request.contentLang).lang }}){% endif %} + {% if propval.label.lang and (propval.label.lang != request.contentLang or explicit_langcodes) %} ({{ propval.label(request.contentLang).lang }}){% endif %} {% if propval.SubMembers %}
{# if property is a group concept that has sub properties #} {% for sub_member in propval.SubMembers %} {{ sub_member.label(request.contentLang) }} From b2d64a05624af5e865a226e00255d1cf7b5a34d2 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 9 Feb 2018 13:00:59 +0200 Subject: [PATCH 057/173] using the configured languages as fallbacks too --- model/VocabularyConfig.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/model/VocabularyConfig.php b/model/VocabularyConfig.php index acb021104..0c455fe6a 100644 --- a/model/VocabularyConfig.php +++ b/model/VocabularyConfig.php @@ -487,6 +487,11 @@ public function getLanguageOrder($clang) if (!in_array($this->getDefaultLanguage(), $ret)) { $ret[] = (string)$this->getDefaultLanguage(); } + foreach ($this->getLanguages() as $lang) { + if (!in_array($lang, $ret)) { + $ret[] = $lang; + } + } return $ret; } } From 2f57b9e83009028e2492e56204bce56304717be6 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 9 Feb 2018 13:25:20 +0200 Subject: [PATCH 058/173] fixing false language tags sometimes appearing with mapping concepts --- view/concept-shared.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/concept-shared.twig b/view/concept-shared.twig index b6b2c0afb..11af60311 100644 --- a/view/concept-shared.twig +++ b/view/concept-shared.twig @@ -184,7 +184,7 @@
{% if propval.notation %}{{ propval.notation }}{% endif %}{{ propval.label(request.contentLang) }} - {% if propval.label.lang and (propval.label.lang != request.contentLang) or (explicit_langcodes and propval.label.lang) %} ({{ propval.label(request.contentLang).lang }}){% endif %} + {% if propval.label.lang and (propval.label(request.contentLang).lang != request.contentLang) or (explicit_langcodes and propval.label.lang) %} ({{ propval.label(request.contentLang).lang }}){% endif %}
{% set vocabname = propval.vocabname %} {% if vocabname %} From 9cf8cafd63a7bb80664c68455817bdfa50a732d1 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Wed, 14 Feb 2018 01:24:59 +1300 Subject: [PATCH 059/173] Issue #661 add a copy to clipboard button --- resource/js/docready.js | 15 +++++++++++++-- view/concept-shared.twig | 5 +++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/resource/js/docready.js b/resource/js/docready.js index bf220a57b..b464c0464 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -94,8 +94,8 @@ $(function() { // DOCUMENT READY countAndSetOffset(); // Make a selection of an element for copy pasting. - function makeSelection() { - var $clicked = $(this); + function makeSelection(e, elem) { + var $clicked = elem || $(this); var text = $clicked[0]; var range; if (document.body.createTextRange) { // ms @@ -127,6 +127,17 @@ $(function() { // DOCUMENT READY $(document).on('click','.uri-input-box', makeSelection); + // copy to clipboard + function copyToClipboard() { + var $btn = $(this); + var id = $btn.attr('for'); + $elem = $(id); + makeSelection(undefined, $elem); + document.execCommand('copy'); + } + + $(document).on('click', 'button.copy-clipboard', copyToClipboard); + var sidebarResizer = debounce(function() { countAndSetOffset(); }, 40); diff --git a/view/concept-shared.twig b/view/concept-shared.twig index 11af60311..7185b532d 100644 --- a/view/concept-shared.twig +++ b/view/concept-shared.twig @@ -49,7 +49,8 @@
{% else %}
{% if concept.notation %}{{ concept.notation }}{% endif %} - {% if concept.hasXlLabel %}
{% for key, val in concept.xlLabel.properties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{{ concept.xlLabel }}{% else %}{{ concept.label }}{% if concept.label.lang != request.contentLang and concept.label.lang != '' %} ({{ concept.label.lang }}){% endif %}{% endif %} + {% if concept.hasXlLabel %}
{% for key, val in concept.xlLabel.properties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{{ concept.xlLabel }}{% else %}{{ concept.label }}{% if concept.label.lang != request.contentLang and concept.label.lang != '' %} ({{ concept.label.lang }}){% endif %}{% endif %} +  
{% endif %}
@@ -158,7 +159,7 @@ {% endif %}
URI
-
{{ concept.uri }}
+
{{ concept.uri }}
{% trans %}Download this concept in SKOS format:{% endtrans %}
From 40bef30f29157d5b7c481b8c3ffdd7916d4ec757 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Tue, 13 Feb 2018 16:52:37 +0200 Subject: [PATCH 060/173] Add Dutch translations by @mrvdries and @ismakutl. Fixes #710 --- .../translations/nl/LC_MESSAGES/skosmos.mo | Bin 0 -> 11231 bytes resource/translations/skosmos_nl.po | 810 ++++++++++++++++++ 2 files changed, 810 insertions(+) create mode 100644 resource/translations/nl/LC_MESSAGES/skosmos.mo create mode 100644 resource/translations/skosmos_nl.po diff --git a/resource/translations/nl/LC_MESSAGES/skosmos.mo b/resource/translations/nl/LC_MESSAGES/skosmos.mo new file mode 100644 index 0000000000000000000000000000000000000000..1d205d64b0759e343502dbd17b7a5d666da2bb0b GIT binary patch literal 11231 zcmai(4Uim1b;k!RVOtms#=+QpWF-4+N%o#jGM2;|Ve53VBrI97?kpK6pv>;{?T&7C zW<4`|rxTbM66`=sY#eNChY*|?OdzI`a*7Z_B~?JGoK)fzR6;)ZNQID4gd~K7K=GC2 z_wVl6-IIi~rFXySkLiB>`t|GX(U&h+^+3SyqsYsUdsYX**WnM>@Q2^~pC1I5!bjmX z@Q>kH@CT5p!T&;4U44EKyac`go(ng?3*gm|f58p>IR_qrDnI6#z_Ur0@VW4f@P+Vh z_yYK_&;KxdDd~^-{Lex4|BrA2e%AO7dhidnIQ0;xl zr#}wW@28;J`K;#`q1yi%)O`IHl%7BI<*R32RG`KndVB$DKELJD=aEqPIw<|GhS{@&;5v9E>5mc=u7iIE6>l$jxm&NV z@VpeRBY!>A{M`sOz9Ue2Bv9kL!twteFx$)!H?j2cp*Vd>tqMicy>dTAAxG82e-gG;1v9AsQ&)}s@}gq>HjQ(liE2C zN{Co-B9!TI;e4UAf^p^Q0?FC^Y4Sw<3YFcXpF z56Z5OK(+fglpY`R>8GK__a!Jjz5z9kZ$r)VDkfj)i=gat1(f}+_Po|}7nFT&gzE2R zpZ^A^am_>Ne>+rvcR|_x-B9{|0IL5F`}`+;`ZG}d{kc#7l}~>es-1s^djH#SJ^UWj zyshIfA-~)TWykBG^g9ey|5msQz8-2^k3!AM6Hx8^F4VZc1f|!%!5n@E&cgZ2T>qc& zdj z@}KiCj`&ij`P&HPPuD`NzgZ}|-vwU-?}M86zkn>k;H&Ue@T?84-VP|c?18HHI;i$D zsCl^q$`9WTrO$hz^!X&zd*Ait=WcZ4co{s0{L7%;Yj|D{ap_!Ug-UwAb3*{dMO0NM_`wu|b<@cbSH;CDT$C2Gg{gW+z1JPW* z8u=)q-yIIYuX@&a6AwRyY(`|K0ixdwBD?>J68xl-^pTI=i983n8PQL1;+K%y5yg&M zkOE1Ow<5oeydFuAS0eh!COX&EznwhDPkz&9Fg*LK_`Bqv_j>*!d=$A6X&{G?-$HgF zKa1=`4A;^_o3jo`Yc{q~b{90?Km+glLL>mKARv`G z-#mgSRxBgWM%E#(L+alm5At2b8~xse#P%r&egWR+pS$oeWIb{&qPTY#B7d%bzsAGQ zAd`spqk9p>rTQ1~@IamL+yT!X%UjFy)yOqI?``lT@^0i|$vohF~XKmB3!jwt_2B3^8 zYFFW)Tx*|cG>o!1boNd#lwsSqo@C+djR$9C&R$eCPpP$- zx1-h|jf&+kDs9D0hi7hR2D=-*C`n<)aBBrLa-XxD4~o#(N?{bo%vm{Jl0{g-&)4C4 zmcp^lG*5Pt*4EYLXgpl!=6hW@EXVv~@2w4PFeYwA?SX2nmM zeYV!$YtnwOH;H5Fxe45xn8FtA(-7yQwi(%Tzlj!^Xqj<7F=-sOF!e&PUz6vJ5$wm( zN!FAz9o!XI> zb>G1p%VQzLmF!x#E;Z~`tK9p2zsMJpm~m%ALr(Ipk-bZ0${x0fQyt%?N8M>j9*NR{ zeNVw7ku|l#h#c1C2py)^ua<)&^}1k|RwS&;3`>`BG`FxAf6#6>qpB*B)Dl$Pt z!{MW=5tFB^*p%%eu~V$1Q(I5;l~s6~u?;5WVM9P{n|ONJmXdass?+7b^)WOoZPY{J zv6shc%&O5Jw9=$xs?<_pQXBc)v+cu*s~bu97OX!?uAqHvPi1t#Rh_XujFadq#UkU{n67Fi9s1sW`tsYMC^& zonfYx*=1mt6bm9y1yeYsx|mP9*m8pnC2FN6ZrJye?3ldp*w9!>nX}}}rjPzMLfZifDP5-6{w+rr2XLQzY$Ev-f3X6)}Shyl%(8a40IUL$YXw1zE%g3;cn+sgyH;VEY2e!m>c@cZUij^97Wa_scw zOKG!YIqfV1J^C=Sk7W@Q@qE+PsUO^QkSbX?y&kTuI%PA}oVv%-n4M{v2QI!GGbf^6 zKQ+fHbD|=>nJNzu76wG&ccDHYIj|gQTo(Mxclgh z+NEqx+a4j<7>ujYPV>@?wK+cNUA5>C&qgBIb-ja?YwVBLmMW?s#HUJ9Gthk;8x9kiyKGW zKHm&yog!=4De|If94I?U+?XD8%EnyY4A&ewIM>*vy$AqlehAwIxIxDPGWs@I?$~l|=pJ{h&%(7k!p$45U2|*0ZX3>ShjOj@ zaP#E$$!(LHDRUW(>8NBsth&u`a&pt;h+2*G18&#ojS)8%P zmL?};4mD$i_VmgXNk(XfgK8ctocS_{3+WcXh43qPKIEJ+)@+b6%_DYG23>YG4P*h0ID-ISQYQgD=Wt=j{$U@l@`mlF}1 z4KH#^9Ni8X&dJ;?gjHP$PjiW#oCtVvcqfd_N!=9e_BD11wAo8o7K5b8ab|*}{^%k& zya&pA!{f&GrlD~rMwh{ozXL|P0b+(>b{0iFrTrZcZ7_QgMV;6%55w-NP$zgzPCYCB zJ{U5~VaU~gWhqT^##qt9nXZI1sxv}07!v52nU&^W!>*=9&Or-p>gw@9HQZmBJq*3qrY z1^gyV(+u|L#_B$G$kkkW+%gpBeGRt09NIVh#gHCX7=hQdvvDOd%w+9+&Ih=+Am z#-H(JO7B6Mhi|GIvIu``A&E;Ii3Ya#}>kh1STCXqa$}) z!!LKb3npi6`O#QXcgy{{STbeK4ViCyuVe;0rd14*g|IWaSQ1jyC=OGFJyY2bW3R5< z8fVPHg1&9+F})~SpiG;&@}p|dW1`q@i{$vCs%Q&hZ3O%91AmD;%JOC!`KF;&&w^!` z!9H0ePC9maT|?m@sXB&*&v57D0Ymk*+Dc8%QgZxc(uspxRFf8i!}bozHQu#ek%3Fm zfM+)!=&EH93L+(FsBfVp$Bh{t(;i*SQSy?Si9A-z~8P7Mm2AF=2NUK8Ggm=6Q!Nv_$bm z6Aea-pkwToS_erR)>%p8p=dH7_a=i*I&Y0Wm%8oraB|#s!l;&H%-Y7d!ZcrXWFl|% zGv$QqH8$Q$%!bqJhwBvvVuMvS5UvNf!FX$@<*aD!45eeOO=HK*jesk2Lw9DjcFq~> zN_L^RYjZebFVcal>3mv&jgM-I@Z6^P4yj936xd_KZobeg$|F`7f<;mi3~XSs8@Rkf z%d|2HpR31~1iP1R$G0VTLB7B)j>E`3a0CK(L962t{3_fgwWl2UX1UyJ<#`%zltcJH z!>cEAIXY9gG3L`qn9qkBIbqWK#>vpOuXl~MWjl{*-_L${lCSP$k9QeHgDUTF9B0&S zG3SG&xON}clT-Do@T5uSSz`3AE|N?GU?63!C|AO;7i9zHH)LvKJIY1QGjUVoZDE$Dciq%e&h{kW^Z@nIUJ1w qZBJ^i%Gnpk+H1Kt^}kf6|BN-#Q_nz0SrTsNWxLj{8*&ux1^)-Poxphj literal 0 HcmV?d00001 diff --git a/resource/translations/skosmos_nl.po b/resource/translations/skosmos_nl.po new file mode 100644 index 000000000..097361441 --- /dev/null +++ b/resource/translations/skosmos_nl.po @@ -0,0 +1,810 @@ +# +# Translators: +# Ismail Kutlu , 2018 +# Maxime Van Driessche , 2018 +# Maxime Van Driessche , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Skosmos\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-16 10:26+0200\n" +"PO-Revision-Date: 2018-02-09 17:27+0000\n" +"Last-Translator: Maxime Van Driessche \n" +"Language-Team: Dutch (http://www.transifex.com/national-library-of-finland/skosmos/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.8.7.1\n" +"X-Poedit-Basepath: ../..\n" +"X-Poedit-SearchPath-0: view\n" +"X-Poedit-SearchPath-1: controller\n" +"X-Poedit-SearchPath-2: model\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: controller/Controller.php:38 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:21 +msgid "in_this_language" +msgstr "in Nederlands" + +#: controller/RestController.php:271 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:125 +msgid "skos:Concept" +msgstr "Concept" + +#: controller/RestController.php:280 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:127 +msgid "skos:Collection" +msgstr "Collectie" + +#: model/Concept.php:455 model/Concept.php:475 +msgid "skosmos:created" +msgstr "Gemaakt" + +#: model/Concept.php:460 model/Concept.php:462 model/Concept.php:471 +msgid "skosmos:modified" +msgstr "laatst gewijzigd" + +#: model/VocabularyCategory.php:39 +msgid "Vocabularies" +msgstr "Woordenlijst" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:26 +msgid "%search_count% results for '%term%'" +msgstr "%search_count% resultaten voor ‘%term%’" + +#: /tmp/cache/587c83c09abaa/23/23c9862892c34daf7bea11b6d50990145b73a83c0947ae60c3d729fe591a06ec.php:48 +msgid "404 Error: The page %requested_page% cannot be found." +msgstr "404 Error: De pagina %requested_page% kan niet worden gevonden." + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:62 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:75 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:64 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:274 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:68 +msgid "A-Z" +msgstr "A-Z" + +#: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:46 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:19 +msgid "About" +msgstr "Over" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:35 +#, php-format +msgid "All %d results displayed" +msgstr "Alle %d resultaten worden getoond." + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:64 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:77 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:66 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:276 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:70 +msgid "Alpha-nav" +msgstr "Alfabetish" + +#: /tmp/cache/587c83c09abaa/cf/cf0b3d87d2eb48f38f5f339303d5509c7535d13d7b010ad4840ee824430f7fe6.php:34 +msgid "Alphabetical index" +msgstr "Alfabetische index" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:555 +msgid "By group" +msgstr "Per groep" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:587 +msgid "By parent" +msgstr "Per parent" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:477 +msgid "By scheme" +msgstr "Per subvocabulair" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:516 +msgid "By type" +msgstr "Per type" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:119 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:132 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:117 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:331 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:125 +msgid "Changes-nav" +msgstr "Nieuw" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:122 +msgid "Clear limitations" +msgstr "Wis limiten" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:74 +msgid "Contact us!" +msgstr "Contacteer ons!" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:108 +msgid "Content and search language" +msgstr "Content en zoek taal" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:51 +msgid "Content language" +msgstr "Content taal" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:732 +msgid "Download this concept in SKOS format:" +msgstr "Download deze concept:" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:144 +msgid "E-mail:" +msgstr "E-mail:" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:220 +msgid "Enter search term" +msgstr "Type je zoekterm" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:148 +msgid "Enter your e-mail address" +msgstr "Voer uw e-mailadres in" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:140 +msgid "Enter your name" +msgstr "Voer uw naam in" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:900 +#: /tmp/cache/587c83c13194c/5c/5c060d2297f64d66beb101ee34831f917ed8d33f97dadeca144430a1561433ec.php:69 +msgid "Error: Requested vocabulary not found!" +msgstr "Error: Aangevraagde woordenlijst is niet gevonden!" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:890 +msgid "Error: Term \"%term%\" not found in vocabulary!" +msgstr "Error %te rm% niet gevonden in de woordenlijst!" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:34 +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:54 +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:194 +msgid "Feedback" +msgstr "Feedback" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:64 +msgid "Feedback has been sent!" +msgstr "Feedback is verstuurd!" + +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:35 +msgid "Group index" +msgstr "Groepindex" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:101 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:114 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:99 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:313 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:107 +msgid "Group-nav" +msgstr "Groepen" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:85 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:94 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:83 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:297 +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:55 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:91 +msgid "Hier-nav" +msgstr "Hiërarchie" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:157 +msgid "Leave this field blank" +msgstr "Laat deze veld leeg" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:594 +msgid "Limit search" +msgstr "Limiet zoeken" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:31 +msgid "Loading" +msgstr "Laden" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:27 +msgid "Loading more items" +msgstr "Meer items worden geladen" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:152 +msgid "Message:" +msgstr "Bericht:" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:136 +msgid "Name:" +msgstr "Naam:" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:23 +msgid "No results" +msgstr "Geen resultaten" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:103 +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:111 +msgid "Not to a specific vocabulary" +msgstr "Geen specifieke woordenlijst" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:233 +msgid "Search" +msgstr "Zoeken" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:59 +msgid "Search from vocabulary" +msgstr "Zoek in woordenlijst" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:210 +msgid "Search language: any" +msgstr "Een taal" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:340 +msgid "Search options" +msgstr "Zoekopties" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:161 +msgid "Send feedback" +msgstr "Stuur feedback" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:51 +msgid "Show all breadcrumb paths" +msgstr "Toon alle # paden" + +#: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:72 +msgid "Skosmos version %version%" +msgstr "Skosmos versie %version%" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:229 +msgid "Submit search" +msgstr "Verzend zoekopdracht" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:68 +msgid "Thank you for your feedback" +msgstr "Bedankt voor je feedback. We streven ernaar om alle feedback zo snel mogelijk te beantwoorden." + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:129 +msgid "The search provided no results." +msgstr "De zoekopdracht heeft geen resultaten opgeleverd" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:48 +msgid "There is no term for this concept in this language" +msgstr "Er is geen term voor deze concept in deze taal." + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:173 +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:47 +msgid "Value is required and can not be empty" +msgstr "Waarde is noodzakelijk en kan niet leeg zijn" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:27 +msgid "cc:attributionName" +msgstr "Attribuut Naam" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:29 +msgid "cc:attributionUrl" +msgstr "Attribuut Url" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:25 +msgid "cc:license" +msgstr "Licentie" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:31 +msgid "cc:morePermissions" +msgstr "Meer permissies" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:33 +msgid "cc:useGuidelines" +msgstr "gebruik guidelines" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:35 +msgid "dc:conformsTo" +msgstr "Conformeert met" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:37 +msgid "dc:contributor" +msgstr "Contributor" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:39 +msgid "dc:coverage" +msgstr "Dekking" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:41 +msgid "dc:created" +msgstr "Gemaakt" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:43 +msgid "dc:creator" +msgstr "Creator" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:45 +msgid "dc:date" +msgstr "Datum" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:47 +msgid "dc:description" +msgstr "Beschrijving" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:49 +msgid "dc:format" +msgstr "Formaat" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:51 +msgid "dc:identifier" +msgstr "Identifier" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:53 +msgid "dc:isReplacedBy" +msgstr "Wordt vervangen door" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:55 +msgid "dc:isRequiredBy" +msgstr "Is nodig voor" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:57 +msgid "dc:issued" +msgstr "Datum uitgegeven" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:59 +msgid "dc:language" +msgstr "Taal" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:61 +msgid "dc:license" +msgstr "Licentie" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:63 +msgid "dc:modified" +msgstr "Laatst gewijzigd" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:65 +msgid "dc:publisher" +msgstr "Uitgever" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:67 +msgid "dc:relation" +msgstr "Relatie" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:69 +msgid "dc:replaces" +msgstr "Vervangt" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:71 +msgid "dc:rights" +msgstr "Rechten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:73 +msgid "dc:rightsHolder" +msgstr "Rechtenhouder" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:75 +msgid "dc:source" +msgstr "Bron" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:77 +msgid "dc:source_help" +msgstr "Bron van de beschrijving van het concept" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:79 +msgid "dc:spatial" +msgstr "Ruimtelijke dekking" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:81 +msgid "dc:subject" +msgstr "Onderwerp" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:83 +msgid "dc:temporal" +msgstr "Temporele dekking" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:85 +msgid "dc:title" +msgstr "Titel" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:87 +msgid "dc:type" +msgstr "Type" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:36 +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:256 +msgid "deprecated" +msgstr "Dit concept is verouderd. Gebruik dit concept niet als aantekening!" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:89 +msgid "foaf:homepage" +msgstr "Startpagina" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:91 +msgid "foaf:page" +msgstr "Pagina" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:658 +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:542 +msgid "foreign prefLabel help" +msgstr "Termen voor het concept in andere talen." + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:660 +msgid "foreign prefLabels" +msgstr "In andere talen" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:39 +msgid "from all" +msgstr "van alle" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:81 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:90 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:79 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:293 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:87 +msgid "hierarchy-disabled-help" +msgstr "De hiërarchie van het hoogste niveau kan niet getoond worden in deze woordenlijst." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:93 +msgid "isothes:ConceptGroup" +msgstr "Concept groep" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:97 +msgid "isothes:ThesaurusArray" +msgstr "Rij van verwante concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:99 +msgid "isothes:broaderGeneric" +msgstr "Bredere concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:101 +msgid "isothes:broaderInstantial" +msgstr "Bredere concepten (instantie)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:103 +msgid "isothes:broaderPartitive" +msgstr "Bredere concepten (opgedeeld)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:105 +msgid "isothes:narrowerGeneric" +msgstr "Nauwere concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:107 +msgid "isothes:narrowerInstantial" +msgstr "Nauwere concepten (instantie)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:109 +msgid "isothes:narrowerPartitive" +msgstr "Nauwere concepten (opgedeeld)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:95 +msgid "isothes:superGroup" +msgstr "Bovengroep" + +#: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:66 +msgid "layout designed by Hahmo" +msgstr "lay-out ontworpen door Hahmo Design" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:74 +msgid "limited to group" +msgstr "groep" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:67 +msgid "limited to parent" +msgstr "ouder" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:81 +msgid "limited to scheme" +msgstr "gelimiteerd tot schema" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:29 +msgid "limited to type" +msgstr "type" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:113 +msgid "owl:sameAs" +msgstr "Equivalente concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:111 +msgid "owl:versionInfo" +msgstr "Versie" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:115 +msgid "rdf:type" +msgstr "Type" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:117 +msgid "rdf:type_help" +msgstr "Type van entiteit" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:123 +msgid "rdfs:comment" +msgstr "Beschrijving" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:119 +msgid "rdfs:label" +msgstr "Label" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:121 +msgid "rdfs:seeAlso" +msgstr "Zie ook" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:43 +msgid "selected" +msgstr "geselecteerd" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:143 +msgid "skos:altLabel" +msgstr "Ingangstermen" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:179 +msgid "skos:altLabel_help" +msgstr "Alternatieve termen voor het concept" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:133 +msgid "skos:broadMatch" +msgstr "Bredere gelijkaardige concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:191 +msgid "skos:broadMatch_help" +msgstr "Bredere gelijkaardige concepten in een andere woordenlijst" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:129 +msgid "skos:broader" +msgstr "Breder concept" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:171 +msgid "skos:broader_help" +msgstr "Breder concept" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:169 +msgid "skos:changeNote" +msgstr "Verander notitie" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:147 +msgid "skos:closeMatch" +msgstr "Nauw verwante concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:189 +msgid "skos:closeMatch_help" +msgstr "Nauw verwante concepten in een andere woordenlijst" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:161 +msgid "skos:definition" +msgstr "Definitie" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:185 +msgid "skos:definition_help" +msgstr "Een complete uitleg over de bedoelde betekenis van een concept" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:167 +msgid "skos:editorialNote" +msgstr "Redactionele notitie" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:145 +msgid "skos:exactMatch" +msgstr "Exact overeenkomende concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:187 +msgid "skos:exactMatch_help" +msgstr "Exact overeenkomende concepten in een andere woordenlijst" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:163 +msgid "skos:example" +msgstr "Voorbeeld" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:155 +msgid "skos:hasTopConcept" +msgstr "Heeft top concept" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:165 +msgid "skos:historyNote" +msgstr "Geschiedenis notitie" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:151 +msgid "skos:inScheme" +msgstr "Concept schema" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:149 +msgid "skos:member" +msgstr "Groep leden" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:181 +msgid "skos:member_help" +msgstr "Leden van de groep" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:135 +msgid "skos:narrowMatch" +msgstr "Nauwer overeenkomende concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:193 +msgid "skos:narrowMatch_help" +msgstr "Nauwer overeenkomende concepten in een andere woordenlijst" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:131 +msgid "skos:narrower" +msgstr "Nauwere concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:173 +msgid "skos:narrower_help" +msgstr "Nauwere concepten." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:157 +msgid "skos:note" +msgstr "Notitie" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:175 +msgid "skos:note_help" +msgstr "Notities" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:234 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:141 +msgid "skos:prefLabel" +msgstr "Geprefereerde term" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:137 +msgid "skos:related" +msgstr "Verwante concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:139 +msgid "skos:relatedMatch" +msgstr "Verwante overeenkomende concepten" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:183 +msgid "skos:related_help" +msgstr "Concepten die gerelateerd zijn aan dit concept" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:159 +msgid "skos:scopeNote" +msgstr "Bereik notitie" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:177 +msgid "skos:scopeNote_help" +msgstr "Notities over het gebruik en het bereik van dit concept" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:153 +msgid "skos:topConceptOf" +msgstr "Behoord tot woordenlijst" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:197 +msgid "skosext:DeprecatedConcept" +msgstr "Verouderd concept" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:195 +msgid "skosext:partOf" +msgstr "Is deel van" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:199 +msgid "skosext:partOf_help" +msgstr "Geheel waarvan het concept deel uitmaakt" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:548 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:201 +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:449 +msgid "skosmos:memberOf" +msgstr "Behoort tot groep" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:611 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:205 +msgid "skosmos:memberOfArray" +msgstr "Behoort tot rij" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:609 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:207 +msgid "skosmos:memberOfArray_help" +msgstr "Rij waartoe het concept behoort" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:546 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:203 +msgid "skosmos:memberOf_help" +msgstr "Groep waartoe het concept behoort" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:23 +msgid "zxx-x-taxon" +msgstr "Wetenschappelijke naam" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:168 +msgid "About page" +msgstr "over" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:138 +msgid "Alternate terms" +msgstr "Alternatieve termen" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:130 +msgid "Concept language" +msgstr "Taal" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:118 +msgid "Count" +msgstr "Aantal" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:157 +msgid "Download this vocabulary as SKOS/RDF:" +msgstr "Download deze woordenlijset als SKOS/RDF" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:205 +msgid "Help" +msgstr "Help" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:142 +msgid "Hidden terms" +msgstr "Verborgen termen" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:58 +msgid "Interface language" +msgstr "Interface taal" + +#: /tmp/cache/587c83c13194c/f9/f9c816822168f230ef0bfed735f5923aab99d389ce8b2c6b2f5fcd5d400bc275.php:26 +msgid "No vocabularies on the server!" +msgstr "Geen woordenlijsten op de server!" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:134 +msgid "Preferred terms" +msgstr "Geprefereerde termen" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:111 +msgid "Resource counts by type" +msgstr "Aantal bronnen per type" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:124 +msgid "Term counts by language" +msgstr "Aantal termen per taal" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:116 +msgid "Type" +msgstr "Type" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:146 +msgid "Vocabularies-nav" +msgstr "Woordenlijsten" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:24 +msgid "Vocabulary information" +msgstr "Woordenlijst informatie" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:199 +msgid "helper_help" +msgstr "Beweeg uw cursor over de tekst met een gestippelde onderstreping om instructies over de eigenschap te bekijken." + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:201 +msgid "search_example_text" +msgstr "Voor een ingekorte zoekopdracht, gelieve het symbool * te gebruiken zoals in *dier of *patent*. Voor het einde van zoekwoorden zal de zoekopdracht automatisch beschouwd worden als ingekort, zelfs als het inkortingssymbool not manueel werd ingevoerd: zo zal kat hetzelfde resultaat opleveren als kat*" + +#~ msgid "dc11:contributor" +#~ msgstr "Contributor" + +#~ msgid "dc11:creator" +#~ msgstr "Creator" + +#~ msgid "dc11:description" +#~ msgstr "Description" + +#~ msgid "dc11:license" +#~ msgstr "License" + +#~ msgid "dc11:publisher" +#~ msgstr "Publisher" + +#~ msgid "dc11:relation" +#~ msgstr "Relation" + +#~ msgid "dc11:rights" +#~ msgstr "Rights" + +#~ msgid "dc11:source" +#~ msgstr "Source" + +#~ msgid "dc11:title" +#~ msgstr "Title" + +#~ msgid "Error: the vocabulary does not contain terms beginning with" +#~ msgstr "The vocabulary does not contain terms beginning with" + +#~ msgid "Vocabularies on the server" +#~ msgstr "Available vocabularies and ontologies" + +#~ msgid "Modified concepts" +#~ msgstr "Modified concepts" + +#~ msgid "New concepts" +#~ msgstr "New concepts" + +#~ msgid "All" +#~ msgstr "All" + +#~ msgid "results" +#~ msgstr "results:" + +#~ msgid "results for" +#~ msgstr "results for" + +#~ msgid "Language literal" +#~ msgstr "In English" From 9a46a1b0dc29d389ccd39fb9e32aefbe939723b7 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 16 Feb 2018 10:39:19 +0200 Subject: [PATCH 061/173] css for the copy button --- resource/css/styles.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/resource/css/styles.css b/resource/css/styles.css index 3503179a2..f6c8d7fdd 100644 --- a/resource/css/styles.css +++ b/resource/css/styles.css @@ -1498,6 +1498,28 @@ span.date-info { margin-right: 1px; } +.copy-clipboard { + color: #00748F; + border-radius: 0; + vertical-align: inherit; + font-size: 14px; + border: 0; +} + +.copy-clipboard:active, .copy-clipboard:focus, .copy-clipboard:active:focus { + background-color: #fff; + color: #00748F; +} + +.copy-clipboard:hover { + background-color: #fff; + color: #23527c; +} + +.property-value-column > .copy-clipboard { + font-size: 24px; +} + /* typeahead.js ***********************************/ From ee250036c7f1afbfd2bd967e082d0f51f2fe26c7 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Mon, 19 Feb 2018 10:32:56 +0200 Subject: [PATCH 062/173] fixes hard crash when collection doesnt return a label --- model/Concept.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index 32c021978..a5217ee77 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -696,11 +696,14 @@ public function getDate() private function getCollectionMembers($coll, $narrowers) { $membersArray = array(); - $collLabel = $coll->label()->getValue($this->clang) ? $coll->label($this->clang) : $coll->label(); - if ($collLabel) { - $collLabel = $collLabel->getValue(); + if ($coll->label()) { + $collLabel = $coll->label()->getValue($this->clang) ? $coll->label($this->clang) : $coll->label(); + if ($collLabel) { + $collLabel = $collLabel->getValue(); + } + } else { + $collLabel = $coll->getUri(); } - $membersArray[$collLabel] = new ConceptPropertyValue($this->model, $this->vocab, $coll, 'skos:narrower', $this->clang); foreach ($coll->allResources('skos:member') as $member) { if (array_key_exists($member->getUri(), $narrowers)) { From fc0c86b5b7c20d3116ff7c1f386461db70c131d9 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Fri, 23 Feb 2018 13:57:14 +0200 Subject: [PATCH 063/173] adding a random fallback for the guessLanguage so the negotiator wont crash when the accept header has not been set --- controller/WebController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controller/WebController.php b/controller/WebController.php index 4a93c1d22..14699b188 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -148,7 +148,8 @@ public function guessLanguage($vocid = null) header('Vary: Accept-Language'); // inform caches that a decision was made based on Accept header $this->negotiator = new \Negotiation\LanguageNegotiator(); $langcodes = array_keys($this->languages); - $acceptLanguage = filter_input(INPUT_SERVER, 'HTTP_ACCEPT_LANGUAGE', FILTER_SANITIZE_STRING) ? filter_input(INPUT_SERVER, 'HTTP_ACCEPT_LANGUAGE', FILTER_SANITIZE_STRING) : ''; + // using a random language from the configured UI languages when there is no accept language header set + $acceptLanguage = filter_input(INPUT_SERVER, 'HTTP_ACCEPT_LANGUAGE', FILTER_SANITIZE_STRING) ? filter_input(INPUT_SERVER, 'HTTP_ACCEPT_LANGUAGE', FILTER_SANITIZE_STRING) : $langcodes[0]; $bestLang = $this->negotiator->getBest($acceptLanguage, $langcodes); if (isset($bestLang) && in_array($bestLang, $langcodes)) { return $bestLang->getValue(); From 58a8f32964b71c31c28748c3b8103469689cc0ec Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 12 Mar 2018 15:07:05 +0200 Subject: [PATCH 064/173] run Travis tests with newer Fuseki 3.6.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 463da82fd..bb57bf4f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ addons: code_climate: repo_token: fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c env: - - FUSEKI_VERSION=3.4.0 + - FUSEKI_VERSION=3.6.0 - FUSEKI_VERSION=SNAPSHOT - CC_TEST_REPORTER_ID=fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c matrix: From 44e4f565e032da01ff878f0fd2b124ec810834a8 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 12 Mar 2018 15:25:18 +0200 Subject: [PATCH 065/173] define Code Climate variable as global, separating it from matrix vars --- .travis.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index bb57bf4f7..a2a7d4f0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,13 +19,12 @@ before_script: after_script: - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - pkill -f 'java -Xmx1200M -jar' -addons: - code_climate: - repo_token: fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c env: - - FUSEKI_VERSION=3.6.0 - - FUSEKI_VERSION=SNAPSHOT - - CC_TEST_REPORTER_ID=fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c + global: + - CC_TEST_REPORTER_ID=fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c + matrix: + - FUSEKI_VERSION=3.6.0 + - FUSEKI_VERSION=SNAPSHOT matrix: allow_failures: - env: FUSEKI_VERSION=SNAPSHOT From 7607f8930fa8fc1e36b81c693501b2b6624c8a08 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 12 Mar 2018 15:33:59 +0200 Subject: [PATCH 066/173] Remove support for obsolete APC caching functions. Fixes #728 --- model/Cache.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/model/Cache.php b/model/Cache.php index 7e5598cf0..06a452ae5 100644 --- a/model/Cache.php +++ b/model/Cache.php @@ -1,7 +1,7 @@ Date: Fri, 23 Feb 2018 23:29:55 +1300 Subject: [PATCH 067/173] Issue #712: display the concepts of the first letter available --- model/Request.php | 2 +- tests/RequestTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/Request.php b/model/Request.php index 3416c14f9..cfbdb96c0 100644 --- a/model/Request.php +++ b/model/Request.php @@ -136,7 +136,7 @@ public function getLangUrl() public function getLetter() { - return (isset($this->letter)) ? $this->letter : 'A'; + return (isset($this->letter)) ? $this->letter : ''; } /** diff --git a/tests/RequestTest.php b/tests/RequestTest.php index b232fdd88..87436536f 100644 --- a/tests/RequestTest.php +++ b/tests/RequestTest.php @@ -134,7 +134,7 @@ public function testSetAndGetLang() { */ public function testGetLetterWhenNotSet() { $this->request->setVocab('test'); - $this->assertEquals('A', $this->request->getLetter()); + $this->assertEquals('', $this->request->getLetter()); } /** From 3131538252b141df7f41b72a167aa378c38b3d26 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Fri, 16 Mar 2018 13:25:10 +0200 Subject: [PATCH 068/173] Default to the first letter of the alphabet when no letter is selected. Fixes #712 --- controller/WebController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/controller/WebController.php b/controller/WebController.php index 14699b188..74bb301cd 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -489,11 +489,15 @@ public function invokeAlphabeticalIndex($request) $allAtOnce = $vocab->getConfig()->getAlphabeticalFull(); if (!$allAtOnce) { - $searchResults = $vocab->searchConceptsAlphabetical($request->getLetter(), $count, $offset, $contentLang); $letters = $vocab->getAlphabet($contentLang); + $letter = $request->getLetter(); + if ($letter === '') { + $letter = $letters[0]; + } + $searchResults = $vocab->searchConceptsAlphabetical($letter, $count, $offset, $contentLang); } else { - $searchResults = $vocab->searchConceptsAlphabetical('*', null, null, $contentLang); $letters = null; + $searchResults = $vocab->searchConceptsAlphabetical('*', null, null, $contentLang); } $request->setContentLang($contentLang); From 1e07da933692bfee024283014e208e5133e0774f Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Sun, 4 Feb 2018 23:49:46 +1300 Subject: [PATCH 069/173] Add Dockerfile and a docker-compose to run SKOSMOS with Fuseki --- Dockerfile | 14 ++++++++++++++ docker-compose.yml | 24 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..a375151ab --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM php:7.0-apache + +RUN apt-get update + +RUN apt-get install locales +RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen +RUN echo "fr_FR.UTF-8 UTF-8" >> /etc/locale.gen +RUN echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen +RUN echo "fi_FI.UTF-8 UTF-8" >> /etc/locale.gen +RUN echo "sv_SE.UTF-8 UTF-8" >> /etc/locale.gen +RUN locale-gen + +RUN a2enmod rewrite +RUN docker-php-ext-install gettext diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..240d8b59b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,24 @@ +version: '3' + +services: + fuseki: + image: stain/jena-fuseki + environment: + - ADMIN_PASSWORD=admin + - JVM_ARGS=-Xmx2g + ports: + - 3030:3030 + web: + build: . + volumes: + - .:/var/www/html + ports: + - 8000:80 + depends_on: + - fuseki + +# once the environment has been created: +# 1. create dataset +# >curl -I -u admin:admin -XPOST --data "dbName=skosmos&dbType=tdb" -G http://localhost:3030/$/datasets/ +# 2. load example vocabulary +# >curl -I -X POST -H Content-Type:text/turtle -T vocabularies.ttl -G http://localhost:3030/skosmos/data From 2329a2de78a2a27acb1c47892287a9c4173e5e3d Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Mon, 12 Mar 2018 22:39:05 +1300 Subject: [PATCH 070/173] Add Dockerfile container_name's --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 240d8b59b..983e3312b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,7 @@ version: '3' services: fuseki: + container_name: skosmos-fuseki image: stain/jena-fuseki environment: - ADMIN_PASSWORD=admin @@ -9,6 +10,7 @@ services: ports: - 3030:3030 web: + container_name: skosmos-web build: . volumes: - .:/var/www/html From 6a1fbd5dacdc791a9be9ceaf800348db16edf7d7 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Mon, 12 Mar 2018 22:39:25 +1300 Subject: [PATCH 071/173] Add volume binding example in comments for Fuseki --- docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 983e3312b..d92e1036d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,10 @@ services: - JVM_ARGS=-Xmx2g ports: - 3030:3030 + # You can uncomment the line below to have a local volume bound onto the container, or + # visit https://hub.docker.com/r/stain/jena-fuseki/ for other alternatives + # volumes: + # - ${PWD}/fuseki:/fuseki web: container_name: skosmos-web build: . From 375fe4de3164adea2cfce7446f8a3c3c2084d54d Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Sat, 17 Mar 2018 10:35:47 +1300 Subject: [PATCH 072/173] Rename Skosmos docker-compose created container name to skosmos --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d92e1036d..be294177d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: # volumes: # - ${PWD}/fuseki:/fuseki web: - container_name: skosmos-web + container_name: skosmos build: . volumes: - .:/var/www/html From de27112b9f01b0486f70716899bcdd7fcb39e81a Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Thu, 5 Apr 2018 11:59:08 +0300 Subject: [PATCH 073/173] Fixes #638 --- model/sparql/GenericSparql.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index 601293351..9a37bd2f1 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -59,6 +59,26 @@ public function __construct($endpoint, $graph, $model) { } + /** + * Returns prefix-definitions for a query + * + * @param string $query + * @return string + */ + protected function generateQueryPrefixes($query) + { + // Check for undefined prefixes + $prefixes = ''; + foreach (EasyRdf\RdfNamespace::namespaces() as $prefix => $uri) { + if (strpos($query, "{$prefix}:") !== false and + strpos($query, "PREFIX {$prefix}:") === false + ) { + $prefixes .= "PREFIX {$prefix}: <{$uri}>\n"; + } + } + return $prefixes; + } + /** * Execute the SPARQL query using the SPARQL client, logging it as well. * @param string $query SPARQL query to perform @@ -67,7 +87,7 @@ public function __construct($endpoint, $graph, $model) { protected function query($query) { $queryId = sprintf("%05d", rand(0, 99999)); $logger = $this->model->getLogger(); - $logger->info("[qid $queryId] SPARQL query:\n$query\n"); + $logger->info("[qid $queryId] SPARQL query:\n" . $this->generateQueryPrefixes($query) . "\n$query\n"); $starttime = microtime(true); $result = $this->client->query($query); $elapsed = intval(round((microtime(true) - $starttime) * 1000)); From 6a3278c16fce8f4a4aaa9dd4ba35d43ff21e56fe Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Wed, 11 Apr 2018 10:52:14 +0300 Subject: [PATCH 074/173] fix constructor call due to previously done refactoring(?) --- model/ConceptPropertyValue.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/ConceptPropertyValue.php b/model/ConceptPropertyValue.php index d606ddf83..49daa5784 100644 --- a/model/ConceptPropertyValue.php +++ b/model/ConceptPropertyValue.php @@ -140,8 +140,8 @@ public function getReifiedPropertyValues() { foreach($props as $prop) { $prop = (EasyRdf\RdfNamespace::shorten($prop) !== null) ? EasyRdf\RdfNamespace::shorten($prop) : $prop; foreach ($this->resource->allLiterals($prop) as $val) { - if ($prop !== 'rdf:value' && $this->resource->get($prop)) { // shown elsewhere - $ret[gettext($prop)] = new ConceptPropertyValueLiteral($this->resource->get($prop), $prop); + if ($prop !== 'rdf:value') { // shown elsewhere + $ret[gettext($prop)] = new ConceptPropertyValueLiteral($this->model, $this->vocab, $this->resource, $val, $prop); } } foreach ($this->resource->allResources($prop) as $val) { From e8755307411497770988b3df1232d2a79abaa2f3 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Thu, 12 Apr 2018 15:06:51 +0300 Subject: [PATCH 075/173] Run Travis tests also under PHP 7.1 and 7.2 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index a2a7d4f0e..851c6550b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ dist: trusty language: php php: - "7.0" + - "7.1" + - "7.2" install: - composer install cache: From 3b492fb1be3bca36f90e4c20436dcac1a0c7bf2b Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Thu, 12 Apr 2018 15:30:10 +0300 Subject: [PATCH 076/173] add checks to prevent sizeof() related warnings in PHP 7.2 --- model/sparql/GenericSparql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index 9a37bd2f1..d268d1a09 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -463,7 +463,7 @@ private function transformConceptInfoResults($result, $uris, $vocabs, $clang) { $conceptArray = array(); foreach ($uris as $index => $uri) { $conc = $result->resource($uri); - $vocab = sizeof($vocabs) == 1 ? $vocabs[0] : $vocabs[$index]; + $vocab = (isset($vocabs) && sizeof($vocabs) == 1) ? $vocabs[0] : $vocabs[$index]; $conceptArray[] = new Concept($this->model, $vocab, $conc, $result, $clang); } return $conceptArray; @@ -1296,7 +1296,7 @@ public function queryConceptsAlphabetical($letter, $lang, $limit = null, $offset */ private function generateFirstCharactersQuery($lang, $classes) { $fcl = $this->generateFromClause(); - $classes = (sizeof($classes) > 0) ? $classes : array('http://www.w3.org/2004/02/skos/core#Concept'); + $classes = (isset($classes) && sizeof($classes) > 0) ? $classes : array('http://www.w3.org/2004/02/skos/core#Concept'); $values = $this->formatValues('?type', $classes, 'uri'); $query = << Date: Thu, 12 Apr 2018 15:35:57 +0300 Subject: [PATCH 077/173] fix PHP 7.1+ build test by changing the name for error raised --- tests/ConceptPropertyValueLiteralTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ConceptPropertyValueLiteralTest.php b/tests/ConceptPropertyValueLiteralTest.php index 8ee4eb2b2..9ae6ba979 100644 --- a/tests/ConceptPropertyValueLiteralTest.php +++ b/tests/ConceptPropertyValueLiteralTest.php @@ -52,7 +52,7 @@ public function testGetLabelThatIsADate() { /** * @covers ConceptPropertyValueLiteral::getLabel - * @expectedException PHPUnit\Framework\Error\Error + * @expectedException PHPUnit\Framework\Error\Warning */ public function testGetLabelThatIsABrokenDate() { $vocab = $this->model->getVocabulary('dates'); From 5d29998fc8c23ebcb0fae7ad0e8f9d0a5e49feaf Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Thu, 12 Apr 2018 15:40:51 +0300 Subject: [PATCH 078/173] Changed test fuseki port to 13030; upgraded test fuseki to 3.7.0; fixed PHP 7.2+ build test --- tests/GenericSparqlTest.php | 30 +++++++++++++++--------------- tests/GlobalConfigTest.php | 2 +- tests/JenaTextSparqlTest.php | 6 +++--- tests/ModelTest.php | 4 ++-- tests/VocabularyTest.php | 2 +- tests/init_fuseki.sh | 8 ++++---- tests/testconfig.inc | 2 ++ tests/testvocabularies.ttl | 34 +++++++++++++++++----------------- 8 files changed, 45 insertions(+), 43 deletions(-) diff --git a/tests/GenericSparqlTest.php b/tests/GenericSparqlTest.php index 18e1b8e91..156ce476b 100644 --- a/tests/GenericSparqlTest.php +++ b/tests/GenericSparqlTest.php @@ -15,14 +15,14 @@ protected function setUp() { $this->vocab = $this->model->getVocabulary('test'); $this->graph = $this->vocab->getGraph(); $this->params = $this->getMockBuilder('ConceptSearchParameters')->disableOriginalConstructor()->getMock(); - $this->sparql = new GenericSparql('http://localhost:3030/ds/sparql', $this->graph, $this->model); + $this->sparql = new GenericSparql('http://localhost:13030/ds/sparql', $this->graph, $this->model); } /** * @covers GenericSparql::__construct */ public function testConstructor() { - $gs = new GenericSparql('http://localhost:3030/ds/sparql', $this->graph, $this->model); + $gs = new GenericSparql('http://localhost:13030/ds/sparql', $this->graph, $this->model); $this->assertInstanceOf('GenericSparql', $gs); } @@ -30,7 +30,7 @@ public function testConstructor() { * @covers GenericSparql::getGraph */ public function testGetGraph() { - $gs = new GenericSparql('http://localhost:3030/ds/sparql', $this->graph, $this->model); + $gs = new GenericSparql('http://localhost:13030/ds/sparql', $this->graph, $this->model); $this->assertEquals($this->graph, $gs->getGraph()); } @@ -235,7 +235,7 @@ public function testQueryConceptsAlphabeticalFull() { */ public function testQueryConceptInfoWithMultipleVocabs() { - $this->sparql = new GenericSparql('http://localhost:3030/ds/sparql', '?graph', $this->model); + $this->sparql = new GenericSparql('http://localhost:13030/ds/sparql', '?graph', $this->model); $voc2 = $this->model->getVocabulary('test'); $voc3 = $this->model->getVocabulary('dates'); $voc4 = $this->model->getVocabulary('groups'); @@ -257,7 +257,7 @@ public function testQueryConceptInfoWithMultipleVocabs() */ public function testQueryConceptInfoWithAllVocabs() { - $this->sparql = new GenericSparql('http://localhost:3030/ds/sparql', '?graph', $this->model); + $this->sparql = new GenericSparql('http://localhost:13030/ds/sparql', '?graph', $this->model); $actual = $this->sparql->queryConceptInfo(array('http://www.skosmos.skos/test/ta121', 'http://www.skosmos.skos/groups/ta111'), null, null, 'en'); $this->assertInstanceOf('Concept', $actual[0]); $this->assertEquals('http://www.skosmos.skos/test/ta121', $actual[0]->getUri()); @@ -334,7 +334,7 @@ public function testQueryConceptScheme() { $actual = $this->sparql->queryConceptScheme('http://www.skosmos.skos/test/conceptscheme'); $this->assertInstanceOf('EasyRdf\Graph', $actual); - $this->assertEquals('http://localhost:3030/ds/sparql', $actual->getUri()); + $this->assertEquals('http://localhost:13030/ds/sparql', $actual->getUri()); } /** @@ -358,7 +358,7 @@ public function testQueryConceptSchemes() */ public function testQueryConceptSchemesSubject() { - $sparql = new GenericSparql('http://localhost:3030/ds/sparql', 'http://www.skosmos.skos/test-concept-schemes/', $this->model); + $sparql = new GenericSparql('http://localhost:13030/ds/sparql', 'http://www.skosmos.skos/test-concept-schemes/', $this->model); $actual = $sparql->queryConceptSchemes('en'); $expected = array( @@ -410,7 +410,7 @@ public function testQueryConceptsMultipleVocabs() $voc2 = $this->model->getVocabulary('groups'); $this->params->method('getSearchTerm')->will($this->returnValue('Carp')); $this->params->method('getVocabs')->will($this->returnValue(array($voc, $voc2))); - $sparql = new GenericSparql('http://localhost:3030/ds/sparql', '?graph', $this->model); + $sparql = new GenericSparql('http://localhost:13030/ds/sparql', '?graph', $this->model); $actual = $sparql->queryConcepts(array($voc, $voc2), null, null, $this->params); $this->assertEquals(2, sizeof($actual)); $this->assertEquals('http://www.skosmos.skos/groups/ta112', $actual[0]['uri']); @@ -433,7 +433,7 @@ public function testQueryConceptsMultipleSchemes() // returns 3 concepts without the scheme limit, and only 2 with the scheme limit below $this->params->method('getSearchTerm')->will($this->returnValue('concept*')); $this->params->method('getSchemeLimit')->will($this->returnValue(array('http://www.skosmos.skos/multiple-schemes/cs1', 'http://www.skosmos.skos/multiple-schemes/cs2'))); - $sparql = new GenericSparql('http://localhost:3030/ds/sparql', 'http://www.skosmos.skos/multiple-schemes/', $this->model); + $sparql = new GenericSparql('http://localhost:13030/ds/sparql', 'http://www.skosmos.skos/multiple-schemes/', $this->model); $actual = $sparql->queryConcepts(array($voc), null, null, $this->params); $this->assertEquals(2, sizeof($actual)); $this->assertEquals('http://www.skosmos.skos/multiple-schemes/c1-in-cs1', $actual[0]['uri']); @@ -876,7 +876,7 @@ public function testListConceptGroups() { $voc = $this->model->getVocabulary('groups'); $graph = $voc->getGraph(); - $sparql = new GenericSparql('http://localhost:3030/ds/sparql', $graph, $this->model); + $sparql = new GenericSparql('http://localhost:13030/ds/sparql', $graph, $this->model); $actual = $sparql->ListConceptGroups('http://www.w3.org/2004/02/skos/core#Collection', 'en', false); $expected = array (0 => array ('prefLabel' => 'Fish', 'uri' => 'http://www.skosmos.skos/groups/fish', 'hasMembers' => true, 'childGroups' => array('http://www.skosmos.skos/groups/sub')), 1 => array ('prefLabel' => 'Freshwater fish', 'uri' => 'http://www.skosmos.skos/groups/fresh', 'hasMembers' => true), 2 => array ('prefLabel' => 'Saltwater fish', 'uri' => 'http://www.skosmos.skos/groups/salt', 'hasMembers' => true),3 => array ('prefLabel' => 'Submarine-like fish', 'uri' => 'http://www.skosmos.skos/groups/sub', 'hasMembers' => true)); $this->assertEquals($expected, $actual); @@ -891,7 +891,7 @@ public function testListConceptGroupContentsExcludingDeprecatedConcept() { $voc = $this->model->getVocabulary('groups'); $graph = $voc->getGraph(); - $sparql = new GenericSparql('http://localhost:3030/ds/sparql', $graph, $this->model); + $sparql = new GenericSparql('http://localhost:13030/ds/sparql', $graph, $this->model); $actual = $sparql->ListConceptGroupContents('http://www.w3.org/2004/02/skos/core#Collection', 'http://www.skosmos.skos/groups/salt', 'en'); $this->assertEquals('http://www.skosmos.skos/groups/ta113', $actual[0]['uri']); $this->assertEquals(1, sizeof($actual)); @@ -906,7 +906,7 @@ public function testListConceptGroupContentsIncludingDeprecatedConcept() { $voc = $this->model->getVocabulary('showDeprecated'); $graph = $voc->getGraph(); - $sparql = new GenericSparql('http://localhost:3030/ds/sparql', $graph, $this->model); + $sparql = new GenericSparql('http://localhost:13030/ds/sparql', $graph, $this->model); $actual = $sparql->ListConceptGroupContents('http://www.w3.org/2004/02/skos/core#Collection', 'http://www.skosmos.skos/groups/salt', 'en', $voc->getConfig()->getShowDeprecated()); $expected = array ( 0 => array ( @@ -937,7 +937,7 @@ public function testQueryChangeList() { $voc = $this->model->getVocabulary('changes'); $graph = $voc->getGraph(); - $sparql = new GenericSparql('http://localhost:3030/ds/sparql', $graph, $this->model); + $sparql = new GenericSparql('http://localhost:13030/ds/sparql', $graph, $this->model); $actual = $sparql->queryChangeList('en', 0, 'dc11:created'); $order = array(); foreach($actual as $concept) { @@ -955,7 +955,7 @@ public function testLimitSearchToType() { $voc = $this->model->getVocabulary('test'); $graph = $voc->getGraph(); - $sparql = new GenericSparql('http://localhost:3030/ds/sparql', $graph, $this->model); + $sparql = new GenericSparql('http://localhost:13030/ds/sparql', $graph, $this->model); $this->params->method('getSearchTerm')->will($this->returnValue('*')); $this->params->method('getTypeLimit')->will($this->returnValue(array('mads:Topic'))); $actual = $this->sparql->queryConcepts(array($voc), null, true, $this->params); @@ -995,7 +995,7 @@ public function testQueryConceptsWithExtraFields() */ public function testQuerySuperProperties() { - $this->sparql = new GenericSparql('http://localhost:3030/ds/sparql', '?graph', $this->model); + $this->sparql = new GenericSparql('http://localhost:13030/ds/sparql', '?graph', $this->model); $actual = $this->sparql->querySuperProperties('http://example.com/myns#property'); $this->assertEquals(1, sizeof($actual)); $expected = array('http://example.com/myns#superProperty'); diff --git a/tests/GlobalConfigTest.php b/tests/GlobalConfigTest.php index ad01b3985..0be61eead 100644 --- a/tests/GlobalConfigTest.php +++ b/tests/GlobalConfigTest.php @@ -34,7 +34,7 @@ public function testTimeoutDefaultValue() { */ public function testEndpointDefaultValue() { $actual = $this->config->getDefaultEndpoint(); - $this->assertEquals('http://localhost:3030/ds/sparql', $actual); + $this->assertEquals('http://localhost:13030/ds/sparql', $actual); } /** diff --git a/tests/JenaTextSparqlTest.php b/tests/JenaTextSparqlTest.php index 0aa42df21..727cabc01 100644 --- a/tests/JenaTextSparqlTest.php +++ b/tests/JenaTextSparqlTest.php @@ -15,14 +15,14 @@ protected function setUp() { $this->vocab = $this->model->getVocabulary('test'); $this->graph = $this->vocab->getGraph(); $this->params = $this->getMockBuilder('ConceptSearchParameters')->disableOriginalConstructor()->getMock(); - $this->sparql = new JenaTextSparql('http://localhost:3030/ds/sparql', $this->graph, $this->model); + $this->sparql = new JenaTextSparql('http://localhost:13030/ds/sparql', $this->graph, $this->model); } /** * @covers JenaTextSparql::__construct */ public function testConstructor() { - $gs = new JenaTextSparql('http://localhost:3030/ds/sparql', $this->graph, $this->model); + $gs = new JenaTextSparql('http://localhost:13030/ds/sparql', $this->graph, $this->model); $this->assertInstanceOf('JenaTextSparql', $gs); } @@ -180,7 +180,7 @@ public function testQueryConceptsDefaultGraph() public function testQueryConceptsAlphabeticalOrderBy() { $vocab = $this->model->getVocabulary('collation'); $graph = $vocab->getGraph(); - $sparql = new JenaTextSparql('http://localhost:3030/ds/sparql', $graph, $this->model); + $sparql = new JenaTextSparql('http://localhost:13030/ds/sparql', $graph, $this->model); $actual = $sparql->queryConceptsAlphabetical('t', 'fi'); $expected = array ( 0 => array ( diff --git a/tests/ModelTest.php b/tests/ModelTest.php index 7fcf79168..00852d31b 100644 --- a/tests/ModelTest.php +++ b/tests/ModelTest.php @@ -91,7 +91,7 @@ public function testGetVocabularyByGraphUri() { /** * @covers Model::getVocabularyByGraph * @expectedException \Exception - * @expectedExceptionMessage no vocabulary found for graph http://no/address and endpoint http://localhost:3030/ds/sparql + * @expectedExceptionMessage no vocabulary found for graph http://no/address and endpoint http://localhost:13030/ds/sparql */ public function testGetVocabularyByInvalidGraphUri() { $vocab = $this->model->getVocabularyByGraph('http://no/address'); @@ -161,7 +161,7 @@ public function testSearchWithOnlyMultipleWildcards() { /** * @covers Model::searchConcepts - * @expectedException PHPUnit\Framework\Error\Error + * @expectedException ArgumentCountError */ public function testSearchWithNoParams() { $result = $this->model->searchConcepts(); diff --git a/tests/VocabularyTest.php b/tests/VocabularyTest.php index 47b24336f..bf64d8af1 100644 --- a/tests/VocabularyTest.php +++ b/tests/VocabularyTest.php @@ -37,7 +37,7 @@ public function testGetTitle() { public function testGetEndpoint() { $vocab = $this->model->getVocabulary('testdiff'); $endpoint = $vocab->getEndpoint(); - $this->assertEquals('http://localhost:3030/ds/sparql', $endpoint); + $this->assertEquals('http://localhost:13030/ds/sparql', $endpoint); } /** diff --git a/tests/init_fuseki.sh b/tests/init_fuseki.sh index 99aad02d2..2df5e1e44 100755 --- a/tests/init_fuseki.sh +++ b/tests/init_fuseki.sh @@ -1,7 +1,7 @@ #!/bin/bash # Note: This script must be sourced from within bash, e.g. ". init_fuseki.sh" -FUSEKI_VERSION=${FUSEKI_VERSION:-3.4.0} +FUSEKI_VERSION=${FUSEKI_VERSION:-3.7.0} if [ "$FUSEKI_VERSION" = "SNAPSHOT" ]; then # find out the latest snapshot version and its download URL by parsing Apache directory listings @@ -20,15 +20,15 @@ if [ ! -f "jena-fuseki1-$FUSEKI_VERSION/fuseki-server" ]; then fi cd "jena-fuseki1-$FUSEKI_VERSION" -./fuseki-server --config ../fuseki-assembler.ttl & -until curl --output /dev/null --silent --head --fail http://localhost:3030; do +./fuseki-server --port=13030 --config ../fuseki-assembler.ttl & +until curl --output /dev/null --silent --head --fail http://localhost:13030; do printf '.' sleep 2 done for fn in ../test-vocab-data/*.ttl; do name=$(basename "${fn}" .ttl) - $(./s-put http://localhost:3030/ds/data "http://www.skosmos.skos/$name/" "$fn") + $(./s-put http://localhost:13030/ds/data "http://www.skosmos.skos/$name/" "$fn") done cd .. diff --git a/tests/testconfig.inc b/tests/testconfig.inc index 42bffec2e..8e1e68308 100644 --- a/tests/testconfig.inc +++ b/tests/testconfig.inc @@ -1,3 +1,5 @@ ; - void:sparqlEndpoint ; + void:sparqlEndpoint ; void:uriSpace "http://www.skosmos.skos/test/"; skos:prefLabel "Test ontology"@en ; skosmos:arrayClass isothes:ThesaurusArray ; @@ -39,7 +39,7 @@ skos:prefLabel "Mutiple Schemes vocabulary"@en ; dc:title "Mutiple Schemes vocabulary"@en ; dc:type mdrtype:ONTOLOGY ; - void:sparqlEndpoint ; + void:sparqlEndpoint ; void:uriSpace "http://www.skosmos.skos/multiple-schemes/"; skosmos:defaultLanguage "en"; skosmos:language "en"; @@ -50,7 +50,7 @@ dc11:title "Test ontology 2"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/onto/testdiff#"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "fi", "en"; skosmos:sparqlDialect "JenaText"; skosmos:fullAlphabeticalIndex "true"; @@ -69,7 +69,7 @@ void:uriSpace "http://www.skosmos.skos/onto/groups/"; skosmos:arrayClass isothes:ThesaurusArray ; skosmos:groupClass skos:Collection ; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "fi", "en"; skosmos:defaultLanguage "fi"; skosmos:indexShowClass meta:TestClass, meta:TestClass2; @@ -84,7 +84,7 @@ void:uriSpace "http://www.exemple.fr/"; skosmos:arrayClass isothes:ThesaurusArray ; skosmos:groupClass skos:Collection ; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:defaultLanguage "en"; skosmos:sparqlGraph . @@ -97,7 +97,7 @@ void:uriSpace "http://www.skosmos.skos/onto/groups/"; skosmos:arrayClass isothes:ThesaurusArray ; skosmos:groupClass skos:Collection ; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "fi", "en"; skosmos:defaultLanguage "fi"; skosmos:showDeprecated "true"; @@ -107,7 +107,7 @@ dc11:title "Cycle test vocabulary"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/onto/cycle/"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:sparqlGraph . @@ -115,7 +115,7 @@ dc11:title "Duplicate labels test vocabulary"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/onto/dup/"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:sparqlGraph . @@ -126,7 +126,7 @@ rdfs:label "Date information vocabulary"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/onto/date/"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:showPropertyInSearch skos:exactMatch; skosmos:hasMultiLingualProperty skos:altLabel ; @@ -137,7 +137,7 @@ dc11:title "Vocabulary with mappings"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/onto/mapping/"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:sparqlGraph . @@ -145,7 +145,7 @@ dc11:title "A vocabulary for testing the change list creation"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/changes/"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:sparqlGraph . @@ -153,7 +153,7 @@ dc11:title "A vocabulary for testing custom prefixes"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/prefix/"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:sparqlGraph . @@ -161,7 +161,7 @@ dc11:title "Subproperties of hiddenLabel"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/sub/"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:sparqlGraph . @@ -169,7 +169,7 @@ dc11:title "SuperGroup and member relationship double trouble"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/onto/dupgroup/"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:sparqlGraph . @@ -177,7 +177,7 @@ dc11:title "A vocabulary for testing language subtags"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/subtag/"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:fallbackLanguages ( "fr" "de" "sv" ) ; skosmos:sparqlGraph ; @@ -187,7 +187,7 @@ dc11:title "A vocabulary for test SPARQL with collation"@en ; dc:subject :cat_general ; void:uriSpace "http://www.skosmos.skos/collation/"; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "fi"; skosmos:sparqlGraph . @@ -199,7 +199,7 @@ skosmos:externalProperty dc11:creator ; skosmos:externalProperty dc11:relation ; skosmos:externalProperty rdfs:comment ; - void:sparqlEndpoint ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:sparqlGraph . From d09a54adcefe97be2a8f99006201b53e5c935440 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Thu, 12 Apr 2018 17:37:36 +0300 Subject: [PATCH 079/173] allow tests to fail on PHP 7.2 due to JsonLD compatibility problems --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 851c6550b..588b554be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ env: - FUSEKI_VERSION=SNAPSHOT matrix: allow_failures: + - php: 7.2 - env: FUSEKI_VERSION=SNAPSHOT notifications: slack: finto:5rO9Lp4Tstn6y34grtFBpjJ0 From c1f32d14eb92f9580e0c6b38ca83f4ec70eeccba Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Thu, 12 Apr 2018 19:41:25 +0300 Subject: [PATCH 080/173] expect different exceptions depending on PHP version (7.0 vs 7.1+) --- tests/ModelTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/ModelTest.php b/tests/ModelTest.php index 00852d31b..6916ff7bc 100644 --- a/tests/ModelTest.php +++ b/tests/ModelTest.php @@ -161,9 +161,13 @@ public function testSearchWithOnlyMultipleWildcards() { /** * @covers Model::searchConcepts - * @expectedException ArgumentCountError */ public function testSearchWithNoParams() { + if (PHP_VERSION_ID >= 70100) { + $this->expectException(ArgumentCountError::class); + } else { + $this->expectException(PHPUnit\Framework\Error\Error::class); + } $result = $this->model->searchConcepts(); } From fe866a1d43977ffef9ba330ef3138f61e4deb22a Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Thu, 12 Apr 2018 20:17:30 +0300 Subject: [PATCH 081/173] adjust build matrix: test fuseki SNAPSHOT only on php 7.1, allow failures on 7.2 & fuseki SNAPSHOT --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 588b554be..f2d11d354 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,8 +28,13 @@ env: - FUSEKI_VERSION=3.6.0 - FUSEKI_VERSION=SNAPSHOT matrix: + exclude: + - php: 7.0 + env: FUSEKI_VERSION=SNAPSHOT + - php: 7.2 + env: FUSEKI_VERSION=SNAPSHOT allow_failures: - php: 7.2 - - env: FUSEKI_VERSION=SNAPSHOT + env: FUSEKI_VERSION=3.6.0 notifications: slack: finto:5rO9Lp4Tstn6y34grtFBpjJ0 From d31b17a5c591b8188745c53c9e3a48a364cbd110 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Thu, 12 Apr 2018 20:20:50 +0300 Subject: [PATCH 082/173] further adjust build matrix --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index f2d11d354..588b554be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,13 +28,8 @@ env: - FUSEKI_VERSION=3.6.0 - FUSEKI_VERSION=SNAPSHOT matrix: - exclude: - - php: 7.0 - env: FUSEKI_VERSION=SNAPSHOT - - php: 7.2 - env: FUSEKI_VERSION=SNAPSHOT allow_failures: - php: 7.2 - env: FUSEKI_VERSION=3.6.0 + - env: FUSEKI_VERSION=SNAPSHOT notifications: slack: finto:5rO9Lp4Tstn6y34grtFBpjJ0 From bcee4538ca66fc4ba6b03c71b960587d053cd69a Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Thu, 12 Apr 2018 20:47:05 +0300 Subject: [PATCH 083/173] specify PHP versions without quotes --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 588b554be..db0e3b601 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ sudo: required dist: trusty language: php php: - - "7.0" - - "7.1" - - "7.2" + - 7.0 + - 7.1 + - 7.2 install: - composer install cache: From 22750f12b029a2adddb3c3a1e30e8d2143202d62 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Thu, 12 Apr 2018 20:49:10 +0300 Subject: [PATCH 084/173] adjust build matrix: only test fuseki SNAPSHOT on php 7.1 --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index db0e3b601..6312563bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,11 @@ env: - FUSEKI_VERSION=3.6.0 - FUSEKI_VERSION=SNAPSHOT matrix: + exclude: + - php: 7.0 + env: FUSEKI_VERSION=SNAPSHOT + - php: 7.2 + env: FUSEKI_VERSION=SNAPSHOT allow_failures: - php: 7.2 - env: FUSEKI_VERSION=SNAPSHOT From 35d74b4f403a07dcabd5372e49e87c880cb4390f Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Thu, 12 Apr 2018 20:54:25 +0300 Subject: [PATCH 085/173] bump Fuseki version to 3.7.0 also on Travis tests --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6312563bc..3c65e33ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ env: global: - CC_TEST_REPORTER_ID=fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c matrix: - - FUSEKI_VERSION=3.6.0 + - FUSEKI_VERSION=3.7.0 - FUSEKI_VERSION=SNAPSHOT matrix: exclude: From 007896edc0877135d7b740e0b50c6e23573e802b Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Thu, 12 Apr 2018 21:45:12 +0300 Subject: [PATCH 086/173] move notifications to new NatLibFi Slack instance --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3c65e33ca..601c47626 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,4 +37,4 @@ matrix: - php: 7.2 - env: FUSEKI_VERSION=SNAPSHOT notifications: - slack: finto:5rO9Lp4Tstn6y34grtFBpjJ0 + slack: kansalliskirjasto:9mOKu3Vws1CIddF5jqWgXbli From 8d665487e0e0224273d8c42ea0e139446eb77941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= Date: Tue, 3 Apr 2018 14:47:49 +0200 Subject: [PATCH 087/173] Allow request input to be mocked --- model/Request.php | 55 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/model/Request.php b/model/Request.php index cfbdb96c0..9ec507b2a 100644 --- a/model/Request.php +++ b/model/Request.php @@ -14,6 +14,9 @@ class Request private $uri; private $letter; private $model; + private $queryParams; + private $queryParamsPOST; + private $serverConstants; /** * Initializes the Request Object @@ -21,6 +24,47 @@ class Request public function __construct($model) { $this->model = $model; + + // Store GET parameters in a local array, so we can mock them in tests. + // We do not apply any filters at this point. + $this->queryParams = []; + foreach (filter_input_array(INPUT_GET) ?: [] as $key => $val) { + $this->queryParams[$key] = $val; + } + + // Store POST parameters in a local array, so we can mock them in tests. + // We do not apply any filters at this point. + $this->queryParamsPOST = []; + foreach (filter_input_array(INPUT_POST) ?: [] as $key => $val) { + $this->queryParamsPOST[$key] = $val; + } + + // Store SERVER parameters in a local array, so we can mock them in tests. + // We do not apply any filters at this point. + $this->serverConstants = []; + foreach (filter_input_array(INPUT_SERVER) ?: [] as $key => $val) { + $this->serverConstants[$key] = $val; + } + } + + /** + * Set a GET query parameter to mock it in tests. + * @param string $paramName parameter name + * @param string $value parameter value + */ + public function setQueryParam($paramName, $value) + { + $this->queryParams[$paramName] = $value; + } + + /** + * Set a SERVER constant to mock it in tests. + * @param string $paramName parameter name + * @param string $value parameter value + */ + public function setServerConstant($paramName, $value) + { + $this->serverConstants[$paramName] = $value; } /** @@ -30,7 +74,8 @@ public function __construct($model) */ public function getQueryParam($paramName) { - $val = filter_input(INPUT_GET, $paramName, FILTER_SANITIZE_STRING); + if (!isset($this->queryParams[$paramName])) return null; + $val = filter_var($this->queryParams[$paramName], FILTER_SANITIZE_STRING); return ($val !== null ? str_replace('\\', '', $val) : null); } @@ -41,12 +86,13 @@ public function getQueryParam($paramName) */ public function getQueryParamRaw($paramName) { - return filter_input(INPUT_GET, $paramName, FILTER_UNSAFE_RAW); + return isset($this->queryParams[$paramName]) ? $this->queryParams[$paramName] : null; } public function getQueryParamPOST($paramName) { - return filter_input(INPUT_POST, $paramName, FILTER_SANITIZE_STRING); + if (!isset($this->queryParamsPOST[$paramName])) return null; + return filter_var($this->queryParamsPOST[$paramName], FILTER_SANITIZE_STRING); } public function getQueryParamBoolean($paramName, $default) @@ -60,7 +106,8 @@ public function getQueryParamBoolean($paramName, $default) public function getServerConstant($paramName) { - return filter_input(INPUT_SERVER, $paramName, FILTER_SANITIZE_STRING); + if (!isset($this->serverConstants[$paramName])) return null; + return filter_var($this->serverConstants[$paramName], FILTER_SANITIZE_STRING); } public function getLang() From 25ce463fcba9453ac18a4ce7835b4485e40a7883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= Date: Tue, 3 Apr 2018 13:02:31 +0200 Subject: [PATCH 088/173] Refactor getQueryParamArray to always return array --- model/ConceptSearchParameters.php | 2 +- tests/ConceptSearchParametersTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/ConceptSearchParameters.php b/model/ConceptSearchParameters.php index 635247300..46213d39e 100644 --- a/model/ConceptSearchParameters.php +++ b/model/ConceptSearchParameters.php @@ -124,7 +124,7 @@ private function getQueryParam($name) { } private function getQueryParamArray($name) { - return $this->request->getQueryParam($name) ? explode(' ', urldecode($this->request->getQueryParam($name))) : null; + return $this->request->getQueryParam($name) ? explode(' ', urldecode($this->request->getQueryParam($name))) : []; } public function getGroupLimit() diff --git a/tests/ConceptSearchParametersTest.php b/tests/ConceptSearchParametersTest.php index 4530eec7c..855590281 100644 --- a/tests/ConceptSearchParametersTest.php +++ b/tests/ConceptSearchParametersTest.php @@ -160,7 +160,7 @@ public function testGetArrayClass() { */ public function testGetSchemeLimit() { $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); - $this->assertEquals(null, $params->getSchemeLimit()); + $this->assertEquals([], $params->getSchemeLimit()); $this->request->method('getQueryParam')->will($this->returnValue('http://www.skosmos.skos/test/ http://www.skosmos.skos/date/')); $this->assertEquals(array(0 => 'http://www.skosmos.skos/test/', 1 => 'http://www.skosmos.skos/date/'), $params->getSchemeLimit()); } From ed1c8b2bfffb27a67087c6d383f838cf6630e84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= Date: Tue, 3 Apr 2018 16:02:51 +0200 Subject: [PATCH 089/173] Add mapping relations to JSON-LD context --- controller/RestController.php | 5 +++++ tests/RestControllerTest.php | 35 ++++++++++++++++++++++++++++++++++ tests/test-vocab-data/test.ttl | 1 + 3 files changed, 41 insertions(+) create mode 100644 tests/RestControllerTest.php diff --git a/controller/RestController.php b/controller/RestController.php index dc86ce441..cd4509dbd 100644 --- a/controller/RestController.php +++ b/controller/RestController.php @@ -561,6 +561,11 @@ private function returnDataResults($results, $format) { 'narrower' => 'skos:narrower', 'related' => 'skos:related', 'inScheme' => 'skos:inScheme', + 'exactMatch' => 'skos:exactMatch', + 'closeMatch' => 'skos:closeMatch', + 'broadMatch' => 'skos:broadMatch', + 'narrowMatch' => 'skos:narrowMatch', + 'relatedMatch' => 'skos:relatedMatch', ); $compactJsonLD = \ML\JsonLD\JsonLD::compact($results, json_encode($context)); $results = \ML\JsonLD\JsonLD::toString($compactJsonLD); diff --git a/tests/RestControllerTest.php b/tests/RestControllerTest.php new file mode 100644 index 000000000..985db3543 --- /dev/null +++ b/tests/RestControllerTest.php @@ -0,0 +1,35 @@ +model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->controller = new RestController($this->model); + } + + /** + * @covers RestController::data + */ + public function testDataAsJson() { + $request = new Request($this->model); + $request->setQueryParam('format', 'application/json'); + $request->setURI('http://www.skosmos.skos/test/ta117'); + $this->controller->data($request); + + $out = $this->getActualOutput(); + + $this->assertJsonStringEqualsJsonString('{"@context":{"skos":"http://www.w3.org/2004/02/skos/core#","isothes":"http://purl.org/iso25964/skos-thes#","rdfs":"http://www.w3.org/2000/01/rdf-schema#","owl":"http://www.w3.org/2002/07/owl#","dct":"http://purl.org/dc/terms/","dc11":"http://purl.org/dc/elements/1.1/","uri":"@id","type":"@type","lang":"@language","value":"@value","graph":"@graph","label":"rdfs:label","prefLabel":"skos:prefLabel","altLabel":"skos:altLabel","hiddenLabel":"skos:hiddenLabel","broader":"skos:broader","narrower":"skos:narrower","related":"skos:related","inScheme":"skos:inScheme","exactMatch":"skos:exactMatch","closeMatch":"skos:closeMatch","broadMatch":"skos:broadMatch","narrowMatch":"skos:narrowMatch","relatedMatch":"skos:relatedMatch"},"graph":[{"uri":"http://www.skosmos.skos/test-meta/TestClass","type":"owl:Class","label":{"lang":"en","value":"Test class"}},{"uri":"http://www.skosmos.skos/test/conceptscheme","type":"skos:ConceptScheme","label":{"lang":"en","value":"Test conceptscheme"}},{"uri":"http://www.skosmos.skos/test/ta1","type":["http://www.skosmos.skos/test-meta/TestClass","skos:Concept"],"narrower":{"uri":"http://www.skosmos.skos/test/ta117"},"prefLabel":{"lang":"en","value":"Fish"}},{"uri":"http://www.skosmos.skos/test/ta115","type":["http://www.skosmos.skos/test-meta/TestClass","skos:Concept"],"prefLabel":{"lang":"en","value":"Eel"}},{"uri":"http://www.skosmos.skos/test/ta117","type":["http://www.skosmos.skos/test-meta/TestClass","skos:Concept"],"broader":{"uri":"http://www.skosmos.skos/test/ta1"},"inScheme":{"uri":"http://www.skosmos.skos/test/conceptscheme"},"prefLabel":{"lang":"en","value":"3D Bass"},"relatedMatch":{"uri":"http://www.skosmos.skos/test/ta115"}},{"uri":"skos:broader","label":{"lang":"en","value":"has broader"}},{"uri":"skos:prefLabel","label":{"lang":"en","value":"preferred label"}}]}', $out); + } +} \ No newline at end of file diff --git a/tests/test-vocab-data/test.ttl b/tests/test-vocab-data/test.ttl index 007ec1470..4237d5f53 100644 --- a/tests/test-vocab-data/test.ttl +++ b/tests/test-vocab-data/test.ttl @@ -74,6 +74,7 @@ test:ta116 a skos:Concept, meta:TestClass ; test:ta117 a skos:Concept, meta:TestClass ; skos:broader test:ta1 ; skos:inScheme test:conceptscheme ; + skos:relatedMatch test:ta115 ; skos:prefLabel "3D Bass"@en . test:ta118 a skos:Concept, meta:TestClass ; From 1a5cc6cfa3136fb5244b421fb1d71808b1d9be4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= Date: Tue, 3 Apr 2018 13:10:06 +0200 Subject: [PATCH 090/173] Add additional fields to JSON-LD context for search endpoint If additional fields are requested using the 'fields' parameter, add them to the JSON-LD context. Note: This will break any implementation that relies on the 'skos:' prefix being part of the keys. --- controller/RestController.php | 48 +++++++++++++++++++++++------------ tests/RestControllerTest.php | 29 +++++++++++++++++++++ 2 files changed, 61 insertions(+), 16 deletions(-) diff --git a/controller/RestController.php b/controller/RestController.php index cd4509dbd..814f474e8 100644 --- a/controller/RestController.php +++ b/controller/RestController.php @@ -112,27 +112,43 @@ private function constructSearchParameters($request) return $parameters; } - private function transformSearchResults($request, $results) + private function transformSearchResults($request, $results, $parameters) { // before serializing to JSON, get rid of the Vocabulary object that came with each resource foreach ($results as &$res) { unset($res['voc']); } - $ret = array( - '@context' => array( - 'skos' => 'http://www.w3.org/2004/02/skos/core#', - 'isothes' => 'http://purl.org/iso25964/skos-thes#', - 'onki' => 'http://schema.onki.fi/onki#', - 'uri' => '@id', - 'type' => '@type', - 'results' => array( - '@id' => 'onki:results', - '@container' => '@list', - ), - 'prefLabel' => 'skos:prefLabel', - 'altLabel' => 'skos:altLabel', - 'hiddenLabel' => 'skos:hiddenLabel', + + $context = array( + 'skos' => 'http://www.w3.org/2004/02/skos/core#', + 'isothes' => 'http://purl.org/iso25964/skos-thes#', + 'onki' => 'http://schema.onki.fi/onki#', + 'uri' => '@id', + 'type' => '@type', + 'results' => array( + '@id' => 'onki:results', + '@container' => '@list', ), + 'prefLabel' => 'skos:prefLabel', + 'altLabel' => 'skos:altLabel', + 'hiddenLabel' => 'skos:hiddenLabel', + ); + foreach ($parameters->getAdditionalFields() as $field) { + + // Quick-and-dirty compactification + $context[$field] = 'skos:' . $field; + foreach ($results as &$result) { + foreach ($result as $k => $v) { + if ($k == 'skos:' . $field) { + $result[$field] = $v; + unset($result['skos:' . $field]); + } + } + } + } + + $ret = array( + '@context' => $context, 'uri' => '', 'results' => $results, ); @@ -171,7 +187,7 @@ public function search($request) $parameters = $this->constructSearchParameters($request); $results = $this->model->searchConcepts($parameters); - $ret = $this->transformSearchResults($request, $results); + $ret = $this->transformSearchResults($request, $results, $parameters); return $this->returnJson($ret); } diff --git a/tests/RestControllerTest.php b/tests/RestControllerTest.php index 985db3543..3ee8ec67a 100644 --- a/tests/RestControllerTest.php +++ b/tests/RestControllerTest.php @@ -32,4 +32,33 @@ public function testDataAsJson() { $this->assertJsonStringEqualsJsonString('{"@context":{"skos":"http://www.w3.org/2004/02/skos/core#","isothes":"http://purl.org/iso25964/skos-thes#","rdfs":"http://www.w3.org/2000/01/rdf-schema#","owl":"http://www.w3.org/2002/07/owl#","dct":"http://purl.org/dc/terms/","dc11":"http://purl.org/dc/elements/1.1/","uri":"@id","type":"@type","lang":"@language","value":"@value","graph":"@graph","label":"rdfs:label","prefLabel":"skos:prefLabel","altLabel":"skos:altLabel","hiddenLabel":"skos:hiddenLabel","broader":"skos:broader","narrower":"skos:narrower","related":"skos:related","inScheme":"skos:inScheme","exactMatch":"skos:exactMatch","closeMatch":"skos:closeMatch","broadMatch":"skos:broadMatch","narrowMatch":"skos:narrowMatch","relatedMatch":"skos:relatedMatch"},"graph":[{"uri":"http://www.skosmos.skos/test-meta/TestClass","type":"owl:Class","label":{"lang":"en","value":"Test class"}},{"uri":"http://www.skosmos.skos/test/conceptscheme","type":"skos:ConceptScheme","label":{"lang":"en","value":"Test conceptscheme"}},{"uri":"http://www.skosmos.skos/test/ta1","type":["http://www.skosmos.skos/test-meta/TestClass","skos:Concept"],"narrower":{"uri":"http://www.skosmos.skos/test/ta117"},"prefLabel":{"lang":"en","value":"Fish"}},{"uri":"http://www.skosmos.skos/test/ta115","type":["http://www.skosmos.skos/test-meta/TestClass","skos:Concept"],"prefLabel":{"lang":"en","value":"Eel"}},{"uri":"http://www.skosmos.skos/test/ta117","type":["http://www.skosmos.skos/test-meta/TestClass","skos:Concept"],"broader":{"uri":"http://www.skosmos.skos/test/ta1"},"inScheme":{"uri":"http://www.skosmos.skos/test/conceptscheme"},"prefLabel":{"lang":"en","value":"3D Bass"},"relatedMatch":{"uri":"http://www.skosmos.skos/test/ta115"}},{"uri":"skos:broader","label":{"lang":"en","value":"has broader"}},{"uri":"skos:prefLabel","label":{"lang":"en","value":"preferred label"}}]}', $out); } + + /** + * @covers RestController::search + */ + public function testSearchJsonLd() { + $request = new Request($this->model); + $request->setQueryParam('format', 'application/json'); + $request->setQueryParam('query', '*bass'); + $this->controller->search($request); + + $out = $this->getActualOutput(); + + $this->assertJsonStringEqualsJsonString('{"@context":{"skos":"http:\/\/www.w3.org\/2004\/02\/skos\/core#","isothes":"http:\/\/purl.org\/iso25964\/skos-thes#","onki":"http:\/\/schema.onki.fi\/onki#","uri":"@id","type":"@type","results":{"@id":"onki:results","@container":"@list"},"prefLabel":"skos:prefLabel","altLabel":"skos:altLabel","hiddenLabel":"skos:hiddenLabel"},"uri":"","results":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta117","type":["skos:Concept","meta:TestClass"],"prefLabel":"3D Bass","lang":"en","vocab":"test"},{"uri":"http:\/\/www.skosmos.skos\/test\/ta116","type":["skos:Concept","meta:TestClass"],"prefLabel":"Bass","lang":"en","vocab":"test"},{"uri":"http:\/\/www.skosmos.skos\/test\/ta122","type":["skos:Concept","meta:TestClass"],"prefLabel":"Black sea bass","lang":"en","vocab":"test"}]}', $out); + } + + /** + * @covers RestController::search + */ + public function testSearchJsonLdWithAdditionalFields() { + $request = new Request($this->model); + $request->setQueryParam('format', 'application/json'); + $request->setQueryParam('query', '*bass'); + $request->setQueryParam('fields', 'broader relatedMatch'); + $this->controller->search($request); + + $out = $this->getActualOutput(); + + $this->assertJsonStringEqualsJsonString('{"@context":{"skos":"http:\/\/www.w3.org\/2004\/02\/skos\/core#","isothes":"http:\/\/purl.org\/iso25964\/skos-thes#","onki":"http:\/\/schema.onki.fi\/onki#","uri":"@id","type":"@type","results":{"@id":"onki:results","@container":"@list"},"prefLabel":"skos:prefLabel","altLabel":"skos:altLabel","hiddenLabel":"skos:hiddenLabel","broader":"skos:broader","relatedMatch":"skos:relatedMatch"},"uri":"","results":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta117","type":["skos:Concept","meta:TestClass"],"broader":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta1"}],"relatedMatch":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta115"}],"prefLabel":"3D Bass","lang":"en","vocab":"test"},{"uri":"http:\/\/www.skosmos.skos\/test\/ta116","type":["skos:Concept","meta:TestClass"],"broader":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta1"}],"prefLabel":"Bass","lang":"en","vocab":"test"},{"uri":"http:\/\/www.skosmos.skos\/test\/ta122","type":["skos:Concept","meta:TestClass"],"broader":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta116"}],"prefLabel":"Black sea bass","lang":"en","vocab":"test"}]}', $out); + } } \ No newline at end of file From 5d8424b180bfc3f80cbe0b838c1712807cfc6708 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Fri, 13 Apr 2018 13:02:08 +0300 Subject: [PATCH 091/173] Add unit test for #744 / PR #756. Fixes #744 --- tests/ConceptPropertyValueTest.php | 10 ++++++++++ tests/test-vocab-data/xl.ttl | 28 ++++++++++++++++++++++++++++ tests/testvocabularies.ttl | 9 +++++++++ 3 files changed, 47 insertions(+) create mode 100644 tests/test-vocab-data/xl.ttl diff --git a/tests/ConceptPropertyValueTest.php b/tests/ConceptPropertyValueTest.php index 48390950e..e1766f953 100644 --- a/tests/ConceptPropertyValueTest.php +++ b/tests/ConceptPropertyValueTest.php @@ -201,4 +201,14 @@ public function testGetSubMembersEmpty() { $propval = new ConceptPropertyValue($this->model, $this->vocab, $mockres, 'en'); $this->assertEquals(null, $propval->getSubMembers()); } + + public function testGetReifiedPropertyValues() { + $vocab = $this->model->getVocabulary('xl'); + $concept = $vocab->getConceptInfo('http://www.skosmos.skos/xl/c1', 'en')[0]; + $props = $concept->getProperties(); + $vals = $props['skos:definition']->getValues(); + $val = reset($vals); + $reified_vals = $val->getReifiedPropertyValues(); + $this->assertEquals(2, count($reified_vals)); + } } diff --git a/tests/test-vocab-data/xl.ttl b/tests/test-vocab-data/xl.ttl new file mode 100644 index 000000000..f3fbd01e6 --- /dev/null +++ b/tests/test-vocab-data/xl.ttl @@ -0,0 +1,28 @@ +@prefix xl: . +@prefix rdf: . +@prefix dct: . +@prefix xsd: . +@prefix skos: . +@prefix skosxl: . + +xl:c1 a skos:Concept ; + skos:prefLabel "Concept"@en ; + skos:altLabel "Conceptual entity"@en ; + skos:definition xl:d1 ; + skosxl:prefLabel xl:l1 ; + skosxl:altLabel xl:l2 . + +xl:l1 a skosxl:Label ; + skosxl:literalForm "Concept"@en ; + dct:modified "2018-04-13T10:29:03+00:00"^^xsd:dateTime ; + skosxl:labelRelation xl:l2 . + +xl:l2 a skosxl:Label ; + skosxl:literalForm "Conceptual entity"@en ; + dct:description "alternate label for Concept"@en ; + skosxl:labelRelation xl:l1 . + +xl:d1 + rdf:value "Unit of thought"@en ; + dct:modified "2018-04-13T10:29:03+00:00"^^xsd:dateTime ; + dct:source . diff --git a/tests/testvocabularies.ttl b/tests/testvocabularies.ttl index 13bffc847..e46b967d0 100644 --- a/tests/testvocabularies.ttl +++ b/tests/testvocabularies.ttl @@ -203,6 +203,15 @@ skosmos:language "en"; skosmos:sparqlGraph . +:xl a skosmos:Vocabulary, void:Dataset ; + dc11:title "A vocabulary for testing SKOS XL"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/xl/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . + + dc:format "application/rdf+xml" . :cat_science a skos:Concept ; From 6f1807a9a5124eafd139d17b20639cc617fcc2ad Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Fri, 4 May 2018 16:48:45 +0300 Subject: [PATCH 092/173] Open all hierarchies when a concept is in multiple schemes. Fixes #765 --- resource/js/hierarchy.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resource/js/hierarchy.js b/resource/js/hierarchy.js index 719c9775c..31ca18669 100644 --- a/resource/js/hierarchy.js +++ b/resource/js/hierarchy.js @@ -129,7 +129,7 @@ function createConceptObject(conceptUri, conceptData) { */ function attachTopConceptsToSchemes(schemes, currentNode, parentData) { for (var i = 0; i < schemes.length; i++) { - if (schemes[i].uri === parentData[currentNode.uri].top) { + if (parentData[currentNode.uri].tops.indexOf(schemes[i].uri) != -1) { if(Object.prototype.toString.call(schemes[i].children) !== '[object Array]' ) { schemes[i].children = []; } @@ -137,7 +137,6 @@ function attachTopConceptsToSchemes(schemes, currentNode, parentData) { // the hierarchy response contains the parent info before the topConcepts so it's a safe to open the first one without broaders if (!schemes.opened && !currentNode.broader) { schemes[i].state = currentNode.state; - schemes.opened = true; } } } From 164acc3d46d35d4a3cae914e8052e5158fb10211 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Wed, 9 May 2018 14:50:08 +0300 Subject: [PATCH 093/173] fix layout issue due to having a

element instead of in skosxl display --- view/concept-shared.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/concept-shared.twig b/view/concept-shared.twig index 7185b532d..d034e0068 100644 --- a/view/concept-shared.twig +++ b/view/concept-shared.twig @@ -99,7 +99,7 @@ {% endif %} {% elseif property.type == 'rdf:type' %}

{{ propval.label|trans }}

{% else %} {# Literals (no URI), eg. alternative labels as properties #} - {% if propval.lang == request.contentLang or propval.lang == null or not request.contentLang and propval.lang == request.lang %}{% if propval.hasXlProperties %}
{% for key, val in propval.getXlProperties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' and val != '' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{% endif %}{% if propval.containsHtml %}{{ propval.label|raw }}{% else %}{{ propval.label }}{% endif %}{% if propval.lang and (request.contentLang and propval.lang != request.contentLang or explicit_langcodes) %} ({{ propval.lang }}){% endif %}

+ {% if propval.lang == request.contentLang or propval.lang == null or not request.contentLang and propval.lang == request.lang %}{% if propval.hasXlProperties %}
{% for key, val in propval.getXlProperties %}{% if key != 'rdf:type' and key != 'skosxl:literalForm' and val != '' %}

{{ key|trans }}: {{ val }}

{% endif %}{% endfor %}
{% endif %}{% if propval.containsHtml %}{{ propval.label|raw }}{% else %}{{ propval.label }}{% endif %}{% if propval.lang and (request.contentLang and propval.lang != request.contentLang or explicit_langcodes) %} ({{ propval.lang }}){% endif %} {% endif %} {% endif %} From 7b517f1ee5d62c748dab121cddbc7fe8a6878cce Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Wed, 23 May 2018 18:16:07 +0300 Subject: [PATCH 094/173] Change feedback message headers to use Reply-To and make name and e-mail optional. Fixes #761 --- config.inc.dist | 5 +- controller/WebController.php | 25 ++- model/GlobalConfig.php | 18 ++ resource/js/docready.js | 2 +- .../translations/en/LC_MESSAGES/skosmos.mo | Bin 10783 -> 10970 bytes .../translations/fi/LC_MESSAGES/skosmos.mo | Bin 11094 -> 11280 bytes resource/translations/skosmos_en.po | 54 +---- resource/translations/skosmos_fi.po | 197 +----------------- resource/translations/skosmos_sv.po | 191 +---------------- .../translations/sv/LC_MESSAGES/skosmos.mo | Bin 11068 -> 11222 bytes view/feedback.twig | 3 +- 11 files changed, 55 insertions(+), 440 deletions(-) diff --git a/config.inc.dist b/config.inc.dist index d73532109..0d1a4a939 100644 --- a/config.inc.dist +++ b/config.inc.dist @@ -31,9 +31,12 @@ define("TEMPLATE_CACHE", "/tmp/skosmos-template-cache"); // set to "JenaText" instead if you use Fuseki with jena-text index define("DEFAULT_SPARQL_DIALECT", "Generic"); -// default email address to send the feedback +// default email address where to send the feedback define("FEEDBACK_ADDRESS", ""); +// email address to set as the sender for feedback messages +define("FEEDBACK_SENDER", ""); + // email address to set as the envelope sender for feedback messages define("FEEDBACK_ENVELOPE_SENDER", ""); diff --git a/controller/WebController.php b/controller/WebController.php index 74bb301cd..d34d0e815 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -273,15 +273,19 @@ public function invokeFeedbackForm($request) )); } - private function createFeedbackHeaders($fromName, $fromEmail, $toMail) + private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) { $headers = "MIME-Version: 1.0″ . '\r\n"; $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n"; - if ($toMail) { + if (!empty($toMail)) { $headers .= "Cc: " . $this->model->getConfig()->getFeedbackAddress() . "\r\n"; } + if (!empty($fromEmail)) { + $headers .= "Reply-To: $fromName <$fromEmail>\r\n"; + } - $headers .= "From: $fromName <$fromEmail>" . "\r\n" . 'X-Mailer: PHP/' . phpversion(); + $service = $this->model->getConfig()->getServiceName(); + $headers .= "From: $fromName via $service <$sender>"; return $headers; } @@ -299,16 +303,23 @@ public function sendFeedback($request, $message, $fromName = null, $fromEmail = $message = 'Feedback from vocab: ' . strtoupper($fromVocab) . "
" . $message; } - $subject = SERVICE_NAME . " feedback"; - $headers = $this->createFeedbackHeaders($fromName, $fromEmail, $toMail); - $envelopeSender = FEEDBACK_ENVELOPE_SENDER; + $envelopeSender = $this->model->getConfig()->getFeedbackEnvelopeSender(); + $subject = $this->model->getConfig()->getServiceName() . " feedback"; + // determine the sender address of the message + $sender = $this->model->getConfig()->getFeedbackSender(); + if (empty($sender)) $sender = $envelopeSender; + if (empty($sender)) $sender = $toAddress; + + // determine sender name - default to "anonymous user" if not given by user + if (empty($fromName)) $fromName = "anonymous user"; + + $headers = $this->createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender); $params = empty($envelopeSender) ? '' : "-f $envelopeSender"; // adding some information about the user for debugging purposes. $message = $message . "

Debugging information:" . "
Timestamp: " . date(DATE_RFC2822) . "
User agent: " . $request->getServerConstant('HTTP_USER_AGENT') - . "
IP address: " . $request->getServerConstant('REMOTE_ADDR') . "
Referer: " . $request->getServerConstant('HTTP_REFERER'); try { diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index e2881851a..075843d3e 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -141,6 +141,24 @@ public function getFeedbackAddress() return $this->getConstant('FEEDBACK_ADDRESS', null); } + /** + * Returns the feedback sender address defined in the configuration. + * @return string + */ + public function getFeedbackSender() + { + return $this->getConstant('FEEDBACK_SENDER', null); + } + + /** + * Returns the feedback envelope sender address defined in the configuration. + * @return string + */ + public function getFeedbackEnvelopeSender() + { + return $this->getConstant('FEEDBACK_ENVELOPE_SENDER', null); + } + /** * Returns true if exception logging has been configured. * @return boolean diff --git a/resource/js/docready.js b/resource/js/docready.js index b464c0464..57b5688ee 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -774,7 +774,7 @@ $(function() { // DOCUMENT READY var emailMessageVal = $("#message").val(); var emailAddress = $("#email").val(); var requiredFields = true; - if (emailAddress === '' || emailAddress.indexOf('@') === -1) { + if (emailAddress != '' && emailAddress.indexOf('@') === -1) { $("#email").addClass('missing-value'); requiredFields = false; } diff --git a/resource/translations/en/LC_MESSAGES/skosmos.mo b/resource/translations/en/LC_MESSAGES/skosmos.mo index c948cb0b3238f440ab0cfca60213866fa03a218e..f3de1fa6ff826f792c71aa3ca45549cbaa8cfd97 100644 GIT binary patch delta 3724 zcmYk-2XItH9LMnuXuENK0m#sg7b@_e9*55!Sa1R^fU)CgU(s+GQ;|#*un2K~U z`Pc*(Vrvs%g%p(8HLQt0p%QtB$~1;iA}|4Cu@0(#Q`8FEVGZnU+ee`i7;oFXsQzmCXl1plhqfdUwZgv0;!O%_;xweMDL`^Ei%~1sXzNQ+{Xak@bPko^71U1N zM)fbVR$vv{p}2VVUmX*u&{j7>4bTR)6Wy%?ZTo1{fElO(bM5a!RN@Qm@0HdqsB!nA z#(UrX{uDLug?RQ~16`*=-a$=JhI(e<38745QSI@ltxiHE+66U1f7DJ5MeS53>i+4d z@#di(#ZuHx?L?+9hXWLJ<2maOs0sc>y-qb~)QxSi4)#a2k3&r~1J!Q{mJf`2M2D?s zQ7gZSTEJcV`vEG!Kt)E^N~)r^FbUPMmHpird2FT+>V}t51G;ScWYqmLQ3)-w?Hf@m z+=m+XG%B(4w*6+vfVoFO9m83M2Cjwr-3&Eg4_lvX>&K!7%(LxtP%AG%C9)m0QFSac0f(k6P5X3>sZ^Ki`tplw!Q@UXLj&MUG47y*n;`Z5DHpZ0cyZv)S(HY zp4B!~rn~Vu+>cA~Z`4G^yc%j>fz5FZ>P(zMwSSGN_#Jk|XBveTSb%YQ|BEQ-nFUda z>_MG{4^gN6GAf}m)LE&-5$7PAW~d$MhkB+d7>T*46;DIm7r+QyhWZ|?L@l&b^~`S$ zP|#MthZ^t%E89&s56soEkyNS zi~)6ALqQ!6q6WT&-S9V5VlA762JDLJHw>e(2sQ9x)S+FE>R*a_)`wA_@=uU&n7M-O zu?)2{&6~6TdREI?ciYP={;mfCA0 zn`RoJ5`G>vUWzrX1uNuS7(W$qH7fICsFi(&VYo9G7E^uDTa+|ScVZu*Yi0Pyn^F`pl+dN!T|(p%uM)!vACXPWCAJb{hzY?xF%5f` zQqt8jgvrBcwmiVP2)7U~5Uq)1Vh_=qm=&xVTQgxjrT<^r(EMPJ*rfUsDLKT`#2iA8 zq(2c(Y$h^;g|T&;@1WF*=tpcMx)5GM*Xx9iINNN-2T#V3|B!UD- z)a)kw#5`g#v5U|Pw3e7bL=d`k=3_#;V9ez5Dr4S8{g;qNj3#o3*MixV8-~4ca9QO* zR4unVeVi+8VyZjG@6Julab>$x-PtZr*1^gNAH@Zdv)nG9+bM5!^1XSvj(Rw*oOGwW zm*YxL&vpBJjweIS&Qy;t)A4(qTz8t=Glh;$x`(o#3g0Aej?dl38A&%+me1>Cy6E7~ sbUWTjevdatxB2qMWqbUgi89Ens#0S%Z%%%;H_w-q-{#=w4U(h(0~7&v*pve>irB88OuSX?t6;trKHG&^$yiC+MPhxu< zg>*5wn2H71-8ig}hBB+e7(9ncq!E?rT?{}Eqj|9g^Ab}Gwl5ls01e1`_oYU z7oZX@L{+Q^qL8f5o(-O zsLEAh0v^IXcorS4EF{V;NjPeSnaHBeVARB8k-lawl7m@}T0yD3UWw{ogG%T)D#0I7 zmAr)Nf6aOuRiXP))L$JvEK8+sgBl7z` zsD+)h=XIzA8&H*YuF+8Gnou2EFsshPkjG>?pnlK;HDEt`e;8_jaj1l5*!zo7D_n~j zrxKOeUVHzD^?RhBV=mYWf4UdU1Jr;~EKd`rq6X}X8gL}){!6Hp=b;i=hAR06dwrXA zFH%f%7}c*1_4~^hqW8a%hBm|B)?n(aiDFQhceeIL^&5_=%mjNq5BX=7^GEl~QTO+t z7H|}m=xJ0Umr#%Nmd^G5dpT2wPN)@RV6&ewPoqA){rEU!;w03kcMIx6QfA$OYNaRb^(&}xe#dO|Pjo-MIheuu64b)>J2X_1&rlPbwO&O{d=oW6 zP?DQqJJbr(P}h5*5*mc6+-U1$)XL|e`sZ57p(o~=ZthUyoI-Woc zSce+$9I668qaMj0_I|U~baKZHLG_EY=keH;^AuzOju}lu15QV6nq1VgD#VAG;&YrA zqZ0VZUcZ3poHwBMLNKq2?#JRZ?2H3(4QgRup%OWbdQ|5zQt$t58rlQ?o!woYh)N_2 zwMkw?HmsS4szeF$SWP)9(JxRHJcjz+DGb1~sPDif)B+pr^=4Fs?_ntOn^4{z4HSb~ zK^!(=sy*+>2GI&qPy_WsCDI>RycvR8(QNF6MX1;9p!Ec*e?6*S1FGL&=xE^dF2+28 zkE1es6V=f{b*#W3JdGN-9<^D2LG^D$mG%MZQ|(Q2zi>&|oAWGGW#*$E)k+LNUmEq- z%C~bt1MNgMg{eU$a2(lB<~%CVf3PQdc<}m^W}*fhiMl@(DVoW}AS^|VS8m;hJZ*Et zdL^BgRGIsAbypUFew^?1wF-@j{*acY$s!IAI+pu-dt;K8(V9ePbz1RaLdOuI53$3S z9~w1aC9ObW4534{e3!^4rV`_c1;p#bD&hlT3X$tO7MeWhV_G^Mb1{o>scjFpmS7bz zlITv1CO##eB^+OpHzxXhTK_*(zPEfYcoUN5(n=(rB8mt-fMJ9`v74Cf+vJT+-$Sb# zF_hRz3?SwcI^H2x5IlA>%Xh{b>&c@v(|5}oTj_hsVI zv4n;m=NtCI7JSXN*W+f}o`cmy8WBS1Eh{Ga5%x$myJ)>a^dR(lmlAr7A05+al=*7H zdOB-qy-mDFR1n*U3B;qLhQ>!kHnG88)R(0d;UiupJj7Oljb-)|3yIalMq(e~B`S$R yB7o4*o(OfTz&rQw68{r``ta+ROw1$J`Id(#`)#VN3U>l)2S$G#R$G!hD(F8**++o@ diff --git a/resource/translations/fi/LC_MESSAGES/skosmos.mo b/resource/translations/fi/LC_MESSAGES/skosmos.mo index 697793fb49f498e93c0cd199a1cb16f7a4ffa17a..7099e17e3f04e05ad3e4a3d67186a1fed183f067 100644 GIT binary patch delta 3722 zcmYk;32anF9LMp2QVzSc94&={?P58F7AOdUpaF`Q0HzQwwOF>W(52libhkju@dS#3 z+$;rD5P`}mhe5GmG~gmZO*l+YBM5>h5^E$u(?S&e{@5Y$W&it`H*em&ng7h&_M7o* zCpuSJG^jKjhlqB>hFD{6p(~Crj>GZBq~rVe1YX1#j7u}rA zK4v^$jd2?4dT~_8lu>9z#S+vrS73A8gw1fTtv`-!IX`XducHQV2Rq_jYZ^DHzhS6; zMqwMwLz4f<|@)lkp~MApfF98b>b;FbQ3lf@zhXnwQ}lpFn24#!Dwy8b6o;T@m}8w` z>nl+GtVd;TAEx1H%)(#L(ahSkjHVfszoFXKTI(|lWvFQ)`B%dvDwOIDs17nwnHXptX|Ly^I-G{;u*9A(Kn;Ak zJ>O{Ef$H}ls=sP`eg^g2uM^3?I=V)MtU*1X7PV$ENzswIP}dVtsZK);v_I+r!%>+U zjmlI3>i&7C{wh#Qu@;r7J;)=>F^7U~JZt?K^?<)ouTv{7>c$?Jg2PeQ^HC3)k7~CD zA9RdbqGQ&tP&5AlHG$vlc^ztiPGfr4Oq!!on1*WD-JbVDmd#|NZkUMb&||O9LfyX* zHK3LD`Zm-I525-!g&Noed;O=Vj=4iY4P%&wI&O_R?}F-Zkgd@D`F>Q;V8N!lTiFwL?9x8#+qyU<$fnEb133A2pBydtQc`k%MH- zthU#8qdKleb@(}U#!IM~$1oc9nMpMqB8ae>ZiHBJDRB`s8pw*GL(hN%m{3c6LB1tqcVFQGx3^3K^--t zl?ITE8hM7bFY1BMpfWNB)h^#&pNq=CB2>!Ppk}-iHN$FD=1!s7eSylvx2Oy{S1D)! zw`|32)Bx_GMjG>2bViA&0c4<3I0)5lsI4D~`rXL2*QcYF!jEd_pzdFWdfsMqQ*E|U zV1t_zsD_tNGr55pc^&G8e{cde;J=YIn2Ty(gKGB|@-g@L(*3EdpE8k!`8XU0;y%=U zH?gVS|JxL_X7^ERoXpl_1Dj5$5oe=PHx@~X$+zbfs2Q)v$8jrapl492KZhE?C0l>n zp4ZxQS0~!@eAAKwzX>Jroj!+m-zHpm3RrCg>uMeXtd34M(7E%tOtn9Eafs)BwImwXZ=9 zw0*Z|eHLl}*~qpr`KXL8MYUUjx_^sO#;a@&QlT5p+6y(-`&f_qJ>hzBEk{*RQsT6Y z4iP#QMlo+&AF_bLON8dHT`-%_kxgU~Tf&~Wmi-q|YDkPGbo3;&xl4$biE%`b@Dodj zox~(!M)*Kn`rv((bTG&VM=9TPZTUItO58z=ATo#?;s7y}cqQE2m7KJd(*F-FNLhH0 zE3JJYB{%Ujv6#@?F`S4Ywi5;61+KPTcT?(4JWFgN`V+;3j@Jooanfw2hfliN#uibU z7QW_6b~aPe@dmM!XiSVJwBY4LeL{=(0`c&eLqR`>Gi}9s^xE=rTxZKZe3xKDKG;~= zOs^6B2zzug?@*ddXsh!l(yS%42_7CE3LC>)oAz*Cr8JMIB;F)85fg}q$3Y6ah%v+p zTR8x=$2JgCiC7{`u+`0eB1BXWtBAdX-r%>0`9uRkhxUA2Gz+}O52|>LQGX<-5V=Hv zSQhrjr`KD3WL><|u(j7aHQzI(FwYwZc}wyF9=|uw>-YGIj>IQ*jCZ^xCB^Q5&+iTT z+%r7xV5F*`FmiNeaWLd74i@`DAum_D)4~^U&-MgE9*^Jebq9Tc(xM`-yTBVL^c6*p z78VzTJiefpyE5J5xy@bRDJl(lgF%n_jZ}p~k*Y|Qd#0zzQ>s1#Zhu+iXwaRYM|1J0 QKT;KlRAnCNmEN)OfBHa*?EnA( delta 3519 zcmYk<2~bs49LMp4@CfAjTmYYnBJd1B1@n=(qa~@6l}Z8bnz@9iM4?z(`ERR+xeO znIZf{U>>S{Qc%YfPITvZXo~UsK zU|Sr4bTI{(j76Ac99Bp{Gpj={{)n2$E!0f!V;H&^&5cb_{k^CaCSYsKuAs1**fj6tHM&0;Dq_3HY%)u0+R#0y1D^dMxP!l?d zn&7vnOkPIyZ?N7)W$2%1@~@6AmZen3pazIXWulw4ziodGHDDfUz$x~8HfrKU_I!X2@eQ?NAq_qXz6{+lQhCcnLM3DYktf zYK5y&<5Z$1w%@jYYW*7N=a`GO;`d;Md59V?n&s(+$*2J{Q3DP~wU0)vybv{!rKpsb z*!l|Vek7UZ7^+_#>iR1fsrUaD1#O1Etr6r|H}axp-pQJY>NgCPnS5Jci2Rvie$>7d z)xHn4fa9o%o<&XMGU}1u(YfA#H)raQgjzuc-U~5iAnHrii;qJ$oQQf|*P}M&M(Z|= z=X^J6g{P1tn(t5x`2{txyQm3-bO>g^i;gbnLP1}q-l&OW+4B*o3v-d=n5nkC7&UMi zYQP=X84saWei7MD<|b-lVf<(uAL>)>$21%rPyV%%HB{(=GE~a;qUsN$R(t}LnbWA( zt`0Tvdej%~I_gn{bE3`K2DN7rQR8Hy7MO(^CmTtw8QIYZuAtC1tiVn*l%oDC_X%p| zM^KyQ4C<3ykIK|fs8ruZWhf#cn3+UOsBx}46qLf7sF{aym2{(S z7>mkC3aVdk+x`M71No?wPeZM^2(`j8ROTvC{dS=;QG?3hVblbiQ?}wu)Q!JK&GaH_ zMZcmZ5SkQBVKk~=TU31#>bv2$?E_GcVlb*-E~?)|)D7og0xm=zfnzEtsN*5jN{*vu zUWdBi2h7JysD6I_HKO)@$e$U+kFJ}F%D^I=f~D9WZ=&@ZWbvljo}Wdnv>vY-y!D78^Gmsy@@653uJs)-lMdZzf|T_cx0v zxNsF}pb|WZ6{s8LCI?qA8TAYcP_N%yWaFD#sDam`Uau3_59?7GjbS$3 zF$uK^b5hCwlN82Np=Y=Wb>Uvriay6@@DgeQ3FKY<{iun~K-DioO`rtXCZ-x)_zkMx zIaI%&kvG-+iRvHIm6uly{;ol@F@*E|ftFFxu^&)U;1^JrIf}IJqSJX zg@lf5!cXi7%#Difvz$^mF^bUf1W`uJB_hw#@_^)f^z^6K@e4 zh-$)3R1!;wFhWOLA}W{#V_t8p;(r3LwJndw*~HpFvBwuuT3h9D!fX4+`aHEaeZGkQ E0QY}Eq5uE@ diff --git a/resource/translations/skosmos_en.po b/resource/translations/skosmos_en.po index f1b85d0ed..deedf0c00 100644 --- a/resource/translations/skosmos_en.po +++ b/resource/translations/skosmos_en.po @@ -761,53 +761,7 @@ msgstr "" "if the truncation symbol is not entered manually: thus, cat will yield the " "same results as cat*." -#~ msgid "dc11:contributor" -#~ msgstr "Contributor" - -#~ msgid "dc11:creator" -#~ msgstr "Creator" - -#~ msgid "dc11:description" -#~ msgstr "Description" - -#~ msgid "dc11:license" -#~ msgstr "License" - -#~ msgid "dc11:publisher" -#~ msgstr "Publisher" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" - -#~ msgid "dc11:rights" -#~ msgstr "Rights" - -#~ msgid "dc11:source" -#~ msgstr "Source" - -#~ msgid "dc11:title" -#~ msgstr "Title" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "The vocabulary does not contain terms beginning with" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Available vocabularies and ontologies" - -#~ msgid "Modified concepts" -#~ msgstr "Modified concepts" - -#~ msgid "New concepts" -#~ msgstr "New concepts" - -#~ msgid "All" -#~ msgstr "All" - -#~ msgid "results" -#~ msgstr "results:" - -#~ msgid "results for" -#~ msgstr "results for" - -#~ msgid "Language literal" -#~ msgstr "In English" +msgid "feedback_enter_name_email" +msgstr "" +"Please enter your name and email address if you wish to receive a direct " +"response. You also have the option to submit your feedback anonymously." diff --git a/resource/translations/skosmos_fi.po b/resource/translations/skosmos_fi.po index c5026b5ca..f88f10e44 100644 --- a/resource/translations/skosmos_fi.po +++ b/resource/translations/skosmos_fi.po @@ -760,196 +760,7 @@ msgstr "" "esimerkiksi: *eläimet tai: *patentti*. Jos et käytä tähtimerkkiä haku " "tehdään käyttäen loppukatkaisua." -#~ msgid "dc11:contributor" -#~ msgstr "Muu tekijä" - -#~ msgid "dc11:creator" -#~ msgstr "Tekijä" - -#~ msgid "dc11:description" -#~ msgstr "Kuvaus" - -#~ msgid "dc11:license" -#~ msgstr "Lisenssi" - -#~ msgid "dc11:publisher" -#~ msgstr "Julkaisija" - -#~ msgid "dc11:relation" -#~ msgstr "Suhde" - -#~ msgid "dc11:rights" -#~ msgstr "Oikeudet" - -#~ msgid "dc11:source" -#~ msgstr "Lähde" - -#~ msgid "dc11:title" -#~ msgstr "Nimi" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "Sanasto ei sisällä termejä jotka alkavat kirjaimella" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Sanastot ja ontologiat" - -#~ msgid "Modified concepts" -#~ msgstr "Muokatut käsitteet" - -#~ msgid "New concepts" -#~ msgstr "Uudet käsitteet" - -#~ msgid "All" -#~ msgstr "Näytetään kaikki" - -#~ msgid "results" -#~ msgstr " hakutulosta (haku" - -#~ msgid "results for" -#~ msgstr " tulosta haulle" - -#~ msgid "Language literal" -#~ msgstr "suomeksi" - -#~ msgid "isothes:subGroup" -#~ msgstr "Alaryhmä" - -#~ msgid "skos:hiddenLabel" -#~ msgstr "Piilokäsitteet" - -#~ msgid "concepts within the group" -#~ msgstr "Ryhmän sisältämät käsitteet" - -#~ msgid "dc11:created" -#~ msgstr "Luontipäivä" - -#~ msgid "dc11:modified" -#~ msgstr "Muokkauspäivä" - -#~ msgid "language_changed_message" -#~ msgstr "" -#~ "Valitsemaasi kieltä ei ollut tuettuna tässä sanastossa. Siksi emme näytä " -#~ "sivua suomeksi." - -#~ msgid "Show matches in any language" -#~ msgstr "Näytä myös muunkieliset osumat" - -#~ msgid "ar" -#~ msgstr "arabiaksi" - -#~ msgid "bg" -#~ msgstr "bulgariaksi" - -#~ msgid "cs" -#~ msgstr "tšekiksi" - -#~ msgid "da" -#~ msgstr "tanskaksi" - -#~ msgid "de" -#~ msgstr "saksaksi" - -#~ msgid "el" -#~ msgstr "nykykreikaksi" - -#~ msgid "en" -#~ msgstr "englanniksi" - -#~ msgid "es" -#~ msgstr "espanjaksi" - -#~ msgid "et" -#~ msgstr "eestiksi" - -#~ msgid "fa" -#~ msgstr "persiaksi" - -#~ msgid "fi" -#~ msgstr "suomeksi" - -#~ msgid "fr" -#~ msgstr "ranskaksi" - -#~ msgid "hi" -#~ msgstr "hindiksi" - -#~ msgid "hr" -#~ msgstr "kroatiaksi" - -#~ msgid "hu" -#~ msgstr "unkariksi" - -#~ msgid "it" -#~ msgstr "italiaksi" - -#~ msgid "ja" -#~ msgstr "japaniksi" - -#~ msgid "ko" -#~ msgstr "koreaksi" - -#~ msgid "la" -#~ msgstr "latinaksi" - -#~ msgid "lo" -#~ msgstr "laoksi" - -#~ msgid "lt" -#~ msgstr "liettuaksi" - -#~ msgid "lv" -#~ msgstr "latviaksi" - -#~ msgid "mt" -#~ msgstr "maltaksi" - -#~ msgid "nl" -#~ msgstr "hollanniksi" - -#~ msgid "pl" -#~ msgstr "puolaksi" - -#~ msgid "pt" -#~ msgstr "portugaliksi" - -#~ msgid "ro" -#~ msgstr "romaniaksi" - -#~ msgid "ru" -#~ msgstr "venäjäksi" - -#~ msgid "sk" -#~ msgstr "slovakiksi" - -#~ msgid "sl" -#~ msgstr "sloveniaksi" - -#~ msgid "sr" -#~ msgstr "serbiaksi" - -#~ msgid "sv" -#~ msgstr "ruotsiksi" - -#~ msgid "te" -#~ msgstr "teluguksi" - -#~ msgid "th" -#~ msgstr "thaiksi" - -#~ msgid "tr" -#~ msgstr "turkiksi" - -#~ msgid "zh" -#~ msgstr "kiinaksi" - -#~ msgid "Download" -#~ msgstr "Lataa" - -#~ msgid "Instructions" -#~ msgstr "Ohje" - -#~ msgid "skos:prefLabel_help" -#~ msgstr "Käsitteestä käytettävän termin kirjoitusasu." - -#~ msgid "short_search_example" -#~ msgstr "esim. kissa tai *talous" +msgid "feedback_enter_name_email" +msgstr "" +"Kerro nimesi ja sähköpostiosoitteesi, niin vastaamme sinulle " +"henkilökohtaisesti. Voit halutessasi jättää palautteen myös nimettömänä." diff --git a/resource/translations/skosmos_sv.po b/resource/translations/skosmos_sv.po index 5e3d9639d..b718da681 100644 --- a/resource/translations/skosmos_sv.po +++ b/resource/translations/skosmos_sv.po @@ -759,190 +759,7 @@ msgstr "" "ex.: *nät eller: *patent*. Om du inte använder asterisk görs sökningen med " "trunkering i slutet." -#~ msgid "dc11:contributor" -#~ msgstr "Medförfattare" - -#~ msgid "dc11:creator" -#~ msgstr "Författare" - -#~ msgid "dc11:description" -#~ msgstr "Beskrivning" - -#~ msgid "dc11:license" -#~ msgstr "Licens" - -#~ msgid "dc11:publisher" -#~ msgstr "Utgivare" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" - -#~ msgid "dc11:rights" -#~ msgstr "Rättigheter" - -#~ msgid "dc11:source" -#~ msgstr "Källa" - -#~ msgid "dc11:title" -#~ msgstr "Namn" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "Vokabulären innehåller inga termer som börjar med" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Tillgängliga tesaurusar och ontologier" - -#~ msgid "Modified concepts" -#~ msgstr "Editerade begrepp" - -#~ msgid "New concepts" -#~ msgstr "Nya begrepp" - -#~ msgid "All" -#~ msgstr "Visar alla" - -#~ msgid "results" -#~ msgstr "sökresultat" - -#~ msgid "results for" -#~ msgstr "sökresultat för" - -#~ msgid "Language literal" -#~ msgstr "På svenska" - -#~ msgid "skos:hiddenLabel" -#~ msgstr "Dolda begrepp" - -#~ msgid "concepts within the group" -#~ msgstr "Begrepp inom gruppen" - -#~ msgid "dc11:created" -#~ msgstr "Skapad" - -#~ msgid "dc11:modified" -#~ msgstr "Ändringsdatum" - -#~ msgid "language_changed_message" -#~ msgstr "" -#~ "Språket som du valt stöds inte i den här vokabulären. Därför visas sidan " -#~ "inte på svenska." - -#~ msgid "Show matches in any language" -#~ msgstr "Visa även träffar på andra språk" - -#~ msgid "ar" -#~ msgstr "arabiska" - -#~ msgid "bg" -#~ msgstr "bulgariska" - -#~ msgid "cs" -#~ msgstr "tjeckiska" - -#~ msgid "da" -#~ msgstr "danska" - -#~ msgid "de" -#~ msgstr "tyska" - -#~ msgid "el" -#~ msgstr "grekiska" - -#~ msgid "en" -#~ msgstr "engelska" - -#~ msgid "es" -#~ msgstr "spanska" - -#~ msgid "et" -#~ msgstr "estniska" - -#~ msgid "fa" -#~ msgstr "persiska" - -#~ msgid "fi" -#~ msgstr "finska" - -#~ msgid "fr" -#~ msgstr "franska" - -#~ msgid "hi" -#~ msgstr "hindi" - -#~ msgid "hr" -#~ msgstr "kroatiska" - -#~ msgid "hu" -#~ msgstr "ungerska" - -#~ msgid "it" -#~ msgstr "italienska" - -#~ msgid "ja" -#~ msgstr "japanska" - -#~ msgid "ko" -#~ msgstr "koreanska" - -#~ msgid "la" -#~ msgstr "på latinska" - -#~ msgid "lo" -#~ msgstr "laotiska" - -#~ msgid "lt" -#~ msgstr "litauiska" - -#~ msgid "lv" -#~ msgstr "lettiska" - -#~ msgid "mt" -#~ msgstr "maltesiska" - -#~ msgid "nl" -#~ msgstr "nederländska" - -#~ msgid "pl" -#~ msgstr "polska" - -#~ msgid "pt" -#~ msgstr "portugisiska" - -#~ msgid "ro" -#~ msgstr "rumänska" - -#~ msgid "ru" -#~ msgstr "ryska" - -#~ msgid "sk" -#~ msgstr "slovakiska" - -#~ msgid "sl" -#~ msgstr "slovenska" - -#~ msgid "sr" -#~ msgstr "serbiska" - -#~ msgid "sv" -#~ msgstr "svenska" - -#~ msgid "te" -#~ msgstr "telugu" - -#~ msgid "th" -#~ msgstr "thailändska" - -#~ msgid "tr" -#~ msgstr "turkiska" - -#~ msgid "zh" -#~ msgstr "kinesiska" - -#~ msgid "Download" -#~ msgstr "Ladda ned" - -#~ msgid "skos:prefLabel_help" -#~ msgstr "Skrivsätt för den föredragna termen för begreppet." - -#~ msgid "short_search_example" -#~ msgstr "t.ex. katt eller *nät" +msgid "feedback_enter_name_email" +msgstr "" +"Ange ditt namn och din e-postadress så svarar vi dig personligen. Om du vill " +"kan du också ge respons anonymt." diff --git a/resource/translations/sv/LC_MESSAGES/skosmos.mo b/resource/translations/sv/LC_MESSAGES/skosmos.mo index c86d281670d55b7c722ad44322c67a18dbd659df..77cc991cf1d23ee5379e2f5731248e00779bfb5e 100644 GIT binary patch delta 3706 zcmYk-d2EzL7{~E}9u&JRv~;-&?TdwS6k3h|R=~(nixCu%qX-B~yOctA7rF&4*UG5~ z$gvbe!ODFoMNBjBJhV|IE<*@Uw24+(`P^P&O7hCGtbQX_Soo) zV?vjcqbm)^0iqSLKE{}v=!)luVGVoLEi5D;m;~N=6Q_~2aKsPo=2ODB8CgVWl z&y40L4yT~52O@?{1%(DwEJi(Z1t#G}Y>azt{Si#%{EV%?iWD;9L@=*N@ z#TGabX<{lc6PIHb6JmxGG_uRs3~!(Y@-J$n@$?dnZggQwRQvX*8Fs~{IM7~y1vP+T zdp&?^zX&zp6{w7@#WbF8Hd9dQkD^BSEovaYVl3(@dO!nA!8BwQOb<-J0jL=cvre=1 zOHlo+LuGCsrsEmxj@L1ynYCyVNl6-NhIz>3%?Q+k3z4>F4l*XQ3N?c&TfYz0{y1tt zXHf&Zgv#VCRQvnZ`piNZN=PC9YUrjyscwtvARCp5zSbf3`gl}_Q&1h2+4K3RfiJh` z8?4(<{Z^y;``n(_qMmy`h5W0dD^$qas0Z9ftyz>iGEx`ndI~Dl>8OF`q8^Zs%G7XF zrlz9qpNr~m32G_Upfa@wd4xF}qM#ekTCbrV@HgspYRX03n1d}bA9Z~)>Ou2R?N(!5 z$EYPbZ2b~7^B++YxMR;BpavLh}xOz|Pt0KSvCiyA;$gifO3h=BV=ys1Ezt`eC+y5~{;l_WB~!%qvj? z*@a5^L0f;qdJajdxr%D{0F(9p$C6L2VGGoz$gp-tJ*Yow_lZ^KWadyt!GgK z`3|)tKcP0`9n{S3p&rnX&zmOXpxXDe=Y3HV7>*k71XN}U(?fhtDa@jRWijhf4XcrT zX^x;$eI9kgH>erhM6K~d)J)@?$b*}r`pH7I%R}`u3P++3HQ-a&2QP#uDCJ3QA~(8G zGt9B}MSZ)UM-9x2n&C{;440uYwhCEhvmG_i6Q}{6M{VvasP?x|{rrK-MCcz|5zWG? zL1Wa7%}^a>qB?lWo)18^8)+SfYCjpZBr~mZPGf!Z|fF@SlfJ@Xl=-EnM>r%);X4fUY+p=N#@)$ch}KeuiDBh1nKod&2eNn+)ASNw@VS4iGvP zL@*y%A2XlAI6@1cxy~kZ3?jM{o5P;?Cb|TE32o=G#N*>N3R;&LwqhN6ZFxDawdE4rNw6X7ULoz?Hwk?J z?2&0cq%?`p4$`-C4WTd0h%mv{HXjk?#1di^v6s*b@;)(-h$eLCUrBr<3w&AYs*L#*e@4I`bUglmzrt6ZZ3cUN!IC16d09Ury)~UOlH>jZ9*TFv delta 3519 zcmYk;d2miw7{~Dw@{)L8FS0Zu&E_S<@+ui3wpu#UsdS2JQcJ6(cB+CB5f`zvX*BAs zEj1yPlG5lOY0)Z1O=naMrKJlKe{`l9L#w)J#@6pI_n7G&&-*#|+;h)8=Q-!zxRm#K zu2UZszS(dbARZ;kJjPtZyRG=)*yT4SfK}KRzr^Nv2We^^pqhHx7}FlxVkD+x6lNg* z%t(GBFc)=wva4feQD{lULiA!0w!`(<7Ps5_eVD-cL0f+THGrS7GhVZ{;U@Lh7uC;T zjK^n?CT13^@2ifa6s19>c9Zt39^H2jXwCC%r zn^65$qWY_`=Z8_x{UV0^tE2N&$SbG^G@#b(Pt-{7+Uw!5?f~1MI!;7os0%7XLs0jP zLG?2MwFJ{q8CrpKWy(?aRXetD1hs}2P_NMq)Quimb-+Z__5P>_jYYMahD{x#mZscV zg_?04YGNnt`B~He>rt6@8Yn1rf1?^UM+w@&qj4H4mF^u_WEMf z4A-LisXz^Euf6`M^(&;EV}7(1zqu9WKB~iLrl$v{p*rk`>Tne5`tzun&p{1jIV$C) zwtkCsFOp1i7}f49>i#PjsrUaT1#N~#YXo`LgW^yl?_}+VYWE~6GkLat4)V_w^P}rq zQP=mNCh!?*pr=s-xr|!UTRPYK@8e7jI-+Kffw#kqc^uO@&*bCK9jBmP*A1w4o2-?{ z>Y070B|L!|_!-np>roTBg>-4|qcR$wNd9$0kb=JHS*VT%qdq+2P!F1j9dQO~W~Hbv zStXJ*Q;j|GC@RI*t&OPuS|+)fNJ6Si5QCVLME>=96;Ywol%NK*-CB(r$VaFd97Ju# zlc<@UK|SCqYDWK{+I#uT={yQGfi9>4XP`2Zg)}vzk{x&LW>cYtYmohCHlk8pgSw#> zwU)4t)TTU*%EU!m-+)@vww>J>2T&bnqWT$Y>+?|qUxLliLA^C4=;irl z2ZeB~L8ZJFKgL7o!MSN}2L;w;s0Xh`l43Ta9()*kXc%fwjYqw% zi?Qkb-%a5$Dh{AVb`{mZzsNQ)KGLA`AZim1#}v#%Wn`(f6xDtQYVD6<27ZmY?*Vql z7}BjJ8JbT1gA{V8Xi7b5W@V`Nb0?0(W2hN;y15^YMAUnqgW81os6AAGB+abE7PtpB zz*^MaI*x1ya}jxCO=CBD)q5S!u=L<`48y&lcHZdN-IR3OAmRX_qd3&t7ni!6(nLb( z*31?YI-Vf<5buT-c%!pcQqnNS5IU6Ow}=JAi^Ow80Wp_YO}t0EK+Fmq^#+E0KuL!( zrehJYq^ZQ;AnTi0MT{b}q@#%si4lYoO7+FX?x6JlqZcPjLr?pXQ)g33A%+mE2qiL` z&>r1I%m{7pC8Y16)PvA6R1#UlD};_Wh!q6e#7qyJ_a%7dP?{FH<%@H+Qqr-FSVKe* zxr8=qA<>M`<{eKwJYJ)qRhVxp-o}@0`E}fA%QLZ>=t@Kq+MDZ$Ou`;%W+$bWh#;Xa zWI3Vl$irg_h0USb*1epyl$H_i5Zj3@L>}?*sHN~eF_tK`l>@LH5hC&l53z}0qndrh zLZXByBWegAQ9%?D;e?KO!s}+im{*&s_{)IW+Bzl?^N97KVt*iPLtT~MX;C*I*6XkP IB#;{MAFf|SDgXcg diff --git a/view/feedback.twig b/view/feedback.twig index f67420332..f5869e9be 100644 --- a/view/feedback.twig +++ b/view/feedback.twig @@ -29,10 +29,11 @@
{% endif %} +

{% trans "feedback_enter_name_email" %}

{% trans %}Name:{% endtrans %}

-

{% trans %}E-mail:{% endtrans %} *

+

{% trans %}E-mail:{% endtrans %}

{% trans %}Message:{% endtrans %} *

From c56eec79364295798413f2205f27ae2d0cfbf8ad Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 28 May 2018 10:13:17 +0300 Subject: [PATCH 095/173] Set the feedback email sender address properly when a vocabulary-specific recipient has been set. Fixes #761 --- controller/WebController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/WebController.php b/controller/WebController.php index d34d0e815..51315350a 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -308,7 +308,7 @@ public function sendFeedback($request, $message, $fromName = null, $fromEmail = // determine the sender address of the message $sender = $this->model->getConfig()->getFeedbackSender(); if (empty($sender)) $sender = $envelopeSender; - if (empty($sender)) $sender = $toAddress; + if (empty($sender)) $sender = $this->model->getConfig()->getFeedbackAddress(); // determine sender name - default to "anonymous user" if not given by user if (empty($fromName)) $fromName = "anonymous user"; From 9b11ec933f87ce5a29759fd180d44579ae15360f Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Wed, 30 May 2018 18:37:11 +0300 Subject: [PATCH 096/173] Add Arabic translation from Transifex. Fixes #767 --- .../translations/ar/LC_MESSAGES/skosmos.mo | Bin 0 -> 12974 bytes resource/translations/skosmos_ar.po | 760 ++++++++++++++++++ 2 files changed, 760 insertions(+) create mode 100644 resource/translations/ar/LC_MESSAGES/skosmos.mo create mode 100644 resource/translations/skosmos_ar.po diff --git a/resource/translations/ar/LC_MESSAGES/skosmos.mo b/resource/translations/ar/LC_MESSAGES/skosmos.mo new file mode 100644 index 0000000000000000000000000000000000000000..43d1161e0f77fd14b468c40deb779fbd7329418f GIT binary patch literal 12974 zcma)=3zS@SeaEi|h~ed{T5ZuAbb&-?vzw3r0}CXC5Hy&Wgh=s`-krIdy<~P~z4uO% z6|~Lfv0+8Q2U@6ALda{$29}tF&{KP~r>8HE=M+8lPPO*f$MH}-+Un`)L$v*T|NsA; zxwBc+Nq+PFKY#z<`~RQ)?rY9{*yD2?`fcce^E~eb@Wpw2@puK|~U{P$Mzbpf~u)cj_L5%>!F33wrRFZgP30(=$t zh#Q{*e~bPpH~u`R^Zyy_0bg)*hCuS|5Xw_g+x;+6lfHd;pZ) zp9Ce}UxJb&1J4Kl9Tfln0$&GS!l9VldnQ{ZCo z??CDG%GX+ZTmnkJr64MMD?pvQ0c5Fn4~PifM?lH{pc{V_)cR>q@_ZSTd|v})$8UpL z|9yu)0cD?`gIaeUO3BWz1GWFnpzQDthc~$SHK6!y0>y98^+!O-J?8p*9exTF-!FjT zcf|Fd1$FLMLGk%phu;Ck|NEf)^;1xCzUb!9{S7PMrJ(p;2FgBHg0jzzp!U576ra06 z*?$O>eLf1p%6kyhz9$_1F)05%4=R6t2x{MXEP4}o8L0VdL7lT6)VdHfd_no;L5KT6 z>3af{et+irUk4@McR|_t`=IRhpP<&A!=dV54B{H^O`z8Ig5r0Lo4*az{*9pI8Fcea zQ2Olw#ph8_avgT_XB_?&sC6yZ|B>te0u;a3qMXjV0@S)?p!mHD)cjqb^xg_ej{88_ zd(w@6*5P3gQ+m&WTK9EO`@aLqe?JBl2mj;n0*tJ4-T+GOw>ew}YTas3c6qNG-wN{I z`v_l}{~W0KL!jh;4wRgK4N8u0gYxHpxc)_SG=DiL`ImrCp5u8pftS<&0Yzagc*$k9 zZhR0_J*Ya|3aXC9p#1j;sPmryIl_C^;qz|%hu~F=tLSLm0#N=P05QF{3KX9Yf|5T1 zCC3;j`9JUGp8@C7{}Zqb{v)V$Z=$%+^aj8s;QK+@@geX=@NsZ8_&reeTIkz*i^u~YY}QO{RN=x`F@APATIV&upj(5xB&c9 zkpJEbd|eA(h!WC&CFp}|LGc*{WuN;%)zQy@{P&*bOZt8TlpH?+WseKEEI$F>0=^x5 z9+cj{0LA~dw^3Wc^`P{87*rfQ4q_Vb1So#r02QwRzdl1ryG9^^y!}hW#?~! z+W)^Gti0DPw0aMKlK-8c_TLFg?i9qu-o2pw`9(MWG$?sbyZ+yR^XNYh%AWrK9(@`0 z2$WqP!MVaipw^uLWrr_=h~j+*lziuxY+fw@#edl0eW3Jw2;{$ah_BnhZ-V0Y=3X1` z3qa{N2ohS}ec;XDe((bDpFr8^2cXtnu*mxFa!`3tcDMW(XuJ>NIFnCJ zH?b1r2=5PF|58x-y#e}tNHOysNFP)*HRD6z2cbKm7^*?z(Bsetpa{Ae(nmE-cFaG@ zjfx%0Js^yasBx zflq=}*WL#{>!zi~M9M}sY)-xG%)YKBP~ zRyV8P<5z-uy^;EZA$yzkYOlAvbho#Bu+dEIx7p?`uhsmXYWtXKl#JGbv9QX-=x|V~ z2it6GFifLLQ1hdDHQd1vlGKAV^d(W^tr+vS#Es^t8lyoR)>E~T%5XRms+Eq7hTbj1 zL48Y@7@oJ((9*9(BT*WpQKO!Cw>0XNa5VL6ENY^F2GXFC`psm%X~WbH>Q&#`r+b~| z3LCMUx3aOlUTXwZKOK$|zv8$@b$`RV)^3nFM}o9GYt^m8`jxB7 z-mRsPAgY0N)XfEu=5A!H(Tx4jEb@bD6`v)=nR4ut$t%ujrfsahI;@R)tD|a_b=HBa zqcAp8w@byLpb~cMxh4#@;b@t0C<<#;e-Kk|_14IF&KTYrEFIOihTQ4ux?X z;$IVi>%#;mAhyXHY~X@!gUKe(fflV;ZW4 zNhOYqi`BJatHoLMlxPbL!zfuFQV=U)b;X#OrEe{j_mieQqitAt9Bmm+3$4|STGj5b0j~A7wRu=+tS$i<1vS%b4&D=1QZ-4w z(MD{C(3N?)Rbc>CZxKM(@T39Wa{ZW0hqHuHDSW(g-<&(0j{-#8E`5;l91kJda zERW-0tUWv!Q*6Tcwy++?QDyeTG676ZNeE+@M^uJ~4(3Nh*rb>R@=J;h76hHLKz7%ff)WHwz=~{w$0b_cgZH$_eST zJn__YW#)F$!i%dzWwR!4Sa;A%NSu)oLR)K+a!o$9%_Iz$*OG>3>&xbFM=&y43pc0X zj+C()(M0qn6gQkyQ&-9D`sT{EouHPQKOhBM)eK$S!5I%2}cHVb#1%A+s0Z!g2KRA%W^JxfEE|D?Nz5$m}qCW zmDQA_+}W;EINgmD_9vCbXxLG$-7PFh+xA#HWKJQh$}8IisAwzAkOXOAq3w3qalf|f zy6mUEHJjU19I#bm_A)ct%`xXNYc#LiAKtN}w4;;;I|!h4aYOaBbbGb5$=>s2e}ffd z9ydiJPD^(rTcT=dMRQA1+Sn-j^VY51Sh_`b5dm0QN!2a;i~IVoDfRW2`j`3redWc= z-rl#kuaAYL_2ITiS6^q{wWYqLrNvA9{$=H>uX}qRpLuJ7BrR=>gL=XZqTc}6A@Fa| zcW=^cjBr!dZ>HQPQGILFI~3i>4*RAqZ485vvcEhI26;_gHJqlSZF3L;zq99(hVBQ_K-*IclBK^I6^YCm+ zxhZYrol)jdvLju@B^TAN_etV73Dbc)H?AsO+gT?Gc+!<_tyi#oeM{NDb}&lYvhy~J z=dG(XxzS3i^Z+RP^-9VRX)ac?r@yc7#(^dN z6<65y4Fmn!v7|HC-(Q%#?m8x~W^(EE^X@8{JI5M*T|*_q@9({~_nO{*=IlUeMUZfr zro&~ww|7x*Z)d{3HPMQ%(qHz11bNyxgSV?2m+IY?ti_1K(c@Y&R&C{3PSF&r_ zZ>B>ScJ?pH*4}I?JDeTLj&*)WX2-MB*#V#5lVv|U+}fR;Z0*dZv!kZd+LN7b?QZSM zjxcc6&&%w&)?_y0xAw5$81z(jwAafHlv^7?X2^;QU$J^PuVcmOg8fZw+Ex z**OhHQ>d{UV-s816y4SyKRbvSPsmbMo317EJAtbe-J#ftOEF^(F2<`wTHBa9NVYvL zkrYEy*krfJZ%trFT;CNWn3!;%$fIorBh$;{f>;^X&Yi59!P$pRbl3>C;ybq~?`Cp^ zT!1Oo&1fg&oKnxook%I?qNaS!%9GiQm)j;gN~mbcxU?*hiBtk!`Qvx$P(Gn4Szb&F z?w0lMw`UxO)l;oKSlF_1z8P0?7588}n~cgo^RexrvFYYl?`0E4HT`^k_+*Fl0mG4yAE(2IKzC;Fdv`j@-J2!QuLTgvA z{5(yJ04G?3BMGS1gu+jwSQ#D^8n<0lTlyKZbn$YAJwP7LWJlzXag!x%*wxz0ol|fD zp7Y^9u3+(HdMwh3w_Y1QEO3$7PCUueNgRb#%M?_5wx;q*YO1(B)YLdG1x3|3O!w%p zVtqnXg{!6{ss!R|ihm|k^So3A=)}F{R~&$+j6{9M$2M?gZBXU3mODsO>G+h#Usq-i zIor-qUnaAY?x1XTJ|93?>b=fl3C^3MA{%?k(A)rg+j}fiWN}l=r{oh~%5g64*0>De zOk+Y7bM7$*!tFWkaaY}lS(?Y4pd2c0`<-N_dnn)KmfE>}dZ^eLcai0L9>i9kfa@n) z4{61;3Lr&6{>9AsgNCuzUJqHi1<3QrGRyCA^u=Sj(H_Sd6iY%>YPWdi$p13emsA4r z6a(Yd9G%l8$+$w-GnHkUK-RwYD55EcXC$L(C?buPW}Wv(D2? z>=cCEJ4Gxkm~Y>ZusNJf+gv5E=n@E=w}<3bU^CE(j=6cE#cmlU zo9055!o>$B!#wwhSQ8Cy##*3If996)h`7OzYb`IP2jrR7{aENoXTlB2I#eA>y!g+U zyC!==l3DxiB(POJF*8oGV|%lcx$&K0$zY`2$-xsohn@C~ZO7H%9)tmfT1w{i%O$LN z4!2nm9A`R}$W?}}&H0^gRGdI3N~7@tqGNC*bl2hmQy6$f>PaUDNG{o>P(EZ1Bh*2H z^cZuKCgT+^ou{%Cp&Yd)RI4WZ>Du~a>l0kwbP7LX+r?kwvmdlsTeq`j z+rN=r@xWQ`4(Sd7UzoFYTSljJs3dWbL3%aU~C~=4d zn*2=x7w8r&)D^_CA!`IvIPm~g?Cr~*Wc{q_@T*q;QmHvef03Bf)4|+Y1Sny$N2ifV z@YWq_ea+~&yse)!CaQJql}%UdfOv~MZZ)BxI76jF1p?3 zg))KD3cj!fYL=Al8RVq2Wy^$WXRAl8JENMCsZbbObVBr(&2=fnLQ~PZ0;yZ)IhXtj zjSJC|Z=ai~c|N&->)3$u<2jvNdbO2DT=&E)`o+`+_ZyB20N>i}MLDdE3hq-q`L*`g z=L1PdtheTR{uH%PSm=2&sUj>v@`N&nnytJr@Z(IusA|_KYsQ5x z$BkX>a=-IZY`+8bcY|jL5w`HamJO7uYVbPYkus@w^Q>d_(=gxDnlQ?Bzsr%y{xBdj z=M=A4EnjL$`$=QPD!y@ycvD8aZvK;)pLectWu8OGXZoEp%>t|@^?t4WbN+@PI@&+u K^oYO*-v0xefsp3_ literal 0 HcmV?d00001 diff --git a/resource/translations/skosmos_ar.po b/resource/translations/skosmos_ar.po new file mode 100644 index 000000000..01477bc7a --- /dev/null +++ b/resource/translations/skosmos_ar.po @@ -0,0 +1,760 @@ +# +# Translators: +# Mahmoud Shaarawy , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Skosmos\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-16 10:26+0200\n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" +"Last-Translator: osma \n" +"Language-Team: Arabic (http://www.transifex.com/national-library-of-finland/skosmos/language/ar/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ar\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +"X-Generator: Poedit 1.8.7.1\n" +"X-Poedit-Basepath: ../..\n" +"X-Poedit-SearchPath-0: view\n" +"X-Poedit-SearchPath-1: controller\n" +"X-Poedit-SearchPath-2: model\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: controller/Controller.php:38 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:21 +msgid "in_this_language" +msgstr "بالإنجليزية" + +#: controller/RestController.php:271 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:125 +msgid "skos:Concept" +msgstr "مفهوم" + +#: controller/RestController.php:280 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:127 +msgid "skos:Collection" +msgstr "مجموعة" + +#: model/Concept.php:455 model/Concept.php:475 +msgid "skosmos:created" +msgstr "تاريخ الإنشاء" + +#: model/Concept.php:460 model/Concept.php:462 model/Concept.php:471 +msgid "skosmos:modified" +msgstr "آخر تعديل" + +#: model/VocabularyCategory.php:39 +msgid "Vocabularies" +msgstr "مفردات" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:26 +msgid "%search_count% results for '%term%'" +msgstr "%search_count% نتائج '%term%'" + +#: /tmp/cache/587c83c09abaa/23/23c9862892c34daf7bea11b6d50990145b73a83c0947ae60c3d729fe591a06ec.php:48 +msgid "404 Error: The page %requested_page% cannot be found." +msgstr "خطأ 404: الصفحة المطلوبة %requested_page% غير موجودة." + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:62 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:75 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:64 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:274 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:68 +msgid "A-Z" +msgstr "أ-ي" + +#: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:46 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:19 +msgid "About" +msgstr "حول" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:35 +#, php-format +msgid "All %d results displayed" +msgstr "كافة%d النتائج معروضة" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:64 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:77 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:66 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:276 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:70 +msgid "Alpha-nav" +msgstr "هجائي" + +#: /tmp/cache/587c83c09abaa/cf/cf0b3d87d2eb48f38f5f339303d5509c7535d13d7b010ad4840ee824430f7fe6.php:34 +msgid "Alphabetical index" +msgstr "كشاف هجائي" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:555 +msgid "By group" +msgstr "وفقا للمجموعة" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:587 +msgid "By parent" +msgstr "وفقا للأصل" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:477 +msgid "By scheme" +msgstr "وفقا للمفردات الفرعية" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:516 +msgid "By type" +msgstr "وفقا للنوع" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:119 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:132 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:117 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:331 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:125 +msgid "Changes-nav" +msgstr "جديد" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:122 +msgid "Clear limitations" +msgstr "حذف المحددات" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:74 +msgid "Contact us!" +msgstr "اتصل بنا" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:108 +msgid "Content and search language" +msgstr "لغة المحتوى والبحث" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:51 +msgid "Content language" +msgstr "لغة المحتوى" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:732 +msgid "Download this concept in SKOS format:" +msgstr "تحميل هذا المفهوم:" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:144 +msgid "E-mail:" +msgstr "البريد الإلكتروني:" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:220 +msgid "Enter search term" +msgstr "أدخل مصطلح البحث" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:148 +msgid "Enter your e-mail address" +msgstr "أدخل عنوان بريدك الالكتروني" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:140 +msgid "Enter your name" +msgstr "أدخل اسمك" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:900 +#: /tmp/cache/587c83c13194c/5c/5c060d2297f64d66beb101ee34831f917ed8d33f97dadeca144430a1561433ec.php:69 +msgid "Error: Requested vocabulary not found!" +msgstr "خطأ: المفردات المطلوبة غير موجودة!" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:890 +msgid "Error: Term \"%term%\" not found in vocabulary!" +msgstr "خطأ: المصطلح \"%term%\" غير موجود في المفردات!" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:34 +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:54 +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:194 +msgid "Feedback" +msgstr "تعليقات" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:64 +msgid "Feedback has been sent!" +msgstr "تم إرسال التعليقات!" + +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:35 +msgid "Group index" +msgstr "كشاف المجموعة" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:101 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:114 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:99 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:313 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:107 +msgid "Group-nav" +msgstr "مجموعات" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:85 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:94 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:83 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:297 +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:55 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:91 +msgid "Hier-nav" +msgstr "تسلسل هرمي" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:157 +msgid "Leave this field blank" +msgstr "اترك هذا الحقل فارغا" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:594 +msgid "Limit search" +msgstr "تحديد البحث" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:31 +msgid "Loading" +msgstr "جار التحميل" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:27 +msgid "Loading more items" +msgstr "جار تحميل المزيد من العناصر" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:152 +msgid "Message:" +msgstr "رسالة:" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:136 +msgid "Name:" +msgstr "الاسم:" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:23 +msgid "No results" +msgstr "لا توجد نتائج" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:103 +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:111 +msgid "Not to a specific vocabulary" +msgstr "لا تتعلق بمفردات محددة" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:233 +msgid "Search" +msgstr "البحث" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:59 +msgid "Search from vocabulary" +msgstr "البحث في المفردات" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:210 +msgid "Search language: any" +msgstr "أي لغة" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:340 +msgid "Search options" +msgstr "خيارات البحث" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:161 +msgid "Send feedback" +msgstr "أرسل التعليقات" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:51 +msgid "Show all breadcrumb paths" +msgstr "عرض جميع # المسارات" + +#: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:72 +msgid "Skosmos version %version%" +msgstr "إصدارة Skosmos %version%" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:229 +msgid "Submit search" +msgstr "إرسال البحث" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:68 +msgid "Thank you for your feedback" +msgstr "شكرا لك على تعليقاتك. نحن نسعى جاهدين للرد على جميع التعليقات في أقرب وقت ممكن." + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:129 +msgid "The search provided no results." +msgstr "البحث لم يقدم أية نتائج." + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:48 +msgid "There is no term for this concept in this language" +msgstr "لا يوجد مصطلح لهذا المفهوم في هذه اللغة." + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:173 +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:47 +msgid "Value is required and can not be empty" +msgstr "القيمة مطلوبة ولا يمكن أن تترك فارغة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:27 +msgid "cc:attributionName" +msgstr "اسم الإسناد" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:29 +msgid "cc:attributionUrl" +msgstr "Url الإسناد" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:25 +msgid "cc:license" +msgstr "الترخيص" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:31 +msgid "cc:morePermissions" +msgstr "المزيد من الأذونات" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:33 +msgid "cc:useGuidelines" +msgstr "استخدم الأدلة الإرشادية" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:35 +msgid "dc:conformsTo" +msgstr "يتوافق مع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:37 +msgid "dc:contributor" +msgstr "المساهم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:39 +msgid "dc:coverage" +msgstr "التغطية" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:41 +msgid "dc:created" +msgstr "تاريخ الإنشاء" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:43 +msgid "dc:creator" +msgstr "المنشئ" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:45 +msgid "dc:date" +msgstr "التاريخ" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:47 +msgid "dc:description" +msgstr "الوصف" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:49 +msgid "dc:format" +msgstr "الصيغة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:51 +msgid "dc:identifier" +msgstr "المُعَرِّف" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:53 +msgid "dc:isReplacedBy" +msgstr "حل محله" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:55 +msgid "dc:isRequiredBy" +msgstr "مطلوب من" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:57 +msgid "dc:issued" +msgstr "تاريخ الإصدار" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:59 +msgid "dc:language" +msgstr "اللغة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:61 +msgid "dc:license" +msgstr "الترخيص" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:63 +msgid "dc:modified" +msgstr "آخر تعديل" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:65 +msgid "dc:publisher" +msgstr "الناشر" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:67 +msgid "dc:relation" +msgstr "علاقة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:69 +msgid "dc:replaces" +msgstr "يحل محل" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:71 +msgid "dc:rights" +msgstr "حقوق" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:73 +msgid "dc:rightsHolder" +msgstr "صاحب الحقوق" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:75 +msgid "dc:source" +msgstr "مصدر" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:77 +msgid "dc:source_help" +msgstr "مصدر لوصف المفهوم." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:79 +msgid "dc:spatial" +msgstr "تغطية مكانية" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:81 +msgid "dc:subject" +msgstr "موضوع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:83 +msgid "dc:temporal" +msgstr "تغطية زمنية" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:85 +msgid "dc:title" +msgstr "عنوان" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:87 +msgid "dc:type" +msgstr "نوع" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:36 +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:256 +msgid "deprecated" +msgstr "هذا المفهوم غير متاح للإستخدام. لا تستخدم هذا المفهوم للشرح!" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:89 +msgid "foaf:homepage" +msgstr "الصفحة الرئيسية" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:91 +msgid "foaf:page" +msgstr "صفحة" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:658 +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:542 +msgid "foreign prefLabel help" +msgstr "مصطلحات هذا المفهوم باللغات الأخرى." + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:660 +msgid "foreign prefLabels" +msgstr "بلغات أخرى" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:39 +msgid "from all" +msgstr "من كل" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:81 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:90 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:79 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:293 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:87 +msgid "hierarchy-disabled-help" +msgstr "لا يمكن عرض التسلسل الهرمي للمستوى الأعلى في هذه المفردات." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:93 +msgid "isothes:ConceptGroup" +msgstr "مجموعة مفاهيم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:97 +msgid "isothes:ThesaurusArray" +msgstr "مصفوفة من مفاهيم قريبة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:99 +msgid "isothes:broaderGeneric" +msgstr "مفاهيم أوسع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:101 +msgid "isothes:broaderInstantial" +msgstr "مفهوم أوسع (آني)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:103 +msgid "isothes:broaderPartitive" +msgstr "مفهوم أوسع (جزئي)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:105 +msgid "isothes:narrowerGeneric" +msgstr "مفاهيم أضيق" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:107 +msgid "isothes:narrowerInstantial" +msgstr "مفاهيم أضيق (آنية)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:109 +msgid "isothes:narrowerPartitive" +msgstr "مفاهيم أضيق (جزئية)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:95 +msgid "isothes:superGroup" +msgstr "مجموعة رئيسية" + +#: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:66 +msgid "layout designed by Hahmo" +msgstr "التصميم بواسطة Hahmo Design" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:74 +msgid "limited to group" +msgstr "مجموعة" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:67 +msgid "limited to parent" +msgstr "الأصل" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:81 +msgid "limited to scheme" +msgstr "يقتصر على المخطط" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:29 +msgid "limited to type" +msgstr "نوع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:113 +msgid "owl:sameAs" +msgstr "المفاهيم المتكافئة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:111 +msgid "owl:versionInfo" +msgstr "الإصدارة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:115 +msgid "rdf:type" +msgstr "نوع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:117 +msgid "rdf:type_help" +msgstr "نوع الكيان" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:123 +msgid "rdfs:comment" +msgstr "وصف" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:119 +msgid "rdfs:label" +msgstr "تسمية" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:121 +msgid "rdfs:seeAlso" +msgstr "انظر أيضا" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:43 +msgid "selected" +msgstr "محدَّد" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:143 +msgid "skos:altLabel" +msgstr "مصطلحات الإدخال" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:179 +msgid "skos:altLabel_help" +msgstr "مصطلحات بديلة للمفهوم." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:133 +msgid "skos:broadMatch" +msgstr "مفاهيم أوسع مطابقة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:191 +msgid "skos:broadMatch_help" +msgstr "مفاهيم أوسع مطابقة في مفردات أخرى." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:129 +msgid "skos:broader" +msgstr "مفهوم أوسع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:171 +msgid "skos:broader_help" +msgstr "مفهوم أوسع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:169 +msgid "skos:changeNote" +msgstr "تبصرة تغيير" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:147 +msgid "skos:closeMatch" +msgstr "مفاهيم متطابقة بشكل وثيق" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:189 +msgid "skos:closeMatch_help" +msgstr "مفاهيم متطابقة بشكل وثيق في مفردات أخرى." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:161 +msgid "skos:definition" +msgstr "تعريف" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:185 +msgid "skos:definition_help" +msgstr "شرح كامل للمعنى المقصود لمفهوم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:167 +msgid "skos:editorialNote" +msgstr "تبصرة تحريرية" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:145 +msgid "skos:exactMatch" +msgstr "مفاهيم مطابقة تماما" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:187 +msgid "skos:exactMatch_help" +msgstr "مفاهيم مطابقة تماما في مفردات أخرى." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:163 +msgid "skos:example" +msgstr "مثال" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:155 +msgid "skos:hasTopConcept" +msgstr "لديه مفهوم أعلى" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:165 +msgid "skos:historyNote" +msgstr "تبصرة تاريخية" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:151 +msgid "skos:inScheme" +msgstr "مخطط المفهوم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:149 +msgid "skos:member" +msgstr "أعضاء المجموعة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:181 +msgid "skos:member_help" +msgstr "أعضاء المجموعة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:135 +msgid "skos:narrowMatch" +msgstr "مفاهيم أضيق مطابقة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:193 +msgid "skos:narrowMatch_help" +msgstr "مفاهيم أضيق مطابقة في مفردات أخرى." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:131 +msgid "skos:narrower" +msgstr "مفاهيم أضيق" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:173 +msgid "skos:narrower_help" +msgstr "مفاهيم أضيق." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:157 +msgid "skos:note" +msgstr "تبصرة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:175 +msgid "skos:note_help" +msgstr "تبصرات" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:234 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:141 +msgid "skos:prefLabel" +msgstr "المصطلح المفضل" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:137 +msgid "skos:related" +msgstr "المفاهيم ذات الصلة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:139 +msgid "skos:relatedMatch" +msgstr "المفاهيم المطابقة ذات الصلة" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:183 +msgid "skos:related_help" +msgstr "المفاهيم المتعلقة بهذا المفهوم." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:159 +msgid "skos:scopeNote" +msgstr "تبصرة توضيحية" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:177 +msgid "skos:scopeNote_help" +msgstr "تبصرات حول استخدام ومجال المفهوم." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:153 +msgid "skos:topConceptOf" +msgstr "ينتمي إلى المفردات" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:197 +msgid "skosext:DeprecatedConcept" +msgstr "مفهوم غير مستخدم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:195 +msgid "skosext:partOf" +msgstr "جزء من" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:199 +msgid "skosext:partOf_help" +msgstr "الكل الذي يعد المفهوم جزء منه." + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:548 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:201 +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:449 +msgid "skosmos:memberOf" +msgstr "ينتمي إلى المجموعة" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:611 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:205 +msgid "skosmos:memberOfArray" +msgstr "ينتمي إلى المصفوفة" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:609 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:207 +msgid "skosmos:memberOfArray_help" +msgstr "المصفوفة التي ينتمي إليها المفهوم." + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:546 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:203 +msgid "skosmos:memberOf_help" +msgstr "المجموعة التي ينتمي إليها المفهوم." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:23 +msgid "zxx-x-taxon" +msgstr "الاسم العلمي" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:168 +msgid "About page" +msgstr "حول" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:138 +msgid "Alternate terms" +msgstr "مصطلحات بديلة" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:130 +msgid "Concept language" +msgstr "اللغة" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:118 +msgid "Count" +msgstr "العدد" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:157 +msgid "Download this vocabulary as SKOS/RDF:" +msgstr "تحميل هذه المفردات في صيغة SKOS/RDF:" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:205 +msgid "Help" +msgstr "مساعدة" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:142 +msgid "Hidden terms" +msgstr "مصطلحات مخفية" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:58 +msgid "Interface language" +msgstr "لغة الواجهة" + +#: /tmp/cache/587c83c13194c/f9/f9c816822168f230ef0bfed735f5923aab99d389ce8b2c6b2f5fcd5d400bc275.php:26 +msgid "No vocabularies on the server!" +msgstr "لا تتوفر مفردات على الخادم!" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:134 +msgid "Preferred terms" +msgstr "المصطلحات المفضلة" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:111 +msgid "Resource counts by type" +msgstr "العدد الكلي للمصادر وفقا للنوع" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:124 +msgid "Term counts by language" +msgstr "العدد الكلي للمصطلحات وفقا للغة" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:116 +msgid "Type" +msgstr "النوع" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:146 +msgid "Vocabularies-nav" +msgstr "المفردات" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:24 +msgid "Vocabulary information" +msgstr "معلومات المفردات" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:199 +msgid "helper_help" +msgstr "مرر مؤشر الفأرة فوق النص الموضوع أسفله خط منقط لعرض التعليمات حول الموقع." + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:201 +msgid "search_example_text" +msgstr "للبحث الاقتطاعي، الرجاء استخدام الرمز * كما هو الحال في *حيوان أو *براءة*. بالنسبة لنهاية كلمات البحث، سيتم اقتطاع البحث تلقائيًا، حتى إذا لم يتم إدخال رمز الاقتطاع يدويا: وهكذا، سيؤدي البحث عن قُط إلى الحصول على نفس نتائج البحث عن قُط*." + +msgid "feedback_enter_name_email" +msgstr "" From aea8e8f43007cc26123d68f5d74ea582c6fe2174 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Sat, 2 Jun 2018 17:40:01 +1200 Subject: [PATCH 097/173] Fix Dockerfile by automatically answering yes to apt-get install locales --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a375151ab..9abc4e0a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM php:7.0-apache RUN apt-get update -RUN apt-get install locales +RUN apt-get -y install locales RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen RUN echo "fr_FR.UTF-8 UTF-8" >> /etc/locale.gen RUN echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen From 6d28f042e45fcfdd773216dc0c11e09a59010b5c Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Wed, 30 May 2018 20:42:49 +1200 Subject: [PATCH 098/173] Issue #738 replace .inc configuration files by .ttl (turtle) files. The cache that was created in the Model instance, now was moved to the GlobalConfig, but is still accessed from Model to add entries looked up. There is no more need of a separate .ttl file for vocabularies, as it is now part of the configuration file. Old files were removed. In order to maintain backward compatibility, most methods of GlobalConfig and of VocabularyConfig were maintained as-is. With internal changes to re-route requests to the right RDF objects. Tests were minor updates in tests, but only to replace .inc by .ttl or fix coverage annotations. --- .gitignore | 1 + config.inc.dist | 71 ----- config.ttl.dist | 124 ++++++++ model/BaseConfig.php | 64 ++++ model/GlobalConfig.php | 199 +++++++++---- model/Model.php | 96 +----- model/VocabularyConfig.php | 55 +--- tests/ConceptMappingPropertyValueTest.php | 3 +- tests/ConceptPropertyTest.php | 3 +- tests/ConceptPropertyValueLiteralTest.php | 3 +- tests/ConceptPropertyValueTest.php | 2 +- tests/ConceptSearchParametersTest.php | 50 ++-- tests/ConceptTest.php | 10 +- tests/FeedbackTest.php | 2 +- tests/GenericSparqlTest.php | 2 +- tests/GlobalConfigTest.php | 41 +-- tests/JenaTextSparqlTest.php | 2 +- tests/ModelTest.php | 6 +- tests/PluginRegisterTest.php | 2 +- tests/RequestTest.php | 2 +- tests/RestControllerTest.php | 3 +- tests/VocabularyCategoryTest.php | 2 +- tests/VocabularyConfigTest.php | 2 +- tests/VocabularyTest.php | 8 +- tests/jenatestconfig.inc | 5 - ...estvocabularies.ttl => jenatestconfig.ttl} | 58 +++- tests/testconfig.inc | 5 - tests/testconfig.ttl | 277 ++++++++++++++++++ vocabularies.ttl.dist | 68 ----- 29 files changed, 712 insertions(+), 454 deletions(-) delete mode 100644 config.inc.dist create mode 100644 config.ttl.dist create mode 100644 model/BaseConfig.php delete mode 100644 tests/jenatestconfig.inc rename tests/{testvocabularies.ttl => jenatestconfig.ttl} (79%) delete mode 100644 tests/testconfig.inc create mode 100644 tests/testconfig.ttl delete mode 100644 vocabularies.ttl.dist diff --git a/.gitignore b/.gitignore index 469422cc4..1bd4c290c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ config.inc +config.ttl vocabularies.ttl build vendor diff --git a/config.inc.dist b/config.inc.dist deleted file mode 100644 index 0d1a4a939..000000000 --- a/config.inc.dist +++ /dev/null @@ -1,71 +0,0 @@ - 'fi_FI.utf8', - 'sv' => 'sv_SE.utf8', - 'en' => 'en_GB.utf8' -); - -// default SPARQL endpoint -// a local Fuseki server is usually on localhost:3030 -define("DEFAULT_ENDPOINT", "http://localhost:3030/ds/sparql"); - -// how many results (maximum) to load at a time on the search results page -define("SEARCH_RESULTS_SIZE", 20); - -// how many items (maximum) to retrieve in transitive property queries -define("DEFAULT_TRANSITIVE_LIMIT", 1000); - -// a default location for Twig template rendering -define("TEMPLATE_CACHE", "/tmp/skosmos-template-cache"); - -// default sparql-query extension, or "Generic" for plain SPARQL 1.1 -// set to "JenaText" instead if you use Fuseki with jena-text index -define("DEFAULT_SPARQL_DIALECT", "Generic"); - -// default email address where to send the feedback -define("FEEDBACK_ADDRESS", ""); - -// email address to set as the sender for feedback messages -define("FEEDBACK_SENDER", ""); - -// email address to set as the envelope sender for feedback messages -define("FEEDBACK_ENVELOPE_SENDER", ""); - -// whether or not to log caught exceptions -define ("LOG_CAUGHT_EXCEPTIONS", FALSE); - -// set to TRUE to enable logging into browser console -define ("LOG_BROWSER_CONSOLE", FALSE); - -// set to a logfile path to enable logging into log file -define ("LOG_FILE_NAME", NULL); - -# customize the service name -define("SERVICE_NAME", "Skosmos"); - -// customize the css by adding your own stylesheet -define("CUSTOM_CSS", "resource/css/stylesheet.css"); - -// Customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. -// define("BASE_HREF", "http://localhost/Skosmos/"); - -// whether to display the ui language selection as a dropdown (useful for cases where there are more than 3 languages) -define("UI_LANGUAGE_DROPDOWN", FALSE); - -// whether to enable the spam honey pot or not, enabled by default -define("UI_HONEYPOT_ENABLED", TRUE); - -// default time a user must wait before submitting a form -define("UI_HONEYPOT_TIME", 5); - -// whether to enable collation in sparql queries -define("SPARQL_COLLATION_ENABLED", FALSE); diff --git a/config.ttl.dist b/config.ttl.dist new file mode 100644 index 000000000..ae67377d0 --- /dev/null +++ b/config.ttl.dist @@ -0,0 +1,124 @@ +@prefix void: . +@prefix rdf: . +@prefix rdfs: . +@prefix owl: . +@prefix xsd: . +@prefix dc: . +@prefix foaf: . +@prefix wv: . +@prefix sd: . +@prefix skos: . +@prefix skosmos: . +@prefix isothes: . +@prefix mdrtype: . +@prefix : <#> . + +# Skosmos main configuration + +:config a skosmos:Configuration ; + # SPARQL endpoint + # a local Fuseki server is usually on localhost:3030 + skosmos:sparqlEndpoint "http://localhost:3030/ds/sparql" ; + # sparql-query extension, or "Generic" for plain SPARQL 1.1 + # set to "JenaText" instead if you use Fuseki with jena-text index + skosmos:sparqlDialect "Generic" ; + # whether to enable collation in sparql queries + skosmos:sparqlCollationEnabled false ; + # HTTP client configuration + skosmos:sparqlTimeout 20 ; + skosmos:httpTimeout 5 ; + # customize the service name + skosmos:serviceName "Skosmos" ; + # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. + # skosmos:baseHref "http://localhost/Skosmos/" ; + # interface languages available, and the corresponding system locales + skosmos:languages [ :name "fi" ; :value "fi_FI.utf8" ] , + [ :name "sv" ; :value "sv_SE.utf8" ] , + [ :name "en" ; :value "en_GB.utf8" ] ; + # how many results (maximum) to load at a time on the search results page + skosmos:searchResultsSize 20 ; + # how many items (maximum) to retrieve in transitive property queries + skosmos:transitiveLimit 1000 ; + # whether or not to log caught exceptions + skosmos:logCaughtExceptions false ; + # set to TRUE to enable logging into browser console + skosmos:logBrowserConsole false ; + # set to a logfile path to enable logging into log file + # skosmos:logFileName "" ; + # a default location for Twig template rendering + skosmos:templateCache "/tmp/skosmos-template-cache" ; + # customize the css by adding your own stylesheet + skosmos:customCss "resource/css/stylesheet.css" ; + # default email address where to send the feedback + skosmos:feedbackAddress "" ; + # email address to set as the sender for feedback messages + skosmos:feedbackSender "" ; + # email address to set as the envelope sender for feedback messages + skosmos:feedbackEnvelopeSender "" ; + # whether to display the ui language selection as a dropdown (useful for cases where there are more than 3 languages) + skosmos:uiLanguageDropdown false ; + # whether to enable the spam honey pot or not, enabled by default + skosmos:uiHoneypotEnabled true ; + # default time a user must wait before submitting a form + skosmos:uiHoneypotTime 5 . + +# Skosmos vocabularies + +:ysa a skosmos:Vocabulary, void:Dataset ; + dc:title "YSA - Yleinen suomalainen asiasanasto"@fi, + "YSA - Allmän tesaurus på finska"@sv, + "YSA - General Finnish thesaurus"@en ; + dc:subject :cat_general ; + dc:type mdrtype:THESAURUS ; + void:uriSpace "http://www.yso.fi/onto/ysa/"; + skosmos:groupClass skos:Collection; + skosmos:language "fi"; + skosmos:shortName "YSA"; + skosmos:feedbackRecipient "vesa-posti@helsinki.fi" ; + skosmos:showChangeList "true" ; + void:dataDump ; + void:sparqlEndpoint ; + skosmos:sparqlGraph +. + +:yso a skosmos:Vocabulary, void:Dataset ; + dc:title "YSO - Yleinen suomalainen ontologia"@fi, + "ALLFO - Allmän finländsk ontologi"@sv, + "YSO - General Finnish ontology"@en ; + dc:subject :cat_general ; + dc:type mdrtype:ONTOLOGY ; + void:uriSpace "http://www.yso.fi/onto/yso/"; + skosmos:language "fi", "sv", "en"; + skosmos:defaultLanguage "fi"; + skosmos:showTopConcepts "true"; + skosmos:showStatistics "false"; + skosmos:loadExternalResources "false"; + skosmos:shortName "YSO", + "ALLFO"@sv; + skosmos:groupClass isothes:ConceptGroup ; + skosmos:arrayClass isothes:ThesaurusArray ; + void:dataDump ; + void:sparqlEndpoint ; + skosmos:sparqlGraph ; + skosmos:mainConceptScheme +. + +:categories a skos:ConceptScheme; + skos:prefLabel "Skosmos Vocabulary Categories"@en +. + +:cat_general a skos:Concept ; + skos:topConceptOf :categories ; + skos:inScheme :categories ; + skos:prefLabel "Yleiskäsitteet"@fi, + "Allmänna begrepp"@sv, + "General concepts"@en +. + +mdrtype:THESAURUS a skos:Concept ; + skos:prefLabel "Тезаурус"@bg, "Tezaurus"@cs, "Tesaurus"@da, "Thesaurus"@de, "Θησαυρός"@el, "Thesaurus"@en, "Tesaurus"@et, "Tesaurus"@fi, "Thésaurus"@fr, "Pojmovnik"@hr, "Tezaurusz"@hu, "Tesauro"@it, "Tēzaurs"@lv, "Tezauras"@lt, "Teżawru"@mt, "Thesaurus"@nl, "Tesaurus"@no, "Tezaurus"@pl, "Tesauro"@pt, "Tezaur"@ro, "Synonymický slovník"@sk, "Tezaver"@sl, "Tesauro"@es, "Tesaurus"@sv +. + +mdrtype:ONTOLOGY a skos:Concept ; + skos:prefLabel "Онтология"@bg, "Ontologie"@cs, "Ontologi"@da, "Ontologie"@de, "Οντολογία"@el, "Ontology"@en, "Ontoloogia"@et, "Ontologia"@fi, "Ontologie"@fr, "Ontologija"@hr, "Ontológia"@hu, "Ontologia"@it, "Ontoloģija"@lv, "Ontologija"@lt, "Ontoloġija"@mt, "Ontologie"@nl, "Ontologi"@no, "Struktura pojęciowa"@pl, "Ontologia"@pt, "Ontologie"@ro, "Ontológia"@sk, "Ontologija"@sl, "Ontología"@es, "Ontologi"@sv +. \ No newline at end of file diff --git a/model/BaseConfig.php b/model/BaseConfig.php new file mode 100644 index 000000000..320e2d9af --- /dev/null +++ b/model/BaseConfig.php @@ -0,0 +1,64 @@ +getResource()->getLiteral($property); + if ($val) { + return filter_var($val->getValue(), FILTER_VALIDATE_BOOLEAN); + } + return $default; + } + + /** + * Returns an array of URIs based on a property from the vocabularies.ttl configuration. + * @param string $property the property to query + * @return string[] List of URIs + */ + protected function getResources($property) + { + $resources = $this->getResource()->allResources($property); + $ret = array(); + foreach ($resources as $res) { + $ret[] = $res->getURI(); + } + return $ret; + } + + /** + * Returns a boolean value based on a literal value from the vocabularies.ttl configuration. + * @param string $property the property to query + * @param string $default default value + * @param string $lang preferred language for the literal + */ + protected function getLiteral($property, $default=null, $lang=null) + { + if (!isset($lang)) {; + $lang = $this->getEnvLang(); + } + + $literal = $this->getResource()->getLiteral($property, $lang); + if ($literal) { + return $literal->getValue(); + } + + // not found with selected language, try any language + $literal = $this->getResource()->getLiteral($property); + if ($literal) + return $literal->getValue(); + + return $default; + } + +} diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index 075843d3e..501f2ad44 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -1,57 +1,142 @@ cache = new Cache(); try { - $file_path = dirname(__FILE__) . $config_name; - if (!file_exists($file_path)) { - throw new Exception('config.inc file is missing, please provide one.'); - } - require_once($file_path); - if (isset($LANGUAGES)) { - $this->languages = $LANGUAGES; + $this->filePath = realpath( dirname(__FILE__) . $config_name ); + if (!file_exists($this->filePath)) { + throw new Exception('config.ttl file is missing, please provide one.'); } + $this->initializeConfig(); } catch (Exception $e) { echo "Error: " . $e->getMessage(); return; } } - private function getConstant($name, $default) + public function getCache() { - if (defined($name) && constant($name)) { - return constant($name); - } - return $default; + return $this->cache; } /** - * Returns the UI languages specified in the configuration or defaults to - * only show English - * @return array + * Initialize configuration, reading the configuration file from the disk, + * and creating the graph and resources objects. Uses a cache if available, + * in order to avoid re-loading the complete configuration on each request. */ - public function getLanguages() + private function initializeConfig() + { + try { + // use APC user cache to store parsed config.ttl configuration + if ($this->cache->isAvailable()) { + // @codeCoverageIgnoreStart + $key = realpath($this->filePath) . ", " . filemtime($this->filePath); + $nskey = "namespaces of " . $key; + $this->graph = $this->cache->fetch($key); + $this->namespaces = $this->cache->fetch($nskey); + if ($this->graph === false || $this->namespaces === false) { // was not found in cache + # EasyRDF appears to prepend the file location# to the nodes without a namespace + EasyRdf\RdfNamespace::set('emptyns', $this->filePath . '#'); + $this->parseConfig($this->filePath); + $this->cache->store($key, $this->graph); + $this->cache->store($nskey, $this->namespaces); + } + // @codeCoverageIgnoreEnd + } else { // APC not available, parse on every request + # EasyRDF appears to prepend the file location# to the nodes without a namespace + EasyRdf\RdfNamespace::set('emptyns', $this->filePath . '#'); + $this->parseConfig($this->filePath); + } + + $configResources = $this->graph->allOfType("skosmos:Configuration"); + if (is_null($configResources) || !is_array($configResources) || count($configResources) !== 1) { + throw new Exception("config.ttl must have exactly one skosmos:Configuration"); + } + + $this->resource = $configResources[0]; + $this->initializeNamespaces(); + } catch (Exception $e) { + echo "Error: " . $e->getMessage(); + } + } + + /** + * Parses configuration from the config.ttl file + * @param string $filename path to config.ttl file + */ + private function parseConfig($filename) { - if ($this->languages) { - return $this->languages; + $this->graph = new EasyRdf\Graph(); + $parser = new SkosmosTurtleParser(); + $parser->parse($this->graph, file_get_contents($filename), 'turtle', $filename); + $this->namespaces = $parser->getNamespaces(); + } + + /** + * Returns the graph created after parsing the configuration file. + * @return Graph + */ + public function getGraph() + { + return $this->graph; + } + + /** + * Registers RDF namespaces from the config.ttl file for use by EasyRdf (e.g. serializing) + */ + private function initializeNamespaces() { + foreach ($this->namespaces as $prefix => $fullUri) { + if ($prefix != '' && EasyRdf\RdfNamespace::get($prefix) === null) // if not already defined + { + EasyRdf\RdfNamespace::set($prefix, $fullUri); + } } - return array('en' => 'en_GB.utf8'); } /** - * Returns the vocabulary configuration file specified the configuration - * or vocabularies.ttl if not found. - * @return string + * Returns the UI languages specified in the configuration or defaults to + * only show English + * @return array */ - public function getVocabularyConfigFile() + public function getLanguages() { - return $this->getConstant('VOCABULARIES_FILE', 'vocabularies.ttl'); + $languageResources = $this->getResource()->allResources('skosmos:languages'); + if ($languageResources) { + $languages = array(); + foreach ($languageResources as $idx => $languageResource) { + $languageName = $languageResource->getLiteral('emptyns:name'); + $languageValue = $languageResource->getLiteral('emptyns:value'); + if ($languageName and $languageValue) { + $languages[$languageName->getValue()] = $languageValue->getValue(); + } + } + return $languages; + } else { + return array('en' => 'en_GB.utf8'); + } } /** @@ -61,7 +146,7 @@ public function getVocabularyConfigFile() */ public function getHttpTimeout() { - return $this->getConstant('HTTP_TIMEOUT', 5); + return $this->getLiteral('skosmos:httpTimeout', 5); } /** @@ -71,7 +156,7 @@ public function getHttpTimeout() */ public function getSparqlTimeout() { - return $this->getConstant('SPARQL_TIMEOUT', 20); + return $this->getLiteral('skosmos:sparqlTimeout', 20); } /** @@ -81,15 +166,7 @@ public function getSparqlTimeout() */ public function getDefaultEndpoint() { - return $this->getConstant('DEFAULT_ENDPOINT', 'http://localhost:3030/ds/sparql'); - } - - /** - * @return string - */ - public function getSparqlGraphStore() - { - return $this->getConstant('SPARQL_GRAPH_STORE', null); + return $this->getLiteral('skosmos:sparqlEndpoint', 'http://localhost:3030/ds/sparql'); } /** @@ -99,7 +176,7 @@ public function getSparqlGraphStore() */ public function getDefaultTransitiveLimit() { - return $this->getConstant('DEFAULT_TRANSITIVE_LIMIT', 1000); + return $this->getLiteral('skosmos:transitiveLimit', 1000); } /** @@ -109,7 +186,7 @@ public function getDefaultTransitiveLimit() */ public function getSearchResultsSize() { - return $this->getConstant('SEARCH_RESULTS_SIZE', 20); + return $this->getLiteral('skosmos:searchResultsSize', 20); } /** @@ -119,7 +196,7 @@ public function getSearchResultsSize() */ public function getTemplateCache() { - return $this->getConstant('TEMPLATE_CACHE', '/tmp/skosmos-template-cache'); + return $this->getLiteral('TEMPLATE_CACHE', '/tmp/skosmos-template-cache'); } /** @@ -129,7 +206,7 @@ public function getTemplateCache() */ public function getDefaultSparqlDialect() { - return $this->getConstant('DEFAULT_SPARQL_DIALECT', 'Generic'); + return $this->getLiteral('DEFAULT_SPARQL_DIALECT', 'Generic'); } /** @@ -138,7 +215,7 @@ public function getDefaultSparqlDialect() */ public function getFeedbackAddress() { - return $this->getConstant('FEEDBACK_ADDRESS', null); + return $this->getLiteral('FEEDBACK_ADDRESS', null); } /** @@ -147,7 +224,7 @@ public function getFeedbackAddress() */ public function getFeedbackSender() { - return $this->getConstant('FEEDBACK_SENDER', null); + return $this->getLiteral('FEEDBACK_SENDER', null); } /** @@ -156,7 +233,7 @@ public function getFeedbackSender() */ public function getFeedbackEnvelopeSender() { - return $this->getConstant('FEEDBACK_ENVELOPE_SENDER', null); + return $this->getLiteral('FEEDBACK_ENVELOPE_SENDER', null); } /** @@ -165,7 +242,7 @@ public function getFeedbackEnvelopeSender() */ public function getLogCaughtExceptions() { - return $this->getConstant('LOG_CAUGHT_EXCEPTIONS', FALSE); + return $this->getBoolean('skosmos:logCaughtExceptions', FALSE); } /** @@ -174,7 +251,7 @@ public function getLogCaughtExceptions() */ public function getLoggingBrowserConsole() { - return $this->getConstant('LOG_BROWSER_CONSOLE', FALSE); + return $this->getBoolean('skosmos:logBrowserConsole', FALSE); } /** @@ -183,7 +260,7 @@ public function getLoggingBrowserConsole() */ public function getLoggingFilename() { - return $this->getConstant('LOG_FILE_NAME', null); + return $this->getLiteral('skosmos:logFileName', null); } /** @@ -191,15 +268,7 @@ public function getLoggingFilename() */ public function getServiceName() { - return $this->getConstant('SERVICE_NAME', 'Skosmos'); - } - - /** - * @return string - */ - public function getServiceTagline() - { - return $this->getConstant('SERVICE_TAGLINE', null); + return $this->getLiteral('skosmos:serviceName', 'Skosmos'); } /** @@ -207,7 +276,7 @@ public function getServiceTagline() */ public function getCustomCss() { - return $this->getConstant('CUSTOM_CSS', null); + return $this->getLiteral('skosmos:customCss', null); } /** @@ -215,7 +284,7 @@ public function getCustomCss() */ public function getUiLanguageDropdown() { - return $this->getConstant('UI_LANGUAGE_DROPDOWN', FALSE); + return $this->getBoolean('skosmos:uiLanguageDropdown', FALSE); } /** @@ -223,7 +292,7 @@ public function getUiLanguageDropdown() */ public function getBaseHref() { - return $this->getConstant('BASE_HREF', null); + return $this->getLiteral('skosmos:baseHref', null); } /** @@ -231,7 +300,7 @@ public function getBaseHref() */ public function getGlobalPlugins() { - return explode(' ', $this->getConstant('GLOBAL_PLUGINS', null)); + return explode(' ', $this->getLiteral('skosmos:globalPlugins', null)); } /** @@ -239,7 +308,7 @@ public function getGlobalPlugins() */ public function getHoneypotEnabled() { - return $this->getConstant('UI_HONEYPOT_ENABLED', TRUE); + return $this->getBoolean('skosmos:uiHoneypotEnabled', TRUE); } /** @@ -247,7 +316,7 @@ public function getHoneypotEnabled() */ public function getHoneypotTime() { - return $this->getConstant('UI_HONEYPOT_TIME', 5); + return $this->getLiteral('skosmos:uiHoneypotTime', 5); } /** @@ -255,6 +324,6 @@ public function getHoneypotTime() */ public function getCollationEnabled() { - return $this->getConstant('SPARQL_COLLATION_ENABLED', FALSE); + return $this->getBoolean('skosmos:sparqlCollationEnabled', FALSE); } } diff --git a/model/Model.php b/model/Model.php index 40a33f471..eadaf5267 100644 --- a/model/Model.php +++ b/model/Model.php @@ -1,15 +1,5 @@ globalConfig = $config; - try { - $this->cache = new Cache(); - $this->initializeVocabularies(); - $this->initializeNamespaces(); - $this->initializeLogging(); - } catch (Exception $e) { - header("HTTP/1.0 404 Not Found"); - echo("Error: Vocabularies configuration file 'vocabularies.ttl' not found."); - return; - } + $this->initializeLogging(); } /** @@ -59,63 +37,6 @@ public function getConfig() { return $this->globalConfig; } - /** - * Initializes the configuration from the vocabularies.ttl file - */ - private function initializeVocabularies() - { - if (!file_exists($this->getConfig()->getVocabularyConfigFile())) { - throw new Exception($this->getConfig()->getVocabularyConfigFile() . ' is missing, please provide one.'); - } - - try { - // use APC user cache to store parsed vocabularies.ttl configuration - if ($this->cache->isAvailable()) { - // @codeCoverageIgnoreStart - $key = realpath($this->getConfig()->getVocabularyConfigFile()) . ", " . filemtime($this->getConfig()->getVocabularyConfigFile()); - $nskey = "namespaces of " . $key; - $this->graph = $this->cache->fetch($key); - $this->namespaces = $this->cache->fetch($nskey); - if ($this->graph === false || $this->namespaces === false) { // was not found in cache - $this->parseVocabularies($this->getConfig()->getVocabularyConfigFile()); - $this->cache->store($key, $this->graph); - $this->cache->store($nskey, $this->namespaces); - } - // @codeCoverageIgnoreEnd - } else { // APC not available, parse on every request - $this->parseVocabularies($this->getConfig()->getVocabularyConfigFile()); - } - } catch (Exception $e) { - echo "Error: " . $e->getMessage(); - } - } - - /** - * Parses vocabulary configuration and RDF namespaces from the vocabularies.ttl file - * @param string $filename path to vocabularies.ttl file - */ - - private function parseVocabularies($filename) - { - $this->graph = new EasyRdf\Graph(); - $parser = new SkosmosTurtleParser(); - $parser->parse($this->graph, file_get_contents($filename), 'turtle', $filename); - $this->namespaces = $parser->getNamespaces(); - } - - /** - * Registers RDF namespaces from the vocabularies.ttl file for use by EasyRdf (e.g. serializing) - */ - - private function initializeNamespaces() { - foreach ($this->namespaces as $prefix => $fullUri) { - if ($prefix != '' && EasyRdf\RdfNamespace::get($prefix) === null) // if not already defined - { - EasyRdf\RdfNamespace::set($prefix, $fullUri); - } - } - } - /** * Configures the logging facility */ @@ -423,7 +344,7 @@ private function createDataObjects($class, $resarr) public function getVocabularies() { if ($this->allVocabularies === null) { // initialize cache - $vocs = $this->graph->allOfType('skosmos:Vocabulary'); + $vocs = $this->globalConfig->getGraph()->allOfType('skosmos:Vocabulary'); $this->allVocabularies = $this->createDataObjects("Vocabulary", $vocs); foreach ($this->allVocabularies as $voc) { // register vocabulary ids as RDF namespace prefixes @@ -450,8 +371,7 @@ public function getVocabularies() */ public function getVocabulariesInCategory($cat) { - $vocs = $this->graph->resourcesMatching('dc:subject', $cat); - + $vocs = $this->globalConfig->getGraph()->resourcesMatching('dc:subject', $cat); return $this->createDataObjects("Vocabulary", $vocs); } @@ -461,7 +381,7 @@ public function getVocabulariesInCategory($cat) */ public function getVocabularyCategories() { - $cats = $this->graph->allOfType('skos:Concept'); + $cats = $this->globalConfig->getGraph()->allOfType('skos:Concept'); if(empty($cats)) { return array(new VocabularyCategory($this, null)); } @@ -476,7 +396,7 @@ public function getVocabularyCategories() */ public function getClassificationLabel($lang) { - $cats = $this->graph->allOfType('skos:ConceptScheme'); + $cats = $this->globalConfig->getGraph()->allOfType('skos:ConceptScheme'); $label = $cats ? $cats[0]->label($lang) : null; return $label; @@ -645,13 +565,13 @@ public function getResourceFromUri($uri) $jsonld->setMimeTypes($mimetypes); // using apc cache for the resource if available - if ($this->cache->isAvailable()) { + if ($this->globalConfig->getCache()->isAvailable()) { // @codeCoverageIgnoreStart $key = 'fetch: ' . $uri; - $resource = $this->cache->fetch($key); + $resource = $this->globalConfig->getCache()->fetch($key); if ($resource === null || $resource === false) { // was not found in cache, or previous request failed $resource = $this->fetchResourceFromUri($uri); - $this->cache->store($key, $resource, self::URI_FETCH_TTL); + $this->globalConfig->getCache()->store($key, $resource, self::URI_FETCH_TTL); } // @codeCoverageIgnoreEnd } else { // APC not available, parse on every request diff --git a/model/VocabularyConfig.php b/model/VocabularyConfig.php index 0c455fe6a..9f8d4a445 100644 --- a/model/VocabularyConfig.php +++ b/model/VocabularyConfig.php @@ -3,7 +3,7 @@ /** * VocabularyConfig provides access to the vocabulary configuration defined in vocabularies.ttl. */ -class VocabularyConfig extends DataObject +class VocabularyConfig extends BaseConfig { private $plugins; @@ -20,59 +20,6 @@ public function __construct($resource, $globalPlugins=array()) $this->plugins = new PluginRegister(array_merge($globalPlugins, $pluginArray)); } - /** - * Returns a boolean value based on a literal value from the vocabularies.ttl configuration. - * @param string $property the property to query - * @param boolean $default the default value if the value is not set in configuration - */ - private function getBoolean($property, $default = false) - { - $val = $this->resource->getLiteral($property); - if ($val) { - return filter_var($val->getValue(), FILTER_VALIDATE_BOOLEAN); - } - - return $default; - } - - /** - * Returns an array of URIs based on a property from the vocabularies.ttl configuration. - * @param string $property the property to query - * @return string[] List of URIs - */ - private function getResources($property) - { - $resources = $this->resource->allResources($property); - $ret = array(); - foreach ($resources as $res) { - $ret[] = $res->getURI(); - } - - return $ret; - } - - /** - * Returns a boolean value based on a literal value from the vocabularies.ttl configuration. - * @param string $property the property to query - * @param string $lang preferred language for the literal, - */ - private function getLiteral($property, $lang=null) - { - if (!isset($lang)) {; - $lang = $this->getEnvLang(); - } - - $literal = $this->resource->getLiteral($property, $lang); - if ($literal) { - return $literal->getValue(); - } - - // not found with selected language, try any language - $literal = $this->resource->getLiteral($property); - if ($literal) - return $literal->getValue(); - } - /** * Get the default language of this vocabulary * @return string default language, e.g. 'en' diff --git a/tests/ConceptMappingPropertyValueTest.php b/tests/ConceptMappingPropertyValueTest.php index 5bea5eb16..9a3a970fa 100644 --- a/tests/ConceptMappingPropertyValueTest.php +++ b/tests/ConceptMappingPropertyValueTest.php @@ -8,14 +8,13 @@ class ConceptMappingPropertyValueTest extends PHPUnit\Framework\TestCase private $props; protected function setUp() { - require_once 'testconfig.inc'; putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); bind_textdomain_codeset('skosmos', 'UTF-8'); textdomain('skosmos'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $this->vocab = $this->model->getVocabulary('mapping'); $concepts = $this->vocab->getConceptInfo('http://www.skosmos.skos/mapping/m1', 'en'); $this->concept = $concepts[0]; diff --git a/tests/ConceptPropertyTest.php b/tests/ConceptPropertyTest.php index f46329db8..6e6f14dca 100644 --- a/tests/ConceptPropertyTest.php +++ b/tests/ConceptPropertyTest.php @@ -5,14 +5,13 @@ class ConceptPropertyTest extends PHPUnit\Framework\TestCase private $model; protected function setUp() { - require_once 'testconfig.inc'; putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); bind_textdomain_codeset('skosmos', 'UTF-8'); textdomain('skosmos'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); } /** diff --git a/tests/ConceptPropertyValueLiteralTest.php b/tests/ConceptPropertyValueLiteralTest.php index 9ae6ba979..c99d71d6d 100644 --- a/tests/ConceptPropertyValueLiteralTest.php +++ b/tests/ConceptPropertyValueLiteralTest.php @@ -7,14 +7,13 @@ class ConceptPropertyValueLiteralTest extends PHPUnit\Framework\TestCase private $vocab; protected function setUp() { - require_once 'testconfig.inc'; putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); bind_textdomain_codeset('skosmos', 'UTF-8'); textdomain('skosmos'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $this->vocab = $this->model->getVocabulary('test'); $results = $this->vocab->getConceptInfo('http://www.skosmos.skos/test/ta112', 'en'); $this->concept = reset($results); diff --git a/tests/ConceptPropertyValueTest.php b/tests/ConceptPropertyValueTest.php index e1766f953..07dae4aee 100644 --- a/tests/ConceptPropertyValueTest.php +++ b/tests/ConceptPropertyValueTest.php @@ -13,7 +13,7 @@ protected function setUp() { bind_textdomain_codeset('skosmos', 'UTF-8'); textdomain('skosmos'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $this->vocab = $this->model->getVocabulary('test'); $results = $this->vocab->getConceptInfo('http://www.skosmos.skos/test/ta112', 'en'); $this->concept = reset($results); diff --git a/tests/ConceptSearchParametersTest.php b/tests/ConceptSearchParametersTest.php index 855590281..1a98215fd 100644 --- a/tests/ConceptSearchParametersTest.php +++ b/tests/ConceptSearchParametersTest.php @@ -9,7 +9,7 @@ protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); $this->request = $this->getMockBuilder('Request')->disableOriginalConstructor()->getMock(); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); } protected function tearDown() { @@ -21,7 +21,7 @@ protected function tearDown() { * @covers ConceptSearchParameters::getSearchLimit */ public function testConstructorAndSearchLimit() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc'), true); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl'), true); $this->assertEquals(0, $params->getSearchLimit()); } @@ -30,7 +30,7 @@ public function testConstructorAndSearchLimit() { */ public function testGetLang() { $this->request->method('getLang')->will($this->returnValue('en')); - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc'), true); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl'), true); $this->assertEquals('en', $params->getLang()); $this->request->method('getQueryParam')->will($this->returnValue('sv')); $this->assertEquals('sv', $params->getLang()); @@ -41,7 +41,7 @@ public function testGetLang() { * @covers ConceptSearchParameters::setVocabularies */ public function testGetVocabs() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(array(), $params->getVocabs()); $this->request->method('getVocab')->will($this->returnValue('vocfromrequest')); $this->assertEquals(array('vocfromrequest'), $params->getVocabs()); @@ -53,11 +53,11 @@ public function testGetVocabs() { * @covers ConceptSearchParameters::getVocabids */ public function testGetVocabids() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(null, $params->getVocabids()); $params->setVocabularies(array($this->model->getVocabulary('test'))); $this->assertEquals(array('test'), $params->getVocabids()); - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc'), true); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl'), true); $this->assertEquals(null, $params->getVocabids()); $mockreq = $this->getMockBuilder('Request')->disableOriginalConstructor()->getMock(); $qparams = array( @@ -65,9 +65,9 @@ public function testGetVocabids() { array('vocabs', 'test dates') ); $mockreq->method('getQueryParam')->will($this->returnValueMap($qparams)); - $params = new ConceptSearchParameters($mockreq, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($mockreq, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(array('test', 'dates'), $params->getVocabids()); - $params = new ConceptSearchParameters($mockreq, new GlobalConfig('/../tests/testconfig.inc'), true); + $params = new ConceptSearchParameters($mockreq, new GlobalConfig('/../tests/testconfig.ttl'), true); $this->assertEquals(array('test'), $params->getVocabids()); } @@ -75,11 +75,11 @@ public function testGetVocabids() { * @covers ConceptSearchParameters::getSearchTerm */ public function testGetSearchTerm() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals('*', $params->getSearchTerm()); $this->request->method('getQueryParamRaw')->will($this->returnValue('test')); $this->assertEquals('test*', $params->getSearchTerm()); - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc'), true); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl'), true); $this->assertEquals('test', $params->getSearchTerm()); } @@ -90,7 +90,7 @@ public function testGetSearchTerm() { public function testGetTypeLimitNoQueryParam() { $mockreq = $this->getMockBuilder('Request')->disableOriginalConstructor()->getMock(); $mockreq->method('getVocab')->will($this->returnValue($this->model->getVocabulary('test'))); - $params = new ConceptSearchParameters($mockreq, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($mockreq, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(array('skos:Concept', 'http://purl.org/iso25964/skos-thes#ThesaurusArray', 'http://www.w3.org/2004/02/skos/core#Collection'), $params->getTypeLimit()); } @@ -99,7 +99,7 @@ public function testGetTypeLimitNoQueryParam() { * @covers ConceptSearchParameters::getDefaultTypeLimit */ public function testGetTypeLimit() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(array('skos:Concept'), $params->getTypeLimit()); $this->request->method('getQueryParam')->will($this->returnValue('isothes:ThesaurusArray+skos:Collection')); $this->assertEquals(array('isothes:ThesaurusArray', 'skos:Collection'), $params->getTypeLimit()); @@ -110,7 +110,7 @@ public function testGetTypeLimit() { * @covers ConceptSearchParameters::getDefaultTypeLimit */ public function testGetTypeLimitOnlyOne() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->request->method('getQueryParam')->will($this->returnValue('skos:Collection')); $this->assertEquals(array('skos:Collection'), $params->getTypeLimit()); } @@ -120,7 +120,7 @@ public function testGetTypeLimitOnlyOne() { * @covers ConceptSearchParameters::setUnique */ public function testGetAndSetUnique() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(false, $params->getUnique()); $params->setUnique(true); $this->assertEquals(true, $params->getUnique()); @@ -131,7 +131,7 @@ public function testGetAndSetUnique() { * @covers ConceptSearchParameters::setHidden */ public function testGetAndSetHidden() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(true, $params->getHidden()); $params->setHidden(false); $this->assertEquals(false, $params->getHidden()); @@ -141,7 +141,7 @@ public function testGetAndSetHidden() { * @covers ConceptSearchParameters::getArrayClass */ public function testGetArrayClassWithoutVocabulary() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(null, $params->getArrayClass()); } @@ -149,7 +149,7 @@ public function testGetArrayClassWithoutVocabulary() { * @covers ConceptSearchParameters::getArrayClass */ public function testGetArrayClass() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $params->setVocabularies(array($this->model->getVocabulary('test'))); $this->assertEquals('http://purl.org/iso25964/skos-thes#ThesaurusArray', $params->getArrayClass()); } @@ -159,7 +159,7 @@ public function testGetArrayClass() { * @covers ConceptSearchParameters::getQueryParam */ public function testGetSchemeLimit() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals([], $params->getSchemeLimit()); $this->request->method('getQueryParam')->will($this->returnValue('http://www.skosmos.skos/test/ http://www.skosmos.skos/date/')); $this->assertEquals(array(0 => 'http://www.skosmos.skos/test/', 1 => 'http://www.skosmos.skos/date/'), $params->getSchemeLimit()); @@ -170,7 +170,7 @@ public function testGetSchemeLimit() { */ public function testGetContentLang() { $this->request->method('getContentLang')->will($this->returnValue('de')); - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals('de', $params->getContentLang()); } @@ -178,9 +178,9 @@ public function testGetContentLang() { * @covers ConceptSearchParameters::getSearchLang */ public function testGetSearchLang() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(null, $params->getSearchLang()); - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->request->method('getContentLang')->will($this->returnValue('en')); $this->request->method('getQueryParam')->will($this->returnValue('on')); //anylang=on $this->assertEquals('', $params->getSearchLang()); @@ -191,7 +191,7 @@ public function testGetSearchLang() { */ public function testGetOffsetNonNumeric() { $this->request->method('getQueryParam')->will($this->returnValue('notvalid')); - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(0, $params->getOffset()); } @@ -200,7 +200,7 @@ public function testGetOffsetNonNumeric() { */ public function testGetOffsetValid() { $this->request->method('getQueryParam')->will($this->returnValue(25)); - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(25, $params->getOffset()); } @@ -212,7 +212,7 @@ public function testGetAdditionalField() { array('fields', 'broader') ); $this->request->method('getQueryParam')->will($this->returnValueMap($map)); - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(array('broader'), $params->getAdditionalFields()); } @@ -224,7 +224,7 @@ public function testGetAdditionalFields() { array('fields', 'broader prefLabel') ); $this->request->method('getQueryParam')->will($this->returnValueMap($map)); - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); + $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.ttl')); $this->assertEquals(array('broader', 'prefLabel'), $params->getAdditionalFields()); } } diff --git a/tests/ConceptTest.php b/tests/ConceptTest.php index 9af2ea2f5..85857719b 100644 --- a/tests/ConceptTest.php +++ b/tests/ConceptTest.php @@ -14,7 +14,7 @@ protected function setUp() { bind_textdomain_codeset('skosmos', 'UTF-8'); textdomain('skosmos'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $this->vocab = $this->model->getVocabulary('test'); $results = $this->vocab->getConceptInfo('http://www.skosmos.skos/test/ta112', 'en'); $this->concept = reset($results); @@ -323,7 +323,7 @@ public function testGetLabelCurrentLanguage() */ public function testGetLabelWhenNull() { - $model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $vocab = $model->getVocabulary('test'); $concept = $vocab->getConceptInfo("http://www.skosmos.skos/test/ta120", "en"); $this->assertEquals(null, $concept[0]->getLabel()); @@ -348,7 +348,7 @@ public function testGetLabelResortingToVocabDefault() */ public function testGetGroupProperties() { - $model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $vocab = $model->getVocabulary('groups'); $concept = $vocab->getConceptInfo("http://www.skosmos.skos/groups/ta111", "en"); $arrays = $concept[0]->getArrayProperties(); @@ -364,7 +364,7 @@ public function testGetGroupProperties() */ public function testGetGroupPropertiesWithDuplicatedInformationFilteredOut() { - $model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $vocab = $model->getVocabulary('dupgroup'); $concept = $vocab->getConceptInfo("http://www.skosmos.skos/dupgroup/c1", "en"); $groups = $concept[0]->getGroupProperties(); @@ -380,7 +380,7 @@ public function testGetGroupPropertiesWithDuplicatedInformationFilteredOut() */ public function testGetPropertiesWithNarrowersPartOfACollection() { - $model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $vocab = $model->getVocabulary('groups'); $concept = $vocab->getConceptInfo("http://www.skosmos.skos/groups/ta1", "en"); $props = $concept[0]->getProperties(); diff --git a/tests/FeedbackTest.php b/tests/FeedbackTest.php index 52734704b..12fe5976d 100644 --- a/tests/FeedbackTest.php +++ b/tests/FeedbackTest.php @@ -8,7 +8,7 @@ class FeedbackTest extends PHPUnit\Framework\TestCase private $request; protected function setUp() { - $config = new GlobalConfig('/../tests/testconfig.inc'); + $config = new GlobalConfig('/../tests/testconfig.ttl'); $this->model = new Model($config); $this->request = \Mockery::mock('Request', array($this->model))->makePartial(); $this->request->setLang('en'); diff --git a/tests/GenericSparqlTest.php b/tests/GenericSparqlTest.php index 156ce476b..8f5c20b48 100644 --- a/tests/GenericSparqlTest.php +++ b/tests/GenericSparqlTest.php @@ -11,7 +11,7 @@ class GenericSparqlTest extends PHPUnit\Framework\TestCase protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $this->vocab = $this->model->getVocabulary('test'); $this->graph = $this->vocab->getGraph(); $this->params = $this->getMockBuilder('ConceptSearchParameters')->disableOriginalConstructor()->getMock(); diff --git a/tests/GlobalConfigTest.php b/tests/GlobalConfigTest.php index 0be61eead..9e0d12512 100644 --- a/tests/GlobalConfigTest.php +++ b/tests/GlobalConfigTest.php @@ -8,7 +8,7 @@ class GlobalConfigTest extends PHPUnit\Framework\TestCase protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); - $this->config = new GlobalConfig('/../tests/testconfig.inc'); + $this->config = new GlobalConfig('/../tests/testconfig.ttl'); } /** @@ -21,7 +21,6 @@ public function testLanguagesWithoutConfiguration() { /** * @covers GlobalConfig::getHttpTimeout - * @covers GlobalConfig::getConstant */ public function testTimeoutDefaultValue() { $actual = $this->config->getHttpTimeout(); @@ -30,25 +29,14 @@ public function testTimeoutDefaultValue() { /** * @covers GlobalConfig::getDefaultEndpoint - * @covers GlobalConfig::getConstant */ public function testEndpointDefaultValue() { $actual = $this->config->getDefaultEndpoint(); $this->assertEquals('http://localhost:13030/ds/sparql', $actual); } - /** - * @covers GlobalConfig::getSparqlGraphStore - * @covers GlobalConfig::getConstant - */ - public function testSparqlGraphDefaultValue() { - $actual = $this->config->getSparqlGraphStore(); - $this->assertEquals(null, $actual); - } - /** * @covers GlobalConfig::getDefaultTransitiveLimit - * @covers GlobalConfig::getConstant */ public function testTransitiveLimitDefaultValue() { $actual = $this->config->getDefaultTransitiveLimit(); @@ -57,7 +45,6 @@ public function testTransitiveLimitDefaultValue() { /** * @covers GlobalConfig::getSearchResultsSize - * @covers GlobalConfig::getConstant */ public function testSearchLimitDefaultValue() { $actual = $this->config->getSearchResultsSize(); @@ -66,7 +53,6 @@ public function testSearchLimitDefaultValue() { /** * @covers GlobalConfig::getTemplateCache - * @covers GlobalConfig::getConstant */ public function testTemplateCacheDefaultValue() { $actual = $this->config->getTemplateCache(); @@ -75,7 +61,6 @@ public function testTemplateCacheDefaultValue() { /** * @covers GlobalConfig::getDefaultSparqlDialect - * @covers GlobalConfig::getConstant */ public function testSparqlDialectDefaultValue() { $actual = $this->config->getDefaultSparqlDialect(); @@ -84,7 +69,6 @@ public function testSparqlDialectDefaultValue() { /** * @covers GlobalConfig::getFeedbackAddress - * @covers GlobalConfig::getConstant */ public function testFeedbackAddressDefaultValue() { $actual = $this->config->getFeedbackAddress(); @@ -93,7 +77,6 @@ public function testFeedbackAddressDefaultValue() { /** * @covers GlobalConfig::getLogCaughtExceptions - * @covers GlobalConfig::getConstant */ public function testExceptionLoggingDefaultValue() { $actual = $this->config->getLogCaughtExceptions(); @@ -102,25 +85,14 @@ public function testExceptionLoggingDefaultValue() { /** * @covers GlobalConfig::getServiceName - * @covers GlobalConfig::getConstant */ public function testServiceNameDefaultValue() { $actual = $this->config->getServiceName(); $this->assertEquals('Skosmos', $actual); } - /** - * @covers GlobalConfig::getServiceTagline - * @covers GlobalConfig::getConstant - */ - public function testgetServiceTaglineDefaultValue() { - $actual = $this->config->getServiceTagline(); - $this->assertEquals(null, $actual); - } - /** * @covers GlobalConfig::getCustomCss - * @covers GlobalConfig::getConstant */ public function testCustomCssDefaultValue() { $actual = $this->config->getCustomCss(); @@ -129,7 +101,6 @@ public function testCustomCssDefaultValue() { /** * @covers GlobalConfig::getUILanguageDropdown - * @covers GlobalConfig::getConstant */ public function testDefaultValue() { $actual = $this->config->getUILanguageDropdown(); @@ -138,22 +109,12 @@ public function testDefaultValue() { /** * @covers GlobalConfig::getBaseHref - * @covers GlobalConfig::getConstant */ public function testBaseHrefDefaultValue() { $actual = $this->config->getBaseHref(); $this->assertEquals(null, $actual); } - /** - * @covers GlobalConfig::getVocabularyConfigFile - * @covers GlobalConfig::getConstant - */ - public function testGetVocabularyConfigFile() { - $actual = $this->config->getVocabularyConfigFile(); - $this->assertEquals('tests/testvocabularies.ttl', $actual); - } - /** * @covers GlobalConfig::getCollationEnabled */ diff --git a/tests/JenaTextSparqlTest.php b/tests/JenaTextSparqlTest.php index 727cabc01..371bfe425 100644 --- a/tests/JenaTextSparqlTest.php +++ b/tests/JenaTextSparqlTest.php @@ -11,7 +11,7 @@ class JenaTextSparqlTest extends PHPUnit\Framework\TestCase protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); - $this->model = new Model(new GlobalConfig('/../tests/jenatestconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/jenatestconfig.ttl')); $this->vocab = $this->model->getVocabulary('test'); $this->graph = $this->vocab->getGraph(); $this->params = $this->getMockBuilder('ConceptSearchParameters')->disableOriginalConstructor()->getMock(); diff --git a/tests/ModelTest.php b/tests/ModelTest.php index 6916ff7bc..89235e74b 100644 --- a/tests/ModelTest.php +++ b/tests/ModelTest.php @@ -8,7 +8,7 @@ class ModelTest extends PHPUnit\Framework\TestCase protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $this->params = $this->getMockBuilder('ConceptSearchParameters')->disableOriginalConstructor()->getMock(); $this->params->method('getVocabIds')->will($this->returnValue(array('test'))); $this->params->method('getVocabs')->will($this->returnValue(array($this->model->getVocabulary('test')))); @@ -23,7 +23,7 @@ protected function tearDown() { */ public function testConstructorWithConfig() { - new Model(new GlobalConfig('/../tests/testconfig.inc')); + new Model(new GlobalConfig('/../tests/testconfig.ttl')); } /** @@ -497,7 +497,7 @@ public function testGetRDFShouldIncludeLists() { * Issue: https://github.com/NatLibFi/Skosmos/pull/419 */ public function testGetRDFShouldNotIncludeExtraBlankNodesFromLists() { - $model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $result = $model->getRDF('test', 'http://www.skosmos.skos/test/ta125', 'text/turtle'); $resultGraph = new EasyRdf\Graph(); $resultGraph->parse($result, "turtle"); diff --git a/tests/PluginRegisterTest.php b/tests/PluginRegisterTest.php index 13db14b2f..f5ebd030b 100644 --- a/tests/PluginRegisterTest.php +++ b/tests/PluginRegisterTest.php @@ -10,7 +10,7 @@ protected function setUp() { $this->mockpr = $this->getMockBuilder('PluginRegister')->setConstructorArgs(array(array('global-plugin')))->setMethods(array('getPlugins'))->getMock(); $stubplugs = array ('test-plugin' => array ( 'js' => array ( 0 => 'first.js', 1 => 'second.min.js', ), 'css' => array ( 0 => 'stylesheet.css', ), 'templates' => array ( 0 => 'template.html', ), ), 'only-css' => array ( 'css' => array ( 0 => 'super.css')), 'global-plugin' => array('js' => array('everywhere.js'))); $this->mockpr->method('getPlugins')->will($this->returnValue($stubplugs)); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $this->vocab = $this->model->getVocabulary('test'); } diff --git a/tests/RequestTest.php b/tests/RequestTest.php index 87436536f..a8e02dbe3 100644 --- a/tests/RequestTest.php +++ b/tests/RequestTest.php @@ -12,7 +12,7 @@ protected function setUp() { bind_textdomain_codeset('skosmos', 'UTF-8'); textdomain('skosmos'); - $config = new GlobalConfig('/../tests/testconfig.inc'); + $config = new GlobalConfig('/../tests/testconfig.ttl'); $this->model = new Model($config); $this->request = new Request($this->model); } diff --git a/tests/RestControllerTest.php b/tests/RestControllerTest.php index 3ee8ec67a..f7d6f30b7 100644 --- a/tests/RestControllerTest.php +++ b/tests/RestControllerTest.php @@ -8,14 +8,13 @@ class RestControllerTest extends \PHPUnit\Framework\TestCase { protected function setUp() { - require_once 'testconfig.inc'; putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); bind_textdomain_codeset('skosmos', 'UTF-8'); textdomain('skosmos'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $this->controller = new RestController($this->model); } diff --git a/tests/VocabularyCategoryTest.php b/tests/VocabularyCategoryTest.php index 55e96b7ec..0abdfc57f 100644 --- a/tests/VocabularyCategoryTest.php +++ b/tests/VocabularyCategoryTest.php @@ -8,7 +8,7 @@ class VocabularyCategoryTest extends PHPUnit\Framework\TestCase protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $this->mockres = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); $this->mockres->method('localName')->will($this->returnValue('local name')); } diff --git a/tests/VocabularyConfigTest.php b/tests/VocabularyConfigTest.php index d888703c5..46d28290e 100644 --- a/tests/VocabularyConfigTest.php +++ b/tests/VocabularyConfigTest.php @@ -8,7 +8,7 @@ class VocabularyConfigTest extends PHPUnit\Framework\TestCase protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); } /** diff --git a/tests/VocabularyTest.php b/tests/VocabularyTest.php index bf64d8af1..e54b67d00 100644 --- a/tests/VocabularyTest.php +++ b/tests/VocabularyTest.php @@ -10,7 +10,7 @@ class VocabularyTest extends \PHPUnit\Framework\TestCase protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); - $this->model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); } /** @@ -295,7 +295,7 @@ public function testSearchConceptsAlphabeticalEverything() { * @covers Vocabulary::getCrumbs */ public function testGetBreadCrumbs() { - $model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $resource = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); $vocabstub = $this->getMockBuilder('Vocabulary')->setMethods(array('getConceptTransitiveBroaders'))->setConstructorArgs(array($model, $resource))->getMock(); $vocabstub->method('getConceptTransitiveBroaders')->willReturn(array ( 'http://www.yso.fi/onto/yso/p4762' => array ( 'label' => 'objects', ), 'http://www.yso.fi/onto/yso/p1674' => array ( 'label' => 'physical whole', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p4762', ), ), 'http://www.yso.fi/onto/yso/p14606' => array ( 'label' => 'layers', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p1674', ), ), )); @@ -310,7 +310,7 @@ public function testGetBreadCrumbs() { * @covers Vocabulary::getCrumbs */ public function testGetBreadCrumbsShortening() { - $model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $resource = $this->getMockBuilder('EasyRdf\Resource')->disableOriginalConstructor()->getMock(); $vocabstub = $this->getMockBuilder('Vocabulary')->setMethods(array('getConceptTransitiveBroaders'))->setConstructorArgs(array($model, $resource))->getMock(); $vocabstub->method('getConceptTransitiveBroaders')->willReturn(array ( 'http://www.yso.fi/onto/yso/p4762' => array ( 'label' => 'objects', ), 'http://www.yso.fi/onto/yso/p13871' => array ( 'label' => 'thai language', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p10834', ), ), 'http://www.yso.fi/onto/yso/p556' => array ( 'label' => 'languages', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p2881', ), ), 'http://www.yso.fi/onto/yso/p8965' => array ( 'label' => 'Sino-Tibetan languages', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p556', ), ), 'http://www.yso.fi/onto/yso/p3358' => array ( 'label' => 'systems', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p4762', ), ), 'http://www.yso.fi/onto/yso/p10834' => array ( 'label' => 'Tai languages', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p8965', ), ), 'http://www.yso.fi/onto/yso/p2881' => array ( 'label' => 'cultural systems', 'direct' => array ( 0 => 'http://www.yso.fi/onto/yso/p3358', ), ), ) ); @@ -324,7 +324,7 @@ public function testGetBreadCrumbsShortening() { * @covers Vocabulary::getCrumbs */ public function testGetBreadCrumbsCycle() { - $model = new Model(new GlobalConfig('/../tests/testconfig.inc')); + $model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); $vocab = $model->getVocabulary('cycle'); $result = $vocab->getBreadCrumbs('en', 'http://www.skosmos.skos/cycle/ta4'); foreach ($result['breadcrumbs'][0] as $crumb) diff --git a/tests/jenatestconfig.inc b/tests/jenatestconfig.inc deleted file mode 100644 index 3123c6dee..000000000 --- a/tests/jenatestconfig.inc +++ /dev/null @@ -1,5 +0,0 @@ - . @prefix : <#> . +# Skosmos main configuration + +:config a skosmos:Configuration ; + # SPARQL endpoint + # a local Fuseki server is usually on localhost:3030 + skosmos:sparqlEndpoint "http://localhost:3030/ds/sparql" ; + # sparql-query extension, or "Generic" for plain SPARQL 1.1 + # set to "JenaText" instead if you use Fuseki with jena-text index + skosmos:sparqlDialect "JenaText" ; + # whether to enable collation in sparql queries + skosmos:sparqlCollationEnabled true ; + # HTTP client configuration + skosmos:sparqlTimeout 20 ; + skosmos:httpTimeout 5 ; + # customize the service name + skosmos:serviceName "Skosmos" ; + # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. + # skosmos:baseHref "http://localhost/Skosmos/" ; + # interface languages available, and the corresponding system locales + skosmos:languages [ :name "en" ; :value "en_GB.utf8" ] ; + # how many results (maximum) to load at a time on the search results page + skosmos:searchResultsSize 20 ; + # how many items (maximum) to retrieve in transitive property queries + skosmos:transitiveLimit 1000 ; + # whether or not to log caught exceptions + skosmos:logCaughtExceptions false ; + # set to TRUE to enable logging into browser console + skosmos:logBrowserConsole false ; + # set to a logfile path to enable logging into log file + # skosmos:logFileName "" ; + # a default location for Twig template rendering + skosmos:templateCache "/tmp/skosmos-template-cache" ; + # customize the css by adding your own stylesheet + # skosmos:customCss "resource/css/stylesheet.css" ; + # default email address where to send the feedback + skosmos:feedbackAddress "" ; + # email address to set as the sender for feedback messages + skosmos:feedbackSender "" ; + # email address to set as the envelope sender for feedback messages + skosmos:feedbackEnvelopeSender "" ; + # whether to display the ui language selection as a dropdown (useful for cases where there are more than 3 languages) + skosmos:uiLanguageDropdown false ; + # whether to enable the spam honey pot or not, enabled by default + skosmos:uiHoneypotEnabled true ; + # default time a user must wait before submitting a form + skosmos:uiHoneypotTime 5 . + +# Skosmos vocabularies :test a skosmos:Vocabulary, void:Dataset ; dc:title "Test ontology"@en ; @@ -24,10 +72,10 @@ void:dataDump ; void:sparqlEndpoint ; void:uriSpace "http://www.skosmos.skos/test/"; - skos:prefLabel "Test ontology"@en ; + skos:prefLabel "Test ontology"@en ; skosmos:arrayClass isothes:ThesaurusArray ; skosmos:defaultLanguage "en"; - skosmos:feedbackRecipient "developer@vocabulary.org"; + skosmos:feedbackRecipient "developer@vocabulary.org"; skosmos:groupClass skos:Collection; skosmos:language "en"; skosmos:showTopConcepts "true"; @@ -68,7 +116,7 @@ ; void:uriSpace "http://www.skosmos.skos/onto/groups/"; skosmos:arrayClass isothes:ThesaurusArray ; - skosmos:groupClass skos:Collection ; + skosmos:groupClass skos:Collection ; void:sparqlEndpoint ; skosmos:language "fi", "en"; skosmos:defaultLanguage "fi"; @@ -83,7 +131,7 @@ ; void:uriSpace "http://www.exemple.fr/"; skosmos:arrayClass isothes:ThesaurusArray ; - skosmos:groupClass skos:Collection ; + skosmos:groupClass skos:Collection ; void:sparqlEndpoint ; skosmos:language "en"; skosmos:defaultLanguage "en"; @@ -129,7 +177,7 @@ void:sparqlEndpoint ; skosmos:language "en"; skosmos:showPropertyInSearch skos:exactMatch; - skosmos:hasMultiLingualProperty skos:altLabel ; + skosmos:hasMultiLingualProperty skos:altLabel ; skosmos:sparqlGraph ; skosmos:mainConceptScheme . diff --git a/tests/testconfig.inc b/tests/testconfig.inc deleted file mode 100644 index 8e1e68308..000000000 --- a/tests/testconfig.inc +++ /dev/null @@ -1,5 +0,0 @@ - . +@prefix rdf: . +@prefix rdfs: . +@prefix owl: . +@prefix xsd: . +@prefix dc: . +@prefix dc11: . +@prefix foaf: . +@prefix wv: . +@prefix sd: . +@prefix skos: . +@prefix skosmos: . +@prefix isothes: . +@prefix meta: . +@prefix my: . +@prefix mdrtype: . +@prefix : <#> . + +# Skosmos main configuration + +:config a skosmos:Configuration ; + # SPARQL endpoint + # a local Fuseki server is usually on localhost:3030 + skosmos:sparqlEndpoint "http://localhost:13030/ds/sparql" ; + # sparql-query extension, or "Generic" for plain SPARQL 1.1 + # set to "JenaText" instead if you use Fuseki with jena-text index + skosmos:sparqlDialect "Generic" ; + # whether to enable collation in sparql queries + skosmos:sparqlCollationEnabled false ; + # HTTP client configuration + skosmos:sparqlTimeout 20 ; + skosmos:httpTimeout 5 ; + # customize the service name + skosmos:serviceName "Skosmos" ; + # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. + # skosmos:baseHref "http://localhost/Skosmos/" ; + # interface languages available, and the corresponding system locales + skosmos:languages [ :name "en" ; :value "en_GB.utf8" ] ; + # how many results (maximum) to load at a time on the search results page + skosmos:searchResultsSize 20 ; + # how many items (maximum) to retrieve in transitive property queries + skosmos:transitiveLimit 1000 ; + # whether or not to log caught exceptions + skosmos:logCaughtExceptions false ; + # set to TRUE to enable logging into browser console + skosmos:logBrowserConsole false ; + # set to a logfile path to enable logging into log file + # skosmos:logFileName "" ; + # a default location for Twig template rendering + skosmos:templateCache "/tmp/skosmos-template-cache" ; + # customize the css by adding your own stylesheet + # skosmos:customCss "resource/css/stylesheet.css" ; + # default email address where to send the feedback + skosmos:feedbackAddress "" ; + # email address to set as the sender for feedback messages + skosmos:feedbackSender "" ; + # email address to set as the envelope sender for feedback messages + skosmos:feedbackEnvelopeSender "" ; + # whether to display the ui language selection as a dropdown (useful for cases where there are more than 3 languages) + skosmos:uiLanguageDropdown false ; + # whether to enable the spam honey pot or not, enabled by default + skosmos:uiHoneypotEnabled true ; + # default time a user must wait before submitting a form + skosmos:uiHoneypotTime 5 . + +# Skosmos vocabularies + +:test a skosmos:Vocabulary, void:Dataset ; + dc:title "Test ontology"@en ; + dc:subject :cat_science ; + dc:type mdrtype:ONTOLOGY ; + void:dataDump ; + void:sparqlEndpoint ; + void:uriSpace "http://www.skosmos.skos/test/"; + skos:prefLabel "Test ontology"@en ; + skosmos:arrayClass isothes:ThesaurusArray ; + skosmos:defaultLanguage "en"; + skosmos:feedbackRecipient "developer@vocabulary.org"; + skosmos:groupClass skos:Collection; + skosmos:language "en"; + skosmos:showTopConcepts "true"; + skosmos:shortName "Test short", + "Testi lyhyt"@fi; + skosmos:sparqlGraph . + +:multiple-schemes a skosmos:Vocabulary, void:Dataset ; + skos:prefLabel "Mutiple Schemes vocabulary"@en ; + dc:title "Mutiple Schemes vocabulary"@en ; + dc:type mdrtype:ONTOLOGY ; + void:sparqlEndpoint ; + void:uriSpace "http://www.skosmos.skos/multiple-schemes/"; + skosmos:defaultLanguage "en"; + skosmos:language "en"; + skosmos:showTopConcepts "true"; + skosmos:sparqlGraph . + +:testdiff a skosmos:Vocabulary, void:Dataset ; + dc11:title "Test ontology 2"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/onto/testdiff#"; + void:sparqlEndpoint ; + skosmos:language "fi", "en"; + skosmos:sparqlDialect "JenaText"; + skosmos:fullAlphabeticalIndex "true"; + skosmos:explicitLanguageTags "true"; + skosmos:defaultSidebarView "groups"; + skosmos:showTopConcepts "false"; + skosmos:hierarchyProperty isothes:broaderGeneric; + skosmos:sparqlGraph ; + skosmos:mainConceptScheme . + +:groups a skosmos:Vocabulary, void:Dataset ; + dc11:title "Group test onto"@en ; + dc:subject :cat_general ; + void:dataDump , + ; + void:uriSpace "http://www.skosmos.skos/onto/groups/"; + skosmos:arrayClass isothes:ThesaurusArray ; + skosmos:groupClass skos:Collection ; + void:sparqlEndpoint ; + skosmos:language "fi", "en"; + skosmos:defaultLanguage "fi"; + skosmos:indexShowClass meta:TestClass, meta:TestClass2; + skosmos:sparqlGraph . + + +:test-concept-schemes a skosmos:Vocabulary, void:Dataset ; + dc11:title "Test concept schemes"@en ; + dc:subject :cat_general ; + void:dataDump , + ; + void:uriSpace "http://www.exemple.fr/"; + skosmos:arrayClass isothes:ThesaurusArray ; + skosmos:groupClass skos:Collection ; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:defaultLanguage "en"; + skosmos:sparqlGraph . + +:showDeprecated a skosmos:Vocabulary, void:Dataset ; + dc11:title "Show deprecated test vocabulary"@en ; + dc:subject :cat_general ; + void:dataDump , + ; + void:uriSpace "http://www.skosmos.skos/onto/groups/"; + skosmos:arrayClass isothes:ThesaurusArray ; + skosmos:groupClass skos:Collection ; + void:sparqlEndpoint ; + skosmos:language "fi", "en"; + skosmos:defaultLanguage "fi"; + skosmos:showDeprecated "true"; + skosmos:sparqlGraph . + +:cycle a skosmos:Vocabulary, void:Dataset ; + dc11:title "Cycle test vocabulary"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/onto/cycle/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . + +:duplicates a skosmos:Vocabulary, void:Dataset ; + dc11:title "Duplicate labels test vocabulary"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/onto/dup/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . + +:dates a skosmos:Vocabulary, void:Dataset ; + dc:title "Date information vocabulary"@en ; + dc11:title "Date information vocabulary"@en ; + skos:prefLabel "Date information vocabulary"@en ; + rdfs:label "Date information vocabulary"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/onto/date/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:showPropertyInSearch skos:exactMatch; + skosmos:hasMultiLingualProperty skos:altLabel ; + skosmos:sparqlGraph ; + skosmos:mainConceptScheme . + +:mapping a skosmos:Vocabulary, void:Dataset ; + dc11:title "Vocabulary with mappings"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/onto/mapping/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . + +:changes a skosmos:Vocabulary, void:Dataset ; + dc11:title "A vocabulary for testing the change list creation"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/changes/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . + +:prefix a skosmos:Vocabulary, void:Dataset ; + dc11:title "A vocabulary for testing custom prefixes"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/prefix/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . + +:subclass a skosmos:Vocabulary, void:Dataset ; + dc11:title "Subproperties of hiddenLabel"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/sub/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . + +:dupgroup a skosmos:Vocabulary, void:Dataset ; + dc11:title "SuperGroup and member relationship double trouble"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/onto/dupgroup/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . + +:subtag a skosmos:Vocabulary, void:Dataset ; + dc11:title "A vocabulary for testing language subtags"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/subtag/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:fallbackLanguages ( "fr" "de" "sv" ) ; + skosmos:sparqlGraph ; + skosmos:sparqlDialect "JenaText" . + +:collation a skosmos:Vocabulary, void:Dataset ; + dc11:title "A vocabulary for test SPARQL with collation"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/collation/"; + void:sparqlEndpoint ; + skosmos:language "fi"; + skosmos:sparqlGraph . + +:cbd a skosmos:Vocabulary, void:Dataset ; + dc11:title "A vocabulary for testing blank node processing and reification"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/cbd/"; + skosmos:externalProperty dc11:contributor ; + skosmos:externalProperty dc11:creator ; + skosmos:externalProperty dc11:relation ; + skosmos:externalProperty rdfs:comment ; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . + +:xl a skosmos:Vocabulary, void:Dataset ; + dc11:title "A vocabulary for testing SKOS XL"@en ; + dc:subject :cat_general ; + void:uriSpace "http://www.skosmos.skos/xl/"; + void:sparqlEndpoint ; + skosmos:language "en"; + skosmos:sparqlGraph . + + + dc:format "application/rdf+xml" . + +:cat_science a skos:Concept ; + skos:topConceptOf :categories ; + skos:inScheme :categories ; + skos:prefLabel "Luonnontieteet ja lääketiede"@fi, + "Naturvetenskap och medicin"@sv, + "Science and medicine"@en . + +mdrtype:THESAURUS a skos:Concept ; + skos:prefLabel "Тезаурус"@bg, "Tezaurus"@cs, "Tesaurus"@da, "Thesaurus"@de, "Θησαυρός"@el, "Thesaurus"@en, "Tesaurus"@et, "Tesaurus"@fi, "Thésaurus"@fr, "Pojmovnik"@hr, "Tezaurusz"@hu, "Tesauro"@it, "Tēzaurs"@lv, "Tezauras"@lt, "Teżawru"@mt, "Thesaurus"@nl, "Tesaurus"@no, "Tezaurus"@pl, "Tesauro"@pt, "Tezaur"@ro, "Synonymický slovník"@sk, "Tezaver"@sl, "Tesauro"@es, "Tesaurus"@sv . + +mdrtype:ONTOLOGY a skos:Concept ; + skos:prefLabel "Онтология"@bg, "Ontologie"@cs, "Ontologi"@da, "Ontologie"@de, "Οντολογία"@el, "Ontology"@en, "Ontoloogia"@et, "Ontologia"@fi, "Ontologie"@fr, "Ontologija"@hr, "Ontológia"@hu, "Ontologia"@it, "Ontoloģija"@lv, "Ontologija"@lt, "Ontoloġija"@mt, "Ontologie"@nl, "Ontologi"@no, "Struktura pojęciowa"@pl, "Ontologia"@pt, "Ontologie"@ro, "Ontológia"@sk, "Ontologija"@sl, "Ontología"@es, "Ontologi"@sv . + diff --git a/vocabularies.ttl.dist b/vocabularies.ttl.dist deleted file mode 100644 index eca7a9975..000000000 --- a/vocabularies.ttl.dist +++ /dev/null @@ -1,68 +0,0 @@ -@prefix void: . -@prefix rdf: . -@prefix rdfs: . -@prefix owl: . -@prefix xsd: . -@prefix dc: . -@prefix foaf: . -@prefix wv: . -@prefix sd: . -@prefix skos: . -@prefix skosmos: . -@prefix isothes: . -@prefix mdrtype: . -@prefix : <#> . - -:ysa a skosmos:Vocabulary, void:Dataset ; - dc:title "YSA - Yleinen suomalainen asiasanasto"@fi, - "YSA - Allmän tesaurus på finska"@sv, - "YSA - General Finnish thesaurus"@en ; - dc:subject :cat_general ; - dc:type mdrtype:THESAURUS ; - void:uriSpace "http://www.yso.fi/onto/ysa/"; - skosmos:groupClass skos:Collection; - skosmos:language "fi"; - skosmos:shortName "YSA"; - skosmos:feedbackRecipient "vesa-posti@helsinki.fi" ; - skosmos:showChangeList "true" ; - void:dataDump ; - void:sparqlEndpoint ; - skosmos:sparqlGraph . - -:yso a skosmos:Vocabulary, void:Dataset ; - dc:title "YSO - Yleinen suomalainen ontologia"@fi, - "ALLFO - Allmän finländsk ontologi"@sv, - "YSO - General Finnish ontology"@en ; - dc:subject :cat_general ; - dc:type mdrtype:ONTOLOGY ; - void:uriSpace "http://www.yso.fi/onto/yso/"; - skosmos:language "fi", "sv", "en"; - skosmos:defaultLanguage "fi"; - skosmos:showTopConcepts "true"; - skosmos:showStatistics "false"; - skosmos:loadExternalResources "false"; - skosmos:shortName "YSO", - "ALLFO"@sv; - skosmos:groupClass isothes:ConceptGroup ; - skosmos:arrayClass isothes:ThesaurusArray ; - void:dataDump ; - void:sparqlEndpoint ; - skosmos:sparqlGraph ; - skosmos:mainConceptScheme . - -:categories a skos:ConceptScheme; - skos:prefLabel "Skosmos Vocabulary Categories"@en . - -:cat_general a skos:Concept ; - skos:topConceptOf :categories ; - skos:inScheme :categories ; - skos:prefLabel "Yleiskäsitteet"@fi, - "Allmänna begrepp"@sv, - "General concepts"@en . - -mdrtype:THESAURUS a skos:Concept ; - skos:prefLabel "Тезаурус"@bg, "Tezaurus"@cs, "Tesaurus"@da, "Thesaurus"@de, "Θησαυρός"@el, "Thesaurus"@en, "Tesaurus"@et, "Tesaurus"@fi, "Thésaurus"@fr, "Pojmovnik"@hr, "Tezaurusz"@hu, "Tesauro"@it, "Tēzaurs"@lv, "Tezauras"@lt, "Teżawru"@mt, "Thesaurus"@nl, "Tesaurus"@no, "Tezaurus"@pl, "Tesauro"@pt, "Tezaur"@ro, "Synonymický slovník"@sk, "Tezaver"@sl, "Tesauro"@es, "Tesaurus"@sv . - -mdrtype:ONTOLOGY a skos:Concept ; - skos:prefLabel "Онтология"@bg, "Ontologie"@cs, "Ontologi"@da, "Ontologie"@de, "Οντολογία"@el, "Ontology"@en, "Ontoloogia"@et, "Ontologia"@fi, "Ontologie"@fr, "Ontologija"@hr, "Ontológia"@hu, "Ontologia"@it, "Ontoloģija"@lv, "Ontologija"@lt, "Ontoloġija"@mt, "Ontologie"@nl, "Ontologi"@no, "Struktura pojęciowa"@pl, "Ontologia"@pt, "Ontologie"@ro, "Ontológia"@sk, "Ontologija"@sl, "Ontología"@es, "Ontologi"@sv . - From d51c82aea3b86497726e66186ea79c72c7513d2f Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Sat, 2 Jun 2018 17:57:14 +1200 Subject: [PATCH 099/173] Fix scrutinizer issues --- model/GlobalConfig.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index 501f2ad44..2ffbf777b 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -21,6 +21,8 @@ class GlobalConfig extends BaseConfig { private $filePath; /** Namespaces from vocabularies configuration file. */ private $namespaces; + /** EasyRdf\Graph graph */ + private $graph; public function __construct($config_name='/../config.ttl') { @@ -124,12 +126,12 @@ private function initializeNamespaces() { public function getLanguages() { $languageResources = $this->getResource()->allResources('skosmos:languages'); - if ($languageResources) { + if (!is_null($languageResources) && !empty($languageResources)) { $languages = array(); foreach ($languageResources as $idx => $languageResource) { $languageName = $languageResource->getLiteral('emptyns:name'); $languageValue = $languageResource->getLiteral('emptyns:value'); - if ($languageName and $languageValue) { + if ($languageName && $languageValue) { $languages[$languageName->getValue()] = $languageValue->getValue(); } } From 89cae46c30417d4a39ca4f10627aae58e540cc11 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Mon, 4 Jun 2018 23:31:16 +1200 Subject: [PATCH 100/173] Remove unused graph variable from Model --- model/Model.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/model/Model.php b/model/Model.php index eadaf5267..f18bbe2c3 100644 --- a/model/Model.php +++ b/model/Model.php @@ -7,8 +7,6 @@ */ class Model { - /** EasyRdf\Graph graph instance */ - private $graph; /** cache for Vocabulary objects */ private $allVocabularies = null; /** cache for Vocabulary objects */ From 8287a165aab25219080753f9b5941290d65b477f Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Mon, 4 Jun 2018 23:52:28 +1200 Subject: [PATCH 101/173] Use a list for skosmos:languages --- config.ttl.dist | 8 +++++--- model/GlobalConfig.php | 4 ++-- tests/jenatestconfig.ttl | 2 +- tests/testconfig.ttl | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/config.ttl.dist b/config.ttl.dist index ae67377d0..8c6be260b 100644 --- a/config.ttl.dist +++ b/config.ttl.dist @@ -32,9 +32,11 @@ # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. # skosmos:baseHref "http://localhost/Skosmos/" ; # interface languages available, and the corresponding system locales - skosmos:languages [ :name "fi" ; :value "fi_FI.utf8" ] , - [ :name "sv" ; :value "sv_SE.utf8" ] , - [ :name "en" ; :value "en_GB.utf8" ] ; + skosmos:languages ( + [ :name "fi" ; :value "fi_FI.utf8" ] + [ :name "sv" ; :value "sv_SE.utf8" ] + [ :name "en" ; :value "en_GB.utf8" ] + ) ; # how many results (maximum) to load at a time on the search results page skosmos:searchResultsSize 20 ; # how many items (maximum) to retrieve in transitive property queries diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index 2ffbf777b..87ca12ed4 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -125,10 +125,10 @@ private function initializeNamespaces() { */ public function getLanguages() { - $languageResources = $this->getResource()->allResources('skosmos:languages'); + $languageResources = $this->getResource()->getResource('skosmos:languages'); if (!is_null($languageResources) && !empty($languageResources)) { $languages = array(); - foreach ($languageResources as $idx => $languageResource) { + foreach ($languageResources as $languageResource) { $languageName = $languageResource->getLiteral('emptyns:name'); $languageValue = $languageResource->getLiteral('emptyns:value'); if ($languageName && $languageValue) { diff --git a/tests/jenatestconfig.ttl b/tests/jenatestconfig.ttl index 27b0cdbc4..a8f998ee5 100644 --- a/tests/jenatestconfig.ttl +++ b/tests/jenatestconfig.ttl @@ -35,7 +35,7 @@ # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. # skosmos:baseHref "http://localhost/Skosmos/" ; # interface languages available, and the corresponding system locales - skosmos:languages [ :name "en" ; :value "en_GB.utf8" ] ; + skosmos:languages ( [ :name "en" ; :value "en_GB.utf8" ] ) ; # how many results (maximum) to load at a time on the search results page skosmos:searchResultsSize 20 ; # how many items (maximum) to retrieve in transitive property queries diff --git a/tests/testconfig.ttl b/tests/testconfig.ttl index aecc6195f..ff1c19f04 100644 --- a/tests/testconfig.ttl +++ b/tests/testconfig.ttl @@ -35,7 +35,7 @@ # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. # skosmos:baseHref "http://localhost/Skosmos/" ; # interface languages available, and the corresponding system locales - skosmos:languages [ :name "en" ; :value "en_GB.utf8" ] ; + skosmos:languages ( [ :name "en" ; :value "en_GB.utf8" ] ) ; # how many results (maximum) to load at a time on the search results page skosmos:searchResultsSize 20 ; # how many items (maximum) to retrieve in transitive property queries From aee8384268779abae8d7d4052bc656be0c3fc6a3 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Tue, 5 Jun 2018 09:42:06 +0300 Subject: [PATCH 102/173] add skosmos:globalPlugins example which was forgotten in PR #769 --- config.ttl.dist | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config.ttl.dist b/config.ttl.dist index 8c6be260b..e7fab3d8f 100644 --- a/config.ttl.dist +++ b/config.ttl.dist @@ -62,7 +62,9 @@ # whether to enable the spam honey pot or not, enabled by default skosmos:uiHoneypotEnabled true ; # default time a user must wait before submitting a form - skosmos:uiHoneypotTime 5 . + skosmos:uiHoneypotTime 5 ; + # plugins to activate for the whole installation (including all vocabularies) + skosmos:globalPlugins "" . # Skosmos vocabularies @@ -123,4 +125,4 @@ mdrtype:THESAURUS a skos:Concept ; mdrtype:ONTOLOGY a skos:Concept ; skos:prefLabel "Онтология"@bg, "Ontologie"@cs, "Ontologi"@da, "Ontologie"@de, "Οντολογία"@el, "Ontology"@en, "Ontoloogia"@et, "Ontologia"@fi, "Ontologie"@fr, "Ontologija"@hr, "Ontológia"@hu, "Ontologia"@it, "Ontoloģija"@lv, "Ontologija"@lt, "Ontoloġija"@mt, "Ontologie"@nl, "Ontologi"@no, "Struktura pojęciowa"@pl, "Ontologia"@pt, "Ontologie"@ro, "Ontológia"@sk, "Ontologija"@sl, "Ontología"@es, "Ontologi"@sv -. \ No newline at end of file +. From 2d2826816bb9cf0c5d7c8e757cd4a11875083ead Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Tue, 5 Jun 2018 10:29:46 +0300 Subject: [PATCH 103/173] Use RDFS properties for language settings. Fixes #772 --- config.ttl.dist | 6 +++--- model/GlobalConfig.php | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/config.ttl.dist b/config.ttl.dist index e7fab3d8f..3bd0204b8 100644 --- a/config.ttl.dist +++ b/config.ttl.dist @@ -33,9 +33,9 @@ # skosmos:baseHref "http://localhost/Skosmos/" ; # interface languages available, and the corresponding system locales skosmos:languages ( - [ :name "fi" ; :value "fi_FI.utf8" ] - [ :name "sv" ; :value "sv_SE.utf8" ] - [ :name "en" ; :value "en_GB.utf8" ] + [ rdfs:label "fi" ; rdf:value "fi_FI.utf8" ] + [ rdfs:label "sv" ; rdf:value "sv_SE.utf8" ] + [ rdfs:label "en" ; rdf:value "en_GB.utf8" ] ) ; # how many results (maximum) to load at a time on the search results page skosmos:searchResultsSize 20 ; diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index 87ca12ed4..efe3f488f 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -60,16 +60,12 @@ private function initializeConfig() $this->graph = $this->cache->fetch($key); $this->namespaces = $this->cache->fetch($nskey); if ($this->graph === false || $this->namespaces === false) { // was not found in cache - # EasyRDF appears to prepend the file location# to the nodes without a namespace - EasyRdf\RdfNamespace::set('emptyns', $this->filePath . '#'); $this->parseConfig($this->filePath); $this->cache->store($key, $this->graph); $this->cache->store($nskey, $this->namespaces); } // @codeCoverageIgnoreEnd } else { // APC not available, parse on every request - # EasyRDF appears to prepend the file location# to the nodes without a namespace - EasyRdf\RdfNamespace::set('emptyns', $this->filePath . '#'); $this->parseConfig($this->filePath); } @@ -129,8 +125,8 @@ public function getLanguages() if (!is_null($languageResources) && !empty($languageResources)) { $languages = array(); foreach ($languageResources as $languageResource) { - $languageName = $languageResource->getLiteral('emptyns:name'); - $languageValue = $languageResource->getLiteral('emptyns:value'); + $languageName = $languageResource->getLiteral('rdfs:label'); + $languageValue = $languageResource->getLiteral('rdf:value'); if ($languageName && $languageValue) { $languages[$languageName->getValue()] = $languageValue->getValue(); } From c68a9715ced03c17906299f421fe97b27047566c Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Tue, 5 Jun 2018 10:47:35 +0300 Subject: [PATCH 104/173] Fix test config for #772 --- tests/testconfig.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testconfig.ttl b/tests/testconfig.ttl index ff1c19f04..2842ccaaa 100644 --- a/tests/testconfig.ttl +++ b/tests/testconfig.ttl @@ -35,7 +35,7 @@ # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. # skosmos:baseHref "http://localhost/Skosmos/" ; # interface languages available, and the corresponding system locales - skosmos:languages ( [ :name "en" ; :value "en_GB.utf8" ] ) ; + skosmos:languages ( [ rdfs:label "en" ; rdf:value "en_GB.utf8" ] ) ; # how many results (maximum) to load at a time on the search results page skosmos:searchResultsSize 20 ; # how many items (maximum) to retrieve in transitive property queries From 73fd33d6669c7370f037601216576eef1c244b46 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Thu, 7 Jun 2018 23:53:14 +1200 Subject: [PATCH 105/173] Replace PHP explode function call by a Turtle list for globalPlugins --- model/GlobalConfig.php | 9 ++++++++- model/PluginRegister.php | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index efe3f488f..b0d7fadd7 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -298,7 +298,14 @@ public function getBaseHref() */ public function getGlobalPlugins() { - return explode(' ', $this->getLiteral('skosmos:globalPlugins', null)); + $globalPlugins = array(); + $globalPluginsResource = $this->getResource()->getResource("skosmos:globalPlugins"); + if ($globalPluginsResource) { + foreach ($globalPluginsResource as $resource) { + $globalPlugins[] = $resource->getValue(); + } + } + return $globalPlugins; } /** diff --git a/model/PluginRegister.php b/model/PluginRegister.php index e54a915cd..b0583835b 100644 --- a/model/PluginRegister.php +++ b/model/PluginRegister.php @@ -130,7 +130,7 @@ public function getTemplates($names=null) { } /** - * Returns an array of javascript function names to call when loading a new concept + * Returns an array of javascript function names to call when loading pages * @return array */ public function getCallbacks() { From b89c916804d353ebdab804eae3974b183d5e958b Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Fri, 8 Jun 2018 22:32:09 +1200 Subject: [PATCH 106/173] Include unit test for new globalPlugins with list, and update distributed configuration file --- config.ttl.dist | 2 +- tests/GlobalConfigTest.php | 8 ++++++++ tests/testconfig.ttl | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/config.ttl.dist b/config.ttl.dist index 3bd0204b8..f9623890e 100644 --- a/config.ttl.dist +++ b/config.ttl.dist @@ -64,7 +64,7 @@ # default time a user must wait before submitting a form skosmos:uiHoneypotTime 5 ; # plugins to activate for the whole installation (including all vocabularies) - skosmos:globalPlugins "" . + skosmos:globalPlugins () . # Skosmos vocabularies diff --git a/tests/GlobalConfigTest.php b/tests/GlobalConfigTest.php index 9e0d12512..570ec92b0 100644 --- a/tests/GlobalConfigTest.php +++ b/tests/GlobalConfigTest.php @@ -122,5 +122,13 @@ public function testGetCollationEnabled() { $actual = $this->config->getCollationEnabled(); $this->assertFalse($actual); } + + /** + * @covers GlobalConfig::getGlobalPlugins + */ + public function testGetGlobalPlugins() { + $actual = $this->config->getGlobalPlugins(); + $this->assertEquals(array("alpha", "Bravo", "charlie"), $actual); + } } diff --git a/tests/testconfig.ttl b/tests/testconfig.ttl index 2842ccaaa..89987dbd9 100644 --- a/tests/testconfig.ttl +++ b/tests/testconfig.ttl @@ -61,7 +61,9 @@ # whether to enable the spam honey pot or not, enabled by default skosmos:uiHoneypotEnabled true ; # default time a user must wait before submitting a form - skosmos:uiHoneypotTime 5 . + skosmos:uiHoneypotTime 5 ; + # plugins to activate for the whole installation (including all vocabularies) + skosmos:globalPlugins ("alpha" "Bravo" "charlie") . # Skosmos vocabularies From c03b0c0889a1b866753a1582365b47cb5bc12b50 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Thu, 12 Jul 2018 01:26:26 +1200 Subject: [PATCH 107/173] Issue #771 config migrate tool --- migrate-config.php | 156 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 migrate-config.php diff --git a/migrate-config.php b/migrate-config.php new file mode 100644 index 000000000..4cbb90953 --- /dev/null +++ b/migrate-config.php @@ -0,0 +1,156 @@ + $prefixes, 'config' => $config]; + } + + // print usage if no args + if (!isset($argc) || $argc !== 3) { + echo "\nUsage: php migrate-config config.inc vocabularies.ttl > config.ttl\n\n"; + exit(1); + } + + $configFile = $argv[1]; + $vocabulariesFile = $argv[2]; + + # parse the file into an array with the keys "prefixes" and "config" + $vocabs = parse_vocabularies_file($vocabulariesFile); + + # read the old style config file and use the constants to set variables for use in the template + if (!is_file($configFile)) { + echo "\nInvalid configuration file: $configFile\n\n"; + exit(1); + } + include($configFile); + $endpoint = defined('DEFAULT_ENDPOINT') ? DEFAULT_ENDPOINT : ""; + $dialect = defined('DEFAULT_SPARQL_DIALECT') ? DEFAULT_SPARQL_DIALECT : ""; + $collationEnabled = defined('SPARQL_COLLATION_ENABLED') ? (SPARQL_COLLATION_ENABLED ? "true" : "false") : ""; + $sparqlTimeout = defined('SPARQL_TIMEOUT') ? SPARQL_TIMEOUT : ""; + $httpTimeout = defined('HTTP_TIMEOUT') ? HTTP_TIMEOUT : ""; + $serviceName = defined('SERVICE_NAME') ? SERVICE_NAME : ""; + $baseHref = defined('BASE_HREF') ? BASE_HREF : ""; + $languages = ""; + if (isset($LANGUAGES) && !is_null($LANGUAGES) && is_array($LANGUAGES) && !empty($LANGUAGES)) { + foreach ($LANGUAGES as $code => $name) { + $languages .= " [ rdfs:label \"$code\" ; rdf:value \"$name\" ]\n"; + } + } + $searchResultsSize = defined('SEARCH_RESULTS_SIZE') ? SEARCH_RESULTS_SIZE : ""; + $transitiveLimit = defined('DEFAULT_TRANSITIVE_LIMIT') ? DEFAULT_TRANSITIVE_LIMIT : ""; + $logCaughtExceptions = defined('LOG_CAUGHT_EXCEPTIONS') ? (LOG_CAUGHT_EXCEPTIONS ? "true" : "false") : ""; + $logBrowserConsole = defined('LOG_BROWSER_CONSOLE') ? (LOG_BROWSER_CONSOLE ? "true" : "false") : ""; + $logFileName = defined('LOG_FILE_NAME') ? LOG_FILE_NAME : ""; + $templateCache = defined('TEMPLATE_CACHE') ? TEMPLATE_CACHE : ""; + $customCss = defined('CUSTOM_CSS') ? CUSTOM_CSS : ""; + $feedbackAddress = defined('FEEDBACK_ADDRESS') ? FEEDBACK_ADDRESS : ""; + $feedbackSender = defined('FEEDBACK_SENDER') ? FEEDBACK_SENDER : ""; + $feedbackEnvelopeSender = defined('FEEDBACK_ENVELOPE_SENDER') ? FEEDBACK_ENVELOPE_SENDER : ""; + $uiLanguageDropdown = defined('UI_LANGUAGE_DROPDOWN') ? (UI_LANGUAGE_DROPDOWN ? "true" : "false") : ""; + $uiHoneypotEnabled = defined('UI_HONEYPOT_ENABLED') ? (UI_HONEYPOT_ENABLED ? "true" : "false") : ""; + $uiHoneypotTime = defined('UI_HONEYPOT_TIME') ? UI_HONEYPOT_TIME : ""; + $globalPluginsArray = []; + $globalPlugins = ""; + if (defined('GLOBAL_PLUGINS') && !is_null(GLOBAL_PLUGINS) && is_string(GLOBAL_PLUGINS) && !empty(trim(GLOBAL_PLUGINS))) { + foreach (explode(' ', GLOBAL_PLUGINS) as $pluginName) { + $globalPluginsArray[] = "\"$pluginName\""; + } + $globalPlugins = " " . implode(', ', $globalPluginsArray) . " "; + } + + # print the prefixes + echo $vocabs['prefixes']; + + # print the global config using a string template + echo << Date: Tue, 14 Aug 2018 16:36:43 +1200 Subject: [PATCH 108/173] Replace exit() by exceptions, and fail earlier if invalid mode --- migrate-config.php | 169 ++++++++++++++++++++++----------------------- 1 file changed, 82 insertions(+), 87 deletions(-) diff --git a/migrate-config.php b/migrate-config.php index 4cbb90953..43fc9b8c4 100644 --- a/migrate-config.php +++ b/migrate-config.php @@ -3,95 +3,95 @@ /* Converts old config.inc and vocabulary.ttl configuration files, into new config.ttl */ // run only in cli command line mode -if (php_sapi_name() === "cli") { - /** - * Parse the vocabularies file, and return it in two sections, the - * prefixes, and the rest of the configuration. - * @param string $vocabulariesFile vocabularies file location - */ - function parse_vocabularies_file($vocabulariesFile) - { - if (!is_file($vocabulariesFile)) { - echo "\nInvalid vocabularies file: $vocabulariesFile\n\n"; - exit(1); - } - $prefixes = ""; - $config = ""; - $handle = fopen($vocabulariesFile, "r"); - if (!$handle) { - echo "\nFailed to open vocabularies file: $vocabulariesFile\n\n"; - exit(1); - } - $prefixPrefix = '@prefix'; - while (($line = fgets($handle)) !== false) { - if ($prefixPrefix === substr(trim($line), 0, strlen($prefixPrefix))) { - $prefixes .= "$line"; - } else { - $config .= "$line"; - } +if (php_sapi_name() !== "cli") { + throw new \Exception("This tool can run only in command line mode!"); +} + +/** + * Parse the vocabularies file, and return it in two sections, the + * prefixes, and the rest of the configuration. + * @param string $vocabulariesFile vocabularies file location + * @return array + */ +function parse_vocabularies_file($vocabulariesFile) +{ + if (!is_file($vocabulariesFile)) { + throw new \Exception("Invalid vocabularies file: $vocabulariesFile"); + } + $prefixes = ""; + $config = ""; + $handle = fopen($vocabulariesFile, "r"); + if (!$handle) { + throw new \Exception("Failed to open vocabularies file: $vocabulariesFile"); + } + $prefixPrefix = '@prefix'; + while (($line = fgets($handle)) !== false) { + if ($prefixPrefix === substr(trim($line), 0, strlen($prefixPrefix))) { + $prefixes .= "$line"; + } else { + $config .= "$line"; } - fclose($handle); - return ["prefixes" => $prefixes, 'config' => $config]; } + fclose($handle); + return ["prefixes" => $prefixes, 'config' => $config]; +} - // print usage if no args - if (!isset($argc) || $argc !== 3) { - echo "\nUsage: php migrate-config config.inc vocabularies.ttl > config.ttl\n\n"; - exit(1); - } +// print usage if no args +if (!isset($argc) || $argc !== 3) { + throw new \Exception("Usage: php migrate-config config.inc vocabularies.ttl > config.ttl"); +} - $configFile = $argv[1]; - $vocabulariesFile = $argv[2]; +$configFile = $argv[1]; +$vocabulariesFile = $argv[2]; - # parse the file into an array with the keys "prefixes" and "config" - $vocabs = parse_vocabularies_file($vocabulariesFile); +# parse the file into an array with the keys "prefixes" and "config" +$vocabs = parse_vocabularies_file($vocabulariesFile); - # read the old style config file and use the constants to set variables for use in the template - if (!is_file($configFile)) { - echo "\nInvalid configuration file: $configFile\n\n"; - exit(1); - } - include($configFile); - $endpoint = defined('DEFAULT_ENDPOINT') ? DEFAULT_ENDPOINT : ""; - $dialect = defined('DEFAULT_SPARQL_DIALECT') ? DEFAULT_SPARQL_DIALECT : ""; - $collationEnabled = defined('SPARQL_COLLATION_ENABLED') ? (SPARQL_COLLATION_ENABLED ? "true" : "false") : ""; - $sparqlTimeout = defined('SPARQL_TIMEOUT') ? SPARQL_TIMEOUT : ""; - $httpTimeout = defined('HTTP_TIMEOUT') ? HTTP_TIMEOUT : ""; - $serviceName = defined('SERVICE_NAME') ? SERVICE_NAME : ""; - $baseHref = defined('BASE_HREF') ? BASE_HREF : ""; - $languages = ""; - if (isset($LANGUAGES) && !is_null($LANGUAGES) && is_array($LANGUAGES) && !empty($LANGUAGES)) { - foreach ($LANGUAGES as $code => $name) { - $languages .= " [ rdfs:label \"$code\" ; rdf:value \"$name\" ]\n"; - } +# read the old style config file and use the constants to set variables for use in the template +if (!is_file($configFile)) { + throw new \Exception("Invalid configuration file: $configFile"); +} +include($configFile); +$endpoint = defined('DEFAULT_ENDPOINT') ? DEFAULT_ENDPOINT : ""; +$dialect = defined('DEFAULT_SPARQL_DIALECT') ? DEFAULT_SPARQL_DIALECT : ""; +$collationEnabled = defined('SPARQL_COLLATION_ENABLED') ? (SPARQL_COLLATION_ENABLED ? "true" : "false") : ""; +$sparqlTimeout = defined('SPARQL_TIMEOUT') ? SPARQL_TIMEOUT : ""; +$httpTimeout = defined('HTTP_TIMEOUT') ? HTTP_TIMEOUT : ""; +$serviceName = defined('SERVICE_NAME') ? SERVICE_NAME : ""; +$baseHref = defined('BASE_HREF') ? BASE_HREF : ""; +$languages = ""; +if (isset($LANGUAGES) && !is_null($LANGUAGES) && is_array($LANGUAGES) && !empty($LANGUAGES)) { + foreach ($LANGUAGES as $code => $name) { + $languages .= " [ rdfs:label \"$code\" ; rdf:value \"$name\" ]\n"; } - $searchResultsSize = defined('SEARCH_RESULTS_SIZE') ? SEARCH_RESULTS_SIZE : ""; - $transitiveLimit = defined('DEFAULT_TRANSITIVE_LIMIT') ? DEFAULT_TRANSITIVE_LIMIT : ""; - $logCaughtExceptions = defined('LOG_CAUGHT_EXCEPTIONS') ? (LOG_CAUGHT_EXCEPTIONS ? "true" : "false") : ""; - $logBrowserConsole = defined('LOG_BROWSER_CONSOLE') ? (LOG_BROWSER_CONSOLE ? "true" : "false") : ""; - $logFileName = defined('LOG_FILE_NAME') ? LOG_FILE_NAME : ""; - $templateCache = defined('TEMPLATE_CACHE') ? TEMPLATE_CACHE : ""; - $customCss = defined('CUSTOM_CSS') ? CUSTOM_CSS : ""; - $feedbackAddress = defined('FEEDBACK_ADDRESS') ? FEEDBACK_ADDRESS : ""; - $feedbackSender = defined('FEEDBACK_SENDER') ? FEEDBACK_SENDER : ""; - $feedbackEnvelopeSender = defined('FEEDBACK_ENVELOPE_SENDER') ? FEEDBACK_ENVELOPE_SENDER : ""; - $uiLanguageDropdown = defined('UI_LANGUAGE_DROPDOWN') ? (UI_LANGUAGE_DROPDOWN ? "true" : "false") : ""; - $uiHoneypotEnabled = defined('UI_HONEYPOT_ENABLED') ? (UI_HONEYPOT_ENABLED ? "true" : "false") : ""; - $uiHoneypotTime = defined('UI_HONEYPOT_TIME') ? UI_HONEYPOT_TIME : ""; - $globalPluginsArray = []; - $globalPlugins = ""; - if (defined('GLOBAL_PLUGINS') && !is_null(GLOBAL_PLUGINS) && is_string(GLOBAL_PLUGINS) && !empty(trim(GLOBAL_PLUGINS))) { - foreach (explode(' ', GLOBAL_PLUGINS) as $pluginName) { - $globalPluginsArray[] = "\"$pluginName\""; - } - $globalPlugins = " " . implode(', ', $globalPluginsArray) . " "; +} +$searchResultsSize = defined('SEARCH_RESULTS_SIZE') ? SEARCH_RESULTS_SIZE : ""; +$transitiveLimit = defined('DEFAULT_TRANSITIVE_LIMIT') ? DEFAULT_TRANSITIVE_LIMIT : ""; +$logCaughtExceptions = defined('LOG_CAUGHT_EXCEPTIONS') ? (LOG_CAUGHT_EXCEPTIONS ? "true" : "false") : ""; +$logBrowserConsole = defined('LOG_BROWSER_CONSOLE') ? (LOG_BROWSER_CONSOLE ? "true" : "false") : ""; +$logFileName = defined('LOG_FILE_NAME') ? LOG_FILE_NAME : ""; +$templateCache = defined('TEMPLATE_CACHE') ? TEMPLATE_CACHE : ""; +$customCss = defined('CUSTOM_CSS') ? CUSTOM_CSS : ""; +$feedbackAddress = defined('FEEDBACK_ADDRESS') ? FEEDBACK_ADDRESS : ""; +$feedbackSender = defined('FEEDBACK_SENDER') ? FEEDBACK_SENDER : ""; +$feedbackEnvelopeSender = defined('FEEDBACK_ENVELOPE_SENDER') ? FEEDBACK_ENVELOPE_SENDER : ""; +$uiLanguageDropdown = defined('UI_LANGUAGE_DROPDOWN') ? (UI_LANGUAGE_DROPDOWN ? "true" : "false") : ""; +$uiHoneypotEnabled = defined('UI_HONEYPOT_ENABLED') ? (UI_HONEYPOT_ENABLED ? "true" : "false") : ""; +$uiHoneypotTime = defined('UI_HONEYPOT_TIME') ? UI_HONEYPOT_TIME : ""; +$globalPluginsArray = []; +$globalPlugins = ""; +if (defined('GLOBAL_PLUGINS') && !is_null(GLOBAL_PLUGINS) && is_string(GLOBAL_PLUGINS) && !empty(trim(GLOBAL_PLUGINS))) { + foreach (explode(' ', GLOBAL_PLUGINS) as $pluginName) { + $globalPluginsArray[] = "\"$pluginName\""; } + $globalPlugins = " " . implode(', ', $globalPluginsArray) . " "; +} - # print the prefixes - echo $vocabs['prefixes']; +# print the prefixes +echo $vocabs['prefixes']; - # print the global config using a string template - echo << Date: Tue, 14 Aug 2018 20:29:01 +1200 Subject: [PATCH 109/173] Leave values not defined as comments --- migrate-config.php | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/migrate-config.php b/migrate-config.php index 43fc9b8c4..0f31a9cc0 100644 --- a/migrate-config.php +++ b/migrate-config.php @@ -52,32 +52,32 @@ function parse_vocabularies_file($vocabulariesFile) throw new \Exception("Invalid configuration file: $configFile"); } include($configFile); -$endpoint = defined('DEFAULT_ENDPOINT') ? DEFAULT_ENDPOINT : ""; -$dialect = defined('DEFAULT_SPARQL_DIALECT') ? DEFAULT_SPARQL_DIALECT : ""; -$collationEnabled = defined('SPARQL_COLLATION_ENABLED') ? (SPARQL_COLLATION_ENABLED ? "true" : "false") : ""; -$sparqlTimeout = defined('SPARQL_TIMEOUT') ? SPARQL_TIMEOUT : ""; -$httpTimeout = defined('HTTP_TIMEOUT') ? HTTP_TIMEOUT : ""; -$serviceName = defined('SERVICE_NAME') ? SERVICE_NAME : ""; -$baseHref = defined('BASE_HREF') ? BASE_HREF : ""; +$endpoint = defined('DEFAULT_ENDPOINT') ? DEFAULT_ENDPOINT : "?"; +$dialect = defined('DEFAULT_SPARQL_DIALECT') ? DEFAULT_SPARQL_DIALECT : "?"; +$collationEnabled = defined('SPARQL_COLLATION_ENABLED') ? (SPARQL_COLLATION_ENABLED ? "true" : "false") : "?"; +$sparqlTimeout = defined('SPARQL_TIMEOUT') ? SPARQL_TIMEOUT : "?"; +$httpTimeout = defined('HTTP_TIMEOUT') ? HTTP_TIMEOUT : "?"; +$serviceName = defined('SERVICE_NAME') ? SERVICE_NAME : "?"; +$baseHref = defined('BASE_HREF') ? BASE_HREF : "?"; $languages = ""; if (isset($LANGUAGES) && !is_null($LANGUAGES) && is_array($LANGUAGES) && !empty($LANGUAGES)) { foreach ($LANGUAGES as $code => $name) { $languages .= " [ rdfs:label \"$code\" ; rdf:value \"$name\" ]\n"; } } -$searchResultsSize = defined('SEARCH_RESULTS_SIZE') ? SEARCH_RESULTS_SIZE : ""; -$transitiveLimit = defined('DEFAULT_TRANSITIVE_LIMIT') ? DEFAULT_TRANSITIVE_LIMIT : ""; -$logCaughtExceptions = defined('LOG_CAUGHT_EXCEPTIONS') ? (LOG_CAUGHT_EXCEPTIONS ? "true" : "false") : ""; -$logBrowserConsole = defined('LOG_BROWSER_CONSOLE') ? (LOG_BROWSER_CONSOLE ? "true" : "false") : ""; -$logFileName = defined('LOG_FILE_NAME') ? LOG_FILE_NAME : ""; -$templateCache = defined('TEMPLATE_CACHE') ? TEMPLATE_CACHE : ""; -$customCss = defined('CUSTOM_CSS') ? CUSTOM_CSS : ""; -$feedbackAddress = defined('FEEDBACK_ADDRESS') ? FEEDBACK_ADDRESS : ""; -$feedbackSender = defined('FEEDBACK_SENDER') ? FEEDBACK_SENDER : ""; -$feedbackEnvelopeSender = defined('FEEDBACK_ENVELOPE_SENDER') ? FEEDBACK_ENVELOPE_SENDER : ""; -$uiLanguageDropdown = defined('UI_LANGUAGE_DROPDOWN') ? (UI_LANGUAGE_DROPDOWN ? "true" : "false") : ""; -$uiHoneypotEnabled = defined('UI_HONEYPOT_ENABLED') ? (UI_HONEYPOT_ENABLED ? "true" : "false") : ""; -$uiHoneypotTime = defined('UI_HONEYPOT_TIME') ? UI_HONEYPOT_TIME : ""; +$searchResultsSize = defined('SEARCH_RESULTS_SIZE') ? SEARCH_RESULTS_SIZE : "?"; +$transitiveLimit = defined('DEFAULT_TRANSITIVE_LIMIT') ? DEFAULT_TRANSITIVE_LIMIT : "?"; +$logCaughtExceptions = defined('LOG_CAUGHT_EXCEPTIONS') ? (LOG_CAUGHT_EXCEPTIONS ? "true" : "false") : "?"; +$logBrowserConsole = defined('LOG_BROWSER_CONSOLE') ? (LOG_BROWSER_CONSOLE ? "true" : "false") : "?"; +$logFileName = defined('LOG_FILE_NAME') ? LOG_FILE_NAME : "?"; +$templateCache = defined('TEMPLATE_CACHE') ? TEMPLATE_CACHE : "?"; +$customCss = defined('CUSTOM_CSS') ? CUSTOM_CSS : "?"; +$feedbackAddress = defined('FEEDBACK_ADDRESS') ? FEEDBACK_ADDRESS : "?"; +$feedbackSender = defined('FEEDBACK_SENDER') ? FEEDBACK_SENDER : "?"; +$feedbackEnvelopeSender = defined('FEEDBACK_ENVELOPE_SENDER') ? FEEDBACK_ENVELOPE_SENDER : "?"; +$uiLanguageDropdown = defined('UI_LANGUAGE_DROPDOWN') ? (UI_LANGUAGE_DROPDOWN ? "true" : "false") : "?"; +$uiHoneypotEnabled = defined('UI_HONEYPOT_ENABLED') ? (UI_HONEYPOT_ENABLED ? "true" : "false") : "?"; +$uiHoneypotTime = defined('UI_HONEYPOT_TIME') ? UI_HONEYPOT_TIME : "?"; $globalPluginsArray = []; $globalPlugins = ""; if (defined('GLOBAL_PLUGINS') && !is_null(GLOBAL_PLUGINS) && is_string(GLOBAL_PLUGINS) && !empty(trim(GLOBAL_PLUGINS))) { @@ -91,7 +91,7 @@ function parse_vocabularies_file($vocabulariesFile) echo $vocabs['prefixes']; # print the global config using a string template -echo << Date: Fri, 27 Apr 2018 22:32:37 +1200 Subject: [PATCH 110/173] Fix search with double quotes --- model/sparql/GenericSparql.php | 4 ++-- tests/GenericSparqlTest.php | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index d268d1a09..575ce5c60 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -890,8 +890,8 @@ protected function generateConceptSearchQueryInner($term, $lang, $searchLang, $p { $valuesProp = $this->formatValues('?prop', $props); $textcond = $this->generateConceptSearchQueryCondition($term, $searchLang); - $rawterm = str_replace('\\', '\\\\', str_replace('*', '', $term)); - + + $rawterm = str_replace(array('\\', '*', '"'), array('\\\\', '', '\"'), $term); // graph clause, if necessary $graphClause = $filterGraph != '' ? 'GRAPH ?graph' : ''; diff --git a/tests/GenericSparqlTest.php b/tests/GenericSparqlTest.php index 8f5c20b48..7367c8772 100644 --- a/tests/GenericSparqlTest.php +++ b/tests/GenericSparqlTest.php @@ -597,6 +597,23 @@ public function testQueryConceptsAsteriskBeforeAndAfterTerm() $this->assertContains('bass', $match['prefLabel'], '',true); } + /** + * @covers GenericSparql::queryConcepts + * @covers GenericSparql::generateConceptSearchQueryCondition + * @covers GenericSparql::generateConceptSearchQueryInner + * @covers GenericSparql::generateConceptSearchQuery + * @covers GenericSparql::transformConceptSearchResults + * @covers GenericSparql::transformConceptSearchResult + * @covers GenericSparql::shortenUri + */ + public function testQueryConceptsDoubleQuotesTerm() + { + $voc = $this->model->getVocabulary('test'); + $this->params->method('getSearchTerm')->will($this->returnValue('"')); + $actual = $this->sparql->queryConcepts(array($voc), null, null, $this->params); + $this->assertEquals(0, sizeof($actual)); + } + /** * @covers GenericSparql::queryLabel * @covers GenericSparql::generateLabelQuery From 20f0df1f05ac57147ee6aa7e006529a2ad357a8f Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Wed, 22 Aug 2018 16:07:28 +0300 Subject: [PATCH 111/173] Upgrade Travis config to use newest Fuseki 3.8.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 601c47626..52cd3e2b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ env: global: - CC_TEST_REPORTER_ID=fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c matrix: - - FUSEKI_VERSION=3.7.0 + - FUSEKI_VERSION=3.8.0 - FUSEKI_VERSION=SNAPSHOT matrix: exclude: From 06b8b20add921f2ed2801902560d5a9e1b10ebb0 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Wed, 22 Aug 2018 16:09:17 +0300 Subject: [PATCH 112/173] Use Fuseki 3.8.0 by default for tests --- tests/init_fuseki.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/init_fuseki.sh b/tests/init_fuseki.sh index 2df5e1e44..6381ab9e7 100755 --- a/tests/init_fuseki.sh +++ b/tests/init_fuseki.sh @@ -1,7 +1,7 @@ #!/bin/bash # Note: This script must be sourced from within bash, e.g. ". init_fuseki.sh" -FUSEKI_VERSION=${FUSEKI_VERSION:-3.7.0} +FUSEKI_VERSION=${FUSEKI_VERSION:-3.8.0} if [ "$FUSEKI_VERSION" = "SNAPSHOT" ]; then # find out the latest snapshot version and its download URL by parsing Apache directory listings From b9ca601f27db1039e773dd039fbd17743c5381dd Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Fri, 24 Aug 2018 12:52:40 +0300 Subject: [PATCH 113/173] fix getVersion when on a branch with no tags available in recent history --- model/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/Model.php b/model/Model.php index f18bbe2c3..1c412baba 100644 --- a/model/Model.php +++ b/model/Model.php @@ -76,7 +76,7 @@ public function getVersion() { $ver = null; if (file_exists('.git')) { - $ver = shell_exec('git describe --tags'); + $ver = shell_exec('git describe --tags --always'); } if ($ver === null) { From 854520fd950099e063c3f5fa4ae9dcaf98864f6c Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Fri, 24 Aug 2018 15:18:17 +0300 Subject: [PATCH 114/173] use the dev.finto.fi SPARQL endpoint as default endpoint, to match vocab config --- config.ttl.dist | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config.ttl.dist b/config.ttl.dist index f9623890e..a35aad7c0 100644 --- a/config.ttl.dist +++ b/config.ttl.dist @@ -18,7 +18,9 @@ :config a skosmos:Configuration ; # SPARQL endpoint # a local Fuseki server is usually on localhost:3030 - skosmos:sparqlEndpoint "http://localhost:3030/ds/sparql" ; + #skosmos:sparqlEndpoint "http://localhost:3030/ds/sparql" ; + # use the dev.finto.fi endpoint where the example vocabularies reside + skosmos:sparqlEndpoint ; # sparql-query extension, or "Generic" for plain SPARQL 1.1 # set to "JenaText" instead if you use Fuseki with jena-text index skosmos:sparqlDialect "Generic" ; From d7f3c02352528c30460361e5ea4b8f5113c7facf Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 27 Aug 2018 09:49:14 +0300 Subject: [PATCH 115/173] Disable Travis tests for Fuseki snapshot. There is no longer a Fuseki1 distribution snapshot we could use, after building it was disabled in JENA-1573. --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 52cd3e2b9..4fb9d82d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,17 +24,9 @@ after_script: env: global: - CC_TEST_REPORTER_ID=fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c - matrix: - FUSEKI_VERSION=3.8.0 - - FUSEKI_VERSION=SNAPSHOT matrix: - exclude: - - php: 7.0 - env: FUSEKI_VERSION=SNAPSHOT - - php: 7.2 - env: FUSEKI_VERSION=SNAPSHOT allow_failures: - php: 7.2 - - env: FUSEKI_VERSION=SNAPSHOT notifications: slack: kansalliskirjasto:9mOKu3Vws1CIddF5jqWgXbli From 8a12612dadf29da62784242bff6b8fa1c877c1d1 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 27 Aug 2018 12:38:47 +0300 Subject: [PATCH 116/173] updated German translations. Credit: Jonas Waeber --- .../translations/de/LC_MESSAGES/skosmos.mo | Bin 11458 -> 11378 bytes resource/translations/skosmos_de.po | 173 +++++++----------- 2 files changed, 63 insertions(+), 110 deletions(-) diff --git a/resource/translations/de/LC_MESSAGES/skosmos.mo b/resource/translations/de/LC_MESSAGES/skosmos.mo index 4ccf14eba1e5c5a63876690847dd668538987321..493cff9e99b4c4cbe017ad5cb61b0c36a0ffd07e 100644 GIT binary patch delta 5265 zcma)-dvF!i9mkJActoCprUZdCAqm6~kO(RQ0tE>If&>WADsIS0vgY2saqnItL3@2$ zEf#fsqP1eI@(gL_Vc}WZ$uqCJ#)YNIj{Yl z-}#;2+57CekJe@n9MkU>LwN)pkG2*W^B(-XmA zIdBkG!1rPf<0aXf4rOOH91WL4rWg-a!p(59$+AN#^6Vv80$+!6GI3DhS)8K0`tDOxRnGeZOs2xs+Y}(9+ zTDSo+*IWSc!CV5hgKcsDcBuKgpd5M{%E1?*BDo)G{<|?hf{M_8MiPHbEMi*<^(ZI< zkJ7}UDYjw1dt^a>r~n@|h9 z3w356LwWjnJl^lvyo1A_43CA1P!&{!=0Lr74wRksP)E=L6`>zNOqp#^?{#P6%9BuM z_$t&jdLQb=B4(Asu~6fuLM^lsYMzBT!%#=FE#?lW9q)$PSWn!33Ch6(P?65QOGTmk z1ZrX*R#kflJ8y?_=07AuV~&FOZc3pXuZ!Drp(3{q z%B~N!^RAfJ!>rEs9x5{Y5R}KeptAlcD370m{LFqH+Sy^K57Urw##F;mum+w1^6KaQ# zL4CUa2suvk7F7QiQ2j$rFlHI7hWyM$JZ8h~P!WG4OJxR?H=%YmvMkSWP~YrHP)WED z%JW93(6_;In2P%&s59<{%JN@9eW0F(ioo+wj=uu6u>)~C`xX@${1D24e?b}Oi*+qL z0?KeX)R9bqntuw^0&}1otA|=>9n`!gsCgGa*}E`qXW?YpSHs->|1A}H^a9io?2Fq6 zVPD$s!FBKu)B=kp&0bs$iwyUDEI(chzdnUe}S~nCD9_J>v0ciMQ5P7h!p58%c$LtI3;r?x*MH_ ze57(M`Vp!^E$D2dQjSi|)$)&aU{Q&-b=DCBN|M{+_U-UWq(oYS^uMqf^+9DwAEiRs zL`8|1iaTzE&2jz5@P@eF2D{NjGzg7USg%H>phEdMmGe<8(uZXm8jA|WrE*K55py;i za75n;)a%gnxbG_1g>FW7pj%NR()ziwi|2i4CAu!xlfSzos7GicDnd7*N$6peMpvM% z=s`3XZAV*BKcq4m9i6Kg(-Ctg)ODxKG(Y5-MAxWEIUOxWGf)Lui`FBR>roRbR%3T^ z=&*tP(;M4t(ncM}J-T~D$@0EKPMth;`s8VK&Pg+7o_t!AEG-$IN+(@smY%igOe*R5 z)}PyE6KT(H_i9_b-M5xj^%+vp?6`ib?Xq5LXrtdB|K*8GQht~12-A+2bQ+c{Z*a~` z1xYuYY3gl|@k1LV+-B=L&7Mt1?~I)`ZQ=XAM|X^0 zQ`F)yJ^E<;zW($4F1IZaz2NNaC(om6Pv{)pY}3x_pba;Iv{}7!X*8|OEt?XUc}>lB zV|&JLH4B4uXcLLBP_e-j&)@y)vXZ0nR$eUMoUbgNu~xnM+VVEwMpaWgGWgU;WL)>f8P6qYe-c)?5gX4U2n$!WHM zv(OK{u%|nWZmO&qo%BLy6{pxv@CieW<7dJy&Zi+dPGe{3pknc ztDJ_Q)oTi!W;gAmZKCO`<8V4X>oj_txnEst+)TRFcJ_3)5z_`YnM^3kv14W-IpOl^ zeA^m$EiE>BxvDg)Ly9M)Yvp=t!g?Fqnq2azFz_AS$|okdJ{!dQ-c!L&K8iLKH2XF@ z!qB(+i*mt_IwzKA3vTvY+2$v3;j7pF$3hEii|2cx!p-)q(`tP;W1WRTd!naX!F9Sa zfzxE&rZgr)T`!*iG}}z5!Tb(#D<9PnRZXhw^e2o4QHf5k9R3K> z+(q6>yUDPP50pd5bbAP86xQv=}<9s!L6L0h^v+2n3=vx$56iUIXj zu@;Mu)-Bd5sECRvI-}I0HMVM|<2Y)qt<-82o$=A>SZ$|HmA1~<-~aAjC8%xBbv zdJv9zfOxDD<15JiH0Yk$d1V z@Cm2|o`xsFLy+j258((nkX5w9<6~Ar_18h!IR`3o?QlH23eJRg!>o4p3KfOq5Y!F^ zkB&k=3Toj=kRdY)@y=2EDIuY+=M2UH~QgPMOJ=2K7+dVVzV*TjQ# zDAaF58TbGy5}(8z&bBo^4$5FTl);&C`%Eau>*ID)%mmbT9+bU{dcY3mkyTSs#?A&&A^}K{@yal;QWGBJ?p-ghqZX`fdW0ol2+_%z=tf17xb%0QFsv zjVs%ra(D;SHR^@>@E|OP@5keXe5HjZLd}~EbB3W(vjJ+S7ea05^0<8s)P{CIZQw4b zh-LRv(Zna>j%OiJH-CWo;4e@H{}GQ5#w$563aY;hYDcr73@(FmWNkd|#_WNbcXiyp zHEL(g15{+NFCO@PG+^F^GWhR!ypZi`rzKE3mZm}?=yGD)a;mqFRT1}bH@ zLFImLj^zIlDq84iD9>Mt`EG84F^8cdGKBnSyaXy$Rs6`%5~%SesED*fIl2kTk!?^Z z+!eQbfsQCU9Fn7_gb+Gp?>)Wc?|r}loRhvUJR2cUNJIF#eRf%s@%hYImW zP>~sSax||fW+hZg&xEqO7-r@1GAcUd>!CbOK>p0d{Ag!4LOn$H!bD>v|I_i=C^w@Sm7!`V!?U0kTmt35 z2B=)8Akj6OA=xrFLG?cb*@Jl!u7q#G39y=5-3Y5_uZKFETcI4<2}wcL z?2bDQzybyyhwI>zPz#iB(!^8XX|M_^cQ%wm8F&%Q!WHl%s0}PEi{`C@N@+7x1TKO~ z-4-~8_03Ky^7yAvDR>I%Ivs)v(Z`Trn1SWdAuEGA1M{IASqF7%I-w%51!^PPVqOpB zXb1G2mGq4iA2zBZ|fr>!!5WjidKBvA`Zd%7e}*#fDa02u2JdQM z4U{97#@qpi(0&XmLVZx*y$ogl12_wwFqQa|X0v!|G@%{NrF}Wnf{#J%=tZd9y$5xe z4nsLyJ}t`abf`nQ0BV6oh>zwXI27Ivb)D~p1K?dq^+@SUqvfateFG_CDnE)~R>y3Id*k{ln7cJMQE5g$ME4+-o(Se%SciTRxAVA~ z%0jdT-Ga8Db*KYPLM~d08j#KpH!@e2#1zg!oRO@lrJ`$h8_E~bYX+iuXcJn7y3r4i ziVl^Y)$@_^YNO*(?hry<=gZJ$bOus63+dXbY(=_?Q}RjF=~UT(X6I_r)r+e+EavwH zbXwe54Y#30i;do|+-ID*cHac$L_^iAt(e88vPWaaNrUECG3Tvzv3fJ4ol-1(+ z;phpygS4gacM~?wZ0+mytrk3Pa6B*LwJ{@Yt?`pi!tv8)%{eQqqi2NcC)#1}#M1q* zPb?Y`89F?vC#qylxqm=iIKQl9Y=`Z6mg~uM+Uc~Kx;pGcCT06!Q`xB{`GA^Q-?w`# zJCnBZUEu>|SKz+mxA~dwZinslbY%hyX96}7SS=a9IT@}huM78-j~|==$}};-?INf> z-BS2o`83P3o0HbLj+@%#xXnq2Xps(&{!Flm=%&L{E5?Nl6|0JDkF-@=b#~fXb?FH#>pU(r!PNln)62jY-TlF5%*9>b@#iS5AiomD2`PhpQ`38qsegY^W?bDsWEjFn>up z*0B4}Q_z3;z%l=0c&Y1gx6@{Abiu7!uha26h^!MnUpcO(!|UtqZso0s7XE^DPS)tm<_g=>B zRG{P6-@S0()Z$#wIKfuS=XWALiB>w`GKDWsb>{W=+-i%K(Rw_Ed>xqRGIB)h)*yF! J{oG4x{sVygbmss7 diff --git a/resource/translations/skosmos_de.po b/resource/translations/skosmos_de.po index 0b50ac218..e5d101f01 100644 --- a/resource/translations/skosmos_de.po +++ b/resource/translations/skosmos_de.po @@ -2,14 +2,15 @@ # Translators: # CH_ , 2017 # Joachim Neubert , 2015-2016 +# Jonas Waeber , 2018 # osma , 2015,2017 msgid "" msgstr "" "Project-Id-Version: Skosmos\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-16 10:26+0200\n" -"PO-Revision-Date: 2017-11-21 13:54+0000\n" -"Last-Translator: CH_ \n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" +"Last-Translator: osma \n" "Language-Team: German (http://www.transifex.com/national-library-of-finland/skosmos/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -31,12 +32,12 @@ msgstr "auf Deutsch" #: controller/RestController.php:271 #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:125 msgid "skos:Concept" -msgstr "concept" +msgstr "Konzept" #: controller/RestController.php:280 #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:127 msgid "skos:Collection" -msgstr "Sammlung/Collection" +msgstr "Sammlung" #: model/Concept.php:455 model/Concept.php:475 msgid "skosmos:created" @@ -44,7 +45,7 @@ msgstr "Erstellt" #: model/Concept.php:460 model/Concept.php:462 model/Concept.php:471 msgid "skosmos:modified" -msgstr "Geändert" +msgstr "Geändert am" #: model/VocabularyCategory.php:39 msgid "Vocabularies" @@ -74,7 +75,7 @@ msgstr "Über" #: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:35 #, php-format msgid "All %d results displayed" -msgstr "Alle %d Ergebnisse" +msgstr "%d angezeigte Ergebnisse" #: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:64 #: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:77 @@ -130,7 +131,7 @@ msgstr "Sprache der Inhalte" #: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:732 msgid "Download this concept in SKOS format:" -msgstr "Herunterladen des concepts im SKOS Format:" +msgstr "Herunterladen des Konzepts im SKOS Format:" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:144 msgid "E-mail:" @@ -142,11 +143,11 @@ msgstr "Suche eingeben" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:148 msgid "Enter your e-mail address" -msgstr "Tragen Sie hier bitte Ihre E-Mail Adresse ein" +msgstr "E-Mail Adresse eingeben bitte" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:140 msgid "Enter your name" -msgstr "Tragen Sie hier bitte Ihren Namen ein" +msgstr "Namen eingeben bitte" #: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:900 #: /tmp/cache/587c83c13194c/5c/5c060d2297f64d66beb101ee34831f917ed8d33f97dadeca144430a1561433ec.php:69 @@ -186,7 +187,7 @@ msgstr "Gruppen" #: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:55 #: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:91 msgid "Hier-nav" -msgstr "Baumstruktur" +msgstr "Hierarchie" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:157 msgid "Leave this field blank" @@ -194,7 +195,7 @@ msgstr "Dieses Feld bitte leer lassen" #: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:594 msgid "Limit search" -msgstr "Suche enschränken" +msgstr "Suche einschränken" #: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:31 msgid "Loading" @@ -202,7 +203,7 @@ msgstr "Laden" #: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:27 msgid "Loading more items" -msgstr "Laden weiterer Objekte" +msgstr "Weitere Resultate laden" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:152 msgid "Message:" @@ -219,7 +220,7 @@ msgstr "Keine Ergebnisse" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:103 #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:111 msgid "Not to a specific vocabulary" -msgstr "Nicht zu einem speziellen Vokabular" +msgstr "Nicht zu einem spezifischen Vokabular" #: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:233 msgid "Search" @@ -263,7 +264,7 @@ msgstr "Die Suche ergab keine Ergebnisse." #: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:48 msgid "There is no term for this concept in this language" -msgstr "In dieser Sprache gibt es keinen Begriff für dieses concept." +msgstr "In dieser Sprache gibt es keinen Begriff für dieses Konzept." #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:173 #: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:47 @@ -272,11 +273,11 @@ msgstr "Der Wert ist verpflichtend und darf nicht leer bleiben" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:27 msgid "cc:attributionName" -msgstr "Name für die Nennung des Urhebers" +msgstr "Name des Urhebers" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:29 msgid "cc:attributionUrl" -msgstr "URL für die Nennung des Urhebers" +msgstr "URL des Urhebers" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:25 msgid "cc:license" @@ -296,7 +297,7 @@ msgstr "Konform mit" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:37 msgid "dc:contributor" -msgstr "Mitwirkender" +msgstr "Mitwirkende/r" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:39 msgid "dc:coverage" @@ -308,7 +309,7 @@ msgstr "Erstellt" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:43 msgid "dc:creator" -msgstr "Ersteller" +msgstr "Ersteller/in" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:45 msgid "dc:date" @@ -401,7 +402,7 @@ msgstr "Typ" #: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:36 #: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:256 msgid "deprecated" -msgstr "Dieses concept ist veraltet. Bitte nutzen Sie es nicht mehr zur Beschreibung Ihrer Daten!" +msgstr "Dieses Konzept ist veraltet. Bitte nutzen Sie es nicht mehr zur Beschreibung Ihrer Daten!" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:89 msgid "foaf:homepage" @@ -414,7 +415,7 @@ msgstr "Webseite" #: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:658 #: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:542 msgid "foreign prefLabel help" -msgstr "Zusatzinformationen zum concept in anderen Sprachen" +msgstr "Zusatzinformationen zum Konzept in anderen Sprachen" #: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:660 msgid "foreign prefLabels" @@ -430,15 +431,15 @@ msgstr "von allen" #: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:293 #: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:87 msgid "hierarchy-disabled-help" -msgstr "Die oberste Hierarchieebene kann in diesem Vokabular nicht angezeigt werden." +msgstr "In diesem Vokabular kann die oberste Hierarchieebene nicht angezeigt werden." #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:93 msgid "isothes:ConceptGroup" -msgstr "Gruppe von concepts" +msgstr "Gruppe von Konzepten" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:97 msgid "isothes:ThesaurusArray" -msgstr "Array aus concepts" +msgstr "Array von Geschwisterkonzepten" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:99 msgid "isothes:broaderGeneric" @@ -466,11 +467,11 @@ msgstr "Unterbegriffe (partitiv)" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:95 msgid "isothes:superGroup" -msgstr "Obergruppe" +msgstr "Übergruppe" #: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:66 msgid "layout designed by Hahmo" -msgstr "Layout erstellt durch Hahmo Design" +msgstr "Layout erstellt von Hahmo Design" #: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:74 msgid "limited to group" @@ -482,7 +483,7 @@ msgstr "beschränkt auf Elternobjekt" #: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:81 msgid "limited to scheme" -msgstr "" +msgstr "begrenzt auf Schema" #: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:29 msgid "limited to type" @@ -490,7 +491,7 @@ msgstr "beschränkt auf Typ" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:113 msgid "owl:sameAs" -msgstr "Äquivalente concepts" +msgstr "Äquivalente Konzepte" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:111 msgid "owl:versionInfo" @@ -502,7 +503,7 @@ msgstr "Typ" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:117 msgid "rdf:type_help" -msgstr "Typ" +msgstr "Typ der Entität" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:123 msgid "rdfs:comment" @@ -518,31 +519,31 @@ msgstr "Siehe auch" #: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:43 msgid "selected" -msgstr "Ausgewählt" +msgstr "ausgewählt" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:143 msgid "skos:altLabel" -msgstr "" +msgstr "Eingabe Begriffe" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:179 msgid "skos:altLabel_help" -msgstr "Alternative Beschreibung für das concept." +msgstr "Alternative Beschreibung des Konzepts." #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:133 msgid "skos:broadMatch" -msgstr "Vergleichbares concept Objekt" +msgstr "Vergleichbares Konzept" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:191 msgid "skos:broadMatch_help" -msgstr "Vergleichbares concept Objekt in anderem Vokabular." +msgstr "Vergleichbares Konzept eines anderen Vokabulars." #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:129 msgid "skos:broader" -msgstr "Oberbegriff" +msgstr "Übergeordnetes Konzept" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:171 msgid "skos:broader_help" -msgstr "Übergeordnetes concept Objekt" +msgstr "Übergeordnetes Konzept" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:169 msgid "skos:changeNote" @@ -550,11 +551,11 @@ msgstr "Hinweis zur Änderung" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:147 msgid "skos:closeMatch" -msgstr "Ähnliches concept Objekt" +msgstr "Ähnliches Konzept" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:189 msgid "skos:closeMatch_help" -msgstr "Ähnliches concept Objekt in anderem Vokabular." +msgstr "Ähnliches Konzept eines anderen Vokabulars." #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:161 msgid "skos:definition" @@ -562,7 +563,7 @@ msgstr "Definition" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:185 msgid "skos:definition_help" -msgstr "Genaue Beschreibung der Intention zur Publikation des concept Objekts" +msgstr "Eine genaue Erklärung zur beabsichtigten Bedeutung eines Konzepts" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:167 msgid "skos:editorialNote" @@ -570,11 +571,11 @@ msgstr "Hinweis des Verfassers" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:145 msgid "skos:exactMatch" -msgstr "Identisches concept Objekt" +msgstr "Identisches Konzept" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:187 msgid "skos:exactMatch_help" -msgstr "Identisches concept Objekt in anderem Vokabular." +msgstr "Identisches Konzept eines anderen Vokabulars." #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:163 msgid "skos:example" @@ -582,7 +583,7 @@ msgstr "Beispiel" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:155 msgid "skos:hasTopConcept" -msgstr "Hat übergeordnetes concept Objekt" +msgstr "Hat ein übergeordnetes Konzept" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:165 msgid "skos:historyNote" @@ -590,7 +591,7 @@ msgstr "Hinweis zur Historie" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:151 msgid "skos:inScheme" -msgstr "Schema des concept Objekts" +msgstr "Konzept Schema" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:149 msgid "skos:member" @@ -598,31 +599,31 @@ msgstr "Mitglieder der Gruppe" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:181 msgid "skos:member_help" -msgstr "Mitglieder der Gruppe." +msgstr "Mitglieder der Gruppe" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:135 msgid "skos:narrowMatch" -msgstr "Untergeordnete passende concept Objekte" +msgstr "Untergeordnete passende Konzepte" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:193 msgid "skos:narrowMatch_help" -msgstr "Untergeordnete passende concept Objekte aus anderem Vokabular." +msgstr "Untergeordnete passende Konzepte eines anderen Vokabulars." #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:131 msgid "skos:narrower" -msgstr "Untergeordnete concept Objekte" +msgstr "Untergeordnete Konzepte" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:173 msgid "skos:narrower_help" -msgstr "Untergeordnete concept Objekte" +msgstr "Untergeordnete Konzepte." #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:157 msgid "skos:note" -msgstr "Hinweis" +msgstr "Notiz" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:175 msgid "skos:note_help" -msgstr "Weitere Anmerkungen" +msgstr "Anmerkungen" #: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:234 #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:141 @@ -631,15 +632,15 @@ msgstr "Bevorzugte Bezeichnung" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:137 msgid "skos:related" -msgstr "Verknüpfte andere concept Objekte" +msgstr "Verwandte Konzepte" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:139 msgid "skos:relatedMatch" -msgstr "Verknüpfte concept Objekte aus anderen Vokabularen." +msgstr "Passende verwandte Konzepte" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:183 msgid "skos:related_help" -msgstr "Verknüpfte andere concept Objekte." +msgstr "Konzepte verwandt mit diesem Konzept." #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:159 msgid "skos:scopeNote" @@ -647,15 +648,15 @@ msgstr "Hinweise zur Anwendung" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:177 msgid "skos:scopeNote_help" -msgstr "Hinweise zu Anwendungsfällen für dieses concept Objekt." +msgstr "Hinweise zu den Anwendungsfällen dieses Konzepts." #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:153 msgid "skos:topConceptOf" -msgstr "Gehört zum Vocabular" +msgstr "Gehört zum Vokabular" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:197 msgid "skosext:DeprecatedConcept" -msgstr "Veraltetes concept Objekt" +msgstr "Veraltetes Konzept" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:195 msgid "skosext:partOf" @@ -663,7 +664,7 @@ msgstr "Ist Teil von" #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:199 msgid "skosext:partOf_help" -msgstr "Gesamtheit aus der das concept Objekt stammt." +msgstr "Gesamtheit in der Konzept ist." #: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:548 #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:201 @@ -684,7 +685,7 @@ msgstr "Array, zu dem das Konzept gehört." #: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:546 #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:203 msgid "skosmos:memberOf_help" -msgstr "Gruppe zu der das concept Objekt gehört." +msgstr "Gruppe zu der das Konzept gehört." #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:23 msgid "zxx-x-taxon" @@ -708,7 +709,7 @@ msgstr "Anzahl" #: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:157 msgid "Download this vocabulary as SKOS/RDF:" -msgstr "Download des Vokabulars in SKOS/RDF:" +msgstr "Herunterladen dieses Vokabulars in SKOS/RDF:" #: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:205 msgid "Help" @@ -736,7 +737,7 @@ msgstr "Anzahl Ressourcen nach Typ" #: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:124 msgid "Term counts by language" -msgstr "Zahl der Begriffe nach Sprache" +msgstr "Anzahl Begriffe nach Sprache" #: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:116 msgid "Type" @@ -756,55 +757,7 @@ msgstr "Führen Sie Ihre Maus über den mit Punkten unterstrichenen Text um weit #: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:201 msgid "search_example_text" -msgstr "Für eine Suche nach Teilzeichenketten, nutzen sie bitte ein * (z.B. *wald or *baum*). Werden nur kurze Begriffe verwendet, so wird automatisch ein * angehangen. Das Ergebnis der Suche nach dem Begriff Wissen entspricht also einer Suche nach Wissen*." - -#~ msgid "dc11:contributor" -#~ msgstr "Contributor" - -#~ msgid "dc11:creator" -#~ msgstr "Creator" - -#~ msgid "dc11:description" -#~ msgstr "Description" - -#~ msgid "dc11:license" -#~ msgstr "License" - -#~ msgid "dc11:publisher" -#~ msgstr "Publisher" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" +msgstr "Für eine Suche mit Trunkierung, nutzen Sie bitte ein * (z.B. *wald oder *baum*). Werden nur kurze Begriffe verwendet, so wird automatisch ein * angehängt. Die Suche nach dem Begriff Wissen ergibt das selbe Resultat wie Wissen*." -#~ msgid "dc11:rights" -#~ msgstr "Rights" - -#~ msgid "dc11:source" -#~ msgstr "Source" - -#~ msgid "dc11:title" -#~ msgstr "Title" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "The vocabulary does not contain terms beginning with" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Available vocabularies and ontologies" - -#~ msgid "Modified concepts" -#~ msgstr "Modified concepts" - -#~ msgid "New concepts" -#~ msgstr "New concepts" - -#~ msgid "All" -#~ msgstr "All" - -#~ msgid "results" -#~ msgstr "results:" - -#~ msgid "results for" -#~ msgstr "results for" - -#~ msgid "Language literal" -#~ msgstr "In English" +msgid "feedback_enter_name_email" +msgstr "" From a7a0f65f003dcd08b6d7af2cca26054b1c9745ef Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 27 Aug 2018 12:39:42 +0300 Subject: [PATCH 117/173] updated French translations. Credit: Thomas Francart --- .../translations/fr/LC_MESSAGES/skosmos.mo | Bin 11433 -> 11423 bytes resource/translations/skosmos_fr.po | 66 +++--------------- 2 files changed, 9 insertions(+), 57 deletions(-) diff --git a/resource/translations/fr/LC_MESSAGES/skosmos.mo b/resource/translations/fr/LC_MESSAGES/skosmos.mo index ebf58e09ffdfec2fb64975f9a1050573c303be53..7d6fabc771bf96f6347d6e3f77cce0e7151215c1 100644 GIT binary patch delta 1547 zcmYMzeQ3>59LMqR+}%6u$-^-A^kdlW*o-mbG8@T1E73}l*x1^&hdcY-c}TjHm^`$Y zL}~s|T4L&!KeWk0A^fp_NO{OV^6-a363P4H{z~0`uXE1t{LcA)zvtY6&HbBip7h5y zjWJs_!z^fK=X1>}a0Gq$9mnBMPhXx{5&d-Z;}V>VA)J8gaXfDKY{e}4dvGkCz*OwR zDR?>0ViurrivcY#jI;3>YT>V__bK^i#Aq2{=# zA2q)abz}>?ekC$LW~*svgL+g(VbsKfr~r6R-acRhbW{ zb^V-!j%GS)UctY9j9W}2nSl_l!y44aJ>GaP7Slh6%H)ps{xP=DAH@wAnvjUrr$1Zz#0j>l08oW}shJ#VA##0Vzi3)BX$P=SB- z#($wMvldt2ndrwH)RE1^SRl!4J`HVHL7I9|iz!%#W3e7}N4BCa;XW+IUQ}uCU^b4T zGXI3y_z&{4bZ(>qs6>6Y8ufSV408VZ;4lN_*oWHq0c!jyX5w3~{{?l)d?g8|p#BX- zsPAi0mFPlMt_M}2E2zu|PaU2NGvJ_qUgE`ETuOf#YJ=UVOi!RH)sOS> zIx3)-sD(eH0!ZTJVw{E)*XmH~L{XWaMhb6N<4LK5nQ2v}SjvMKSIt|Uu;TmE#2IJLvt(kuTELyVu delta 1557 zcmX}rTS!zv9LMq5yr$OL#Y>iX%FJ79n$czy8L=2zK@frzg5+&$am8~qC~3P8Jrq%j z6%j@hh&^LD=t{@PQp>}TeG=FI%(KXb0v4c6T|7Z+)n zW6ahpWAcqL1Ivsl$1#k-m~3MbF~Kzz^XM$QwG$W9KaQHG50kMU z)9`k-iI{jAPYGy(QCx)|P!rFho-bH#3^|%iEW&bBydHC~3Hh1R{OP@0xDg*=0KcK; z_cJ&bcVGgBaw5@&Lm-wwH_pcss7x=Qc5n@q@qM>HirVP}GPjw;xfpLnE0c-~=%=GL zRDc?{3)3-#+R&*84V9)JOK<=e;y7yIDbx$UF$2?9P=55Gc3Oo?aUVK(7z=S4HDCJ5 z=*9x5gsL$G_q#@dG?Yn~JK&=0O;m{Re;u`xm+td-*h+r__h5ieLlwDKA1 z1cp%yzD0g!ia$=rcvll=eN#pwAFGgLO&I54FKU7t7>^^a&rx^c6~^Kx)B=;J#An@j z9FyuYC!rEwf^nFKI_;s;hKj#OFMf6VzfhNKUQyH>)Ynjk zdcOu$iEdQodQcU*gWCBJ>aIOT&HuWH`YWT41T6FxM<0};pZ<2#0!L9h?L$>+5ZB-^ zDxuG)iGQLJNao>sT!9qV)S~7&hT8cRr0`~7$di26o8tGCR`|*)tWy7`b-horGS}{I za9SHe!6vJ=sWIFYcAT)axy_B0bp4A}2HS$RQ_|cqG?Vqj, 2017 # osma , 2015,2017 # Thomas Francart , 2016 -# Thomas Francart , 2015-2016 +# Thomas Francart , 2015-2016,2018 msgid "" msgstr "" "Project-Id-Version: Skosmos\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-16 10:26+0200\n" -"PO-Revision-Date: 2017-09-19 07:29+0000\n" -"Last-Translator: Nathalie Vedovotto \n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" +"Last-Translator: osma \n" "Language-Team: French (http://www.transifex.com/national-library-of-finland/skosmos/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -53,7 +53,7 @@ msgstr "Vocabulaires" #: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:26 msgid "%search_count% results for '%term%'" -msgstr "%search_count% résultats pour '%term%'" +msgstr "%search_count% résultat(s) pour '%term%'" #: /tmp/cache/587c83c09abaa/23/23c9862892c34daf7bea11b6d50990145b73a83c0947ae60c3d729fe591a06ec.php:48 msgid "404 Error: The page %requested_page% cannot be found." @@ -70,12 +70,12 @@ msgstr "A-Z" #: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:46 #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:19 msgid "About" -msgstr "A propos" +msgstr "À propos" #: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:35 #, php-format msgid "All %d results displayed" -msgstr "Tous les %d résultats sont affichés" +msgstr "Tous les résultats sont affichés (%d)" #: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:64 #: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:77 @@ -693,7 +693,7 @@ msgstr "Nom scientifique" #: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:168 msgid "About page" -msgstr "A propos" +msgstr "À propos" #: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:138 msgid "Alternate terms" @@ -759,53 +759,5 @@ msgstr "Passer le curseur sur un texte souligné en pointillé pour voir plus d' msgid "search_example_text" msgstr "Pour les recherches avec troncature, utilisez le symbole * , par exemple *animal ou *brevet*. La recherche utilise automatiquement une troncature en fin de mot, même sans le symbole de troncature : la recherche chat donnera donc les mêmes résultats que chat*." -#~ msgid "dc11:contributor" -#~ msgstr "Contributor" - -#~ msgid "dc11:creator" -#~ msgstr "Creator" - -#~ msgid "dc11:description" -#~ msgstr "Description" - -#~ msgid "dc11:license" -#~ msgstr "License" - -#~ msgid "dc11:publisher" -#~ msgstr "Publisher" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" - -#~ msgid "dc11:rights" -#~ msgstr "Rights" - -#~ msgid "dc11:source" -#~ msgstr "Source" - -#~ msgid "dc11:title" -#~ msgstr "Title" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "The vocabulary does not contain terms beginning with" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Available vocabularies and ontologies" - -#~ msgid "Modified concepts" -#~ msgstr "Modified concepts" - -#~ msgid "New concepts" -#~ msgstr "New concepts" - -#~ msgid "All" -#~ msgstr "All" - -#~ msgid "results" -#~ msgstr "results:" - -#~ msgid "results for" -#~ msgstr "results for" - -#~ msgid "Language literal" -#~ msgstr "In English" +msgid "feedback_enter_name_email" +msgstr "" From c326789f0e35c68566fbac324b13eb92fc6b0613 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 27 Aug 2018 12:41:01 +0300 Subject: [PATCH 118/173] =?UTF-8?q?updated=20Polish=20translations.=20Cred?= =?UTF-8?q?it:=20=C5=81ukasz=20Szeremeta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../translations/pl/LC_MESSAGES/skosmos.mo | Bin 11348 -> 11355 bytes resource/translations/skosmos_pl.po | 72 +++--------------- 2 files changed, 12 insertions(+), 60 deletions(-) diff --git a/resource/translations/pl/LC_MESSAGES/skosmos.mo b/resource/translations/pl/LC_MESSAGES/skosmos.mo index 2a0afdb44c11174a32debda080a42522452d58f7..afc2770a9f3f0abb5782f425bc8dc334e786b677 100644 GIT binary patch delta 1579 zcmXxjUrdu%7{~F$ze+`c*EN-vBVMh$Fwp%@jWCN9IcXdUp*?pOzU@WsC_fHl_}@Vh(}XcsQRuaMl#QB;Db?fg=TfjaO2)q!zT0{>Za{h3zIMM9<$7vKg|LVHk^C2=2i zp*l2$Yq5Aq<|seM5c6%Q%2WT_&ENw9Cs7$+L{)GN^YI>PgGZ<%_{YYxD>IcBppIw} zda=sRL#VT^x2{7Kx*oO9CZuyI^Cbhdqy^Q&PSnCKR02PsHa>~ksNXt>I-)D6qq~Lb z+@GjK9-|7IL_Mz?u5~4-bqmqM{wByEhrkN_3|FHvJo0{lG2bH})5DiK@jGgRJNOOW z$1S*#zAN5?dcF@A;#t%k89@ghpzgveoWuTR{!(r#)}VgajH=wl0LC#7e?bqPLfw_K zsKl?MF69V%aLmS^p*lK=x%e;Yy{}On$oi1}zh&TKpw{|oG7A=1{iuqA$g!JGP!;XP z<#+^D**WVF>VN+i>T*8CW%v@+nM$gu!&=mH;Q;+t#c=|wum`>P2kOj5QI~N7^}s7s z=J~-)ycCsC0F}^28$XOn{5YzxKI>^4{}uJ#p&~cmCyziv<7uIzQ8OzGmuqqzNm0b?ef*NE9;yU z^$n}mrmvQjR>Tr*VdrCghZ2WkZEiFYUH^6DK*Ei-x}g?#;6>TxoPwBhFt&fVx7m#} zqzB7KiyNaYv3Og!d4JgHY>&s1(Qx{wiu1n4Hg~w!ah+(mv)xU!#?p<>4sXOsM&i7; mBYno%lfAQJAm2Zj<84oLb|jLmZX|uX>PGg#*uam~Bc6Bi{l+Z- delta 1572 zcmXZcTS!z<6vpvw&P-00W;bgpJ(^lpikC>bkU=3uB))Vph?tterqPaRCJoe3NQLw^ z7KuR=(dEg=(kQbFO8HPqh!jEvQ6Lo+5mXP=|7#A2zkQZ_pS{-F`#83JWc!WN?&$ag zW6FKTdTX72B!s+-JXW*z4|A?tP|H4`5%`j#%TIj+8 zRJy|4xY7{Oe8gDcRT9Y4x) zEaZ6|s`3WM=url92(+RyzKq)NCMID&YJ+E}R=;)PKTwtbK^;-*0?rxJQO{YZv(9%c zL={?!+Gi!QK58~F(3w@ET3Cmg7(pd)47G79>ctlvucD5q6LoZVQJs5;N@NIC*elff z@2Gi6+;q)LK@aX_oRrFo)lc@D= zI2SLWI@O034x#SCS4?AnlbT1nFbnmEb*RdBqdvDVy73Hpumg2hE};^?i@KD3=)n;u zK88x@4Z83X>b>7k9r%sWzYM$!|A-k!zuUoRLW!2K}qQJEf_ zZD^lm*R!_2J$5d$(_QJ0H2Y)QtgT6ht%Jb^-Wuz+cDgjVYi8E1#L0nLzZLcm^ag@8 UcI-vYW4C{QO(@uPHg~}D4_M*EeE, 2017 # dominik_tomaszuk , 2017 -# Łukasz Szeremeta , 2017 +# Łukasz Szeremeta , 2017 msgid "" msgstr "" "Project-Id-Version: Skosmos\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-16 10:26+0200\n" -"PO-Revision-Date: 2017-10-20 12:17+0000\n" -"Last-Translator: dominik_tomaszuk \n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" +"Last-Translator: osma \n" "Language-Team: Polish (http://www.transifex.com/national-library-of-finland/skosmos/language/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -26,7 +26,7 @@ msgstr "" #: controller/Controller.php:38 #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:21 msgid "in_this_language" -msgstr "po angielsku" +msgstr "po polsku" #: controller/RestController.php:271 #: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:125 @@ -130,7 +130,7 @@ msgstr "Język zawartości" #: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:732 msgid "Download this concept in SKOS format:" -msgstr "Pobierz te pojęcie" +msgstr "Pobierz to pojęcie:" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:144 msgid "E-mail:" @@ -161,7 +161,7 @@ msgstr "Błąd: Termin \"%term%\" nieodnaleziony w słownictwie!" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:54 #: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:194 msgid "Feedback" -msgstr "Prześlij opinię" +msgstr "Informacja zwrotna" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:64 msgid "Feedback has been sent!" @@ -210,7 +210,7 @@ msgstr "Wiadomość:" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:136 msgid "Name:" -msgstr "Nazwa:" +msgstr "Imię i nazwisko:" #: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:23 msgid "No results" @@ -239,7 +239,7 @@ msgstr "Wyszukaj opcje" #: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:161 msgid "Send feedback" -msgstr "Prześlij opinię" +msgstr "Wyślij opinię" #: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:51 msgid "Show all breadcrumb paths" @@ -422,7 +422,7 @@ msgstr "W innych językach" #: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:39 msgid "from all" -msgstr "dla każdego" +msgstr "wszystkie" #: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:81 #: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:90 @@ -728,7 +728,7 @@ msgstr "Brak słownictw na serwerze!" #: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:134 msgid "Preferred terms" -msgstr "Preferowany termin" +msgstr "Preferowane terminy" #: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:111 msgid "Resource counts by type" @@ -758,53 +758,5 @@ msgstr "Najedź kursorem na tekst z wykropkowanym podkreśleniem, aby zobaczyć msgid "search_example_text" msgstr "Aby wyszukać fragmenty, użyj symbolu * np *animal lub *patent*. W przypadku zakończenia szukanych słów wyszukiwanie zostanie automatycznie obcięte, nawet jeśli nie zostanie wprowadzony symbol odcięcia, dzięki czemu cat da te same wyniki, co cat*." -#~ msgid "dc11:contributor" -#~ msgstr "Contributor" - -#~ msgid "dc11:creator" -#~ msgstr "Creator" - -#~ msgid "dc11:description" -#~ msgstr "Description" - -#~ msgid "dc11:license" -#~ msgstr "License" - -#~ msgid "dc11:publisher" -#~ msgstr "Publisher" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" - -#~ msgid "dc11:rights" -#~ msgstr "Rights" - -#~ msgid "dc11:source" -#~ msgstr "Source" - -#~ msgid "dc11:title" -#~ msgstr "Title" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "The vocabulary does not contain terms beginning with" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Available vocabularies and ontologies" - -#~ msgid "Modified concepts" -#~ msgstr "Modified concepts" - -#~ msgid "New concepts" -#~ msgstr "New concepts" - -#~ msgid "All" -#~ msgstr "All" - -#~ msgid "results" -#~ msgstr "results:" - -#~ msgid "results for" -#~ msgstr "results for" - -#~ msgid "Language literal" -#~ msgstr "In English" +msgid "feedback_enter_name_email" +msgstr "" From be916062b3612f76b7ed254d973fb52872263c63 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 27 Aug 2018 12:42:07 +0300 Subject: [PATCH 119/173] update translation files to match latest template; no actual changes in translations --- .../translations/es/LC_MESSAGES/skosmos.mo | Bin 9174 -> 9174 bytes .../translations/it/LC_MESSAGES/skosmos.mo | Bin 11292 -> 11292 bytes .../translations/nb/LC_MESSAGES/skosmos.mo | Bin 10931 -> 10931 bytes .../translations/nl/LC_MESSAGES/skosmos.mo | Bin 11231 -> 11208 bytes .../translations/nn/LC_MESSAGES/skosmos.mo | Bin 10764 -> 10764 bytes resource/translations/skosmos_es.po | 54 +---------------- resource/translations/skosmos_it.po | 54 +---------------- resource/translations/skosmos_nb.po | 54 +---------------- resource/translations/skosmos_nl.po | 56 ++---------------- resource/translations/skosmos_nn.po | 54 +---------------- resource/translations/skosmos_zh.po | 54 +---------------- .../translations/zh/LC_MESSAGES/skosmos.mo | Bin 8501 -> 8501 bytes 12 files changed, 19 insertions(+), 307 deletions(-) diff --git a/resource/translations/es/LC_MESSAGES/skosmos.mo b/resource/translations/es/LC_MESSAGES/skosmos.mo index cf41e098c095bc863b66e187462857dfd77f5861..21647e3f50f031dbdbee06b217155811462fbc4b 100644 GIT binary patch delta 26 hcmccSe$9QuW)WTsT?12HBVz?aGb>Pb1M_`%?Cup_yK%+2k-y@ diff --git a/resource/translations/it/LC_MESSAGES/skosmos.mo b/resource/translations/it/LC_MESSAGES/skosmos.mo index f9fa7cddc014c780235e353eed9f2141c63fea71..ed87093a395ef44a07aa0f5d9d8737b60f64b531 100644 GIT binary patch delta 26 hcmbOeF(+b!w-m31u7Rnpk+FiInU#s<<_M`Hf&gqx2af;% delta 26 hcmbOeF(+b!w-m3ru7Rnpv4Mhtxs{30<_M`Hf&gpy2ZaCt diff --git a/resource/translations/nb/LC_MESSAGES/skosmos.mo b/resource/translations/nb/LC_MESSAGES/skosmos.mo index 02990279517a95017f58b37f253f87d5dfec7b30..8c418e3da2f1ba4162c9471bcb975b5968f525e2 100644 GIT binary patch delta 26 icmdlSx;b>i1}R<(T?12HBVz?aGbi1}R>1T?12HV*>>Pb1PGW&3mQ3@dE&QAPA-a diff --git a/resource/translations/nl/LC_MESSAGES/skosmos.mo b/resource/translations/nl/LC_MESSAGES/skosmos.mo index 1d205d64b0759e343502dbd17b7a5d666da2bb0b..558ca63ce92ba0a2f303512ae52abe4aaa37ca66 100644 GIT binary patch delta 1472 zcmXZcOGs2v9LMqFW3py^rfHcvW0{SPO=eT!G-Mf6i^v|N(ZXoq)KEH-7+BO0(I&D7 zf>9U+Aq631LPcOL0+YakvKE0D2`xk^0#_mR{dv#E&pqedIseBw*U6^Qrl;3jiKb*@ z>I#hs7-Mc1@r-XV1yhQRNyRj4I<8`zgKiArQmn&VJcvs$YS-H_hw*t_jNRzMUi4sJ zu}Lfhc+5l=69brs!a-W9R$qcmNgfxgEc@<9DciKB9gcovc6? z@y%8q^n)F^6L+C1yNWuRUereSP@Nb-CH58LIEja_q0C9(p>+`Xu*@4&z;DRCH8WQC z8s>>_{5)tOY(0W%(OG0~a|vD8Z+(I~^Fd6-QCx;&sD!8N{4^@?FVqnvl{@=nqB@v| zi9ix($Aezjv({c%bDhx**cQ5(;q68MMYYCHiaKnS%SLEVvksKlC4 z`(H$L<^e7o9nyI7Xei0^EX%!VUCl<{hRxwnZO?FFfj8dKdfXS$-(W{)yfxO=(zg9% T%ju3-+o@PE8XI!2{F412<42Tj delta 1495 zcmXxkOGs2v9LMov&iF1LnXfd*SDL1ofu?3kCM~3e37U%xu`vf6hccr@HajISuqP31 z0?P;tYoZ{GAY9C*BFGkjNnk-qi%5)wpzqInT7B+0_ssb}&bbrrTAbq#S!~{43imO!5ExGH%?b=EE}fX3;l4i%%0Vvn`n+KlQ@D=J`{o$p2!)`t`j zG^cn_z)@7|uc0!&i%Q^uoe$aZ94g>zJD#`WPpEyqqJF=ECHMz*bom9&<*Y_^vI*V9 zH%EBT4~}9p9z#`j2X!>lsEwYWDqlb)_5%aBitX4}=p^vm8b&@W^8pp`CvtyHWRYVY zCKKN@+KD!60M(*P$lm5Ax^dR}3U%gTbm1ay!6j6}Yj!?jyAwDHbp#pc#v)V)%P?3L z!P(gb$BUg74WJgBMYZ$-lDrv5?yGr(b@&c-i4tg!+=@EFQq-NQM}3CvsQ-mg+>aBe z%lo#3{_`oCB_?Vya)-090oAfYsD)jq0E4Kb89`mfi>QQdqY|1${qDDYA6x1al8rIU z7ovVwZfz>1|6FX-&O`+cqXJE04Teyk+cIinSDBMQ8j`cg$7pOty>Ca|5icsSVbuQD zQJr~)>qmz)-b{re;vXl*Rh3uPdUn^;Rn=U5k(FM3xaXYD@AY)_40;Zp_IZbfdi%Ye feGJP_{2!M4*Vi=l2hR9=d;=A|0e|RM)_l@GFJ+!U diff --git a/resource/translations/nn/LC_MESSAGES/skosmos.mo b/resource/translations/nn/LC_MESSAGES/skosmos.mo index e956a5e8afde40d7f893cc35e7405813279044ce..e1efc55fbf0302325c8e2a1f0ccfb1eb43863916 100644 GIT binary patch delta 26 hcmeAP=?U4eL5kNx*T7WQ$XLP9%*w=a^Ij=`egJV@2f6?N delta 26 hcmeAP=?U4eL5kO0*T7WQ*g(O++{)Nu^Ij=`egJVM2ekkI diff --git a/resource/translations/skosmos_es.po b/resource/translations/skosmos_es.po index 37f968492..11a0396f6 100644 --- a/resource/translations/skosmos_es.po +++ b/resource/translations/skosmos_es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Skosmos\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-16 10:26+0200\n" -"PO-Revision-Date: 2017-05-30 07:47+0000\n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" "Last-Translator: osma \n" "Language-Team: Spanish (http://www.transifex.com/national-library-of-finland/skosmos/language/es/)\n" "MIME-Version: 1.0\n" @@ -758,53 +758,5 @@ msgstr "Desplace su cursor sobre el texto con el subrayado punteado para ver las msgid "search_example_text" msgstr "Para la búsqueda por truncamiento, por favor utilice el símbolo * como en *animal o *patente*. Para los sufijos de las palabras de búsqueda, la búsqueda se truncará automáticamente, incluso si el símbolo de truncamiento no se ingresa manualmente: asi, gat producirá los mismos resultados que gat*" -#~ msgid "dc11:contributor" -#~ msgstr "Contributor" - -#~ msgid "dc11:creator" -#~ msgstr "Creator" - -#~ msgid "dc11:description" -#~ msgstr "Description" - -#~ msgid "dc11:license" -#~ msgstr "License" - -#~ msgid "dc11:publisher" -#~ msgstr "Publisher" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" - -#~ msgid "dc11:rights" -#~ msgstr "Rights" - -#~ msgid "dc11:source" -#~ msgstr "Source" - -#~ msgid "dc11:title" -#~ msgstr "Title" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "The vocabulary does not contain terms beginning with" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Available vocabularies and ontologies" - -#~ msgid "Modified concepts" -#~ msgstr "Modified concepts" - -#~ msgid "New concepts" -#~ msgstr "New concepts" - -#~ msgid "All" -#~ msgstr "All" - -#~ msgid "results" -#~ msgstr "results:" - -#~ msgid "results for" -#~ msgstr "results for" - -#~ msgid "Language literal" -#~ msgstr "In English" +msgid "feedback_enter_name_email" +msgstr "" diff --git a/resource/translations/skosmos_it.po b/resource/translations/skosmos_it.po index bb4a6edd2..bb678b830 100644 --- a/resource/translations/skosmos_it.po +++ b/resource/translations/skosmos_it.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Skosmos\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-16 10:26+0200\n" -"PO-Revision-Date: 2017-05-30 07:42+0000\n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" "Last-Translator: osma \n" "Language-Team: Italian (http://www.transifex.com/national-library-of-finland/skosmos/language/it/)\n" "MIME-Version: 1.0\n" @@ -757,53 +757,5 @@ msgstr "Passa il cursore sopra il testo con i puntini per leggere le istruzioni msgid "search_example_text" msgstr "Per la ricerca su parole incomplete, usare il simbolo *, come in *animale o *licenza*. Per la parte terminale di una parola, la ricerca completerà la parola inserita anche se il simbolo * non è stato inserito: ad esempio, gatto fornirà gli stessi risultati di gatto*" -#~ msgid "dc11:contributor" -#~ msgstr "Contributor" - -#~ msgid "dc11:creator" -#~ msgstr "Creator" - -#~ msgid "dc11:description" -#~ msgstr "Description" - -#~ msgid "dc11:license" -#~ msgstr "License" - -#~ msgid "dc11:publisher" -#~ msgstr "Publisher" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" - -#~ msgid "dc11:rights" -#~ msgstr "Rights" - -#~ msgid "dc11:source" -#~ msgstr "Source" - -#~ msgid "dc11:title" -#~ msgstr "Title" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "The vocabulary does not contain terms beginning with" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Available vocabularies and ontologies" - -#~ msgid "Modified concepts" -#~ msgstr "Modified concepts" - -#~ msgid "New concepts" -#~ msgstr "New concepts" - -#~ msgid "All" -#~ msgstr "All" - -#~ msgid "results" -#~ msgstr "results:" - -#~ msgid "results for" -#~ msgstr "results for" - -#~ msgid "Language literal" -#~ msgstr "In English" +msgid "feedback_enter_name_email" +msgstr "" diff --git a/resource/translations/skosmos_nb.po b/resource/translations/skosmos_nb.po index d45d58dad..8694608fc 100644 --- a/resource/translations/skosmos_nb.po +++ b/resource/translations/skosmos_nb.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Skosmos\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-16 10:26+0200\n" -"PO-Revision-Date: 2017-05-30 07:50+0000\n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" "Last-Translator: osma \n" "Language-Team: Norwegian Bokmål (http://www.transifex.com/national-library-of-finland/skosmos/language/nb/)\n" "MIME-Version: 1.0\n" @@ -757,53 +757,5 @@ msgstr "Beveger du pekeren over tekst med prikkete understreking får du informa msgid "search_example_text" msgstr "Du kan trunkere med tegnet *, som i *dyr eller *patent*. Søk uten trunkeringstegn blir automatisk trunkert på slutten, så katt vil gi samme resultatliste som katt*." -#~ msgid "dc11:contributor" -#~ msgstr "Contributor" - -#~ msgid "dc11:creator" -#~ msgstr "Creator" - -#~ msgid "dc11:description" -#~ msgstr "Description" - -#~ msgid "dc11:license" -#~ msgstr "License" - -#~ msgid "dc11:publisher" -#~ msgstr "Publisher" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" - -#~ msgid "dc11:rights" -#~ msgstr "Rights" - -#~ msgid "dc11:source" -#~ msgstr "Source" - -#~ msgid "dc11:title" -#~ msgstr "Title" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "The vocabulary does not contain terms beginning with" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Available vocabularies and ontologies" - -#~ msgid "Modified concepts" -#~ msgstr "Modified concepts" - -#~ msgid "New concepts" -#~ msgstr "New concepts" - -#~ msgid "All" -#~ msgstr "All" - -#~ msgid "results" -#~ msgstr "results:" - -#~ msgid "results for" -#~ msgstr "results for" - -#~ msgid "Language literal" -#~ msgstr "In English" +msgid "feedback_enter_name_email" +msgstr "" diff --git a/resource/translations/skosmos_nl.po b/resource/translations/skosmos_nl.po index 097361441..9ddb1aa1c 100644 --- a/resource/translations/skosmos_nl.po +++ b/resource/translations/skosmos_nl.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Skosmos\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-16 10:26+0200\n" -"PO-Revision-Date: 2018-02-09 17:27+0000\n" -"Last-Translator: Maxime Van Driessche \n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" +"Last-Translator: osma \n" "Language-Team: Dutch (http://www.transifex.com/national-library-of-finland/skosmos/language/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -758,53 +758,5 @@ msgstr "Beweeg uw cursor over de tekst met een gestippelde onderstreping om inst msgid "search_example_text" msgstr "Voor een ingekorte zoekopdracht, gelieve het symbool * te gebruiken zoals in *dier of *patent*. Voor het einde van zoekwoorden zal de zoekopdracht automatisch beschouwd worden als ingekort, zelfs als het inkortingssymbool not manueel werd ingevoerd: zo zal kat hetzelfde resultaat opleveren als kat*" -#~ msgid "dc11:contributor" -#~ msgstr "Contributor" - -#~ msgid "dc11:creator" -#~ msgstr "Creator" - -#~ msgid "dc11:description" -#~ msgstr "Description" - -#~ msgid "dc11:license" -#~ msgstr "License" - -#~ msgid "dc11:publisher" -#~ msgstr "Publisher" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" - -#~ msgid "dc11:rights" -#~ msgstr "Rights" - -#~ msgid "dc11:source" -#~ msgstr "Source" - -#~ msgid "dc11:title" -#~ msgstr "Title" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "The vocabulary does not contain terms beginning with" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Available vocabularies and ontologies" - -#~ msgid "Modified concepts" -#~ msgstr "Modified concepts" - -#~ msgid "New concepts" -#~ msgstr "New concepts" - -#~ msgid "All" -#~ msgstr "All" - -#~ msgid "results" -#~ msgstr "results:" - -#~ msgid "results for" -#~ msgstr "results for" - -#~ msgid "Language literal" -#~ msgstr "In English" +msgid "feedback_enter_name_email" +msgstr "" diff --git a/resource/translations/skosmos_nn.po b/resource/translations/skosmos_nn.po index 397ca4eb0..391e958cc 100644 --- a/resource/translations/skosmos_nn.po +++ b/resource/translations/skosmos_nn.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Skosmos\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-16 10:26+0200\n" -"PO-Revision-Date: 2017-05-30 07:38+0000\n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" "Last-Translator: osma \n" "Language-Team: Norwegian Nynorsk (http://www.transifex.com/national-library-of-finland/skosmos/language/nn/)\n" "MIME-Version: 1.0\n" @@ -757,53 +757,5 @@ msgstr "Flytter du peikaren over tekst med prikkete understreking får du inform msgid "search_example_text" msgstr "Du kan trunkera med teiknet *, som i *dyr eller *patent*. Søk utan trunkeringsteikn vert automatisk trunkert på slutten, så katt vil gje same resultatliste som katt*." -#~ msgid "dc11:contributor" -#~ msgstr "Contributor" - -#~ msgid "dc11:creator" -#~ msgstr "Creator" - -#~ msgid "dc11:description" -#~ msgstr "Description" - -#~ msgid "dc11:license" -#~ msgstr "License" - -#~ msgid "dc11:publisher" -#~ msgstr "Publisher" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" - -#~ msgid "dc11:rights" -#~ msgstr "Rights" - -#~ msgid "dc11:source" -#~ msgstr "Source" - -#~ msgid "dc11:title" -#~ msgstr "Title" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "The vocabulary does not contain terms beginning with" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Available vocabularies and ontologies" - -#~ msgid "Modified concepts" -#~ msgstr "Modified concepts" - -#~ msgid "New concepts" -#~ msgstr "New concepts" - -#~ msgid "All" -#~ msgstr "All" - -#~ msgid "results" -#~ msgstr "results:" - -#~ msgid "results for" -#~ msgstr "results for" - -#~ msgid "Language literal" -#~ msgstr "In English" +msgid "feedback_enter_name_email" +msgstr "" diff --git a/resource/translations/skosmos_zh.po b/resource/translations/skosmos_zh.po index 87ed47427..5d8e63034 100644 --- a/resource/translations/skosmos_zh.po +++ b/resource/translations/skosmos_zh.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Skosmos\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-16 10:26+0200\n" -"PO-Revision-Date: 2017-05-30 07:46+0000\n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" "Last-Translator: osma \n" "Language-Team: Chinese (http://www.transifex.com/national-library-of-finland/skosmos/language/zh/)\n" "MIME-Version: 1.0\n" @@ -757,53 +757,5 @@ msgstr "用点下划线在文本上悬停鼠标,以查看属性说明" msgid "search_example_text" msgstr "对于截词检索,请使用符号*作为*动物或*专利。对于检索词的结尾,检索将会自动截词,即使截词符号没有自动输入,因此输入cat将会产生和输入cat*同样的结果。" -#~ msgid "dc11:contributor" -#~ msgstr "Contributor" - -#~ msgid "dc11:creator" -#~ msgstr "Creator" - -#~ msgid "dc11:description" -#~ msgstr "Description" - -#~ msgid "dc11:license" -#~ msgstr "License" - -#~ msgid "dc11:publisher" -#~ msgstr "Publisher" - -#~ msgid "dc11:relation" -#~ msgstr "Relation" - -#~ msgid "dc11:rights" -#~ msgstr "Rights" - -#~ msgid "dc11:source" -#~ msgstr "Source" - -#~ msgid "dc11:title" -#~ msgstr "Title" - -#~ msgid "Error: the vocabulary does not contain terms beginning with" -#~ msgstr "The vocabulary does not contain terms beginning with" - -#~ msgid "Vocabularies on the server" -#~ msgstr "Available vocabularies and ontologies" - -#~ msgid "Modified concepts" -#~ msgstr "Modified concepts" - -#~ msgid "New concepts" -#~ msgstr "New concepts" - -#~ msgid "All" -#~ msgstr "All" - -#~ msgid "results" -#~ msgstr "results:" - -#~ msgid "results for" -#~ msgstr "results for" - -#~ msgid "Language literal" -#~ msgstr "In English" +msgid "feedback_enter_name_email" +msgstr "" diff --git a/resource/translations/zh/LC_MESSAGES/skosmos.mo b/resource/translations/zh/LC_MESSAGES/skosmos.mo index d9bff75d43d9b835928d98c57f159ae7e3bdd369..4eafd69692f842aec6ce337c3d23c4f790223408 100644 GIT binary patch delta 26 hcmdn$wAE?DW)WTsT?12HBVz?aGbs0^2n7HD delta 26 hcmdn$wAE?DW)WU>Pb1M_G%?CtEc>s0I2mb&7 From a35572156450aa8dff9040fb34b6da38904c90ed Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 27 Aug 2018 12:50:39 +0300 Subject: [PATCH 120/173] Add translations for Farsi, by Omid Ghiasvand and Reza Ghiasvand. Still missing true RTL support (#768) --- .../translations/fa/LC_MESSAGES/skosmos.mo | Bin 0 -> 12886 bytes resource/translations/skosmos_fa.po | 761 ++++++++++++++++++ 2 files changed, 761 insertions(+) create mode 100644 resource/translations/fa/LC_MESSAGES/skosmos.mo create mode 100644 resource/translations/skosmos_fa.po diff --git a/resource/translations/fa/LC_MESSAGES/skosmos.mo b/resource/translations/fa/LC_MESSAGES/skosmos.mo new file mode 100644 index 0000000000000000000000000000000000000000..655ed516b7933506b5b9c07448f93e0363178af4 GIT binary patch literal 12886 zcmb7|X^>o3b;mDW01IP-A*?Zek{N8t^hhIHvS}k@dC`JpETlmgXHnjCztKFar+eu4 zTAE>(>{$Xz9Gd{f5U>rgMncjcjTXkKQc@(TtYr#+Al)P21F4vz5+H=iLV%Fp|K9sv zchAUBywaKfUCurCZ1>#T`t}tUeZue^gMJe_aIrDp1An%JKYWj0X3W*#6W|)~ufYq! zpMtQOUw~r0_;O=j1HKHr1Y8bY0bURC&urk&i@_bB=68CG!57g_z?XpU2VV|Of-eI< z?Z*#;ucv?7k3S1)|9=L1!0&myoJEqi29%t2;A_EqKv+x+z6l%y3*h6R^m+z-HTX}U z^!OntJ%0*b1YV4=OTi_e_+Jgmz5sj`c)g#0JE;BN?dNxb;;)0!_x+&!wGVs)cmR~& zzXVFZzXhd76MP}~@1W%WH~32MGB(BK=4$Yz;A&9z-Rki^Kc0e;vmcb-9s{oePlKz$ zZ-BDvl2itl2KlAm7*YW*8P`QgnT-|FYLfReWZl)M4o9|ooOnD0+`d<2x-&w-LR z?fYK=weMF!$@#j+Z-SElT~P7*F(^HM=I1Z^4X5AbpyXZ&%0JhD^3N@x*1Z#yocloe ze-M;^J_I7lJOpap7d`$NsQ5h#>iqm0sC5^^^g8fLQ1dr|+GiUmz6i8(LB-`Ek57QI zcNUa=f9dfb#c8 z{rD$69t3fv`3fk$XF#q0CaC!R5L6!g#N&%`vi5m3D81k4aV;pmO`!bpZa=;oDFoQ1efL(*J2tdj35qJGa#|aR;dJ5~%$j01<5-0hfVCKtgN2=J7djDgB>=^6OO;AI0|uQ1x@2@0URNsRF7_ zei*cNd3+iS7=H%50sJ8-JKl&gZwA+Zz2E@&M(|;9EqEH-0Dd2ozBdHMTnF9`N`4Jg zoE`vG_Z|lMXCCE`{5J=(mH8T|eSQGyUV1%7Y5%u@tHG_H?0Nu{oCBcj_&BKjp7!`0 zD0x@ltZTtOP;t8tWXjwR%6|ty?ehf?*O|Wo1Mpu!+4n*wCFeR&cE260fMeiI;B(+c z@G6+4&n|EiSOt}DXFUEDs5&^Q2SiD-09H=GGsP_+HVAuKKnu4yH9}PKMMxnvwr@^pz`#J74Cd21z${m zqsOhF^5Z?=3&9ake%tHkAM)dmg4Q4466Q~N{0mV2{0H#V3&sz5?kiHK(Fn{7PgAdSuJ0cI^+jb>-442UfXj1 zRP$rd6VP1{X<@cPN1)rG4?~+F<-|^?AJX?(2l-#cY7|lqa)cLsTNt??3ZPq{eUS2C zBXlA3IJ65=&fN;FfU@sy8c#u_y1g?#2P&3TNZ;>6AA%?a_RPNn)JLhcIbl2e*$qXI z^6c$U_Pvb8r+nv8@Igptdk3W48G|l>mO<}zC8qf5xN$- z1k!n#fNq4c@AEW%59)usehCT_s z8_K?;H2xIY27S~I>dd|z`Z!dAE`}a~mP3c31bP5E08K-eLXSc3hc1Hjy%u_jZBYk3 zehE~4)c4!aFf^$S-_6iH&|0Vmx)-_+()S0@0JKCMeLYDO)=NV>OSMKd?Fs5p(x{|K zFj%Vx*Yu=OeYocubHl0|f;;Q=TD=(b4@JR9xGM^J>d|`}QIbaGo$B`lrLbD9rNKbN z+D5h9Yt|R;GwTOxjnw_M%gp*pCFm*V+mz#Eq!NxrWhO?3!a_CN<5~kz8kfRK5Le65 zC_`vc4bv!)Mv1v?EZ9}AHAd7J3F}ccRVyhCMZ=L=>DWkQZXXJ(yQ0L(yuE^zK_woJ z(=d%|)x_LhtCpgXG^oJTzyJ-TVJQt7$x_=!Xb@J*f%8u{pXNFi;yH6iZEv+w3(G+| z6emH+OOLC;_Pg%cE_V)xX>kG9o?0m!XjH=bSP&+bapkr=*!mG3EOYT*7Uc7|zhm7}vmuJg z17T@*-UxxWwEZk#vKZqqh&$_68w`W}qI0sk^tQkGCJt-jUKbTG0@>E8``#(+1{p~gw2($!Et%G#ln&X<~swpLAhoF zatt4Gs3=C8!lB`su@|0dR?Xj+9RvQ}>=^O)XUB*QUu|!tm~fodCq_+QW;SyyOual< zv^-hEg@azg!5JPVwZ)SZD~hRWCQ-D$lGKc=FFT{raCoE=?M$Q5l(7ogMD`{WH-c1A zSBKm8?Un61VI{SR(%p0WTW%YLyTi0Jp4G(1Ix^{bltW%?$^Ao%YW)SxA{e#1FmW; zWV55)5;F-4MzhNOzR}UbXdw+pNuaIun(Av|bGfj?-Sfp@yHjKdH$|fcbfsm&)1c+(Z`td?+nbyqRCX&_E><%_{!xMXXk!If6npcgt?7IReZ4pJ-q_p6oEs?I7AD+$=}vpeRuzLiakTfmbA3hqvPkPHjP>(!tS<5v=K0bwY2T^*7?KZ)K_eZ+ z38trcvNhg3*gRfn9%;@t4}a$)2U=6jBdw{Ppf%AveC`14$)GviJl;Hb?m*B3>#63M z)`KAb<*6Tp&120o&4WeDGe6TK*7+HUnY1gKGb}xZ%!3jiG*32XT9Z8if)BR#G0>W5 zjh{OJKZ;B>XAHv+w)O=DI4o1(1`x~s=MESvk52P=YqGl|Nn&cA3|f<|anzOtcH{`Z zHNE6qP{uCv?4J1y!gCwjh9LYf0uQ3)w1M|{&^jyOte?lm)|B+=8io_WvZ-shc>*0- z&FuW6EIrtoSipg5Q_VR;L}p-}G1_SUP%wW8SI)F10#rFl19vfPLx!(S^91`?VTWx< zX9M-ce9+hxhgm^?D#$p41u@S>xE(CNY3;`!)2#;yofUh$c~a^UfO&0yoH$uGNUhes z)+CM?w}D~OhnQ_MOVOz{sc6qxBT+a1y=z>K$pnb_8R;vN+m<)y+}6sZ?tERen#5%N zOdzQkol9y>IG@^0eg#vO+gd*VXp2laUp99pv+~Q zleQC1%rr|*STk^fv6koEfYWnaM+zQJls{O6LSv>Qx%1@A8bM3hGJmKwK7Yu-pR3rB z>t_)FSBuP?C50ijApH1}9m#*6Yu39cc19smtjKg7Qk@GDVjsW(a52Cu90#S#G^%`A z>@E^{Hh08%VQ}RN5-wY26D;5qAQ5@plQ^NZUnQzF&K!H3MCaq2BASfhoD6(@Q$C`x z3yDln1PBE7%$T5MgU{Z$!@J0H&g$4(ZX|oR6Nzbjb?yKMwsWN&)<(ygrx-u=e4dw& zk2H^(_G#0(nrKcp=Md3Zb=p;et)-Z)+o~F!eVoxe(WQxLx$2n3(A#9NkjkXM`w@Ah zTbSuex(O-NnW0(MwJY$|N}5@`L$xO9;GVUKGK)=9%~|<*mIR*+da_o}qCFO<(BT-w z<;lCiIhk?V^27o?eI*M>YYHnGVK_)Ow#Iwmbp`4K3R2)~KU?AWo5vJ?ckC8iUfsGj z56Hk@m1Jb6w9GBBd+MaA;SW+?S$*cY;mk;OX(ym=4wrr7lx~~FZr(b=-NM`fij})} zZJ9?;j%oXZqL3;XKFCXVcLxUd449+EHQvSOYpV{>5vJ!1;!o=QU=p0u*wvmI*K?zJ z!jLJp(IQi<53tFdTxE~+g>6Q&zMi;1xxy1PZRL^5<9d$}#r+zyS07tbJPx5IRc}J3 zwzyo*BJQLvGj_9T;sEZ_x$!pRm-DQ*wGd$FHyJ1QF(!g>$OOsU>N6dOcyV}R+|QzvUf68$*Uw0)j)r+$MTq>BXl$llFzHs>0PRw`dpt>g{^T=w3ocjsj0sl?)v>tF?W5V(J+zCKMzF zGUiD__>?~Kuw{47u_}8@J5IQ=ewJf)6u+VeSFJpfzZ9fa{#KA{?b&yNwS#o-dh-(; z9BTLHfuIXRw~>8Qccg?K7Ed}uB!v89&7`WfHJ*jqXNvt)1+wf!FzLpvzi=eDmZ2%+ z;pFA#o96VMXg-xqcI>6(unQK9Eta^5p)C_3HuapD25%Cg=20A}a1eFg?X8KT`yV|2 ze|ouB42sL|w%qyO0>naYlpLy&J62szLZXWGOzT0Wi68fF&S%*J>kt)Tf;(yIsX#7ag+~|zdY!`IhJFzQrJE}>A6Rx>Vq=K4p^1kk2OgRBwVj~ zr75QnR%=R@r*a~~1KDZC`?oD=n~7Kc+g}%cch_0?TIw>JU0Bb3;Ioy+q^?|U9F(1A z&gO&H1;)-toFrk5c609YKWiD6mJ*Esq&@F4?`Ny1-&x08Zx1A^DsV8#X|7-$iaFcK zj*x+KaWy1cC>6)Zrt?qB*v`u@D{9I~wARnW1?hgOfXRwMj* zoNDQ6FQWBdHTv(Re6>`{G85*7zeDp$r}`{jIA&Ut$_iMQ literal 0 HcmV?d00001 diff --git a/resource/translations/skosmos_fa.po b/resource/translations/skosmos_fa.po new file mode 100644 index 000000000..22e419e9a --- /dev/null +++ b/resource/translations/skosmos_fa.po @@ -0,0 +1,761 @@ +# +# Translators: +# Omid Ghiasvand , 2018 +# Reza Ghiasvand , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Skosmos\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-16 10:26+0200\n" +"PO-Revision-Date: 2018-05-23 16:49+0000\n" +"Last-Translator: osma \n" +"Language-Team: Persian (http://www.transifex.com/national-library-of-finland/skosmos/language/fa/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fa\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 1.8.7.1\n" +"X-Poedit-Basepath: ../..\n" +"X-Poedit-SearchPath-0: view\n" +"X-Poedit-SearchPath-1: controller\n" +"X-Poedit-SearchPath-2: model\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: controller/Controller.php:38 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:21 +msgid "in_this_language" +msgstr "به انگلیسی" + +#: controller/RestController.php:271 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:125 +msgid "skos:Concept" +msgstr "مفهوم" + +#: controller/RestController.php:280 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:127 +msgid "skos:Collection" +msgstr "مجموعه" + +#: model/Concept.php:455 model/Concept.php:475 +msgid "skosmos:created" +msgstr "ایجاد شده" + +#: model/Concept.php:460 model/Concept.php:462 model/Concept.php:471 +msgid "skosmos:modified" +msgstr "آخرین بازنگری" + +#: model/VocabularyCategory.php:39 +msgid "Vocabularies" +msgstr "واژگان" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:26 +msgid "%search_count% results for '%term%'" +msgstr "%شمار-جست‌وجو% نتیجه برای %اصطلاح%" + +#: /tmp/cache/587c83c09abaa/23/23c9862892c34daf7bea11b6d50990145b73a83c0947ae60c3d729fe591a06ec.php:48 +msgid "404 Error: The page %requested_page% cannot be found." +msgstr "404 خطا: برگ%برگ‌های درخواست شده% یافت نمی‌شود" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:62 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:75 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:64 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:274 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:68 +msgid "A-Z" +msgstr "الف - ی یا الفبایی" + +#: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:46 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:19 +msgid "About" +msgstr "درباره" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:35 +#, php-format +msgid "All %d results displayed" +msgstr "نمایش همه نتایج %d" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:64 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:77 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:66 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:276 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:70 +msgid "Alpha-nav" +msgstr "الفبایی" + +#: /tmp/cache/587c83c09abaa/cf/cf0b3d87d2eb48f38f5f339303d5509c7535d13d7b010ad4840ee824430f7fe6.php:34 +msgid "Alphabetical index" +msgstr "نمایه الفبایی" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:555 +msgid "By group" +msgstr "بر پایه گروه" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:587 +msgid "By parent" +msgstr "بر پایه والد" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:477 +msgid "By scheme" +msgstr "بر پایه زیر واژگان" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:516 +msgid "By type" +msgstr "بر پایه نوع" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:119 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:132 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:117 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:331 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:125 +msgid "Changes-nav" +msgstr "جدید" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:122 +msgid "Clear limitations" +msgstr "پاک کردن محدودیت‌ها" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:74 +msgid "Contact us!" +msgstr "تماس با ما" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:108 +msgid "Content and search language" +msgstr "محتوا و زبان جست‌وجو" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:51 +msgid "Content language" +msgstr "زبان محتوا" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:732 +msgid "Download this concept in SKOS format:" +msgstr "بارگیری این مفهوم" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:144 +msgid "E-mail:" +msgstr "رایانامه" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:220 +msgid "Enter search term" +msgstr "وارد کردن عبارت جست‌وجو" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:148 +msgid "Enter your e-mail address" +msgstr "رایانامه خود را وارد کنید" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:140 +msgid "Enter your name" +msgstr "نام خود را وارد کنید" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:900 +#: /tmp/cache/587c83c13194c/5c/5c060d2297f64d66beb101ee34831f917ed8d33f97dadeca144430a1561433ec.php:69 +msgid "Error: Requested vocabulary not found!" +msgstr "خطا: واژه درخواست شده یافت نشد" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:890 +msgid "Error: Term \"%term%\" not found in vocabulary!" +msgstr "خطا: اصطلاح\"%اصطلاح%\" در واژگان پیدا نشد" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:34 +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:54 +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:194 +msgid "Feedback" +msgstr "بازخورد" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:64 +msgid "Feedback has been sent!" +msgstr "بازخورد فرستاده شده است" + +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:35 +msgid "Group index" +msgstr "نمایه گروه" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:101 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:114 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:99 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:313 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:107 +msgid "Group-nav" +msgstr "گروه ها" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:85 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:94 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:83 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:297 +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:55 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:91 +msgid "Hier-nav" +msgstr "سلسله مراتب" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:157 +msgid "Leave this field blank" +msgstr "این فیلد را خالی بگذارید" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:594 +msgid "Limit search" +msgstr "محدود کردن جست‌وجو" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:31 +msgid "Loading" +msgstr "بارگذاری" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:27 +msgid "Loading more items" +msgstr "در حال بارگذاری اقلام بیشتر" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:152 +msgid "Message:" +msgstr "پیام" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:136 +msgid "Name:" +msgstr "نام" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:23 +msgid "No results" +msgstr "نتیجه‌ای در بر ندارد" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:103 +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:111 +msgid "Not to a specific vocabulary" +msgstr "نه به یک واژگان به‌خصوص" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:233 +msgid "Search" +msgstr "جست‌وجو" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:59 +msgid "Search from vocabulary" +msgstr "جست‌وجو از واژگان" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:210 +msgid "Search language: any" +msgstr "همه زبان‌ها" + +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:340 +msgid "Search options" +msgstr "گزینه‌های جست‌وجو" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:161 +msgid "Send feedback" +msgstr "فرستادن بازخورد" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:51 +msgid "Show all breadcrumb paths" +msgstr "نمایش همه # مسیرها" + +#: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:72 +msgid "Skosmos version %version%" +msgstr "اسکاسموس نسخه %نسخه%" + +#: /tmp/cache/587c83c09abaa/9a/9a6d69d72b35f38585477d2f25d50cacf270791aa84e4d523f237566dd428822.php:229 +msgid "Submit search" +msgstr "فرستادن جست‌وجو" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:68 +msgid "Thank you for your feedback" +msgstr "از بازخورد شما سپاسگزاریم. به‌زودی به شما پاسخ داده می‌شود" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:129 +msgid "The search provided no results." +msgstr "جست‌وجو، نتیجه‌ای در بر نداشت" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:48 +msgid "There is no term for this concept in this language" +msgstr "اصطلاحی برای این مفهوم در این زبان نیست" + +#: /tmp/cache/587c83c09abaa/4a/4a8733799c4f4aa865ece4715881ffcbef92985ed08edc2acd445e7b0c129fab.php:173 +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:47 +msgid "Value is required and can not be empty" +msgstr "یک مقدار نیاز است و نمی‌تواند خالی باشد" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:27 +msgid "cc:attributionName" +msgstr "نام ارجاع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:29 +msgid "cc:attributionUrl" +msgstr "نشانی وب ارجاع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:25 +msgid "cc:license" +msgstr "مجوز" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:31 +msgid "cc:morePermissions" +msgstr "مجوزهای بیشتر" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:33 +msgid "cc:useGuidelines" +msgstr "رهنمودها را به‌کار برید" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:35 +msgid "dc:conformsTo" +msgstr "مطابق با" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:37 +msgid "dc:contributor" +msgstr "مشارکت کننده" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:39 +msgid "dc:coverage" +msgstr "پوشش" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:41 +msgid "dc:created" +msgstr "ایجاد شده" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:43 +msgid "dc:creator" +msgstr "ایجاد کننده" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:45 +msgid "dc:date" +msgstr "تاریخ" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:47 +msgid "dc:description" +msgstr "توضیح، شرح" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:49 +msgid "dc:format" +msgstr "قالب" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:51 +msgid "dc:identifier" +msgstr "شناسه" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:53 +msgid "dc:isReplacedBy" +msgstr "جایگزین شده است با" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:55 +msgid "dc:isRequiredBy" +msgstr "نیاز دارد" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:57 +msgid "dc:issued" +msgstr "تاریخ انتشار" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:59 +msgid "dc:language" +msgstr "زبان" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:61 +msgid "dc:license" +msgstr "مجوز" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:63 +msgid "dc:modified" +msgstr "آخرین بازنگری" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:65 +msgid "dc:publisher" +msgstr "ناشر" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:67 +msgid "dc:relation" +msgstr "رابطه" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:69 +msgid "dc:replaces" +msgstr "جایگزین ها" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:71 +msgid "dc:rights" +msgstr "حقوق" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:73 +msgid "dc:rightsHolder" +msgstr "دارنده حقوق" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:75 +msgid "dc:source" +msgstr "منبع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:77 +msgid "dc:source_help" +msgstr "منبع توضیح مفهوم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:79 +msgid "dc:spatial" +msgstr "پوشش فضایی" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:81 +msgid "dc:subject" +msgstr "موضوع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:83 +msgid "dc:temporal" +msgstr "پوشش موقت" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:85 +msgid "dc:title" +msgstr "عنوان" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:87 +msgid "dc:type" +msgstr "نوع" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:36 +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:256 +msgid "deprecated" +msgstr "این مفهوم از میان رفته است. این مفهوم را برای یادداشت به‌کار نبرید" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:89 +msgid "foaf:homepage" +msgstr "برگ نخست" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:91 +msgid "foaf:page" +msgstr "برگ" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:658 +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:542 +msgid "foreign prefLabel help" +msgstr "اصطلاح‌هایی برای این مفهوم در زبان‌های دیگر" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:660 +msgid "foreign prefLabels" +msgstr "در زبان های دیگر" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:39 +msgid "from all" +msgstr "در همه" + +#: /tmp/cache/587c83c09abaa/bf/bf6437cf02d4bf892eccfe46511488719628e22df92da5026f31c555a6a1fa6f.php:81 +#: /tmp/cache/587c83c09abaa/92/926cb0fdbe92b0165a1a13c21243442890c70779003bbc2fe1230ff221742de9.php:90 +#: /tmp/cache/587c83c09abaa/d1/d13f81e53ff33f31fff259d66f8ddbf7cfc39d25c6219ff727553feca6d87d37.php:79 +#: /tmp/cache/587c83c09abaa/c7/c7175f1dcd0b8bfa06a77b42c0566cc09ea4bf4805eb07a09448ad205bfcceea.php:293 +#: /tmp/cache/587c83c13194c/07/073354bd24405bc5c963d187d0034352a7a24a3550861ca791f826417bb9cecd.php:87 +msgid "hierarchy-disabled-help" +msgstr "در این واژگان، سطح بالای سلسله‌مراتب نشان داده نمی‌شود" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:93 +msgid "isothes:ConceptGroup" +msgstr "گروه مفهومی" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:97 +msgid "isothes:ThesaurusArray" +msgstr "آرایه مفاهیم خویشاوند" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:99 +msgid "isothes:broaderGeneric" +msgstr "مفهوم اعم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:101 +msgid "isothes:broaderInstantial" +msgstr "مفهوم اعم (موردی)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:103 +msgid "isothes:broaderPartitive" +msgstr "مفهوم اعم (جزئی)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:105 +msgid "isothes:narrowerGeneric" +msgstr "مفاهیم خاص" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:107 +msgid "isothes:narrowerInstantial" +msgstr "مفاهیم خاص (موردی)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:109 +msgid "isothes:narrowerPartitive" +msgstr "مفاهیم خاص (جزئی)" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:95 +msgid "isothes:superGroup" +msgstr "ابرگروه" + +#: /tmp/cache/587c83c09abaa/58/58e9c1cebb82d52daf56fab57cd7b86ed47b1d8a86a915177156746eef73248e.php:66 +msgid "layout designed by Hahmo" +msgstr "طراحی چیدمان: Hahmo design" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:74 +msgid "limited to group" +msgstr "گروه" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:67 +msgid "limited to parent" +msgstr "والد" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:81 +msgid "limited to scheme" +msgstr "محدود به طرح" + +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:29 +msgid "limited to type" +msgstr "نوع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:113 +msgid "owl:sameAs" +msgstr "مفاهیم معادل" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:111 +msgid "owl:versionInfo" +msgstr "نسخه" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:115 +msgid "rdf:type" +msgstr "نوع" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:117 +msgid "rdf:type_help" +msgstr "نوع موجودیت" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:123 +msgid "rdfs:comment" +msgstr "توصیف" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:119 +msgid "rdfs:label" +msgstr "برچسب" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:121 +msgid "rdfs:seeAlso" +msgstr "همچنین ببینید" + +#: /tmp/cache/587c83c09abaa/f2/f29f57cf31b29541d6f810d43d1f7a07e79cfddcf23678f04612a410c0f0607b.php:43 +msgid "selected" +msgstr "گزیده" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:143 +msgid "skos:altLabel" +msgstr "اصطلاح‌های مدخل" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:179 +msgid "skos:altLabel_help" +msgstr "اصطلاح‌های جایگزین برای مفهوم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:133 +msgid "skos:broadMatch" +msgstr "مفاهیم منطبق اعم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:191 +msgid "skos:broadMatch_help" +msgstr "مفاهیم منطبق اعم در واژگان‌های دیگر" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:129 +msgid "skos:broader" +msgstr "مفهوم اعم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:171 +msgid "skos:broader_help" +msgstr "مفهوم اعم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:169 +msgid "skos:changeNote" +msgstr "یادداشت تغییر" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:147 +msgid "skos:closeMatch" +msgstr "مفاهیم نزدیک" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:189 +msgid "skos:closeMatch_help" +msgstr "مفاهیم نزدیک در واژگان دیگر" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:161 +msgid "skos:definition" +msgstr "تعریف" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:185 +msgid "skos:definition_help" +msgstr " توضیح کاملی از معنی در نظر گرفته شده برای یک مفهوم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:167 +msgid "skos:editorialNote" +msgstr "یادداشت ویراستار" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:145 +msgid "skos:exactMatch" +msgstr "مفاهیم کاملاً مطابق" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:187 +msgid "skos:exactMatch_help" +msgstr "مفاهمی کاملاً مطابق در واژگان دیگر" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:163 +msgid "skos:example" +msgstr "نمونه" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:155 +msgid "skos:hasTopConcept" +msgstr "دارای مفهوم بالاست" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:165 +msgid "skos:historyNote" +msgstr "یادداشت پیشینه" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:151 +msgid "skos:inScheme" +msgstr "طرح کلی مفهوم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:149 +msgid "skos:member" +msgstr "اعضای گروه" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:181 +msgid "skos:member_help" +msgstr "اعضای گروه" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:135 +msgid "skos:narrowMatch" +msgstr "مفاهیم اخص منطبق" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:193 +msgid "skos:narrowMatch_help" +msgstr "مفاهیم اخص منطبق در واژگان دیگر." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:131 +msgid "skos:narrower" +msgstr "مفاهیم اخص" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:173 +msgid "skos:narrower_help" +msgstr "مفاهیم اخص" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:157 +msgid "skos:note" +msgstr "یادداشت" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:175 +msgid "skos:note_help" +msgstr "یادداشت‌ها" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:234 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:141 +msgid "skos:prefLabel" +msgstr "واژه مرجح" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:137 +msgid "skos:related" +msgstr "مفاهیم مرتبط" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:139 +msgid "skos:relatedMatch" +msgstr "مفاهیم مرتبط و منطبق" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:183 +msgid "skos:related_help" +msgstr "مفاهیم مرتبط با این مفهوم." + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:159 +msgid "skos:scopeNote" +msgstr "یادداشت دامنه" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:177 +msgid "skos:scopeNote_help" +msgstr "یادداشت‌ها درباره کاربرد و دامنه مفهوم" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:153 +msgid "skos:topConceptOf" +msgstr "از واژگان" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:197 +msgid "skosext:DeprecatedConcept" +msgstr "مفهوم منسوخ" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:195 +msgid "skosext:partOf" +msgstr "هست بخشی از " + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:199 +msgid "skosext:partOf_help" +msgstr "کلی که این مفهوم بخشی از آن است." + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:548 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:201 +#: /tmp/cache/587c83c09abaa/8a/8aeec9eddcf0848575d119210eda5a849c129c96ea86195b4448536a02a47817.php:449 +msgid "skosmos:memberOf" +msgstr "متعلق به گروه" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:611 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:205 +msgid "skosmos:memberOfArray" +msgstr "متعلق به آرایه" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:609 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:207 +msgid "skosmos:memberOfArray_help" +msgstr "آرایه‌ای که این مفهوم از آن است" + +#: /tmp/cache/587c83c09abaa/3c/3c4ea3202d0add91bf2080022b707c23115e0beb434024ddb2de27749e6bbe83.php:546 +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:203 +msgid "skosmos:memberOf_help" +msgstr "گروهی که این مفهوم از آن است" + +#: /tmp/cache/587c83c09abaa/4e/4e05e5051b20c875609479922a558d59b8500ae386eaf79bc460e69d8781a753.php:23 +msgid "zxx-x-taxon" +msgstr "نام علمی" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:168 +msgid "About page" +msgstr "درباره" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:138 +msgid "Alternate terms" +msgstr "اصطلاح‌های متناوب" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:130 +msgid "Concept language" +msgstr "زبان" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:118 +msgid "Count" +msgstr "قابل شمارش" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:157 +msgid "Download this vocabulary as SKOS/RDF:" +msgstr "دریافت واژگان به‌عنوان SKOS/RDF" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:205 +msgid "Help" +msgstr "کمک" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:142 +msgid "Hidden terms" +msgstr "اصطلاح‌های پنهان" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:58 +msgid "Interface language" +msgstr "زبان رابط کاربری" + +#: /tmp/cache/587c83c13194c/f9/f9c816822168f230ef0bfed735f5923aab99d389ce8b2c6b2f5fcd5d400bc275.php:26 +msgid "No vocabularies on the server!" +msgstr " واژگان‌ها در سرور نیست" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:134 +msgid "Preferred terms" +msgstr "اصطلاح‌های مرجح" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:111 +msgid "Resource counts by type" +msgstr "شمارش منبع بر پایه نوع" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:124 +msgid "Term counts by language" +msgstr "شمارش اصطلاح بر پایه زبان" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:116 +msgid "Type" +msgstr "نوع" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:146 +msgid "Vocabularies-nav" +msgstr "واژگان" + +#: /tmp/cache/587c83c13194c/ab/abd3710fda280028e428e4bc415383b12c9a30cc34eadffd21ff4130ae796b99.php:24 +msgid "Vocabulary information" +msgstr "اطلاعات واژگان" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:199 +msgid "helper_help" +msgstr "برای دیدن راهنما، مکان‌نمای خود را روی متن دارای زیرخط نقطه‌چین نگه دارید" + +#: /tmp/cache/587c83c13194c/0b/0bbfc29e05e244fa07889ce1678840902f16e5f76560e00137de0cc3bb084b8b.php:201 +msgid "search_example_text" +msgstr "برای جست‌وجوی کوتاه، نشانه * را مانند *حیوان* یا  *حق ثبت اختراع* به‌کار برید. اگر برای پایان واژه‌ها این نشانه را هم به کار نبرید، خودبه‌خود جست‌وجوی کوتاه انجام خواهد شد. بنابراین جست‌وجوی گربه، نتایجی همانند جست‌وجوی گربه* را خواهد داشت" + +msgid "feedback_enter_name_email" +msgstr "" From 8c65f39dcd9edfe9ac95682bbd106c28687f5f71 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Mon, 27 Aug 2018 15:17:51 +0300 Subject: [PATCH 121/173] fixes #714 --- resource/js/docready.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resource/js/docready.js b/resource/js/docready.js index 57b5688ee..b59a113a8 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -387,7 +387,8 @@ $(function() { // DOCUMENT READY } var uri = $('.uri-input-box').html(); var base_href = $('base').attr('href'); // see #315, #633 - var redirectUrl = base_href + vocab + '/' + lang + '/page/?uri=' + uri; + var clangIfSet = clang !== lang ? "&clang=" + clang : ""; // see #714 + var redirectUrl = base_href + vocab + '/' + lang + '/page/?uri=' + uri + clangIfSet; window.location.replace(encodeURI(redirectUrl)); return false; } From 28edcb1a35d6fd67d5a99dbfaed0b59138dfd291 Mon Sep 17 00:00:00 2001 From: Henri Ylikotila Date: Tue, 20 Mar 2018 17:46:49 +0200 Subject: [PATCH 122/173] sorting concept property values with natural case sort when sortByNotation is true, fixes #737 --- model/Concept.php | 3 ++- model/ConceptProperty.php | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index a5217ee77..cd6538233 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -533,7 +533,8 @@ public function getProperties() if ($superprop) { $superprop = EasyRdf\RdfNamespace::shorten($superprop) ? EasyRdf\RdfNamespace::shorten($superprop) : $superprop; } - $propobj = new ConceptProperty($prop, $proplabel, $superprop); + $notsort = $this->vocab->getConfig()->sortByNotation(); + $propobj = new ConceptProperty($prop, $proplabel, $superprop, $notsort); if ($propobj->getLabel() !== null) { // only display properties for which we have a label diff --git a/model/ConceptProperty.php b/model/ConceptProperty.php index 5bd771892..e61b2ba0a 100644 --- a/model/ConceptProperty.php +++ b/model/ConceptProperty.php @@ -15,19 +15,21 @@ class ConceptProperty private $values; /** flag whether the values are sorted, as we do lazy sorting */ private $is_sorted; + private $sort_by_notation; /** * Label parameter seems to be optional in this phase. * @param string $prop property type eg. 'rdf:type'. * @param string $label */ - public function __construct($prop, $label, $super=null) + public function __construct($prop, $label, $super=null, $notsort=false) { $this->prop = $prop; $this->label = $label; $this->values = array(); $this->is_sorted = true; $this->super = $super; + $this->sort_by_notation = $notsort; } /** @@ -86,7 +88,7 @@ private function sortValues() { if (!empty($this->values)) { uksort($this->values, function($a, $b) { - return strcoll(strtolower($a),strtolower($b)); + return $this->sort_by_notation ? strnatcasecmp($a, $b) : strcoll(strtolower($a),strtolower($b)); }); } $this->is_sorted = true; From 67a466e97b3e1cf0a409f745c80e428033f4e6f8 Mon Sep 17 00:00:00 2001 From: joelitak Date: Fri, 24 Aug 2018 15:31:54 +0300 Subject: [PATCH 123/173] Fixed the variable name notsort for a clearer sort_by_notation --- model/Concept.php | 4 ++-- model/ConceptProperty.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/model/Concept.php b/model/Concept.php index cd6538233..d1625bbed 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -533,8 +533,8 @@ public function getProperties() if ($superprop) { $superprop = EasyRdf\RdfNamespace::shorten($superprop) ? EasyRdf\RdfNamespace::shorten($superprop) : $superprop; } - $notsort = $this->vocab->getConfig()->sortByNotation(); - $propobj = new ConceptProperty($prop, $proplabel, $superprop, $notsort); + $sort_by_notation = $this->vocab->getConfig()->sortByNotation(); + $propobj = new ConceptProperty($prop, $proplabel, $superprop, $sort_by_notation); if ($propobj->getLabel() !== null) { // only display properties for which we have a label diff --git a/model/ConceptProperty.php b/model/ConceptProperty.php index e61b2ba0a..48560e189 100644 --- a/model/ConceptProperty.php +++ b/model/ConceptProperty.php @@ -22,14 +22,14 @@ class ConceptProperty * @param string $prop property type eg. 'rdf:type'. * @param string $label */ - public function __construct($prop, $label, $super=null, $notsort=false) + public function __construct($prop, $label, $super=null, $sort_by_notation=false) { $this->prop = $prop; $this->label = $label; $this->values = array(); $this->is_sorted = true; $this->super = $super; - $this->sort_by_notation = $notsort; + $this->sort_by_notation = $sort_by_notation; } /** From abfd08fd4657a92a4e8d9637e999e2be54b623ee Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 27 Aug 2018 15:54:50 +0300 Subject: [PATCH 124/173] Avoid double encoding of search query string. Fixes #763 --- controller/WebController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/WebController.php b/controller/WebController.php index 51315350a..9b6fb8043 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -404,7 +404,7 @@ public function invokeGlobalSearch($request) 'search_results' => $searchResults, 'rest' => $parameters->getOffset()>0, 'global_search' => true, - 'term' => $request->getQueryParam('q'), + 'term' => $request->getQueryParamRaw('q'), 'lang_list' => $langList, 'vocabs' => str_replace(' ', '+', $vocabs), 'vocab_list' => $vocabList, @@ -472,7 +472,7 @@ public function invokeVocabularySearch($request) 'limit_scheme' => $request->getQueryParam('scheme') ? explode('+', $request->getQueryParam('scheme')) : null, 'group_index' => $vocab->listConceptGroups($request->getContentLang()), 'parameters' => $parameters, - 'term' => $request->getQueryParam('q'), + 'term' => $request->getQueryParamRaw('q'), 'types' => $vocabTypes, 'explicit_langcodes' => $langcodes, 'request' => $request, From 9d61b825c638ca73b6e74983a73b4a33192d9976 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Tue, 28 Aug 2018 12:43:06 +0300 Subject: [PATCH 125/173] fix issue regarding updating the json-ld data --- resource/js/scripts.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resource/js/scripts.js b/resource/js/scripts.js index 06afe4dba..2ebc1c790 100644 --- a/resource/js/scripts.js +++ b/resource/js/scripts.js @@ -90,13 +90,20 @@ function updateContent(data) { function updateJsonLD(data) { var $jsonld = $('script[type="application/ld+json"]'); + var $newJsonLD = $(data).filter('script[type="application/ld+json"]'); if ($jsonld[0]) { $jsonld[0].innerHTML = "{}"; - var $newJsonLD = $(data).filter('script[type="application/ld+json"]'); if ($newJsonLD[0]) { $jsonld[0].innerHTML = $newJsonLD[0].innerHTML; } } + else if ($newJsonLD[0]) { + // insert after the first JS script as it is in the template + var elemBefore = $('script[type="text/javascript"]')[0]; + if (elemBefore) { + $newJsonLD.insertAfter(elemBefore); + } + } } function updateTopbarLang(data) { From b9b9702dd9f3a25d51d2274a679bb8d13fa4a9e0 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Tue, 28 Aug 2018 13:55:51 +0300 Subject: [PATCH 126/173] Specify skosmos:defaultEndpoint as a resource, not literal. Fixes #786 --- config.ttl.dist | 2 +- migrate-config.php | 2 +- model/GlobalConfig.php | 7 ++++++- tests/testconfig.ttl | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/config.ttl.dist b/config.ttl.dist index a35aad7c0..e38bb0644 100644 --- a/config.ttl.dist +++ b/config.ttl.dist @@ -18,7 +18,7 @@ :config a skosmos:Configuration ; # SPARQL endpoint # a local Fuseki server is usually on localhost:3030 - #skosmos:sparqlEndpoint "http://localhost:3030/ds/sparql" ; + #skosmos:sparqlEndpoint ; # use the dev.finto.fi endpoint where the example vocabularies reside skosmos:sparqlEndpoint ; # sparql-query extension, or "Generic" for plain SPARQL 1.1 diff --git a/migrate-config.php b/migrate-config.php index 0f31a9cc0..08cbf1936 100644 --- a/migrate-config.php +++ b/migrate-config.php @@ -98,7 +98,7 @@ function parse_vocabularies_file($vocabulariesFile) :config a skosmos:Configuration ; # SPARQL endpoint # a local Fuseki server is usually on localhost:3030 - skosmos:sparqlEndpoint "$endpoint" ; + skosmos:sparqlEndpoint <$endpoint> ; # sparql-query extension, or "Generic" for plain SPARQL 1.1 # set to "JenaText" instead if you use Fuseki with jena-text index skosmos:sparqlDialect "$dialect" ; diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index b0d7fadd7..6260cc312 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -164,7 +164,12 @@ public function getSparqlTimeout() */ public function getDefaultEndpoint() { - return $this->getLiteral('skosmos:sparqlEndpoint', 'http://localhost:3030/ds/sparql'); + $endpoint = $this->resource->get('skosmos:sparqlEndpoint'); + if ($endpoint) { + return $endpoint->getUri(); + } else { + return 'http://localhost:3030/ds/sparql'; + } } /** diff --git a/tests/testconfig.ttl b/tests/testconfig.ttl index 89987dbd9..b8db0b06b 100644 --- a/tests/testconfig.ttl +++ b/tests/testconfig.ttl @@ -21,7 +21,7 @@ :config a skosmos:Configuration ; # SPARQL endpoint # a local Fuseki server is usually on localhost:3030 - skosmos:sparqlEndpoint "http://localhost:13030/ds/sparql" ; + skosmos:sparqlEndpoint ; # sparql-query extension, or "Generic" for plain SPARQL 1.1 # set to "JenaText" instead if you use Fuseki with jena-text index skosmos:sparqlDialect "Generic" ; From ee409000e3ae950005e7a93516c114dd19d6cc95 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Tue, 28 Aug 2018 15:09:41 +0300 Subject: [PATCH 127/173] updated German translations for 100% coverage. Credit: Jonas Waeber --- .../translations/de/LC_MESSAGES/skosmos.mo | Bin 11378 -> 11576 bytes resource/translations/skosmos_de.po | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resource/translations/de/LC_MESSAGES/skosmos.mo b/resource/translations/de/LC_MESSAGES/skosmos.mo index 493cff9e99b4c4cbe017ad5cb61b0c36a0ffd07e..6a1748479b94ec629a7efa36953dd4cc7f7baafc 100644 GIT binary patch delta 3787 zcmYk;3s6->9LMoh1W_)QJOrV*$1tCWi9^0Ce4CGal$dFHg(Dzx(FIfgclQigraGo9goKYRA<+5PYCIY)n;ba-;` zd|b0y!?B;Zhj=B@m>1DK6pVg$zAWeiQtUDy&6F&Q0ffqgIz2O)oE zB0teM6Lq~bY|vCvXimiv)R;Bc8rS39xZBphkExuWwDp%z3Eaf{@lUIlo7CSBR6nD! zElxw4m`dz`)!5AhnIQ#bb{>=P2UH^eqB4!4mu8rV9!x>C?}(b=1K0)!+3S;02^84t zrKt9cQ3=Z2eMH zKQE(JZV!6#Bxd1N3~FX=NY8NQIWVJ*tCD)JpWXjM&r>t5Ato+w*nS zZK!_tq53;)&rhMo{UU+&S4S7AkT*~R+(zwLL}EBo59)dXYN@@bMEjry7=~J@aj2Cl zMBV=!s=uYEtyqIvsa?nr=Di>V-FVu11vS9msMo0t7joZUTEkLzfjg1|n zw&*?UC#ad9Lrvf(d;SM1!C*AKYbLExOXx*4%&_OZkZm)AQ8!FNb?CF#=c4Xkh)QUs zyC`f7WGi1TeDCD<)AVjW1ViV2T&`s$kx{)e`Y5? z>Zbv9{S0bimr;rShDs!o{Y=sOpGrX$526~3Ld{?*PHAdP5q9MKBp-+sE4!;d3?+s)P2Y8^$V!>zuD`5q56+=!u6@Bm2T$*`4@{q7C-t&WCCh{N@Uf| zDpW_iP%E_$HDCiO!EaGByo&mS|Bh_0iE9_G&p_4p!_hbi`7=BC8GxsP6tv_~_p$%j z5;e0N>nPN>I~Vm3mZ36VhFbb{n2wumeFJKbzd$|Z=TQ&$4b%$ULM8q$YGOeTcdH@} z)u9)aKnGL@Jx~KbjOutCYD=b~+PkO$W}_0DhZ<-Fs@)n?yA7!R>g@Sm?8f-!AO$@X zmrxnqMs2}A_Pllb@Cqg2lhmi;daOVV6wAKJHrNxrsQV|N5-Y%YI2T9ZHPl41J7`?? zKZgPjq?w3Xi3-#nE=InRW)mv&del}lpkA|csE%%-gH1bz+oz-Uye}$|Tx&7vEec|D zti=e%H=8MF>9(RWeitM01JqU=$1C_LYQXwV;Ta#p=A55G-G2tj#au)s9^IM$oS+x= z(2lhhq7r!?8{hwR6f&sTjT-PP9EcZD9kuTgo=HDs&&*>OjaA5-WtOA1a0lvbID#7B zW9tQUIKPE`F{x`fq48Z=e=X%KDm3FIs2NtH2ChZDc5kDW{ur`-=B&NmgsihTPeu(m z64l;^9xO*~?IKjdTTs_`qgL#L43?BP!F)=E`~^K2&os4U4mQDEp(Zi$qu->YVfqvM z2^|Z=nAfd$sG{%`(Sy+1%p-IRCY17~kS`{_&mu}u#5h8Swre#JAf6_kAj*gmVhQmE zF_oAV+8dLevxkxnR-^H#;P)9@9&TNU+lY~b_HHb(ml#AmA8PGMO59B8|3`ODDnkQ2 z-gd>59O5BjF`>O3Mnn)>iNa8oC$;lVN-UchO4Jd3h*Cnwi-aC=me~}98a%0yvnkCC zUGyXcH&D{?DzS{v22CXN-F=p5N@!2?(%(7eQ_u#^u@x_)Ys=NR)|QKKJJE?~LFheP zLG&W*(ZOt?G@Z~tMS5Y^5cd*y4j+Yeq0O<~gUcyBN7ND*V;$=a&Y`9XC+un_ceuostuW@(L+rI0bYWzGFsFIZa0t1~?x>I)10ZpWk@y z4CywSQJkFofLm7PIzE49;~2#!4*C7G^C>G|MP8wkJk(B$Hl_Z`5-v3kkXb*peMawc@|q^Aa=nvn1TG6 z0sI8uXw>xyJ{?m)p(Q6uFc`})43}YR+-T45!5HcX?D_Mk1R5{_Z(3V%llsd<_0tF2 z;xMF%DZoUWgDJ*gh7^?98H~bb30vTwr~&@M2n=OZR^7y72&SWEm~9 z{cc9}x69V+QR99e!TPJCbDWS@Py^gR?b&@)rjPA)|43hgtxz4eL#De55N=g}SfSv4z8^Jv@(kjc%cCbkQmr+o7(%fEs8ds$D)db&T4YDr*gD z#&xKP9k=x}s06Q~R@%8iK}+`l)zFVoRS!Y7$wZ@WNJVwn!(JbV>R=Qqp^5hTOwOjD0)cLsI;6%5q-e}{q|hDK`u>#TvIP?>kMW}(^*Laj`WJwFxsGv)l~`g+v$ z9jFN$LM8eWDv`^mExoI{-hVeWHRynvK?aWTGo~MQqP~HT!)tg9_2~_2=lhU^S|gC$ zO*AU;3|r4etz0gu-y+n^=UOY#(cW&MppJK=GTw)J>W`o@K7st1%lv3&ji?V(NUSkQ z7=g*y4|U%()Jl}1?pusXqy|&*0A}L#Sk_+&#PC^C!;YvK^hb3x4E4#(K@B_(^^i_S z9uqSUb>A9${cBYFAMEwhsQ$0n^S4neeIGsO?{R$pJQApBfWgSBn+d3n=AxEt0ct=m zD#5*|8P=md-9IARX|AEpKS7-ji8E#>CLw=jHa~r^8nxn=912+!uApWX-oa-q>YLpK z^$@;_$~*_P^pi0ji|u(YYL9DCPx)7<57bfA3YF&A&61{m1U=WxuRo{PG#5|vO5&ceMo1Un@7CQyue2+NS?&#XkZ-v2KtXz#v5 zK7!@~D&yOzEqH`_y`mC*9i^d%dT&(waj3m6MJ2Mzx*hfQ97L_iS=59sqE_rO1~R_6 zMZtv+QCsjBuVc$jz5#EeX5NVE$gi`ngCL}-i9sdOAJZ@w^{}q6Zbc<>2=y@kjLF!5 zjs|Sqg_|)3)zNs=OlG3?YB>hrx7Z$!p_cMD)YJX|HGqGT&uH{ePs3g~0+mn&Y9(t? z6F!o}`s?93&It{C7M0=esHJa2R^LQ+^<94v)2WX{4Y&l=eiQ2H-jCYb!>ELRwbvU^ zOa2gfzD-M}FO!lxdlU>9LQ(c48#4!k*M)9Y%PGcL^7hgQin_wotEvj<<\n" +"PO-Revision-Date: 2018-08-28 05:58+0000\n" +"Last-Translator: Jonas Waeber \n" "Language-Team: German (http://www.transifex.com/national-library-of-finland/skosmos/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -760,4 +760,4 @@ msgid "search_example_text" msgstr "Für eine Suche mit Trunkierung, nutzen Sie bitte ein * (z.B. *wald oder *baum*). Werden nur kurze Begriffe verwendet, so wird automatisch ein * angehängt. Die Suche nach dem Begriff Wissen ergibt das selbe Resultat wie Wissen*." msgid "feedback_enter_name_email" -msgstr "" +msgstr "Wenn Sie eine direkte Antwort erhalten möchten, geben Sie bitte Ihren Namen und Ihre E-Mail Adresse an. Sie können aber auch Feedback anonym abgeben." From fd65a22d1e1af3b66fc6714faf3f923f593b113a Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Tue, 28 Aug 2018 08:52:46 +1200 Subject: [PATCH 128/173] Fix PHP syntax when calling a method --- tests/ConceptPropertyTest.php | 2 +- tests/ConceptTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ConceptPropertyTest.php b/tests/ConceptPropertyTest.php index 6e6f14dca..ac96d4fd4 100644 --- a/tests/ConceptPropertyTest.php +++ b/tests/ConceptPropertyTest.php @@ -82,7 +82,7 @@ public function testAddValue() { $props = $concept->getProperties(); $prevlabel; foreach($props['skos:narrower'] as $val) { - $label = is_string($val->getLabel()) ? $val->getLabel() : $val->getLabel()-getValue(); + $label = is_string($val->getLabel()) ? $val->getLabel() : $val->getLabel()->getValue(); if ($prevlabel) $this->assertEquals(1, strnatcmp($prevlabel, $label)); $prevlabel = $label; diff --git a/tests/ConceptTest.php b/tests/ConceptTest.php index 85857719b..29c3a3d06 100644 --- a/tests/ConceptTest.php +++ b/tests/ConceptTest.php @@ -181,7 +181,7 @@ public function testGetPropertiesAlphabeticalSortingOfPropertyValues() $props = $concept->getProperties(); $prevlabel; foreach($props['skos:narrower'] as $val) { - $label = is_string($val->getLabel()) ? $val->getLabel() : $val->getLabel()-getValue(); + $label = is_string($val->getLabel()) ? $val->getLabel() : $val->getLabel()->getValue(); if ($prevlabel) $this->assertEquals(1, strnatcmp($prevlabel, $label)); $prevlabel = $label; From 720bea0245cce633d9bfc97049ca6187abc64c4d Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Tue, 28 Aug 2018 09:11:17 +1200 Subject: [PATCH 129/173] Set a value for variable when declaring it --- model/LabelSkosXL.php | 2 +- tests/ConceptPropertyTest.php | 2 +- tests/ConceptTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model/LabelSkosXL.php b/model/LabelSkosXL.php index 5dff748b2..4aa1a0269 100644 --- a/model/LabelSkosXL.php +++ b/model/LabelSkosXL.php @@ -9,7 +9,7 @@ public function __construct($model, $resource) } public function getPrefLabel() { - $label; + $label = null; $labels = $this->resource->allResources('skosxl:prefLabel'); foreach($labels as $labres) { $label = $labres->getLiteral('skosxl:literalForm'); diff --git a/tests/ConceptPropertyTest.php b/tests/ConceptPropertyTest.php index ac96d4fd4..938091f70 100644 --- a/tests/ConceptPropertyTest.php +++ b/tests/ConceptPropertyTest.php @@ -80,7 +80,7 @@ public function testAddValue() { $concepts = $vocab->getConceptInfo('http://www.skosmos.skos/test/ta1', 'en'); $concept = $concepts[0]; $props = $concept->getProperties(); - $prevlabel; + $prevlabel = null; foreach($props['skos:narrower'] as $val) { $label = is_string($val->getLabel()) ? $val->getLabel() : $val->getLabel()->getValue(); if ($prevlabel) diff --git a/tests/ConceptTest.php b/tests/ConceptTest.php index 29c3a3d06..25d35ca74 100644 --- a/tests/ConceptTest.php +++ b/tests/ConceptTest.php @@ -179,7 +179,7 @@ public function testGetPropertiesAlphabeticalSortingOfPropertyValues() $results = $this->vocab->getConceptInfo('http://www.skosmos.skos/test/ta1', 'en'); $concept = reset($results); $props = $concept->getProperties(); - $prevlabel; + $prevlabel = null; foreach($props['skos:narrower'] as $val) { $label = is_string($val->getLabel()) ? $val->getLabel() : $val->getLabel()->getValue(); if ($prevlabel) From 23a0df115d12dd22d8b6bb45b4470dcc2856b309 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Tue, 28 Aug 2018 09:12:50 +1200 Subject: [PATCH 130/173] Avoid type coercion in JS when comparing values --- resource/js/docready.js | 2 +- resource/js/hierarchy.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resource/js/docready.js b/resource/js/docready.js index b59a113a8..6de523918 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -775,7 +775,7 @@ $(function() { // DOCUMENT READY var emailMessageVal = $("#message").val(); var emailAddress = $("#email").val(); var requiredFields = true; - if (emailAddress != '' && emailAddress.indexOf('@') === -1) { + if (emailAddress !== '' && emailAddress.indexOf('@') === -1) { $("#email").addClass('missing-value'); requiredFields = false; } diff --git a/resource/js/hierarchy.js b/resource/js/hierarchy.js index 31ca18669..2deb8fbe4 100644 --- a/resource/js/hierarchy.js +++ b/resource/js/hierarchy.js @@ -129,7 +129,7 @@ function createConceptObject(conceptUri, conceptData) { */ function attachTopConceptsToSchemes(schemes, currentNode, parentData) { for (var i = 0; i < schemes.length; i++) { - if (parentData[currentNode.uri].tops.indexOf(schemes[i].uri) != -1) { + if (parentData[currentNode.uri].tops.indexOf(schemes[i].uri) !== -1) { if(Object.prototype.toString.call(schemes[i].children) !== '[object Array]' ) { schemes[i].children = []; } From 431de131845c84caaa4f5edf39f102ee99e0b429 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Tue, 28 Aug 2018 09:18:41 +1200 Subject: [PATCH 131/173] Avoid declaring a variable twice --- model/sparql/GenericSparql.php | 1 - 1 file changed, 1 deletion(-) diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index 575ce5c60..d3e6fd703 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -1886,7 +1886,6 @@ private function transformParentListResults($result, $lang) $ret[$uri]['exact'] = $row->exact->getUri(); } if (isset($row->tops)) { - $topConceptsList=array(); $topConceptsList=explode(" ", $row->tops->getValue()); // sort to garantee an alphabetical ordering of the URI sort($topConceptsList); From 5b5702f84d5cc8522f538624c4ef2d9eeb60e618 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Tue, 28 Aug 2018 09:19:27 +1200 Subject: [PATCH 132/173] Remove unused variable --- model/ConceptPropertyValueLiteral.php | 1 - 1 file changed, 1 deletion(-) diff --git a/model/ConceptPropertyValueLiteral.php b/model/ConceptPropertyValueLiteral.php index 039fabfad..bb4492493 100644 --- a/model/ConceptPropertyValueLiteral.php +++ b/model/ConceptPropertyValueLiteral.php @@ -67,7 +67,6 @@ public function getNotation() public function hasXlProperties() { - $ret = array(); $graph = $this->resource->getGraph(); $resources = $graph->resourcesMatching('skosxl:literalForm', $this->literal); return !empty($resources); From 28cb9ea3f93a6f788175c8a4a50edf2c72d55a5c Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Tue, 28 Aug 2018 09:25:25 +1200 Subject: [PATCH 133/173] Remove duplicated semicolon --- model/sparql/GenericSparql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index d3e6fd703..8af3ec379 100644 --- a/model/sparql/GenericSparql.php +++ b/model/sparql/GenericSparql.php @@ -768,7 +768,7 @@ protected function formatTypes($types) { } } - return implode(' UNION ', $typePatterns);; + return implode(' UNION ', $typePatterns); } /** From afafd5f2aa9b8769eb23408d864575482510c1d3 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 09:09:51 +0300 Subject: [PATCH 134/173] Add Vagrantfile and Ansible Playbook setup for deploying and running Skosmos in virtual environment --- Vagrantfile | 25 ++++ ansible/.DS_Store | Bin 0 -> 6148 bytes ansible/playbook.retry | 1 + ansible/playbook.yml | 16 +++ ansible/roles/.DS_Store | Bin 0 -> 8196 bytes ansible/roles/base/tasks/main.yml | 5 + ansible/roles/fuseki/files/fuseki | 5 + ansible/roles/fuseki/tasks/main.yml | 93 +++++++++++++ ansible/roles/openjdk/tasks/main.yml | 5 + ansible/roles/skosmos/files/000-default.conf | 16 +++ ansible/roles/skosmos/files/config.ttl.dist | 130 +++++++++++++++++++ ansible/roles/skosmos/tasks/main.yml | 58 +++++++++ 12 files changed, 354 insertions(+) create mode 100644 Vagrantfile create mode 100644 ansible/.DS_Store create mode 100644 ansible/playbook.retry create mode 100644 ansible/playbook.yml create mode 100644 ansible/roles/.DS_Store create mode 100644 ansible/roles/base/tasks/main.yml create mode 100644 ansible/roles/fuseki/files/fuseki create mode 100644 ansible/roles/fuseki/tasks/main.yml create mode 100644 ansible/roles/openjdk/tasks/main.yml create mode 100644 ansible/roles/skosmos/files/000-default.conf create mode 100644 ansible/roles/skosmos/files/config.ttl.dist create mode 100644 ansible/roles/skosmos/tasks/main.yml diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 000000000..c79e7e00a --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,25 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure(2) do |config| + + config.vm.box = "ubuntu/xenial64" + config.vm.network "forwarded_port", guest: 80, host: 8040 + config.vm.post_up_message = "Skosmos up and running at localhost:8040/Skosmos" + + config.vm.synced_folder "", "/var/www/html/Skosmos" + + config.vm.provider "virtualbox" do |vb| + vb.memory = "4096" + vb.cpus = "2" + # disable creating a log file to root folder: + vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ] + end + + config.vm.provision "ansible" do |ansible| + ansible.playbook = "ansible/playbook.yml" + ansible.verbose = "vvv" + ansible.compatibility_mode = "2.0" + end + +end diff --git a/ansible/.DS_Store b/ansible/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a565689de842ae81156e4c0d241fcd5c1365fdf0 GIT binary patch literal 6148 zcmeH~I|>3p42BaQAlO)1PU8W*!6149FCad;g$2caj_#iaf~&QN{DI`3$t22t#m+`V zbaOwiMHV75gPY3A!oU>!sa&O(PA+mg-%j1J?>ny=Wv$h~@f)w_c}yVz5+DH*AORBi zAp&-9!)EhPMiL+a5_l4@_d|i3*3=g2uMPws0iYA4-LUpq0$MBqt*I>(8JI>ZG+Nci z5X*Zzv}9dPZK2UFn!|_YKdVhKFpYN6f(=Zo3j+y|z<|Iw_6xiJckoa1|Dc6i5+H#; zBcPM*e!Ia#<=y)Bc$Pn8*47OU^>T!lj{t1!Dqh0fa9(Tyt*I>(85lnV90LOhe3ifh Dr(hGD literal 0 HcmV?d00001 diff --git a/ansible/playbook.retry b/ansible/playbook.retry new file mode 100644 index 000000000..4ad96d515 --- /dev/null +++ b/ansible/playbook.retry @@ -0,0 +1 @@ +default diff --git a/ansible/playbook.yml b/ansible/playbook.yml new file mode 100644 index 000000000..2c2f18d6a --- /dev/null +++ b/ansible/playbook.yml @@ -0,0 +1,16 @@ +--- +- hosts: all + become: True + gather_facts: False + roles: + - base + - openjdk + - fuseki + - skosmos + pre_tasks: + - name: Install Python 2.7 for Ansible + raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) + changed_when: False + - name: Install Zip and Unzip for Ansible + raw: sudo apt-get install zip unzip + - setup: # aka gather_facts diff --git a/ansible/roles/.DS_Store b/ansible/roles/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b3540bd02f1605d5852d61ec2dc740777f1efd40 GIT binary patch literal 8196 zcmeHMO-vnC6g~%Nxihrog0wJ?wmeI*Xh8uHO8@f8k3w40rVk3GR66g?6ebQc_-5XN zLNS=?u4&a>t43qon095-jWO|Op*3|O3Gt^37rJq2G@7{5bMMR}P+;LkO*=Qa_q%iN zIrq-_?)PSL<^ce9W{qZmDgay~3?q_bt1WHK^nIfgsc>1G|nlj|gd z3C0wrjPk14+18GhhInhszPX0@Y`#P9MUDr$+=+ov8K<>fiL^W&4gq^oBh*<9A8JQO>iTdD0|1D`$3- zwKrtZa>9(Ga%0oh9lIXc+w|1_!(EG;x0G_VT&)<)S)P@$&4DS)@W)T%bwN1rekw^degEv9W>&x`R|Hk3_SFJvwMLa;}T_OQZlu@QrA=ULYf zD;jb}tI_HhJ0r%sGA6agBHvQFc~8Bj_Iu)vb*9LXhDKHGf1Xa0drC0U+@fj&ww^L= zZYWF|wY96-U@l;i9}Nc&l&jiM+MSr7P&^tFL2C)ElkwZ^IkE9E-Sdx6nvU4JvT9p* zji#Lz<3|j`G#F#GiTdEUW%x>MqA5Im1{yq0FOOar0TU+S5?qEWa24Kw_uwXc03X2@ za2xKxSFiwg;YauxeudxQclZPTLWT;K;3m{?7uMo#Y{Cvaj0rq~op=;a;7LqkKc2-j zns^?^a1y6+250dizJgcqD!z)>@H)PUZ{bb6g&*T5_$hvdckpXm2=1;RuhnDW-G+d7 zsk7|oNLmd)rxl!DORKT&9`%|3Myua%5@%Ib{!qo%owfCiE$s&rO9y$+$t_oq6i%QF zshGSX`sGEzY=?S)kxcnUxzwR*Rpmh97TYLwF_j)s|5$qO z!VUNkJ}1#Fz&G#%`~<(ipNLqDWmt(-SdH6pC+@*VaW6JtBevl_+>ZzFAok$X*o%E6 zzJ46QK^($i5}zT(XJH0C%wmp2_!3^imzPBN8j0|2d?(P>lH__rt%ZQ^Q)ijva>FA-cL>7$^(^sS^2r&-&m0@0W0+I3flj2G(Ezi@KBDoiwrD17GCYajNI2 ziX!ah1C%b*$aI`grsIT5e;86fPNu>q5#oG+G(zQH{}2$p|0VDFCVKzpnRu}9Z|f-4 A`v3p{ literal 0 HcmV?d00001 diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml new file mode 100644 index 000000000..d84684847 --- /dev/null +++ b/ansible/roles/base/tasks/main.yml @@ -0,0 +1,5 @@ + +- name: Add 'openjdk' repository + apt_repository: + repo: ppa:openjdk-r/ppa + state: present diff --git a/ansible/roles/fuseki/files/fuseki b/ansible/roles/fuseki/files/fuseki new file mode 100644 index 000000000..258542c73 --- /dev/null +++ b/ansible/roles/fuseki/files/fuseki @@ -0,0 +1,5 @@ +export FUSEKI_HOME=/opt/fuseki +export FUSEKI_BASE=/etc/fuseki + +FUSEKI_USER=fuseki +JAVA_OPTIONS="-Xmx2048M" \ No newline at end of file diff --git a/ansible/roles/fuseki/tasks/main.yml b/ansible/roles/fuseki/tasks/main.yml new file mode 100644 index 000000000..34a8ac994 --- /dev/null +++ b/ansible/roles/fuseki/tasks/main.yml @@ -0,0 +1,93 @@ + +- name: Download Fuseki tarball + get_url: + url: https://archive.apache.org/dist/jena/binaries/apache-jena-fuseki-2.3.0.tar.gz + dest: /home/vagrant/ + mode: 755 + +- name: Extract Fuseki to opt/ + command: chdir=/opt /bin/tar xzf /home/vagrant/apache-jena-fuseki-2.3.0.tar.gz + args: + warn: false + +- name: Create a symbolic link to /opt/fuseki + file: + src: /opt/apache-jena-fuseki-2.3.0 + dest: /opt/fuseki + state: link + +- name: Add a new user fuseki + user: + name: fuseki + home: /opt/fuseki + system: yes + create_home: no + +- name: Create directories to /var/lib + file: + path: "/var/lib/fuseki/{{ item }}" + state: directory + owner: fuseki + group: fuseki + mode: 0775 + with_items: + - backups + - databases + - system + - system_files + +- name: Create directories + file: + path: "{{ item }}" + state: directory + owner: fuseki + group: fuseki + mode: 0775 + with_items: + - /var/log/fuseki + - /etc/fuseki + +- name: Link fuseki home + file: + src: "/var/lib/fuseki/{{ item }}" + dest: /etc/fuseki/{{ item }} + state: link + with_items: + - backups + - databases + - system + - system_files + +- name: Link logs to /etc/fuseki/logs + file: + src: /var/log/fuseki + dest: /etc/fuseki/logs + state: link + +- name: Copy Fuseki config + copy: + src: files/fuseki + dest: /etc/default/ + +# - name: Setup autostart +# file: +# src: /opt/fuseki/fuseki +# dest: /etc/init.d/ +# state: link + +- name: Setup autostart + command: chdir=/etc/init.d ln -s /opt/fuseki/fuseki . + args: + warn: false + ignore_errors: yes + +- name: Update services + command: update-rc.d fuseki defaults + +- name: Start service Fuseki + service: + name: fuseki + state: started + +# - name: Start Fuseki Service +# command: service fuseki start && update-rc.d fuseki defaults diff --git a/ansible/roles/openjdk/tasks/main.yml b/ansible/roles/openjdk/tasks/main.yml new file mode 100644 index 000000000..8e6c05481 --- /dev/null +++ b/ansible/roles/openjdk/tasks/main.yml @@ -0,0 +1,5 @@ +- name: Update apt-cache and then install openjdk-8-jre + apt: + name: openjdk-8-jre + update_cache: yes + state: present diff --git a/ansible/roles/skosmos/files/000-default.conf b/ansible/roles/skosmos/files/000-default.conf new file mode 100644 index 000000000..5f9df44a4 --- /dev/null +++ b/ansible/roles/skosmos/files/000-default.conf @@ -0,0 +1,16 @@ + + + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + diff --git a/ansible/roles/skosmos/files/config.ttl.dist b/ansible/roles/skosmos/files/config.ttl.dist new file mode 100644 index 000000000..3ba8b2393 --- /dev/null +++ b/ansible/roles/skosmos/files/config.ttl.dist @@ -0,0 +1,130 @@ +@prefix void: . +@prefix rdf: . +@prefix rdfs: . +@prefix owl: . +@prefix xsd: . +@prefix dc: . +@prefix foaf: . +@prefix wv: . +@prefix sd: . +@prefix skos: . +@prefix skosmos: . +@prefix isothes: . +@prefix mdrtype: . +@prefix : <#> . + +# Skosmos main configuration + +:config a skosmos:Configuration ; + # SPARQL endpoint + # a local Fuseki server is usually on localhost:3030 + #skosmos:sparqlEndpoint ; + # use the dev.finto.fi endpoint where the example vocabularies reside + skosmos:sparqlEndpoint ; + # sparql-query extension, or "Generic" for plain SPARQL 1.1 + # set to "JenaText" instead if you use Fuseki with jena-text index + skosmos:sparqlDialect "Generic" ; + # whether to enable collation in sparql queries + skosmos:sparqlCollationEnabled false ; + # HTTP client configuration + skosmos:sparqlTimeout 20 ; + skosmos:httpTimeout 5 ; + # customize the service name + skosmos:serviceName "Skosmos" ; + # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. + # skosmos:baseHref "http://localhost/Skosmos/" ; + # interface languages available, and the corresponding system locales + skosmos:languages ( + [ rdfs:label "fi" ; rdf:value "fi_FI.utf8" ] + [ rdfs:label "sv" ; rdf:value "sv_SE.utf8" ] + [ rdfs:label "en" ; rdf:value "en_GB.utf8" ] + ) ; + # how many results (maximum) to load at a time on the search results page + skosmos:searchResultsSize 20 ; + # how many items (maximum) to retrieve in transitive property queries + skosmos:transitiveLimit 1000 ; + # whether or not to log caught exceptions + skosmos:logCaughtExceptions false ; + # set to TRUE to enable logging into browser console + skosmos:logBrowserConsole false ; + # set to a logfile path to enable logging into log file + # skosmos:logFileName "" ; + # a default location for Twig template rendering + skosmos:templateCache "/tmp/skosmos-template-cache" ; + # customize the css by adding your own stylesheet + skosmos:customCss "resource/css/stylesheet.css" ; + # default email address where to send the feedback + skosmos:feedbackAddress "" ; + # email address to set as the sender for feedback messages + skosmos:feedbackSender "" ; + # email address to set as the envelope sender for feedback messages + skosmos:feedbackEnvelopeSender "" ; + # whether to display the ui language selection as a dropdown (useful for cases where there are more than 3 languages) + skosmos:uiLanguageDropdown false ; + # whether to enable the spam honey pot or not, enabled by default + skosmos:uiHoneypotEnabled true ; + # default time a user must wait before submitting a form + skosmos:uiHoneypotTime 5 ; + # plugins to activate for the whole installation (including all vocabularies) + skosmos:globalPlugins () . + +# Skosmos vocabularies + +:ysa a skosmos:Vocabulary, void:Dataset ; + dc:title "YSA - Yleinen suomalainen asiasanasto"@fi, + "YSA - Allmän tesaurus på finska"@sv, + "YSA - General Finnish thesaurus"@en ; + dc:subject :cat_general ; + dc:type mdrtype:THESAURUS ; + void:uriSpace "http://www.yso.fi/onto/ysa/"; + skosmos:groupClass skos:Collection; + skosmos:language "fi"; + skosmos:shortName "YSA"; + skosmos:feedbackRecipient "vesa-posti@helsinki.fi" ; + skosmos:showChangeList "true" ; + void:dataDump ; + void:sparqlEndpoint ; + skosmos:sparqlGraph +. + +:yso a skosmos:Vocabulary, void:Dataset ; + dc:title "YSO - Yleinen suomalainen ontologia"@fi, + "ALLFO - Allmän finländsk ontologi"@sv, + "YSO - General Finnish ontology"@en ; + dc:subject :cat_general ; + dc:type mdrtype:ONTOLOGY ; + void:uriSpace "http://www.yso.fi/onto/yso/"; + skosmos:language "fi", "sv", "en"; + skosmos:defaultLanguage "fi"; + skosmos:showTopConcepts "true"; + skosmos:showStatistics "false"; + skosmos:loadExternalResources "false"; + skosmos:shortName "YSO", + "ALLFO"@sv; + skosmos:groupClass isothes:ConceptGroup ; + skosmos:arrayClass isothes:ThesaurusArray ; + void:dataDump ; + void:sparqlEndpoint ; + skosmos:sparqlGraph ; + skosmos:mainConceptScheme +. + +:categories a skos:ConceptScheme; + skos:prefLabel "Skosmos Vocabulary Categories"@en +. + +:cat_general a skos:Concept ; + skos:topConceptOf :categories ; + skos:inScheme :categories ; + skos:prefLabel "Yleiskäsitteet"@fi, + "Allmänna begrepp"@sv, + "General concepts"@en +. + +mdrtype:THESAURUS a skos:Concept ; + skos:prefLabel "Тезаурус"@bg, "Tezaurus"@cs, "Tesaurus"@da, "Thesaurus"@de, "Θησαυρός"@el, "Thesaurus"@en, "Tesaurus"@et, "Tesaurus"@fi, "Thésaurus"@fr, "Pojmovnik"@hr, "Tezaurusz"@hu, "Tesauro"@it, "Tēzaurs"@lv, "Tezauras"@lt, "Teżawru"@mt, "Thesaurus"@nl, "Tesaurus"@no, "Tezaurus"@pl, "Tesauro"@pt, "Tezaur"@ro, "Synonymický slovník"@sk, "Tezaver"@sl, "Tesauro"@es, "Tesaurus"@sv +. + +mdrtype:ONTOLOGY a skos:Concept ; + skos:prefLabel "Онтология"@bg, "Ontologie"@cs, "Ontologi"@da, "Ontologie"@de, "Οντολογία"@el, "Ontology"@en, "Ontoloogia"@et, "Ontologia"@fi, "Ontologie"@fr, "Ontologija"@hr, "Ontológia"@hu, "Ontologia"@it, "Ontoloģija"@lv, "Ontologija"@lt, "Ontoloġija"@mt, "Ontologie"@nl, "Ontologi"@no, "Struktura pojęciowa"@pl, "Ontologia"@pt, "Ontologie"@ro, "Ontológia"@sk, "Ontologija"@sl, "Ontología"@es, "Ontologi"@sv +. diff --git a/ansible/roles/skosmos/tasks/main.yml b/ansible/roles/skosmos/tasks/main.yml new file mode 100644 index 000000000..742e79e8c --- /dev/null +++ b/ansible/roles/skosmos/tasks/main.yml @@ -0,0 +1,58 @@ + +- name: Install required Skosmos dependencies + apt: + name: "{{ item }}" + state: present + with_items: + - apache2 + - libapache2-mod-php7.0 + - php-xml + - php-mbstring + - git + +- name: Copy modified Apache configuration file + copy: + src: files/000-default.conf + dest: /etc/apache2/sites-enabled/000-default.conf + +- name: Enable Apache module mod_rewrite + command: a2enmod rewrite + +- name: Restart Apache + service: + name: apache2 + state: restarted + +- name: Download composer + get_url: + url: https://getcomposer.org/installer + dest: /home/vagrant/composer-installer + +- name: Install composer + shell: cat /home/vagrant/composer-installer | php -- --install-dir=/usr/local/bin + +- name: rename composer.phar to composer + shell: mv /usr/local/bin/composer.phar /usr/local/bin/composer + args: + creates: /usr/local/bin/composer + +- name: Make composer executable + file: + path: /usr/local/bin/composer + mode: a+x + state: file + +- name: Install Skosmos PHP Dependencies + command: chdir=/var/www/html/Skosmos composer install + +- name: Copy global and vocabulary-specific configurations + copy: + src: files/config.ttl.dist + dest: /var/www/html/Skosmos/config.ttl + +- name: Generate locales, if necessary + shell: "locale-gen {{ item }}" + with_items: + - en_GB.utf8 + - fi_FI.utf8 + - sv_SE.utf8 From 3963f9d2766ef964387056cb38923be6e771bbd1 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 09:10:48 +0300 Subject: [PATCH 135/173] Add .vagrant and .DS_Store to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1bd4c290c..ff8592dc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store config.inc config.ttl vocabularies.ttl @@ -8,3 +9,4 @@ components composer.phar composer.lock tests/jena-fuseki* +.vagrant From 2805720a7c37e48ec0edaf8cd97e8d04eb8bc58d Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 10:17:22 +0300 Subject: [PATCH 136/173] Remove unnecessary installation of Python 2.7 and configure to use python3 --- Vagrantfile | 1 + ansible/playbook.yml | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index c79e7e00a..a31cc3646 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -18,6 +18,7 @@ Vagrant.configure(2) do |config| config.vm.provision "ansible" do |ansible| ansible.playbook = "ansible/playbook.yml" + ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" } ansible.verbose = "vvv" ansible.compatibility_mode = "2.0" end diff --git a/ansible/playbook.yml b/ansible/playbook.yml index 2c2f18d6a..20f52c9b8 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -8,9 +8,6 @@ - fuseki - skosmos pre_tasks: - - name: Install Python 2.7 for Ansible - raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) - changed_when: False - name: Install Zip and Unzip for Ansible raw: sudo apt-get install zip unzip - setup: # aka gather_facts From 212b318179e9d9efa7db4415c4d4942d7f15d561 Mon Sep 17 00:00:00 2001 From: Takala Joeli A Date: Wed, 29 Aug 2018 12:41:37 +0300 Subject: [PATCH 137/173] Removed old config files and added references to eclipse project file to .gitignore --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1bd4c290c..7498b9840 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ -config.inc config.ttl -vocabularies.ttl build vendor report @@ -8,3 +6,4 @@ components composer.phar composer.lock tests/jena-fuseki* +.project From 4d7a85ea5ab94ec92c310348b18805c6b5a2c8c2 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 13:06:22 +0300 Subject: [PATCH 138/173] Remove Fuseki deployment --- ansible/playbook.yml | 3 - ansible/roles/base/tasks/main.yml | 5 -- ansible/roles/fuseki/files/fuseki | 5 -- ansible/roles/fuseki/tasks/main.yml | 93 ---------------------------- ansible/roles/openjdk/tasks/main.yml | 5 -- 5 files changed, 111 deletions(-) delete mode 100644 ansible/roles/base/tasks/main.yml delete mode 100644 ansible/roles/fuseki/files/fuseki delete mode 100644 ansible/roles/fuseki/tasks/main.yml delete mode 100644 ansible/roles/openjdk/tasks/main.yml diff --git a/ansible/playbook.yml b/ansible/playbook.yml index 20f52c9b8..4f6c3554d 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -3,9 +3,6 @@ become: True gather_facts: False roles: - - base - - openjdk - - fuseki - skosmos pre_tasks: - name: Install Zip and Unzip for Ansible diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml deleted file mode 100644 index d84684847..000000000 --- a/ansible/roles/base/tasks/main.yml +++ /dev/null @@ -1,5 +0,0 @@ - -- name: Add 'openjdk' repository - apt_repository: - repo: ppa:openjdk-r/ppa - state: present diff --git a/ansible/roles/fuseki/files/fuseki b/ansible/roles/fuseki/files/fuseki deleted file mode 100644 index 258542c73..000000000 --- a/ansible/roles/fuseki/files/fuseki +++ /dev/null @@ -1,5 +0,0 @@ -export FUSEKI_HOME=/opt/fuseki -export FUSEKI_BASE=/etc/fuseki - -FUSEKI_USER=fuseki -JAVA_OPTIONS="-Xmx2048M" \ No newline at end of file diff --git a/ansible/roles/fuseki/tasks/main.yml b/ansible/roles/fuseki/tasks/main.yml deleted file mode 100644 index 34a8ac994..000000000 --- a/ansible/roles/fuseki/tasks/main.yml +++ /dev/null @@ -1,93 +0,0 @@ - -- name: Download Fuseki tarball - get_url: - url: https://archive.apache.org/dist/jena/binaries/apache-jena-fuseki-2.3.0.tar.gz - dest: /home/vagrant/ - mode: 755 - -- name: Extract Fuseki to opt/ - command: chdir=/opt /bin/tar xzf /home/vagrant/apache-jena-fuseki-2.3.0.tar.gz - args: - warn: false - -- name: Create a symbolic link to /opt/fuseki - file: - src: /opt/apache-jena-fuseki-2.3.0 - dest: /opt/fuseki - state: link - -- name: Add a new user fuseki - user: - name: fuseki - home: /opt/fuseki - system: yes - create_home: no - -- name: Create directories to /var/lib - file: - path: "/var/lib/fuseki/{{ item }}" - state: directory - owner: fuseki - group: fuseki - mode: 0775 - with_items: - - backups - - databases - - system - - system_files - -- name: Create directories - file: - path: "{{ item }}" - state: directory - owner: fuseki - group: fuseki - mode: 0775 - with_items: - - /var/log/fuseki - - /etc/fuseki - -- name: Link fuseki home - file: - src: "/var/lib/fuseki/{{ item }}" - dest: /etc/fuseki/{{ item }} - state: link - with_items: - - backups - - databases - - system - - system_files - -- name: Link logs to /etc/fuseki/logs - file: - src: /var/log/fuseki - dest: /etc/fuseki/logs - state: link - -- name: Copy Fuseki config - copy: - src: files/fuseki - dest: /etc/default/ - -# - name: Setup autostart -# file: -# src: /opt/fuseki/fuseki -# dest: /etc/init.d/ -# state: link - -- name: Setup autostart - command: chdir=/etc/init.d ln -s /opt/fuseki/fuseki . - args: - warn: false - ignore_errors: yes - -- name: Update services - command: update-rc.d fuseki defaults - -- name: Start service Fuseki - service: - name: fuseki - state: started - -# - name: Start Fuseki Service -# command: service fuseki start && update-rc.d fuseki defaults diff --git a/ansible/roles/openjdk/tasks/main.yml b/ansible/roles/openjdk/tasks/main.yml deleted file mode 100644 index 8e6c05481..000000000 --- a/ansible/roles/openjdk/tasks/main.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Update apt-cache and then install openjdk-8-jre - apt: - name: openjdk-8-jre - update_cache: yes - state: present From 3622a0bbe1a58a268ea592fb34865fbcd74f17e2 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 13:07:44 +0300 Subject: [PATCH 139/173] Fix apt not installing php-mbstring by updating cache before apt install --- ansible/roles/skosmos/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/roles/skosmos/tasks/main.yml b/ansible/roles/skosmos/tasks/main.yml index 742e79e8c..1b1c50fea 100644 --- a/ansible/roles/skosmos/tasks/main.yml +++ b/ansible/roles/skosmos/tasks/main.yml @@ -1,4 +1,9 @@ +- name: Update apt cache + become: true + apt: + update_cache: yes + - name: Install required Skosmos dependencies apt: name: "{{ item }}" From f62e7f481eb1d20db5c6bc6625a0822aa1e275e3 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 13:49:31 +0300 Subject: [PATCH 140/173] Turn off verbose/debug mode for Ansible provisioner --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index a31cc3646..d89b0a565 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -19,7 +19,7 @@ Vagrant.configure(2) do |config| config.vm.provision "ansible" do |ansible| ansible.playbook = "ansible/playbook.yml" ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" } - ansible.verbose = "vvv" + ansible.verbose = "v" ansible.compatibility_mode = "2.0" end From a22ba419716e1fd34963cdb0dd9accf1dd5e68fa Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 14:09:27 +0300 Subject: [PATCH 141/173] Delete .DS_Store --- ansible/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ansible/.DS_Store diff --git a/ansible/.DS_Store b/ansible/.DS_Store deleted file mode 100644 index a565689de842ae81156e4c0d241fcd5c1365fdf0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~I|>3p42BaQAlO)1PU8W*!6149FCad;g$2caj_#iaf~&QN{DI`3$t22t#m+`V zbaOwiMHV75gPY3A!oU>!sa&O(PA+mg-%j1J?>ny=Wv$h~@f)w_c}yVz5+DH*AORBi zAp&-9!)EhPMiL+a5_l4@_d|i3*3=g2uMPws0iYA4-LUpq0$MBqt*I>(8JI>ZG+Nci z5X*Zzv}9dPZK2UFn!|_YKdVhKFpYN6f(=Zo3j+y|z<|Iw_6xiJckoa1|Dc6i5+H#; zBcPM*e!Ia#<=y)Bc$Pn8*47OU^>T!lj{t1!Dqh0fa9(Tyt*I>(85lnV90LOhe3ifh Dr(hGD From a4f83ba6c0559cbac52ac9a51fb27dc615bd2dbb Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 14:25:44 +0300 Subject: [PATCH 142/173] Delete second .DS_Store --- ansible/roles/.DS_Store | Bin 8196 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ansible/roles/.DS_Store diff --git a/ansible/roles/.DS_Store b/ansible/roles/.DS_Store deleted file mode 100644 index b3540bd02f1605d5852d61ec2dc740777f1efd40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMO-vnC6g~%Nxihrog0wJ?wmeI*Xh8uHO8@f8k3w40rVk3GR66g?6ebQc_-5XN zLNS=?u4&a>t43qon095-jWO|Op*3|O3Gt^37rJq2G@7{5bMMR}P+;LkO*=Qa_q%iN zIrq-_?)PSL<^ce9W{qZmDgay~3?q_bt1WHK^nIfgsc>1G|nlj|gd z3C0wrjPk14+18GhhInhszPX0@Y`#P9MUDr$+=+ov8K<>fiL^W&4gq^oBh*<9A8JQO>iTdD0|1D`$3- zwKrtZa>9(Ga%0oh9lIXc+w|1_!(EG;x0G_VT&)<)S)P@$&4DS)@W)T%bwN1rekw^degEv9W>&x`R|Hk3_SFJvwMLa;}T_OQZlu@QrA=ULYf zD;jb}tI_HhJ0r%sGA6agBHvQFc~8Bj_Iu)vb*9LXhDKHGf1Xa0drC0U+@fj&ww^L= zZYWF|wY96-U@l;i9}Nc&l&jiM+MSr7P&^tFL2C)ElkwZ^IkE9E-Sdx6nvU4JvT9p* zji#Lz<3|j`G#F#GiTdEUW%x>MqA5Im1{yq0FOOar0TU+S5?qEWa24Kw_uwXc03X2@ za2xKxSFiwg;YauxeudxQclZPTLWT;K;3m{?7uMo#Y{Cvaj0rq~op=;a;7LqkKc2-j zns^?^a1y6+250dizJgcqD!z)>@H)PUZ{bb6g&*T5_$hvdckpXm2=1;RuhnDW-G+d7 zsk7|oNLmd)rxl!DORKT&9`%|3Myua%5@%Ib{!qo%owfCiE$s&rO9y$+$t_oq6i%QF zshGSX`sGEzY=?S)kxcnUxzwR*Rpmh97TYLwF_j)s|5$qO z!VUNkJ}1#Fz&G#%`~<(ipNLqDWmt(-SdH6pC+@*VaW6JtBevl_+>ZzFAok$X*o%E6 zzJ46QK^($i5}zT(XJH0C%wmp2_!3^imzPBN8j0|2d?(P>lH__rt%ZQ^Q)ijva>FA-cL>7$^(^sS^2r&-&m0@0W0+I3flj2G(Ezi@KBDoiwrD17GCYajNI2 ziX!ah1C%b*$aI`grsIT5e;86fPNu>q5#oG+G(zQH{}2$p|0VDFCVKzpnRu}9Z|f-4 A`v3p{ From d6ba2b41fb7f55040279f2a3b4dcd0eb4ddfa772 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 14:55:18 +0300 Subject: [PATCH 143/173] Remove unnecessary, duplicate configuration file --- ansible/roles/skosmos/files/config.ttl.dist | 130 -------------------- ansible/roles/skosmos/tasks/main.yml | 5 +- 2 files changed, 3 insertions(+), 132 deletions(-) delete mode 100644 ansible/roles/skosmos/files/config.ttl.dist diff --git a/ansible/roles/skosmos/files/config.ttl.dist b/ansible/roles/skosmos/files/config.ttl.dist deleted file mode 100644 index 3ba8b2393..000000000 --- a/ansible/roles/skosmos/files/config.ttl.dist +++ /dev/null @@ -1,130 +0,0 @@ -@prefix void: . -@prefix rdf: . -@prefix rdfs: . -@prefix owl: . -@prefix xsd: . -@prefix dc: . -@prefix foaf: . -@prefix wv: . -@prefix sd: . -@prefix skos: . -@prefix skosmos: . -@prefix isothes: . -@prefix mdrtype: . -@prefix : <#> . - -# Skosmos main configuration - -:config a skosmos:Configuration ; - # SPARQL endpoint - # a local Fuseki server is usually on localhost:3030 - #skosmos:sparqlEndpoint ; - # use the dev.finto.fi endpoint where the example vocabularies reside - skosmos:sparqlEndpoint ; - # sparql-query extension, or "Generic" for plain SPARQL 1.1 - # set to "JenaText" instead if you use Fuseki with jena-text index - skosmos:sparqlDialect "Generic" ; - # whether to enable collation in sparql queries - skosmos:sparqlCollationEnabled false ; - # HTTP client configuration - skosmos:sparqlTimeout 20 ; - skosmos:httpTimeout 5 ; - # customize the service name - skosmos:serviceName "Skosmos" ; - # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. - # skosmos:baseHref "http://localhost/Skosmos/" ; - # interface languages available, and the corresponding system locales - skosmos:languages ( - [ rdfs:label "fi" ; rdf:value "fi_FI.utf8" ] - [ rdfs:label "sv" ; rdf:value "sv_SE.utf8" ] - [ rdfs:label "en" ; rdf:value "en_GB.utf8" ] - ) ; - # how many results (maximum) to load at a time on the search results page - skosmos:searchResultsSize 20 ; - # how many items (maximum) to retrieve in transitive property queries - skosmos:transitiveLimit 1000 ; - # whether or not to log caught exceptions - skosmos:logCaughtExceptions false ; - # set to TRUE to enable logging into browser console - skosmos:logBrowserConsole false ; - # set to a logfile path to enable logging into log file - # skosmos:logFileName "" ; - # a default location for Twig template rendering - skosmos:templateCache "/tmp/skosmos-template-cache" ; - # customize the css by adding your own stylesheet - skosmos:customCss "resource/css/stylesheet.css" ; - # default email address where to send the feedback - skosmos:feedbackAddress "" ; - # email address to set as the sender for feedback messages - skosmos:feedbackSender "" ; - # email address to set as the envelope sender for feedback messages - skosmos:feedbackEnvelopeSender "" ; - # whether to display the ui language selection as a dropdown (useful for cases where there are more than 3 languages) - skosmos:uiLanguageDropdown false ; - # whether to enable the spam honey pot or not, enabled by default - skosmos:uiHoneypotEnabled true ; - # default time a user must wait before submitting a form - skosmos:uiHoneypotTime 5 ; - # plugins to activate for the whole installation (including all vocabularies) - skosmos:globalPlugins () . - -# Skosmos vocabularies - -:ysa a skosmos:Vocabulary, void:Dataset ; - dc:title "YSA - Yleinen suomalainen asiasanasto"@fi, - "YSA - Allmän tesaurus på finska"@sv, - "YSA - General Finnish thesaurus"@en ; - dc:subject :cat_general ; - dc:type mdrtype:THESAURUS ; - void:uriSpace "http://www.yso.fi/onto/ysa/"; - skosmos:groupClass skos:Collection; - skosmos:language "fi"; - skosmos:shortName "YSA"; - skosmos:feedbackRecipient "vesa-posti@helsinki.fi" ; - skosmos:showChangeList "true" ; - void:dataDump ; - void:sparqlEndpoint ; - skosmos:sparqlGraph -. - -:yso a skosmos:Vocabulary, void:Dataset ; - dc:title "YSO - Yleinen suomalainen ontologia"@fi, - "ALLFO - Allmän finländsk ontologi"@sv, - "YSO - General Finnish ontology"@en ; - dc:subject :cat_general ; - dc:type mdrtype:ONTOLOGY ; - void:uriSpace "http://www.yso.fi/onto/yso/"; - skosmos:language "fi", "sv", "en"; - skosmos:defaultLanguage "fi"; - skosmos:showTopConcepts "true"; - skosmos:showStatistics "false"; - skosmos:loadExternalResources "false"; - skosmos:shortName "YSO", - "ALLFO"@sv; - skosmos:groupClass isothes:ConceptGroup ; - skosmos:arrayClass isothes:ThesaurusArray ; - void:dataDump ; - void:sparqlEndpoint ; - skosmos:sparqlGraph ; - skosmos:mainConceptScheme -. - -:categories a skos:ConceptScheme; - skos:prefLabel "Skosmos Vocabulary Categories"@en -. - -:cat_general a skos:Concept ; - skos:topConceptOf :categories ; - skos:inScheme :categories ; - skos:prefLabel "Yleiskäsitteet"@fi, - "Allmänna begrepp"@sv, - "General concepts"@en -. - -mdrtype:THESAURUS a skos:Concept ; - skos:prefLabel "Тезаурус"@bg, "Tezaurus"@cs, "Tesaurus"@da, "Thesaurus"@de, "Θησαυρός"@el, "Thesaurus"@en, "Tesaurus"@et, "Tesaurus"@fi, "Thésaurus"@fr, "Pojmovnik"@hr, "Tezaurusz"@hu, "Tesauro"@it, "Tēzaurs"@lv, "Tezauras"@lt, "Teżawru"@mt, "Thesaurus"@nl, "Tesaurus"@no, "Tezaurus"@pl, "Tesauro"@pt, "Tezaur"@ro, "Synonymický slovník"@sk, "Tezaver"@sl, "Tesauro"@es, "Tesaurus"@sv -. - -mdrtype:ONTOLOGY a skos:Concept ; - skos:prefLabel "Онтология"@bg, "Ontologie"@cs, "Ontologi"@da, "Ontologie"@de, "Οντολογία"@el, "Ontology"@en, "Ontoloogia"@et, "Ontologia"@fi, "Ontologie"@fr, "Ontologija"@hr, "Ontológia"@hu, "Ontologia"@it, "Ontoloģija"@lv, "Ontologija"@lt, "Ontoloġija"@mt, "Ontologie"@nl, "Ontologi"@no, "Struktura pojęciowa"@pl, "Ontologia"@pt, "Ontologie"@ro, "Ontológia"@sk, "Ontologija"@sl, "Ontología"@es, "Ontologi"@sv -. diff --git a/ansible/roles/skosmos/tasks/main.yml b/ansible/roles/skosmos/tasks/main.yml index 1b1c50fea..39c078d9c 100644 --- a/ansible/roles/skosmos/tasks/main.yml +++ b/ansible/roles/skosmos/tasks/main.yml @@ -36,7 +36,7 @@ - name: Install composer shell: cat /home/vagrant/composer-installer | php -- --install-dir=/usr/local/bin -- name: rename composer.phar to composer +- name: Rename composer.phar to composer shell: mv /usr/local/bin/composer.phar /usr/local/bin/composer args: creates: /usr/local/bin/composer @@ -52,8 +52,9 @@ - name: Copy global and vocabulary-specific configurations copy: - src: files/config.ttl.dist + src: /var/www/html/Skosmos/config.ttl.dist dest: /var/www/html/Skosmos/config.ttl + remote_src : yes - name: Generate locales, if necessary shell: "locale-gen {{ item }}" From d11c05c8cc6d275375165b17a66832115000f72b Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 09:09:51 +0300 Subject: [PATCH 144/173] Add Vagrantfile and Ansible Playbook setup for deploying and running Skosmos in virtual environment --- Vagrantfile | 25 ++++ ansible/.DS_Store | Bin 0 -> 6148 bytes ansible/playbook.retry | 1 + ansible/playbook.yml | 16 +++ ansible/roles/.DS_Store | Bin 0 -> 8196 bytes ansible/roles/base/tasks/main.yml | 5 + ansible/roles/fuseki/files/fuseki | 5 + ansible/roles/fuseki/tasks/main.yml | 93 +++++++++++++ ansible/roles/openjdk/tasks/main.yml | 5 + ansible/roles/skosmos/files/000-default.conf | 16 +++ ansible/roles/skosmos/files/config.ttl.dist | 130 +++++++++++++++++++ ansible/roles/skosmos/tasks/main.yml | 58 +++++++++ 12 files changed, 354 insertions(+) create mode 100644 Vagrantfile create mode 100644 ansible/.DS_Store create mode 100644 ansible/playbook.retry create mode 100644 ansible/playbook.yml create mode 100644 ansible/roles/.DS_Store create mode 100644 ansible/roles/base/tasks/main.yml create mode 100644 ansible/roles/fuseki/files/fuseki create mode 100644 ansible/roles/fuseki/tasks/main.yml create mode 100644 ansible/roles/openjdk/tasks/main.yml create mode 100644 ansible/roles/skosmos/files/000-default.conf create mode 100644 ansible/roles/skosmos/files/config.ttl.dist create mode 100644 ansible/roles/skosmos/tasks/main.yml diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 000000000..c79e7e00a --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,25 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure(2) do |config| + + config.vm.box = "ubuntu/xenial64" + config.vm.network "forwarded_port", guest: 80, host: 8040 + config.vm.post_up_message = "Skosmos up and running at localhost:8040/Skosmos" + + config.vm.synced_folder "", "/var/www/html/Skosmos" + + config.vm.provider "virtualbox" do |vb| + vb.memory = "4096" + vb.cpus = "2" + # disable creating a log file to root folder: + vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ] + end + + config.vm.provision "ansible" do |ansible| + ansible.playbook = "ansible/playbook.yml" + ansible.verbose = "vvv" + ansible.compatibility_mode = "2.0" + end + +end diff --git a/ansible/.DS_Store b/ansible/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a565689de842ae81156e4c0d241fcd5c1365fdf0 GIT binary patch literal 6148 zcmeH~I|>3p42BaQAlO)1PU8W*!6149FCad;g$2caj_#iaf~&QN{DI`3$t22t#m+`V zbaOwiMHV75gPY3A!oU>!sa&O(PA+mg-%j1J?>ny=Wv$h~@f)w_c}yVz5+DH*AORBi zAp&-9!)EhPMiL+a5_l4@_d|i3*3=g2uMPws0iYA4-LUpq0$MBqt*I>(8JI>ZG+Nci z5X*Zzv}9dPZK2UFn!|_YKdVhKFpYN6f(=Zo3j+y|z<|Iw_6xiJckoa1|Dc6i5+H#; zBcPM*e!Ia#<=y)Bc$Pn8*47OU^>T!lj{t1!Dqh0fa9(Tyt*I>(85lnV90LOhe3ifh Dr(hGD literal 0 HcmV?d00001 diff --git a/ansible/playbook.retry b/ansible/playbook.retry new file mode 100644 index 000000000..4ad96d515 --- /dev/null +++ b/ansible/playbook.retry @@ -0,0 +1 @@ +default diff --git a/ansible/playbook.yml b/ansible/playbook.yml new file mode 100644 index 000000000..2c2f18d6a --- /dev/null +++ b/ansible/playbook.yml @@ -0,0 +1,16 @@ +--- +- hosts: all + become: True + gather_facts: False + roles: + - base + - openjdk + - fuseki + - skosmos + pre_tasks: + - name: Install Python 2.7 for Ansible + raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) + changed_when: False + - name: Install Zip and Unzip for Ansible + raw: sudo apt-get install zip unzip + - setup: # aka gather_facts diff --git a/ansible/roles/.DS_Store b/ansible/roles/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b3540bd02f1605d5852d61ec2dc740777f1efd40 GIT binary patch literal 8196 zcmeHMO-vnC6g~%Nxihrog0wJ?wmeI*Xh8uHO8@f8k3w40rVk3GR66g?6ebQc_-5XN zLNS=?u4&a>t43qon095-jWO|Op*3|O3Gt^37rJq2G@7{5bMMR}P+;LkO*=Qa_q%iN zIrq-_?)PSL<^ce9W{qZmDgay~3?q_bt1WHK^nIfgsc>1G|nlj|gd z3C0wrjPk14+18GhhInhszPX0@Y`#P9MUDr$+=+ov8K<>fiL^W&4gq^oBh*<9A8JQO>iTdD0|1D`$3- zwKrtZa>9(Ga%0oh9lIXc+w|1_!(EG;x0G_VT&)<)S)P@$&4DS)@W)T%bwN1rekw^degEv9W>&x`R|Hk3_SFJvwMLa;}T_OQZlu@QrA=ULYf zD;jb}tI_HhJ0r%sGA6agBHvQFc~8Bj_Iu)vb*9LXhDKHGf1Xa0drC0U+@fj&ww^L= zZYWF|wY96-U@l;i9}Nc&l&jiM+MSr7P&^tFL2C)ElkwZ^IkE9E-Sdx6nvU4JvT9p* zji#Lz<3|j`G#F#GiTdEUW%x>MqA5Im1{yq0FOOar0TU+S5?qEWa24Kw_uwXc03X2@ za2xKxSFiwg;YauxeudxQclZPTLWT;K;3m{?7uMo#Y{Cvaj0rq~op=;a;7LqkKc2-j zns^?^a1y6+250dizJgcqD!z)>@H)PUZ{bb6g&*T5_$hvdckpXm2=1;RuhnDW-G+d7 zsk7|oNLmd)rxl!DORKT&9`%|3Myua%5@%Ib{!qo%owfCiE$s&rO9y$+$t_oq6i%QF zshGSX`sGEzY=?S)kxcnUxzwR*Rpmh97TYLwF_j)s|5$qO z!VUNkJ}1#Fz&G#%`~<(ipNLqDWmt(-SdH6pC+@*VaW6JtBevl_+>ZzFAok$X*o%E6 zzJ46QK^($i5}zT(XJH0C%wmp2_!3^imzPBN8j0|2d?(P>lH__rt%ZQ^Q)ijva>FA-cL>7$^(^sS^2r&-&m0@0W0+I3flj2G(Ezi@KBDoiwrD17GCYajNI2 ziX!ah1C%b*$aI`grsIT5e;86fPNu>q5#oG+G(zQH{}2$p|0VDFCVKzpnRu}9Z|f-4 A`v3p{ literal 0 HcmV?d00001 diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml new file mode 100644 index 000000000..d84684847 --- /dev/null +++ b/ansible/roles/base/tasks/main.yml @@ -0,0 +1,5 @@ + +- name: Add 'openjdk' repository + apt_repository: + repo: ppa:openjdk-r/ppa + state: present diff --git a/ansible/roles/fuseki/files/fuseki b/ansible/roles/fuseki/files/fuseki new file mode 100644 index 000000000..258542c73 --- /dev/null +++ b/ansible/roles/fuseki/files/fuseki @@ -0,0 +1,5 @@ +export FUSEKI_HOME=/opt/fuseki +export FUSEKI_BASE=/etc/fuseki + +FUSEKI_USER=fuseki +JAVA_OPTIONS="-Xmx2048M" \ No newline at end of file diff --git a/ansible/roles/fuseki/tasks/main.yml b/ansible/roles/fuseki/tasks/main.yml new file mode 100644 index 000000000..34a8ac994 --- /dev/null +++ b/ansible/roles/fuseki/tasks/main.yml @@ -0,0 +1,93 @@ + +- name: Download Fuseki tarball + get_url: + url: https://archive.apache.org/dist/jena/binaries/apache-jena-fuseki-2.3.0.tar.gz + dest: /home/vagrant/ + mode: 755 + +- name: Extract Fuseki to opt/ + command: chdir=/opt /bin/tar xzf /home/vagrant/apache-jena-fuseki-2.3.0.tar.gz + args: + warn: false + +- name: Create a symbolic link to /opt/fuseki + file: + src: /opt/apache-jena-fuseki-2.3.0 + dest: /opt/fuseki + state: link + +- name: Add a new user fuseki + user: + name: fuseki + home: /opt/fuseki + system: yes + create_home: no + +- name: Create directories to /var/lib + file: + path: "/var/lib/fuseki/{{ item }}" + state: directory + owner: fuseki + group: fuseki + mode: 0775 + with_items: + - backups + - databases + - system + - system_files + +- name: Create directories + file: + path: "{{ item }}" + state: directory + owner: fuseki + group: fuseki + mode: 0775 + with_items: + - /var/log/fuseki + - /etc/fuseki + +- name: Link fuseki home + file: + src: "/var/lib/fuseki/{{ item }}" + dest: /etc/fuseki/{{ item }} + state: link + with_items: + - backups + - databases + - system + - system_files + +- name: Link logs to /etc/fuseki/logs + file: + src: /var/log/fuseki + dest: /etc/fuseki/logs + state: link + +- name: Copy Fuseki config + copy: + src: files/fuseki + dest: /etc/default/ + +# - name: Setup autostart +# file: +# src: /opt/fuseki/fuseki +# dest: /etc/init.d/ +# state: link + +- name: Setup autostart + command: chdir=/etc/init.d ln -s /opt/fuseki/fuseki . + args: + warn: false + ignore_errors: yes + +- name: Update services + command: update-rc.d fuseki defaults + +- name: Start service Fuseki + service: + name: fuseki + state: started + +# - name: Start Fuseki Service +# command: service fuseki start && update-rc.d fuseki defaults diff --git a/ansible/roles/openjdk/tasks/main.yml b/ansible/roles/openjdk/tasks/main.yml new file mode 100644 index 000000000..8e6c05481 --- /dev/null +++ b/ansible/roles/openjdk/tasks/main.yml @@ -0,0 +1,5 @@ +- name: Update apt-cache and then install openjdk-8-jre + apt: + name: openjdk-8-jre + update_cache: yes + state: present diff --git a/ansible/roles/skosmos/files/000-default.conf b/ansible/roles/skosmos/files/000-default.conf new file mode 100644 index 000000000..5f9df44a4 --- /dev/null +++ b/ansible/roles/skosmos/files/000-default.conf @@ -0,0 +1,16 @@ + + + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + diff --git a/ansible/roles/skosmos/files/config.ttl.dist b/ansible/roles/skosmos/files/config.ttl.dist new file mode 100644 index 000000000..3ba8b2393 --- /dev/null +++ b/ansible/roles/skosmos/files/config.ttl.dist @@ -0,0 +1,130 @@ +@prefix void: . +@prefix rdf: . +@prefix rdfs: . +@prefix owl: . +@prefix xsd: . +@prefix dc: . +@prefix foaf: . +@prefix wv: . +@prefix sd: . +@prefix skos: . +@prefix skosmos: . +@prefix isothes: . +@prefix mdrtype: . +@prefix : <#> . + +# Skosmos main configuration + +:config a skosmos:Configuration ; + # SPARQL endpoint + # a local Fuseki server is usually on localhost:3030 + #skosmos:sparqlEndpoint ; + # use the dev.finto.fi endpoint where the example vocabularies reside + skosmos:sparqlEndpoint ; + # sparql-query extension, or "Generic" for plain SPARQL 1.1 + # set to "JenaText" instead if you use Fuseki with jena-text index + skosmos:sparqlDialect "Generic" ; + # whether to enable collation in sparql queries + skosmos:sparqlCollationEnabled false ; + # HTTP client configuration + skosmos:sparqlTimeout 20 ; + skosmos:httpTimeout 5 ; + # customize the service name + skosmos:serviceName "Skosmos" ; + # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. + # skosmos:baseHref "http://localhost/Skosmos/" ; + # interface languages available, and the corresponding system locales + skosmos:languages ( + [ rdfs:label "fi" ; rdf:value "fi_FI.utf8" ] + [ rdfs:label "sv" ; rdf:value "sv_SE.utf8" ] + [ rdfs:label "en" ; rdf:value "en_GB.utf8" ] + ) ; + # how many results (maximum) to load at a time on the search results page + skosmos:searchResultsSize 20 ; + # how many items (maximum) to retrieve in transitive property queries + skosmos:transitiveLimit 1000 ; + # whether or not to log caught exceptions + skosmos:logCaughtExceptions false ; + # set to TRUE to enable logging into browser console + skosmos:logBrowserConsole false ; + # set to a logfile path to enable logging into log file + # skosmos:logFileName "" ; + # a default location for Twig template rendering + skosmos:templateCache "/tmp/skosmos-template-cache" ; + # customize the css by adding your own stylesheet + skosmos:customCss "resource/css/stylesheet.css" ; + # default email address where to send the feedback + skosmos:feedbackAddress "" ; + # email address to set as the sender for feedback messages + skosmos:feedbackSender "" ; + # email address to set as the envelope sender for feedback messages + skosmos:feedbackEnvelopeSender "" ; + # whether to display the ui language selection as a dropdown (useful for cases where there are more than 3 languages) + skosmos:uiLanguageDropdown false ; + # whether to enable the spam honey pot or not, enabled by default + skosmos:uiHoneypotEnabled true ; + # default time a user must wait before submitting a form + skosmos:uiHoneypotTime 5 ; + # plugins to activate for the whole installation (including all vocabularies) + skosmos:globalPlugins () . + +# Skosmos vocabularies + +:ysa a skosmos:Vocabulary, void:Dataset ; + dc:title "YSA - Yleinen suomalainen asiasanasto"@fi, + "YSA - Allmän tesaurus på finska"@sv, + "YSA - General Finnish thesaurus"@en ; + dc:subject :cat_general ; + dc:type mdrtype:THESAURUS ; + void:uriSpace "http://www.yso.fi/onto/ysa/"; + skosmos:groupClass skos:Collection; + skosmos:language "fi"; + skosmos:shortName "YSA"; + skosmos:feedbackRecipient "vesa-posti@helsinki.fi" ; + skosmos:showChangeList "true" ; + void:dataDump ; + void:sparqlEndpoint ; + skosmos:sparqlGraph +. + +:yso a skosmos:Vocabulary, void:Dataset ; + dc:title "YSO - Yleinen suomalainen ontologia"@fi, + "ALLFO - Allmän finländsk ontologi"@sv, + "YSO - General Finnish ontology"@en ; + dc:subject :cat_general ; + dc:type mdrtype:ONTOLOGY ; + void:uriSpace "http://www.yso.fi/onto/yso/"; + skosmos:language "fi", "sv", "en"; + skosmos:defaultLanguage "fi"; + skosmos:showTopConcepts "true"; + skosmos:showStatistics "false"; + skosmos:loadExternalResources "false"; + skosmos:shortName "YSO", + "ALLFO"@sv; + skosmos:groupClass isothes:ConceptGroup ; + skosmos:arrayClass isothes:ThesaurusArray ; + void:dataDump ; + void:sparqlEndpoint ; + skosmos:sparqlGraph ; + skosmos:mainConceptScheme +. + +:categories a skos:ConceptScheme; + skos:prefLabel "Skosmos Vocabulary Categories"@en +. + +:cat_general a skos:Concept ; + skos:topConceptOf :categories ; + skos:inScheme :categories ; + skos:prefLabel "Yleiskäsitteet"@fi, + "Allmänna begrepp"@sv, + "General concepts"@en +. + +mdrtype:THESAURUS a skos:Concept ; + skos:prefLabel "Тезаурус"@bg, "Tezaurus"@cs, "Tesaurus"@da, "Thesaurus"@de, "Θησαυρός"@el, "Thesaurus"@en, "Tesaurus"@et, "Tesaurus"@fi, "Thésaurus"@fr, "Pojmovnik"@hr, "Tezaurusz"@hu, "Tesauro"@it, "Tēzaurs"@lv, "Tezauras"@lt, "Teżawru"@mt, "Thesaurus"@nl, "Tesaurus"@no, "Tezaurus"@pl, "Tesauro"@pt, "Tezaur"@ro, "Synonymický slovník"@sk, "Tezaver"@sl, "Tesauro"@es, "Tesaurus"@sv +. + +mdrtype:ONTOLOGY a skos:Concept ; + skos:prefLabel "Онтология"@bg, "Ontologie"@cs, "Ontologi"@da, "Ontologie"@de, "Οντολογία"@el, "Ontology"@en, "Ontoloogia"@et, "Ontologia"@fi, "Ontologie"@fr, "Ontologija"@hr, "Ontológia"@hu, "Ontologia"@it, "Ontoloģija"@lv, "Ontologija"@lt, "Ontoloġija"@mt, "Ontologie"@nl, "Ontologi"@no, "Struktura pojęciowa"@pl, "Ontologia"@pt, "Ontologie"@ro, "Ontológia"@sk, "Ontologija"@sl, "Ontología"@es, "Ontologi"@sv +. diff --git a/ansible/roles/skosmos/tasks/main.yml b/ansible/roles/skosmos/tasks/main.yml new file mode 100644 index 000000000..742e79e8c --- /dev/null +++ b/ansible/roles/skosmos/tasks/main.yml @@ -0,0 +1,58 @@ + +- name: Install required Skosmos dependencies + apt: + name: "{{ item }}" + state: present + with_items: + - apache2 + - libapache2-mod-php7.0 + - php-xml + - php-mbstring + - git + +- name: Copy modified Apache configuration file + copy: + src: files/000-default.conf + dest: /etc/apache2/sites-enabled/000-default.conf + +- name: Enable Apache module mod_rewrite + command: a2enmod rewrite + +- name: Restart Apache + service: + name: apache2 + state: restarted + +- name: Download composer + get_url: + url: https://getcomposer.org/installer + dest: /home/vagrant/composer-installer + +- name: Install composer + shell: cat /home/vagrant/composer-installer | php -- --install-dir=/usr/local/bin + +- name: rename composer.phar to composer + shell: mv /usr/local/bin/composer.phar /usr/local/bin/composer + args: + creates: /usr/local/bin/composer + +- name: Make composer executable + file: + path: /usr/local/bin/composer + mode: a+x + state: file + +- name: Install Skosmos PHP Dependencies + command: chdir=/var/www/html/Skosmos composer install + +- name: Copy global and vocabulary-specific configurations + copy: + src: files/config.ttl.dist + dest: /var/www/html/Skosmos/config.ttl + +- name: Generate locales, if necessary + shell: "locale-gen {{ item }}" + with_items: + - en_GB.utf8 + - fi_FI.utf8 + - sv_SE.utf8 From 08edf76466671b810866bb3ca43786a60229d20d Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 09:10:48 +0300 Subject: [PATCH 145/173] Add .vagrant and .DS_Store to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1bd4c290c..ff8592dc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store config.inc config.ttl vocabularies.ttl @@ -8,3 +9,4 @@ components composer.phar composer.lock tests/jena-fuseki* +.vagrant From 1815d30cc77f90eacc10c2f3abfd28e28d55ecf5 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 10:17:22 +0300 Subject: [PATCH 146/173] Remove unnecessary installation of Python 2.7 and configure to use python3 --- Vagrantfile | 1 + ansible/playbook.yml | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index c79e7e00a..a31cc3646 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -18,6 +18,7 @@ Vagrant.configure(2) do |config| config.vm.provision "ansible" do |ansible| ansible.playbook = "ansible/playbook.yml" + ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" } ansible.verbose = "vvv" ansible.compatibility_mode = "2.0" end diff --git a/ansible/playbook.yml b/ansible/playbook.yml index 2c2f18d6a..20f52c9b8 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -8,9 +8,6 @@ - fuseki - skosmos pre_tasks: - - name: Install Python 2.7 for Ansible - raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) - changed_when: False - name: Install Zip and Unzip for Ansible raw: sudo apt-get install zip unzip - setup: # aka gather_facts From 4c302cbff73b2f3020f69204305205839bfbb68c Mon Sep 17 00:00:00 2001 From: Takala Joeli A Date: Wed, 29 Aug 2018 12:41:37 +0300 Subject: [PATCH 147/173] Removed old config files and added references to eclipse project file to .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ff8592dc5..ff5f8a6d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ .DS_Store config.inc config.ttl -vocabularies.ttl build vendor report @@ -10,3 +9,4 @@ composer.phar composer.lock tests/jena-fuseki* .vagrant +.project From 44653626e2be228e24a2f8f9a02d51ee57da8606 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 13:06:22 +0300 Subject: [PATCH 148/173] Remove Fuseki deployment --- ansible/playbook.yml | 3 - ansible/roles/base/tasks/main.yml | 5 -- ansible/roles/fuseki/files/fuseki | 5 -- ansible/roles/fuseki/tasks/main.yml | 93 ---------------------------- ansible/roles/openjdk/tasks/main.yml | 5 -- 5 files changed, 111 deletions(-) delete mode 100644 ansible/roles/base/tasks/main.yml delete mode 100644 ansible/roles/fuseki/files/fuseki delete mode 100644 ansible/roles/fuseki/tasks/main.yml delete mode 100644 ansible/roles/openjdk/tasks/main.yml diff --git a/ansible/playbook.yml b/ansible/playbook.yml index 20f52c9b8..4f6c3554d 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -3,9 +3,6 @@ become: True gather_facts: False roles: - - base - - openjdk - - fuseki - skosmos pre_tasks: - name: Install Zip and Unzip for Ansible diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml deleted file mode 100644 index d84684847..000000000 --- a/ansible/roles/base/tasks/main.yml +++ /dev/null @@ -1,5 +0,0 @@ - -- name: Add 'openjdk' repository - apt_repository: - repo: ppa:openjdk-r/ppa - state: present diff --git a/ansible/roles/fuseki/files/fuseki b/ansible/roles/fuseki/files/fuseki deleted file mode 100644 index 258542c73..000000000 --- a/ansible/roles/fuseki/files/fuseki +++ /dev/null @@ -1,5 +0,0 @@ -export FUSEKI_HOME=/opt/fuseki -export FUSEKI_BASE=/etc/fuseki - -FUSEKI_USER=fuseki -JAVA_OPTIONS="-Xmx2048M" \ No newline at end of file diff --git a/ansible/roles/fuseki/tasks/main.yml b/ansible/roles/fuseki/tasks/main.yml deleted file mode 100644 index 34a8ac994..000000000 --- a/ansible/roles/fuseki/tasks/main.yml +++ /dev/null @@ -1,93 +0,0 @@ - -- name: Download Fuseki tarball - get_url: - url: https://archive.apache.org/dist/jena/binaries/apache-jena-fuseki-2.3.0.tar.gz - dest: /home/vagrant/ - mode: 755 - -- name: Extract Fuseki to opt/ - command: chdir=/opt /bin/tar xzf /home/vagrant/apache-jena-fuseki-2.3.0.tar.gz - args: - warn: false - -- name: Create a symbolic link to /opt/fuseki - file: - src: /opt/apache-jena-fuseki-2.3.0 - dest: /opt/fuseki - state: link - -- name: Add a new user fuseki - user: - name: fuseki - home: /opt/fuseki - system: yes - create_home: no - -- name: Create directories to /var/lib - file: - path: "/var/lib/fuseki/{{ item }}" - state: directory - owner: fuseki - group: fuseki - mode: 0775 - with_items: - - backups - - databases - - system - - system_files - -- name: Create directories - file: - path: "{{ item }}" - state: directory - owner: fuseki - group: fuseki - mode: 0775 - with_items: - - /var/log/fuseki - - /etc/fuseki - -- name: Link fuseki home - file: - src: "/var/lib/fuseki/{{ item }}" - dest: /etc/fuseki/{{ item }} - state: link - with_items: - - backups - - databases - - system - - system_files - -- name: Link logs to /etc/fuseki/logs - file: - src: /var/log/fuseki - dest: /etc/fuseki/logs - state: link - -- name: Copy Fuseki config - copy: - src: files/fuseki - dest: /etc/default/ - -# - name: Setup autostart -# file: -# src: /opt/fuseki/fuseki -# dest: /etc/init.d/ -# state: link - -- name: Setup autostart - command: chdir=/etc/init.d ln -s /opt/fuseki/fuseki . - args: - warn: false - ignore_errors: yes - -- name: Update services - command: update-rc.d fuseki defaults - -- name: Start service Fuseki - service: - name: fuseki - state: started - -# - name: Start Fuseki Service -# command: service fuseki start && update-rc.d fuseki defaults diff --git a/ansible/roles/openjdk/tasks/main.yml b/ansible/roles/openjdk/tasks/main.yml deleted file mode 100644 index 8e6c05481..000000000 --- a/ansible/roles/openjdk/tasks/main.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Update apt-cache and then install openjdk-8-jre - apt: - name: openjdk-8-jre - update_cache: yes - state: present From 4c6e2cb0e3c7d70c7c6b603163dd1cf8d2b464cc Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 13:07:44 +0300 Subject: [PATCH 149/173] Fix apt not installing php-mbstring by updating cache before apt install --- ansible/roles/skosmos/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/roles/skosmos/tasks/main.yml b/ansible/roles/skosmos/tasks/main.yml index 742e79e8c..1b1c50fea 100644 --- a/ansible/roles/skosmos/tasks/main.yml +++ b/ansible/roles/skosmos/tasks/main.yml @@ -1,4 +1,9 @@ +- name: Update apt cache + become: true + apt: + update_cache: yes + - name: Install required Skosmos dependencies apt: name: "{{ item }}" From b5c4f56ab202d56db876af1a55238a2ed5ed3a3b Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 13:49:31 +0300 Subject: [PATCH 150/173] Turn off verbose/debug mode for Ansible provisioner --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index a31cc3646..d89b0a565 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -19,7 +19,7 @@ Vagrant.configure(2) do |config| config.vm.provision "ansible" do |ansible| ansible.playbook = "ansible/playbook.yml" ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" } - ansible.verbose = "vvv" + ansible.verbose = "v" ansible.compatibility_mode = "2.0" end From cdc2da6f0ce4d65c3a21243fc2fa49d8dd2a2041 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 14:09:27 +0300 Subject: [PATCH 151/173] Delete .DS_Store --- ansible/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ansible/.DS_Store diff --git a/ansible/.DS_Store b/ansible/.DS_Store deleted file mode 100644 index a565689de842ae81156e4c0d241fcd5c1365fdf0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~I|>3p42BaQAlO)1PU8W*!6149FCad;g$2caj_#iaf~&QN{DI`3$t22t#m+`V zbaOwiMHV75gPY3A!oU>!sa&O(PA+mg-%j1J?>ny=Wv$h~@f)w_c}yVz5+DH*AORBi zAp&-9!)EhPMiL+a5_l4@_d|i3*3=g2uMPws0iYA4-LUpq0$MBqt*I>(8JI>ZG+Nci z5X*Zzv}9dPZK2UFn!|_YKdVhKFpYN6f(=Zo3j+y|z<|Iw_6xiJckoa1|Dc6i5+H#; zBcPM*e!Ia#<=y)Bc$Pn8*47OU^>T!lj{t1!Dqh0fa9(Tyt*I>(85lnV90LOhe3ifh Dr(hGD From 22ff557964101b7cc7c7c1d7acad03ca499a8f42 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 14:25:44 +0300 Subject: [PATCH 152/173] Delete second .DS_Store --- ansible/roles/.DS_Store | Bin 8196 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ansible/roles/.DS_Store diff --git a/ansible/roles/.DS_Store b/ansible/roles/.DS_Store deleted file mode 100644 index b3540bd02f1605d5852d61ec2dc740777f1efd40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMO-vnC6g~%Nxihrog0wJ?wmeI*Xh8uHO8@f8k3w40rVk3GR66g?6ebQc_-5XN zLNS=?u4&a>t43qon095-jWO|Op*3|O3Gt^37rJq2G@7{5bMMR}P+;LkO*=Qa_q%iN zIrq-_?)PSL<^ce9W{qZmDgay~3?q_bt1WHK^nIfgsc>1G|nlj|gd z3C0wrjPk14+18GhhInhszPX0@Y`#P9MUDr$+=+ov8K<>fiL^W&4gq^oBh*<9A8JQO>iTdD0|1D`$3- zwKrtZa>9(Ga%0oh9lIXc+w|1_!(EG;x0G_VT&)<)S)P@$&4DS)@W)T%bwN1rekw^degEv9W>&x`R|Hk3_SFJvwMLa;}T_OQZlu@QrA=ULYf zD;jb}tI_HhJ0r%sGA6agBHvQFc~8Bj_Iu)vb*9LXhDKHGf1Xa0drC0U+@fj&ww^L= zZYWF|wY96-U@l;i9}Nc&l&jiM+MSr7P&^tFL2C)ElkwZ^IkE9E-Sdx6nvU4JvT9p* zji#Lz<3|j`G#F#GiTdEUW%x>MqA5Im1{yq0FOOar0TU+S5?qEWa24Kw_uwXc03X2@ za2xKxSFiwg;YauxeudxQclZPTLWT;K;3m{?7uMo#Y{Cvaj0rq~op=;a;7LqkKc2-j zns^?^a1y6+250dizJgcqD!z)>@H)PUZ{bb6g&*T5_$hvdckpXm2=1;RuhnDW-G+d7 zsk7|oNLmd)rxl!DORKT&9`%|3Myua%5@%Ib{!qo%owfCiE$s&rO9y$+$t_oq6i%QF zshGSX`sGEzY=?S)kxcnUxzwR*Rpmh97TYLwF_j)s|5$qO z!VUNkJ}1#Fz&G#%`~<(ipNLqDWmt(-SdH6pC+@*VaW6JtBevl_+>ZzFAok$X*o%E6 zzJ46QK^($i5}zT(XJH0C%wmp2_!3^imzPBN8j0|2d?(P>lH__rt%ZQ^Q)ijva>FA-cL>7$^(^sS^2r&-&m0@0W0+I3flj2G(Ezi@KBDoiwrD17GCYajNI2 ziX!ah1C%b*$aI`grsIT5e;86fPNu>q5#oG+G(zQH{}2$p|0VDFCVKzpnRu}9Z|f-4 A`v3p{ From 1f630a207005b5b1ccc7951c57400c5381163742 Mon Sep 17 00:00:00 2001 From: Miki Pernu Date: Wed, 29 Aug 2018 14:55:18 +0300 Subject: [PATCH 153/173] Remove unnecessary, duplicate configuration file --- ansible/roles/skosmos/files/config.ttl.dist | 130 -------------------- ansible/roles/skosmos/tasks/main.yml | 5 +- 2 files changed, 3 insertions(+), 132 deletions(-) delete mode 100644 ansible/roles/skosmos/files/config.ttl.dist diff --git a/ansible/roles/skosmos/files/config.ttl.dist b/ansible/roles/skosmos/files/config.ttl.dist deleted file mode 100644 index 3ba8b2393..000000000 --- a/ansible/roles/skosmos/files/config.ttl.dist +++ /dev/null @@ -1,130 +0,0 @@ -@prefix void: . -@prefix rdf: . -@prefix rdfs: . -@prefix owl: . -@prefix xsd: . -@prefix dc: . -@prefix foaf: . -@prefix wv: . -@prefix sd: . -@prefix skos: . -@prefix skosmos: . -@prefix isothes: . -@prefix mdrtype: . -@prefix : <#> . - -# Skosmos main configuration - -:config a skosmos:Configuration ; - # SPARQL endpoint - # a local Fuseki server is usually on localhost:3030 - #skosmos:sparqlEndpoint ; - # use the dev.finto.fi endpoint where the example vocabularies reside - skosmos:sparqlEndpoint ; - # sparql-query extension, or "Generic" for plain SPARQL 1.1 - # set to "JenaText" instead if you use Fuseki with jena-text index - skosmos:sparqlDialect "Generic" ; - # whether to enable collation in sparql queries - skosmos:sparqlCollationEnabled false ; - # HTTP client configuration - skosmos:sparqlTimeout 20 ; - skosmos:httpTimeout 5 ; - # customize the service name - skosmos:serviceName "Skosmos" ; - # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. - # skosmos:baseHref "http://localhost/Skosmos/" ; - # interface languages available, and the corresponding system locales - skosmos:languages ( - [ rdfs:label "fi" ; rdf:value "fi_FI.utf8" ] - [ rdfs:label "sv" ; rdf:value "sv_SE.utf8" ] - [ rdfs:label "en" ; rdf:value "en_GB.utf8" ] - ) ; - # how many results (maximum) to load at a time on the search results page - skosmos:searchResultsSize 20 ; - # how many items (maximum) to retrieve in transitive property queries - skosmos:transitiveLimit 1000 ; - # whether or not to log caught exceptions - skosmos:logCaughtExceptions false ; - # set to TRUE to enable logging into browser console - skosmos:logBrowserConsole false ; - # set to a logfile path to enable logging into log file - # skosmos:logFileName "" ; - # a default location for Twig template rendering - skosmos:templateCache "/tmp/skosmos-template-cache" ; - # customize the css by adding your own stylesheet - skosmos:customCss "resource/css/stylesheet.css" ; - # default email address where to send the feedback - skosmos:feedbackAddress "" ; - # email address to set as the sender for feedback messages - skosmos:feedbackSender "" ; - # email address to set as the envelope sender for feedback messages - skosmos:feedbackEnvelopeSender "" ; - # whether to display the ui language selection as a dropdown (useful for cases where there are more than 3 languages) - skosmos:uiLanguageDropdown false ; - # whether to enable the spam honey pot or not, enabled by default - skosmos:uiHoneypotEnabled true ; - # default time a user must wait before submitting a form - skosmos:uiHoneypotTime 5 ; - # plugins to activate for the whole installation (including all vocabularies) - skosmos:globalPlugins () . - -# Skosmos vocabularies - -:ysa a skosmos:Vocabulary, void:Dataset ; - dc:title "YSA - Yleinen suomalainen asiasanasto"@fi, - "YSA - Allmän tesaurus på finska"@sv, - "YSA - General Finnish thesaurus"@en ; - dc:subject :cat_general ; - dc:type mdrtype:THESAURUS ; - void:uriSpace "http://www.yso.fi/onto/ysa/"; - skosmos:groupClass skos:Collection; - skosmos:language "fi"; - skosmos:shortName "YSA"; - skosmos:feedbackRecipient "vesa-posti@helsinki.fi" ; - skosmos:showChangeList "true" ; - void:dataDump ; - void:sparqlEndpoint ; - skosmos:sparqlGraph -. - -:yso a skosmos:Vocabulary, void:Dataset ; - dc:title "YSO - Yleinen suomalainen ontologia"@fi, - "ALLFO - Allmän finländsk ontologi"@sv, - "YSO - General Finnish ontology"@en ; - dc:subject :cat_general ; - dc:type mdrtype:ONTOLOGY ; - void:uriSpace "http://www.yso.fi/onto/yso/"; - skosmos:language "fi", "sv", "en"; - skosmos:defaultLanguage "fi"; - skosmos:showTopConcepts "true"; - skosmos:showStatistics "false"; - skosmos:loadExternalResources "false"; - skosmos:shortName "YSO", - "ALLFO"@sv; - skosmos:groupClass isothes:ConceptGroup ; - skosmos:arrayClass isothes:ThesaurusArray ; - void:dataDump ; - void:sparqlEndpoint ; - skosmos:sparqlGraph ; - skosmos:mainConceptScheme -. - -:categories a skos:ConceptScheme; - skos:prefLabel "Skosmos Vocabulary Categories"@en -. - -:cat_general a skos:Concept ; - skos:topConceptOf :categories ; - skos:inScheme :categories ; - skos:prefLabel "Yleiskäsitteet"@fi, - "Allmänna begrepp"@sv, - "General concepts"@en -. - -mdrtype:THESAURUS a skos:Concept ; - skos:prefLabel "Тезаурус"@bg, "Tezaurus"@cs, "Tesaurus"@da, "Thesaurus"@de, "Θησαυρός"@el, "Thesaurus"@en, "Tesaurus"@et, "Tesaurus"@fi, "Thésaurus"@fr, "Pojmovnik"@hr, "Tezaurusz"@hu, "Tesauro"@it, "Tēzaurs"@lv, "Tezauras"@lt, "Teżawru"@mt, "Thesaurus"@nl, "Tesaurus"@no, "Tezaurus"@pl, "Tesauro"@pt, "Tezaur"@ro, "Synonymický slovník"@sk, "Tezaver"@sl, "Tesauro"@es, "Tesaurus"@sv -. - -mdrtype:ONTOLOGY a skos:Concept ; - skos:prefLabel "Онтология"@bg, "Ontologie"@cs, "Ontologi"@da, "Ontologie"@de, "Οντολογία"@el, "Ontology"@en, "Ontoloogia"@et, "Ontologia"@fi, "Ontologie"@fr, "Ontologija"@hr, "Ontológia"@hu, "Ontologia"@it, "Ontoloģija"@lv, "Ontologija"@lt, "Ontoloġija"@mt, "Ontologie"@nl, "Ontologi"@no, "Struktura pojęciowa"@pl, "Ontologia"@pt, "Ontologie"@ro, "Ontológia"@sk, "Ontologija"@sl, "Ontología"@es, "Ontologi"@sv -. diff --git a/ansible/roles/skosmos/tasks/main.yml b/ansible/roles/skosmos/tasks/main.yml index 1b1c50fea..39c078d9c 100644 --- a/ansible/roles/skosmos/tasks/main.yml +++ b/ansible/roles/skosmos/tasks/main.yml @@ -36,7 +36,7 @@ - name: Install composer shell: cat /home/vagrant/composer-installer | php -- --install-dir=/usr/local/bin -- name: rename composer.phar to composer +- name: Rename composer.phar to composer shell: mv /usr/local/bin/composer.phar /usr/local/bin/composer args: creates: /usr/local/bin/composer @@ -52,8 +52,9 @@ - name: Copy global and vocabulary-specific configurations copy: - src: files/config.ttl.dist + src: /var/www/html/Skosmos/config.ttl.dist dest: /var/www/html/Skosmos/config.ttl + remote_src : yes - name: Generate locales, if necessary shell: "locale-gen {{ item }}" From 811afd74479f79d425ef224f191b1fa71f6d7650 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Wed, 29 Aug 2018 15:27:26 +0300 Subject: [PATCH 154/173] reorder .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 42e157089..d54029920 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.DS_Store config.ttl build vendor @@ -9,3 +8,4 @@ composer.lock tests/jena-fuseki* .vagrant .project +.DS_Store From 5b2dd633c3d6fd7f15a98f317b8c50813ffec33f Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Fri, 31 Aug 2018 21:43:42 +1200 Subject: [PATCH 155/173] Use correct value when retrieving settings --- model/GlobalConfig.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/model/GlobalConfig.php b/model/GlobalConfig.php index 6260cc312..c39a1f177 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -84,6 +84,7 @@ private function initializeConfig() /** * Parses configuration from the config.ttl file * @param string $filename path to config.ttl file + * @throws \EasyRdf\Exception */ private function parseConfig($filename) { @@ -95,7 +96,7 @@ private function parseConfig($filename) /** * Returns the graph created after parsing the configuration file. - * @return Graph + * @return \EasyRdf\Graph */ public function getGraph() { @@ -125,7 +126,9 @@ public function getLanguages() if (!is_null($languageResources) && !empty($languageResources)) { $languages = array(); foreach ($languageResources as $languageResource) { + /** @var \EasyRdf\Literal $languageName */ $languageName = $languageResource->getLiteral('rdfs:label'); + /** @var \EasyRdf\Literal $languageValue */ $languageValue = $languageResource->getLiteral('rdf:value'); if ($languageName && $languageValue) { $languages[$languageName->getValue()] = $languageValue->getValue(); @@ -199,7 +202,7 @@ public function getSearchResultsSize() */ public function getTemplateCache() { - return $this->getLiteral('TEMPLATE_CACHE', '/tmp/skosmos-template-cache'); + return $this->getLiteral('skosmos:templateCache', '/tmp/skosmos-template-cache'); } /** @@ -209,7 +212,7 @@ public function getTemplateCache() */ public function getDefaultSparqlDialect() { - return $this->getLiteral('DEFAULT_SPARQL_DIALECT', 'Generic'); + return $this->getLiteral('skosmos:sparqlDialect', 'Generic'); } /** @@ -218,7 +221,7 @@ public function getDefaultSparqlDialect() */ public function getFeedbackAddress() { - return $this->getLiteral('FEEDBACK_ADDRESS', null); + return $this->getLiteral('skosmos:feedbackAddress', null); } /** @@ -227,7 +230,7 @@ public function getFeedbackAddress() */ public function getFeedbackSender() { - return $this->getLiteral('FEEDBACK_SENDER', null); + return $this->getLiteral('skosmos:feedbackSender', null); } /** @@ -236,7 +239,7 @@ public function getFeedbackSender() */ public function getFeedbackEnvelopeSender() { - return $this->getLiteral('FEEDBACK_ENVELOPE_SENDER', null); + return $this->getLiteral('skosmos:feedbackEnvelopeSender', null); } /** @@ -299,7 +302,7 @@ public function getBaseHref() } /** - * @return string + * @return array */ public function getGlobalPlugins() { From c6fa757525cc5960186ba2a907a51bf3e4dfa081 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Fri, 31 Aug 2018 23:46:11 +1200 Subject: [PATCH 156/173] Add tests for GlobalConfig --- tests/FeedbackTest.php | 2 +- tests/GlobalConfigTest.php | 301 ++++++++++++++++++------------- tests/testconfig-fordefaults.ttl | 18 ++ tests/testconfig-nograph.ttl | 0 tests/testconfig.ttl | 38 ++-- 5 files changed, 211 insertions(+), 148 deletions(-) create mode 100644 tests/testconfig-fordefaults.ttl create mode 100644 tests/testconfig-nograph.ttl diff --git a/tests/FeedbackTest.php b/tests/FeedbackTest.php index 12fe5976d..81127f9ff 100644 --- a/tests/FeedbackTest.php +++ b/tests/FeedbackTest.php @@ -8,7 +8,7 @@ class FeedbackTest extends PHPUnit\Framework\TestCase private $request; protected function setUp() { - $config = new GlobalConfig('/../tests/testconfig.ttl'); + $config = new GlobalConfig('/../tests/testconfig-fordefaults.ttl'); $this->model = new Model($config); $this->request = \Mockery::mock('Request', array($this->model))->makePartial(); $this->request->setLang('en'); diff --git a/tests/GlobalConfigTest.php b/tests/GlobalConfigTest.php index 570ec92b0..51e011c15 100644 --- a/tests/GlobalConfigTest.php +++ b/tests/GlobalConfigTest.php @@ -1,134 +1,179 @@ config = new GlobalConfig('/../tests/testconfig.ttl'); - } - - /** - * @covers GlobalConfig::getLanguages - */ - public function testLanguagesWithoutConfiguration() { - $actual = $this->config->getLanguages(); - $this->assertEquals(array('en' => 'en_GB.utf8'), $actual); - } - - /** - * @covers GlobalConfig::getHttpTimeout - */ - public function testTimeoutDefaultValue() { - $actual = $this->config->getHttpTimeout(); - $this->assertEquals(5, $actual); - } - - /** - * @covers GlobalConfig::getDefaultEndpoint - */ - public function testEndpointDefaultValue() { - $actual = $this->config->getDefaultEndpoint(); - $this->assertEquals('http://localhost:13030/ds/sparql', $actual); - } - - /** - * @covers GlobalConfig::getDefaultTransitiveLimit - */ - public function testTransitiveLimitDefaultValue() { - $actual = $this->config->getDefaultTransitiveLimit(); - $this->assertEquals(1000, $actual); - } - - /** - * @covers GlobalConfig::getSearchResultsSize - */ - public function testSearchLimitDefaultValue() { - $actual = $this->config->getSearchResultsSize(); - $this->assertEquals(20, $actual); - } - - /** - * @covers GlobalConfig::getTemplateCache - */ - public function testTemplateCacheDefaultValue() { - $actual = $this->config->getTemplateCache(); - $this->assertEquals('/tmp/skosmos-template-cache', $actual); - } - - /** - * @covers GlobalConfig::getDefaultSparqlDialect - */ - public function testSparqlDialectDefaultValue() { - $actual = $this->config->getDefaultSparqlDialect(); - $this->assertEquals('Generic', $actual); - } - - /** - * @covers GlobalConfig::getFeedbackAddress - */ - public function testFeedbackAddressDefaultValue() { - $actual = $this->config->getFeedbackAddress(); - $this->assertEquals(null, $actual); - } - - /** - * @covers GlobalConfig::getLogCaughtExceptions - */ - public function testExceptionLoggingDefaultValue() { - $actual = $this->config->getLogCaughtExceptions(); - $this->assertEquals(null, $actual); - } - - /** - * @covers GlobalConfig::getServiceName - */ - public function testServiceNameDefaultValue() { - $actual = $this->config->getServiceName(); - $this->assertEquals('Skosmos', $actual); - } - - /** - * @covers GlobalConfig::getCustomCss - */ - public function testCustomCssDefaultValue() { - $actual = $this->config->getCustomCss(); - $this->assertEquals(null, $actual); - } - - /** - * @covers GlobalConfig::getUILanguageDropdown - */ - public function testDefaultValue() { - $actual = $this->config->getUILanguageDropdown(); - $this->assertFalse($actual); - } - - /** - * @covers GlobalConfig::getBaseHref - */ - public function testBaseHrefDefaultValue() { - $actual = $this->config->getBaseHref(); - $this->assertEquals(null, $actual); - } - - /** - * @covers GlobalConfig::getCollationEnabled - */ - public function testGetCollationEnabled() { - $actual = $this->config->getCollationEnabled(); - $this->assertFalse($actual); - } - - /** - * @covers GlobalConfig::getGlobalPlugins - */ - public function testGetGlobalPlugins() { - $actual = $this->config->getGlobalPlugins(); - $this->assertEquals(array("alpha", "Bravo", "charlie"), $actual); - } + /** @var GlobalConfig */ + private $config; + /** @var GlobalConfig */ + private $configWithDefaults; + + protected function setUp() + { + $this->config = new GlobalConfig('/../tests/testconfig.ttl'); + $this->assertNotNull($this->config->getCache()); + $this->assertNotNull($this->config->getGraph()); + $this->configWithDefaults = new GlobalConfig('/../tests/testconfig-fordefaults.ttl'); + } + + // --- tests for values that are overriding default values + + public function testGetDefaultEndpoint() + { + $this->assertEquals("http://localhost:13030/ds/sparql", $this->config->getDefaultEndpoint()); + } + + public function testGetDefaultSparqlDialect() + { + $this->assertEquals("JenaText", $this->config->getDefaultSparqlDialect()); + } + + public function testGetCollationEnabled() + { + $this->assertEquals(true, $this->config->getCollationEnabled()); + } + + public function testGetSparqlTimeout() + { + $this->assertEquals(10, $this->config->getSparqlTimeout()); + } + + public function testGetHttpTimeout() + { + $this->assertEquals(2, $this->config->getHttpTimeout()); + } + + public function testGetServiceName() + { + $this->assertEquals("Skosmos being tested", $this->config->getServiceName()); + } + + public function testGetBaseHref() + { + $this->assertEquals("http://tests.localhost/Skosmos/", $this->config->getBaseHref()); + } + + public function testGetLanguages() + { + $this->assertEquals(array('en' => 'en_GB.utf8'), $this->config->getLanguages()); + } + + public function testGetSearchResultsSize() + { + $this->assertEquals(5, $this->config->getSearchResultsSize()); + } + + public function testGetDefaultTransitiveLimit() + { + $this->assertEquals(100, $this->config->getDefaultTransitiveLimit()); + } + + public function testGetLogCaughtExceptions() + { + $this->assertEquals(true, $this->config->getLogCaughtExceptions()); + } + + public function testGetLoggingBrowserConsole() + { + $this->assertEquals(true, $this->config->getLoggingBrowserConsole()); + } + + public function testGetLoggingFilename() + { + $this->assertEquals("/tmp/test_skosmos.log", $this->config->getLoggingFilename()); + } + + public function testGetTemplateCache() + { + $this->assertEquals("/tmp/skosmos-template-cache/tests", $this->config->getTemplateCache()); + } + + public function testGetCustomCss() + { + $this->assertEquals("resource/css/tests-stylesheet.css", $this->config->getCustomCss()); + } + + public function testGetFeedbackAddress() + { + $this->assertEquals("tests@skosmos.test", $this->config->getFeedbackAddress()); + } + + public function testGetFeedbackSender() + { + $this->assertEquals("tests skosmos", $this->config->getFeedbackSender()); + } + + public function testGetFeedbackEnvelopeSender() + { + $this->assertEquals("skosmos tests", $this->config->getFeedbackEnvelopeSender()); + } + + public function testGetUiLanguageDropdown() + { + $this->assertEquals(true, $this->config->getUiLanguageDropdown()); + } + + public function testGetHoneypotEnabled() + { + $this->assertEquals(false, $this->config->getHoneypotEnabled()); + } + + public function testGetHoneypotTime() + { + $this->assertEquals(2, $this->config->getHoneypotTime()); + } + + public function testGetGlobalPlugins() + { + $this->assertEquals(["widget"], $this->config->getGlobalPlugins()); + } + + // --- tests for the exception paths + + /** + * @expectedException + */ + public function testInitializeConfigWithoutGraph() + { + new GlobalConfig('/../tests/testconfig-nograph.ttl'); + } + + /** + * @expectedException + */ + public function testInexistentFile() + { + new GlobalConfig('/../tests/testconfig-idonotexist.ttl'); + } + + // --- tests for some default values + + public function testsGetDefaultLanguages() + { + $this->assertEquals(['en' => 'en_GB.utf8'], $this->configWithDefaults->getLanguages()); + } + + public function testGetDefaultHttpTimeout() + { + $this->assertEquals(5, $this->configWithDefaults->getHttpTimeout()); + } + + public function testGetDefaultFeedbackAddress() + { + $this->assertEquals(null, $this->configWithDefaults->getFeedbackAddress()); + } + + public function testGetDefaultLogCaughtExceptions() + { + $this->assertEquals(false, $this->configWithDefaults->getLogCaughtExceptions()); + } + + public function testGetDefaultServiceName() + { + $this->assertEquals("Skosmos", $this->configWithDefaults->getServiceName()); + } } diff --git a/tests/testconfig-fordefaults.ttl b/tests/testconfig-fordefaults.ttl new file mode 100644 index 000000000..d1234bfa5 --- /dev/null +++ b/tests/testconfig-fordefaults.ttl @@ -0,0 +1,18 @@ +@prefix void: . +@prefix rdf: . +@prefix rdfs: . +@prefix owl: . +@prefix xsd: . +@prefix dc: . +@prefix foaf: . +@prefix wv: . +@prefix sd: . +@prefix skos: . +@prefix skosmos: . +@prefix isothes: . +@prefix mdrtype: . +@prefix : <#> . + +# Skosmos main configuration + +:config a skosmos:Configuration . diff --git a/tests/testconfig-nograph.ttl b/tests/testconfig-nograph.ttl new file mode 100644 index 000000000..e69de29bb diff --git a/tests/testconfig.ttl b/tests/testconfig.ttl index b8db0b06b..36d92dba9 100644 --- a/tests/testconfig.ttl +++ b/tests/testconfig.ttl @@ -24,44 +24,44 @@ skosmos:sparqlEndpoint ; # sparql-query extension, or "Generic" for plain SPARQL 1.1 # set to "JenaText" instead if you use Fuseki with jena-text index - skosmos:sparqlDialect "Generic" ; + skosmos:sparqlDialect "JenaText" ; # whether to enable collation in sparql queries - skosmos:sparqlCollationEnabled false ; + skosmos:sparqlCollationEnabled true ; # HTTP client configuration - skosmos:sparqlTimeout 20 ; - skosmos:httpTimeout 5 ; + skosmos:sparqlTimeout 10 ; + skosmos:httpTimeout 2 ; # customize the service name - skosmos:serviceName "Skosmos" ; + skosmos:serviceName "Skosmos being tested" ; # customize the base element. Set this if the automatic base url detection doesn't work. For example setups behind a proxy. - # skosmos:baseHref "http://localhost/Skosmos/" ; + skosmos:baseHref "http://tests.localhost/Skosmos/" ; # interface languages available, and the corresponding system locales skosmos:languages ( [ rdfs:label "en" ; rdf:value "en_GB.utf8" ] ) ; # how many results (maximum) to load at a time on the search results page - skosmos:searchResultsSize 20 ; + skosmos:searchResultsSize 5 ; # how many items (maximum) to retrieve in transitive property queries - skosmos:transitiveLimit 1000 ; + skosmos:transitiveLimit 100 ; # whether or not to log caught exceptions - skosmos:logCaughtExceptions false ; + skosmos:logCaughtExceptions true ; # set to TRUE to enable logging into browser console - skosmos:logBrowserConsole false ; + skosmos:logBrowserConsole true ; # set to a logfile path to enable logging into log file - # skosmos:logFileName "" ; + skosmos:logFileName "/tmp/test_skosmos.log" ; # a default location for Twig template rendering - skosmos:templateCache "/tmp/skosmos-template-cache" ; + skosmos:templateCache "/tmp/skosmos-template-cache/tests" ; # customize the css by adding your own stylesheet - # skosmos:customCss "resource/css/stylesheet.css" ; + skosmos:customCss "resource/css/tests-stylesheet.css" ; # default email address where to send the feedback - skosmos:feedbackAddress "" ; + skosmos:feedbackAddress "tests@skosmos.test" ; # email address to set as the sender for feedback messages - skosmos:feedbackSender "" ; + skosmos:feedbackSender "tests skosmos" ; # email address to set as the envelope sender for feedback messages - skosmos:feedbackEnvelopeSender "" ; + skosmos:feedbackEnvelopeSender "skosmos tests" ; # whether to display the ui language selection as a dropdown (useful for cases where there are more than 3 languages) - skosmos:uiLanguageDropdown false ; + skosmos:uiLanguageDropdown true ; # whether to enable the spam honey pot or not, enabled by default - skosmos:uiHoneypotEnabled true ; + skosmos:uiHoneypotEnabled false ; # default time a user must wait before submitting a form - skosmos:uiHoneypotTime 5 ; + skosmos:uiHoneypotTime 2 ; # plugins to activate for the whole installation (including all vocabularies) skosmos:globalPlugins ("alpha" "Bravo" "charlie") . From 65a7f5fba6f36ac3c7d109d2492633d1de9e6faa Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Sat, 1 Sep 2018 00:35:51 +1200 Subject: [PATCH 157/173] Add more tests for VoacabularyConfig --- tests/VocabularyConfigTest.php | 49 +++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/tests/VocabularyConfigTest.php b/tests/VocabularyConfigTest.php index 46d28290e..87199861e 100644 --- a/tests/VocabularyConfigTest.php +++ b/tests/VocabularyConfigTest.php @@ -2,13 +2,18 @@ class VocabularyConfigTest extends PHPUnit\Framework\TestCase { - + /** @var Model */ private $model; + /** + * @covers VocabularyConfig::getConfig + * @throws Exception + */ protected function setUp() { putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); + $this->assertNotNull($this->model->getVocabulary('test')->getConfig()->getPlugins(), "The PluginRegister of the model was not initialized!"); } /** @@ -379,4 +384,46 @@ public function testGetLanguageOrder() { $this->assertEquals(array('en', 'fr', 'de', 'sv'), $vocab->getConfig()->getLanguageOrder('en')); $this->assertEquals(array('fi', 'fr', 'de', 'sv', 'en'), $vocab->getConfig()->getLanguageOrder('fi')); } + + /** + * @covers VocabularyConfig::showAlphabeticalIndex + */ + public function testShowAlphabeticalIndex() { + $vocab = $this->model->getVocabulary('testdiff'); + $this->assertTrue($vocab->getConfig()->showAlphabeticalIndex()); + } + + /** + * @covers VocabularyConfig::showNotation + */ + public function testShowNotation() { + $vocab = $this->model->getVocabulary('test'); + $this->assertTrue($vocab->getConfig()->showNotation()); + } + + /** + * @covers VocabularyConfig::getId + */ + public function testGetId() { + $vocab = $this->model->getVocabulary('testdiff'); + $this->assertEquals('testdiff' , $vocab->getConfig()->getId()); + } + + /** + * @covers VocabularyConfig::getMainConceptSchemeURI + */ + public function testGetMainConceptSchemeURI() { + $vocab = $this->model->getVocabulary('testdiff'); + $this->assertEquals('http://www.skosmos.skos/testdiff#conceptscheme' , $vocab->getConfig()->getMainConceptSchemeURI()); + $vocab = $this->model->getVocabulary('test'); + $this->assertNull(null , $vocab->getConfig()->getMainConceptSchemeURI()); + } + + /** + * @covers VocabularyConfig::getExtProperties + */ + public function testGetExtProperties() { + $vocab = $this->model->getVocabulary('cbd'); + $this->assertEquals(4 , count($vocab->getConfig()->getExtProperties())); + } } From 269a200af257934a537e6d6744dae998e6ce1203 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Sat, 1 Sep 2018 00:50:04 +1200 Subject: [PATCH 158/173] Use array in the test for GlobalConfig::getGlobalPlugins --- tests/GlobalConfigTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/GlobalConfigTest.php b/tests/GlobalConfigTest.php index 51e011c15..bd5680472 100644 --- a/tests/GlobalConfigTest.php +++ b/tests/GlobalConfigTest.php @@ -128,7 +128,7 @@ public function testGetHoneypotTime() public function testGetGlobalPlugins() { - $this->assertEquals(["widget"], $this->config->getGlobalPlugins()); + $this->assertEquals(["alpha", "Bravo", "charlie"], $this->config->getGlobalPlugins()); } // --- tests for the exception paths From 14b681fc6fd2787cd4b7c91de3d488051572f741 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 3 Sep 2018 14:26:26 +0300 Subject: [PATCH 159/173] Fix parameter order for jena-text queries - MAX_N setting was being ignored. Fixes #794 --- model/sparql/JenaTextSparql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/sparql/JenaTextSparql.php b/model/sparql/JenaTextSparql.php index b16ad2699..19e42f32d 100644 --- a/model/sparql/JenaTextSparql.php +++ b/model/sparql/JenaTextSparql.php @@ -52,7 +52,7 @@ private function createTextQueryCondition($term, $property = '', $lang = '') $maxResults = self::MAX_N; - return "(?s ?score ?match) text:query ($property '$term' $langClause $maxResults) ."; + return "(?s ?score ?match) text:query ($property '$term' $maxResults $langClause) ."; } /** From 9bda2713d69d7ec712f3f397d36a6a5f50da93f4 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Fri, 7 Sep 2018 14:28:05 +0300 Subject: [PATCH 160/173] Loosen the check for port numbers in guessBaseHref. Fixes #796 --- controller/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/Controller.php b/controller/Controller.php index b4087505b..94ab0fb62 100644 --- a/controller/Controller.php +++ b/controller/Controller.php @@ -94,7 +94,7 @@ private function guessBaseHref() $base_url = str_replace('/controller', '/', $base_url); $protocol = filter_input(INPUT_SERVER, 'HTTPS', FILTER_SANITIZE_STRING) === null ? 'http' : 'https'; $port = filter_input(INPUT_SERVER, 'SERVER_PORT', FILTER_SANITIZE_STRING); - $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : ":$port"; + $disp_port = ($port == 80 || $port == 443) ? '' : ":$port"; $domain = filter_input(INPUT_SERVER, 'SERVER_NAME', FILTER_SANITIZE_STRING); $full_url = "$protocol://{$domain}{$disp_port}{$base_url}"; return $full_url; From a8ec73420e14a2c9f4131e701c91a48eb3381bcd Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Fri, 7 Sep 2018 17:19:24 +0300 Subject: [PATCH 161/173] removed references to old configuration files --- .codeclimate.yml | 3 +-- controller/WebController.php | 6 +++--- docker-compose.yml | 2 +- model/BaseConfig.php | 6 +++--- model/Model.php | 4 ++-- model/VocabularyConfig.php | 24 ++++++++++++------------ swagger.json | 4 ++-- tests/ModelTest.php | 2 +- 8 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index faa9ee872..93fd8eb53 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -38,8 +38,7 @@ exclude_paths: - LICENSE - README.md - composer.json -- config.inc.dist -- vocabularies.ttl.dist +- config.ttl.dist - favicon.ico - phpdoc.sh - phpunit.xml diff --git a/controller/WebController.php b/controller/WebController.php index 9b6fb8043..a0c8e955b 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -29,7 +29,7 @@ public function __construct($model) // initialize Twig templates $tmpDir = $model->getConfig()->getTemplateCache(); - // check if the cache pointed by config.inc exists, if not we create it. + // check if the cache pointed by config.ttl exists, if not we create it. if (!file_exists($tmpDir)) { mkdir($tmpDir); } @@ -41,10 +41,10 @@ public function __construct($model) $this->twig->addExtension(new Twig_Extensions_Extension_I18n()); // used for setting the base href for the relative urls $this->twig->addGlobal("BaseHref", $this->getBaseHref()); - // setting the service name string from the config.inc + // setting the service name string from the config.ttl $this->twig->addGlobal("ServiceName", $this->model->getConfig()->getServiceName()); - // setting the service custom css file from the config.inc + // setting the service custom css file from the config.ttl if ($this->model->getConfig()->getCustomCss() !== null) { $this->twig->addGlobal("ServiceCustomCss", $this->model->getConfig()->getCustomCss()); } diff --git a/docker-compose.yml b/docker-compose.yml index be294177d..a6669a923 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,4 +27,4 @@ services: # 1. create dataset # >curl -I -u admin:admin -XPOST --data "dbName=skosmos&dbType=tdb" -G http://localhost:3030/$/datasets/ # 2. load example vocabulary -# >curl -I -X POST -H Content-Type:text/turtle -T vocabularies.ttl -G http://localhost:3030/skosmos/data +# >curl -I -X POST -H Content-Type:text/turtle -T config.ttl -G http://localhost:3030/skosmos/data diff --git a/model/BaseConfig.php b/model/BaseConfig.php index 320e2d9af..745fb5ba0 100644 --- a/model/BaseConfig.php +++ b/model/BaseConfig.php @@ -8,7 +8,7 @@ abstract class BaseConfig extends DataObject { /** - * Returns a boolean value based on a literal value from the vocabularies.ttl configuration. + * Returns a boolean value based on a literal value from the config.ttl configuration. * @param string $property the property to query * @param boolean $default the default value if the value is not set in configuration */ @@ -22,7 +22,7 @@ protected function getBoolean($property, $default = false) } /** - * Returns an array of URIs based on a property from the vocabularies.ttl configuration. + * Returns an array of URIs based on a property from the config.ttl configuration. * @param string $property the property to query * @return string[] List of URIs */ @@ -37,7 +37,7 @@ protected function getResources($property) } /** - * Returns a boolean value based on a literal value from the vocabularies.ttl configuration. + * Returns a boolean value based on a literal value from the config.ttl configuration. * @param string $property the property to query * @param string $default default value * @param string $lang preferred language for the literal diff --git a/model/Model.php b/model/Model.php index 1c412baba..24ec2bbdb 100644 --- a/model/Model.php +++ b/model/Model.php @@ -388,7 +388,7 @@ public function getVocabularyCategories() } /** - * Returns the label defined in vocabularies.ttl with the appropriate language. + * Returns the label defined in config.ttl with the appropriate language. * @param string $lang language code of returned labels, eg. 'fi' * @return string the label for vocabulary categories. */ @@ -592,7 +592,7 @@ public function getSparqlImplementation($dialect, $endpoint, $graph) } /** - * Returns a SPARQL endpoint object using the default implementation set in the config.inc. + * Returns a SPARQL endpoint object using the default implementation set in the config.ttl. */ public function getDefaultSparql() { diff --git a/model/VocabularyConfig.php b/model/VocabularyConfig.php index 9f8d4a445..964bf24c0 100644 --- a/model/VocabularyConfig.php +++ b/model/VocabularyConfig.php @@ -1,7 +1,7 @@ Date: Fri, 5 Oct 2018 13:29:07 +0300 Subject: [PATCH 162/173] Choose feedback recipient based on selection on feedback form, not the URL from which the feedback page was invoked. Fixes #808 --- controller/WebController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controller/WebController.php b/controller/WebController.php index a0c8e955b..312b98103 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -254,7 +254,9 @@ public function invokeFeedbackForm($request) $feedbackName = $request->getQueryParamPOST('name'); $feedbackEmail = $request->getQueryParamPOST('email'); $feedbackVocab = $request->getQueryParamPOST('vocab'); - $feedbackVocabEmail = ($vocab !== null) ? $vocab->getConfig()->getFeedbackRecipient() : null; + + $feedbackVocabEmail = ($feedbackVocab !== null && $feedbackVocab !== '') ? + $this->model->getVocabulary($feedbackVocab)->getConfig()->getFeedbackRecipient() : null; // if the hidden field has been set a value we have found a spam bot // and we do not actually send the message. From 0e8ed3ecf0437a8501e1c5d6cabcbc3bd90b10a3 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Fri, 5 Oct 2018 14:32:19 +0300 Subject: [PATCH 163/173] Fix unit test that broke after the fix to #808 (cherry picked from commit 1a55e8b1be5bb2728938c574a10927f95c0d7618) --- tests/FeedbackTest.php | 8 ++++---- tests/testconfig-fordefaults.ttl | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/tests/FeedbackTest.php b/tests/FeedbackTest.php index 81127f9ff..d842eba09 100644 --- a/tests/FeedbackTest.php +++ b/tests/FeedbackTest.php @@ -59,7 +59,7 @@ public function testHoneypotAndHoneypot() { $this->request ->shouldReceive('getQueryParamPOST') ->with('vocab') - ->andReturn('Test vocab'); + ->andReturn('test'); $this->request ->shouldReceive('getQueryParamPOST') ->with('item-description') @@ -100,7 +100,7 @@ public function testHoneypotAndHoneypotDisabled() { $this->request ->shouldReceive('getQueryParamPOST') ->with('vocab') - ->andReturn('Test vocab'); + ->andReturn('test'); $this->request ->shouldReceive('getQueryParamPOST') ->with('item-description') @@ -141,7 +141,7 @@ public function testHoneytimeTooFast() { $this->request ->shouldReceive('getQueryParamPOST') ->with('vocab') - ->andReturn('Test vocab'); + ->andReturn('test'); $this->request ->shouldReceive('getQueryParamPOST') ->with('item-description') @@ -180,7 +180,7 @@ public function testHoneypotNotEmpty() { $this->request ->shouldReceive('getQueryParamPOST') ->with('vocab') - ->andReturn('Test vocab'); + ->andReturn('test'); $this->request ->shouldReceive('getQueryParamPOST') ->with('item-description') diff --git a/tests/testconfig-fordefaults.ttl b/tests/testconfig-fordefaults.ttl index d1234bfa5..b3446195c 100644 --- a/tests/testconfig-fordefaults.ttl +++ b/tests/testconfig-fordefaults.ttl @@ -16,3 +16,35 @@ # Skosmos main configuration :config a skosmos:Configuration . + +:test a skosmos:Vocabulary, void:Dataset ; + dc:title "Test ontology"@en ; + dc:subject :cat_science ; + dc:type mdrtype:ONTOLOGY ; + void:dataDump ; + void:sparqlEndpoint ; + void:uriSpace "http://www.skosmos.skos/test/"; + skos:prefLabel "Test ontology"@en ; + skosmos:arrayClass isothes:ThesaurusArray ; + skosmos:defaultLanguage "en"; + skosmos:feedbackRecipient "developer@vocabulary.org"; + skosmos:groupClass skos:Collection; + skosmos:language "en"; + skosmos:showTopConcepts "true"; + skosmos:shortName "Test short", + "Testi lyhyt"@fi; + skosmos:sparqlGraph . + +:cat_science a skos:Concept ; + skos:topConceptOf :categories ; + skos:inScheme :categories ; + skos:prefLabel "Luonnontieteet ja lääketiede"@fi, + "Naturvetenskap och medicin"@sv, + "Science and medicine"@en . + +mdrtype:THESAURUS a skos:Concept ; + skos:prefLabel "Тезаурус"@bg, "Tezaurus"@cs, "Tesaurus"@da, "Thesaurus"@de, "Θησαυρός"@el, "Thesaurus"@en, "Tesaurus"@et, "Tesaurus"@fi, "Thésaurus"@fr, "Pojmovnik"@hr, "Tezaurusz"@hu, "Tesauro"@it, "Tēzaurs"@lv, "Tezauras"@lt, "Teżawru"@mt, "Thesaurus"@nl, "Tesaurus"@no, "Tezaurus"@pl, "Tesauro"@pt, "Tezaur"@ro, "Synonymický slovník"@sk, "Tezaver"@sl, "Tesauro"@es, "Tesaurus"@sv . + +mdrtype:ONTOLOGY a skos:Concept ; + skos:prefLabel "Онтология"@bg, "Ontologie"@cs, "Ontologi"@da, "Ontologie"@de, "Οντολογία"@el, "Ontology"@en, "Ontoloogia"@et, "Ontologia"@fi, "Ontologie"@fr, "Ontologija"@hr, "Ontológia"@hu, "Ontologia"@it, "Ontoloģija"@lv, "Ontologija"@lt, "Ontoloġija"@mt, "Ontologie"@nl, "Ontologi"@no, "Struktura pojęciowa"@pl, "Ontologia"@pt, "Ontologie"@ro, "Ontológia"@sk, "Ontologija"@sl, "Ontología"@es, "Ontologi"@sv . + From 27e53ed6df9c0dde1edec3d10fbb29ef14e49e33 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Fri, 5 Oct 2018 14:33:32 +0300 Subject: [PATCH 164/173] Fix fragile unit test (may break if /tmp/skosmos-template-cache exists but is owned by another user) --- tests/GlobalConfigTest.php | 2 +- tests/testconfig.ttl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/GlobalConfigTest.php b/tests/GlobalConfigTest.php index bd5680472..e394c59bd 100644 --- a/tests/GlobalConfigTest.php +++ b/tests/GlobalConfigTest.php @@ -88,7 +88,7 @@ public function testGetLoggingFilename() public function testGetTemplateCache() { - $this->assertEquals("/tmp/skosmos-template-cache/tests", $this->config->getTemplateCache()); + $this->assertEquals("/tmp/skosmos-template-cache-tests", $this->config->getTemplateCache()); } public function testGetCustomCss() diff --git a/tests/testconfig.ttl b/tests/testconfig.ttl index 36d92dba9..48ddd0fc0 100644 --- a/tests/testconfig.ttl +++ b/tests/testconfig.ttl @@ -47,7 +47,7 @@ # set to a logfile path to enable logging into log file skosmos:logFileName "/tmp/test_skosmos.log" ; # a default location for Twig template rendering - skosmos:templateCache "/tmp/skosmos-template-cache/tests" ; + skosmos:templateCache "/tmp/skosmos-template-cache-tests" ; # customize the css by adding your own stylesheet skosmos:customCss "resource/css/tests-stylesheet.css" ; # default email address where to send the feedback From 2634666d898bbf5f9ca8eb7bc0a949f77f88053d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= Date: Mon, 1 Oct 2018 15:45:17 +0200 Subject: [PATCH 165/173] Fix config migration of LOG_FILE_NAME=null Fixes #801 --- migrate-config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrate-config.php b/migrate-config.php index 08cbf1936..4caa082d3 100644 --- a/migrate-config.php +++ b/migrate-config.php @@ -69,7 +69,7 @@ function parse_vocabularies_file($vocabulariesFile) $transitiveLimit = defined('DEFAULT_TRANSITIVE_LIMIT') ? DEFAULT_TRANSITIVE_LIMIT : "?"; $logCaughtExceptions = defined('LOG_CAUGHT_EXCEPTIONS') ? (LOG_CAUGHT_EXCEPTIONS ? "true" : "false") : "?"; $logBrowserConsole = defined('LOG_BROWSER_CONSOLE') ? (LOG_BROWSER_CONSOLE ? "true" : "false") : "?"; -$logFileName = defined('LOG_FILE_NAME') ? LOG_FILE_NAME : "?"; +$logFileName = defined('LOG_FILE_NAME') && !empty(LOG_FILE_NAME) ? LOG_FILE_NAME : "?"; $templateCache = defined('TEMPLATE_CACHE') ? TEMPLATE_CACHE : "?"; $customCss = defined('CUSTOM_CSS') ? CUSTOM_CSS : "?"; $feedbackAddress = defined('FEEDBACK_ADDRESS') ? FEEDBACK_ADDRESS : "?"; From ef850a71fa35d4474b36e28c364212ff9a0adb9e Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Mon, 8 Oct 2018 11:23:48 +0300 Subject: [PATCH 166/173] fixes #804 --- resource/js/docready.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resource/js/docready.js b/resource/js/docready.js index 6de523918..16c6b921c 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -319,6 +319,7 @@ $(function() { // DOCUMENT READY $.ajaxQ.abortAll(); $('.active').removeClass('active'); $('#alpha').addClass('active'); + alpha_complete = false; $('.sidebar-grey').empty().prepend(spinner); var targetUrl = event.target.href; $.ajax({ @@ -811,7 +812,7 @@ $(function() { // DOCUMENT READY alpha_complete = true; $('.alphabetical-search-results').append($loading); var parameters = $.param({'offset' : 250, 'clang': content_lang}); - var letter = '/' + $('.pagination > .active > a')[0].innerHTML; + var letter = '/' + ($('.pagination > .active')[0] ? $('.pagination > .active > a')[0].innerHTML : $('.pagination > li > a')[0].innerHTML); $.ajax({ url : vocab + '/' + lang + '/index' + letter, data : parameters, From 34a0cb5767afb828f281f159628cf83579bf403b Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Thu, 8 Nov 2018 09:29:48 +0200 Subject: [PATCH 167/173] fix some css; addresses issue #799 --- resource/css/styles.css | 99 ++++------------------------------------- 1 file changed, 9 insertions(+), 90 deletions(-) diff --git a/resource/css/styles.css b/resource/css/styles.css index f6c8d7fdd..c00a2f0a6 100644 --- a/resource/css/styles.css +++ b/resource/css/styles.css @@ -899,7 +899,7 @@ span.xl-pref-label > img { height: 18px; } -hr { +#vocab-info hr { background: url('../pics/stripe.png') !important; border: 1px solid transparent !important; margin-bottom: 15px !important; @@ -1012,11 +1012,11 @@ li.sub-group { /* tables ****************************/ -th, td { +#vocab-info th, #vocab-info td { border-top: none !important; } -tr { +#vocab-info tr { border-image: '../pics/stripe.png' 20 20 repeat; } @@ -1101,11 +1101,6 @@ tr { padding-left: 0; } -.concept-info div > table > tbody > tr > td:first-child { - max-width: 225px; - width: 225px; -} - .row > .property-label { float: left; padding-left: 15px; @@ -1140,16 +1135,6 @@ tr { padding: 15px 0; } -.search-results-property-table .appendix-values.table { - background-color: transparent; - margin-bottom: 0; -} - -.appendix-values.table > tbody > tr > td { - border-bottom: 0; - padding: 0; -} - .appendix-vocab-label { font-size: 12px; line-height: 21px; @@ -1173,37 +1158,11 @@ tr { margin-left: 225px; } -.preflabel-container, .preflabel-container hr { - margin: 10px 0 5px 0; -} - -.search-results-property-table > tbody > .preflabel-container > td:last-child { - border: 0; -} - .preflabel-desc > span { position: relative; top: 11px; } -.search-results-property-table { - margin-bottom: 5px; -} - -.search-results-property-table tbody > tr > td { - padding: 5px 0 0 0; -} - -.search-results-property-table > tbody > tr > td.preflabel-spacer { - border-bottom: 1px solid transparent; - margin-bottom: 10px; - padding: 0; -} - -.search-results-property-table td:last-child { - border-bottom: 2px solid #d4edeb; -} - .concept-main > .row, .concept-appendix > .row { padding-top: 5px; } @@ -1224,24 +1183,11 @@ tr { padding-right: 0; } -.search-results-property-table tr.other-languages > td:last-child { - border-bottom: none; -} - -.search-results-property-table > tbody > tr:last-child > td { - border-bottom: 0; -} - -.search-results-property-table tr.other-languages > td { - border: none; - vertical-align: top; -} - .other-languages > td:last-of-type { vertical-align: top; } -table > tbody > tr.other-languages > td { +#vocab-info table > tbody > tr.other-languages > td { padding-top: 0; } @@ -1249,22 +1195,6 @@ table > tbody > tr.other-languages > td { padding-left: 15px; } -.search-results-property-table > tbody > tr > td.empty { - border: none; -} - -.search-results-property-table tr.first-of-language > td { - padding-top: 0; -} - -.search-results-property-table tbody > tr > td:first-of-type { - word-wrap: break-word; -} - -.search-results-property-table tbody > tr.first-of-language:first-child > td { - padding-top: 0; -} - .concept-main .versal-pref { font-weight: 500; } @@ -1347,21 +1277,10 @@ tr.replaced-by > td > ul > li > a { width: 14%; } -.property-divider hr { - border-bottom: 2px solid #3bc2bd; - position: absolute; - width: 125px; -} - -.table > tbody > tr > th { +#vocab-info .table > tbody > tr > th { padding-left: 0; } -.concept-main > .search-results-property-table { - margin-bottom: 5px; - margin-top: 10px; -} - #statistics { max-width: 450px; } #statistics .property-divider, #counts .property-divider { @@ -1807,10 +1726,10 @@ body, .versal, h1, h2, p, .versal-bold { } @media (max-width: 340px) { - .vocab-info-literals > table > tbody > tr > th { + #vocab-info .vocab-info-literals > table > tbody > tr > th { max-width: 120px; } - .vocab-info-literals > table > tbody > tr > td { + #vocab-info .vocab-info-literals > table > tbody > tr > td { max-width: 180px; } } @@ -2187,7 +2106,7 @@ body, .versal, h1, h2, p, .versal-bold { position: relative; width: 720px; } - + .voclist-left #vocabulary-list, .voclist-right #vocabulary-list { width: 955px !important; } @@ -2247,7 +2166,7 @@ body, .versal, h1, h2, p, .versal-bold { position: relative; width: 710px !important; } - + .voclist-left #vocabulary-list, .voclist-right #vocabulary-list { width: 975px !important; } From 6fbca9effcd6dda75f74a960fbdaa951fe3d3350 Mon Sep 17 00:00:00 2001 From: kouralex <1723419+kouralex@users.noreply.github.com> Date: Thu, 15 Nov 2018 14:33:34 +0200 Subject: [PATCH 168/173] #fixes #791; also update fuseki to 3.9.0 --- tests/init_fuseki.sh | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/tests/init_fuseki.sh b/tests/init_fuseki.sh index 6381ab9e7..4a46a1c23 100755 --- a/tests/init_fuseki.sh +++ b/tests/init_fuseki.sh @@ -1,34 +1,35 @@ #!/bin/bash # Note: This script must be sourced from within bash, e.g. ". init_fuseki.sh" -FUSEKI_VERSION=${FUSEKI_VERSION:-3.8.0} +FUSEKI_VERSION=${FUSEKI_VERSION:-3.9.0} if [ "$FUSEKI_VERSION" = "SNAPSHOT" ]; then - # find out the latest snapshot version and its download URL by parsing Apache directory listings - snapshotdir="https://repository.apache.org/content/repositories/snapshots/org/apache/jena/jena-fuseki1/" - latestdir=$(wget -q -O- "$snapshotdir" | grep 'a href=' | cut -d '"' -f 2 | grep SNAPSHOT | tail -n 1) - FUSEKI_VERSION=$(basename "$latestdir") - fusekiurl=$(wget -q -O- "$latestdir" | grep 'a href=' | cut -d '"' -f 2 | grep 'distribution\.tar\.gz$' | tail -n 1) + # find out the latest snapshot version and its download URL by parsing Apache directory listings + snapshotdir="https://repository.apache.org/content/repositories/snapshots/org/apache/jena/apache-jena-fuseki/" + latestdir=$(wget -q -O- "$snapshotdir" | grep 'a href=' | cut -d '"' -f 2 | grep SNAPSHOT | tail -n 1) + FUSEKI_VERSION=$(basename "$latestdir") + fusekiurl=$(wget -q -O- "$latestdir" | grep 'a href=' | cut -d '"' -f 2 | grep '\.tar\.gz$' | tail -n 1) else - fusekiurl="https://repository.apache.org/content/repositories/releases/org/apache/jena/jena-fuseki1/$FUSEKI_VERSION/jena-fuseki1-$FUSEKI_VERSION-distribution.tar.gz" + fusekiurl="https://repository.apache.org/content/repositories/releases/org/apache/jena/apache-jena-fuseki/$FUSEKI_VERSION/apache-jena-fuseki-$FUSEKI_VERSION.tar.gz" fi -if [ ! -f "jena-fuseki1-$FUSEKI_VERSION/fuseki-server" ]; then - echo "fuseki server file not found - downloading it" - wget --output-document=fuseki-dist.tar.gz "$fusekiurl" - tar -zxvf fuseki-dist.tar.gz +if [ ! -f "apache-jena-fuseki-$FUSEKI_VERSION/fuseki-server" ]; then + echo "fuseki server file not found - downloading it" + wget --output-document=fuseki-dist.tar.gz "$fusekiurl" + tar -zxvf fuseki-dist.tar.gz fi -cd "jena-fuseki1-$FUSEKI_VERSION" +cd "apache-jena-fuseki-$FUSEKI_VERSION" ./fuseki-server --port=13030 --config ../fuseki-assembler.ttl & until curl --output /dev/null --silent --head --fail http://localhost:13030; do - printf '.' - sleep 2 + printf '.' + sleep 2 done for fn in ../test-vocab-data/*.ttl; do - name=$(basename "${fn}" .ttl) - $(./s-put http://localhost:13030/ds/data "http://www.skosmos.skos/$name/" "$fn") + name=$(basename "${fn}" .ttl) + $(./bin/s-put http://localhost:13030/ds/data "http://www.skosmos.skos/$name/" "$fn") done cd .. + From d99ef31214f0ee977e58baaa3ab559a0355696c5 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 19 Nov 2018 10:31:13 +0200 Subject: [PATCH 169/173] Reenable Fuseki snapshot builds on Travis; use Fuseki2 3.9.0 on Travis instead of 3.8.0 --- .travis.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4fb9d82d8..f581f8117 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,9 +24,17 @@ after_script: env: global: - CC_TEST_REPORTER_ID=fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c - - FUSEKI_VERSION=3.8.0 + matrix: + - FUSEKI_VERSION=3.9.0 + - FUSEKI_VERSION=SNAPSHOT matrix: + exclude: + - php: 7.0 + env: FUSEKI_VERSION=SNAPSHOT + - php: 7.2 + env: FUSEKI_VERSION=SNAPSHOT allow_failures: - php: 7.2 + - env: FUSEKI_VERSION=SNAPSHOT notifications: slack: kansalliskirjasto:9mOKu3Vws1CIddF5jqWgXbli From 8ec66f28fdb264f3a73d39fc107ed99ba2c8cfcc Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Mon, 19 Nov 2018 11:26:00 +0200 Subject: [PATCH 170/173] Don't allow Travis builds with PHP 7.2 to fail; run Fuseki snapshot builds with PHP 7.2. Related to #758 --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f581f8117..7f1f1344b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,10 +31,9 @@ matrix: exclude: - php: 7.0 env: FUSEKI_VERSION=SNAPSHOT - - php: 7.2 + - php: 7.1 env: FUSEKI_VERSION=SNAPSHOT allow_failures: - - php: 7.2 - env: FUSEKI_VERSION=SNAPSHOT notifications: slack: kansalliskirjasto:9mOKu3Vws1CIddF5jqWgXbli From f1a1626d347e294c4de1d4cee1406aee0cc8f114 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Tue, 20 Nov 2018 11:37:14 +0200 Subject: [PATCH 171/173] check which locales are installed in Travis environment --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 7f1f1344b..34d98bf05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ before_script: - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build - cd tests + - locale -a - sh ./init_fuseki.sh - cd .. after_script: From d39361d30747521dc9c10121f5f053c0680d6069 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Tue, 20 Nov 2018 15:26:00 +0200 Subject: [PATCH 172/173] Try to break unit tests by setting LANGUAGE=fr. Part of #816 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 34d98bf05..128fb1d03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ before_script: - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build - cd tests - - locale -a + - export LANGUAGE=fr - sh ./init_fuseki.sh - cd .. after_script: From c1f9a28b1f76193c54d04ed924d8b20689b23a3e Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Tue, 20 Nov 2018 16:08:59 +0200 Subject: [PATCH 173/173] Always set LANGUAGE environment variable when setting LC_ALL. Fixes #816 --- controller/Controller.php | 1 + tests/ConceptMappingPropertyValueTest.php | 1 + tests/ConceptPropertyTest.php | 1 + tests/ConceptPropertyValueLiteralTest.php | 1 + tests/ConceptPropertyValueTest.php | 1 + tests/ConceptSearchParametersTest.php | 1 + tests/ConceptTest.php | 1 + tests/GenericSparqlTest.php | 1 + tests/JenaTextSparqlTest.php | 1 + tests/ModelTest.php | 1 + tests/RequestTest.php | 1 + tests/RestControllerTest.php | 3 ++- tests/VocabularyCategoryTest.php | 1 + tests/VocabularyConfigTest.php | 1 + tests/VocabularyTest.php | 1 + 15 files changed, 16 insertions(+), 1 deletion(-) diff --git a/controller/Controller.php b/controller/Controller.php index 94ab0fb62..c500677db 100644 --- a/controller/Controller.php +++ b/controller/Controller.php @@ -48,6 +48,7 @@ public function setLanguageProperties($lang) { if (array_key_exists($lang, $this->languages)) { $locale = $this->languages[$lang]['locale']; + putenv("LANGUAGE=$locale"); putenv("LC_ALL=$locale"); setlocale(LC_ALL, $locale); } else { diff --git a/tests/ConceptMappingPropertyValueTest.php b/tests/ConceptMappingPropertyValueTest.php index 9a3a970fa..215210499 100644 --- a/tests/ConceptMappingPropertyValueTest.php +++ b/tests/ConceptMappingPropertyValueTest.php @@ -8,6 +8,7 @@ class ConceptMappingPropertyValueTest extends PHPUnit\Framework\TestCase private $props; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); diff --git a/tests/ConceptPropertyTest.php b/tests/ConceptPropertyTest.php index 938091f70..f81f0bec2 100644 --- a/tests/ConceptPropertyTest.php +++ b/tests/ConceptPropertyTest.php @@ -5,6 +5,7 @@ class ConceptPropertyTest extends PHPUnit\Framework\TestCase private $model; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); diff --git a/tests/ConceptPropertyValueLiteralTest.php b/tests/ConceptPropertyValueLiteralTest.php index c99d71d6d..fa8ca5d1b 100644 --- a/tests/ConceptPropertyValueLiteralTest.php +++ b/tests/ConceptPropertyValueLiteralTest.php @@ -7,6 +7,7 @@ class ConceptPropertyValueLiteralTest extends PHPUnit\Framework\TestCase private $vocab; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); diff --git a/tests/ConceptPropertyValueTest.php b/tests/ConceptPropertyValueTest.php index 07dae4aee..3fb4601ca 100644 --- a/tests/ConceptPropertyValueTest.php +++ b/tests/ConceptPropertyValueTest.php @@ -7,6 +7,7 @@ class ConceptPropertyValueTest extends PHPUnit\Framework\TestCase private $vocab; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); diff --git a/tests/ConceptSearchParametersTest.php b/tests/ConceptSearchParametersTest.php index 1a98215fd..f6c70694a 100644 --- a/tests/ConceptSearchParametersTest.php +++ b/tests/ConceptSearchParametersTest.php @@ -6,6 +6,7 @@ class ConceptSearchParametersTest extends PHPUnit\Framework\TestCase private $request; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); $this->request = $this->getMockBuilder('Request')->disableOriginalConstructor()->getMock(); diff --git a/tests/ConceptTest.php b/tests/ConceptTest.php index 25d35ca74..a2440b1ea 100644 --- a/tests/ConceptTest.php +++ b/tests/ConceptTest.php @@ -8,6 +8,7 @@ class ConceptTest extends PHPUnit\Framework\TestCase private $cbdGraph; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); diff --git a/tests/GenericSparqlTest.php b/tests/GenericSparqlTest.php index 7367c8772..5604bbf70 100644 --- a/tests/GenericSparqlTest.php +++ b/tests/GenericSparqlTest.php @@ -9,6 +9,7 @@ class GenericSparqlTest extends PHPUnit\Framework\TestCase private $params; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); diff --git a/tests/JenaTextSparqlTest.php b/tests/JenaTextSparqlTest.php index 371bfe425..9189fd809 100644 --- a/tests/JenaTextSparqlTest.php +++ b/tests/JenaTextSparqlTest.php @@ -9,6 +9,7 @@ class JenaTextSparqlTest extends PHPUnit\Framework\TestCase private $params; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); $this->model = new Model(new GlobalConfig('/../tests/jenatestconfig.ttl')); diff --git a/tests/ModelTest.php b/tests/ModelTest.php index 28b2b4ba3..402adea2a 100644 --- a/tests/ModelTest.php +++ b/tests/ModelTest.php @@ -6,6 +6,7 @@ class ModelTest extends PHPUnit\Framework\TestCase private $model; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); diff --git a/tests/RequestTest.php b/tests/RequestTest.php index a8e02dbe3..9c3df3948 100644 --- a/tests/RequestTest.php +++ b/tests/RequestTest.php @@ -6,6 +6,7 @@ class RequestTest extends PHPUnit\Framework\TestCase private $request; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); diff --git a/tests/RestControllerTest.php b/tests/RestControllerTest.php index f7d6f30b7..eb8793bfb 100644 --- a/tests/RestControllerTest.php +++ b/tests/RestControllerTest.php @@ -8,6 +8,7 @@ class RestControllerTest extends \PHPUnit\Framework\TestCase { protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); bindtextdomain('skosmos', 'resource/translations'); @@ -60,4 +61,4 @@ public function testSearchJsonLdWithAdditionalFields() { $this->assertJsonStringEqualsJsonString('{"@context":{"skos":"http:\/\/www.w3.org\/2004\/02\/skos\/core#","isothes":"http:\/\/purl.org\/iso25964\/skos-thes#","onki":"http:\/\/schema.onki.fi\/onki#","uri":"@id","type":"@type","results":{"@id":"onki:results","@container":"@list"},"prefLabel":"skos:prefLabel","altLabel":"skos:altLabel","hiddenLabel":"skos:hiddenLabel","broader":"skos:broader","relatedMatch":"skos:relatedMatch"},"uri":"","results":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta117","type":["skos:Concept","meta:TestClass"],"broader":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta1"}],"relatedMatch":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta115"}],"prefLabel":"3D Bass","lang":"en","vocab":"test"},{"uri":"http:\/\/www.skosmos.skos\/test\/ta116","type":["skos:Concept","meta:TestClass"],"broader":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta1"}],"prefLabel":"Bass","lang":"en","vocab":"test"},{"uri":"http:\/\/www.skosmos.skos\/test\/ta122","type":["skos:Concept","meta:TestClass"],"broader":[{"uri":"http:\/\/www.skosmos.skos\/test\/ta116"}],"prefLabel":"Black sea bass","lang":"en","vocab":"test"}]}', $out); } -} \ No newline at end of file +} diff --git a/tests/VocabularyCategoryTest.php b/tests/VocabularyCategoryTest.php index 0abdfc57f..10ac7cdb2 100644 --- a/tests/VocabularyCategoryTest.php +++ b/tests/VocabularyCategoryTest.php @@ -6,6 +6,7 @@ class VocabularyCategoryTest extends PHPUnit\Framework\TestCase private $mockres; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); diff --git a/tests/VocabularyConfigTest.php b/tests/VocabularyConfigTest.php index 87199861e..45d20db01 100644 --- a/tests/VocabularyConfigTest.php +++ b/tests/VocabularyConfigTest.php @@ -10,6 +10,7 @@ class VocabularyConfigTest extends PHPUnit\Framework\TestCase * @throws Exception */ protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); diff --git a/tests/VocabularyTest.php b/tests/VocabularyTest.php index e54b67d00..7acb60d2e 100644 --- a/tests/VocabularyTest.php +++ b/tests/VocabularyTest.php @@ -8,6 +8,7 @@ class VocabularyTest extends \PHPUnit\Framework\TestCase private $model; protected function setUp() { + putenv("LANGUAGE=en_GB.utf8"); putenv("LC_ALL=en_GB.utf8"); setlocale(LC_ALL, 'en_GB.utf8'); $this->model = new Model(new GlobalConfig('/../tests/testconfig.ttl'));