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/.travis.yml b/.travis.yml index a2a7d4f0e..52cd3e2b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,9 @@ sudo: required dist: trusty language: php php: - - "7.0" + - 7.0 + - 7.1 + - 7.2 install: - composer install cache: @@ -23,10 +25,16 @@ env: global: - CC_TEST_REPORTER_ID=fb98170a5c7ea9cc2bbab19ff26268335e6a11a4f8267ca935e5e8ff4624886c matrix: - - FUSEKI_VERSION=3.6.0 + - 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: finto:5rO9Lp4Tstn6y34grtFBpjJ0 + slack: kansalliskirjasto:9mOKu3Vws1CIddF5jqWgXbli 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 diff --git a/config.inc.dist b/config.inc.dist deleted file mode 100644 index d73532109..000000000 --- a/config.inc.dist +++ /dev/null @@ -1,68 +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 to send the feedback -define("FEEDBACK_ADDRESS", ""); - -// 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..f9623890e --- /dev/null +++ b/config.ttl.dist @@ -0,0 +1,128 @@ +@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 ( + [ 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/controller/RestController.php b/controller/RestController.php index dc86ce441..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); } @@ -561,6 +577,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/controller/WebController.php b/controller/WebController.php index 74bb301cd..51315350a 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 = $this->model->getConfig()->getFeedbackAddress(); + + // 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/migrate-config.php b/migrate-config.php new file mode 100644 index 000000000..0f31a9cc0 --- /dev/null +++ b/migrate-config.php @@ -0,0 +1,153 @@ + $prefixes, 'config' => $config]; +} + +// 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]; + +# 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)) { + 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) . " "; +} + +# print the prefixes +echo $vocabs['prefixes']; + +# print the global config using a string template +$globalConfig = <<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/Concept.php b/model/Concept.php index a5217ee77..d1625bbed 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); + $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 5bd771892..48560e189 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, $sort_by_notation=false) { $this->prop = $prop; $this->label = $label; $this->values = array(); $this->is_sorted = true; $this->super = $super; + $this->sort_by_notation = $sort_by_notation; } /** @@ -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; 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) { 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/model/GlobalConfig.php b/model/GlobalConfig.php index e2881851a..b0d7fadd7 100644 --- a/model/GlobalConfig.php +++ b/model/GlobalConfig.php @@ -1,57 +1,140 @@ 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() { - if ($this->languages) { - return $this->languages; + 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 + $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 + $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) + { + $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()->getResource('skosmos:languages'); + if (!is_null($languageResources) && !empty($languageResources)) { + $languages = array(); + foreach ($languageResources as $languageResource) { + $languageName = $languageResource->getLiteral('rdfs:label'); + $languageValue = $languageResource->getLiteral('rdf:value'); + if ($languageName && $languageValue) { + $languages[$languageName->getValue()] = $languageValue->getValue(); + } + } + return $languages; + } else { + return array('en' => 'en_GB.utf8'); + } } /** @@ -61,7 +144,7 @@ public function getVocabularyConfigFile() */ public function getHttpTimeout() { - return $this->getConstant('HTTP_TIMEOUT', 5); + return $this->getLiteral('skosmos:httpTimeout', 5); } /** @@ -71,7 +154,7 @@ public function getHttpTimeout() */ public function getSparqlTimeout() { - return $this->getConstant('SPARQL_TIMEOUT', 20); + return $this->getLiteral('skosmos:sparqlTimeout', 20); } /** @@ -81,15 +164,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 +174,7 @@ public function getSparqlGraphStore() */ public function getDefaultTransitiveLimit() { - return $this->getConstant('DEFAULT_TRANSITIVE_LIMIT', 1000); + return $this->getLiteral('skosmos:transitiveLimit', 1000); } /** @@ -109,7 +184,7 @@ public function getDefaultTransitiveLimit() */ public function getSearchResultsSize() { - return $this->getConstant('SEARCH_RESULTS_SIZE', 20); + return $this->getLiteral('skosmos:searchResultsSize', 20); } /** @@ -119,7 +194,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 +204,7 @@ public function getTemplateCache() */ public function getDefaultSparqlDialect() { - return $this->getConstant('DEFAULT_SPARQL_DIALECT', 'Generic'); + return $this->getLiteral('DEFAULT_SPARQL_DIALECT', 'Generic'); } /** @@ -138,7 +213,25 @@ public function getDefaultSparqlDialect() */ public function getFeedbackAddress() { - return $this->getConstant('FEEDBACK_ADDRESS', null); + return $this->getLiteral('FEEDBACK_ADDRESS', null); + } + + /** + * Returns the feedback sender address defined in the configuration. + * @return string + */ + public function getFeedbackSender() + { + return $this->getLiteral('FEEDBACK_SENDER', null); + } + + /** + * Returns the feedback envelope sender address defined in the configuration. + * @return string + */ + public function getFeedbackEnvelopeSender() + { + return $this->getLiteral('FEEDBACK_ENVELOPE_SENDER', null); } /** @@ -147,7 +240,7 @@ public function getFeedbackAddress() */ public function getLogCaughtExceptions() { - return $this->getConstant('LOG_CAUGHT_EXCEPTIONS', FALSE); + return $this->getBoolean('skosmos:logCaughtExceptions', FALSE); } /** @@ -156,7 +249,7 @@ public function getLogCaughtExceptions() */ public function getLoggingBrowserConsole() { - return $this->getConstant('LOG_BROWSER_CONSOLE', FALSE); + return $this->getBoolean('skosmos:logBrowserConsole', FALSE); } /** @@ -165,7 +258,7 @@ public function getLoggingBrowserConsole() */ public function getLoggingFilename() { - return $this->getConstant('LOG_FILE_NAME', null); + return $this->getLiteral('skosmos:logFileName', null); } /** @@ -173,15 +266,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'); } /** @@ -189,7 +274,7 @@ public function getServiceTagline() */ public function getCustomCss() { - return $this->getConstant('CUSTOM_CSS', null); + return $this->getLiteral('skosmos:customCss', null); } /** @@ -197,7 +282,7 @@ public function getCustomCss() */ public function getUiLanguageDropdown() { - return $this->getConstant('UI_LANGUAGE_DROPDOWN', FALSE); + return $this->getBoolean('skosmos:uiLanguageDropdown', FALSE); } /** @@ -205,7 +290,7 @@ public function getUiLanguageDropdown() */ public function getBaseHref() { - return $this->getConstant('BASE_HREF', null); + return $this->getLiteral('skosmos:baseHref', null); } /** @@ -213,7 +298,14 @@ public function getBaseHref() */ public function getGlobalPlugins() { - return explode(' ', $this->getConstant('GLOBAL_PLUGINS', null)); + $globalPlugins = array(); + $globalPluginsResource = $this->getResource()->getResource("skosmos:globalPlugins"); + if ($globalPluginsResource) { + foreach ($globalPluginsResource as $resource) { + $globalPlugins[] = $resource->getValue(); + } + } + return $globalPlugins; } /** @@ -221,7 +313,7 @@ public function getGlobalPlugins() */ public function getHoneypotEnabled() { - return $this->getConstant('UI_HONEYPOT_ENABLED', TRUE); + return $this->getBoolean('skosmos:uiHoneypotEnabled', TRUE); } /** @@ -229,7 +321,7 @@ public function getHoneypotEnabled() */ public function getHoneypotTime() { - return $this->getConstant('UI_HONEYPOT_TIME', 5); + return $this->getLiteral('skosmos:uiHoneypotTime', 5); } /** @@ -237,6 +329,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..1c412baba 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 +35,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 */ @@ -157,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) { @@ -423,7 +342,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 +369,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 +379,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 +394,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 +563,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/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() { 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() 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/model/sparql/GenericSparql.php b/model/sparql/GenericSparql.php index 601293351..575ce5c60 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)); @@ -443,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; @@ -870,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' : ''; @@ -1276,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 = <<, 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 "" 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 c86d28167..77cc991cf 100644 Binary files a/resource/translations/sv/LC_MESSAGES/skosmos.mo and b/resource/translations/sv/LC_MESSAGES/skosmos.mo differ 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 8ee4eb2b2..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); @@ -52,7 +51,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'); diff --git a/tests/ConceptPropertyValueTest.php b/tests/ConceptPropertyValueTest.php index 48390950e..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); @@ -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/ConceptSearchParametersTest.php b/tests/ConceptSearchParametersTest.php index 4530eec7c..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,8 +159,8 @@ public function testGetArrayClass() { * @covers ConceptSearchParameters::getQueryParam */ public function testGetSchemeLimit() { - $params = new ConceptSearchParameters($this->request, new GlobalConfig('/../tests/testconfig.inc')); - $this->assertEquals(null, $params->getSchemeLimit()); + $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 18e1b8e91..7367c8772 100644 --- a/tests/GenericSparqlTest.php +++ b/tests/GenericSparqlTest.php @@ -11,18 +11,18 @@ 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(); - $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']); @@ -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 @@ -876,7 +893,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 +908,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 +923,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 +954,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 +972,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 +1012,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..570ec92b0 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:3030/ds/sparql', $actual); - } - - /** - * @covers GlobalConfig::getSparqlGraphStore - * @covers GlobalConfig::getConstant - */ - public function testSparqlGraphDefaultValue() { - $actual = $this->config->getSparqlGraphStore(); - $this->assertEquals(null, $actual); + $this->assertEquals('http://localhost:13030/ds/sparql', $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 */ @@ -161,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/JenaTextSparqlTest.php b/tests/JenaTextSparqlTest.php index 0aa42df21..371bfe425 100644 --- a/tests/JenaTextSparqlTest.php +++ b/tests/JenaTextSparqlTest.php @@ -11,18 +11,18 @@ 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(); - $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..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')); } /** @@ -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,9 +161,13 @@ public function testSearchWithOnlyMultipleWildcards() { /** * @covers Model::searchConcepts - * @expectedException PHPUnit\Framework\Error\Error */ public function testSearchWithNoParams() { + if (PHP_VERSION_ID >= 70100) { + $this->expectException(ArgumentCountError::class); + } else { + $this->expectException(PHPUnit\Framework\Error\Error::class); + } $result = $this->model->searchConcepts(); } @@ -493,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 new file mode 100644 index 000000000..f7d6f30b7 --- /dev/null +++ b/tests/RestControllerTest.php @@ -0,0 +1,63 @@ +model = new Model(new GlobalConfig('/../tests/testconfig.ttl')); + $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); + } + + /** + * @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 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 47b24336f..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')); } /** @@ -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); } /** @@ -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/init_fuseki.sh b/tests/init_fuseki.sh index 99aad02d2..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.4.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 @@ -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/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 ; dc:subject :cat_science ; dc:type mdrtype:ONTOLOGY ; void:dataDump ; - void:sparqlEndpoint ; + 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"; @@ -39,7 +87,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 +98,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"; @@ -68,8 +116,8 @@ ; void:uriSpace "http://www.skosmos.skos/onto/groups/"; skosmos:arrayClass isothes:ThesaurusArray ; - skosmos:groupClass skos:Collection ; - void:sparqlEndpoint ; + skosmos:groupClass skos:Collection ; + void:sparqlEndpoint ; skosmos:language "fi", "en"; skosmos:defaultLanguage "fi"; skosmos:indexShowClass meta:TestClass, meta:TestClass2; @@ -83,8 +131,8 @@ ; void:uriSpace "http://www.exemple.fr/"; skosmos:arrayClass isothes:ThesaurusArray ; - skosmos:groupClass skos:Collection ; - void:sparqlEndpoint ; + skosmos:groupClass skos:Collection ; + void:sparqlEndpoint ; skosmos:language "en"; skosmos:defaultLanguage "en"; skosmos:sparqlGraph . @@ -97,7 +145,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 +155,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 +163,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,10 +174,10 @@ 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 ; + skosmos:hasMultiLingualProperty skos:altLabel ; skosmos:sparqlGraph ; skosmos:mainConceptScheme . @@ -137,7 +185,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 +193,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 +201,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 +209,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 +217,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 +225,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 +235,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,10 +247,19 @@ skosmos:externalProperty dc11:creator ; skosmos:externalProperty dc11:relation ; skosmos:externalProperty rdfs:comment ; - void:sparqlEndpoint ; + 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 ; 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 ; 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/testconfig.inc b/tests/testconfig.inc deleted file mode 100644 index 42bffec2e..000000000 --- a/tests/testconfig.inc +++ /dev/null @@ -1,3 +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 ( [ 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 ("alpha" "Bravo" "charlie") . + +# 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/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 %} 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 %} *

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 . -