added modules related to ariadneplus

This commit is contained in:
Enrico Ottonello 2019-06-18 16:15:23 +02:00
parent 2497bd4a7c
commit a9f6a0f6eb
236 changed files with 65562 additions and 0 deletions

20
.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
/.metadata/
.DS_Store
.idea
*.iml
*~
.classpath
/*/.classpath
/*/*/.classpath
.metadata
/*/.metadata
/*/*/.metadata
.project
.log
.settings
/*/*/target
/*/target
/target
/*/*/build
/*/build
/build

View File

@ -0,0 +1,164 @@
<factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-beanutils/commons-beanutils/1.9.2/commons-beanutils-1.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-web/4.2.2.RELEASE/spring-security-web-4.2.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-core/4.2.2.RELEASE/spring-security-core-4.2.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/4.3.5.RELEASE/spring-core-4.3.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/4.3.5.RELEASE/spring-expression-4.3.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-config/4.2.2.RELEASE/spring-security-config-4.2.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/4.3.5.RELEASE/spring-aop-4.3.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-tx/4.2.5.RELEASE/spring-tx-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/junit/junit/4.12/junit-4.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-msro-service/6.0.1-SAXONHE-SNAPSHOT/dnet-msro-service-6.0.1-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/mail/mail/1.4.7/mail-1.4.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/gr/forth/ics/isl/x3ml-engine/1.9.0/x3ml-engine-1.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/thoughtworks/xstream/xstream/1.4.2/xstream-1.4.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/damnhandy/handy-uri-templates/2.1.6/handy-uri-templates-2.1.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/jena/jena-core/2.12.0/jena-core-2.12.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/jena/jena-iri/1.1.0/jena-iri-1.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jooq/joox/1.2.0/joox-1.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/gr/forth/ics/isl/X3ML_reverse_utils/1.5/X3ML_reverse_utils-1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jsoup/jsoup/1.7.3/jsoup-1.7.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/jena/jena-arq/2.12.0/jena-arq-2.12.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jsonld-java/jsonld-java/0.5.0/jsonld-java-0.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.3.3/jackson-databind-2.3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.3.0/jackson-annotations-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient-cache/4.2.6/httpclient-cache-4.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jcl-over-slf4j/1.7.6/jcl-over-slf4j-1.7.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.16.16/lombok-1.16.16.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-data-services/2.0.1-SAXONHE-SNAPSHOT/dnet-data-services-2.0.1-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-core-components/2.0.1-SAXONHE-SNAPSHOT/dnet-core-components-2.0.1-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/quartz-scheduler/quartz/2.2.2/quartz-2.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/c3p0/c3p0/0.9.1.1/c3p0-0.9.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context-support/4.2.5.RELEASE/spring-context-support-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/18.0/guava-18.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/ehcache/ehcache-core/2.6.2/ehcache-core-2.6.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-queryparser/5.5.0/lucene-queryparser-5.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-core/5.5.0/lucene-core-5.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-queries/5.5.0/lucene-queries-5.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-sandbox/5.5.0/lucene-sandbox-5.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/z3950/zing/cql-java/1.7/cql-java-1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/stringtemplate/3.2/stringtemplate-3.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.4.1/httpclient-4.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.8/commons-codec-1.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/saxon/Saxon-HE/9.5.1-5/Saxon-HE-9.5.1-5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jaxen/jaxen/1.1.6/jaxen-1.1.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ximpleware/vtd-xml/2.13.4/vtd-xml-2.13.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/mycila/xmltool/3.3/xmltool-3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.10.2/joda-time-2.10.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-test/4.2.5.RELEASE/spring-test-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-core-services/2.0.1-SAXONHE-SNAPSHOT/dnet-core-services-2.0.1-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/groovy/groovy-all/2.4.6/groovy-all-2.4.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mongodb/mongo-java-driver/3.4.2/mongo-java-driver-3.4.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-net/commons-net/3.3/commons-net-3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/jcraft/jsch/0.1.53/jsch-0.1.53.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-csv/1.0/commons-csv-1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.6/commons-compress-1.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/tukaani/xz/1.4/xz-1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/svenson/svenson-json/1.4.0/svenson-json-1.4.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/xsom/xsom/20110809/xsom-20110809.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/relaxngDatatype/relaxngDatatype/20020414/relaxngDatatype-20020414.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/oro/oro/2.0.8/oro-2.0.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-modular-uis/2.0.2-SAXONHE-SNAPSHOT/dnet-modular-uis-2.0.2-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/maven/maven-model/3.2.3/maven-model-3.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/plexus/plexus-utils/3.0.17/plexus-utils-3.0.17.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-information-service/2.0.2-SAXONHE-SNAPSHOT/dnet-information-service-2.0.2-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/exist-db/exist-core/3.0.RC1/exist-core-3.0.RC1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.5.0/jackson-core-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/krukow/clj-ds/0.0.4/clj-ds-0.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/siemens/ct/exi/exificient/0.9.3/exificient-0.9.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/exist-db/thirdparty/net/sf/sunxacml/sunxacml/1.2/sunxacml-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/thaiopensource/jing/20091111/jing-20091111.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/isorelax/isorelax/20030108/isorelax-20030108.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/gnu/gnu-crypto/2.0.1/gnu-crypto-2.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/exist-db/thirdparty/javax/xml/xquery/xqjapi/1.0-fr/xqjapi-1.0-fr.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jline/jline/0.9.94/jline-0.9.94.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cglib/cglib/2.2.2/cglib-2.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/excalibur-cli/excalibur-cli/1.0/excalibur-cli-1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-pool/commons-pool/1.6/commons-pool-1.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.3/log4j-api-2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-core/2.3/log4j-core-2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-jul/2.3/log4j-jul-2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/ant/ant/1.9.4/ant-1.9.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/ant/ant-launcher/1.9.4/ant-launcher-1.9.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlrpc/xmlrpc-common/3.1.3/xmlrpc-common-3.1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/ws/commons/util/ws-commons-util/1.0.2/ws-commons-util-1.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlrpc/xmlrpc-client/3.1.3/xmlrpc-client-3.1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlrpc/xmlrpc-server/3.1.3/xmlrpc-server-3.1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/exist-db/thirdparty/org/expath/pkg-repo/0.6.0-patched/pkg-repo-0.6.0-patched.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fifesoft/rsyntaxtextarea/2.5.6/rsyntaxtextarea-2.5.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/exist-db/thirdparty/org/xmldb/xmldb-api/1.0-patched/xmldb-api-1.0-patched.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/exist-db/exist-start/3.0.RC1/exist-start-3.0.RC1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjrt/1.8.9/aspectjrt-1.8.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/4.2.5.RELEASE/spring-jdbc-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-orm/4.2.5.RELEASE/spring-orm-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/postgresql/jdbc4driver/8.3/jdbc4driver-8.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/xerial/sqlite-jdbc/3.8.11.2/sqlite-jdbc-3.8.11.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-entitymanager/5.0.8.Final/hibernate-entitymanager-5.0.8.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.3.0.Final/jboss-logging-3.3.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/hibernate-core/5.0.8.Final/hibernate-core-5.0.8.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/jandex/2.0.0.Final/jandex-2.0.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/common/hibernate-commons-annotations/5.0.1.Final/hibernate-commons-annotations-5.0.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-dbcp2/2.1.1/commons-dbcp2-2.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-pool2/2.4.2/commons-pool2-2.4.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-data-provision-services/2.0.1-SAXONHE-SNAPSHOT/dnet-data-provision-services-2.0.1-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/scala-lang/scala-library/2.9.2/scala-library-2.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/typesafe/config/1.3.0/config-1.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/typesafe/akka/akka-actor/2.0.4/akka-actor-2.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/2.4/commons-io-2.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/solr/solr-solrj/5.5.0/solr-solrj-5.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.1/httpcore-4.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpmime/4.4.1/httpmime-4.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/woodstox/stax2-api/3.1.4/stax2-api-3.1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/woodstox/woodstox-core-asl/4.4.1/woodstox-core-asl-4.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/noggit/noggit/0.6/noggit-0.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/bull/javamelody/javamelody-core/1.65.0/javamelody-core-1.65.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jrobin/jrobin/1.5.9/jrobin-1.5.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/lowagie/itext/2.1.7/itext-2.1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/4.2.5.RELEASE/spring-beans-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/4.2.5.RELEASE/spring-web-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/4.2.5.RELEASE/spring-context-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/4.2.5.RELEASE/spring-webmvc-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-frontend-jaxws/3.1.5/cxf-rt-frontend-jaxws-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-core/3.1.5/cxf-core-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/ws/xmlschema/xmlschema-core/2.2.1/xmlschema-core-2.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-bindings-soap/3.1.5/cxf-rt-bindings-soap-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-wsdl/3.1.5/cxf-rt-wsdl-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-databinding-jaxb/3.1.5/cxf-rt-databinding-jaxb-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/xml/bind/jaxb-impl/2.2.11/jaxb-impl-2.2.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/xml/bind/jaxb-core/2.2.11/jaxb-core-2.2.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-bindings-xml/3.1.5/cxf-rt-bindings-xml-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-frontend-simple/3.1.5/cxf-rt-frontend-simple-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-ws-addr/3.1.5/cxf-rt-ws-addr-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-transports-http/3.1.5/cxf-rt-transports-http-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-ws-policy/3.1.5/cxf-rt-ws-policy-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/neethi/neethi/3.0.3/neethi-3.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-ws-rm/3.1.5/cxf-rt-ws-rm-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-management/3.1.5/cxf-rt-management-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/wss4j/wss4j-policy/2.1.4/wss4j-policy-2.1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/log4j/log4j/1.2.17/log4j-1.2.17.jar" enabled="true" runInBatchMode="false"/>
</factorypath>

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-container-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath></relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-ariadneplus-container</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<scm>
<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet50/webapps/dnet-ariadneplus-container/trunk</developerConnection>
</scm>
<dependencies>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.2</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>4.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>4.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-ariadneplus</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-data-services</artifactId>
<version>[2.0.0-SAXONHE-SNAPSHOT, 3.0.0-SAXON-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-modular-uis</artifactId>
<version>[2.0.0-SAXONHE-SNAPSHOT, 3.0.0-SAXON-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-information-service</artifactId>
<version>[2.0.0-SAXONHE-SNAPSHOT, 3.0.0-SAXON-SNAPSHOT)</version>
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-data-provision-services</artifactId>
<version>[2.0.0-SAXONHE-SNAPSHOT, 3.0.0-SAXON-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
<scope>compile</scope>
</dependency>
<!-- javamelody-core -->
<dependency>
<groupId>net.bull.javamelody</groupId>
<artifactId>javamelody-core</artifactId>
<version>1.65.0</version>
</dependency>
<!-- itext, option to add PDF export -->
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
<exclusions>
<exclusion>
<artifactId>bcmail-jdk14</artifactId>
<groupId>bouncycastle</groupId>
</exclusion>
<exclusion>
<artifactId>bcprov-jdk14</artifactId>
<groupId>bouncycastle</groupId>
</exclusion>
<exclusion>
<artifactId>bctsp-jdk14</artifactId>
<groupId>bouncycastle</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>[1.6.4]</version>
</dependency>
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-basic-aggregator</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1 @@
org.apache.cxf.common.logging.Log4jLogger

View File

@ -0,0 +1 @@
net.sf.saxon.TransformerFactoryImpl

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns:security="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security.xsd">
<!-- <security:debug /> -->
<!--<security:http create-session="stateless">-->
<!--<security:http-basic />-->
<!--<security:intercept-url-->
<!--pattern="/mvc/inspector/**" access="hasRole('ROLE_USER')"/>-->
<!--<security:intercept-url pattern="/mvc/oai/**"-->
<!--access="hasAnyRole('ROLE_ANONYMOUS', 'ROLE_USER')" />-->
<!--<security:intercept-url pattern="/mvc/ui/**"-->
<!--access="hasRole('ROLE_USER')"/>-->
<!--<security:intercept-url pattern="/monitoring/**"-->
<!--access="hasAnyRole('ROLE_ANONYMOUS', 'ROlE_USER')" />-->
<!--<security:anonymous username="guest"-->
<!--granted-authority="'ROLE_ANONYMOUS'" />-->
<!--<security:logout />-->
<!--</security:http>-->
<!-- security exclusion first -->
<security:http pattern="/mvc/ui/lightui*/**" security="none"/>
<security:http pattern="/mvc/ui/vocabularies.do/**" security="none"/>
<security:http>
<security:http-basic />
<!--<security:anonymous username="guest" granted-authority="'ROLE_ANONYMOUS'" />-->
<!--<security:intercept-url pattern="/monitoring/**" access="hasRole('ANONYMOUS')" />-->
<!--<security:intercept-url pattern="/mvc/oai/**" access="hasRole('ANONYMOUS')" />-->
<security:intercept-url pattern="/mvc/inspector/**" access="hasRole('ADMIN')" />
<security:intercept-url pattern="/mvc/ui/**" access="hasRole('ADMIN')" />
<security:csrf disabled="true"/>
<security:logout />
</security:http>
<security:authentication-manager alias="authManager">
<security:authentication-provider>
<security:password-encoder hash="md5" />
<security:user-service>
<security:user name="admin" password="${dnet.admin.password}"
authorities="ROLE_ADMIN" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
</beans:beans>

View File

@ -0,0 +1,53 @@
container.hostname = localhost
container.context = app
container.port = 8280
services.is.store.database.bean = persistentExistDatabase
#services.is.store.database.bean = temporaryExistDatabase
dnet.data.path = /tmp/ariadneplus
dnet.bootstrap.schemas = classpath*:/eu/dnetlib/bootstrap/schemas/**/*.xsd
dnet.bootstrap.profiles = classpath*:/eu/dnetlib/bootstrap/profiles/**/*.xml
services.msro.reindex.limit = 100
services.aggregator.host = localhost
services.aggregator.name = ARIADNEPLUS
services.aggregator.country = EU
services.registry.pending.resource.manager = compatPendingManager
transport.soap.force.local.address = true
#Authentication and authorization
#dnet.modular.ui.authorization.manager = simpleAuthenticationManager
dnet.modular.ui.authorization.default.superAdmin= admin
dnet.admin.password = e2d45d57c7e2941b65c6ccd64af4223e
dnet.modular.ui.authorization.manager = mockUserAuthenticationManager
# Properties for the mock authorization manager ('mockUserAuthenticationManager')
dnet.modular.ui.authorization.mock.user.id = dnet
dnet.modular.ui.authorization.mock.user.name = DNet
dnet.modular.ui.authorization.mock.user.email = dnet-team@isti.cnr.it
# Mail configuration
msro.wf.mail.smtp.host = smtp.host.eu
msro.wf.mail.smtp.user = smtp-user
msro.wf.mail.smtp.password = smtp-pwd
msro.wf.mail.cc = manager@email.eu
service.index.solr.rank.enable = true
services.publisher.oai.host = localhost
services.publisher.oai.port = 27017
services.objectstore.dao = gridFSObjectstoreDao
# AUTH
dnet.modular.ui.authorization.mongo.host = localhost
dnet.modular.ui.authorization.mongo.port = 27017
dnet.modular.ui.authorization.mongo.db = dnet_auth
dnet.modular.ui.logout.url = http://localhost:8280/${container.context}/logout
service.index.feed.repeatDelay = 2000
service.index.solr.nh.mdformat.enable = true
service.index.default.interpretation = transformed
service.index.layoutToRecordStylesheet=classpath:/eu/dnetlib/ariadneplus/index/ariadneplusLayoutToRecordStylesheet.xsl
services.registry.exist.options={\"exist:output-size-limit\":\"100000\"}
collector.sftp.auth.prvKeyPath=~/.ssh/id_rsa
collector.sftp.auth.passphrase=
collector.sftp.auth.knownHostsPath=~/.ssh/known_hosts

View File

@ -0,0 +1,39 @@
org.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger
log4j.rootLogger=WARN, DNET
# TO DISABLE WHEN BUILDING THE WAR
#log4j.rootLogger=WARN, CONSOLE
#
#log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
log4j.appender.DNET=org.apache.log4j.RollingFileAppender
log4j.appender.DNET.File=${catalina.base}/logs/dnet.log
log4j.appender.DNET.Append=true
log4j.appender.DNET.Encoding=UTF-8
log4j.appender.DNET.Threshold=ALL
log4j.appender.DNET.MaxFileSize=100MB
log4j.appender.DNET.MaxBackupIndex=30
log4j.appender.DNET.layout=org.apache.log4j.PatternLayout
log4j.appender.DNET.layout.ConversionPattern=%d [%t] %-5p %c- %m%n
log4j.logger.eu.dnetlib=INFO
log4j.logger.eu.dnetlib.conf.PropertyFetcher=FATAL
log4j.logger.org.apache.cxf.interceptor=FATAL
log4j.logger.org.apache.cxf.ws.addressing.ContextUtils=FATAL
log4j.logger.eu.dnetlib.xml.database.LoggingTrigger=WARN
log4j.logger.eu.dnetlib.enabling.tools.registration.ServiceRegistrator=WARN
log4j.logger.eu.dnetlib.enabling.inspector=FATAL
log4j.logger.eu.dnetlib.enabling.inspector.SubscriptionController=DEBUG
log4j.logger.eu.dnetlib.springutils.stringtemplate.StringTemplateViewResolver=FATAL
log4j.logger.eu.dnetlib.enabling.is.sn.SynchronousNotificationSenderImpl=WARN
log4j.logger.eu.dnetlib.enabling.is.store.AbstractContentInitializer=WARN
log4j.logger.gr.forth.Utils=OFF
log4j.logger.eu.delving.x3ml=FATAL
log4j.logger.eu.dnetlib.ariadneplus.workflows.nodes=DEBUG
log4j.logger.eu.dnetlib.ariadneplus.workflows.nodes.ClarinAPIGeneratorJobNode=DEBUG
log4j.logger.eu.dnetlib.ariadneplus.workflows.nodes.ClarinFileVisitor=INFO

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<import resource="classpath*:/eu/dnetlib/**/applicationContext*.xml" />
<context:annotation-config />
<!-- if the following import is not the last one, something overrides bus
configuration disabling logging and any other customized feature. -->
<import resource="./cxf.xml" />
</beans>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://cxf.apache.org/core"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">
<!-- CXF bus with logging. Please set the log level of org.apache.cxf.interceptor to FATAL to hide the logging of EVERY incoming and outgoing messages. -->
<cxf:bus>
<cxf:outInterceptors>
<ref bean="outCxfLoggingInterceptor"/>
</cxf:outInterceptors>
<cxf:inInterceptors>
<ref bean="inCxfLoggingInterceptor"/>
</cxf:inInterceptors>
</cxf:bus>
<bean id="outCxfLoggingInterceptor" class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
<bean id="inCxfLoggingInterceptor" class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
<http:conduit name="*.http-conduit">
<http:client AllowChunking="true" Connection="Keep-Alive"/>
</http:conduit>
</beans>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven />
<context:component-scan base-package="eu.dnetlib"/>
<import resource="classpath*:/eu/dnetlib/**/webContext*.xml" />
<bean id="beanHandlerMapping" p:order="1"
class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" />
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter" />
<mvc:resources mapping="/resources/**" location="classpath:/eu/dnetlib/web/resources/" />
</beans>

View File

@ -0,0 +1,56 @@
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>DNet-2.0 container web app</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/mvc/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -0,0 +1,28 @@
<table style="width :100%">
<tr><td style="text-align:center; width:100%"><a href="http://www.d-net.research-infrastructures.eu/"><img src='images/d-netLogo.png'/></a></td></tr>
</table>
<table style="width :100%">
<tr>
<td/>
<td style="text-align:center"><a href="mvc/ui/lightui.do?ui=ariadneplus"><img src='images/lightui.png' style="width:200px"/> </a></td>
</tr>
<tr>
<td/>
<td style="text-align:center">Access the Metadata Inspector to check your transformed records <a href="mvc/ui/lightui.do?ui=ariadneplus">here</a></td>
</tr>
</table>
<br/>
<h2 style="text-align: center">The following entry points require authentication:</h2>
<table style="width :100%">
<tr>
<td style="text-align:center"><a href="mvc/inspector"><img src='images/admin.svg' style="width:200px" /> </a></td>
<td style="text-align:center"><a href="mvc/ui/index.do"><img src='images/User.png' style="width:200px"/> </a></td>
<td style="text-align:center"><a href="monitoring"><img src='images/monitor.png' style="width:200px"/> </a></td>
</tr>
<tr>
<td style="text-align:center">if this container runs the IS, you can access the web interface <a href="mvc/inspector">here</a><br/></img></td>
<td style="text-align:center">if this container runs the user interfaces, you can access them <a href="mvc/ui/index.do">here</a><br/></img></td>
<td style="text-align:center">if this container is monitored, you can access the monitoring web interface <a href="monitoring">here</a></td>
</tr>
</table>

View File

@ -0,0 +1,10 @@
{
"type_source": "SVN",
"goal": "package -U source:jar",
"url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet50/modules/dnet-ariadneplus-publisher/trunk/",
"deploy_repository": "dnet5-snapshots",
"version": "5",
"mail": "sandro.labruzzo@isti.cnr.it,michele.artini@isti.cnr.it, claudio.atzori@isti.cnr.it, alessia.bardi@isti.cnr.it",
"deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet5-snapshots",
"name": "dnet-ariadneplus-publisher"
}

View File

@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-ariadneplus-publisher</artifactId>
<packaging>jar</packaging>
<version>3.0.0-SNAPSHOT</version>
<scm>
<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet50/modules/dnet-ariadneplus-publisher/trunk</developerConnection>
<url>https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/dnet-ariadneplus-publisher</url>
</scm>
<ciManagement>
<system>jenkins</system>
<url>https://jenkins-dnet.d4science.org/view/DNet50/job/DSL50_dnet-ariadneplus-publisher/</url>
</ciManagement>
<distributionManagement>
<repository>
<id>dnet5-releases</id>
<name>D-Net 5 Releases</name>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dnet5-releases</url>
<layout>default</layout>
</repository>
</distributionManagement>
<!-- Inherit defaults from Spring Boot -->
<repositories>
<repository>
<id>dnet-deps</id>
<name>dnet-dependencies</name>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dnet-deps</url>
<layout>default</layout>
</repository>
<repository>
<id>dnet5-releases</id>
<name>D-Net 5 Releases</name>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dnet5-releases</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>dnet5-snapshots</id>
<name>D-Net 5 Snapshots</name>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dnet5-snapshots</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<!--
<repository>
<id>gcube-snapshots</id>
<name>gCube Snapshots</name>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>gcube-releases</id>
<name>gCube Releases</name>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>gcube-externals</id>
<name>gCube Externals</name>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-externals</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
-->
</repositories>
<dependencies>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.5.1-5</version>
</dependency>
<dependency>
<groupId>virtuoso</groupId>
<artifactId>jena-driver</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>openlink</groupId>
<artifactId>virtuoso-jdbc</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena</artifactId>
<version>[3.3.0,4.0.0)</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>[5.0.0,6.0.0)</version>
</dependency>
<!--
<dependency>
<groupId>org.gcube.information-system</groupId>
<artifactId>ariadneplus-entities</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.gcube.information-system</groupId>
<artifactId>resource-registry-publisher</artifactId>
<version>[2.0.0-SNAPSHOT, 2.1.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.information-system</groupId>
<artifactId>resource-registry-client</artifactId>
<version>[2.0.0-SNAPSHOT, 2.1.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>authorization-client</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.gcube.information-system</groupId>
<artifactId>resource-registry-api</artifactId>
<version>[2.0.0-SNAPSHOT, 2.1.0-SNAPSHOT)</version>
</dependency>
-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>23.3-jre</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.27-incubating</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<java.version>1.8</java.version>
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
</properties>
<profiles>
<profile>
<id>java8-doclint-disabled</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<javadoc.opts>-Xdoclint:none</javadoc.opts>
</properties>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,61 @@
package eu.dnetlib.ariadneplus;
import freemarker.cache.ClassTemplateLoader;
import freemarker.template.TemplateExceptionHandler;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
/**
* Created by Alessia Bardi on 17/10/2017.
*
* @author Alessia Bardi
*/
@Configuration
//@EnableAsync
public class AppConfig {
// @Override
// @Bean
// public Executor getAsyncExecutor() {
// ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
// executor.setCorePoolSize(7);
// executor.setMaxPoolSize(42);
// executor.setQueueCapacity(11);
// executor.setThreadNamePrefix("MyExecutor-");
// //executor.initialize();
// return executor;
// }
//
// @Override
// public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
// return new AriadnePlusAsyncUncaughtExceptionHandler();
// }
@Bean
public RestTemplate jrrRestTemplate(){
//TODO: move configuration here from CatalogueRegistrator?
return new RestTemplateBuilder().build();
}
@Bean
public freemarker.template.Configuration freemarkerConfig(){
freemarker.template.Configuration config = new freemarker.template.Configuration(freemarker.template.Configuration.VERSION_2_3_27);
ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), "/eu/dnetlib/ariadneplus/sparql");
config.setTemplateLoader(ctl);
config.setDefaultEncoding("UTF-8");
// Sets how errors will appear.
// During web page *development* TemplateExceptionHandler.HTML_DEBUG_HANDLER is better.
config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
// Don't log exceptions inside FreeMarker that it will thrown at you anyway:
config.setLogTemplateExceptions(false);
// Wrap unchecked exceptions thrown during template processing into TemplateException-s.
config.setWrapUncheckedExceptions(true);
return config;
}
}

View File

@ -0,0 +1,24 @@
package eu.dnetlib.ariadneplus;
import java.lang.reflect.Method;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
/**
* Created by Alessia Bardi on 17/10/2017.
*
* @author Alessia Bardi
*/
public class AriadnePlusAsyncUncaughtExceptionHandler implements AsyncUncaughtExceptionHandler {
private static final Log log = LogFactory.getLog(AriadnePlusAsyncUncaughtExceptionHandler.class);
@Override
public void handleUncaughtException(final Throwable throwable, final Method method, final Object... objects) {
log.error("Method Name::"+method.getName());
log.error("Exception occurred::"+ throwable);
}
}

View File

@ -0,0 +1,19 @@
package eu.dnetlib.ariadneplus;
/**
* Created by Alessia Bardi on 09/08/2017.
*
* @author Alessia Bardi
*/
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class AriadnePlusPublisherApplication {
public static void main(String[] args) {
SpringApplication.run(AriadnePlusPublisherApplication.class, args);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,525 @@
package eu.dnetlib.ariadneplus;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.Resource;
/**
* Vocabulary definitions from http://www.ics.forth.gr/isl/CRMext/CRMdig_v3.2.1.rdfs
*
* @author Auto-generated by schemagen on 29 Sep 2017 15:54
*/
public class CRMdig {
/**
* <p>The RDF model that holds the vocabulary terms</p>
*/
private static final Model M_MODEL = ModelFactory.createDefaultModel();
/**
* <p>The namespace of the vocabulary as a string</p>
*/
public static final String NS = "http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/";
/**
* <p>The URL to the online schema as a string</p>
*/
public static final String RDFS_URL = "http://www.ics.forth.gr/isl/CRMext/CRMdig_v3.2.2.rdfs";
/**
* <p>The namespace of the vocabulary as a string</p>
*
* @return namespace as String
* @see #NS
*/
public static String getURI() {
return NS;
}
/**
* <p>The namespace of the vocabulary as a resource</p>
*/
public static final Resource NAMESPACE = M_MODEL.createResource(NS);
/**
* <p>This property associates an instance of D7 Digital Machine Event with an instance
* of D1 Digital Object which is the input used to specify the machine action.
* This property is a specialisation of P16 used specific object(was used for).</p>
*/
public static final Property L10_had_input = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L10_had_input");
public static final Property L10i_was_input_of = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L10i_was_input_of");
/**
* <p>This property associates an instance of D7 Digital Machine Event with an instance
* of D1 Digital Object which is the output of the activity. This property is
* a specialisation of P94 has created (was created by).</p>
*/
public static final Property L11_had_output = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L11_had_output");
public static final Property L11i_was_output_of = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L11i_was_output_of");
/**
* <p>This property associates an instance of D7 Digital Machine Event with an object,
* the D8 Digital Device, which happened with, e.g a capturing event that happened
* on/with a digital camera, etc. This property is a specialisation of P12 occurred
* in the presence of (was present at).</p>
*/
public static final Property L12_happened_on_device = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L12_happened_on_device");
public static final Property L12i_was_device_for = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L12i_was_device_for");
/**
* <p>This property associates an instance of D10 Software Execution with a digital
* object used as a parameter during the process.This property is a specialisation
* of L1O had input (was input of).</p>
*/
public static final Property L13_used_parameters = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L13_used_parameters");
public static final Property L13i_parameters_for = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L13i_parameters_for");
/**
* <p>This property identifies a digital object transferred by a D12 Data Transfer
* Event. This property is a specialisation of L11 had output (was output of).</p>
*/
public static final Property L14_transferred = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L14_transferred");
public static final Property L14i_was_transferred_by = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L14i_was_transferred_by");
/**
* <p>This property identifies a digital device used as a medium on which data are
* transferred through a D12 Data Transfer Event.</p>
*/
public static final Property L15_has_sender = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L15_has_sender");
public static final Property L15i_was_sender_for = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L15i_was_sender_for");
/**
* <p>This property identifies a digital device used as a medium to receive data
* through a D12 Data Transfer Event.</p>
*/
public static final Property L16_has_receiver = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L16_has_receiver");
public static final Property L16i_was_receiver_for = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L16i_was_receiver_for");
/**
* <p>This property associates an instance of D11 Digital Measurement Event with
* the instance of E55 Type of object to which it applied. This property is a
* specialisation of P125 used object of type.</p>
*/
public static final Property L17_measured_thing_of_type = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L17_measured_thing_of_type");
public static final Property L17i_was_type_of_thing_measured_by =
M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L17i_was_type_of_thing_measured_by");
/**
* <p>This property identifies a Digital Information Carrier modified in a Digital
* Machine Event. This property is a specialisation of P31 has modified.</p>
*/
public static final Property L18_has_modified = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L18_has_modified");
public static final Property L18i_was_modified_by = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L18i_was_modified_by");
/**
* <p>This property associates an instance of a D13 Digital Information Carrier
* with the instance of Digital Object that is stored on it. This property is
* a specialisation of P128 carries.</p>
*/
public static final Property L19_stores = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L19_stores");
public static final Property L19i_is_stored_on = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L19i_is_stored_on");
/**
* <p>This property associates an instance of D2 Digitization Process with an instance
* of E18 Physical Thing which is a material thing. This property is a specialisation
* of P39 measured (was measured by).</p>
*/
public static final Property L1_digitized = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L1_digitized");
public static final Property L1i_was_digitized_by = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L1i_was_digitized_by");
/**
* <p>This property identifies a Data Object that came into existence as a result
* of a D11 Digital Measurement Event. This property is a specialisation of P40
* observed dimension and L11 had output.</p>
*/
public static final Property L20_has_created = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L20_has_created");
public static final Property L20i_was_created_by = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L20i_was_created_by");
/**
* <p>This property associates an instance of a D3 Formal Derivation with the instance
* of D1 Digital Object that is used as a derivation source.</p>
*/
public static final Property L21_used_as_derivation_source = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L21_used_as_derivation_source");
public static final Property L21i_was_derivation_source_for = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L21i_was_derivation_source_for");
/**
* <p>This property associates an instance of D3 Formal Derivation with the Digital
* Object it used to create a version of. This property is a specialisation of
* L11 had output.</p>
*/
public static final Property L22_created_derivative = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L22_created_derivative");
public static final Property L22i_was_derivative_created_by = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L22i_was_derivative_created_by");
/**
* <p>This property associates an instance of D7 Digital Machine Event with the
* instance of D14 Software that had used. This property is a specialisation
* of P16 used specific object.</p>
*/
public static final Property L23_used_software_or_firmware = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L23_used_software_or_firmware");
public static final Property L23i_was_software_or_firmware_used_by =
M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L23i_was_software_or_firmware_used_by");
/**
* <p>This property identifies the logfile that was created by a D10 Software Execution
* in order to record all the activities in the system.</p>
*/
public static final Property L24_created_logfile = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L24_created_logfile");
public static final Property L24i_was_logfile_created_by = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L24i_was_logfile_created_by");
/**
* <p>This property describes the participation of a Legal Body in being responsible
* for the outcome of a specific activity. This property is a specialisation
* of P14 carried out by.</p>
*/
public static final Property L29_has_responsible_organization =
M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L29_has_responsible_organization");
public static final Property L29i_is_responsible_organization_for =
M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L29i_is_responsible_organization_for");
/**
* <p>This property associates an instance of D10 Software Execution with an instance
* of D1 Digital Object which is used as a source, a software essential for the
* performance. This property is a specialisation of L10F had input (was input
* of).</p>
*/
public static final Property L2_used_as_source = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L2_used_as_source");
public static final Property L2i_was_source_for = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L2i_was_source_for");
/**
* <p>This property describes the activity that is being operated by a person. This
* property is a specialisation of P14 carried out by.</p>
*/
public static final Property L30_has_operator = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L30_has_operator");
public static final Property L30i_is_operator_of = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L30i_is_operator_of");
/**
* <p>This property allows the starting point for a D7 Digital Machine Event to
* be situated. This property expresses the approximation of the starting date
* of a time span.</p>
*/
public static final Property L31_has_starting_date_time = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L31_has_starting_date-time");
/**
* <p>This property allows the ending point for a D7 Digital Machine Event to be
* situated. This property expresses the approximation of the ending date of
* a time span.</p>
*/
public static final Property L32_has_ending_date_time = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L32_has_ending_date-time");
/**
* <p>This property identifies the maker, the actor who is responsible for the production
* of a device, a computer, a digital camera, any kind of a machine that has
* been produced. This property is a shortcut of a more fully developed path
* from CRM E12 Production:P108 has produced:E24 Physical Man-Made Thing. In
* this case, there is no need to describe the more detailed property through
* a production event,so L33 has maker is reccomended to be used instead.</p>
*/
public static final Property L33_has_maker = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L33_has_maker");
public static final Property L33i_is_maker_of = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L33i_is_maker_of");
/**
* <p>This property describes the participation of a Legal Body in being contractor
* for the outcome of a specific activity. This property is a specialisation
* of L29_has_responsible_organization.</p>
*/
public static final Property L34_has_contractor = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L34_has_contractor");
public static final Property L34i_is_contractor_for = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L34i_is_contractor_for");
/**
* <p>This property describes the participation of a Legal Body in being commissioner
* for the outcome of a specific activity. This property is a specialisation
* of L29_has_responsible_organization.</p>
*/
public static final Property L35_has_commissioner = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L35_has_commissioner");
public static final Property L35i_is_commissioner_for = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L35i_is_commissioner_for");
/**
* <p>This property describes the associations between objects or areas of objects
* of the RI, with other objects or regions or persons, places, events..</p>
*/
public static final Property L43_annotates = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L43_annotates");
public static final Property L43i_is_annotated_by = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L43i_is_annotated_by");
/**
* <p>This property is a specialisation of P3 has note and associates a comment
* with an instance of an object E1 CRM Entity.</p>
*/
public static final Property L47_has_comment = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L47_has_comment");
/**
* <p>This property identifies the D29 Annotation Object (associations) that came
* into existence as a result of a D30 Annotation Event. This property is a specialisation
* of P94 has created.</p>
*/
public static final Property L48_created_annotation = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L48_created_annotation");
public static final Property L48i_was_annotation_created_by = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L48i_was_annotation_created_by");
/**
* <p>This property describes the association between a particular area declared
* in an original digital object. This property is a specialisation of P106 is
* composed of.</p>
*/
public static final Property L49_is_primary_area_of = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L49_is_primary_area_of");
public static final Property L49i_has_primary_area = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L49i_has_primary_area");
/**
* <p>This property associates an instance of E1 Entity with an instance of resource
* used as a preferred lexical label. This property is a specialisation of rdf
* schema label.</p>
*/
public static final Property L4_has_preferred_label = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L4_has_preferred_label");
/**
* <p>This property describes the association between an area and the digital object
* to which it is propagated. This property is a specialisation of P106 is composed
* of.</p>
*/
public static final Property L50_is_propagated_area_of = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L50_is_propagated_area_of");
public static final Property L50i_has_propagated_area = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L50i_has_propagated_area");
/**
* <p>This property defines a personal name used to identify a person.</p>
*/
public static final Property L51_has_first_name = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L51_has_first_name");
/**
* <p>This property defines the last name used to identify a person. This property
* is a specialisation of L4 has preferred label.</p>
*/
public static final Property L52_has_last_name = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L52_has_last_name");
/**
* <p>This property describes a non unique identification applied to E1 CRM Entity.</p>
*/
public static final Property L53_is_not_uniquely_identified_by =
M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L53_is_not_uniquely_identified_by");
/**
* <p>This property describes the association kind of "same as" between objects.
* It is used to declare that two or more objects are exactly the same.</p>
*/
public static final Property L54_is_same_as = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L54_is_same-as");
/**
* <p>This property describes the association kind of "same as" between objects.
* It is used to declare that two or more objects are exactly the same.</p>
*/
public static final Property L54i_is_same_as = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L54i_is_same-as");
/**
* <p>This property records the inventory number that was used to identify an instance
* of E1 CRM Entity at the time this property was record. This property is a
* specialisation of L53F is not uniquely identified by.</p>
*/
public static final Property L55_has_inventory_no = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L55_has_inventory_no");
/**
* <p>This property records the pixel width of the data object; it approximates
* a dimension that is part of the image data analysis.This property is a specialisation
* of P90 has value.</p>
*/
public static final Property L56_has_pixel_width = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L56_has_pixel_width");
/**
* <p>This property records the pixel height of the data object; it approximates
* a dimension that is part of the image data analysis.This property is a specialisation
* of P90 has value.</p>
*/
public static final Property L57_has_pixel_height = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L57_has_pixel_height");
/**
* <p>This property records the serial number that was assigned to identify an instance
* of E22 Man Made Object. This property is a specialisation of L53 is not uniquely
* identified by.</p>
*/
public static final Property L59_has_serial_number = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L59_has_serial_number");
/**
* <p>This property describes the CRM Entities documented by instances of Digitization
* Processes. This property is a specialisation of P140 assigned attribute to.</p>
*/
public static final Property L60_documents = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L60_documents");
public static final Property L60i_is_documented_by = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L60i_is_documented_by");
/**
* <p>This property describes the minimum period of time covered by a digital machine
* event. It identifies the minimum extent of the event. This property is a specialisation
* of P81 ongoing throughout.</p>
*/
public static final Property L61_was_ongoing_at = M_MODEL.createProperty("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/L61_was_ongoing_at");
/**
* <p>This class comprises events by which a digital device runs a software program
* or a series of computing operations on a digital object as a single task,
* which is completely determined by its digital input, the software and the
* generic properties of the device.</p>
*/
public static final Resource D10_Software_Execution = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D10_Software_Execution");
/**
* <p>This class comprises actions measuring physical properties using a digital
* device, that are determined by a systematic procedure and creates an instance
* of D9 Data Object, which is stored on an instance of D13 Digital Information
* Carrier. In contrast to instances of D10 Software Execution, environmental
* factors have an intended influence on the outcome of an instance of D11 Digital
* Measurement Event. Measurement devices may include running distinct software,
* such as the RAW to JPEG conversion in digital cameras. In this case, the event
* is regarded as instance of both classes, D10 Software Execution and D11 Digital
* Measurement Event.</p>
*/
public static final Resource D11_Digital_Measurement_Event = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D11_Digital_Measurement_Event");
/**
* <p>This class comprises events that transfer a digital object from one digital
* carrier to another. Normally, the digital object remains the same. If in general
* or by observation the transfer implies or has implied some data corruption,
* the change of the digital objects may be documented distinguishing input and
* output rather than instantiating the property L14 transferred (was transferred
* by).</p>
*/
public static final Resource D12_Data_Transfer_Event = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D12_Data_Transfer_Event");
/**
* <p>This class comprises all instances of E84 Information Carrier that are explicitly
* designed to be used as persistent digital physical carriers of instances of
* D1 Digital Object. A D13 Digital Information Carrier may or may not contain
* information, e.g., an empty diskette.</p>
*/
public static final Resource D13_Digital_Information_Carrier = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D13_Digital_Information_Carrier");
/**
* <p>This class comprises software codes,computer programs,procedures, and functions
* that are used to operate a system of digital objects.</p>
*/
public static final Resource D14_Software = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software");
/**
* <p>This class comprises identifiable immaterial items that can be represented
* as sets of bit sequences, such as data sets, e-texts, images, audio or video
* items, software, etc., and are documented as single units. Any aggregation
* of instances of D1 Digital Object into a whole treated as single unit is also
* regarded as an instance of D1 Digital Object. This means that for instance,
* the content of a DVD, an XML file on it, and an element of this file, are
* regarded as distinct instances of D1 Digital Object, mutually related by the
* P106 is composed of (forms part of) property. A D1 Digital Object does not
* depend on a specific physical carrier, and it can exist on one or more carriers
* simultaneously.</p>
*/
public static final Resource D1_Digital_Object = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object");
/**
* <p>This class comprises the proper noun name that identifies a person that acts
* as an entity.</p>
*/
public static final Resource D21_Person_Name = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D21_Person_Name");
/**
* <p></p>
*/
public static final Resource D23_Room = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D23_Room");
/**
* <p>This class comprises objects that make propositions about other artefacts.
* Instances of this class are not the attributes themselves, by which things
* are annotated, but represent the connection between the concepts related in
* a proposition, and the activities of creation, modification and deletion.</p>
*/
public static final Resource D29_Annotation_Object = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D29_Annotation_Object");
/**
* <p>This class comprises events that result in the creation of instances of D9
* Data Object that represent the appearance and/or form of an instance of E18
* Physical Thing such as paper documents, statues, buildings, paintings, etc.
* A particular case is the analogue-to-digital conversion of audiovisual material.
* This class represents the transition from a material thing to an immaterial
* representation of it. The characteristic subsequent processing steps on digital
* objects are regarded as instances of D3 Formal Derivation.</p>
*/
public static final Resource D2_Digitization_Process = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D2_Digitization_Process");
/**
* <p>This class comprises events that describe the creation of associations (Annotation
* Objects) between objects or areas of objects of the Repository, with other
* objects or regions or persons, places, events. It is the event that creates
* the Annotation Object.</p>
*/
public static final Resource D30_Annotation_Event = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D30_Annotation_Event");
/**
* <p>This class describes a part (of any shape or size) of interest in basically
* any media object stored in the Object Repository, i.e., a text, an image,
* a video or a 3D model. It points to content consisting of just a portion or
* area of a file. In some contexts, however, the area can also point to content
* represented by an integral (i.e., proper) file. It is equal to the METS AREA
* element</p>
*/
public static final Resource D35_Area = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D35_Area");
/**
* <p>This class comprises events that result in the creation of a D1 Digital Object
* from another one following a deterministic algorithm, such that the resulting
* instance of digital object shares representative properties with the original
* object. In other words, this class describes the transition from an immaterial
* object referred to by property L21 used as derivation source (was derivation
* source for) to another immaterial object referred to by property L22 created
* derivative (was derivative created by) preserving the representation of some
* things but in a different form. Characteristic examples are colour corrections,
* contrast changes and resizing of images.</p>
*/
public static final Resource D3_Formal_Derivation = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D3_Formal_Derivation");
/**
* <p>This class comprises events that happen on physical digital devices following
* a human activity that intentionally caused its immediate or delayed initiation
* and results in the creation of a new instance of D1 Digital Object on behalf
* of the human actor. The input of a D7 Digital Machine Event may be parameter
* settings and/or data to be processed. Some D7 Digital Machine Events may form
* part of a wider E65 Creation event. In this case, all machine output of the
* partial events is regarded as creation of the overall activity.</p>
*/
public static final Resource D7_Digital_Machine_Event = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D7_Digital_Machine_Event");
/**
* <p>This class comprises identifiable material items such as computers, scanners,
* cameras, etc. that have the capability to process or produce instances of
* D1 Digital Object.</p>
*/
public static final Resource D8_Digital_Device = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D8_Digital_Device");
/**
* <p>This class comprises instances of D1 Digital Object that are the direct result
* of a digital measurement or a formal derivative of it, containing quantitative
* properties of some physical things or other constellations of matter.</p>
*/
public static final Resource D9_Data_Object = M_MODEL.createResource("http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D9_Data_Object");
}

View File

@ -0,0 +1,310 @@
package eu.dnetlib.ariadneplus;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.Resource;
/**
* Vocabulary definitions from http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs
*
* @author Auto-generated by schemagen on 29 Sep 2017 15:54
*/
public class CRMpe {
/**
* <p>The RDF model that holds the vocabulary terms</p>
*/
private static final Model M_MODEL = ModelFactory.createDefaultModel();
/**
* <p>The namespace of the vocabulary as a string</p>
*/
public static final String NS = "http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/";
/**
* <p>The URL to the online schema as a string</p>
*/
public static final String RDFS_URL = "http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs";
/**
* <p>The namespace of the vocabulary as a string</p>
*
* @return namespace as String
* @see #NS
*/
public static String getURI() {
return NS;
}
/**
* <p>The namespace of the vocabulary as a resource</p>
*/
public static final Resource NAMESPACE = M_MODEL.createResource(NS);
public static final Property PP11_curates_volatile_digital_object =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP11_curates_volatile_digital_object");
public static final Property PP11i_is_volatile_digital_object_curated_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP11i_is_volatile_digital_object_curated_by");
public static final Property PP12_curates_volatile_software =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP12_curates_volatile_software");
public static final Property PP12i_is_volatile_software_curated_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP12i_is_volatile_software_curated_by");
public static final Property PP13_curates_volatile_dataset =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP13_curates_volatile_dataset");
public static final Property PP13i_is_volatile_dataset_curated_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP13i_is_volatile_dataset_curated_by");
public static final Property PP14_runs_on_request = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP14_runs_on_request");
public static final Property PP14i_is_run_by = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP14i_is_run_by");
public static final Property PP15_delivers_on_request = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP15_delivers_on_request");
public static final Property PP15i_is_delivered_by = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP15i_is_delivered_by");
public static final Property PP16_has_persistent_digital_object_part =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP16_has_persistent_digital_object_part");
public static final Property PP16i_is_persistent_digital_object_part_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP16i_is_persistent_digital_object_part_of");
public static final Property PP17_has_snapshot = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP17_has_snapshot");
public static final Property PP17i_is_snapshot_of = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP17i_is_snapshot_of");
public static final Property PP18_has_digital_object_part =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP18_has_digital_object_part");
public static final Property PP18i_is_digital_object_part_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP18i_is_digital_object_part_of");
public static final Property PP19_has_persistent_software_part =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP19_has_persistent_software_part");
public static final Property PP19i_is_persistent_software_part_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP19i_is_persistent_software_part_of");
public static final Property PP1_currently_offers = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP1_currently_offers");
public static final Property PP1i_is_currently_offered_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP1i_is_currently_offered_by");
public static final Property PP20_has_persistent_dataset_part =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP20_has_persistent_dataset_part");
public static final Property PP20i_is_persistent_dataset_part_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP20i_is_persistent_dataset_part_of");
public static final Property PP21_has_software_part = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP21_has_software_part");
public static final Property PP21i_is_software_part_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP21i_is_software_part_of");
public static final Property PP22_has_release = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP22_has_release");
public static final Property PP22i_is_release_of = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP22i_is_release_of");
public static final Property PP23_has_dataset_part = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP23_has_dataset_part");
public static final Property PP23i_is_dataset_part_of = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP23i_is_dataset_part_of");
public static final Property PP24_has_dataset_snapshot =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP24_has_dataset_snapshot");
public static final Property PP24i_is_dataset_snapshot_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP24i_is_dataset_snapshot_of");
public static final Property PP25_has_maintaining_RI = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP25_has_maintaining_RI");
public static final Property PP25i_is_maintaining_RI_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP25i_is_maintaining_RI_of");
public static final Property PP28_has_designated_access_point =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP28_has_designated_access_point");
public static final Property PP28i_is_designated_access_point_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP28i_is_designated_access_point_of");
public static final Property PP29_uses_access_protocol =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP29_uses_access_protocol");
public static final Property PP29i_is_access_protocol_used_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP29i_is_access_protocol_used_by");
public static final Property PP2_provided_by = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP2_provided_by");
public static final Property PP2i_provides = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP2i_provides");
public static final Property PP31_uses_curation_plan = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP31_uses_curation_plan");
public static final Property PP31i_is_curation_plan_used_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP31i_is_curation_plan_used_by");
public static final Property PP32_curates = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP32_curates");
public static final Property PP32i_is_curated_by = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP32i_is_curated_by");
public static final Property PP39_is_metadata_for = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP39_is_metadata_for");
public static final Property PP39i_has_metadata = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP39i_has_metadata");
public static final Property PP40_created_successor_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP40_created_successor_of");
public static final Property PP40i_is_deprecated_by = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP40i_is_deprecated_by");
public static final Property PP41_is_index_of = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP41_is_index_of");
public static final Property PP41i_is_indexed_by = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP41i_is_indexed_by");
public static final Property PP42_has_declarative_time =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP42_has_declarative_time");
public static final Property PP43_supported_project_activity =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP43_supported_project_activity");
public static final Property PP43i_is_project_activity_supported_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP43i_is_project_activity_supported_by");
public static final Property PP44_has_maintaining_team =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP44_has_maintaining_team");
public static final Property PP44i_is_maintaining_team_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP44i_is_maintaining_team_of");
public static final Property PP45_has_competency = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP45_has_competency");
public static final Property PP45i_is_competency_of = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP45i_is_competency_of");
public static final Property PP46_brokers_access_to = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP46_brokers_access_to");
public static final Property PP46i_has_access_brokered_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP46i_has_access_brokered_by");
public static final Property PP47_has_protocol_type = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP47_has_protocol_type");
public static final Property PP47i_is_protocol_type_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP47i_is_protocol_type_of");
public static final Property PP48_uses_protocol_parameter =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP48_uses_protocol_parameter");
public static final Property PP48i_is_protocol_parameter_of =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP48i_is_protocol_parameter_of");
public static final Property PP49_provides_access_point =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP49_provides_access_point");
public static final Property PP49i_is_access_point_provided_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP49i_is_access_point_provided_by");
public static final Property PP4_hosts_object = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP4_hosts_object");
public static final Property PP4i_is_object_hosted_by = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP4i_is_object_hosted_by");
public static final Property PP50_accessible_at = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP50_accessible_at");
public static final Property PP50i_provides_access_to = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP50i_provides_access_to");
public static final Property PP6_hosts_digital_object = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP6_hosts_digital_object");
public static final Property PP6i_is_digital_object_hosted_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP6i_is_digital_object_hosted_by");
public static final Property PP7_hosts_software_object =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP7_hosts_software_object");
public static final Property PP7i_is_software_object_hosted_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP7i_is_software_object_hosted_by");
public static final Property PP8_hosts_dataset = M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP8_hosts_dataset");
public static final Property PP8i_is_dataset_hosted_by =
M_MODEL.createProperty("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PP8i_is_dataset_hosted_by");
public static final Resource PE10_Digital_Curating_Service =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE10_Digital_Curating_Service");
public static final Resource PE11_Software_Curating_Service =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE11_Software_Curating_Service");
public static final Resource PE12_Data_Curating_Service =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE12_Data_Curating_Service");
public static final Resource PE13_Software_Computing_E_Service =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE13_Software_Computing_E-Service");
public static final Resource PE14_Software_Delivery_E_Service =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE14_Software_Delivery_E-Service");
public static final Resource PE15_Data_E_Service = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE15_Data_E-Service");
public static final Resource PE16_Curated_Software_E_Service =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE16_Curated_Software_E-Service");
public static final Resource PE17_Curated_Data_E_Service =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE17_Curated_Data_E-Service");
public static final Resource PE18_Dataset = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE18_Dataset");
public static final Resource PE19_Persistent_Digital_Object =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE19_Persistent_Digital_Object");
public static final Resource PE1_Service = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE1_Service");
public static final Resource PE20_Volatile_Digital_Object =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE20_Volatile_Digital_Object");
public static final Resource PE21_Persistent_Software = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE21_Persistent_Software");
public static final Resource PE22_Persistent_Dataset = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE22_Persistent_Dataset");
public static final Resource PE23_Volatile_Software = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE23_Volatile_Software");
public static final Resource PE24_Volatile_Dataset = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE24_Volatile_Dataset");
public static final Resource PE25_RI_Consortium = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE25_RI_Consortium");
public static final Resource PE26_RI_Project = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE26_RI_Project");
public static final Resource PE28_Curation_Plan = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE28_Curation_Plan");
public static final Resource PE29_Access_Point = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE29_Access_Point");
public static final Resource PE2_Hosting_Service = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE2_Hosting_Service");
public static final Resource PE32_Curated_Thing = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE32_Curated_Thing");
public static final Resource PE33_E_Access_Brokering_Service =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE33_E-Access_Brokering_Service");
public static final Resource PE34_Team = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE34_Team");
public static final Resource PE35_Project = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE35_Project");
public static final Resource PE36_Competency_Type = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE36_Competency_Type");
public static final Resource PE37_Protocol_Type = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE37_Protocol_Type");
public static final Resource PE38_Schema = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE38_Schema");
public static final Resource PE3_Curating_Service = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE3_Curating_Service");
public static final Resource PE5_Digital_Hosting_Service =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE5_Digital_Hosting_Service");
public static final Resource PE6_Software_Hosting_Service =
M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE6_Software_Hosting_Service");
public static final Resource PE7_Data_Hosting_Service = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE7_Data_Hosting_Service");
public static final Resource PE8_E_Service = M_MODEL.createResource("http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE8_E-Service");
}

View File

@ -0,0 +1,110 @@
package eu.dnetlib.ariadneplus.catalogue;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Created by Alessia Bardi on 16/07/2018.
*
* @author Alessia Bardi
*/
public class CKANUtils {
private static final Log log = LogFactory.getLog(CKANUtils.class);
/*
* The CKAN groups correspond to AriadnePlus RI Consortia
*/
public static String Ariadne_group = "ariadne-consortium";
public static String Cendari_group = "cendari-consortium";
public static String Iccu_group = "central-institute-for-the-union-catalogue-of-italian-libraries-and-bibliographic-information-iccu";
public static String Clarin_group = "clarin-eu";
public static String DariahEU_group = "dariah-eu";
public static String DariahGR_group = "dariah-gr-consortium";
public static String DariahIT_group = "dariah-it";
public static String DariahDE_group = "dariah-de-consortium";
public static String EHRI_group = "ehri-consortium";
public static String Flarenet_group = "flarenet";
public static String Humanum_group = "huma-num-consortium";
public static String Metashare_group = "meta-net-network-of-excellence";
public static String AriadnePlus_group = "ariadneplus-project-consortium";
/*
* The CKAN orgs correspond to AriadnePlus aggregator data sources
*/
public static String Ariadne_org = "ariadne";
public static String Cendari_org = "cendari";
public static String CulturaItalia_org = "cultura-italia";
public static String Clarin_org = "clarin";
public static String DariahDE_org = "dariah-de";
public static String DariahGR_org = "dariah-gr";
public static String DariahIT_org = "dariahit";
public static String EHRI_org = "european-holocaust-research-infrastructure";
public static String lre_org = "lre-map";
public static String isidore_org = "huma-num--isidore";
public static String nakala_org = "huma-num--nakala";
public static String Metashare_org = "metashare";
public static String AriadnePlus_org = "ariadneplus_registry";
public static String AriadnePlus_wp3_org = "ariadneplus_wp3";
public static String AriadnePlus_wp4_org = "ariadneplus_wp4";
public static String AriadnePlus_wp7_org = "ariadneplus_wp7";
public static String AriadnePlus_wp8_org = "ariadneplus_wp8";
/*
* The CKAN types correspond to the following strings, which are human readable names for PE classes:
* Project, Service, Actors, Datasets, Software, Physical Collections, Standards
*/
public static String Project_type = "Project";
public static String Service_type = "Service";
public static String Actor_type = "Actor";
public static String Dataset_type = "Dataset";
public static String Software_type = "Software";
public static String Collection_type = "Physical Collection";
public static String DesignOrProcedure_type = "Standard";
public static String getCkanGroup(final String riConsortiumLabel) {
switch(riConsortiumLabel){
case "Ariadne Consortium": return Ariadne_group;
case "Cendari Consortium": return Cendari_group;
case "Central Institute for the Union Catalogue of Italian Libraries and Bibliographic Information (ICCU)": return Iccu_group;
case "Clarin-EU": return Clarin_group;
case "Dariah EU": return DariahEU_group;
case "Dariah DE": return DariahDE_group;
case "Dariah-GR Consortium" : return DariahGR_group;
case "EHRI Consortium": return EHRI_group;
case "FLaReNet": return Flarenet_group;
case "Huma-num Consortium": return Humanum_group;
case "META-NET Network of Excellence": return Metashare_group;
case "DARIAH-IT": return DariahIT_group;
case "AriadnePlus Project Consortium": return AriadnePlus_group;
default:
log.warn("No Ckan group matches RI consortium label "+riConsortiumLabel);
return null;
}
}
public static String getCKanOrg(final String datasourceName){
switch(datasourceName){
case "ARIADNE": return Ariadne_org;
case "European Holocaust Research Infrastructure": return EHRI_org;
case "Cultura Italia": return CulturaItalia_org;
case "ARIADNEPLUS": return AriadnePlus_org;
case "ARIADNEPLUS WP3": return AriadnePlus_wp3_org;
case "ARIADNEPLUS WP4": return AriadnePlus_wp4_org;
case "ARIADNEPLUS WP7": return AriadnePlus_wp7_org;
case "ARIADNEPLUS WP8": return AriadnePlus_wp8_org;
case "METASHARE": return Metashare_org;
case "LRE MAP": return lre_org;
case "Huma-Num - Isidore": return isidore_org;
case "Huma-Num - Nakala": return nakala_org;
case "DARIAH-DE": return DariahDE_org;
case "DARIAH-IT ": return DariahIT_org;
case "DARIAH-GR":return DariahGR_org;
case "CLARIN": return Clarin_org;
case "CENDARI": return Cendari_org;
default:
log.warn("No Ckan org matches data source name "+datasourceName);
return null;
}
}
}

View File

@ -0,0 +1,197 @@
package eu.dnetlib.ariadneplus.catalogue;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import com.google.common.collect.Lists;
import eu.dnetlib.ariadneplus.jrr.AriadnePlusRegistryResource;
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.client.utils.URIBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.*;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
/**
* Created by Alessia Bardi on 08/03/2018.
*
* @author Alessia Bardi
*/
@Component
public class CatalogueAPIClient {
private static final Log log = LogFactory.getLog(CatalogueAPIClient.class);
@Value("${gcube.catalogue.baseurl}")
private String baseURL;
private final String itemPath = "items/";
@Value("${gcube.registry.application.token}")
private String applicationToken;
@Value("${gcube.uri.resolver}")
private String uriResolver;
private String resolverBodyTemplate = "{ \"entity_name\": \"%s\" }";
private String purgeBodyTemplate = "{\"id\":\"%s\"}";
private HttpHeaders headersForResolver;
private HttpHeaders headersForCatalogue;
@Autowired
private RestTemplate restTemplate;
public CatalogueAPIClient(){
headersForResolver = new HttpHeaders();
headersForResolver.setContentType(MediaType.APPLICATION_JSON);
headersForCatalogue = new HttpHeaders();
headersForCatalogue.setContentType(MediaType.APPLICATION_JSON);
headersForCatalogue.setAccept(Lists.newArrayList(MediaType.APPLICATION_JSON));
headersForCatalogue.set("gcube-token", getApplicationToken());
}
/**
* Calls the ariadneplus resolver to get the name to use for the catalogue
* @param resName Given a AriadnePlus URL like: http://ariadneplus.d4science.org/handle/Ariadne/AriadnePortal/rhdsq5xm3e40, the resName is Ariadne/AriadnePortal/rhdsq5xm3e40.
* @return the name as computed by the AriadnePlus resolver. Null if the request was not successfull.
*/
public String getNameForCatalogue(final String resName) throws URISyntaxException {
log.debug("Calling AriadnePlus resolver for "+resName);
String body = String.format(resolverBodyTemplate, resName);
HttpEntity<String> entity = new HttpEntity<String>(body, headersForResolver);
URI uri = new URIBuilder(getUriResolver()).build();
log.debug("Resolver at "+getUriResolver()+" post body:\n"+body);
ResponseEntity<String> res = restTemplate.exchange(uri, HttpMethod.POST, entity, String.class);
if(res.getStatusCode().is2xxSuccessful()){
String resolved = res.getBody();
log.debug(String.format("AriadnePlus resolver resolved %s with %s", resName, resolved ));
return resolved;
}
else{
log.debug(String.format("AriadnePlus resolver returned %s with cause %s for %s", res.getStatusCodeValue(), res.getStatusCode().getReasonPhrase(), resName));
return null;
}
}
protected boolean isRegistered(final String resCatName) throws AriadnePlusPublisherException {
log.debug(String.format("Catalogue --> Checking if item %s exists", resCatName));
HttpEntity<String> entity = new HttpEntity<String>(headersForCatalogue);
try {
URI uri = new URIBuilder(getBaseURL()+itemPath).build();
ResponseEntity<String> response
= restTemplate.exchange(uri + "/"+resCatName, HttpMethod.GET, entity, String.class);
return response.getStatusCode().is2xxSuccessful();
} catch (Throwable t) {
throw new AriadnePlusPublisherException(t);
}
}
@Deprecated
public AriadnePlusRegistryResource getRegistered(final String resCatName) throws AriadnePlusPublisherException {
log.debug(String.format("Catalogue --> Checking if item %s exists", resCatName));
HttpEntity<String> entity = new HttpEntity<String>(headersForCatalogue);
try {
URI uri = new URIBuilder(getBaseURL()+itemPath).build();
ResponseEntity<String> response
= restTemplate.exchange(uri + "/"+resCatName, HttpMethod.GET, entity, String.class);
if(response.getStatusCode().is2xxSuccessful()){
CatalogueAPIResponse body = new CatalogueAPIResponse();
body.setResponseBody(response.getBody());
AriadnePlusRegistryResource r = body.getAriadnePlusRegistryResource();
log.debug(String.format("Resource %s is in the catalogue with uuid %s", resCatName, r.getUuid()));
return r;
}
else{
log.debug(String.format("Resource %s is not in the catalogue yet", resCatName));
return null;
}
} catch (Throwable t) {
throw new AriadnePlusPublisherException(t);
}
}
public boolean doRegister(final String json, final String resCatName) throws URISyntaxException, IOException {
log.debug(String.format("Catalogue --> Registering item %s : %s", resCatName, json));
return doCatalogueCall(json, resCatName, HttpMethod.POST);
}
public boolean doUpdate(final String json, final String resCatName) throws IOException, URISyntaxException {
log.debug(String.format("Catalogue --> Updating item %s : %s", resCatName, json));
return doCatalogueCall(json, resCatName, HttpMethod.PUT);
}
protected boolean doCatalogueCall(final String json, final String resCatName, final HttpMethod method) throws URISyntaxException, IOException {
HttpEntity<String> entity = new HttpEntity<String>(json, headersForCatalogue);
URI uri = new URIBuilder(getBaseURL()+itemPath).build();
ResponseEntity<String> res = restTemplate.exchange(uri, method, entity, String.class);
if (res.getStatusCode().is2xxSuccessful()) {
return true;
} else {
log.error(String.format("Method %s on resource %s failed with code %s, reason: %s", method.name(), resCatName, res.getStatusCodeValue(), res.getBody()));
return false;
}
}
protected boolean purgeItem(final String resCatName) throws URISyntaxException, AriadnePlusPublisherException {
log.debug(String.format("Catalogue --> Purge Item %s", resCatName));
HttpEntity<String> entity = new HttpEntity<String>(headersForCatalogue);
try {
URI uri = new URIBuilder(getBaseURL()+itemPath).build();
ResponseEntity<String> res
= restTemplate.exchange(uri + "/"+resCatName+"?purge=true", HttpMethod.DELETE, entity, String.class);
if (res.getStatusCode().is2xxSuccessful()) {
return true;
} else {
log.error(String.format("Cannot purge item %s. HTTP error code %s, reason: %s", resCatName, res.getStatusCodeValue(), res.getBody()));
return false;
}
} catch (Throwable t) {
throw new AriadnePlusPublisherException(t);
}
}
public String getBaseURL() {
return baseURL;
}
public void setBaseURL(final String baseURL) {
this.baseURL = baseURL;
}
public String getApplicationToken() {
return applicationToken;
}
public void setApplicationToken(final String applicationToken) {
this.applicationToken = applicationToken;
}
public RestTemplate getRestTemplate() {
return restTemplate;
}
public void setRestTemplate(final RestTemplate restTemplate) {
this.restTemplate = restTemplate;
}
public String getUriResolver() {
return uriResolver;
}
public void setUriResolver(final String uri_resolver) {
this.uriResolver = uriResolver;
}
public String getPurgeBodyTemplate() {
return purgeBodyTemplate;
}
public void setPurgeBodyTemplate(final String purgeBodyTemplate) {
this.purgeBodyTemplate = purgeBodyTemplate;
}
}

View File

@ -0,0 +1,71 @@
package eu.dnetlib.ariadneplus.catalogue;
import java.io.IOException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import eu.dnetlib.ariadneplus.jrr.AriadnePlusRegistryResource;
/**
* Created by Alessia Bardi on 08/03/2018.
*
* @author Alessia Bardi
* TODO: reimplement for new RESTful API. Not needed with new API
*/
@Deprecated
public class CatalogueAPIResponse {
private JsonNode response;
public void setResponseBody(final String responseBody) throws IOException {
ObjectMapper mapper = new ObjectMapper();
response = mapper.readTree(responseBody);
}
public boolean isSuccess(){
return response.get("success").asBoolean();
}
public AriadnePlusRegistryResource getAriadnePlusRegistryResource() throws IOException {
if(!hasAriadnePlusRegistryResource()) return null;
else{
JsonNode result = response.get("result");
return parseResult(result);
}
}
public boolean hasAriadnePlusRegistryResource(){
JsonNode result = response.path("result");
return !result.isMissingNode();
}
public String getErrorMessage(){
if(isSuccess()) return "";
//TODO: tell d4science guys that error messages sometimes are in error.name, sometimes in message
JsonNode message = response.path("message");
if(!message.isMissingNode()) return message.toString();
else{
JsonNode error = response.get("error");
if(!error.isMissingNode()){
return error.toString();
}
}
return "Error message not available in error or message fields";
}
protected AriadnePlusRegistryResource parseResult(JsonNode result) throws IOException {
String uuid = result.get("id").asText();
String type = null;
JsonNode extras = result.get("extras");
for(JsonNode jn : extras){
String key = jn.get("key").asText();
if(key.equals("system:type")){
type = jn.get("value").asText();
}
}
return new AriadnePlusRegistryResource().setJson(result.asText()).setType(type).setUuid(uuid);
}
}

View File

@ -0,0 +1,55 @@
package eu.dnetlib.ariadneplus.catalogue;
import org.apache.commons.lang3.StringUtils;
/**
* Created by Alessia Bardi on 06/04/2018.
*
* @author Alessia Bardi
*
* Enum with a subset of the licenses supported by the CKan catalogue. For the full list, see SERVICE_ENDPOINT/api/licenses/list/
*/
public enum CatalogueLicense {
NotSpecified("notspecified"),
OtherOpen("other-open"), OtherPublicDomain("other-pd"), OtherAttribution("other-at"), OtherNonCommercial("other-nc"),
CC0("CC0-1.0"), CCBY("CC-BY-4.0"), CCBYSA("CC-BY-SA-4.0"), CCBYNC("CC-BY-NC-4.0"), CCBYND("CC-BY-ND-4.0"), CCBYNCSA("CC-BY-NC-SA-4.0"), CCBYNCND("CC-BY-NC-ND-4.0"),
AFL("AFL-3.0"), APL("APL-1.0"), AGPL("AGPL-3.0"), Apache1_1("Apache-1.1"), Apache2("Apache-2.0"), APSL2("APSL-2.0"),
GPL2("GPL-2.0"), GPL3("GPL-3.0"), LGPL2_1("LGPL-2.1"), LGPL3("LGPL-3.0"),
EUDataGrid("EUDatagrid"), EUPL1_1("EUPL-1.1"), Fair("Fair"), MIT("MIT"), MozillaPublic("MPL-1.1");
private String id;
public String getId() {
return id;
}
CatalogueLicense(String id) {
this.id = id;
}
public static CatalogueLicense getCatalogueLicenseFor(final String license){
//TODO: get the best from the data we have, if we are able to clean the string, this method wil be much simpler...
//TODO: not specified is not a valid value for the new gcat API and requesting the list of licensing fails, ask Luca.
if(StringUtils.isBlank(license)) return NotSpecified;
if(license.equalsIgnoreCase("CC") || license.equalsIgnoreCase("Free/ CC") || license.equalsIgnoreCase("Creative Commons CC0 1.0 Universal Public Domain Dedication")) return CC0;
if(license.equalsIgnoreCase("CC-BY") || license.equalsIgnoreCase("CC BY")) return CCBY;
if(license.equalsIgnoreCase("CC-BY-SA") || license.equalsIgnoreCase("Attribute-share-alike (CC-BY-SA) license") || license.equalsIgnoreCase("CC BY-SA")) return CCBYSA;
if(license.equalsIgnoreCase("CC-BY-SA-NC") || license.equalsIgnoreCase("Creative Commons BY-NC-SA")) return CCBYNCSA;
if(license.equalsIgnoreCase("Open Access") || license.equalsIgnoreCase("OpenSource")) return OtherOpen;
if(license.equalsIgnoreCase("MIT") || license.equalsIgnoreCase("MIT LICENSE")) return MIT;
if(license.equalsIgnoreCase("APACHE 2.0")|| license.equalsIgnoreCase("Apache License 2.0") || license.equalsIgnoreCase("Apache License, Version 2.0")) return Apache2;
if(license.equalsIgnoreCase("GNU GPL v2")) return GPL2;
if(license.equalsIgnoreCase("GPLv3") || license.equalsIgnoreCase("GPL v3")) return GPL3;
if(license.equalsIgnoreCase("LGPL V3") || license.equalsIgnoreCase("LGPL V3.0")) return LGPL3;
else return NotSpecified;
}
}

View File

@ -0,0 +1,709 @@
package eu.dnetlib.ariadneplus.catalogue;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import com.fasterxml.jackson.core.JsonEncoding;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.google.common.base.Joiner;
import com.google.common.collect.Iterators;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import eu.dnetlib.ariadneplus.CRM;
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException;
import eu.dnetlib.ariadneplus.rdf.ResourceReader;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jena.rdf.model.RDFNode;
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.StmtIterator;
import org.apache.jena.vocabulary.RDF;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* Created by Alessia Bardi on 21/11/2017.
*
* @author Alessia Bardi
*/
@Component
public class CatalogueRegistrator {
private static final Log log = LogFactory.getLog(CatalogueRegistrator.class);
private final String ARIADNEPLUS_BASE_URL = "http://ariadneplus.d4science.org";
@Autowired
private ResourceReader resourceReader;
@Autowired
private CatalogueAPIClient catalogueAPIClient;
public String register(final Resource resource, final Resource type, final String datasourceName)
throws IOException, AriadnePlusPublisherException, URISyntaxException, InterruptedException {
String resURI = resource.getURI();
log.debug(String.format("Catalogue --> Processing resource : %s with type: %s from source: %s", resURI, type.getLocalName(), datasourceName));
String resCatName = catalogueAPIClient.getNameForCatalogue(resURI.substring(resURI.lastIndexOf("handle/") + 7));
if(catalogueAPIClient.isRegistered(resCatName)){
log.debug(resCatName+ " is already registered");
String json = getJson(type, resource, resCatName, datasourceName);
catalogueAPIClient.doUpdate(json, resCatName);
}
else {
//resource not yet registered
String json = getJson(type, resource, resCatName, datasourceName);
if(!catalogueAPIClient.doRegister(json, resCatName)){
log.warn(String.format("%s could not be registered even the second time, giving up", resURI));
return null;
}
}
log.debug(String.format("%s registered on the catalogue with name: %s", resURI, resCatName));
return resCatName;
}
protected boolean purge(final String resCatName) throws URISyntaxException, AriadnePlusPublisherException {
return catalogueAPIClient.purgeItem(resCatName);
}
protected String getJson(final Resource type, final Resource resource, final String resNameForCatalogue, final String datasourceName)
throws IOException, AriadnePlusPublisherException {
switch (type.getLocalName()) {
case "E29_Design_or_Procedure":
return getJsonForDesignProcedure(resource, resNameForCatalogue, datasourceName);
case "D14_Software":
return getJsonForSoftware(resource, resNameForCatalogue, datasourceName);
case "PE35_Project":
return getJsonForProject(resource, resNameForCatalogue, datasourceName);
case "PE1_Service":
return getJsonForService(resource, resNameForCatalogue, datasourceName);
case "E39_Actor":
return getJsonForActor(resource, resNameForCatalogue, datasourceName);
case "PE18_Dataset":
return getJsonForDataset(resource, resNameForCatalogue, datasourceName);
case "E78_Collection":
return getJsonForCollection(resource, resNameForCatalogue, datasourceName);
default:
throw new IllegalArgumentException(String.format("Type " + type.getLocalName() + " not supported"));
}
}
protected String getJsonForProject(final Resource res, final String resNameForCatalogue, final String datasourceName)
throws IOException, AriadnePlusPublisherException {
JsonFactory jsonFactory = new JsonFactory();
final ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(out);
JsonGenerator jg = jsonFactory.createGenerator(bos, JsonEncoding.UTF8);
jg.writeStartObject();
writeCommonFields(jg, res, resNameForCatalogue, datasourceName);
//Only RI_Project are linked to RIs that must be used as groups
List<String> maintainer_RIs = Lists.newArrayList(resourceReader.getMaintainersLabels(res));
if(maintainer_RIs.size() > 0) {
jg.writeArrayFieldStart("groups");
for(String ri : maintainer_RIs) {
String group = CKANUtils.getCkanGroup(ri);
if(StringUtils.isNotBlank(group)) {
jg.writeStartObject();
jg.writeStringField("name", group);
jg.writeEndObject();
}
}
jg.writeEndArray();
}
jg.writeStringField("maintainer", Joiner.on(", ").join(resourceReader.getMaintainersLabels(res)));
//TODO: it should be better to identify email contacts rather than generic contact labels of maintainer
//jg.writeStringField("maintainer_email", Joiner.on(", ").join(resourceReader.getMaintainerContacts(res)));
jg.writeArrayFieldStart("extras");
addExtra(jg, "system:type", CKANUtils.Project_type);
//specific class
addExtra(jg, "instance of", resourceReader.findSpecificType(res, CRM.E7_Activity).getLocalName());
if (res.getURI().startsWith(ARIADNEPLUS_BASE_URL))
addExtra(jg, "AriadnePlus URL", res.getURI());
else addExtra(jg, "URL", res.getURI());
addIdentifiers(res, jg);
addExtra(jg, "started on", resourceReader.getStartTime(res));
int idx = 1;
Iterator<String> maintainers = resourceReader.getMaintainerUrls(res);
while(maintainers.hasNext()){
addExtra(jg, String.format("maintaining team (%d)", idx), maintainers.next());
idx++;
}
//addExtra(jg, "maintaining team", Joiner.on(", ").join(resourceReader.getMaintainerUrls(res)));
idx = 1;
Iterator<String> services = resourceReader.getOfferedServiceUrls(res);
while(services.hasNext()){
addExtra(jg, String.format("offers (%d)", idx), services.next());
idx++;
}
//addExtra(jg, "offers", Joiner.on(", ").join(resourceReader.getOfferedServiceUrls(res)));
jg.writeEndArray(); //end extras
jg.writeEndObject();
jg.close();
return out.toString("UTF-8");
}
protected String getJsonForService(final Resource res, final String resNameForCatalogue, final String datasourceName)
throws IOException, AriadnePlusPublisherException {
JsonFactory jsonFactory = new JsonFactory();
final ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(out);
JsonGenerator jg = jsonFactory.createGenerator(bos, JsonEncoding.UTF8);
jg.writeStartObject();
writeCommonFields(jg, res, resNameForCatalogue, datasourceName);
jg.writeStringField("maintainer", Joiner.on(", ").join(resourceReader.getMaintainersLabels(res)));
//TODO: it should be better to identify email contacts rather than generic contact labels of maintainer
//jg.writeStringField("maintainer_email", Joiner.on(", ").join(resourceReader.getMaintainerContacts(res)));
jg.writeArrayFieldStart("extras");
addExtra(jg, "system:type", CKANUtils.Service_type);
//specific class
addExtra(jg, "instance of", resourceReader.findSpecificType(res, CRM.E7_Activity).getLocalName());
if (res.getURI().startsWith(ARIADNEPLUS_BASE_URL))
addExtra(jg, "AriadnePlus URL", res.getURI());
else addExtra(jg, "URL", res.getURI());
addIdentifiers(res, jg);
addExtra(jg, "competence", Joiner.on(", ").join(resourceReader.getCompetences(res)));
addExtra(jg, "activity type", Joiner.on(", ").join(resourceReader.getActivityTypes(res)));
//condition of use (Rights)
addExtra(jg, "condition of use", resourceReader.getConditionOfUse(res));
int idx = 1;
Iterator<String> contacts = Iterators.concat(resourceReader.getResourceDirectContactPointsURI(res), resourceReader.getProviderContactPoints(res));
while(contacts.hasNext()){
addExtra(jg, String.format("contact points (%d)", idx), contacts.next());
idx++;
}
//addExtra(jg, "contact points", Joiner.on(", ").join(Iterators.concat(resourceReader.getResourceDirectContactPointsURI(res), resourceReader.getProviderContactPoints(res))));
idx = 1;
Iterator<String> providers = resourceReader.getProviderUris(res);
while(providers.hasNext()){
addExtra(jg, String.format("provided by (%d)", idx), providers.next());
idx++;
}
//addExtra(jg, "provided by", Joiner.on(", ").join(resourceReader.getProviderUris(res)));
idx = 1;
Iterator<String> points = resourceReader.getAccessPoints(res);
while(points.hasNext()){
addExtra(jg, String.format("online access point (%d)", idx), points.next());
idx++;
}
//addExtra(jg, "online access point", Joiner.on(", ").join(resourceReader.getAccessPoints(res)));
addExtra(jg, "protocol", Joiner.on(", ").join(resourceReader.getProtocols(res)));
idx = 1;
Iterator<String> delivers = resourceReader.getDeliversOnRequest(res);
while(delivers.hasNext()){
addExtra(jg, String.format("delivers on request (%d)", idx), delivers.next());
idx++;
}
//addExtra(jg, "delivers on request", Joiner.on(", ").join(resourceReader.getDeliversOnRequest(res)));
idx = 1;
Iterator<String> runs = resourceReader.getRunsOnRequest(res);
while(runs.hasNext()){
addExtra(jg, String.format("runs on request (%d)", idx), runs.next());
idx++;
}
//addExtra(jg, "runs on request", Joiner.on(", ").join(resourceReader.getRunsOnRequest(res)));
idx = 1;
Iterator<String> hosts = resourceReader.getHostedStuff(res);
while(hosts.hasNext()){
addExtra(jg, String.format("hosts (%d)", idx), hosts.next());
idx++;
}
//addExtra(jg, "hosts", Joiner.on(", ").join(resourceReader.getHostedStuff(res)));
idx = 1;
Iterator<String> curates = resourceReader.getCuratedObjects(res);
while(curates.hasNext()){
addExtra(jg, String.format("curates (%d)", idx), curates.next());
idx++;
}
//addExtra(jg, "curates", Joiner.on(", ").join(resourceReader.getCuratedObjects(res)));
addExtra(jg, "declared begin/end of operation", Joiner.on(", ").join(resourceReader.getDeclarativeTimes(res)));
addExtra(jg, "availability", resourceReader.getAvailability(res));
idx = 1;
Iterator<String> plans = resourceReader.getCurationPlans(res);
while(plans.hasNext()){
addExtra(jg, String.format("uses curation plan (%d)", idx), plans.next());
idx++;
}
//addExtra(jg, "uses curation plan", Joiner.on(", ").join(resourceReader.getCurationPlans(res)));
addExtra(jg, "time of service", Joiner.on(", ").join(resourceReader.getDeclarativeTimes(res)));
//TODO: where to get it?
//addExtra(jg, "last confirmation", "");
//TODO: where to get it?
//addExtra(jg, "date of registration", "");
jg.writeEndArray(); //end extras
jg.writeEndObject();
jg.close();
return out.toString("UTF-8");
}
protected String getJsonForActor(final Resource res, final String resNameForCatalogue, final String datasourceName)
throws IOException, AriadnePlusPublisherException {
JsonFactory jsonFactory = new JsonFactory();
final ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(out);
JsonGenerator jg = jsonFactory.createGenerator(bos, JsonEncoding.UTF8);
jg.writeStartObject();
writeCommonFields(jg, res, resNameForCatalogue, datasourceName);
jg.writeArrayFieldStart("extras");
addExtra(jg, "system:type", CKANUtils.Actor_type);
//specific class
addExtra(jg, "instance of", resourceReader.findSpecificType(res, CRM.E39_Actor).getLocalName());
if (res.getURI().startsWith(ARIADNEPLUS_BASE_URL))
addExtra(jg, "AriadnePlus URL", res.getURI());
else addExtra(jg, "URL", res.getURI());
addIdentifiers(res, jg);
addExtra(jg, "has type", Joiner.on(", ").join(resourceReader.getHasTypeLabels(res)));
int idx = 1;
Iterator<String> hasMembers = resourceReader.getMemberUrls(res);
while(hasMembers.hasNext()){
addExtra(jg, String.format("has member (%d)", idx), hasMembers.next());
idx++;
}
//addExtra(jg, "has member", Joiner.on(", ").join(resourceReader.getMemberUrls(res)));
idx = 1;
Iterator<String> isMembers = resourceReader.isMemberOf(res);
while(isMembers.hasNext()){
addExtra(jg, String.format("is member of (%d)", idx), isMembers.next());
idx++;
}
//addExtra(jg, "is member of", Joiner.on(", ").join(resourceReader.isMemberOf(res)));
idx = 1;
Iterator<String> provides = resourceReader.getProvidedServiceUrls(res);
while(provides.hasNext()){
addExtra(jg, String.format("provides (%d)", idx), provides.next());
idx++;
}
//addExtra(jg, "provides", Joiner.on(", ").join(resourceReader.getProvidedServiceUrls(res)));
idx = 1;
String contactPoints = "";
StmtIterator it = res.listProperties(CRM.P76_has_contact_point);
while(it.hasNext()) {
Resource cp = it.next().getResource();
Resource cpType = cp.getPropertyResourceValue(CRM.P2_has_type);
String cpTypeLabel = resourceReader.getLabel(cpType);
String cpLabel = resourceReader.getLabel(cp);
if (StringUtils.isNotBlank(cpLabel)) {
if (StringUtils.isNotBlank(cpTypeLabel)) {
addExtra(jg,String.format("contact point (%d) - %s ", idx, cpTypeLabel), cpLabel );
idx++;
//contactPoints += cpTypeLabel + ": ";
}
else{
addExtra(jg,String.format("contact point (%d)", idx), cpLabel );
idx++;
//contactPoints += cpLabel + "; ";
}
}
else{
addExtra(jg,String.format("contact point (%d)", idx), cp.getURI());
idx++;
}
}
// addExtra(jg,"contact points", contactPoints );
idx = 1;
Iterator<String> maintains = resourceReader.getMaintainedUrls(res);
while(maintains.hasNext()){
addExtra(jg, String.format("maintains (%d)", idx), maintains.next());
idx++;
}
//addExtra(jg, "maintains", Joiner.on(", ").join(resourceReader.getMaintainedUrls(res)));
jg.writeEndArray();
jg.writeEndObject();
jg.close();
return out.toString("UTF-8");
}
protected String getJsonForDataset(final Resource res, final String resNameForCatalogue, final String datasourceName)
throws IOException, AriadnePlusPublisherException {
JsonFactory jsonFactory = new JsonFactory();
final ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(out);
JsonGenerator jg = jsonFactory.createGenerator(bos, JsonEncoding.UTF8);
jg.writeStartObject();
writeCommonFields(jg, res, resNameForCatalogue, datasourceName);
jg.writeArrayFieldStart("extras");
addExtra(jg, "system:type", CKANUtils.Dataset_type);
//specific class
addExtra(jg, "instance of", resourceReader.findSpecificType(res, CRM.E70_Thing).getLocalName());
if (res.getURI().startsWith(ARIADNEPLUS_BASE_URL)) {
addExtra(jg, "AriadnePlus URL", res.getURI());
}
else addExtra(jg, "URL", res.getURI());
addIdentifiers(res, jg);
addExtra(jg, "has type", Joiner.on(", ").join(resourceReader.getHasTypeLabels(res)));
int idx = 1;
Iterator<String> isPartOf = resourceReader.getIsPartOfUrls(res);
while(isPartOf.hasNext()){
addExtra(jg, String.format("is part of (%d)", idx), isPartOf.next());
idx++;
}
//addExtra(jg, "is part of", Joiner.on(", ").join(resourceReader.getIsPartOfUrls(res)));
idx = 1;
Iterator<String> hasPart = resourceReader.getHasPartUrls(res);
while(hasPart.hasNext()){
addExtra(jg, String.format("has part (%d)", idx), hasPart.next());
idx++;
}
//addExtra(jg, "has part", Joiner.on(", ").join(resourceReader.getHasPartUrls(res)));
idx = 1;
Iterator<String> curators = resourceReader.getCuratorUrls(res);
while(curators.hasNext()){
addExtra(jg, String.format("curated by (%d)", idx), curators.next());
idx++;
}
//addExtra(jg, "curated by", Joiner.on(", ").join(resourceReader.getCuratorUrls(res)));
idx = 1;
Iterator<String> curationplans = resourceReader.getResourceCuratorCurationPlans(res);
while(curationplans.hasNext()){
addExtra(jg, String.format("curation plan (%d)", idx), curationplans.next());
idx++;
}
//addExtra(jg, "curation plan", Joiner.on(", ").join(resourceReader.getResourceCuratorCurationPlans(res)));
idx = 1;
Iterator<String> hostedbys = resourceReader.getHostedBys(res);
while(hostedbys.hasNext()){
addExtra(jg, String.format("hosted by (%d)", idx), hostedbys.next());
idx++;
}
//addExtra(jg, "hosted by", Joiner.on(", ").join(resourceReader.getHostedBys(res)));
addExtra(jg, "encoding type", Joiner.on(", ").join(resourceReader.getEncodings(res)));
idx = 1;
Iterator<String> creators = resourceReader.getCreatorsURIs(res);
while(creators.hasNext()){
addExtra(jg, String.format("creator (%d)", idx), creators.next());
idx++;
}
//addExtra(jg, "creator", Joiner.on(", ").join(resourceReader.getCreatorsURIs(res)));
idx = 1;
Iterator<String> sw = resourceReader.getUsedSoftware(res);
while(sw.hasNext()){
addExtra(jg, String.format("used software (%d)", idx), sw.next());
idx++;
}
addExtra(jg, "subject", Joiner.on(", ").join(resourceReader.getSubjects(res)));
addExtra(jg, "temporal coverage", Joiner.on(", ").join(resourceReader.getTemporalCoverages(res)));
addExtra(jg, "spatial coverage", Joiner.on(", ").join(resourceReader.getSpatialCoverages(res)));
idx = 1;
Iterator<String> usedbys = resourceReader.getUsedBy(res);
while(usedbys.hasNext()){
addExtra(jg, String.format("used by (%d)", idx), usedbys.next());
idx++;
}
//addExtra(jg, "used by", Joiner.on(", ").join(resourceReader.getUsedBy(res)));
addExtra(jg, "languages", Joiner.on(", ").join(resourceReader.getLanguages(res)));
idx = 1;
Iterator<String> metadata = resourceReader.getMetadata(res);
while(metadata.hasNext()){
addExtra(jg, String.format("has metadata (%d)", idx), metadata.next());
idx++;
}
//addExtra(jg, "has metadata", Joiner.on(", ").join(resourceReader.getMetadata(res)));
idx = 1;
Iterator<String> metadataFor = resourceReader.getDescribedDataset(res);
while(metadataFor.hasNext()){
addExtra(jg, String.format("is metadata for (%d)", idx), metadataFor.next());
idx++;
}
//addExtra(jg, "is metadata for", Joiner.on(", ").join(resourceReader.getDescribedDataset(res)));
idx = 1;
Iterator<String> snaphsots = resourceReader.getSnapshots(res);
while(snaphsots.hasNext()){
addExtra(jg, String.format("has snapshot (%d)", idx), snaphsots.next());
idx++;
}
//addExtra(jg, "has snapshot", Joiner.on(", ").join(resourceReader.getSnapshots(res)));
idx = 1;
Iterator<String> issnaphsots = resourceReader.getIsSnapshotOfs(res);
while(issnaphsots.hasNext()){
addExtra(jg, String.format("is snapshot of (%d)", idx), issnaphsots.next());
idx++;
}
//addExtra(jg, "is snapshot of", Joiner.on(", ").join(resourceReader.getIsSnapshotOfs(res)));
jg.writeEndArray();
jg.writeEndObject();
jg.close();
return out.toString("UTF-8");
}
protected String getJsonForSoftware(final Resource res, final String resNameForCatalogue, final String datasourceName)
throws IOException, AriadnePlusPublisherException {
JsonFactory jsonFactory = new JsonFactory();
final ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(out);
JsonGenerator jg = jsonFactory.createGenerator(bos, JsonEncoding.UTF8);
jg.writeStartObject();
writeCommonFields(jg, res, resNameForCatalogue, datasourceName);
jg.writeArrayFieldStart("extras");
addExtra(jg, "system:type", CKANUtils.Software_type);
//specific class
addExtra(jg, "instance of", resourceReader.findSpecificType(res, CRM.E70_Thing).getLocalName());
if (res.getURI().startsWith(ARIADNEPLUS_BASE_URL)) {
addExtra(jg, "AriadnePlus URL", res.getURI());
}
else addExtra(jg, "URL", res.getURI());
addIdentifiers(res, jg);
addExtra(jg, "subject", Joiner.on(", ").join(resourceReader.getSubjects(res)));
addExtra(jg, "has type", Joiner.on(", ").join(resourceReader.getHasTypeLabels(res)));
int idx = 1;
Iterator<String> hosted = resourceReader.getHostedBys(res);
while(hosted.hasNext()){
addExtra(jg, String.format("hosted by (%d)", idx), hosted.next());
idx++;
}
//addExtra(jg, "hosted by", Joiner.on(", ").join(resourceReader.getHostedBys(res)));
idx = 1;
Iterator<String> curated = resourceReader.getCuratorUrls(res);
while(curated.hasNext()){
addExtra(jg, String.format("curated by (%d)", idx), curated.next());
idx++;
}
//addExtra(jg, "curated by", Joiner.on(", ").join(resourceReader.getCuratorUrls(res)));
idx = 1;
Iterator<String> hasSnapshot = resourceReader.getSnapshots(res);
while(hasSnapshot.hasNext()){
addExtra(jg, String.format("has snapshot (%d)", idx), hasSnapshot.next());
idx++;
}
//addExtra(jg, "has snapshot", Joiner.on(", ").join(resourceReader.getSnapshots(res)));
idx = 1;
Iterator<String> isSnapshot = resourceReader.getIsSnapshotOfs(res);
while(isSnapshot.hasNext()){
addExtra(jg, String.format("is snapshot (%d)", idx), isSnapshot.next());
idx++;
}
//addExtra(jg, "is snapshot of", Joiner.on(", ").join(resourceReader.getIsSnapshotOfs(res)));
idx = 1;
Iterator<String> isPart = resourceReader.getIsPartOfUrls(res);
while(isPart.hasNext()){
addExtra(jg, String.format("is part of (%d)", idx), isPart.next());
idx++;
}
//addExtra(jg, "is part of", Joiner.on(", ").join(resourceReader.getIsPartOfUrls(res)));
idx = 1;
Iterator<String> hasPart = resourceReader.getHasPartUrls(res);
while(hasPart.hasNext()){
addExtra(jg, String.format("has part (%d)", idx), hasPart.next());
idx++;
}
//addExtra(jg, "has part", Joiner.on(", ").join(resourceReader.getHasPartUrls(res)));
idx = 1;
Iterator<String> hasRelease = resourceReader.getHasReleases(res);
while(hasRelease.hasNext()){
addExtra(jg, String.format("has release (%d)", idx), hasRelease.next());
idx++;
}
//addExtra(jg, "has release", Joiner.on(", ").join(resourceReader.getHasReleases(res)));
idx = 1;
Iterator<String> isRelease = resourceReader.getIsReleaseOfs(res);
while(isRelease.hasNext()){
addExtra(jg, String.format("is release (%d)", idx), isRelease.next());
idx++;
}
//addExtra(jg, "is release of", Joiner.on(", ").join(resourceReader.getIsReleaseOfs(res)));
idx = 1;
Iterator<String> used = resourceReader.getUsedBy(res);
while(used.hasNext()){
addExtra(jg, String.format("used by (%d)", idx), used.next());
idx++;
}
//addExtra(jg, "used by", Joiner.on(", ").join(resourceReader.getUsedBy(res)));
addExtra(jg, "creation time", resourceReader.getFirstCreationTime(res));
jg.writeEndArray();
jg.writeEndObject();
jg.close();
return out.toString("UTF-8");
}
protected String getJsonForCollection(final Resource res, final String resNameForCatalogue, final String datasourceName)
throws IOException, AriadnePlusPublisherException {
JsonFactory jsonFactory = new JsonFactory();
final ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(out);
JsonGenerator jg = jsonFactory.createGenerator(bos, JsonEncoding.UTF8);
jg.writeStartObject();
writeCommonFields(jg, res, resNameForCatalogue, datasourceName);
jg.writeArrayFieldStart("extras");
addExtra(jg, "system:type", CKANUtils.Collection_type);
//specific class
addExtra(jg, "instance of", resourceReader.findSpecificType(res, CRM.E70_Thing).getLocalName());
if (res.getURI().startsWith(ARIADNEPLUS_BASE_URL)) {
addExtra(jg, "AriadnePlus URL", res.getURI());
}
else addExtra(jg, "URL", res.getURI());
addIdentifiers(res, jg);
addExtra(jg, "has type", Joiner.on(", ").join(resourceReader.getHasTypeLabels(res)));
addExtra(jg, "subject", Joiner.on(", ").join(resourceReader.getSubjects(res)));
addExtra(jg, "temporal coverage", Joiner.on(", ").join(resourceReader.getTemporalCoverages(res)));
addExtra(jg, "spatial coverage", Joiner.on(", ").join(resourceReader.getSpatialCoverages(res)));
int idx = 1;
Iterator<String> hasPart = resourceReader.getHasPartUrls(res);
while(hasPart.hasNext()){
addExtra(jg, String.format("has part (%d)", idx), hasPart.next());
idx++;
}
//addExtra(jg, "has part", Joiner.on(", ").join(resourceReader.getHasPartUrls(res)));
idx = 1;
Iterator<String> hosted = resourceReader.getHostedBys(res);
while(hosted.hasNext()){
addExtra(jg, String.format("hosted by (%d)", idx), hosted.next());
idx++;
}
//addExtra(jg, "hosted by", Joiner.on(", ").join(resourceReader.getHostedBys(res)));
idx = 1;
Iterator<String> curated = resourceReader.getCuratorUrls(res);
while(curated.hasNext()){
addExtra(jg, String.format("curated by (%d)", idx), curated.next());
idx++;
}
//addExtra(jg, "curated by", Joiner.on(", ").join(resourceReader.getCuratorUrls(res)));
idx = 1;
Iterator<String> creators = resourceReader.getCreatorsURIs(res);
while(creators.hasNext()){
addExtra(jg, String.format("creator (%d)", idx), creators.next());
idx++;
}
//addExtra(jg, "creator", Joiner.on(", ").join(resourceReader.getCreatorsURIs(res)));
addExtra(jg, "languages", Joiner.on(", ").join(resourceReader.getLanguages(res)));
jg.writeEndArray();
jg.writeEndObject();
jg.close();
return out.toString("UTF-8");
}
protected String getJsonForDesignProcedure(final Resource res, final String resNameForCatalogue, final String datasourceName)
throws IOException, AriadnePlusPublisherException {
JsonFactory jsonFactory = new JsonFactory();
final ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(out);
JsonGenerator jg = jsonFactory.createGenerator(bos, JsonEncoding.UTF8);
jg.writeStartObject();
writeCommonFields(jg, res, resNameForCatalogue, datasourceName);
jg.writeArrayFieldStart("extras");
addExtra(jg, "system:type", CKANUtils.DesignOrProcedure_type);
//specific class
addExtra(jg, "instance of", resourceReader.findSpecificType(res, CRM.E29_Design_or_Procedure).getLocalName());
if (res.getURI().startsWith(ARIADNEPLUS_BASE_URL)) {
addExtra(jg, "AriadnePlus URL", res.getURI());
}
else addExtra(jg, "URL", res.getURI());
addIdentifiers(res, jg);
int idx = 1;
Iterator<String> used = resourceReader.getUsedBy(res);
while(used.hasNext()){
addExtra(jg, String.format("used by (%d)", idx), used.next());
idx++;
}
//addExtra(jg, "used by", Joiner.on(", ").join(resourceReader.getUsedBy(res)));
//TODO: add additional metadata for E29_Design_or_Procedure, if any
jg.writeEndArray();
jg.writeEndObject();
jg.close();
return out.toString("UTF-8");
}
protected void addIdentifiers(final Resource res, final JsonGenerator jg ) throws IOException {
/*
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
*/
StmtIterator it = res.listProperties(CRM.P1_is_identified_by);
Set<String> ids = Sets.newHashSet();
while(it.hasNext()){
RDFNode obj = it.next().getObject();
if(obj.isLiteral()) ids.add(obj.asLiteral().getLexicalForm());
else {
Resource id = (Resource) obj;
if (id.hasProperty(RDF.type, CRM.E42_Identifier)) {
ids.add(resourceReader.getLabel(id));
}
}
}
addExtra(jg, "ID", String.join(",", ids));
}
protected void addExtra(final JsonGenerator jg, final String key, final String value) throws IOException {
if(StringUtils.isNotBlank(value)) {
jg.writeStartObject();
jg.writeStringField("key", key);
jg.writeStringField("value", value);
jg.writeEndObject();
}
}
protected void writeCommonFields(final JsonGenerator jg, final Resource res, final String resNameForCatalogue, final String datasourceName)
throws IOException, AriadnePlusPublisherException {
String ckanOrg = CKANUtils.getCKanOrg(datasourceName);
//id is available only for updates
if(StringUtils.isBlank(ckanOrg)) throw new AriadnePlusPublisherException(String.format("Cannot register %s : blank ckan org for data source with name %s", resNameForCatalogue, datasourceName));
//the owning organization, i.e. the data souce from which this resource has been collected from
jg.writeStringField("owner_org", ckanOrg);
jg.writeStringField("name", resNameForCatalogue);
//default license
jg.writeStringField("license_id", resourceReader.getCatalogueLicense(res).getId());
String title = resourceReader.getTitle(res);
if (StringUtils.isBlank(title))
title = resNameForCatalogue;
jg.writeStringField("title", title);
//description
jg.writeStringField("notes",Joiner.on(';').join(resourceReader.getDescriptions(res)));
//the names of all superclasses of the entity
jg.writeArrayFieldStart("tags");
Iterator<String> classNames = resourceReader.getRDFClassNames(res);
while (classNames.hasNext()) {
jg.writeStartObject();
jg.writeStringField("name", classNames.next());
jg.writeEndObject();
}
jg.writeEndArray();
}
public ResourceReader getResourceReader() {
return resourceReader;
}
public void setResourceReader(final ResourceReader resourceReader) {
this.resourceReader = resourceReader;
}
public CatalogueAPIClient getCatalogueAPIClient() {
return catalogueAPIClient;
}
public void setCatalogueAPIClient(final CatalogueAPIClient catalogueAPIClient) {
this.catalogueAPIClient = catalogueAPIClient;
}
}

View File

@ -0,0 +1,39 @@
package eu.dnetlib.ariadneplus.jrr;
/**
* Created by Alessia Bardi on 26/02/2018.
*
* @author Alessia Bardi
*/
public class AriadnePlusRegistryRel {
private String relName;
private String json;
public String getRelName() {
return relName;
}
public void setRelName(final String relName) {
this.relName = relName;
}
public String getJson() {
return json;
}
public void setJson(final String json) {
this.json = json;
}
public AriadnePlusRegistryRel relName(final String relName) {
this.relName = relName;
return this;
}
public AriadnePlusRegistryRel json(final String json) {
this.json = json;
return this;
}
}

View File

@ -0,0 +1,55 @@
package eu.dnetlib.ariadneplus.jrr;
import org.apache.commons.lang3.StringUtils;
/**
* Created by Alessia Bardi on 06/10/2017.
*
* @author Alessia Bardi
*/
public class AriadnePlusRegistryResource {
private String uuid;
private String type;
private String json;
public String getUuid() {
return uuid;
}
public AriadnePlusRegistryResource setUuid(final String uuid) {
this.uuid = uuid;
return this;
}
public String getType() {
return type;
}
public String getRegistryType(){
return StringUtils.remove(type, '-');
}
public AriadnePlusRegistryResource setType(final String type) {
this.type = type;
return this;
}
public String getJson() {
return json;
}
public AriadnePlusRegistryResource setJson(final String json) {
this.json = json;
return this;
}
@Override
public String toString() {
return "AriadnePlusRegistryResource{" +
"uuid='" + uuid + '\'' +
", type='" + type + '\'' +
", json='" + json + '\'' +
'}';
}
}

View File

@ -0,0 +1,147 @@
package eu.dnetlib.ariadneplus.jrr;
import java.io.IOException;
import java.net.URISyntaxException;
import javax.annotation.PostConstruct;
import eu.dnetlib.ariadneplus.CRM;
import eu.dnetlib.ariadneplus.CRMdig;
import eu.dnetlib.ariadneplus.CRMpe;
import eu.dnetlib.ariadneplus.catalogue.CatalogueRegistrator;
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException;
import eu.dnetlib.ariadneplus.rdf.RecordParserHelper;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jena.ontology.OntModel;
import org.apache.jena.ontology.OntModelSpec;
import org.apache.jena.rdf.model.*;
import org.apache.jena.vocabulary.RDF;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* Created by Alessia Bardi on 25/02/2018.
*
* publish on Gcube registry and catalogue.
*
*
* @author Alessia Bardi
*/
@Component
public class JRRPublisher {
private static final Log log = LogFactory.getLog(JRRPublisher.class);
private OntModel baseModel;
@Autowired
private CatalogueRegistrator catalogueRegistrator;
//@Autowired
//private GCubeResourceRegistrator gCubeResourceRegistrator;
@Autowired
private RecordParserHelper recordParserHelper;
@PostConstruct
public void init(){
baseModel = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_TRANS_INF);
baseModel.read(CRMpe.RDFS_URL);
baseModel.read(CRM.RDFS_URL);
baseModel.read(CRMdig.RDFS_URL);
}
public void register(final String record)
throws AriadnePlusPublisherException, IOException, URISyntaxException, InterruptedException {
String id = recordParserHelper.getObjIdentifier(record);
String datasourceName = recordParserHelper.getDatasourceName(record);
//objIdentifier contains the subject URI used to get the RDF: that is the only resource we have to register when processing this rdf file!
log.debug("REGISTERING ON JRR: "+id);
String rdfRecord = recordParserHelper.getRDF(record);
InfModel model = loadBaseModel();
model.read(IOUtils.toInputStream(rdfRecord), CRMpe.NS, "RDF/XML");
register(model, id, datasourceName);
}
protected void register(final Model model, final String resourceURI, final String datasourceName)
throws AriadnePlusPublisherException, IOException, URISyntaxException, InterruptedException {
Resource rdfResource = model.getResource(resourceURI);
if (rdfResource == null) {
log.error("UNEXPECTED NULL rdfResource with resourceURI " + resourceURI + ". I am skipping it, but you should check!");
} else {
//call the correct register method based on the resource type
//we skip everything that is not Software, Actor, Service, Dataset, Curation Plan and Project: other entities are in fact source of metadata for them
////base types are {Project, Service, Actors, Datasets, Software, Physical Collections, Standards} i.e. {PE35_Project, PE1_Service, E39_Actor, PE18_Dataset, D14_Software, E78_Collection, E29_Design_or_Procedure)
if (rdfResource.hasProperty(RDF.type, CRM.E39_Actor)) registerRDFResource(rdfResource, CRM.E39_Actor, datasourceName);
else {
if (rdfResource.hasProperty(RDF.type, CRMpe.PE35_Project)) registerRDFResource(rdfResource, CRMpe.PE35_Project, datasourceName);
else {
if (rdfResource.hasProperty(RDF.type, CRM.E29_Design_or_Procedure)) registerRDFResource(rdfResource, CRM.E29_Design_or_Procedure, datasourceName);
else {
if (rdfResource.hasProperty(RDF.type, CRMdig.D14_Software)) registerRDFResource(rdfResource, CRMdig.D14_Software, datasourceName);
else {
if (rdfResource.hasProperty(RDF.type, CRMpe.PE18_Dataset)) registerRDFResource(rdfResource, CRMpe.PE18_Dataset, datasourceName);
else {
if (rdfResource.hasProperty(RDF.type, CRM.E78_Collection)) registerRDFResource(rdfResource, CRM.E78_Collection, datasourceName);
else {
if (rdfResource.hasProperty(RDF.type, CRMpe.PE1_Service)) registerRDFResource(rdfResource, CRMpe.PE1_Service, datasourceName);
else {
log.debug("Skipping " + resourceURI + " because of its type");
}
}
}
}
}
}
}
}
}
protected boolean registerRDFResource(final Resource rdfResource, final Resource type, final String datasourceName)
throws AriadnePlusPublisherException, IOException, URISyntaxException, InterruptedException {
String resURI = rdfResource.getURI();
if (!resURI.startsWith("http")) {
//this is something George said: if it has no http URI, then it is not to be considered relevant by itself
log.info("Resource " + resURI + " skipped: URI does not start with http");
return false;
}
else {
String uuid = registerOnCatalogue(rdfResource, type, datasourceName);
if(StringUtils.isNotBlank(uuid)){
//TODO: let's skip the registration on the registry for now.
//registerOnRegistry(rdfResource, uuid, type);
return true;
}
else{
log.warn("Got blank uuid when registering "+resURI+": skipping registration on the registry");
return false;
}
}
}
/**
* Register resource of the given type on the catalogue
* @param rdfResource
* @param type
* @return the catalogue uuid
* @throws IOException
*/
protected String registerOnCatalogue(final Resource rdfResource, final Resource type, final String datasourceName)
throws AriadnePlusPublisherException, IOException, URISyntaxException, InterruptedException {
return catalogueRegistrator.register(rdfResource, type, datasourceName);
}
/*
protected void registerOnRegistry(final Resource rdfResource, final String uuid, final Resource type)
throws AriadnePlusPublisherException, ResourceRegistryException, IOException {
gCubeResourceRegistrator.register(rdfResource, uuid, type);
}
*/
protected InfModel loadBaseModel() {
return ModelFactory.createRDFSModel(baseModel);
}
}

View File

@ -0,0 +1,48 @@
package eu.dnetlib.ariadneplus.publisher;
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherHelper.AriadnePlusTargets;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class AriadnePlusPublisherController {
private static final Log log = LogFactory.getLog(AriadnePlusPublisherController.class);
//TODO: to nicely handle arrors, follow https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-error-handling
@Autowired
private AriadnePlusPublisherHelper ariadneplusPublisherHelper;
@RequestMapping(value = "/publish", method = RequestMethod.POST)
public void publish(@RequestParam final String record, @RequestParam(required = false) String ariadneplusTarget) throws AriadnePlusPublisherException {
getAriadnePlusPublisherHelper().publish(record, getTarget(ariadneplusTarget));
}
@RequestMapping(value = "/unpublish", method = RequestMethod.GET)
public void unpublish(@RequestParam final String datasourceApi, @RequestParam(required = false) String ariadneplusTarget) throws AriadnePlusPublisherException {
getAriadnePlusPublisherHelper().unpublish(datasourceApi, getTarget(ariadneplusTarget));
}
@RequestMapping(value = "/dropRegistry", method = RequestMethod.GET)
public void unpublish() throws AriadnePlusPublisherException {
getAriadnePlusPublisherHelper().dropRegistry();
}
private AriadnePlusTargets getTarget(String value) {
return AriadnePlusTargets.valueOf(value);
}
public AriadnePlusPublisherHelper getAriadnePlusPublisherHelper() {
return ariadneplusPublisherHelper;
}
public void setAriadnePlusPublisherHelper(final AriadnePlusPublisherHelper ariadneplusPublisherHelper) {
this.ariadneplusPublisherHelper = ariadneplusPublisherHelper;
}
}

View File

@ -0,0 +1,28 @@
package eu.dnetlib.ariadneplus.publisher;
/**
* Created by Alessia Bardi on 29/08/2017.
*
* @author Alessia Bardi
*/
public class AriadnePlusPublisherException extends Exception{
public AriadnePlusPublisherException() {
}
public AriadnePlusPublisherException(final String message) {
super(message);
}
public AriadnePlusPublisherException(final String message, final Throwable cause) {
super(message, cause);
}
public AriadnePlusPublisherException(final Throwable cause) {
super(cause);
}
public AriadnePlusPublisherException(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}

View File

@ -0,0 +1,97 @@
package eu.dnetlib.ariadneplus.publisher;
import java.io.IOException;
import java.net.URISyntaxException;
import eu.dnetlib.ariadneplus.jrr.JRRPublisher;
import eu.dnetlib.ariadneplus.virtuoso.VirtuosoClient;
import eu.dnetlib.ariadneplus.virtuoso.VirtuosoClientFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* Created by Alessia Bardi on 11/08/2017.
*
* @author Alessia Bardi
*/
@Component
public class AriadnePlusPublisherHelper {
private static final Log log = LogFactory.getLog(AriadnePlusPublisherHelper.class);
public enum AriadnePlusTargets{
VIRTUOSO, JRR
}
@Autowired
private VirtuosoClientFactory virtuosoClientFactory;
@Autowired
private JRRPublisher jrrPublisher;
public void publish(final String record, final AriadnePlusTargets target) throws AriadnePlusPublisherException {
switch(target){
case VIRTUOSO:
publishVirtuoso(record);
break;
case JRR:
try {
publishJRR(record);
break;
} catch(IOException | URISyntaxException | InterruptedException e){
throw new AriadnePlusPublisherException(e);
}
default: throw new AriadnePlusPublisherException("Target "+target+" not supported yet");
}
}
public long unpublish(final String datasourceInterface, final AriadnePlusTargets target) throws AriadnePlusPublisherException {
long res = 0;
switch(target){
case VIRTUOSO:
res = unpublishVirtuoso(datasourceInterface);
break;
default: throw new AriadnePlusPublisherException("Target "+target+" not supported yet");
}
return res;
}
private void publishVirtuoso(final String record) throws AriadnePlusPublisherException {
log.debug("Publishing on virtuoso");
VirtuosoClient virtuosoClient = this.virtuosoClientFactory.getVirtuosoClient();
virtuosoClient.feed(record);
}
private void publishJRR(final String record)
throws AriadnePlusPublisherException, IOException, URISyntaxException, InterruptedException {
log.debug("Publishing on JRR (registry and catalogue)");
jrrPublisher.register(record);
}
private int unpublishJRR(final String datasourceInterface){
//TODO: for this to work we have to add somewhere the information about the dsInterface from which the resource was initially collected
//Note that this method might not be a good idea if we want to keep the uuid and only update the facets/rels
//maybe it is worth to implement the incremental in the ResourceRegistrator. We slow down things, but it may be worthy...
log.debug("Unpublishing from registry "+datasourceInterface);
//TODO: implement me
throw new UnsupportedOperationException("Not implemented yet");
}
private long unpublishVirtuoso(final String datasourceInterface) {
log.info("Unpublishing from virtuoso "+datasourceInterface);
VirtuosoClient virtuosoClient = this.virtuosoClientFactory.getVirtuosoClient();
long deletedTriples = virtuosoClient.drop(datasourceInterface);
log.info("# triples deleted for "+datasourceInterface+": "+deletedTriples);
return deletedTriples;
}
public void dropRegistry(){
log.debug("Dropping JRR");
//TODO: implement me
throw new UnsupportedOperationException("Not implemented yet");
}
}

View File

@ -0,0 +1,178 @@
package eu.dnetlib.ariadneplus.publisher;
import java.io.StringReader;
import java.util.Map;
import java.util.Map.Entry;
import javax.xml.transform.sax.SAXSource;
import com.google.common.collect.Maps;
import net.sf.saxon.s9api.*;
import net.sf.saxon.s9api.Serializer.Property;
import org.springframework.stereotype.Component;
import org.xml.sax.InputSource;
/**
* Created by alessia on 10/03/17.
*/
@Component
public class SaxonHelper {
private Processor xmlProcessor = new Processor(false);
public Helper help(){
return new Helper();
}
public class Helper{
private Serializer serializer;
Helper() {
this.serializer = xmlProcessor.newSerializer();
serializer.setOutputProperty(Property.METHOD, "xml");
serializer.setOutputProperty(Property.INDENT, "yes");
}
public Helper setSerializerProperty(Property p, String value){
serializer.setOutputProperty(p, value);
return this;
}
public XdmNode parseXML(final String xmlSource) throws SaxonApiException {
SAXSource source = new SAXSource(new InputSource(new StringReader(xmlSource)));
DocumentBuilder docBuilder = xmlProcessor.newDocumentBuilder();
return docBuilder.build(source);
}
/**
* Evaluate the given xpath on the given XML source.
*
* @param xmlSource XML source string
* @param xpath the xpath to evaluate
* @param namespaces the map of namespaces to be declared to evaluate the xpath
* @return an XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
*/
public XdmItem evaluateSingle(final String xmlSource, final String xpath, final Map<String, String> namespaces) throws SaxonApiException {
XPathSelector xpathSelector = prepareXPathSelector(xpath, namespaces);
return evaluateSingle(xmlSource, xpathSelector);
}
/**
* Applies the given xpath selector on the given XML source.
*
* @param xmlSource XML source string
* @param xpathSelector the configured xpath selector to apply
* @return an XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
*/
public XdmItem evaluateSingle(final String xmlSource, final XPathSelector xpathSelector) throws SaxonApiException {
XdmNode xdmNode = parseXML(xmlSource);
xpathSelector.setContextItem(xdmNode);
return xpathSelector.evaluateSingle();
}
/**
* Get an XPathSelector for the given xpath and namespaces.
* @param xpath the xpath
* @param namespaces the map of namespaces to be declared to evaluate the xpath
* @return XPathSelector
* @throws SaxonApiException
*/
public XPathSelector prepareXPathSelector(final String xpath,final Map<String, String> namespaces) throws SaxonApiException {
XPathCompiler compiler = xmlProcessor.newXPathCompiler();
for (Entry<String, String> ns : namespaces.entrySet()) {
compiler.declareNamespace(ns.getKey(), ns.getValue());
}
XPathExecutable xpathExecutable = compiler.compile(xpath);
XPathSelector xpathSelector = xpathExecutable.load();
return xpathSelector;
}
/**
* Get an XPathSelector for the given xpath and namespaces.
* @param xpath the xpath
* @param nsPrefix namespace prefix
* @param ns namespace URI
* @return XPathSelector
* @throws SaxonApiException
*/
public XPathSelector prepareXPathSelector(final String xpath,final String nsPrefix, final String ns) throws SaxonApiException {
Map<String, String> map = Maps.newHashMap();
map.put(nsPrefix, ns);
return prepareXPathSelector(xpath, map);
}
/**
* Evaluate the given xpath on the given XML source.
* @param xmlSource XML source string
* @param xpath the xpath to evaluate
* @param nsPrefix namespace prefix
* @param ns namespace URI
* @return an XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
* @throws SaxonApiException
*
*/
public XdmItem evaluateSingle(final String xmlSource, final String xpath, final String nsPrefix, final String ns) throws SaxonApiException {
Map<String, String> map = Maps.newHashMap();
map.put(nsPrefix, ns);
return evaluateSingle(xmlSource, xpath, map);
}
/**
* Evaluate the given xpath on the given XML source.
*
* @param xmlSource XML source string
* @param xpath the xpath to evaluate. xpath must evaluate to an xdmNode
* @param namespaces the map of namespaces to be declared to evaluate the xpath
* @return the XML serialization as string of the XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
* @throws ClassCastException if xpath is not evaluated to a node.
*/
public String evaluateSingleAsString(final String xmlSource, final String xpath, final Map<String, String> namespaces) throws SaxonApiException {
XdmItem item = evaluateSingle(xmlSource, xpath, namespaces);
if(item != null){
XdmNode node = (XdmNode) item;
return serializer.serializeNodeToString(node);
}
else return null;
}
/**
* Applies the given xpath selector on the given XML source.
*
* @param xmlSource XML source string
* @param xpathSelector the configured xpath selector to apply
* @return the XML serialization as string of the XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
* @throws ClassCastException if xpath is not evaluated to a node.
*/
public String evaluateSingleAsString(final String xmlSource, final XPathSelector xpathSelector) throws SaxonApiException {
XdmItem item = evaluateSingle(xmlSource, xpathSelector);
if(item != null){
XdmNode node = (XdmNode) item;
return serializer.serializeNodeToString(node);
}
else return null;
}
/**
* Evaluate the given xpath on the given XML source.
*
* @param xmlSource XML source string
* @param xpath the xpath to evaluate. xpath must evaluate to an xdmNode
* @param nsPrefix namespace prefix
* @param ns namespace URI
* @return the XML serialization as string of the XdmItem resulting from the evaluation of the xpath. Returns null if nothing matches.
* @throws ClassCastException if xpath is not evaluated to a node.
*/
public String evaluateSingleAsString(final String xmlSource, final String xpath, final String nsPrefix, final String ns) throws SaxonApiException {
Map<String, String> map = Maps.newHashMap();
map.put(nsPrefix, ns);
return evaluateSingleAsString(xmlSource, xpath, map);
}
}
}

View File

@ -0,0 +1,98 @@
package eu.dnetlib.ariadneplus.rdf;
import java.util.Map;
import javax.annotation.PostConstruct;
import eu.dnetlib.ariadneplus.publisher.SaxonHelper;
import net.sf.saxon.s9api.SaxonApiException;
import net.sf.saxon.s9api.Serializer;
import net.sf.saxon.s9api.XPathSelector;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jena.ext.com.google.common.collect.Maps;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* Created by Alessia Bardi on 15/03/2018.
*
* @author Alessia Bardi
*/
@Component
public class RecordParserHelper {
private static final Log log = LogFactory.getLog(RecordParserHelper.class);
public static final String OAI_NAMESPACE_URI = "http://www.openarchives.org/OAI/2.0/";
public static final String DRI_NAMESPACE_URI = "http://www.driver-repository.eu/namespace/dri";
public static final String RDF_NAMESPACE_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
@Autowired
private SaxonHelper saxonHelper;
private XPathSelector xpathSelectorObjIdentifier;
private XPathSelector xpathSelectorCollectionDate;
private XPathSelector xpathSelectorTransformationDate;
private XPathSelector xpathSelectorDatasourceName;
private XPathSelector xpathSelectorDatasourceApi;
private XPathSelector xpathSelectorRDF;
@PostConstruct
public void init() throws SaxonApiException {
prepareXpathSelectors();
}
public String getCollectionDate(final String record) {
return extractFromRecord(record, xpathSelectorCollectionDate);
}
public String getTransformationDate(final String record) {
return extractFromRecord(record, xpathSelectorTransformationDate);
}
public String getDatasourceName(final String record) {
return extractFromRecord(record, xpathSelectorDatasourceName);
}
public String getDatasourceApi(final String record) {
return extractFromRecord(record, xpathSelectorDatasourceApi);
}
public String getObjIdentifier(final String record) {
return extractFromRecord(record, xpathSelectorObjIdentifier);
}
public String getRDF(final String record) {
return extractFromRecord(record, xpathSelectorRDF);
}
private String extractFromRecord(final String record, final XPathSelector xPathSelector) {
try {
return this.saxonHelper.help().setSerializerProperty(Serializer.Property.OMIT_XML_DECLARATION, "yes").evaluateSingleAsString(record, xPathSelector);
} catch (SaxonApiException e) {
log.error(e);
throw new RuntimeException("Cannot extract content from path "+ xPathSelector.toString(), e);
}
}
private void prepareXpathSelectors() throws SaxonApiException {
Map<String, String> namespaces = Maps.newHashMap();
namespaces.put("oai", OAI_NAMESPACE_URI);
namespaces.put("dri", DRI_NAMESPACE_URI);
namespaces.put("rdf", RDF_NAMESPACE_URI);
xpathSelectorObjIdentifier = this.saxonHelper.help().prepareXPathSelector("//oai:header/dri:objIdentifier/text()", namespaces);
xpathSelectorCollectionDate = this.saxonHelper.help().prepareXPathSelector("//oai:header/dri:dateOfCollection/text()", namespaces);
xpathSelectorTransformationDate = this.saxonHelper.help().prepareXPathSelector("//oai:header/dri:dateOfTransformation/text()", namespaces);
xpathSelectorDatasourceName = this.saxonHelper.help().prepareXPathSelector("//oai:header/dri:datasourcename/text()", namespaces);
xpathSelectorDatasourceApi = this.saxonHelper.help().prepareXPathSelector("//oai:header/dri:datasourceapi/text()", namespaces);
xpathSelectorRDF = this.saxonHelper.help().prepareXPathSelector("//oai:metadata/rdf:RDF", namespaces);
}
public SaxonHelper getSaxonHelper() {
return saxonHelper;
}
public void setSaxonHelper(final SaxonHelper saxonHelper) {
this.saxonHelper = saxonHelper;
}
}

View File

@ -0,0 +1,460 @@
package eu.dnetlib.ariadneplus.rdf;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import com.google.common.collect.Iterators;
import com.google.common.collect.Lists;
import eu.dnetlib.ariadneplus.CRM;
import eu.dnetlib.ariadneplus.CRMpe;
import eu.dnetlib.ariadneplus.catalogue.CatalogueLicense;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jena.assembler.AssemblerHelp;
import org.apache.jena.rdf.model.*;
import org.apache.jena.vocabulary.RDF;
import org.apache.jena.vocabulary.RDFS;
import org.springframework.stereotype.Component;
/**
* Created by Alessia Bardi on 11/12/2017.
*
* @author Alessia Bardi
*/
@Component
public class ResourceReader {
private static final Log log = LogFactory.getLog(ResourceReader.class);
//sparql template for services include <availability> field that is not explicit in the model
private Property availibilityProperty = ResourceFactory.createProperty("","availability");
//sparql template for services include <activitytype> field that is not explicit in the model
private Property activitytypeProperty = ResourceFactory.createProperty("","activitytype");
//sparql template for datasets include <encoding> field that is generated from the creation event
private Property encodingProperty = ResourceFactory.createProperty("","encoding");
//sparql template for datasets include <used_software> field that is generated from the creation event
private Property usedSoftwareProperty = ResourceFactory.createProperty("","used_software");
//sparql template for software include <usedby> field that is generated from the creation event of the resource using the software
private Property usedByProperty = ResourceFactory.createProperty("","usedby");
//sparql template for datasets include <creator> field that is generated from the creation event
private Property creatorProperty = ResourceFactory.createProperty("","creator");
//sparql template for software include <creationtime> field that is generated from the creation event
private Property creationtimeProperty = ResourceFactory.createProperty("","creationtime");
public String getTitle(final Resource resource) {
final Statement s = resource.getProperty(CRM.P102_has_title);
if (s != null) {
RDFNode obj = s.getObject();
if(obj.isLiteral()) return obj.asLiteral().getLexicalForm();
}
//if we do not find the crm:P102_has_title, let's get the label
return getLabel(resource);
}
public String getLabel(final Resource resource) {
if(resource == null) return "";
if (resource.hasProperty(RDFS.label)) {
return resource.getProperty(RDFS.label).getString().replace("'", "\'");
} else return "";
}
public Iterator<String> getDescriptions(final Resource resource) {
StmtIterator it = resource.listProperties(CRM.P3_has_note);
return Iterators.transform(it, f -> f.getString().replace("'", "\'"));
}
//NOTE: based on the sparql templates competency is a string, in the model it is a PE36_Competency_Type
public Iterator<String> getCompetences(final Resource resource) {
StmtIterator it = resource.listProperties(CRMpe.PP45_has_competency);
return Iterators.transform(it, f -> f.getString());
}
public String getAvailability(final Resource resource) {
String availability = "";
if (resource.hasProperty(availibilityProperty)){
availability = resource.getProperty(availibilityProperty).getString();
}
return availability;
}
public String getConditionOfUse(final Resource resource) {
StmtIterator it = resource.listProperties(CRM.P16_used_specific_object);
while(it.hasNext()){
Resource obj = it.next().getResource();
if(obj.hasProperty(RDF.type, CRM.E30_Right) && obj.hasProperty(CRM.P3_has_note)){
String rightsString = obj.getProperty(CRM.P3_has_note).getString();
if(obj.hasProperty(CRM.P2_has_type)){
Resource rightType = obj.getPropertyResourceValue(CRM.P2_has_type);
rightsString += " ["+getLabel(rightType)+"]";
}
return rightsString;
}
}
return "";
}
public CatalogueLicense getCatalogueLicense(final Resource resource){
if(resource.hasProperty(CRM.P16_used_specific_object)) {
Resource obj = resource.getPropertyResourceValue(CRM.P16_used_specific_object);
if (obj.hasProperty(CRM.P2_has_type)) {
String license = getLabel(obj.getPropertyResourceValue(CRM.P2_has_type));
return CatalogueLicense.getCatalogueLicenseFor(license);
}
}
return CatalogueLicense.NotSpecified;
}
public Iterator<String> getRDFClassNames(final Resource resource){
StmtIterator it = resource.listProperties(RDF.type);
return Iterators.transform(it, f -> f.getResource().getLocalName());
}
public Iterator<String> getActivityTypes(final Resource resource){
StmtIterator it = resource.listProperties(activitytypeProperty);
return Iterators.transform(it, f -> f.getString());
}
public Iterator<String> getProviderNames(final Resource resource){
StmtIterator sit = resource.listProperties(CRMpe.PP2_provided_by);
StmtIterator sit2 = resource.listProperties(CRMpe.PP25_has_maintaining_RI);
return Iterators.transform(Iterators.concat(sit, sit2), f -> {
Resource provider = f.getResource();
return getTitle(provider);
});
}
public Iterator<String> getProviderUris(final Resource resource){
StmtIterator sit = resource.listProperties(CRMpe.PP2_provided_by);
StmtIterator sit2 = resource.listProperties(CRMpe.PP25_has_maintaining_RI);
return Iterators.transform(Iterators.concat(sit, sit2), f -> {
return f.getResource().getURI();
});
}
public Iterator<String> getProviderContactPoints(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP2_provided_by);
return Iterators.transform(it, f -> {
Resource provider = f.getResource();
if (provider.hasProperty(CRM.P76_has_contact_point)) {
Resource contactPoint = provider.getPropertyResourceValue(CRM.P76_has_contact_point);
return getLabel(contactPoint);
}
else return "";
});
}
public Iterator<String> getResourceDirectContactPointsURI(final Resource resource){
StmtIterator it = resource.listProperties(CRM.P76_has_contact_point);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getHostedStuff(final Resource resource){
//In inference we trust
StmtIterator sit4 = resource.listProperties(CRMpe.PP4_hosts_object);
return Iterators.transform(sit4, f -> f.getResource().getURI());
// StmtIterator sit6 = resource.listProperties(CRMpe.PP6_hosts_digital_object);
// StmtIterator sit7 = resource.listProperties(CRMpe.PP7_hosts_software_object);
// StmtIterator sit8 = resource.listProperties(CRMpe.PP8_hosts_dataset);
// Iterator<String> it4 = Iterators.transform(sit4, f -> f.getResource().getURI());
// Iterator<String> it6 = Iterators.transform(sit6, f -> f.getResource().getURI());
// Iterator<String> it7 = Iterators.transform(sit7, f -> f.getResource().getURI());
// Iterator<String> it8 = Iterators.transform(sit8, f -> f.getResource().getURI());
// return Iterators.concat(it4,it6, it7, it8);
}
public Iterator<String> getHostedBys(final Resource resource){
//In inference we trust
StmtIterator sit4 = resource.listProperties(CRMpe.PP4i_is_object_hosted_by);
return Iterators.transform(sit4, f -> f.getResource().getURI());
// StmtIterator sit6 = resource.listProperties(CRMpe.PP6i_is_digital_object_hosted_by);
// StmtIterator sit7 = resource.listProperties(CRMpe.PP7i_is_software_object_hosted_by);
// StmtIterator sit8 = resource.listProperties(CRMpe.PP8i_is_dataset_hosted_by);
// Iterator<String> it4 = Iterators.transform(sit4, f -> f.getResource().getURI());
// Iterator<String> it6 = Iterators.transform(sit6, f -> f.getResource().getURI());
// Iterator<String> it7 = Iterators.transform(sit7, f -> f.getResource().getURI());
// Iterator<String> it8 = Iterators.transform(sit8, f -> f.getResource().getURI());
// return Iterators.concat(it4, it6, it7, it8);
}
public Iterator<String> getCuratedObjects(final Resource resource){
//In inference we trust
StmtIterator sit32 = resource.listProperties(CRMpe.PP32_curates);
return Iterators.transform(sit32, f -> f.getResource().getURI());
// StmtIterator sit11 = resource.listProperties(CRMpe.PP11_curates_volatile_digital_object);
// StmtIterator sit12 = resource.listProperties(CRMpe.PP12_curates_volatile_software);
// StmtIterator sit13 = resource.listProperties(CRMpe.PP13_curates_volatile_dataset);
// Iterator<String> it32 = Iterators.transform(sit32, f -> f.getResource().getURI());
// Iterator<String> it11 = Iterators.transform(sit11, f -> f.getResource().getURI());
// Iterator<String> it12 = Iterators.transform(sit12, f -> f.getResource().getURI());
// Iterator<String> it13 = Iterators.transform(sit13, f -> f.getResource().getURI());
// return Iterators.concat(it32, it11, it12, it13);
}
public Iterator<String> getCuratorUrls(final Resource resource){
//In inference we trust
StmtIterator sit32 = resource.listProperties(CRMpe.PP32i_is_curated_by);
return Iterators.transform(sit32, f -> f.getResource().getURI());
// StmtIterator sit11 = resource.listProperties(CRMpe.PP11i_is_volatile_digital_object_curated_by);
// StmtIterator sit12 = resource.listProperties(CRMpe.PP12i_is_volatile_software_curated_by);
// StmtIterator sit13 = resource.listProperties(CRMpe.PP13i_is_volatile_dataset_curated_by);
// Iterator<String> it32 = Iterators.transform(sit32, f -> f.getResource().getURI());
// Iterator<String> it11 = Iterators.transform(sit11, f -> f.getResource().getURI());
// Iterator<String> it12 = Iterators.transform(sit12, f -> f.getResource().getURI());
// Iterator<String> it13 = Iterators.transform(sit13, f -> f.getResource().getURI());
// return Iterators.concat(it32, it11, it12, it13);
}
public Iterator<String> getResourceCuratorCurationPlans(final Resource resource) {
//In inference we trust
StmtIterator sit32 = resource.listProperties(CRMpe.PP32i_is_curated_by);
return Iterators.concat(Iterators.transform(sit32, c -> getCurationPlans(c.getResource())));
}
public Iterator<String> getDeliversOnRequest(final Resource resource){
StmtIterator sit = resource.listProperties(CRMpe.PP15_delivers_on_request);
return Iterators.transform(sit, f -> f.getResource().getURI());
}
public Iterator<String> getRunsOnRequest(final Resource resource){
StmtIterator sit = resource.listProperties(CRMpe.PP14_runs_on_request);
return Iterators.transform(sit, f -> f.getResource().getURI());
}
public Iterator<String> getAccessPoints(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP28_has_designated_access_point);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getDeclarativeTimes(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP42_has_declarative_time);
return Iterators.transform(it, f -> f.getString());
}
public Iterator<String> getProtocols(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP29_uses_access_protocol);
return Iterators.transform(it, f -> getLabel(f.getResource()));
}
public Iterator<String> getCurationPlans(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP31_uses_curation_plan);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getMemberUrls(final Resource resource){
StmtIterator it = resource.listProperties(CRM.P107_has_current_or_former_member);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> isMemberOf(final Resource resource){
StmtIterator it = resource.listProperties(CRM.P107i_is_current_or_former_member_of);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getProvidedServiceUrls(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP2i_provides);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getHasTypeLabels(final Resource resource){
StmtIterator it = resource.listProperties(CRM.P2_has_type);
return Iterators.transform(it, f -> {if(f.getObject().isLiteral()) return f.getObject().asLiteral().getString(); else return getLabel(f.getResource());});
}
public Iterator<String> getIsPartOfUrls(final Resource resource){
//in inference we trust
//StmtIterator it = resource.listProperties(CRMpe.PP23i_is_dataset_part_of);
StmtIterator it = resource.listProperties(CRM.P106i_forms_part_of);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getHasPartUrls(final Resource resource){
//in inference we trust
//StmtIterator it = resource.listProperties(CRMpe.PP23_has_dataset_part);
StmtIterator it = resource.listProperties(CRM.P106_is_composed_of);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getSubjects(final Resource resource){
StmtIterator it = resource.listProperties(CRM.P129_is_about);
return Iterators.transform( Iterators.filter(it, f -> !f.getResource().hasProperty(RDF.type, CRM.E4_Period) && !f.getResource().hasProperty(RDF.type, CRM.E52_Time_Span) && !f.getResource().hasProperty(RDF.type, CRM.E53_Place)), f -> getLabel(f.getResource()));
}
public List<String> getTemporalCoverages(final Resource resource){
List<String> temporalCoverages = getCoverages(resource, CRM.E4_Period);
temporalCoverages.addAll(getCoverageTimeSpan(resource));
return temporalCoverages;
}
public List<String> getSpatialCoverages(final Resource resource){
return getCoverages(resource, CRM.E53_Place);
}
private List<String> getCoverages(final Resource resource, final Resource coverageType){
List<String> cov = Lists.newArrayList();
StmtIterator it = resource.listProperties(CRM.P129_is_about);
while(it.hasNext()){
Resource r = it.next().getResource();
if(r.hasProperty(RDF.type, coverageType)){
cov.add(getLabel(r));
}
}
return cov;
}
private List<String> getCoverageTimeSpan(final Resource resource){
List<String> cov = Lists.newArrayList();
StmtIterator it = resource.listProperties(CRM.P129_is_about);
while(it.hasNext()){
Resource r = it.next().getResource();
if(r.hasProperty(RDF.type, CRM.E52_Time_Span)){
StmtIterator times = r.listProperties(CRM.P82_at_some_time_within);
while(times.hasNext()){
Resource t = times.next().getResource();
cov.add(t.toString());
}
}
}
return cov;
}
public Iterator<String> getEncodings(final Resource resource){
StmtIterator it = resource.listProperties(encodingProperty);
return Iterators.transform(it, f -> f.getString());
}
public Iterator<String> getCreatorsURIs(final Resource resource){
StmtIterator it = resource.listProperties(creatorProperty);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getMetadata(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP39i_has_metadata);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getDescribedDataset(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP39_is_metadata_for);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getOfferedServiceUrls(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP1_currently_offers);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public String getStartTime(final Resource resource){
Resource timespan = resource.getPropertyResourceValue(CRM.P4_has_time_span);
if(timespan != null){
if(timespan.hasProperty(CRM.P82a_begin_of_the_begin))
return timespan.getProperty(CRM.P82a_begin_of_the_begin).getString();
}
return "";
}
public String getFirstCreationTime(final Resource resource){
StmtIterator it = resource.listProperties(creationtimeProperty);
if(it.hasNext()){
return it.next().getString();
}
return "";
}
public Iterator<String> getMaintainerUrls(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP44_has_maintaining_team);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public List<String> getMaintainerContacts(final Resource resource){
List<String> res = Lists.newArrayList();
StmtIterator it = resource.listProperties(CRMpe.PP44_has_maintaining_team);
while(it.hasNext()){
Resource maintainer = it.next().getResource();
Iterator<String> itM = getResourceDirectContactPointsURI(maintainer);
while(itM.hasNext()){
res.add(itM.next());
}
}
return res;
}
public Iterator<String> getMaintainersLabels(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP44_has_maintaining_team);
return Iterators.transform(it, f -> getLabel(f.getResource()));
}
public Iterator<String> getMaintainedUrls(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP44i_is_maintaining_team_of);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getSnapshots(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP17_has_snapshot);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getIsSnapshotOfs(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP17i_is_snapshot_of);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getHasReleases(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP22_has_release);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getIsReleaseOfs(final Resource resource){
StmtIterator it = resource.listProperties(CRMpe.PP22i_is_release_of);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getUsedSoftware(final Resource resource){
StmtIterator it = resource.listProperties(usedSoftwareProperty);
return Iterators.transform(it, f -> f.getResource().getURI());
}
public Iterator<String> getUsedBy(final Resource resource){
StmtIterator it = resource.listProperties(usedByProperty);
return Iterators.transform(it, f -> f.getResource().getURI());
}
//NOTE: languages are resources in CRM but our sparql template make them strings by taking the label.
public Iterator<String> getLanguages(final Resource resource){
StmtIterator it = resource.listProperties(CRM.P72_has_language);
return Iterators.transform(it, f -> f.getString());
}
/**
* Finds the most specific type of res.
*
* @param res Resource you want to find the most specific type
* @param fallbackType Resource representing the type to return if there is no type or if we get AmbiguousSpecificTypeException
* @return Resource: the most specific type, if any. fallbackType otherwise
*/
public Resource findSpecificType(final Resource res, final Resource fallbackType) {
Resource type = fallbackType;
Set<Resource> types = AssemblerHelp.findSpecificTypes(res, fallbackType);
if (types == null || types.isEmpty()) {
log.warn("No specific type found. Returning the fallback type: " + fallbackType);
}
if (types.size() == 1) {
type = types.iterator().next();
}
if (types.size() > 1) {
log.warn("Found more than one possible specific type");
types.stream().forEach((t) -> log.warn(t));
if(types.contains(CRM.E29_Design_or_Procedure)){
log.warn("CRM.E29_Design_or_Procedure always wins");
type = CRM.E29_Design_or_Procedure;
}
else {
log.warn("Choosing the first");
type = types.iterator().next();
}
}
return type;
}
}

View File

@ -0,0 +1,197 @@
package eu.dnetlib.ariadneplus.virtuoso;
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException;
import eu.dnetlib.ariadneplus.rdf.RecordParserHelper;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jena.datatypes.xsd.XSDDatatype;
import org.apache.jena.rdf.model.*;
import virtuoso.jena.driver.VirtModel;
/**
* Created by Alessia Bardi on 12/07/2017.
*
* @author Alessia Bardi
*/
public class VirtuosoClient {
private static final Log log = LogFactory.getLog(VirtuosoClient.class);
public static final String PROVENANCE_NS = "http://www.d-net.research-infrastructures.eu/provenance/";
public static final String PROVENANCE_GRAPH = PROVENANCE_NS+"graph";
public static Property IS_API_OF = ResourceFactory.createProperty(PROVENANCE_NS, "isApiOf");
public static Property COLL_FROM = ResourceFactory.createProperty(PROVENANCE_NS, "collectedFrom");
public static Property COLL_IN_DATE = ResourceFactory.createProperty(PROVENANCE_NS, "collectedInDate");
public static Property TRANS_IN_DATE = ResourceFactory.createProperty(PROVENANCE_NS, "transformedInDate");
private RecordParserHelper recordParserHelper;
private String connectionString;
private String username;
private String password;
private String defaultBaseURI;
protected VirtuosoClient(final String connectionString,
final String username,
final String password,
final RecordParserHelper recordParserHelper,
final String defaultBaseURI) {
this.connectionString = connectionString;
this.username = username;
this.password = password;
this.recordParserHelper = recordParserHelper;
this.defaultBaseURI = defaultBaseURI;
}
//TODO: exploit new method eu.dnetlib.ariadneplus.publisher.SaxonHelper.Helper.parseXML() to avoid re-parsing the full record.
public long feed(final String record) throws AriadnePlusPublisherException{
Model md = null ;
try {
if (StringUtils.isBlank(record)) {
log.warn("Got empty record");
return 0;
}
String objIdentifier = recordParserHelper.getObjIdentifier(record);
if (StringUtils.isBlank(objIdentifier)) {
log.warn("Got record with no objIdentifier -- skipping");
return 0;
}
String rdfBlock = recordParserHelper.getRDF(record);
if (StringUtils.isBlank(rdfBlock)) {
log.warn("Missing rdf:RDF in record with objIdentifier " + objIdentifier + " all triples in that named graph will be deleted");
}
String collectionDate = recordParserHelper.getCollectionDate(record);
String transformationDate = recordParserHelper.getTransformationDate(record);
String datasource = recordParserHelper.getDatasourceName(record);
String dsInterface = recordParserHelper.getDatasourceApi(record);
String namedGraph = getRecordDefaultURI(objIdentifier, dsInterface);
log.debug("Trying to open the database model " + namedGraph+", connection string "+getConnectionString());
md = VirtModel.openDatabaseModel(namedGraph, getConnectionString(), getUsername(), getPassword());
log.debug("Opened virtuoso model for graph " + namedGraph);
md.removeAll();
log.debug("Removed all triples from graph " + namedGraph);
md.read(IOUtils.toInputStream(rdfBlock, "UTF-8"), getDefaultBaseURI());
long size = md.size();
log.debug("Graph " + namedGraph + " now has " + size + " triples");
long ntriples = feedProvenance(namedGraph, collectionDate, transformationDate, datasource, dsInterface);
log.debug("provenance graph for " + namedGraph + " updated with " + ntriples + " triples");
md.close();
return size;
}catch(Throwable e){
if (md != null && !md.isClosed()) md.close();
log.error(e);
throw new AriadnePlusPublisherException(e);
}
}
long feedProvenance(final String namedGraphURI, final String collectionDate, final String transformationDate, final String datasource, final String api) {
Model md = VirtModel.openDatabaseModel(PROVENANCE_GRAPH, getConnectionString(), getUsername(), getPassword());
Resource rApi = ResourceFactory.createResource(defaultBaseURI + api);
Resource r = ResourceFactory.createResource(namedGraphURI);
Statement stmApi =
ResourceFactory.createStatement(rApi, IS_API_OF, ResourceFactory.createPlainLiteral(datasource));
Statement stmCollFrom =
ResourceFactory.createStatement(r, COLL_FROM, rApi);
Statement stmCollDate = ResourceFactory
.createStatement(r, COLL_IN_DATE, ResourceFactory.createTypedLiteral(collectionDate, XSDDatatype.XSDdateTime));
Statement stmTransDate = ResourceFactory
.createStatement(r, TRANS_IN_DATE, ResourceFactory.createTypedLiteral(transformationDate, XSDDatatype.XSDdateTime));
//let's remove previous provenance statements for this resource:
md.removeAll(r, null, null);
//and add the new ones
md.add(stmApi).add(stmCollFrom).add(stmCollDate).add(stmTransDate);
md.close();
return 3;
}
public long feed(final Iterable<String> records) throws AriadnePlusPublisherException {
//TODO: can we do it in parallel? if all records have different objIdentifier it is safe, and this must be the case anyway, because the source of records is a D-Net mdstore.
long count = 0;
for (String r : records) count += this.feed(r);
return count;
}
/**
* Delete all triples in named graphs collected from the given api
* @param api the id of the API
* @return the number of triples deleted from the named graphs associated to the given api
*/
public long drop(final String api){
Model prov = VirtModel.openDatabaseModel(PROVENANCE_GRAPH, getConnectionString(), getUsername(), getPassword());
//look for all named graphs associated to the api
Resource rApi = ResourceFactory.createResource(defaultBaseURI + api);
long deletedTriples = 0;
final ResIterator resIterator = prov.listSubjectsWithProperty(COLL_FROM, rApi);
while (resIterator.hasNext()) {
Resource namedGraphURI = resIterator.nextResource();
//delete all triples belonging to the r named graph
deletedTriples += dropNamedGraph(namedGraphURI.getURI());
//delete the named graph from the provenance graph
prov.removeAll(namedGraphURI, null, null);
}
//delete the api from the provenance graph
prov.removeAll(null, null, rApi);
prov.removeAll(rApi, null, null);
prov.close();
return deletedTriples;
}
private long dropNamedGraph(String namedGraphURI){
Model namedGraph = VirtModel.openDatabaseModel(namedGraphURI, getConnectionString(), getUsername(), getPassword());
long deletedTriples = namedGraph.size();
namedGraph.removeAll();
namedGraph.close();
return deletedTriples;
}
private String getRecordDefaultURI(final String objIdentifier, final String datasourceApi) {
return defaultBaseURI + datasourceApi + "/" + objIdentifier;
}
public String getConnectionString() {
return connectionString;
}
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
public String getDefaultBaseURI() {
return defaultBaseURI;
}
public RecordParserHelper getRecordParserHelper() {
return recordParserHelper;
}
public void setRecordParserHelper(final RecordParserHelper recordParserHelper) {
this.recordParserHelper = recordParserHelper;
}
public void setConnectionString(final String connectionString) {
this.connectionString = connectionString;
}
public void setUsername(final String username) {
this.username = username;
}
public void setPassword(final String password) {
this.password = password;
}
public void setDefaultBaseURI(final String defaultBaseURI) {
this.defaultBaseURI = defaultBaseURI;
}
}

View File

@ -0,0 +1,75 @@
package eu.dnetlib.ariadneplus.virtuoso;
import eu.dnetlib.ariadneplus.rdf.RecordParserHelper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* Created by Alessia Bardi on 12/07/2017.
*
* @author Alessia Bardi
*/
@Component
public class VirtuosoClientFactory {
private static final Log log = LogFactory.getLog(VirtuosoClientFactory.class);
@Value("${virtuoso.connectionstring}")
private String connectionString;
@Value("${virtuoso.usr}")
private String username;
@Value("${virtuoso.pwd}")
private String password;
@Value("${virtuoso.uri.base.default}")
private String defaultBaseURI;
@Autowired
private RecordParserHelper recordParserHelper;
public VirtuosoClient getVirtuosoClient() {
log.debug("Creating VirtuosoClient for "+connectionString);
return new VirtuosoClient(connectionString, username, password, recordParserHelper, defaultBaseURI);
}
public String getConnectionString() {
return connectionString;
}
public void setConnectionString(final String connectionString) {
this.connectionString = connectionString;
}
public String getUsername() {
return username;
}
public void setUsername(final String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(final String password) {
this.password = password;
}
public String getDefaultBaseURI() {
return defaultBaseURI;
}
public void setDefaultBaseURI(final String defaultBaseURI) {
this.defaultBaseURI = defaultBaseURI;
}
public RecordParserHelper getRecordParserHelper() {
return recordParserHelper;
}
public void setRecordParserHelper(final RecordParserHelper recordParserHelper) {
this.recordParserHelper = recordParserHelper;
}
}

View File

@ -0,0 +1,171 @@
package eu.dnetlib.ariadneplus.virtuoso;
import java.io.IOException;
import java.io.OutputStream;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import com.google.common.collect.Iterators;
import com.google.common.collect.Lists;
import eu.dnetlib.ariadneplus.CRM;
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHeaders;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.apache.jena.query.ResultSet;
import org.apache.jena.sparql.engine.http.QueryEngineHTTP;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
/**
* Created by Alessia Bardi on 31/01/2018.
* Read-only API for virtuoso.
*
* //TODO: error handling (http://www.springboottutorial.com/spring-boot-exception-handling-for-rest-services)
* //TODO: pagination
* //TODO swagger documentation?
*
* @author Alessia Bardi
*/
@RestController
public class VirtuosoReadAPI {
private static final Log log = LogFactory.getLog(VirtuosoReadAPI.class);
@Value("${virtuoso.sparqlurl}")
private String sparqlUrl;
@Value("${virtuoso.pwd}")
private String username;
@Value("${virtuoso.pwd}")
private String password;
@Value("${virtuoso.uri.base.default}")
private String defaultBaseURI;
@Value("${virtuoso.connectionstring")
private String virtuosoConnectionString;
@Autowired
private Configuration freemarkerConfig;
@RequestMapping(value = "/virtuoso/apiSubjectsWithType", produces = { "application/json" }, method = RequestMethod.GET)
public List<String> getSubjectsForApiWithType(@RequestParam final String api, @RequestParam final String typeNamespace, @RequestParam final String typeName, @RequestParam final int limit, @RequestParam final int offset){
String fullTypeName = typeNamespace + typeName;
log.debug(String.format("Getting subjects of type %s for API %s limit %d offset %d", fullTypeName, api, limit, offset));
//if I add the ORDER BY the query is too slow: let's hope we are not getting the same subjects over and over again
String queryForSubjectsTemplate = "DEFINE input:inference 'ariadneplus_rules' SELECT DISTINCT ?s WHERE { GRAPH ?g {?s a <%s> .} . GRAPH dnet:graph {?g dnet:collectedFrom <%s> .}} LIMIT %d OFFSET %d";
String q = String.format(queryForSubjectsTemplate, fullTypeName, defaultBaseURI+api, limit, offset);
log.debug("SPARQL query: "+q);
final QueryEngineHTTP serviceRequest = new QueryEngineHTTP(sparqlUrl, q);
ResultSet subjects = serviceRequest.execSelect();
Iterator<String> s = Iterators.transform(subjects, qs -> qs.getResource("s").getURI());
List<String> res = Lists.newArrayList(s);
serviceRequest.close();
return res;
}
/**
* Returns the paginated list of resource URI used as subjects in the context of a given api. All subject URIs are returned, except from CRM.E55_Type and CRM.E41_Appellation.
* TODO: probably we can remove this, as it is used only for testing.
* @param api
* @param limit
* @param offset
* @return a page of URIs that are subjects in the context of a given api
*
*/
@Deprecated
@RequestMapping(value = "/virtuoso/apiSubjects", produces = { "application/json" }, method = RequestMethod.GET)
public List<String> getSubjectsForApi(@RequestParam final String api, @RequestParam final int limit, @RequestParam final int offset){
log.debug(String.format("Getting subjects for API %s, limit %d offset %d", api, limit, offset));
//if I add the ORDER BY the query is too slow: let's hope we are not getting the same subjects over and over again
String queryForSubjectsTemplate = "DEFINE input:inference 'ariadneplus_rules' SELECT DISTINCT ?s WHERE { GRAPH ?g {?s a ?t . FILTER (?t != <%s> && ?t != <%s>)} . GRAPH dnet:graph {?g dnet:collectedFrom <%s> .}} LIMIT %d OFFSET %d ";
String q = String.format(queryForSubjectsTemplate, CRM.E55_Type.getURI(), CRM.E41_Appellation.getURI(), defaultBaseURI+api, limit, offset);
log.debug("SPARQL query: "+q);
final QueryEngineHTTP serviceRequest = new QueryEngineHTTP(sparqlUrl, q);
ResultSet subjects = serviceRequest.execSelect();
Iterator<String> s = Iterators.transform(subjects, qs -> qs.getResource("s").getURI());
List<String> res = Lists.newArrayList(s);
serviceRequest.close();
return res;
}
@RequestMapping(value = "/virtuoso/subject", produces = { "application/rdf+xml", "application/xml" }, method = RequestMethod.GET)
@ResponseStatus(value = HttpStatus.OK)
public void getSubject(@RequestParam final String subjectURL, @RequestParam final String typeName, @RequestParam(name="timeout") final String timeoutMs, final OutputStream responseStream)
throws IOException, TemplateException, AriadnePlusPublisherException {
String templateName = typeName+".sparql";
Template temp = freemarkerConfig.getTemplate(templateName);
Map<String, String> values = new HashMap<>();
values.put("subjectURL", subjectURL);
StringWriter sw = new StringWriter();
temp.process(values, sw);
String q = sw.toString();
log.debug("Querying for "+subjectURL+" with query "+templateName);
sendConstructResponse(q, timeoutMs, responseStream);
}
protected void sendConstructResponse(final String query, final String timeoutMs, final OutputStream responseStream) throws IOException, AriadnePlusPublisherException {
String res = executeSparqlPost(query, timeoutMs);
IOUtils.write(res, responseStream);
}
protected String executeSparqlPost(final String query, final String timeoutMs) throws IOException, AriadnePlusPublisherException {
try (CloseableHttpClient httpclient = HttpClients.createDefault()) {
HttpPost httpPost = new HttpPost(sparqlUrl);
httpPost.setHeader(HttpHeaders.ACCEPT, "application/rdf+xml");
List<NameValuePair> nvps = Lists.newArrayList();
nvps.add(new BasicNameValuePair("query", query));
if (StringUtils.isNotBlank(timeoutMs)) {
nvps.add(new BasicNameValuePair("timeout", timeoutMs));
}
httpPost.setEntity(new UrlEncodedFormEntity(nvps));
try (CloseableHttpResponse response2 = httpclient.execute(httpPost)) {
HttpEntity entity2 = response2.getEntity();
String res = IOUtils.toString(entity2.getContent());
EntityUtils.consume(entity2);
int statusCode = response2.getStatusLine().getStatusCode();
switch(statusCode){
case 200:
return res;
case 504:
String msg = String.format("ERROR 504 on query %s", query);
throw new AriadnePlusPublisherException(msg);
default:
String errorMessage = String.format("ERROR HTTP STATUS CODE %d, REASON PHRASE: %s\n ERROR BODY: %s", statusCode, response2.getStatusLine(), res);
log.error(errorMessage);
return "";
//throw new AriadnePlusPublisherException(errorMessage);
}
}
}
}
}

View File

@ -0,0 +1,15 @@
server.contextPath = /ariadneplus
virtuoso.sparqlurl = http://localhost:8890/sparql
virtuoso.connectionstring = jdbc:virtuoso://localhost:1111
virtuoso.pwd = dba
virtuoso.usr = dba
virtuoso.uri.base.default = http://ariadneplus.d4science.org/handle/
gcube.registry.baseurl = http://registry-t-ariadneplus.d4science.org:80/resource-registry
gcube.registry.uri.base.default = http://ariadneplus.d4science.org/handle/
gcube.registry.application.name = AriadnePlusAggregator
gcube.registry.application.token =
gcube.catalogue.baseurl = https://gcat.d4science.org/gcat/
gcube.uri.resolver = https://data.d4science.org/ariadneplus_registry/

View File

@ -0,0 +1,106 @@
DEFINE input:inference 'ariadneplus_rules'
CONSTRUCT {
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
<${subjectURL}> crm:P102_has_title ?title .
<${subjectURL}> crm:P3_has_note ?description .
<${subjectURL}> a ?type .
<${subjectURL}> rdfs:label ?label .
<${subjectURL}> crm:P129_is_about ?about .
?about a ?aboutType .
?about rdfs:label ?aboutLabel .
<${subjectURL}> crm:P2_has_type ?e55TypeLabel .
<${subjectURL}> crmpe:PP7i_is_software_object_hosted_by ?host .
<${subjectURL}> crmpe:PP32i_is_curated_by ?curatingService .
<${subjectURL}> crmpe:PP17_has_snapshot ?snapshot1 .
<${subjectURL}> crmpe:PP17i_is_snapshot_of ?snapshot2 .
<${subjectURL}> crmpe:PP21_has_software_part ?sw1 .
<${subjectURL}> crmpe:PP21i_is_software_part_of ?sw2 .
<${subjectURL}> crmpe:PP22_has_release ?sw3 .
<${subjectURL}> crmpe:PP22i_is_release_of ?sw4 .
<${subjectURL}> <usedby> ?adopter .
<${subjectURL}> <creationtime> ?creationtime .
}
WHERE {
<${subjectURL}> a crmdig:D14_Software .
<${subjectURL}> a ?type .
{
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
}
UNION
{
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
?titleRes a crm:E41_Appellation .
?titleRes rdfs:label ?title .
}
UNION{
<${subjectURL}> crm:P3_has_note ?description .
}
UNION{
<${subjectURL}> rdfs:label ?label .
}
UNION {
<${subjectURL}> crm:P2_has_type ?e55Type .
?e55Type rdfs:label ?e55TypeLabel .
}
UNION{
<${subjectURL}> crm:P129_is_about ?about .
?about a ?aboutType .
?about rdfs:label ?aboutLabel .
}
UNION{<${subjectURL}> crmpe:PP7i_is_software_object_hosted_by ?host . }
UNION{?host crmpe:PP7_hosts_software_object <${subjectURL}> . }
UNION{<${subjectURL}> crmpe:PP32i_is_curated_by ?curatingService .}
UNION{?curatingService crmpe:PP32_curates <${subjectURL}> .}
UNION{
<${subjectURL}> crmpe:PP32i_is_curated_by ?curatingService .
?curatingService crmpe:PP31_uses_curation_plan ?curationplan .
}
UNION{
?curatingService crmpe:PP32_curates <${subjectURL}> .
?curatingService crmpe:PP31_uses_curation_plan ?curationplan .
}
UNION{<${subjectURL}> crmpe:PP17_has_snapshot ?snapshot1 .}
UNION{ ?snapshot1 crmpe:PP17i_is_snapshot_of <${subjectURL}> .}
UNION{<${subjectURL}> crmpe:PP17i_is_snapshot_of ?snapshot2 .}
UNION{ ?snapshot2 crmpe:PP17_has_snapshot <${subjectURL}> .}
UNION{<${subjectURL}> crmpe:PP21_has_software_part ?sw1 .}
UNION{?sw1 crmpe:PP21i_is_software_part_of <${subjectURL}>.}
UNION{ ?sw2 crmpe:PP21_has_software_part <${subjectURL}> .}
UNION{<${subjectURL}> crmpe:PP21i_is_software_part_of ?sw2 .}
UNION{<${subjectURL}> crmpe:PP22_has_release ?sw3 .}
UNION{?sw3 crmpe:PP22i_is_release_of <${subjectURL}> .}
UNION{<${subjectURL}> crmpe:PP22i_is_release_of ?sw4 .}
UNION{?sw4 crmpe:PP22_has_release <${subjectURL}> .}
UNION{
?adopter crm:P94i_was_created_by ?event .
?event crmdig:L23_used_software_or_firmware <${subjectURL}> .
}
UNION {
<${subjectURL}> crmdig:L23i_was_software_or_firmware_used_by ?event .
?adopter crm:P94i_was_created_by ?event .
}
UNION{
<${subjectURL}> crm:P94i_was_created_by ?event1 .
?event1 crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/creation> .
?event1 crm:P4_has_time-span ?timespan .
?timespan crm:P81_ongoing_throughout ?creationtime .
}
}
LIMIT 1000

View File

@ -0,0 +1,51 @@
DEFINE input:inference 'ariadneplus_rules'
CONSTRUCT {
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
<${subjectURL}> crm:P102_has_title ?title .
<${subjectURL}> crm:P3_has_note ?description .
<${subjectURL}> a ?type .
<${subjectURL}> rdfs:label ?label .
<${subjectURL}> crm:P2_has_type ?e55TypeLabel .
<${subjectURL}> <usedby> ?adopter .
<${subjectURL}> <creationtime> ?creationtime .
}
WHERE {
<${subjectURL}> a crm:E29_Design_or_Procedure .
<${subjectURL}> a ?type .
{
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
}
UNION
{
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
?titleRes a crm:E41_Appellation .
?titleRes rdfs:label ?title .
}
UNION{
<${subjectURL}> crm:P3_has_note ?description .
}
UNION{
<${subjectURL}> rdfs:label ?label .
}
UNION {
<${subjectURL}> crm:P2_has_type ?e55Type .
?e55Type rdfs:label ?e55TypeLabel .
}
UNION {
?adopter crmpe:PP31_uses_curation_plan <${subjectURL}> .
}
UNION{
<${subjectURL}> crm:P94i_was_created_by ?event1 .
?event1 crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/creation> .
?event1 crm:P4_has_time-span ?timespan .
?timespan crm:P81_ongoing_throughout ?creationtime .
}
}

View File

@ -0,0 +1,68 @@
DEFINE input:inference 'ariadneplus_rules'
CONSTRUCT {
<${subjectURL}> rdfs:label ?label .
<${subjectURL}> a ?type .
<${subjectURL}> crm:P2_has_type ?e55TypeLabel .
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
<${subjectURL}> crm:P102_has_title ?title .
<${subjectURL}> crm:P3_has_note ?description .
<${subjectURL}> crm:P76_has_contact_point ?contactpoint .
?contactpoint crm:P2_has_type ?contactpointType .
?contactpoint rdfs:label ?contactpointLabel .
?contactpointType rdfs:label ?contactpointTypeLabel .
<${subjectURL}> crm:P107_has_current_or_former_member ?member1 .
<${subjectURL}> crm:P107i_is_current_or_former_member_of ?team .
<${subjectURL}> crmpe:PP2i_provides ?service .
<${subjectURL}> crmpe:PP44i_is_maintaining_team_of ?maintained .
}
WHERE {
<${subjectURL}> a crm:E39_Actor .
<${subjectURL}> a ?type .
{
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
}
UNION
{
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
?titleRes a crm:E41_Appellation .
?titleRes rdfs:label ?title .
}
UNION{ <${subjectURL}> crm:P3_has_note ?description .}
UNION{ <${subjectURL}> rdfs:label ?label .}
UNION {
<${subjectURL}> crm:P2_has_type ?e55Type .
?e55Type rdfs:label ?e55TypeLabel .
}
UNION{
<${subjectURL}> crm:P76_has_contact_point ?contactpoint .
}
UNION{
<${subjectURL}> crm:P76_has_contact_point ?contactpoint .
?contactpoint rdfs:label ?contactpointLabel .
}
UNION{
<${subjectURL}> crm:P76_has_contact_point ?contactpoint .
?contactpoint crm:P2_has_type ?contactpointType .
?contactpointType rdfs:label ?contactpointTypeLabel .
}
UNION{ <${subjectURL}> crm:P107_has_current_or_former_member ?member1 .}
UNION{ ?member1 crm:P107_has_current_or_former_member <${subjectURL}> .}
UNION{ <${subjectURL}> crm:P107i_is_current_or_former_member_of ?team .}
UNION{ ?team crm:P107_has_current_or_former_member <${subjectURL}> .}
UNION{ <${subjectURL}> crmpe:PP2i_provides ?service .}
UNION{ ?service crmpe:PP2_provided_by <${subjectURL}> .}
UNION{ <${subjectURL}> crmpe:PP44i_is_maintaining_team_of ?maintained .}
UNION{ ?maintained crmpe:PP44_has_maintaining_team <${subjectURL}> .}
}

View File

@ -0,0 +1,73 @@
DEFINE input:inference 'ariadneplus_rules'
CONSTRUCT {
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
<${subjectURL}> crm:P102_has_title ?title .
<${subjectURL}> crm:P3_has_note ?description .
<${subjectURL}> a ?type .
<${subjectURL}> rdfs:label ?label .
<${subjectURL}> crm:P129_is_about ?about .
?about a ?aboutType .
?about rdfs:label ?aboutLabel .
<${subjectURL}> crm:P2_has_type ?e55TypeLabel .
<${subjectURL}> crm:P46_is_composed_of ?Col_Part .
<${subjectURL}> crmpe:PP4i_is_object_hosted_by ?host_serv .
<${subjectURL}> crmpe:PP32i_is_curated_by ?curator .
<${subjectURL}> <creator> ?creator .
<${subjectURL}> crm:P72_has_language ?languageLabel .
}
WHERE {
<${subjectURL}> a crm:E78_Collection .
<${subjectURL}> a ?type .
{
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
}
UNION
{
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
?titleRes a crm:E41_Appellation .
?titleRes rdfs:label ?title .
}
UNION{
<${subjectURL}> crm:P3_has_note ?description .
}
UNION{
<${subjectURL}> rdfs:label ?label .
}
UNION{
<${subjectURL}> crm:P129_is_about ?about .
?about a ?aboutType .
?about rdfs:label ?aboutLabel .
}
UNION {
<${subjectURL}> crm:P2_has_type ?e55Type .
?e55Type rdfs:label ?e55TypeLabel .
}
UNION{ <${subjectURL}> crm:P46_is_composed_of ?Col_Part .}
UNION{ ?Col_Part crm:P46i_forms_part_of <${subjectURL}> .}
UNION{ <${subjectURL}> crmpe:PP4i_is_object_hosted_by ?host_serv .}
UNION{ <${subjectURL}> crmpe:PP32i_is_curated_by ?curator .}
UNION{ ?host_serv crmpe:PP4_hosts_object <${subjectURL}> .}
UNION{ ?curator crmpe:PP32_curates <${subjectURL}> .}
UNION {
<${subjectURL}> crm:P94i_was_created_by ?Creation_event .
?Creation_event crm:P14_carried_out_by ?creator .
}
UNION {
<${subjectURL}> crm:P72_has_language ?language .
?language rdfs:label ?languageLabel .
}
} LIMIT 30000

View File

@ -0,0 +1,138 @@
DEFINE input:inference 'ariadneplus_rules'
CONSTRUCT {
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
<${subjectURL}> crm:P102_has_title ?title .
<${subjectURL}> crm:P3_has_note ?description .
<${subjectURL}> a ?type .
<${subjectURL}> rdfs:label ?label .
<${subjectURL}> crm:P129_is_about ?about .
?about a ?aboutType .
?about rdfs:label ?aboutLabel .
<${subjectURL}> crm:P2_has_type ?e55TypeLabel .
<${subjectURL}> crmpe:PP8i_is_dataset_hosted_by ?host .
<${subjectURL}> crmpe:PP32i_is_curated_by ?curator .
<${subjectURL}> crm:P106i_forms_part_of ?container .
<${subjectURL}> crm:P106_is_composed_of ?d3 .
<${subjectURL}> crmpe:PP39_is_metadata_for ?anotherdataset .
<${subjectURL}> crmpe:PP39i_has_metadata ?metadata .
<${subjectURL}> crmpe:PP17i_is_snapshot_of ?snapshotted .
<${subjectURL}> crmpe:PP17_has_snapshot ?snapshot .
<${subjectURL}> <encoding> ?encoding_label .
<${subjectURL}> <used_software> ?sw .
<${subjectURL}> <creator> ?creator .
<${subjectURL}> <creationtime> ?creationtime .
<${subjectURL}> <updatetime> ?updatetime .
<${subjectURL}> <custodytime> ?custodytime .
<${subjectURL}> <custodialhistorynote> ?custodialhistoryNote .
<${subjectURL}> <curationtime> ?curationtime .
<${subjectURL}> crm:P72_has_language ?languageLabel .
}
WHERE {
<${subjectURL}> a crmpe:PE18_Dataset .
<${subjectURL}> a ?type .
{
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
}
UNION
{
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
?titleRes a crm:E41_Appellation .
?titleRes rdfs:label ?title .
}
UNION{
<${subjectURL}> crm:P3_has_note ?description .
}
UNION{
<${subjectURL}> rdfs:label ?label .
}
UNION{
<${subjectURL}> crm:P129_is_about ?about .
?about a ?aboutType .
?about rdfs:label ?aboutLabel .
}
UNION {
<${subjectURL}> crm:P2_has_type ?e55Type .
?e55Type rdfs:label ?e55TypeLabel .
}
UNION{ <${subjectURL}> crmpe:PP8i_is_dataset_hosted_by ?host . }
UNION{ ?host crmpe:PP8_hosts_dataset <${subjectURL}> . }
UNION{ <${subjectURL}> crmpe:PP32i_is_curated_by ?curator .}
UNION{ ?curator crmpe:PP32_curates <${subjectURL}> .}
UNION{ <${subjectURL}> crmpe:PP32i_is_curated_by ?curator .}
UNION{ ?curator crmpe:PP32_curates <${subjectURL}> .}
UNION{ <${subjectURL}> crmpe:PP31_uses_curation_plan ?curationplan .}
UNION{ <${subjectURL}> crm:P106i_forms_part_of ?container .}
UNION{ ?container crm:P106_is_composed_of <${subjectURL}> .}
UNION{ <${subjectURL}> crm:P106_is_composed_of ?d3 .}
UNION{ ?d3 crm:P106i_forms_part_of <${subjectURL}> .}
UNION{ <${subjectURL}> crmpe:PP39_is_metadata_for ?anotherdataset .}
UNION{ ?anotherdataset crmpe:PP39i_has_metadata <${subjectURL}> .}
UNION{ <${subjectURL}> crmpe:PP39i_has_metadata ?metadata .}
UNION{ ?metadata crmpe:PP39_is_metadata_for <${subjectURL}> .}
UNION{ <${subjectURL}> crmpe:PP17_has_snapshot ?snapshot .}
UNION{ ?snapshot crmpe:PP17i_is_snapshot_of <${subjectURL}> .}
UNION{ <${subjectURL}> crmpe:PP17i_is_snapshot_of ?snapshotted .}
UNION{ ?snapshotted crmpe:PP17_has_snapshot <${subjectURL}> .}
UNION{
<${subjectURL}> crm:P94i_was_created_by ?Creation_event .
?Creation_event crm:P33_used_specific_technique ?technique .
?technique crm:P2_has_type ?techniquetype .
?techniquetype rdfs:label ?encoding_label .
}
UNION{
<${subjectURL}> crm:P94i_was_created_by ?Creation_event .
?Creation_event crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/creation> .
?Creation_event crmdig:L23_used_software_or_firmware ?sw .
}
UNION{
<${subjectURL}> crm:P94i_was_created_by ?Creation_event .
?Creation_event crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/creation> .
?Creation_event crm:P14_carried_out_by ?creator .
}
UNION{
<${subjectURL}> crm:P94i_was_created_by ?event1 .
?event1 crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/creation> .
?event1 crm:P4_has_time-span ?timespan .
?timespan crm:P81_ongoing_throughout ?creationtime .
}
UNION{
<${subjectURL}> crm:P94i_was_created_by ?updateEvent .
?updateEvent crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/update> .
?updateEvent crm:P4_has_time-span ?timespanUpdate .
?timespanUpdate crm:P82_at_some_time_within ?updatetime .
}
UNION{
<${subjectURL}> crm:P94i_was_created_by ?custodialhistory .
?custodialhistory crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/custodialhistory> .
?custodialhistory crm:P3_has_note ?custodialhistoryNote .
}
UNION{
<${subjectURL}> crm:P94i_was_created_by ?custodialhistory .
?custodialhistory crm:P2_has_type <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/eventtype/custodialhistory> .
?custodialhistory crm:P4_has_time-span ?timespanCustody .
?timespanCustody crm:P82_at_some_time_within ?custodytime .
}
UNION {
<${subjectURL}> ?hasCurationActivity ?curationActivity .
?curationActivity a crm:E87_Curation_Activity .
?curationActivity crm:P4_has_time-span ?curationActivitytimespan .
?curationActivitytimespan crm:P82_at_some_time_within ?curationtime .
}
UNION {
<${subjectURL}> crm:P72_has_language ?language .
?language rdfs:label ?languageLabel .
}
}

View File

@ -0,0 +1,148 @@
DEFINE input:inference 'ariadneplus_rules'
CONSTRUCT {
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
<${subjectURL}> crm:P102_has_title ?title .
<${subjectURL}> crm:P3_has_note ?description .
<${subjectURL}> rdfs:label ?label .
<${subjectURL}> a ?type .
<${subjectURL}> crm:P2_has_type ?atypeLabel .
<${subjectURL}> crmpe:PP2_provided_by ?provider .
?provider crm:P1_is_identified_by ?providerTitle .
?provider rdfs:label ?providerLabel .
?provider crm:P3_has_note ?providerDescr .
?provider crm:P76_has_contact_point ?contactpoint .
?contactpoint crm:P2_has_type ?contactpointType .
?contactpoint rdfs:label ?contactpointLabel .
?contactpointType rdfs:label ?contactpointTypeLabel .
<${subjectURL}> crmpe:PP4_hosts_object ?object .
<${subjectURL}> crmpe:PP28_has_designated_access_point ?accesspoint .
<${subjectURL}> crmpe:PP1i_is_currently_offered_by ?offerer .
<${subjectURL}> crmpe:PP45_has_competency ?competenceLabel .
<${subjectURL}> crmpe:PP31_uses_curation_plan ?curationplan .
<${subjectURL}> crmpe:PP29_uses_access_protocol ?protocol .
?protocol rdfs:label ?protocolLabel .
<${subjectURL}> crmpe:PP32_curates ?object2 .
<${subjectURL}> crmpe:PP15_delivers_on_request ?delivered .
<${subjectURL}> crmpe:PP14_runs_on_request ?ran .
<${subjectURL}> crmpe:PP42_has_declarative_time ?declTime .
<${subjectURL}> <availability> ?availabilityLabel .
<${subjectURL}> <activitytype> ?activitytypeLabel .
<${subjectURL}> crm:P16_used_specific_object ?Conditions_of_Use .
?Conditions_of_Use a crm:E30_Right .
?Conditions_of_Use crm:P3_has_note ?Conditions_of_Use_Note .
?Conditions_of_Use crm:P2_has_type ?Conditions_of_Use_Type .
?Conditions_of_Use_Type rdfs:label ?Conditions_of_Use_Type_label .
}
WHERE {
<${subjectURL}> a crmpe:PE1_Service .
<${subjectURL}> a ?type .
{
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
}
UNION
{
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
?titleRes a crm:E41_Appellation .
?titleRes rdfs:label ?title .
FILTER NOT EXISTS { ?titleRes a crm:E51_Contact_Point }
}
UNION{
<${subjectURL}> crm:P3_has_note ?description .
}
UNION{
<${subjectURL}> rdfs:label ?label .
}
UNION{
<${subjectURL}> crm:P2_has_type ?atype .
?atype rdfs:label ?atypeLabel .
}
UNION{
<${subjectURL}> crm:P2_has_type ?availability .
?availability rdfs:label ?availabilityLabel .
FILTER(STRSTARTS(STR(?availability), "http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/availabilitytype"))
}
UNION{
<${subjectURL}> crm:P2_has_type ?activitytype .
?activitytype rdfs:label ?activitytypeLabel .
FILTER(STRSTARTS(STR(?activitytype), "http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/activitytype"))
}
UNION {
<${subjectURL}> crmpe:PP2_provided_by ?provider .
?provider crm:P1_is_identified_by ?providerTitleRes .
?providerTitleRes rdfs:label ?providerTitle .
}
UNION {
<${subjectURL}> crmpe:PP2_provided_by ?provider .
?provider crm:P3_has_note ?providerDescr .
}
UNION {
<${subjectURL}> crmpe:PP2_provided_by ?provider .
?provider rdfs:label ?providerLabel .
}
UNION {
<${subjectURL}> crmpe:PP2_provided_by ?provider .
?provider crm:P76_has_contact_point ?contactpoint .
?contactpoint rdfs:label ?contactpointLabel .
}
UNION {
<${subjectURL}> crmpe:PP2_provided_by ?provider .
?provider crm:P76_has_contact_point ?contactpoint .
?contactpoint crm:P2_has_type ?contactpointType .
?contactpointType rdfs:label ?contactpointTypeLabel .}
UNION { <${subjectURL}> crmpe:PP28_has_designated_access_point ?accesspoint .}
UNION { ?accesspoint crmpe:PP28i_is_designated_access_point_of <${subjectURL}> .}
UNION { <${subjectURL}> crmpe:PP1i_is_currently_offered_by ?offerer .}
UNION { ?offerer crmpe:PP1_currently_offers <${subjectURL}> .}
UNION {
<${subjectURL}> crmpe:PP45_has_competency ?competence .
?competence rdfs:label ?competenceLabel .}
UNION { <${subjectURL}> crmpe:PP4_hosts_object ?object .}
UNION { ?object crmpe:PP4i_is_object_hosted_by <${subjectURL}> .}
UNION {<${subjectURL}> crmpe:PP31_uses_curation_plan ?curationplan .}
UNION { ?curationplan crmpe:PP31i_is_curation_plan_used_by <${subjectURL}> .}
UNION {
<${subjectURL}> crmpe:PP29_uses_access_protocol ?protocol .
?protocol rdfs:label ?protocolLabel .}
UNION {
?protocol crmpe:PP29i_is_access_protocol_used_by <${subjectURL}> .
?protocol rdfs:label ?protocolLabel .}
UNION { <${subjectURL}> crmpe:PP32_curates ?object2 .}
UNION { ?object2 crmpe:PP32i_is_curated_by <${subjectURL}> .}
UNION { <${subjectURL}> crmpe:PP15_delivers_on_request ?delivered .}
UNION { ?delivered crmpe:PP15i_is_delivered_by <${subjectURL}>.}
UNION { <${subjectURL}> crmpe:PP14_runs_on_request ?ran .}
UNION { ?ran crmpe:PP14i_is_run_by <${subjectURL}>.}
UNION {
<${subjectURL}> crmpe:PP42_has_declarative_time ?declTime .}
UNION {
<${subjectURL}> crm:P16_used_specific_object ?Conditions_of_Use .
?Conditions_of_Use a crm:E30_Right .
?Conditions_of_Use crm:P3_has_note ?Conditions_of_Use_Note .
}
UNION {
<${subjectURL}> crm:P16_used_specific_object ?Conditions_of_Use .
?Conditions_of_Use a crm:E30_Right .
?Conditions_of_Use crm:P2_has_type ?Conditions_of_Use_Type .
?Conditions_of_Use_Type rdfs:label ?Conditions_of_Use_Type_label .
}
}

View File

@ -0,0 +1,62 @@
DEFINE input:inference 'ariadneplus_rules'
CONSTRUCT {
<${subjectURL}> rdfs:label ?label .
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
<${subjectURL}> crm:P102_has_title ?title .
<${subjectURL}> crm:P3_has_note ?description .
<${subjectURL}> a ?type .
<${subjectURL}> crmpe:PP1_currently_offers ?offeredservice .
<${subjectURL}> crmpe:PP44_has_maintaining_team ?team .
?team crm:P76_has_contact_point ?contactpoint .
?contactpoint crm:P2_has_type ?contactpointType .
?contactpoint rdfs:label ?contactpointLabel .
?contactpointType rdfs:label ?contactpointTypeLabel .
<${subjectURL}> crm:P4_has_time-span ?time_span .
?time_span crm:P82a_begin_of_the_begin ?time_actual .
}
WHERE {
<${subjectURL}> a crmpe:PE35_Project .
<${subjectURL}> a ?type .
{
<${subjectURL}> crm:P1_is_identified_by ?IDRes .
?IDRes a crm:E42_Identifier .
?IDRes rdfs:label ?ID_label .
}
UNION
{
<${subjectURL}> crm:P1_is_identified_by ?titleRes .
?titleRes a crm:E41_Appellation .
?titleRes rdfs:label ?title .
}
UNION{ <${subjectURL}> crm:P3_has_note ?description .}
UNION{ <${subjectURL}> rdfs:label ?label .}
UNION{
<${subjectURL}> crmpe:PP1_currently_offers ?offeredservice .
}
UNION{
<${subjectURL}> crmpe:PP44_has_maintaining_team ?team .
}
UNION{
<${subjectURL}> crmpe:PP44_has_maintaining_team ?team .
?team crm:P76_has_contact_point ?contactpoint .
?contactpoint crm:P2_has_type ?contactpointType .
?contactpoint rdfs:label ?contactpointLabel .
?contactpointType rdfs:label ?contactpointTypeLabel .
}
UNION {
<${subjectURL}> crm:P4_has_time-span ?time_span .
?time_span crm:P82a_begin_of_the_begin ?time_actual .
}
}

View File

@ -0,0 +1,76 @@
To check available rules: SELECT * from DB.DBA.SYS_RDF_SCHEMA;
#### ARIADNEPLUS RULES ####
### ORIGINAL WITH OFFICIALLY PUBLISHED SCHEMAS
SPARQL CLEAR GRAPH <http://www.cidoc-crm.org/cidoc-crm/>;
sparql load <http://www.cidoc-crm.org/sites/default/files2/cidoc_crm_v6.2-draft-2015August.rdfs> into <http://www.cidoc-crm.org/cidoc-crm/>;
rdfs_rule_set ('ariadneplus_rules', 'http://www.cidoc-crm.org/cidoc-crm/') ;
SPARQL CLEAR GRAPH <http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/>;
sparql load <http://www.ics.forth.gr/isl/CRMext/CRMdig_v3.2.2.rdfs> into <http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/>;
rdfs_rule_set ('ariadneplus_rules', 'http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/') ;
SPARQL CLEAR GRAPH <http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/>;
sparql load <http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs> into <http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/>;
rdfs_rule_set ('ariadneplus_rules', 'http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/') ;
### USING SCHEMAS AVAILABLE FROM THE WORKSPACE
SPARQL CLEAR GRAPH <http://www.cidoc-crm.org/cidoc-crm/>;
sparql load <http://data.d4science.org/RUhKNlY3Q3RqaWRlcS9seFFpKy9SWFRQMTZ2UmF0U3FHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/>;
rdfs_rule_set ('ariadneplus_rules', 'http://www.cidoc-crm.org/cidoc-crm/') ;
SPARQL CLEAR GRAPH <http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/>;
sparql load <http://www.ics.forth.gr/isl/CRMext/CRMdig_v3.2.2.rdfs> into <http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/>;
rdfs_rule_set ('ariadneplus_rules', 'http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/') ;
SPARQL CLEAR GRAPH <http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/>;
sparql load <http://data.d4science.org/dytWdlJiamw1cVZvQXZGSWUvc283L280RDNwSVRVZjZHbWJQNStIS0N6Yz0> into <http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/>;
rdfs_rule_set ('ariadneplus_rules', 'http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/') ;
#### EXTENDED RULES ####
# CRMext4SKOSandLabel_v1.4___23-03-2016180729___3031___20-09-2016163145___12893.rdfs
sparql load <http://data.d4science.org/TVJTdXh0dFBUR2RlcS9seFFpKy9SZnVXcHlzYU5sT0dHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/>;
# CRMpc_v1.1.1.rdfs
sparql load <http://data.d4science.org/MmJQM1J5czhzODllcS9seFFpKy9SUVR0aW0yZ0NFT1dHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/>;
rdfs_rule_set ('extended_rules', 'http://www.cidoc-crm.org/cidoc-crm/') ;
rdfs_rule_set ('extended_rules', 'http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/') ;
rdfs_rule_set ('extended_rules', 'http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/') ;
SPARQL CLEAR GRAPH <https://vocabs.dariah.eu/bbt/>;
sparql load <http://data.d4science.org/RUhKNlY3Q3RqaWRlcS9seFFpKy9SWmUyOEgvYytSZnJHbWJQNStIS0N6Yz0> into <https://vocabs.dariah.eu/bbt/>;
rdfs_rule_set ('extended_rules', 'https://vocabs.dariah.eu/bbt/') ;
SPARQL CLEAR GRAPH <http://www.cidoc-crm.org/cidoc-crm/CRMarchaeo/>;
sparql load <http://data.d4science.org/dkc2d000OGhDZVZlcS9seFFpKy9SVlVJZkl5YlNWeTRHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/CRMarchaeo/>;
rdfs_rule_set ('extended_rules', 'http://www.cidoc-crm.org/cidoc-crm/CRMarchaeo/') ;
SPARQL CLEAR GRAPH <http://www.cidoc-crm.org/cidoc-crm/CRMgeo/>;
sparql load <http://data.d4science.org/TVJTdXh0dFBUR2RlcS9seFFpKy9SWEpWSW5xRnZvT2lHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/CRMgeo/>;
rdfs_rule_set ('extended_rules', 'http://www.cidoc-crm.org/cidoc-crm/CRMgeo/') ;
SPARQL CLEAR GRAPH <http://www.cidoc-crm.org/cidoc-crm/CRMsci/>;
sparql load <http://data.d4science.org/TElzU0lmS3JVN3RlcS9seFFpKy9SY1EzcCt4VEw1NkdHbWJQNStIS0N6Yz0> into <http://www.cidoc-crm.org/cidoc-crm/CRMsci/>;
rdfs_rule_set ('extended_rules', 'http://www.cidoc-crm.org/cidoc-crm/CRMsci/') ;
SPARQL CLEAR GRAPH <http://iflastandards.info/ns/fr/frbr/frbroo/>;
sparql load <http://data.d4science.org/TElzU0lmS3JVN3RlcS9seFFpKy9SUUpxYzlFZVFxaXlHbWJQNStIS0N6Yz0> into <http://iflastandards.info/ns/fr/frbr/frbroo/>;
rdfs_rule_set ('extended_rules', 'http://iflastandards.info/ns/fr/frbr/frbroo/') ;
SPARQL CLEAR GRAPH <http://www.w3.org/2004/02/skos/core#>;
sparql load <http://data.d4science.org/OVVnSXpCMjdJTlplcS9seFFpKy9SYlFaZkJnNGgvUVpHbWJQNStIS0N6Yz0> into <http://www.w3.org/2004/02/skos/core#>;
rdfs_rule_set ('extended_rules', 'http://www.w3.org/2004/02/skos/core#') ;

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<logger name="org.springframework" level="INFO" additivity="false">
<appender-ref ref="CONSOLE" />
</logger>
<logger name="root" level="OFF" additivity="false">
<appender-ref ref="CONSOLE" />
</logger>
<logger name="eu.dnetlib" level="INFO" additivity="false">
<appender-ref ref="CONSOLE" />
</logger>
<logger name="eu.dnetlib.ariadneplus" level="DEBUG" additivity="false">
<appender-ref ref="CONSOLE" />
</logger>
<logger name="org.apache.jena" level="INFO" additivity="false">
<appender-ref ref="CONSOLE" />
</logger>
</configuration>

View File

@ -0,0 +1,74 @@
// this is a sample json to send to the registry publisher api for the creation of resources
{
"header": { /* opt to create the resource with specified UUID */
"uuid": "3191b0a0-f0f9-11e1-8817-a1c31a96e2a4",
},
"@class": "EService",
"consistsOf": [ /* list of facets*/
{
"@class": "IsIdentifiedBy",
"target": {
"name": "Thredds",
"description": "The Thredds NetCDF files repository",
"optional": "false",
"EXPORTED": "EXPORTED_FROM_OLD_GCORE_IS",
"version": "4.2.10-0",
"group": "Gis",
"@class": "SoftwareFacet",
}
}
],
"isRelatedto" : [ /* optional to create a relation to another existing Resource */
{
"@class": "isVersionOf",
"target": {
"@class": "Software",
"header": { /* opt */
"uuid": "7791b0a5-f0f9-11e1-8817-a1c31a96e2a4",
},
}
}
]
}
/resource-registry/access/resourceInstances/{EService}/{isIdentifiedBy}/{SoftwareFacet}?
polymorphic=true
&group=VREManagement
&name=SmartExecutor
{EService} : Resource Type
EService -> isIdentifiedBy -> SoftwareFacet
Ex:
PE8-EService -> isIdentifiedBy -> CazziEMazziFacet
origID = 123456789
/resource-registry/access/resourceInstances/PE8-EService/isIdentifiedBy/CazziEMazziFacet?
polymorphic=false
&origID=123456789
when no result : []
----------
/resource-registry/access/facetInstances/CazziEMazziFacet?
polymorphic=false
&origID=123456789
/resource-registry/access/relationInstances/ConsistsOf/PE8-EService/CazziEMazziFacet?
polymorphic=false
&origID=123456789

View File

@ -0,0 +1,60 @@
package eu.dnetlib.ariadneplus.catalogue;
import java.io.IOException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.springframework.core.io.ClassPathResource;
import static org.junit.Assert.*;
/**
* Created by Alessia Bardi on 15/03/2018.
*
* @author Alessia Bardi
*/
@RunWith(JUnit4.class)
@Deprecated
@Ignore
public class CatalogueAPIResponseTest {
private String pathToCreated200 = "eu/dnetlib/ariadneplus/registry/catalogue/responses/resourceCreatedResponse.json";
private String pathToCreationFailed = "eu/dnetlib/ariadneplus/registry/catalogue/responses/resourceCreationFailed.json";
@Test
public void testCreated200() throws IOException {
CatalogueAPIResponse res = new CatalogueAPIResponse();
res.setResponseBody(getString(pathToCreated200));
assertTrue(res.isSuccess());
assertTrue(res.hasAriadnePlusRegistryResource());
assertNotNull(res.getAriadnePlusRegistryResource());
assertNotNull(res.getAriadnePlusRegistryResource().getUuid());
assertTrue(StringUtils.isBlank(res.getErrorMessage()));
}
@Test
public void testFailedCreation() throws IOException {
CatalogueAPIResponse res = new CatalogueAPIResponse();
res.setResponseBody(getString(pathToCreationFailed));
assertFalse(res.isSuccess());
assertFalse(res.hasAriadnePlusRegistryResource());
assertNull(res.getAriadnePlusRegistryResource());
assertTrue(StringUtils.isNotBlank(res.getErrorMessage()));
System.out.println(res.getErrorMessage());
}
private String getString(final String classpath) {
try {
final ClassPathResource resource = new ClassPathResource(classpath);
return IOUtils.toString(resource.getInputStream(), "UTF-8");
}catch(IOException e){
return null;
}
}
}

View File

@ -0,0 +1,105 @@
package eu.dnetlib.ariadneplus.catalogue;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import eu.dnetlib.ariadneplus.CRM;
import eu.dnetlib.ariadneplus.CRMdig;
import eu.dnetlib.ariadneplus.CRMpe;
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException;
import org.apache.jena.ontology.OntModel;
import org.apache.jena.ontology.OntModelSpec;
import org.apache.jena.rdf.model.InfModel;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.ResIterator;
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.vocabulary.RDF;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.io.ClassPathResource;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* Created by Alessia Bardi on 15/03/2018.
*
* @author Alessia Bardi
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
@TestPropertySource(
locations = "classpath:application-integrationtest.properties")
@Ignore
public class CatalogueRegistratorIntegrationTest {
private String nakalaService = "eu/dnetlib/ariadneplus/registry/nakala.rdf";
private String resourceCatName = "nakalatest";
private String error500_1 = "eu/dnetlib/ariadneplus/registry/error500_1.rdf";
@Autowired
private CatalogueRegistrator reg;
private OntModel baseModel;
@Before
public void setup() {
baseModel = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_TRANS_INF);
baseModel.read(getInputStream("eu/dnetlib/ariadneplus/rdfs/CRMpe.rdfs"), CRMpe.NS);
baseModel.read(getInputStream("eu/dnetlib/ariadneplus/rdfs/CRMdig.rdfs"), CRMdig.NS);
baseModel.read(getInputStream("eu/dnetlib/ariadneplus/rdfs/cidoc_crm_v6.2-draft-2015August.rdfs"), CRM.NS);
}
@Test
public void testRegistration() throws Exception{
InfModel model = loadBaseModel();
model.read(getStream(nakalaService), CRMpe.NS);
ResIterator subjects = model.listSubjectsWithProperty(RDF.type, CRM.E7_Activity);
Resource nakala = subjects.nextResource();
String uuid = reg.register(nakala, CRMpe.PE1_Service, "Huma-Num - Nakala");
System.out.println(uuid);
purge(uuid);
}
@Test
public void testError500_1() throws Exception {
InfModel model = loadBaseModel();
model.read(getStream(error500_1), CRMpe.NS);
ResIterator subjects = model.listSubjectsWithProperty(RDF.type, CRM.E29_Design_or_Procedure);
Resource r = subjects.nextResource();
String uuid = reg.register(r, CRM.E29_Design_or_Procedure, "ARIADNEPLUS");
System.out.println(uuid);
purge(uuid);
}
@Test
public void testPurge() throws AriadnePlusPublisherException, URISyntaxException {
reg.purge(resourceCatName);
}
private void purge(final String uuid) throws AriadnePlusPublisherException, URISyntaxException {
reg.purge(uuid);
}
private static InputStream getStream(final String classpath) throws IOException {
return new ClassPathResource(classpath).getInputStream();
}
protected InfModel loadBaseModel() {
return ModelFactory.createRDFSModel(baseModel);
}
private InputStream getInputStream(String classpath){
try {
final ClassPathResource resource = new ClassPathResource(classpath);
return resource.getInputStream();
}catch(IOException e){
return null;
}
}
}

View File

@ -0,0 +1,157 @@
package eu.dnetlib.ariadneplus.catalogue;
import java.io.IOException;
import java.io.InputStream;
import eu.dnetlib.ariadneplus.CRM;
import eu.dnetlib.ariadneplus.CRMdig;
import eu.dnetlib.ariadneplus.CRMpe;
import eu.dnetlib.ariadneplus.rdf.ResourceReader;
import org.apache.jena.ontology.OntModel;
import org.apache.jena.ontology.OntModelSpec;
import org.apache.jena.rdf.model.InfModel;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.ResIterator;
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.vocabulary.RDF;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.springframework.core.io.ClassPathResource;
import static org.junit.Assert.assertEquals;
/**
* Created by Alessia Bardi on 11/12/2017.
*
* @author Alessia Bardi
*/
@RunWith(JUnit4.class)
public class CatalogueRegistratorTest {
private CatalogueRegistrator reg;
private ResourceReader reader = new ResourceReader();
private String nakalaService = "eu/dnetlib/ariadneplus/registry/nakala.rdf";
private String test = "eu/dnetlib/ariadneplus/registry/test.rdf";
private String noRiot = "eu/dnetlib/ariadneplus/registry/sampleNoRiot.rdf";
private String withproviders = "eu/dnetlib/ariadneplus/registry/withProviders.rdf";
private String serviceSample = "eu/dnetlib/ariadneplus/registry/PE1_Service_sample.rdf";
private OntModel baseModel;
@Before
public void setup() {
reg = new CatalogueRegistrator();
reg.setResourceReader(reader);
baseModel = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_TRANS_INF);
baseModel.read(getInputStream("eu/dnetlib/ariadneplus/rdfs/CRMpe.rdfs"), CRMpe.NS);
baseModel.read(getInputStream("eu/dnetlib/ariadneplus/rdfs/CRMdig.rdfs"), CRMdig.NS);
baseModel.read(getInputStream("eu/dnetlib/ariadneplus/rdfs/cidoc_crm_v6.2-draft-2015August.rdfs"), CRM.NS);
}
@Test
public void readModel() {
InfModel model = loadBaseModel();
model.read(getInputStream(noRiot), CRMpe.NS);
}
@Test
public void testGetJsonForActivity() throws Exception{
InfModel model = loadBaseModel();
model.read(getInputStream(nakalaService), CRMpe.NS);
ResIterator subjects = model.listSubjectsWithProperty(RDF.type, CRM.E7_Activity);
while (subjects.hasNext()) {
Resource subject = subjects.nextResource();
String json = reg.getJsonForService(subject, "testCatName", "Huma-Num - Nakala");
System.out.println(json);
}
}
@Test
public void testGetJsonForWP8Actor() throws Exception{
InfModel model = loadBaseModel();
model.read(getInputStream("/eu/dnetlib/ariadneplus/registry/testwp8.rdf"), CRMpe.NS);
ResIterator subjects = model.listSubjectsWithProperty(RDF.type, CRM.E39_Actor);
while (subjects.hasNext()) {
Resource subject = subjects.nextResource();
String json = reg.getJsonForActor(subject, "xx", "ARIADNEPLUS");
System.out.println(json);
}
}
@Test
public void testGetJsonForMetashare() throws Exception{
InfModel model = loadBaseModel();
model.read(getInputStream("eu/dnetlib/ariadneplus/registry/metashare.rdf"), CRMpe.NS);
ResIterator subjects = model.listSubjectsWithProperty(RDF.type, CRM.E7_Activity);
while (subjects.hasNext()) {
Resource subject = subjects.nextResource();
String json = reg.getJsonForService(subject, "testCatName", "METASHARE");
System.out.println(json);
}
}
@Test
public void testGetJsonForActor() throws Exception{
InfModel model = loadBaseModel();
model.read(getInputStream(test), CRMpe.NS);
ResIterator subjects = model.listSubjectsWithProperty(RDF.type, CRM.E39_Actor);
while (subjects.hasNext()) {
Resource subject = subjects.nextResource();
String json = reg.getJsonForActor(subject, "testActorName", "CLARIN");
System.out.println(json);
}
}
@Test
public void testGetJsonForProject() throws Exception{
InfModel model = loadBaseModel();
model.read(getInputStream("eu/dnetlib/ariadneplus/registry/sample1.rdf"), CRMpe.NS);
ResIterator subjects = model.listSubjectsWithProperty(RDF.type, CRMpe.PE35_Project);
while (subjects.hasNext()) {
Resource subject = subjects.nextResource();
String json = reg.getJsonForProject(subject, "testProjectName", "ARIADNEPLUS");
System.out.println(json);
}
}
@Test
public void testGetJsonForDataset() throws Exception{
InfModel model = loadBaseModel();
model.read(getInputStream("eu/dnetlib/ariadneplus/registry/sample1.rdf"), CRMpe.NS);
ResIterator subjects = model.listSubjectsWithProperty(RDF.type, CRMpe.PE18_Dataset);
while (subjects.hasNext()) {
Resource subject = subjects.nextResource();
String json = reg.getJsonForDataset(subject, "testDatasetName", "ARIADNEPLUS");
System.out.println(json);
}
}
@Test
public void availibilityTest(){
InfModel model = loadBaseModel();
model.read(getInputStream(serviceSample), CRMpe.NS);
Resource subject = model.getResource("http://ariadneplus.d4science.org/handle/CP/Service/TEST");
assertEquals("Yes", reader.getAvailability(subject));
}
private InputStream getInputStream(String classpath){
try {
final ClassPathResource resource = new ClassPathResource(classpath);
return resource.getInputStream();
}catch(IOException e){
return null;
}
}
protected InfModel loadBaseModel() {
return ModelFactory.createRDFSModel(baseModel);
}
}

View File

@ -0,0 +1,39 @@
package eu.dnetlib.ariadneplus.publisher;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Created by Alessia Bardi on 29/08/2017.
*
* @author Alessia Bardi
*/
@RunWith(SpringRunner.class)
@WebMvcTest(AriadnePlusPublisherController.class)
public class AriadnePlusPublisherControllerTest {
@Autowired
private MockMvc mvc;
@MockBean
private AriadnePlusPublisherHelper ariadneplusPublisherHelper;
@Test
public void publishOK() throws Exception {
mvc.perform(post("/publish").param("record", "<aTestRecord>value</aTestRecord>").param("ariadneplusTarget", "VIRTUOSO"))
.andExpect(status().isOk());
}
@Test
public void textEx() throws Exception {
mvc.perform(post("/publish")).andExpect(status().is4xxClientError());
}
}

View File

@ -0,0 +1,93 @@
package eu.dnetlib.ariadneplus.publisher;
import java.io.IOException;
import eu.dnetlib.ariadneplus.AriadnePlusPublisherApplication;
import org.apache.commons.io.IOUtils;
import org.apache.jena.graph.Triple;
import org.apache.jena.util.iterator.ExtendedIterator;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.core.io.ClassPathResource;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import virtuoso.jena.driver.VirtGraph;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Created by Alessia Bardi on 29/08/2017.
* Integration test.
*
* @author Alessia Bardi
*/
@RunWith(SpringRunner.class)
@SpringBootTest(
webEnvironment = WebEnvironment.RANDOM_PORT,
classes = AriadnePlusPublisherApplication.class)
@AutoConfigureMockMvc
@TestPropertySource(locations = "classpath:application-integrationtest.properties")
//Ignore test because it requires a running virtuoso server
@Ignore
public class AriadnePlusPublisherTest {
private String recordPath = "eu/dnetlib/ariadneplus/virtuoso/test_record_plain.xml";
@Value("${virtuoso.connectionstring}")
private String connectionString;
@Value("${virtuoso.usr}")
private String testUser ;
@Value("${virtuoso.pwd}")
private String testPwd ;
@Value("${virtuoso.uri.base.default}")
private String defaultURIBaseURl;
@Autowired
private MockMvc mvc;
@Test
public void publishOK() throws Exception {
String graphName = defaultURIBaseURl + "api_________::ariadneplus___::ariadneplus::topLevel/ariadneplus___::8d777f385d3dfec8815d20f7496026dc";
VirtGraph graph = new VirtGraph(graphName, connectionString, testUser, testPwd);
//ensure we have an empty graph
graph.clear();
assertEquals(0, graph.getCount());
mvc.perform(post("/publish").param("record", getString(recordPath)).param("ariadneplusTarget", "VIRTUOSO"))
.andExpect(status().isOk());
//need to wait some seconds to ensure the async call did its job
Thread.sleep(10000);
int count = graph.getCount();
System.out.println(graphName +" has "+count+" triples:");
assertNotEquals(0, graph.getCount());
final ExtendedIterator<Triple> triples = graph.find();
while(triples.hasNext()){
System.out.println(triples.next());
}
//cleanup the virtuoso graph
graph.clear();
assertEquals(0, graph.getCount());
}
private String getString(final String classpath) {
try {
final ClassPathResource resource = new ClassPathResource(classpath);
return IOUtils.toString(resource.getInputStream(), "UTF-8");
}catch(IOException e){
return null;
}
}
}

View File

@ -0,0 +1,48 @@
package eu.dnetlib.ariadneplus.rdf;
import eu.dnetlib.ariadneplus.publisher.SaxonHelper;
import net.sf.saxon.s9api.SaxonApiException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import static org.junit.Assert.assertEquals;
/**
* Created by Alessia Bardi on 15/03/2018.
*
* @author Alessia Bardi
*/
@RunWith(JUnit4.class)
public class RecordParserHelperTest {
private String testRecord = "<record xmlns=\"http://www.openarchives.org/OAI/2.0/\"><header xmlns:dri=\"http://www.driver-repository.eu/namespace/dri\"><dri:objIdentifier>http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/Eleni%20Vernardaki</dri:objIdentifier><dri:datasourceapi>api_________::ariadneplus___::ariadneplus::topLevel</dri:datasourceapi><dri:datasourcename>ARIADNEPLUS</dri:datasourcename></header><metadata>\n"
+ "<rdf:RDF\n"
+ "\txmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n"
+ "\txmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" >\n"
+ " <rdf:Description rdf:about=\"http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/Eleni%20Vernardaki\">\n"
+ " <rdf:type rdf:resource=\"http://www.cidoc-crm.org/cidoc-crm/E39_Actor\" />\n"
+ " <rdf:type rdf:resource=\"http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity\" />\n"
+ " <rdf:type rdf:resource=\"http://www.cidoc-crm.org/cidoc-crm/E77_Persistent_Item\" />\n"
+ " </rdf:Description>\n"
+ "</rdf:RDF></metadata></record>";
private RecordParserHelper help;
private SaxonHelper saxonHelper;
@Before
public void setup() throws SaxonApiException {
saxonHelper = new SaxonHelper();
help = new RecordParserHelper();
help.setSaxonHelper(saxonHelper);
help.init();
}
@Test
public void testGetObjId(){
assertEquals("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/Eleni%20Vernardaki", help.getObjIdentifier(testRecord));
}
}

View File

@ -0,0 +1,79 @@
package eu.dnetlib.ariadneplus.registry;
import java.io.IOException;
import java.io.StringWriter;
import java.util.UUID;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/**
* Created by Alessia Bardi on 02/10/2017.
*
* @author Alessia Bardi
*/
@RunWith(JUnit4.class)
public class JacksonTest {
@Test
public void testJackson() throws IOException {
JsonFactory jsonFactory = new JsonFactory();
StringWriter sw = new StringWriter();
JsonGenerator jgen = jsonFactory.createGenerator(sw);
jgen.writeStartObject();
jgen.writeNumberField("id", 1);
jgen.writeArrayFieldStart("array");
jgen.writeStartObject();
jgen.writeStringField("itemName", "theName");
jgen.writeNumberField("owner", 3);
jgen.writeEndObject();
jgen.writeStartObject();
jgen.writeStringField("itemName", "theName2");
jgen.writeNumberField("owner", 8);
jgen.writeEndObject();
jgen.writeEndArray();
jgen.writeEndObject();
jgen.close();
//sw.flush();
System.out.println(sw.getBuffer().toString());
}
@Test
public void testJacksonEmbeddedObject() throws IOException {
JsonFactory jsonFactory = new JsonFactory();
StringWriter sw = new StringWriter();
JsonGenerator jgen = jsonFactory.createGenerator(sw);
jgen.writeStartObject();
jgen.writeNumberField("id", 1);
jgen.writeObjectFieldStart("embeddedObj");
jgen.writeStringField("itemName", "theName");
jgen.writeNumberField("owner", 3);
jgen.writeEndObject();
jgen.writeEndObject();
jgen.close();
System.out.println(sw.getBuffer().toString());
}
@Test
public void testHeader() throws IOException {
JsonFactory jsonFactory = new JsonFactory();
StringWriter sw = new StringWriter();
JsonGenerator jgen = jsonFactory.createGenerator(sw);
jgen.writeStartObject();
jgen.writeObjectFieldStart("header");
jgen.writeStringField("uuid", UUID.randomUUID().toString());
jgen.writeEndObject();
jgen.writeStringField("@class", "specificType");
jgen.writeArrayFieldStart("consistsOf");
jgen.writeEndArray();
jgen.writeEndObject();
jgen.close();
System.out.println(sw.getBuffer().toString());
}
}

View File

@ -0,0 +1,53 @@
package eu.dnetlib.ariadneplus.registry;
import org.apache.jena.rdf.model.*;
import org.apache.jena.vocabulary.RDFS;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/**
* Created by Alessia Bardi on 29/09/2017.
*
* See https://jena.apache.org/documentation/inference/index.html#OWLcoverage
*
* @author Alessia Bardi
*/
@RunWith(JUnit4.class)
public class JenaInferenceTest {
private static final String ARIADNEPLUS_MODEL_URL = "http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs";
private static final String CRM_MODEL_URL = "http://www.cidoc-crm.org/sites/default/files/cidoc_crm_v6.2-draft-2015August.rdfs.xml";
private static final String CRM_DIG_MODEL_URL ="http://www.ics.forth.gr/isl/CRMext/CRMdig_v3.2.2.rdfs";
@Test
public void testSubProperty(){
String NS = "urn:x-hp-jena:eg/";
// Build a trivial example data set
Model rdfsExample = ModelFactory.createDefaultModel();
Property p = rdfsExample.createProperty(NS, "p");
Property q = rdfsExample.createProperty(NS, "q");
rdfsExample.add(p, RDFS.subPropertyOf, q);
rdfsExample.createResource(NS+"a").addProperty(p, "foo");
InfModel inf = ModelFactory.createRDFSModel(rdfsExample); // [1]
Resource a = inf.getResource(NS+"a");
// System.out.println("Statement: " + a.getProperty(q));
// System.out.println("Statement: " + a.getProperty(p));
StmtIterator it = inf.listStatements(new SimpleSelector(a, null, (Object) null));
while(it.hasNext()){
System.out.println(it.nextStatement().toString());
}
}
@Test
public void testWithSchema(){
}
}

View File

@ -0,0 +1,83 @@
package eu.dnetlib.ariadneplus.virtuoso;
import java.io.IOException;
import java.io.InputStream;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.riot.RDFDataMgr;
import org.apache.jena.riot.RDFFormat;
import org.apache.jena.riot.RIOT;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.springframework.core.io.ClassPathResource;
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@RunWith(JUnit4.class)
public class ExampleIO_01 {
@Test
public void test() throws IOException {
InputStream in = getResourceAsStream("eu/dnetlib/ariadneplus/virtuoso/data.ttl");
RIOT.init() ;
Model model = ModelFactory.createDefaultModel(); // creates an in-memory Jena Model
model.read(in, null, "TURTLE"); // parses an InputStream assuming RDF in Turtle format
// Write the Jena Model in Turtle, RDF/XML and N-Triples format
System.out.println("\n---- Turtle ----");
model.write(System.out, "TURTLE");
System.out.println("\n---- RDF/XML ----");
model.write(System.out, "RDF/XML");
System.out.println("\n---- RDF/XML Abbreviated ----");
model.write(System.out, "RDF/XML-ABBREV");
System.out.println("\n---- N-Triples ----");
model.write(System.out, "N-TRIPLES");
System.out.println("\n---- RDF/JSON ----");
model.write(System.out, "RDF/JSON");
RDFDataMgr.write(System.out, model.getGraph(), RDFFormat.RDFXML_PLAIN);
System.out.println("\n----RDFDataMgr with model and RDFFormat.RDFXML_PLAIN ----");
RDFDataMgr.write(System.out, model, RDFFormat.RDFXML_PLAIN);
}
@Test
public void testPropertyNamespace(){
Property p = ResourceFactory.createProperty("dnet:", "transformedInDate");
System.out.println(p.toString());
}
@Test
public void testPropertyNamespaceUrl(){
String ns = "http://www.d-net.research-infrastructures.eu/provenance/";
Property p = ResourceFactory.createProperty(ns, "transformedInDate");
System.out.println(p.toString());
}
private InputStream getResourceAsStream(final String classpath) throws IOException {
final ClassPathResource resource = new ClassPathResource(classpath);
return resource.getInputStream();
}
}

View File

@ -0,0 +1,43 @@
package eu.dnetlib.ariadneplus.virtuoso;
import java.io.IOException;
import freemarker.cache.ClassTemplateLoader;
import freemarker.template.Template;
import freemarker.template.TemplateExceptionHandler;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import static org.junit.Assert.assertNotNull;
/**
* Created by Alessia Bardi on 14/03/2018.
*
* @author Alessia Bardi
*/
@RunWith(JUnit4.class)
public class FreeMarkerTest {
@Test
public void testFreemarkTemplateLoading() throws IOException {
freemarker.template.Configuration config = new freemarker.template.Configuration(freemarker.template.Configuration.VERSION_2_3_27);
ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), "/eu/dnetlib/ariadneplus/sparql");
config.setTemplateLoader(ctl);
config.setDefaultEncoding("UTF-8");
// Sets how errors will appear.
// During web page *development* TemplateExceptionHandler.HTML_DEBUG_HANDLER is better.
config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
// Don't log exceptions inside FreeMarker that it will thrown at you anyway:
config.setLogTemplateExceptions(false);
// Wrap unchecked exceptions thrown during template processing into TemplateException-s.
config.setWrapUncheckedExceptions(true);
String templateName = "E39_Actor.sparql";
Template temp = config.getTemplate(templateName);
assertNotNull(temp);
}
}

View File

@ -0,0 +1,88 @@
package eu.dnetlib.ariadneplus.virtuoso;
import java.io.IOException;
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException;
import eu.dnetlib.ariadneplus.publisher.SaxonHelper;
import eu.dnetlib.ariadneplus.rdf.RecordParserHelper;
import net.sf.saxon.s9api.SaxonApiException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.springframework.core.io.ClassPathResource;
import virtuoso.jena.driver.VirtModel;
/**
* Created by Alessia Bardi on 12/07/2017.
*
* @author Alessia Bardi
*/
@Ignore
@RunWith(JUnit4.class)
public class VirtuosoClientTest {
private static final Log log = LogFactory.getLog(VirtuosoClientTest.class);
private String testGraph = "virt:test";
//private String connectionString = "jdbc:virtuoso://localhost:1111";
private String connectionString = "jdbc:virtuoso://virtuoso.ariadneplus.d4science.org:1111";
private String testUser = "dba";
private String testPwd = "dba";
private String defaultURIBaseURl = "http://test/";
private String recordPath = "eu/dnetlib/ariadneplus/virtuoso/test_record_plain.xml";
private VirtuosoClient client;
private SaxonHelper saxonHelper = new SaxonHelper();
@Before
public void prepare() throws SaxonApiException {
RecordParserHelper rph = new RecordParserHelper();
rph.setSaxonHelper(saxonHelper);
rph.init();
client = new VirtuosoClient(connectionString, testUser, testPwd, rph, defaultURIBaseURl);
}
@Test
public void testConnection(){
VirtModel.openDatabaseModel("x", connectionString, testUser, testPwd);
}
@Test
public void testFeedProvenance(){
long res = client.feedProvenance("ariadne_____::0002b8b77eb2d6c62f61c6e1a1ce6891", "2017-05-14T12:06:38.152+02:00" , "2017-05-14T12:11:55.573", "ARIADNE", "ariadne_api");
Assert.assertEquals(3, res);
}
@Test
public void testRecord() throws AriadnePlusPublisherException {
System.out.println(client.feed(getString(recordPath)));
}
@Test
public void testRemoveFromProvenance(){
long res = client.feedProvenance("ariadne_____::0002b8b77eb2d6c62f61c6e1a1ce6891", "2017-05-14T12:06:38.152+02:00" , "2017-05-14T12:11:55.573", "ARIADNE", "ariadne_api");
Assert.assertEquals(3, res);
long deleted = client.drop("ariadne_api");
Assert.assertEquals(0, deleted);
}
private String getString(final String classpath) {
try {
final ClassPathResource resource = new ClassPathResource(classpath);
return IOUtils.toString(resource.getInputStream(), "UTF-8");
}catch(IOException e){
return null;
}
}
}

View File

@ -0,0 +1,114 @@
package eu.dnetlib.ariadneplus.virtuoso;
import java.io.IOException;
import java.util.List;
import eu.dnetlib.ariadneplus.CRM;
import eu.dnetlib.ariadneplus.CRMdig;
import eu.dnetlib.ariadneplus.CRMpe;
import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException;
import freemarker.template.TemplateException;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* Created by Alessia Bardi on 24/03/2018.
*
* @author Alessia Bardi
*/
@Ignore
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
@TestPropertySource(
locations = "classpath:application-integrationtest.properties")
public class VirtuosoReadAPIIntegrationTest {
private static String TIMEOUT = "3000";
@Autowired
private VirtuosoReadAPI virtuosoReadAPI;
@Test
public void testVolatileDataset1() throws IOException, TemplateException, AriadnePlusPublisherException {
virtuosoReadAPI.getSubject("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Dataset/CoCoON%20Dataset", CRMpe.PE18_Dataset.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testSoftware() throws IOException, TemplateException, AriadnePlusPublisherException {
virtuosoReadAPI.getSubject("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Software/ACDM", CRMdig.D14_Software.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testRIConsortium() throws IOException, TemplateException, AriadnePlusPublisherException {
virtuosoReadAPI.getSubject("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/Cendari%20Consortium", CRM.E39_Actor.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testPerson() throws IOException, TemplateException, AriadnePlusPublisherException {
virtuosoReadAPI.getSubject("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/Eleni%20Vernardaki", CRM.E39_Actor.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testService() throws IOException, TemplateException, AriadnePlusPublisherException {
virtuosoReadAPI.getSubject("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/Isidore", CRMpe.PE1_Service.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testService2() throws IOException, TemplateException, AriadnePlusPublisherException {
virtuosoReadAPI.getSubject("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/LRE%20Map", CRMpe.PE1_Service.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testService3() throws IOException, TemplateException, AriadnePlusPublisherException {
virtuosoReadAPI.getSubject("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service", CRMpe.PE1_Service.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testCurationPlan() throws IOException, TemplateException, AriadnePlusPublisherException {
virtuosoReadAPI.getSubject("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/thing/provided%20by%20DCU", CRMpe.PE28_Curation_Plan.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testProject() throws IOException, TemplateException, AriadnePlusPublisherException {
virtuosoReadAPI
.getSubject("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Project/Cendari", CRMpe.PE35_Project.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testProject2() throws AriadnePlusPublisherException, TemplateException, IOException {
virtuosoReadAPI.getSubject("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Project/Ariadne%20Project", CRMpe.PE35_Project.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testCollection() throws IOException, TemplateException, AriadnePlusPublisherException {
virtuosoReadAPI.getSubject("http://ariadneplus.d4science.org/handle/EHRI/PORTAL/Thing/164", CRM.E78_Collection.getLocalName(), TIMEOUT, System.out);
}
@Test
public void testGetSubjectsApiWithType(){
List<String> list = virtuosoReadAPI.getSubjectsForApiWithType("api_________::ariadne::CYI", CRMpe.getURI(), CRMpe.PE18_Dataset.getLocalName(), 100, 0);
assertFalse(list.isEmpty());
list.forEach(s -> System.out.println(s));
}
@Test
public void testGetSubjectsApiWithTypeAndTooLargeOffset(){
List<String> list = virtuosoReadAPI.getSubjectsForApiWithType("api_________::ariadne::CYI", CRMpe.getURI(), CRMpe.PE18_Dataset.getLocalName(), 100, 100);
assertTrue(list.isEmpty());
}
@Test
public void testGetSubjectsApiWithTypeOffset(){
List<String> list = virtuosoReadAPI.getSubjectsForApiWithType("api_________::ariadne::CYI", CRMpe.getURI(), CRMpe.PE18_Dataset.getLocalName(), 2, 4);
list.forEach(s -> System.out.println(s));
}
}

View File

@ -0,0 +1,38 @@
package eu.dnetlib.ariadneplus.virtuoso;
import freemarker.template.Configuration;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Created by Alessia Bardi on 29/08/2017.
* FIX ME: Mock freemarker configuration so the test can be run
*
* @author Alessia Bardi
*/
@Ignore
@RunWith(SpringRunner.class)
@WebMvcTest(VirtuosoReadAPI.class)
public class VirtuosoReadAPITest {
@Autowired
private MockMvc mvc;
@MockBean
private Configuration freemarkerConfig;
@Test
public void testGetSubject() throws Exception {
mvc.perform(get("/virtuoso/subject").param("subjectURL", "xxx").param("timeout", "1234").param("typeName", "D14_Software")).andExpect(status().isOk());
}
}

View File

@ -0,0 +1,326 @@
package eu.dnetlib.ariadneplus.virtuoso;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.apache.jena.graph.NodeFactory;
import org.apache.jena.graph.Triple;
import org.apache.jena.query.Query;
import org.apache.jena.query.QueryExecutionFactory;
import org.apache.jena.query.QueryFactory;
import org.apache.jena.query.ResultSet;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.riot.RDFDataMgr;
import org.apache.jena.riot.RDFFormat;
import org.apache.jena.sparql.engine.http.QueryEngineHTTP;
import org.apache.jena.sparql.engine.http.QueryExceptionHTTP;
import org.apache.jena.util.iterator.ExtendedIterator;
import org.assertj.core.util.Lists;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.springframework.core.io.ClassPathResource;
import virtuoso.jena.driver.VirtGraph;
import virtuoso.jena.driver.VirtModel;
import virtuoso.jena.driver.VirtuosoQueryExecution;
import virtuoso.jena.driver.VirtuosoQueryExecutionFactory;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
/**
* Created by Alessia Bardi on 11/07/2017.
*
* @author Alessia Bardi
*/
@Ignore
@RunWith(JUnit4.class)
public class VirtuosoTest {
private String testGraph = "virt:test";
private String connectionString = "jdbc:virtuoso://localhost:1111";
private String testUser = "dba";
private String testPwd = "dba";
private String defaultURIBaseURl = "http://test/";
private String sparqlEndpoint = "http://localhost:8890/sparql";
@Before
public void prepare() {
VirtGraph graph = new VirtGraph(testGraph, connectionString, testUser, testPwd);
assertNotNull(graph);
graph.clear();
}
/**
* See also: https://stackoverflow.com/questions/24576190/enable-reasoning-for-sparql-request-via-jena
*/
@Test
public void testInference1() {
String q = "DEFINE input:inference 'ariadneplus_rules' CONSTRUCT {<%s> ?p ?o . } WHERE { <%s> ?p ?o .}";
String subjectURL = "http://clarin.eu/clarin-eric-datatables/centres";
String query = String.format(q, subjectURL, subjectURL, subjectURL, subjectURL);
System.out.println(query);
final QueryEngineHTTP request = new QueryEngineHTTP(sparqlEndpoint, query);
Model res = request.execConstruct();
RDFDataMgr.write(System.out, res, RDFFormat.RDFXML_PLAIN);
res.close();
request.close();
}
@Test
public void testLongQuery() throws IOException {
String q = IOUtils.toString(getResourceAsStream("/eu/dnetlib/ariadneplus/sparql/longQuery.sparql"));
try (CloseableHttpClient httpclient = HttpClients.createDefault()) {
HttpPost httpPost = new HttpPost(sparqlEndpoint);
List<NameValuePair> nvps = Lists.newArrayList();
nvps.add(new BasicNameValuePair("query", q));
httpPost.setEntity(new UrlEncodedFormEntity(nvps));
try (CloseableHttpResponse response2 = httpclient.execute(httpPost)) {
System.out.println(response2.getStatusLine());
HttpEntity entity2 = response2.getEntity();
String s = IOUtils.toString(entity2.getContent());
System.out.println("OUT: " + s);
// do something useful with the response body
// and ensure it is fully consumed
EntityUtils.consume(entity2);
}
}
}
@Test(expected = QueryExceptionHTTP.class)
public void testLongQueryFails() throws IOException {
String q = IOUtils.toString(getResourceAsStream("/eu/dnetlib/ariadneplus/sparql/longQuery.sparql"));
final QueryEngineHTTP request = new QueryEngineHTTP(sparqlEndpoint, q);
Model res = request.execConstruct();
RDFDataMgr.write(System.out, res, RDFFormat.RDFXML_PLAIN);
res.close();
request.close();
}
@Test
public void testRemote() {
String q = "DEFINE input:inference 'ariadneplus_rules' CONSTRUCT {<%s> ?p ?o . } WHERE { <%s> ?p ?o .}";
//String q = "CONSTRUCT {<%s> ?p ?o . } WHERE { <%s> ?p ?o .}";
String subjectURL = "http://clarin.eu/clarin-eric-datatables/centres";
String query = String.format(q, subjectURL, subjectURL, subjectURL, subjectURL);
System.out.println(query);
VirtGraph g = new VirtGraph(connectionString, testUser, testPwd);
g.setReadFromAllGraphs(true);
VirtuosoQueryExecution vqe = VirtuosoQueryExecutionFactory.create(query, g);
Model resultModel = vqe.execConstruct();
RDFDataMgr.write(System.out, resultModel, RDFFormat.RDFXML_PLAIN);
vqe.close();
g.close();
}
@Test
public void testConnection() {
VirtGraph graph = new VirtGraph(testGraph, connectionString, testUser, testPwd);
assertNotNull(graph);
}
@Test
public void testDescribe() {
//put something in the graph
Model md = VirtModel.openDatabaseModel(testGraph, connectionString, testUser, testPwd);
md.read(getResourceAsStream("eu/dnetlib/ariadneplus/virtuoso/test.rdf"), defaultURIBaseURl);
String resURI = "http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Dataset/http%3A%2F%2Fregistry.ariadne-infrastructure.eu%2Fdataset%2F25058478";
//now query for the resource URI
String describeQuery = "DESCRIBE <" + resURI + ">";
Query query = QueryFactory.create(describeQuery);
String sparqlUrl = "http://localhost:8890/sparql";
final QueryEngineHTTP serviceRequest = QueryExecutionFactory.createServiceRequest(sparqlUrl, query);
Model resultModel = serviceRequest.execDescribe();
serviceRequest.close();
resultModel.write(System.out);
VirtGraph graph = new VirtGraph(testGraph, connectionString, testUser, testPwd);
graph.clear();
}
@Ignore
@Test
public void testDescribeRemote() {
String resURI = "http://hdl.handle.net/11858/00-203C-0000-0029-F5E8-C";
//now query for the resource URI
String describeQuery = "DESCRIBE <" + resURI + ">";
Query query = QueryFactory.create(describeQuery);
String sparqlUrl = "https://virtuoso.ariadneplus.d4science.org/sparql";
final QueryEngineHTTP serviceRequest = QueryExecutionFactory.createServiceRequest(sparqlUrl, query);
Model resultModel = serviceRequest.execDescribe();
serviceRequest.close();
resultModel.write(System.out);
}
@Test
public void testReadForDescribeResource() {
String sparqlUrl = "http://localhost:8890/sparql";
String queryForGraphs =
"SELECT DISTINCT ?g \n"
+ "WHERE {\n"
+ " { ?g <dnet:collectedFrom> <http://ariadneplus.d4science.org/handle/api_________::ariadneplus___::clarin::p_1271859438164> }\n"
+ "}";
Query query = QueryFactory.create(queryForGraphs);
final QueryEngineHTTP serviceRequest = QueryExecutionFactory.createServiceRequest(sparqlUrl, query);
ResultSet graphs = serviceRequest.execSelect();
String queryForSubjectsTemplate = "SELECT DISTINCT ?s WHERE {GRAPH <%s> {?s ?p ?o}}";
int countGraphs = 0;
while (graphs.hasNext()) {
countGraphs++;
Resource g = graphs.next().getResource("g");
System.out.println("*****GRAPH: " + g.getURI());
final QueryEngineHTTP serviceRequest2 =
QueryExecutionFactory.createServiceRequest(sparqlUrl, QueryFactory.create(String.format(queryForSubjectsTemplate, g.getURI())));
ResultSet subjects = serviceRequest2.execSelect();
int countSubjects = 0;
while (subjects.hasNext()) {
countSubjects++;
Resource s = subjects.next().getResource("s");
String describeQuery = "DESCRIBE <" + s.getURI() + ">";
final QueryEngineHTTP serviceRequest3 = QueryExecutionFactory.createServiceRequest(sparqlUrl, QueryFactory.create(describeQuery));
Model resultModel = serviceRequest3.execDescribe();
serviceRequest3.close();
resultModel.write(System.out);
}
serviceRequest2.close();
System.out.println("Got " + countSubjects + " subjects");
}
serviceRequest.close();
assertEquals("unexpected number of graphs", 4, countGraphs);
}
@Test
public void testClear() {
VirtGraph graph = new VirtGraph(testGraph, connectionString, testUser, testPwd);
assertNotNull(graph);
graph.clear();
Assert.assertTrue(graph.isEmpty());
}
@Test
public void testFeedTriple() {
VirtGraph graph = new VirtGraph(testGraph, connectionString, testUser, testPwd);
assertNotNull(graph);
graph.clear();
Assert.assertTrue(graph.isEmpty());
Triple t = new Triple(NodeFactory.createURI("http://test/1"), NodeFactory.createURI("http://test/is_friend_of"),
NodeFactory.createURI("http://test/KevinBacon"));
graph.performAdd(t);
assertEquals(1, graph.getCount());
graph.clear();
}
@Test
public void testFeedRDFFile() {
Model md = VirtModel.openDatabaseModel(testGraph, connectionString, testUser, testPwd);
md.read(getResourceAsStream("eu/dnetlib/ariadneplus/virtuoso/test.rdf"), defaultURIBaseURl);
long size = md.size();
System.out.println("==Inserted " + size + "triples==");
VirtGraph graph = new VirtGraph(testGraph, connectionString, testUser, testPwd);
assertNotNull(graph);
Assert.assertFalse(graph.isEmpty());
graph.clear();
}
/*
If we want to be able to update, we need to store the triples in different named graph. This way we can delete the old triples and add the new ones.
And then we can add triples about the graph (e.g. provenance, last update time, whatever) in another named graph (e.g. 'provenance'),
where all the info about the named graphs are available.
*/
@Test
public void testUpdate() {
String namedGraph = "virt:test:theObjIdentifier";
Model md = VirtModel.openDatabaseModel(namedGraph, connectionString, testUser, testPwd);
md.read(getResourceAsStream("eu/dnetlib/ariadneplus/virtuoso/test.rdf"), defaultURIBaseURl);
long size = md.size();
System.out.println("==Inserted " + size + "triples==");
md.removeAll();
Assert.assertTrue(md.isEmpty());
md.read(getResourceAsStream("eu/dnetlib/ariadneplus/virtuoso/test_less_data.rdf"), defaultURIBaseURl);
long size2 = md.size();
System.out.println("==Inserted " + size2 + "triples==");
md.removeAll();
}
@Test
public void testRemoveAllWildcards() {
VirtGraph graph = new VirtGraph(testGraph, connectionString, testUser, testPwd);
assertNotNull(graph);
graph.clear();
Assert.assertTrue(graph.isEmpty());
Triple t1 = new Triple(NodeFactory.createURI("http://test/1"), NodeFactory.createURI("http://test/is_friend_of"),
NodeFactory.createURI("http://test/KevinBacon"));
Triple t2 = new Triple(NodeFactory.createURI("http://test/1"), NodeFactory.createURI("http://test/is_friend_of"),
NodeFactory.createURI("http://test/BonoVox"));
Triple t3 = new Triple(NodeFactory.createURI("http://test/1"), NodeFactory.createURI("http://test/is_enemy_of"),
NodeFactory.createURI("http://test/Spiderman"));
graph.performAdd(t1);
graph.performAdd(t2);
graph.performAdd(t3);
assertEquals(3, graph.getCount());
Model md = VirtModel.openDatabaseModel(testGraph, connectionString, testUser, testPwd);
assertEquals(3, md.size());
md.removeAll(ResourceFactory.createResource("http://test/1"), ResourceFactory.createProperty("http://test/is_enemy_of"), null);
assertEquals(2, md.size());
}
@Test
public void testSearch() {
VirtGraph graph = new VirtGraph(testGraph, connectionString, testUser, testPwd);
assertNotNull(graph);
graph.clear();
Assert.assertTrue(graph.isEmpty());
Triple t1 = new Triple(NodeFactory.createURI("http://test/1"), NodeFactory.createURI("http://test/is_friend_of"),
NodeFactory.createURI("http://test/KevinBacon"));
Triple t2 = new Triple(NodeFactory.createURI("http://test/1"), NodeFactory.createURI("http://test/is_friend_of"),
NodeFactory.createURI("http://test/BonoVox"));
Triple t3 = new Triple(NodeFactory.createURI("http://test/1"), NodeFactory.createURI("http://test/is_enemy_of"),
NodeFactory.createURI("http://test/Spiderman"));
graph.performAdd(t1);
graph.performAdd(t2);
graph.performAdd(t3);
assertEquals(3, graph.getCount());
final ExtendedIterator<Triple> friends = graph.find(null, NodeFactory.createURI("http://test/is_friend_of"), null);
while (friends.hasNext()) {
System.out.println(friends.next());
}
}
private InputStream getResourceAsStream(final String classpath) {
try {
final ClassPathResource resource = new ClassPathResource(classpath);
return resource.getInputStream();
} catch (IOException e) {
return null;
}
}
}

View File

@ -0,0 +1,25 @@
#virtuoso.sparqlurl = http://localhost:8890/sparql
#virtuoso.connectionstring = jdbc:virtuoso://localhost:1111
#virtuoso.pwd = dba
#virtuoso.usr = dba
virtuoso.sparqlurl = https://ip-90-147-167-173.ct1.garrservices.it/sparql
virtuoso.connectionstring = jdbc:virtuoso://ip-90-147-167-173.ct1.garrservices.it:1111
virtuoso.pwd = d93ab92c7b3bfa1
virtuoso.usr = dba
virtuoso.uri.base.default = http://ariadneplus.d4science.org/handle/
#gcube.registry.baseurl = https://registry-ariadneplus.d4science.org/resource-registry/
gcube.registry.baseurl = http://registry-t-ariadneplus.d4science.org:80/resource-registry
gcube.registry.uri.base.default = http://ariadneplus.d4science.org/handle/
gcube.registry.application.name = AriadnePlusAggregator
gcube.registry.application.token = ff70d166-dc6b-468e-9a2d-81c91a796a40-843339462
#gcube.catalogue.baseurl = https://catalogue-ws-t.pre.d4science.org/catalogue-ws/
#gcube.catalogue.baseurl = https://catalogue-ws.d4science.org/catalogue-ws/
#gcube.uri.resolver=https://data1-p.d4science.org/ariadneplus_registry
gcube.catalogue.baseurl = https://gcat.d4science.org/gcat/
gcube.uri.resolver = https://data.d4science.org/ariadneplus_registry/

View File

@ -0,0 +1,638 @@
<!--
CRMdig 3.2.2 Encoded in RDFS
RDFS updated by FORTH-ICS April 2018
base changed from http://www.ics.forth.gr/isl/CRMdig/ to http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/
RDFS updated by FORTH-ICS April 2016
Encoding Rules:
1. The RDF spelling rules do not allow blanks. Hence we have replaced them by underscores.
The blank between the concept identifier and concept name is replaced by underscore too.
For instance "D7_Digital_Machine_Event" or "P2i_is_type_of".
2. RDF does not allow to instantiate properties beginning from a range value.
Therefore, each CRMdig property is represented as two RDFS properties.
For instance "L2 used as source (was source for)" is represented as:
"L2_used_as_source" for the domain to range direction and "L2i_was_source_for" for the range to domain direction.
-->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/" xml:lang="en">
<rdfs:Class rdf:about="D1_Digital_Object">
<rdfs:comment>This class comprises identifiable immaterial items that can be represented as sets of bit sequences,
such as data sets, e-texts, images, audio or video items, software, etc., and are documented as single units.
Any aggregation of instances of D1 Digital Object into a whole treated as single unit is also regarded as an instance of D1 Digital Object.
This means that for instance, the content of a DVD, an XML file on it, and an element of this file, are regarded as distinct instances of
D1 Digital Object, mutually related by the P106 is composed of (forms part of) property.
A D1 Digital Object does not depend on a specific physical carrier, and it can exist on one or more carriers simultaneously.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E73_Information_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="D2_Digitization_Process">
<rdfs:comment>This class comprises events that result in the creation of instances of D9 Data Object that
represent the appearance and/or form of an instance of E18 Physical Thing such as paper documents, statues, buildings, paintings, etc.
A particular case is the analogue-to-digital conversion of audiovisual material.
This class represents the transition from a material thing to an immaterial representation of it.
The characteristic subsequent processing steps on digital objects are regarded as instances of D3 Formal Derivation.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="D11_Digital_Measurement_Event"/>
</rdfs:Class>
<rdfs:Class rdf:about="D3_Formal_Derivation">
<rdfs:comment>This class comprises events that result in the creation of a D1 Digital Object from another one following a deterministic algorithm,
such that the resulting instance of digital object shares representative properties with the original object.
In other words, this class describes the transition from an immaterial object referred to by property L21 used as derivation source (was derivation source for)
to another immaterial object referred to by property L22 created derivative (was derivative created by) preserving the
representation of some things but in a different form. Characteristic examples are colour corrections, contrast changes and resizing of images.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="D10_Software_Execution"/>
</rdfs:Class>
<rdfs:Class rdf:about="D7_Digital_Machine_Event">
<rdfs:comment>This class comprises events that happen on physical digital devices following a human activity that intentionally caused its
immediate or delayed initiation and results in the creation of a new instance of D1 Digital Object on behalf of the human actor.
The input of a D7 Digital Machine Event may be parameter settings and/or data to be processed.
Some D7 Digital Machine Events may form part of a wider E65 Creation event.
In this case, all machine output of the partial events is regarded as creation of the overall activity.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E11_Modification"/>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E65_Creation"/>
</rdfs:Class>
<rdfs:Class rdf:about="D8_Digital_Device">
<rdfs:comment>This class comprises identifiable material items such as computers, scanners, cameras, etc. that
have the capability to process or produce instances of D1 Digital Object.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E22_Man-Made_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="D9_Data_Object">
<rdfs:comment>This class comprises instances of D1 Digital Object that are the direct result of a digital
measurement or a formal derivative of it, containing quantitative properties of some physical things or other constellations of matter.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E54_Dimension"/>
<rdfs:subClassOf rdf:resource="D1_Digital_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="D10_Software_Execution">
<rdfs:comment>This class comprises events by which a digital device runs a software program or a series of computing
operations on a digital object as a single task, which is completely determined by its digital input,
the software and the generic properties of the device.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="D7_Digital_Machine_Event"/>
</rdfs:Class>
<rdfs:Class rdf:about="D11_Digital_Measurement_Event">
<rdfs:comment>This class comprises actions measuring physical properties using a digital device,
that are determined by a systematic procedure and creates an instance of D9 Data Object,
which is stored on an instance of D13 Digital Information Carrier.
In contrast to instances of D10 Software Execution, environmental factors have an intended influence on the outcome of an instance of D11 Digital Measurement Event.
Measurement devices may include running distinct software, such as the RAW to JPEG conversion in digital cameras.
In this case, the event is regarded as instance of both classes, D10 Software Execution and D11 Digital Measurement Event.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E16_Measurement"/>
<rdfs:subClassOf rdf:resource="D7_Digital_Machine_Event"/>
</rdfs:Class>
<rdfs:Class rdf:about="D12_Data_Transfer_Event">
<rdfs:comment>This class comprises events that transfer a digital object from one digital carrier to another.
Normally, the digital object remains the same. If in general or by observation the transfer implies or has
implied some data corruption, the change of the digital objects may be documented distinguishing input and output
rather than instantiating the property L14 transferred (was transferred by).
</rdfs:comment>
<rdfs:subClassOf rdf:resource="D7_Digital_Machine_Event"/>
</rdfs:Class>
<rdfs:Class rdf:about="D13_Digital_Information_Carrier">
<rdfs:comment>This class comprises all instances of E84 Information Carrier that are explicitly designed to be
used as persistent digital physical carriers of instances of D1 Digital Object.
A D13 Digital Information Carrier may or may not contain information, e.g., an empty diskette.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E84_Information_Carrier"/>
</rdfs:Class>
<rdfs:Class rdf:about="D14_Software">
<rdfs:comment>This class comprises software codes,computer programs,procedures, and functions that are
used to operate a system of digital objects. </rdfs:comment>
<rdfs:subClassOf rdf:resource="D1_Digital_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="D21_Person_Name">
<rdfs:comment>This class comprises the proper noun name that identifies a person that acts
as an entity.</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E82_Actor_Appellation"/>
</rdfs:Class>
<rdfs:Class rdf:about="D23_Room">
<rdfs:comment/>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E53_Place"/>
</rdfs:Class>
<rdfs:Class rdf:about="D29_Annotation_Object">
<rdfs:comment>This class comprises objects that make propositions about other artefacts.
Instances of this class are not the attributes themselves, by which things are annotated,
but represent the connection between the concepts related in a proposition, and the activities of creation, modification and deletion.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E89_Propositional_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="D30_Annotation_Event">
<rdfs:comment>This class comprises events that describe the creation of associations (Annotation Objects) between objects
or areas of objects of the Repository, with other objects or regions or persons, places, events. It is the event that creates the Annotation Object.</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E65_Creation"/>
</rdfs:Class>
<rdfs:Class rdf:about="D35_Area">
<rdfs:comment>This class describes a part (of any shape or size) of interest in basically any media object stored in the Object Repository,
i.e., a text, an image, a video or a 3D model. It points to content consisting of just a portion or area of a file.
In some contexts, however, the area can also point to content represented by an integral (i.e., proper) file. It is equal to the METS AREA element </rdfs:comment>
<rdfs:subClassOf rdf:resource="D1_Digital_Object"/>
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E26_Physical_Feature"/>
</rdfs:Class>
<rdf:Property rdf:about="L1_digitized">
<rdfs:comment>This property associates an instance of D2 Digitization Process with an instance of E18 Physical Thing which is a material thing.
This property is a specialisation of P39 measured (was measured by).
</rdfs:comment>
<rdfs:domain rdf:resource="D2_Digitization_Process"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E18_Physical_Thing"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P39_measured"/>
</rdf:Property>
<rdf:Property rdf:about="L1i_was_digitized_by">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E18_Physical_Thing"/>
<rdfs:range rdf:resource="D2_Digitization_Process"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P39i_was_measured_by"/>
</rdf:Property>
<rdf:Property rdf:about="L2_used_as_source">
<rdfs:comment>This property associates an instance of D10 Software Execution with an instance of D1 Digital Object
which is used as a source, a software essential for the performance.
This property is a specialisation of L10F had input (was input of).
</rdfs:comment>
<rdfs:domain rdf:resource="D10_Software_Execution"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="L10_had_input"/>
</rdf:Property>
<rdf:Property rdf:about="L2i_was_source_for">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D10_Software_Execution"/>
<rdfs:subPropertyOf rdf:resource="L10i_was_input_of"/>
</rdf:Property>
<rdf:Property rdf:about="L4_has_preferred_label">
<rdfs:comment>This property associates an instance of E1 Entity with an instance of resource used as a preferred lexical label.
This property is a specialisation of rdf schema label.
</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#label"/>
</rdf:Property>
<rdf:Property rdf:about="L10_had_input">
<rdfs:comment>This property associates an instance of D7 Digital Machine Event with an instance of D1 Digital Object
which is the input used to specify the machine action.
This property is a specialisation of P16 used specific object(was used for).
</rdfs:comment>
<rdfs:domain rdf:resource="D7_Digital_Machine_Event"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16_used_specific_object"/>
</rdf:Property>
<rdf:Property rdf:about="L10i_was_input_of">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D7_Digital_Machine_Event"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16i_was_used_for"/>
</rdf:Property>
<rdf:Property rdf:about="L11_had_output">
<rdfs:comment>This property associates an instance of D7 Digital Machine Event with an instance of D1 Digital Object
which is the output of the activity.
This property is a specialisation of P94 has created (was created by).</rdfs:comment>
<rdfs:domain rdf:resource="D7_Digital_Machine_Event"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P94_has_created"/>
</rdf:Property>
<rdf:Property rdf:about="L11i_was_output_of">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D7_Digital_Machine_Event"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P94i_was_created_by"/>
</rdf:Property>
<rdf:Property rdf:about="L12_happened_on_device">
<rdfs:comment>This property associates an instance of D7 Digital Machine Event with an object,
the D8 Digital Device, which happened with, e.g a capturing event that happened on/with a digital camera, etc.
This property is a specialisation of P12 occurred in the presence of (was present at).</rdfs:comment>
<rdfs:domain rdf:resource="D7_Digital_Machine_Event"/>
<rdfs:range rdf:resource="D8_Digital_Device"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P12_occurred_in_the_presence_of"/>
</rdf:Property>
<rdf:Property rdf:about="L12i_was_device_for">
<rdfs:domain rdf:resource="D8_Digital_Device"/>
<rdfs:range rdf:resource="D7_Digital_Machine_Event"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P12i_was_present_at"/>
</rdf:Property>
<rdf:Property rdf:about="L13_used_parameters">
<rdfs:comment>This property associates an instance of D10 Software Execution with a digital object
used as a parameter during the process.This property is a specialisation of L1O had input (was input of).</rdfs:comment>
<rdfs:domain rdf:resource="D10_Software_Execution"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="L10_had_input"/>
</rdf:Property>
<rdf:Property rdf:about="L13i_parameters_for">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D10_Software_Execution"/>
<rdfs:subPropertyOf rdf:resource="L10i_was_input_of"/>
</rdf:Property>
<rdf:Property rdf:about="L14_transferred">
<rdfs:comment>This property identifies a digital object transferred by a D12 Data Transfer Event.
This property is a specialisation of L11 had output (was output of).</rdfs:comment>
<rdfs:domain rdf:resource="D12_Data_Transfer_Event"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="L10_had_input"/>
<rdfs:subPropertyOf rdf:resource="L11_had_output"/>
</rdf:Property>
<rdf:Property rdf:about="L14i_was_transferred_by">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D12_Data_Transfer_Event"/>
<rdfs:subPropertyOf rdf:resource="L10i_was_input_of"/>
<rdfs:subPropertyOf rdf:resource="L11i_was_output_of"/>
</rdf:Property>
<rdf:Property rdf:about="L15_has_sender">
<rdfs:comment>This property identifies a digital device used as a medium on which data are transferred
through a D12 Data Transfer Event.</rdfs:comment>
<rdfs:domain rdf:resource="D12_Data_Transfer_Event"/>
<rdfs:range rdf:resource="D8_Digital_Device"/>
<rdfs:subPropertyOf rdf:resource="L12_happened_on_device"/>
</rdf:Property>
<rdf:Property rdf:about="L15i_was_sender_for">
<rdfs:domain rdf:resource="D8_Digital_Device"/>
<rdfs:range rdf:resource="D12_Data_Transfer_Event"/>
<rdfs:subPropertyOf rdf:resource="L12i_was_device_for"/>
</rdf:Property>
<rdf:Property rdf:about="L16_has_receiver">
<rdfs:comment>This property identifies a digital device used as a medium to receive data
through a D12 Data Transfer Event.</rdfs:comment>
<rdfs:domain rdf:resource="D12_Data_Transfer_Event"/>
<rdfs:range rdf:resource="D8_Digital_Device"/>
<rdfs:subPropertyOf rdf:resource="L12_happened_on_device"/>
</rdf:Property>
<rdf:Property rdf:about="L16i_was_receiver_for">
<rdfs:domain rdf:resource="D8_Digital_Device"/>
<rdfs:range rdf:resource="D12_Data_Transfer_Event"/>
<rdfs:subPropertyOf rdf:resource="L12i_was_device_for"/>
</rdf:Property>
<rdf:Property rdf:about="L17_measured_thing_of_type">
<rdfs:comment>This property associates an instance of D11 Digital Measurement Event with the instance of E55
Type of object to which it applied. This property is a specialisation of P125 used object of type. </rdfs:comment>
<rdfs:domain rdf:resource="D11_Digital_Measurement_Event"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E55_Type"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P125_used_object_of_type"/>
</rdf:Property>
<rdf:Property rdf:about="L17i_was_type_of_thing_measured_by">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E55_Type"/>
<rdfs:range rdf:resource="D11_Digital_Measurement_Event"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P125i_was_type_of_object_used_in"/>
</rdf:Property>
<rdf:Property rdf:about="L18_has_modified">
<rdfs:comment>This property identifies a Digital Information Carrier modified in a Digital Machine Event.
This property is a specialisation of P31 has modified.</rdfs:comment>
<rdfs:domain rdf:resource="D7_Digital_Machine_Event"/>
<rdfs:range rdf:resource="D13_Digital_Information_Carrier"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P31_has_modified"/>
</rdf:Property>
<rdf:Property rdf:about="L18i_was_modified_by">
<rdfs:domain rdf:resource="D13_Digital_Information_Carrier"/>
<rdfs:range rdf:resource="D7_Digital_Machine_Event"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P31i_was_modified_by"/>
</rdf:Property>
<rdf:Property rdf:about="L19_stores">
<rdfs:comment>This property associates an instance of a D13 Digital Information Carrier with the instance of Digital Object
that is stored on it. This property is a specialisation of P128 carries.</rdfs:comment>
<rdfs:domain rdf:resource="D13_Digital_Information_Carrier"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P128_carries"/>
</rdf:Property>
<rdf:Property rdf:about="L19i_is_stored_on">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D13_Digital_Information_Carrier"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P128i_is_carried_by"/>
</rdf:Property>
<rdf:Property rdf:about="L20_has_created">
<rdfs:comment>This property identifies a Data Object that came into existence as a result of a D11 Digital Measurement Event.
This property is a specialisation of P40 observed dimension and L11 had output.</rdfs:comment>
<rdfs:domain rdf:resource="D11_Digital_Measurement_Event"/>
<rdfs:range rdf:resource="D9_Data_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P40_observed_dimension"/>
<rdfs:subPropertyOf rdf:resource="L11_had_output"/>
</rdf:Property>
<rdf:Property rdf:about="L20i_was_created_by">
<rdfs:domain rdf:resource="D9_Data_Object"/>
<rdfs:range rdf:resource="D11_Digital_Measurement_Event"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P40i_was_observed_in"/>
<rdfs:subPropertyOf rdf:resource="L11i_was_output_of"/>
</rdf:Property>
<rdf:Property rdf:about="L21_used_as_derivation_source">
<rdfs:comment>This property associates an instance of a D3 Formal Derivation with the instance of D1 Digital Object that is used as a derivation source.</rdfs:comment>
<rdfs:domain rdf:resource="D3_Formal_Derivation"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="L2_used_as_source"/>
</rdf:Property>
<rdf:Property rdf:about="L21i_was_derivation_source_for">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D3_Formal_Derivation"/>
<rdfs:subPropertyOf rdf:resource="L2i_was_source_for"/>
</rdf:Property>
<rdf:Property rdf:about="L22_created_derivative">
<rdfs:comment>This property associates an instance of D3 Formal Derivation with the Digital Object it used to create a version of.
This property is a specialisation of L11 had output.</rdfs:comment>
<rdfs:domain rdf:resource="D3_Formal_Derivation"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="L11_had_output"/>
</rdf:Property>
<rdf:Property rdf:about="L22i_was_derivative_created_by">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D3_Formal_Derivation"/>
<rdfs:subPropertyOf rdf:resource="L11i_was_output_of"/>
</rdf:Property>
<rdf:Property rdf:about="L23_used_software_or_firmware">
<rdfs:comment>This property associates an instance of D7 Digital Machine Event with the instance of D14 Software that had used.
This property is a specialisation of P16 used specific object.</rdfs:comment>
<rdfs:domain rdf:resource="D7_Digital_Machine_Event"/>
<rdfs:range rdf:resource="D14_Software"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16_used_specific_object"/>
</rdf:Property>
<rdf:Property rdf:about="L23i_was_software_or_firmware_used_by">
<rdfs:domain rdf:resource="D14_Software"/>
<rdfs:range rdf:resource="D7_Digital_Machine_Event"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16i_was_used_for"/>
</rdf:Property>
<rdf:Property rdf:about="L24_created_logfile">
<rdfs:comment>This property identifies the logfile that was created by a D10 Software Execution in order to record all the activities in the system.</rdfs:comment>
<rdfs:domain rdf:resource="D10_Software_Execution"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="L11_had_output"/>
</rdf:Property>
<rdf:Property rdf:about="L24i_was_logfile_created_by">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D10_Software_Execution"/>
<rdfs:subPropertyOf rdf:resource="L11i_was_output_of"/>
</rdf:Property>
<rdf:Property rdf:about="L29_has_responsible_organization">
<rdfs:comment>This property describes the participation of a Legal Body in being responsible for the outcome of a specific activity.
This property is a specialisation of P14 carried out by.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E40_Legal_Body"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P14_carried_out_by"/>
</rdf:Property>
<rdf:Property rdf:about="L29i_is_responsible_organization_for">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E40_Legal_Body"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P14i_performed"/>
</rdf:Property>
<rdf:Property rdf:about="L30_has_operator">
<rdfs:comment>This property describes the activity that is being operated by a person.
This property is a specialisation of P14 carried out by.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E21_Person"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P14_carried_out_by"/>
</rdf:Property>
<rdf:Property rdf:about="L30i_is_operator_of">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E21_Person"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P14i_performed"/>
</rdf:Property>
<rdf:Property rdf:about="L31_has_starting_date-time">
<rdfs:comment>This property allows the starting point for a D7 Digital Machine Event to be situated.
This property expresses the approximation of the starting date of a time span.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E5_Event"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P82a_begin_of_the_begin"/>
</rdf:Property>
<rdf:Property rdf:about="L32_has_ending_date-time">
<rdfs:comment>This property allows the ending point for a D7 Digital Machine Event to be situated.
This property expresses the approximation of the ending date of a time span.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E5_Event"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P82b_end_of_the_end"/>
</rdf:Property>
<rdf:Property rdf:about="L33_has_maker">
<rdfs:comment>This property identifies the maker, the actor who is responsible for the production of a device,
a computer, a digital camera, any kind of a machine that has been produced.
This property is a shortcut of a more fully developed path from CRM E12 Production:P108 has produced:E24 Physical Man-Made Thing.
In this case, there is no need to describe the more detailed property through a production event,so L33 has maker is reccomended to be used instead. </rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E72_Legal_Object"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E39_Actor"/>
</rdf:Property>
<rdf:Property rdf:about="L33i_is_maker_of">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E39_Actor"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E72_Legal_Object"/>
</rdf:Property>
<!-- EXTENTION for contractor and commissioner -->
<rdf:Property rdf:about="L34_has_contractor">
<rdfs:comment>This property describes the participation of a Legal Body in being contractor for the outcome of a specific activity.
This property is a specialisation of L29_has_responsible_organization.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E40_Legal_Body"/>
<rdfs:subPropertyOf rdf:resource="L29_has_responsible_organization"/>
</rdf:Property>
<rdf:Property rdf:about="L34i_is_contractor_for">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E40_Legal_Body"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<rdfs:subPropertyOf rdf:resource="L29i_is_responsible_organization_for"/>
</rdf:Property>
<rdf:Property rdf:about="L35_has_commissioner">
<rdfs:comment>This property describes the participation of a Legal Body in being commissioner for the outcome of a specific activity.
This property is a specialisation of L29_has_responsible_organization.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E40_Legal_Body"/>
<rdfs:subPropertyOf rdf:resource="L29_has_responsible_organization"/>
</rdf:Property>
<rdf:Property rdf:about="L35i_is_commissioner_for">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E40_Legal_Body"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<rdfs:subPropertyOf rdf:resource="L29i_is_responsible_organization_for"/>
</rdf:Property>
<!-- END of EXTENTION for contractor and commissioner-->
<rdf:Property rdf:about="L43_annotates">
<rdfs:comment>This property describes the associations between objects or areas of objects of the RI,
with other objects or regions or persons, places, events..</rdfs:comment>
<rdfs:domain rdf:resource="D29_Annotation_Object"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
</rdf:Property>
<rdf:Property rdf:about="L43i_is_annotated_by">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdfs:range rdf:resource="D29_Annotation_Object"/>
</rdf:Property>
<rdf:Property rdf:about="L47_has_comment">
<rdfs:comment>This property is a specialisation of P3 has note and associates a comment with an instance of an object E1 CRM Entity.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P3_has_note"/>
</rdf:Property>
<rdf:Property rdf:about="L48_created_annotation">
<rdfs:comment>This property identifies the D29 Annotation Object (associations) that came into existence as a result of a D30 Annotation Event.
This property is a specialisation of P94 has created.</rdfs:comment>
<rdfs:domain rdf:resource="D30_Annotation_Event"/>
<rdfs:range rdf:resource="D29_Annotation_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P94_has_created"/>
</rdf:Property>
<rdf:Property rdf:about="L48i_was_annotation_created_by">
<rdfs:domain rdf:resource="D29_Annotation_Object"/>
<rdfs:range rdf:resource="D30_Annotation_Event"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P94i_was_created_by"/>
</rdf:Property>
<rdf:Property rdf:about="L49_is_primary_area_of">
<rdfs:comment>This property describes the association between a particular area declared in an original digital object.
This property is a specialisation of P106 is composed of.</rdfs:comment>
<rdfs:domain rdf:resource="D35_Area"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P106i_forms_part_of"/>
</rdf:Property>
<rdf:Property rdf:about="L49i_has_primary_area">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D35_Area"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P106_is_composed_of"/>
</rdf:Property>
<rdf:Property rdf:about="L50_is_propagated_area_of">
<rdfs:comment>This property describes the association between an area and the digital object to which it is propagated.
This property is a specialisation of P106 is composed of.</rdfs:comment>
<rdfs:domain rdf:resource="D35_Area"/>
<rdfs:range rdf:resource="D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P106i_forms_part_of"/>
</rdf:Property>
<rdf:Property rdf:about="L50i_has_propagated_area">
<rdfs:domain rdf:resource="D1_Digital_Object"/>
<rdfs:range rdf:resource="D35_Area"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P106_is_composed_of"/>
</rdf:Property>
<rdf:Property rdf:about="L51_has_first_name">
<rdfs:comment>This property defines a personal name used to identify a person.</rdfs:comment>
<rdfs:domain rdf:resource="D21_Person_Name"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#label"/>
</rdf:Property>
<rdf:Property rdf:about="L52_has_last_name">
<rdfs:comment>This property defines the last name used to identify a person.
This property is a specialisation of L4 has preferred label.</rdfs:comment>
<rdfs:domain rdf:resource="D21_Person_Name"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
<rdfs:subPropertyOf rdf:resource="L4_has_preferred_label"/>
</rdf:Property>
<rdf:Property rdf:about="L53_is_not_uniquely_identified_by">
<rdfs:comment>This property describes a non unique identification applied to E1 CRM Entity.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#label"/>
</rdf:Property>
<rdf:Property rdf:about="L54_is_same-as">
<rdfs:comment>This property describes the association kind of "same as" between objects. It is used to declare that two or more objects are
exactly the same.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
</rdf:Property>
<rdf:Property rdf:about="L54i_is_same-as">
<rdfs:comment>This property describes the association kind of "same as" between objects. It is used to declare that two or more objects are
exactly the same.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
</rdf:Property>
<rdf:Property rdf:about="L55_has_inventory_no">
<rdfs:comment>This property records the inventory number that was used to identify an instance of E1 CRM Entity
at the time this property was record. This property is a specialisation of L53F is not uniquely identified by.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
<rdfs:subPropertyOf rdf:resource="L53_is_not_uniquely_identified_by"/>
</rdf:Property>
<rdf:Property rdf:about="L56_has_pixel_width">
<rdfs:comment>This property records the pixel width of the data object; it approximates a dimension that is
part of the image data analysis.This property is a specialisation of P90 has value.</rdfs:comment>
<rdfs:domain rdf:resource="D9_Data_Object"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P90_has_value"/>
</rdf:Property>
<rdf:Property rdf:about="L57_has_pixel_height">
<rdfs:comment>This property records the pixel height of the data object; it approximates a dimension that is
part of the image data analysis.This property is a specialisation of P90 has value.</rdfs:comment>
<rdfs:domain rdf:resource="D9_Data_Object"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P90_has_value"/>
</rdf:Property>
<rdf:Property rdf:about="L59_has_serial_number">
<rdfs:comment>This property records the serial number that was assigned to identify an instance of E22 Man Made Object.
This property is a specialisation of L53 is not uniquely identified by.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E22_Man-Made_Object"/>
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
<rdfs:subPropertyOf rdf:resource="L53_is_not_uniquely_identified_by"/>
</rdf:Property>
<rdf:Property rdf:about="L60_documents">
<rdfs:comment>This property describes the CRM Entities documented by instances of Digitization Processes.
This property is a specialisation of P140 assigned attribute to.</rdfs:comment>
<rdfs:domain rdf:resource="D2_Digitization_Process"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P140_assigned_attribute_to"/>
</rdf:Property>
<rdf:Property rdf:about="L60i_is_documented_by">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdfs:range rdf:resource="D2_Digitization_Process"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P140i_was_attributed_by"/>
</rdf:Property>
<rdf:Property rdf:about="L61_was_ongoing_at">
<rdfs:comment>This property describes the minimum period of time covered by a digital machine event. It
identifies the minimum extent of the event. This property is a specialisation of P81 ongoing throughout.</rdfs:comment>
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E5_Event"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P81a_end_of_the_begin"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P81b_begin_of_the_end"/>
</rdf:Property>
</rdf:RDF>

View File

@ -0,0 +1,530 @@
<!--
ARIADNEPLUS Entities CRMpe 2.1 Encoded in RDFS
RDFS updated by FORTH April 03, 2018
changed CRMdig base from http://www.ics.forth.gr/isl/CRMdig/ to http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/
RDFS updated by CNR ISTI September 29, 2017
fixed base from http://pathenos.d4science.org/CRMext/CRMpe.rdfs/ to http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/
RDFS updated by FORTH May 22, 2017
changed base from http://www.ics.forth.gr/isl/CRMpe/ to http://pathenos.d4science.org/CRMext/CRMpe.rdfs/
RDFS updated by FORTH April 13, 2017
corrected typos that by Luca Frosini pointed out
RDFS updated by FORTH March 9, 2017
RDFS updated by CNR February 2, 2017
added PE20_Volatile_Digital_Object as subclass of PE32_Curated_Thing
RDFS updated by CNR January 30, 2017
corrected PE20, PE21 and PP28i (they contained blanks)
RDFS updated by FORTH-ICS September 19, 2016
corrected some typos, added PE26, removed PE27, added PP41 and PP42
RDFS created by FORTH-ICS August 19, 2016
Encoding Rules:
1. The RDF spelling rules do not allow blanks. Hence we have replaced them by underscores.
The blank between the concept identifier and concept name is replaced by underscore too.
For instance "PE1_Service" or "PP1_currently_offers".
2. RDF does not allow to instantiate properties beginning from a range value.
Therefore, each CRMpe property is represented as two RDFS properties.
For instance "PP1 currently offers(is currently offered by)" is represented as:
"PP1_currently offers" for the domain to range direction and "PP1i_is_currently_offered_by" for the range to domain direction.
-->
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/" xml:lang="en">
<rdfs:Class rdf:about="PE1_Service">
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE2_Hosting_Service">
<rdfs:subClassOf rdf:resource="PE1_Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE3_Curating_Service">
<rdfs:subClassOf rdf:resource="PE1_Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE5_Digital_Hosting_Service">
<rdfs:subClassOf rdf:resource="PE2_Hosting_Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE6_Software_Hosting_Service">
<rdfs:subClassOf rdf:resource="PE5_Digital_Hosting_Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE7_Data_Hosting_Service">
<rdfs:subClassOf rdf:resource="PE5_Digital_Hosting_Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE8_E-Service">
<rdfs:subClassOf rdf:resource="PE1_Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE10_Digital_Curating_Service">
<rdfs:subClassOf rdf:resource="PE3_Curating_Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE11_Software_Curating_Service">
<rdfs:subClassOf rdf:resource="PE10_Digital_Curating_Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE12_Data_Curating_Service">
<rdfs:subClassOf rdf:resource="PE10_Digital_Curating_Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE13_Software_Computing_E-Service">
<rdfs:subClassOf rdf:resource="PE6_Software_Hosting_Service"/>
<rdfs:subClassOf rdf:resource="PE8_E-Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE14_Software_Delivery_E-Service">
<rdfs:subClassOf rdf:resource="PE6_Software_Hosting_Service"/>
<rdfs:subClassOf rdf:resource="PE8_E-Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE15_Data_E-Service">
<rdfs:subClassOf rdf:resource="PE7_Data_Hosting_Service"/>
<rdfs:subClassOf rdf:resource="PE8_E-Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE16_Curated_Software_E-Service">
<rdfs:subClassOf rdf:resource="PE11_Software_Curating_Service"/>
<rdfs:subClassOf rdf:resource="PE14_Software_Delivery_E-Service"/>
<rdfs:subClassOf rdf:resource="PE13_Software_Computing_E-Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE17_Curated_Data_E-Service">
<rdfs:subClassOf rdf:resource="PE12_Data_Curating_Service"/>
<rdfs:subClassOf rdf:resource="PE15_Data_E-Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE18_Dataset">
<rdfs:subClassOf rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE19_Persistent_Digital_Object">
<rdfs:subClassOf rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE20_Volatile_Digital_Object">
<rdfs:subClassOf rdf:resource="PE32_Curated_Thing"/>
<rdfs:subClassOf rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE21_Persistent_Software">
<rdfs:subClassOf rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:subClassOf rdf:resource="PE19_Persistent_Digital_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE22_Persistent_Dataset">
<rdfs:subClassOf rdf:resource="PE18_Dataset"/>
<rdfs:subClassOf rdf:resource="PE19_Persistent_Digital_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE23_Volatile_Software">
<rdfs:subClassOf rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:subClassOf rdf:resource="PE20_Volatile_Digital_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE24_Volatile_Dataset">
<rdfs:subClassOf rdf:resource="PE18_Dataset"/>
<rdfs:subClassOf rdf:resource="PE20_Volatile_Digital_Object"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE25_RI_Consortium">
<rdfs:subClassOf rdf:resource="PE34_Team"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE26_RI_Project">
<rdfs:subClassOf rdf:resource="PE35_Project"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE28_Curation_Plan">
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E29_Design_or_Procedure"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE29_Access_Point">
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E51_Contact_Point"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE32_Curated_Thing">
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E70_Thing"/>
</rdfs:Class>
<rdfs:Class rdf:about="http://www.cidoc-crm.org/cidoc-crm/E78_Curated_Holding">
<rdfs:subClassOf rdf:resource="PE32_Curated_Thing"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE33_E-Access_Brokering_Service">
<rdfs:subClassOf rdf:resource="PE8_E-Service"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE34_Team">
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E74_Group"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE35_Project">
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE36_Competency_Type">
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E55_Type"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE37_Protocol_Type">
<rdfs:subClassOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E55_Type"/>
</rdfs:Class>
<rdfs:Class rdf:about="PE38_Schema">
<rdfs:subClassOf rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
</rdfs:Class>
<rdf:Property rdf:about="PP1_currently_offers">
<rdfs:domain rdf:resource="PE26_RI_Project"/>
<rdfs:range rdf:resource="PE1_Service"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P9_consists_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP1i_is_currently_offered_by">
<rdfs:domain rdf:resource="PE1_Service"/>
<rdfs:range rdf:resource="PE26_RI_Project"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P9i_forms_part_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP2_provided_by">
<rdfs:domain rdf:resource="PE1_Service"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E39_Actor"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P14_carried_out_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP2i_provides">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E39_Actor"/>
<rdfs:range rdf:resource="PE1_Service"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P14i_performed"/>
</rdf:Property>
<rdf:Property rdf:about="PP4_hosts_object">
<rdfs:domain rdf:resource="PE2_Hosting_Service"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E70_Thing"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16_used_specific_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP4i_is_object_hosted_by">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E70_Thing"/>
<rdfs:range rdf:resource="PE2_Hosting_Service"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16i_was_used_for"/>
</rdf:Property>
<rdf:Property rdf:about="PP6_hosts_digital_object">
<rdfs:domain rdf:resource="PE5_Digital_Hosting_Service"/>
<rdfs:range rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="PP4_hosts_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP6i_is_digital_object_hosted_by">
<rdfs:domain rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
<rdfs:range rdf:resource="PE5_Digital_Hosting_Service"/>
<rdfs:subPropertyOf rdf:resource="PP4i_is_object_hosted_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP7_hosts_software_object">
<rdfs:domain rdf:resource="PE6_Software_Hosting_Service"/>
<rdfs:range rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:subPropertyOf rdf:resource="PP6_hosts_digital_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP7i_is_software_object_hosted_by">
<rdfs:domain rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:range rdf:resource="PE6_Software_Hosting_Service"/>
<rdfs:subPropertyOf rdf:resource="PP6i_is_digital_object_hosted_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP8_hosts_dataset">
<rdfs:domain rdf:resource="PE7_Data_Hosting_Service"/>
<rdfs:range rdf:resource="PE18_Dataset"/>
<rdfs:subPropertyOf rdf:resource="PP6_hosts_digital_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP8i_is_dataset_hosted_by">
<rdfs:domain rdf:resource="PE18_Dataset"/>
<rdfs:range rdf:resource="PE7_Data_Hosting_Service"/>
<rdfs:subPropertyOf rdf:resource="PP6i_is_digital_object_hosted_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP11_curates_volatile_digital_object">
<rdfs:domain rdf:resource="PE10_Digital_Curating_Service"/>
<rdfs:range rdf:resource="PE20_Volatile_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="PP32_curates"/>
</rdf:Property>
<rdf:Property rdf:about="PP11i_is_volatile_digital_object_curated_by">
<rdfs:domain rdf:resource="PE20_Volatile_Digital_Object"/>
<rdfs:range rdf:resource="PE10_Digital_Curating_Service"/>
<rdfs:subPropertyOf rdf:resource="PP32i_is_curated_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP12_curates_volatile_software">
<rdfs:domain rdf:resource="PE11_Software_Curating_Service"/>
<rdfs:range rdf:resource="PE23_Volatile_Software"/>
<rdfs:subPropertyOf rdf:resource="PP11_curates_volatile_digital_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP12i_is_volatile_software_curated_by">
<rdfs:domain rdf:resource="PE23_Volatile_Software"/>
<rdfs:range rdf:resource="PE11_Software_Curating_Service"/>
<rdfs:subPropertyOf rdf:resource="PP11i_is_volatile_digital_object_curated_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP13_curates_volatile_dataset">
<rdfs:domain rdf:resource="PE12_Data_Curating_Service"/>
<rdfs:range rdf:resource="PE24_Volatile_Dataset"/>
<rdfs:subPropertyOf rdf:resource="PP11_curates_volatile_digital_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP13i_is_volatile_dataset_curated_by">
<rdfs:domain rdf:resource="PE24_Volatile_Dataset"/>
<rdfs:range rdf:resource="PE12_Data_Curating_Service"/>
<rdfs:subPropertyOf rdf:resource="PP11i_is_volatile_digital_object_curated_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP14_runs_on_request">
<rdfs:domain rdf:resource="PE13_Software_Computing_E-Service"/>
<rdfs:range rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16_used_specific_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP14i_is_run_by">
<rdfs:domain rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:range rdf:resource="PE13_Software_Computing_E-Service"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16i_was_used_for"/>
</rdf:Property>
<rdf:Property rdf:about="PP15_delivers_on_request">
<rdfs:domain rdf:resource="PE14_Software_Delivery_E-Service"/>
<rdfs:range rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16_used_specific_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP15i_is_delivered_by">
<rdfs:domain rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:range rdf:resource="PE14_Software_Delivery_E-Service"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16i_was_used_for"/>
</rdf:Property>
<rdf:Property rdf:about="PP16_has_persistent_digital_object_part">
<rdfs:domain rdf:resource="PE19_Persistent_Digital_Object"/>
<rdfs:range rdf:resource="PE19_Persistent_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P106_is_composed_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP16i_is_persistent_digital_object_part_of">
<rdfs:domain rdf:resource="PE19_Persistent_Digital_Object"/>
<rdfs:range rdf:resource="PE19_Persistent_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P106i_forms_part_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP17_has_snapshot">
<rdfs:domain rdf:resource="PE20_Volatile_Digital_Object"/>
<rdfs:range rdf:resource="PE19_Persistent_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P130_shows_features_of"
/>
</rdf:Property>
<rdf:Property rdf:about="PP17i_is_snapshot_of">
<rdfs:domain rdf:resource="PE19_Persistent_Digital_Object"/>
<rdfs:range rdf:resource="PE20_Volatile_Digital_Object"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P130i_features_are_also_found_on"/>
</rdf:Property>
<rdf:Property rdf:about="PP18_has_digital_object_part">
<rdfs:domain rdf:resource="PE20_Volatile_Digital_Object"/>
<rdfs:range rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P106_is_composed_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP18i_is_digital_object_part_of">
<rdfs:domain rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
<rdfs:range rdf:resource="PE20_Volatile_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P106i_forms_part_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP19_has_persistent_software_part">
<rdfs:domain rdf:resource="PE21_Persistent_Software"/>
<rdfs:range rdf:resource="PE21_Persistent_Software"/>
<rdfs:subPropertyOf rdf:resource="PP16_has_persistent_digital_object_part"/>
</rdf:Property>
<rdf:Property rdf:about="PP19i_is_persistent_software_part_of">
<rdfs:domain rdf:resource="PE21_Persistent_Software"/>
<rdfs:range rdf:resource="PE21_Persistent_Software"/>
<rdfs:subPropertyOf rdf:resource="PP16i_is_persistent_digital_object_part_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP20_has_persistent_dataset_part">
<rdfs:domain rdf:resource="PE22_Persistent_Dataset"/>
<rdfs:range rdf:resource="PE22_Persistent_Dataset"/>
<rdfs:subPropertyOf rdf:resource="PP16_has_persistent_digital_object_part"/>
</rdf:Property>
<rdf:Property rdf:about="PP20i_is_persistent_dataset_part_of">
<rdfs:domain rdf:resource="PE22_Persistent_Dataset"/>
<rdfs:range rdf:resource="PE22_Persistent_Dataset"/>
<rdfs:subPropertyOf rdf:resource="PP16i_is_persistent_digital_object_part_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP21_has_software_part">
<rdfs:domain rdf:resource="PE23_Volatile_Software"/>
<rdfs:range rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:subPropertyOf rdf:resource="PP18_has_digital_object_part"/>
</rdf:Property>
<rdf:Property rdf:about="PP21i_is_software_part_of">
<rdfs:domain rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:range rdf:resource="PE23_Volatile_Software"/>
<rdfs:subPropertyOf rdf:resource="PP18i_is_digital_object_part_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP22_has_release">
<rdfs:domain rdf:resource="PE23_Volatile_Software"/>
<rdfs:range rdf:resource="PE21_Persistent_Software"/>
<rdfs:subPropertyOf rdf:resource="PP17_has_snapshot"/>
</rdf:Property>
<rdf:Property rdf:about="PP22i_is_release_of">
<rdfs:domain rdf:resource="PE21_Persistent_Software"/>
<rdfs:range rdf:resource="PE23_Volatile_Software"/>
<rdfs:subPropertyOf rdf:resource="PP17i_is_snapshot_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP23_has_dataset_part">
<rdfs:domain rdf:resource="PE24_Volatile_Dataset"/>
<rdfs:range rdf:resource="PE18_Dataset"/>
<rdfs:subPropertyOf rdf:resource="PP18_has_digital_object_part"/>
</rdf:Property>
<rdf:Property rdf:about="PP23i_is_dataset_part_of">
<rdfs:domain rdf:resource="PE18_Dataset"/>
<rdfs:range rdf:resource="PE24_Volatile_Dataset"/>
<rdfs:subPropertyOf rdf:resource="PP18i_is_digital_object_part_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP24_has_dataset_snapshot">
<rdfs:domain rdf:resource="PE24_Volatile_Dataset"/>
<rdfs:range rdf:resource="PE22_Persistent_Dataset"/>
<rdfs:subPropertyOf rdf:resource="PP17_has_snapshot"/>
</rdf:Property>
<rdf:Property rdf:about="PP24i_is_dataset_snapshot_of">
<rdfs:domain rdf:resource="PE22_Persistent_Dataset"/>
<rdfs:range rdf:resource="PE24_Volatile_Dataset"/>
<rdfs:subPropertyOf rdf:resource="PP17i_is_snapshot_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP25_has_maintaining_RI">
<rdfs:domain rdf:resource="PE26_RI_Project"/>
<rdfs:range rdf:resource="PE25_RI_Consortium"/>
<rdfs:subPropertyOf rdf:resource="PP44_has_maintaining_team"/>
</rdf:Property>
<rdf:Property rdf:about="PP25i_is_maintaining_RI_of">
<rdfs:domain rdf:resource="PE25_RI_Consortium"/>
<rdfs:range rdf:resource="PE26_RI_Project"/>
<rdfs:subPropertyOf rdf:resource="PP44i_is_maintaining_team_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP28_has_designated_access_point">
<rdfs:domain rdf:resource="PE8_E-Service"/>
<rdfs:range rdf:resource="PE29_Access_Point"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P1_is_identified_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP28i_is_designated_access_point_of">
<rdfs:domain rdf:resource="PE29_Access_Point"/>
<rdfs:range rdf:resource="PE8_E-Service"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P1i_identifies"/>
</rdf:Property>
<rdf:Property rdf:about="PP29_uses_access_protocol">
<rdfs:domain rdf:resource="PE8_E-Service"/>
<rdfs:range rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16_used_specific_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP29i_is_access_protocol_used_by">
<rdfs:domain rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D14_Software"/>
<rdfs:range rdf:resource="PE8_E-Service"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16i_was_used_for"/>
</rdf:Property>
<rdf:Property rdf:about="PP31_uses_curation_plan">
<rdfs:domain rdf:resource="PE3_Curating_Service"/>
<rdfs:range rdf:resource="PE28_Curation_Plan"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P33_used_specific_technique"/>
</rdf:Property>
<rdf:Property rdf:about="PP31i_is_curation_plan_used_by">
<rdfs:domain rdf:resource="PE28_Curation_Plan"/>
<rdfs:range rdf:resource="PE3_Curating_Service"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P33i_was_used_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP32_curates">
<rdfs:domain rdf:resource="PE3_Curating_Service"/>
<rdfs:range rdf:resource="PE32_Curated_Thing"/>
</rdf:Property>
<rdf:Property rdf:about="PP32i_is_curated_by">
<rdfs:domain rdf:resource="PE32_Curated_Thing"/>
<rdfs:range rdf:resource="PE3_Curating_Service"/>
</rdf:Property>
<!-- the next two declarations affect the CIDOC CRM P147 curated (was curated by)
which is declared as subproperty of PP32 curates (is curated by) -->
<rdf:Property rdf:about="http://www.cidoc-crm.org/cidoc-crm/P147_curated">
<rdfs:subPropertyOf rdf:resource="PP32_curates"/>
</rdf:Property>
<rdf:Property rdf:about="http://www.cidoc-crm.org/cidoc-crm/P147i_was_curated_by">
<rdfs:subPropertyOf rdf:resource="PP32i_is_curated_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP39_is_metadata_for">
<rdfs:domain rdf:resource="PE22_Persistent_Dataset"/>
<rdfs:range rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P129_is_about"/>
</rdf:Property>
<rdf:Property rdf:about="PP39i_has_metadata">
<rdfs:domain rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
<rdfs:range rdf:resource="PE22_Persistent_Dataset"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P129i_is_subject_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP40_created_successor_of">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E65_Creation"/>
<rdfs:range rdf:resource="PE22_Persistent_Dataset"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16_used_specific_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP40i_is_deprecated_by">
<rdfs:domain rdf:resource="PE22_Persistent_Dataset"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E65_Creation"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16i_was_used_for"/>
</rdf:Property>
<rdf:Property rdf:about="PP41_is_index_of">
<rdfs:domain rdf:resource="PE24_Volatile_Dataset"/>
<rdfs:range rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
</rdf:Property>
<rdf:Property rdf:about="PP41i_is_indexed_by">
<rdfs:domain rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
<rdfs:range rdf:resource="PE24_Volatile_Dataset"/>
</rdf:Property>
<rdf:Property rdf:about="PP42_has_declarative_time">
<rdfs:domain rdf:resource="PE1_Service"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
</rdf:Property>
<rdf:Property rdf:about="PP43_supported_project_activity">
<rdfs:domain rdf:resource="PE35_Project"/>
<rdfs:range rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P9_consists_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP43i_is_project_activity_supported_by">
<rdfs:domain rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<rdfs:range rdf:resource="PE35_Project"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P9i_forms_part_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP44_has_maintaining_team">
<rdfs:domain rdf:resource="PE35_Project"/>
<rdfs:range rdf:resource="PE34_Team"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P17_was_motivated_by"/>
</rdf:Property>
<rdf:Property rdf:about="PP44i_is_maintaining_team_of">
<rdfs:domain rdf:resource="PE34_Team"/>
<rdfs:range rdf:resource="PE35_Project"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P17i_motivated"/>
</rdf:Property>
<rdf:Property rdf:about="PP45_has_competency">
<rdfs:domain rdf:resource="PE1_Service"/>
<rdfs:range rdf:resource="PE36_Competency_Type"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P21_had_general_purpose"/>
</rdf:Property>
<rdf:Property rdf:about="PP45i_is_competency_of">
<rdfs:domain rdf:resource="PE36_Competency_Type"/>
<rdfs:range rdf:resource="PE1_Service"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P21i_was_purpose_of"/>
</rdf:Property>
<rdf:Property rdf:about="PP46_brokers_access_to">
<rdfs:domain rdf:resource="PE33_E-Access_Brokering_Service"/>
<rdfs:range rdf:resource="PE8_E-Service"/>
</rdf:Property>
<rdf:Property rdf:about="PP46i_has_access_brokered_by">
<rdfs:domain rdf:resource="PE8_E-Service"/>
<rdfs:range rdf:resource="PE33_E-Access_Brokering_Service"/>
</rdf:Property>
<rdf:Property rdf:about="PP47_has_protocol_type">
<rdfs:domain rdf:resource="PE8_E-Service"/>
<rdfs:range rdf:resource="PE37_Protocol_Type"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P125_used_object_of_type"/>
</rdf:Property>
<rdf:Property rdf:about="PP47i_is_protocol_type_of">
<rdfs:domain rdf:resource="PE37_Protocol_Type"/>
<rdfs:range rdf:resource="PE8_E-Service"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P125i_was_type_of_object_used_in"/>
</rdf:Property>
<rdf:Property rdf:about="PP48_uses_protocol_parameter">
<rdfs:domain rdf:resource="PE8_E-Service"/>
<rdfs:range rdf:resource="PE38_Schema"/>
<rdfs:subPropertyOf
rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16_used_specific_object"/>
</rdf:Property>
<rdf:Property rdf:about="PP48i_is_protocol_parameter_of">
<rdfs:domain rdf:resource="PE38_Schema"/>
<rdfs:range rdf:resource="PE8_E-Service"/>
<rdfs:subPropertyOf rdf:resource="http://www.cidoc-crm.org/cidoc-crm/P16i_was_used_for"/>
</rdf:Property>
<rdf:Property rdf:about="PP49_provides_access_point">
<rdfs:domain rdf:resource="PE8_E-Service"/>
<rdfs:range rdf:resource="PE29_Access_Point"/>
</rdf:Property>
<rdf:Property rdf:about="PP49i_is_access_point_provided_by">
<rdfs:domain rdf:resource="PE29_Access_Point"/>
<rdfs:range rdf:resource="PE8_E-Service"/>
</rdf:Property>
<rdf:Property rdf:about="PP50_accessible_at">
<rdfs:domain rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
<rdfs:range rdf:resource="PE29_Access_Point"/>
</rdf:Property>
<rdf:Property rdf:about="PP50i_provides_access_to">
<rdfs:domain rdf:resource="PE29_Access_Point"/>
<rdfs:range rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/D1_Digital_Object"/>
</rdf:Property>
</rdf:RDF>

View File

@ -0,0 +1,54 @@
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crmpe="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/"
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/">
<rdf:Description about="http://ariadneplus.d4science.org/handle/CP/Service/TEST">
<crm:P1_is_identified_by>Title of a test service</crm:P1_is_identified_by>
<crm:P3_has_note>This is a service for testing purposes</crm:P3_has_note>
<rdfs:label>testService</rdfs:label>
<rdf:type resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE2_Hosting_Service"/>
<rdf:type resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE1_Service"/>
<rdf:type resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdf:type resource="http://www.cidoc-crm.org/cidoc-crm/E2_Temporal_Entity"/>
<rdf:type resource="http://www.cidoc-crm.org/cidoc-crm/E92_Spacetime_Volume"/>
<rdf:type resource="http://www.cidoc-crm.org/cidoc-crm/E4_Period"/>
<rdf:type resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<crm:P2_has_type>aTypeLabel</crm:P2_has_type>
<crmpe:PP2_provided_by rdf:resource="http://ariadneplus.d4science.org/handle/CP/TheProvider"/>
<crmpe:PP4_hosts_object rdf:resource="http://ariadneplus.d4science.org/handle/CP/HostedObject"/>
<crmpe:PP6_hosts_digital_object rdf:resource="http://ariadneplus.d4science.org/handle/CP/HostedDigitalObject"/>
<crmpe:PP7_hosts_software_object rdf:resource="http://ariadneplus.d4science.org/handle/CP/HostedSw"/>
<crmpe:PP8_hosts_dataset rdf:resource="http://ariadneplus.d4science.org/handle/CP/HostedDataset"/>
<crmpe:PP28_has_designated_access_point rdf:resource="http://ariadneplus.d4science.org/handle/CP/Service/TEST/TheAccesPoint"/>
<crmpe:PP1i_is_currently_offered_by rdf:resource="http://ariadneplus.d4science.org/handle/CP/Service/TEST/TheOfferer"/>
<crmpe:PP45_has_competency>Competency label</crmpe:PP45_has_competency>
<crmpe:PP31_uses_curation_plan rdf:resource="http://ariadneplus.d4science.org/handle/CP/Service/TEST/TheCurationPlan"/>
<crmpe:PP29_uses_access_protocol rdf:resource="http://ariadneplus.d4science.org/handle/CP/aProtocol"/>
<crmpe:PP46_brokers_access_to rdf:resource="http://ariadneplus.d4science.org/handle/CP/Service/TEST/BrokersAccessToThis"/>
<crmpe:PP32_curates rdf:resource="http://ariadneplus.d4science.org/handle/CP/CuratedObject"/>
<crmpe:PP11_curates_volatile_digital_object rdf:resource="http://ariadneplus.d4science.org/handle/CP/CuratedObject2"/>
<crmpe:PP12_curates_volatile_software rdf:resource="http://ariadneplus.d4science.org/handle/CP/CuratedSw"/>
<crmpe:PP13_curates_volatile_dataset rdf:resource="http://ariadneplus.d4science.org/handle/CP/CuratedDatasetw"/>
<crmpe:PP15_delivers_on_request rdf:resource="http://ariadneplus.d4science.org/handle/CP/DeliveredWhatever"/>
<crmpe:PP42_has_declarative_time>The declarative time, whatever it means</crmpe:PP42_has_declarative_time>
<availability>Yes</availability>
</rdf:Description>
<rdf:Description about="http://ariadneplus.d4science.org/handle/CP/TheProvider">
<crm:P1_is_identified_by>The Provider of the service (title)</crm:P1_is_identified_by>
<crm:P3_has_note>Description of the provider of the service</crm:P3_has_note>
<crm:P76_has_contact_point rdf:resource="http://ariadneplus.d4science.org/handle/CP/TheProviderContactPoint"/>
</rdf:Description>
<rdf:Description about="http://ariadneplus.d4science.org/handle/CP/TheProviderContactPoint">
<crm:P2_has_type resource="http://ariadneplus.d4science.org/handle/CP/TheProviderContactPointType"/>
<rdfs:label>Label of the contact point</rdfs:label>
</rdf:Description>
<rdf:Description about="http://ariadneplus.d4science.org/handle/CP/TheProviderContactPointType">
<rdfs:label>Fake contact point</rdfs:label>
</rdf:Description>
<rdf:Description about="http://ariadneplus.d4science.org/handle/CP/aProtocol">
<crmpe:PP47_has_protocol_type rdf:resource="http://ariadneplus.d4science.org/handle/CP/aProtocolType"/>
<crmpe:PP48_uses_protocol_parameter rdf:resource="http://ariadneplus.d4science.org/handle/CP/aProtocolParameter"/>
</rdf:Description>
</rdf:RDF>

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<record xmlns="http://www.openarchives.org/OAI/2.0/">
<header xmlns:dri="http://www.driver-repository.eu/namespace/dri">
<dri:objIdentifier>http://ariadneplus.d4science.org/handle/CP/Service/TEST</dri:objIdentifier>
<dri:datasourceapi>datasourceInterface</dri:datasourceapi>
<dri:datasourcename>datasourceName</dri:datasourcename>
</header>
<metadata>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crmpe="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/"
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/">
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/CP/Service/TEST">
<crm:P1_is_identified_by>Title of a test service</crm:P1_is_identified_by>
<crm:P3_has_note>This is a service for testing purposes</crm:P3_has_note>
<rdfs:label>testService</rdfs:label>
<rdf:type
rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE2_Hosting_Service"/>
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE1_Service"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E2_Temporal_Entity"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E92_Spacetime_Volume"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E4_Period"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity"/>
<crm:P2_has_type>aTypeLabel</crm:P2_has_type>
<crmpe:PP2_provided_by
rdf:resource="http://ariadneplus.d4science.org/handle/CP/TheProvider"/>
<crmpe:PP4_hosts_object
rdf:resource="http://ariadneplus.d4science.org/handle/CP/HostedObject"/>
<crmpe:PP6_hosts_digital_object
rdf:resource="http://ariadneplus.d4science.org/handle/CP/HostedDigitalObject"/>
<crmpe:PP7_hosts_software_object
rdf:resource="http://ariadneplus.d4science.org/handle/CP/HostedSw"/>
<crmpe:PP8_hosts_dataset
rdf:resource="http://ariadneplus.d4science.org/handle/CP/HostedDataset"/>
<crmpe:PP28_has_designated_access_point
rdf:resource="http://ariadneplus.d4science.org/handle/CP/Service/TEST/TheAccesPoint"/>
<crmpe:PP1i_is_currently_offered_by
rdf:resource="http://ariadneplus.d4science.org/handle/CP/Service/TEST/TheOfferer"/>
<crmpe:PP45_has_competency>Competency label</crmpe:PP45_has_competency>
<crmpe:PP31_uses_curation_plan
rdf:resource="http://ariadneplus.d4science.org/handle/CP/Service/TEST/TheCurationPlan"/>
<crmpe:PP29_uses_access_protocol
rdf:resource="http://ariadneplus.d4science.org/handle/CP/aProtocol"/>
<crmpe:PP46_brokers_access_to
rdf:resource="http://ariadneplus.d4science.org/handle/CP/Service/TEST/BrokersAccessToThis"/>
<crmpe:PP32_curates
rdf:resource="http://ariadneplus.d4science.org/handle/CP/CuratedObject"/>
<crmpe:PP11_curates_volatile_digital_object
rdf:resource="http://ariadneplus.d4science.org/handle/CP/CuratedObject2"/>
<crmpe:PP12_curates_volatile_software
rdf:resource="http://ariadneplus.d4science.org/handle/CP/CuratedSw"/>
<crmpe:PP13_curates_volatile_dataset
rdf:resource="http://ariadneplus.d4science.org/handle/CP/CuratedDatasetw"/>
<crmpe:PP15_delivers_on_request
rdf:resource="http://ariadneplus.d4science.org/handle/CP/DeliveredWhatever"/>
<crmpe:PP42_has_declarative_time>The declarative time, whatever it
means</crmpe:PP42_has_declarative_time>
<availability>Yes</availability>
</rdf:Description>
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/CP/TheProvider">
<crm:P1_is_identified_by>The Provider of the service
(title)</crm:P1_is_identified_by>
<crm:P3_has_note>Description of the provider of the service</crm:P3_has_note>
<crm:P76_has_contact_point
rdf:resource="http://ariadneplus.d4science.org/handle/CP/TheProviderContactPoint"
/>
</rdf:Description>
<rdf:Description
rdf:about="http://ariadneplus.d4science.org/handle/CP/TheProviderContactPoint">
<crm:P2_has_type
rdf:resource="http://ariadneplus.d4science.org/handle/CP/TheProviderContactPointType"/>
<rdfs:label>Label of the contact point</rdfs:label>
</rdf:Description>
<rdf:Description
rdf:about="http://ariadneplus.d4science.org/handle/CP/TheProviderContactPointType">
<rdfs:label>Fake contact point</rdfs:label>
</rdf:Description>
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/CP/aProtocol">
<crmpe:PP47_has_protocol_type
rdf:resource="http://ariadneplus.d4science.org/handle/CP/aProtocolType"/>
<crmpe:PP48_uses_protocol_parameter
rdf:resource="http://ariadneplus.d4science.org/handle/CP/aProtocolParameter"/>
</rdf:Description>
</rdf:RDF>
</metadata>
</record>

View File

@ -0,0 +1,65 @@
{
"result": {
"isopen": false,
"private": false,
"notes": null,
"num_resources": 0,
"extras": [
{
"value": "http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/Appellation/Nakala2",
"key": "AriadnePlus URL"
},
{
"value": "E41_Appellation",
"key": "instance of"
},
{
"value": "E70_Thing",
"key": "system:type"
},
{
"value": "http://data-d.d4science.org/ctlg/ARIADNEPLUS_PRE/nakala1",
"key": "Item URL"
}
],
"owner_org": "bf3c7b47-ccbb-48c4-9aed-223ba80b004b",
"type": "dataset",
"title": "Nakala",
"maintainer": null,
"num_tags": 0,
"author_email": "alessia.bardi@isti.cnr.it",
"id": "3aa0dbfe-3d9a-4427-bb77-dc6b770e9d06",
"state": "active",
"relationships_as_object": [],
"revision_id": "d0165452-7427-4ab0-bb73-cd4d52abc9aa",
"creator_user_id": "d34aa5ac-b501-49f9-a0d4-3f685851a1f7",
"metadata_modified": "2018-03-15T17:17:20.772406",
"author": "Alessia Bardi",
"relationships_as_subject": [],
"metadata_created": "2018-03-15T17:17:20.772396",
"resources": [],
"groups": [],
"version": "1",
"url": null,
"tags": [],
"license_id": "notspecified",
"organization": {
"created": "2017-12-19T12:48:06.303197",
"image_url": "",
"approval_status": "approved",
"name": "ariadneplus_pre",
"description": "",
"state": "active",
"id": "bf3c7b47-ccbb-48c4-9aed-223ba80b004b",
"title": "ARIADNEPLUS_PRE",
"is_organization": true,
"type": "organization",
"revision_id": "1216049e-bc9a-4b7f-86e0-dedddf24f16b"
},
"name": "nakala1",
"license_title": "License Not Specified",
"maintainer_email": null
},
"help": "https://wiki.gcube-system.org/gcube/GCube_Data_Catalogue",
"success": true
}

View File

@ -0,0 +1 @@
{"help":"https:\/\/wiki.gcube-system.org\/gcube\/GCube_Data_Catalogue","success":false,"error":{"__type":"Validation Error","name":["Must be purely lowercase alphanumeric (ascii) characters and these symbols: -_"]}}

View File

@ -0,0 +1,121 @@
{
"license_title": "License Not Specified",
"maintainer": "",
"relationships_as_object": [],
"private": false,
"maintainer_email": null,
"num_tags": 9,
"id": "69a5ad81-9714-454d-b63d-89db9d3ca584",
"metadata_created": "2019-05-13T14:20:35.225920",
"metadata_modified": "2019-05-13T14:20:35.225928",
"author": "ariadneplus_aggregator",
"author_email": "ariadneplus.aggregator@d4science.org",
"state": "active",
"version": null,
"creator_user_id": "57b8beb1-438b-4477-9e7b-d670ed4f0414",
"type": "dataset",
"resources": [],
"num_resources": 0,
"tags": [
{
"vocabulary_id": null,
"state": "active",
"display_name": "E1_CRM_Entity",
"id": "c4537f22-2981-4c13-8587-b1a66b4fe710",
"name": "E1_CRM_Entity"
},
{
"vocabulary_id": null,
"state": "active",
"display_name": "E2_Temporal_Entity",
"id": "ac19c26d-103b-453f-9324-53a0ae2b1a68",
"name": "E2_Temporal_Entity"
},
{
"vocabulary_id": null,
"state": "active",
"display_name": "E4_Period",
"id": "63d3617a-8d6a-48e9-b60e-1404bff9540e",
"name": "E4_Period"
},
{
"vocabulary_id": null,
"state": "active",
"display_name": "E5_Event",
"id": "5679c6ec-9091-47c4-9845-8635b66bec3e",
"name": "E5_Event"
},
{
"vocabulary_id": null,
"state": "active",
"display_name": "E7_Activity",
"id": "ea9fb3f3-53e2-4520-a9c8-9ad292944545",
"name": "E7_Activity"
},
{
"vocabulary_id": null,
"state": "active",
"display_name": "E92_Spacetime_Volume",
"id": "9b79f939-3088-4331-94c3-16e21d891620",
"name": "E92_Spacetime_Volume"
},
{
"vocabulary_id": null,
"state": "active",
"display_name": "PE26_RI_Project",
"id": "6668c2fc-876e-4dd6-af90-a958092ad59c",
"name": "PE26_RI_Project"
},
{
"vocabulary_id": null,
"state": "active",
"display_name": "PE35_Project",
"id": "7feec186-ffff-45c1-997d-15b32e824cc2",
"name": "PE35_Project"
},
{
"vocabulary_id": null,
"state": "active",
"display_name": "Resource",
"id": "e130773e-9e34-439c-a61b-201b61d41c59",
"name": "Resource"
}
],
"groups": [],
"license_id": "notspecified",
"relationships_as_subject": [],
"organization": {
"description": "META-SHARE is an open and secure network of repositories for sharing and exchanging language data, tools and related web services.",
"created": "2018-07-09T15:02:11.728061",
"title": "METASHARE",
"name": "metashare",
"is_organization": true,
"state": "active",
"image_url": "http://www.meta-share.org/assets/cms/img/logo.png",
"revision_id": "6a56b490-c417-4cbc-8c1e-a5e934ae3431",
"type": "organization",
"id": "4edf7403-a4c9-4b57-a247-7d82980eb8ff",
"approval_status": "approved"
},
"name": "test123",
"isopen": false,
"url": null,
"notes": "",
"owner_org": "4edf7403-a4c9-4b57-a247-7d82980eb8ff",
"extras": [
{
"key": "AriadnePlus URL",
"value": "http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Project/test123"
},
{
"key": "instance of",
"value": "PE26_RI_Project"
},
{
"key": "system:type",
"value": "Service"
}
],
"title": "A TEST",
"revision_id": "69599ed8-5adf-4773-a25e-7f3e034c336d"
}

View File

@ -0,0 +1,8 @@
{
"help": "https://wiki.gcube-system.org/gcube/GCube_Data_Catalogue",
"success": false,
"error": {
"__type": "Not Found Error",
"message": "Not found"
}
}

View File

@ -0,0 +1,18 @@
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/thing/https%3A%2F%2Fgithub.com%2FAriadnePlusWP4%2FSSK%2Fblob%2Fmaster%2Fspec%2FTEI_SSK_ODD.xml">
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E89_Propositional_Object" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E73_Information_Object" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E71_Man-Made_Thing" />
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE28_Curation_Plan" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E72_Legal_Object" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E28_Conceptual_Object" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E77_Persistent_Item" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E70_Thing" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E29_Design_or_Procedure" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E90_Symbolic_Object" />
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">https://github.com/AriadnePlusWP4/SSK/blob/master/spec/TEI_SSK_ODD.xml</rdfs:label>
</rdf:Description>
</rdf:RDF>

View File

@ -0,0 +1,138 @@
{
"name":"testCatName",
"license_id":"notspecified",
"title":"Metashare",
"notes":"META-SHARE is an open and secure network\n\t\t\tof repositories for sharing and exchanging\n\t\t\tlanguage data, tools and related web services.",
"tags":[
{
"name":"PE1_Service"
},
{
"name":"PE2_Hosting_Service"
},
{
"name":"E92_Spacetime_Volume"
},
{
"name":"PE17_Curated_Data_E-Service"
},
{
"name":"E2_Temporal_Entity"
},
{
"name":"PE5_Digital_Hosting_Service"
},
{
"name":"E5_Event"
},
{
"name":"PE8_E-Service"
},
{
"name":"PE12_Data_Curating_Service"
},
{
"name":"PE3_Curating_Service"
},
{
"name":"PE10_Digital_Curating_Service"
},
{
"name":"PE15_Data_E-Service"
},
{
"name":"E1_CRM_Entity"
},
{
"name":"E4_Period"
},
{
"name":"E7_Activity"
},
{
"name":"PE7_Data_Hosting_Service"
},
{
"name":"Resource"
}
],
"groups":[
{
"name":"ILC-CNR"
},
{
"name":"IIT-CNR"
}
],
"maintainer":"",
"extras":[
{
"key":"system:type",
"value":"E7_Activity"
},
{
"key":"instance of",
"value":"PE17_Curated_Data_E-Service"
},
{
"key":"AriadnePlus URL",
"value":"http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/Metashare"
},
{
"key":"competence",
"value":"NLP"
},
{
"key":"activity type",
"value":""
},
{
"key":"condition of use",
"value":""
},
{
"key":"contact points",
"value":""
},
{
"key":"provided by",
"value":"http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/ILC-CNR, http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/IIT-CNR"
},
{
"key":"online access point",
"value":"http://www.meta-share.org/"
},
{
"key":"protocol",
"value":""
},
{
"key":"delivers on request",
"value":""
},
{
"key":"runs on request",
"value":""
},
{
"key":"hosts",
"value":"http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Dataset/Metashare%20Dataset"
},
{
"key":"curates",
"value":"http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Dataset/Metashare%20Dataset"
},
{
"key":"declared begin/end of operation",
"value":"2010"
},
{
"key":"availability",
"value":""
},
{
"key":"uses curation plan",
"value":""
}
]
}

View File

@ -0,0 +1,59 @@
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crmpe="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/"
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/" >
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/IIT-CNR">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">IIT-CNR</rdfs:label>
</rdf:Description>
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/ILC-CNR">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ILC-CNR</rdfs:label>
<crm:P76_has_contact_point rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/thing/appellation/monica.monachini%40ilc.cnr.it" />
<crm:P76_has_contact_point rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/thing/appellation/Via%20Moruzzi%201%2C%20Pisa%2056124" />
</rdf:Description>
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/Metashare">
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE5_Digital_Hosting_Service" />
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE10_Digital_Curating_Service" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E2_Temporal_Entity" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity" />
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE15_Data_E-Service" />
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE17_Curated_Data_E-Service" />
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE1_Service" />
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE7_Data_Hosting_Service" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E92_Spacetime_Volume" />
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE12_Data_Curating_Service" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E4_Period" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E7_Activity" />
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE8_E-Service" />
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE2_Hosting_Service" />
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE3_Curating_Service" />
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E5_Event" />
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Metashare</rdfs:label>
<crmpe:PP42_has_declarative_time rdf:datatype="http://www.w3.org/2001/XMLSchema#string">2010</crmpe:PP42_has_declarative_time>
<crmpe:PP28_has_designated_access_point rdf:resource="http://www.meta-share.org/" />
<crmpe:PP2_provided_by rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/IIT-CNR" />
<crmpe:PP2_provided_by rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/ILC-CNR" />
<crm:P1_is_identified_by rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Metashare</crm:P1_is_identified_by>
<crm:P1_is_identified_by rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://www.meta-share.org/</crm:P1_is_identified_by>
<crm:P3_has_note rdf:datatype="http://www.w3.org/2001/XMLSchema#string">META-SHARE is an open and secure network
of repositories for sharing and exchanging
language data, tools and related web services.</crm:P3_has_note>
<crmpe:PP1i_is_currently_offered_by rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Project/Meta-Net%20Project" />
<crmpe:PP32_curates rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Dataset/Metashare%20Dataset" />
<crmpe:PP45_has_competency rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Computational Linguistics</crmpe:PP45_has_competency>
<crmpe:PP45_has_competency rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Machine Translation</crmpe:PP45_has_competency>
<crmpe:PP45_has_competency rdf:datatype="http://www.w3.org/2001/XMLSchema#string">NLP</crmpe:PP45_has_competency>
<crmpe:PP4_hosts_object rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Dataset/Metashare%20Dataset" />
</rdf:Description>
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/thing/appellation/Via%20Moruzzi%201%2C%20Pisa%2056124">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Via Moruzzi 1, Pisa 56124</rdfs:label>
</rdf:Description>
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/thing/appellation/monica.monachini%40ilc.cnr.it">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">monica.monachini@ilc.cnr.it</rdfs:label>
<crm:P2_has_type rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/contactpointtype/email" />
</rdf:Description>
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/contactpointtype/email">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Email</rdfs:label>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">E-mail</rdfs:label>
</rdf:Description>
</rdf:RDF>

View File

@ -0,0 +1,17 @@
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crmpe="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/"
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/">
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/nakalatest">
<crm:P16_used_specific_object rdf:resource="urn:uuid:20eff6cf-1d52-4540-b316-22c6901a8f13"/>
<crmpe:PP28_has_designated_access_point rdf:resource="urn:uuid:a84b5d27-c64a-4412-b565-751c5cf3d2a1"/>
<crmpe:PP2_provided_by rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/Huma-num%20Consortium"/>
<crm:P3_has_note>Considering the fact that many scientific data producers do not have the digital infrastructure to provide a persistent and interoperable access to their data, Huma-Num has implemented a new tool called “Nakala” to expose research data in order to facilitate their reuse.
Nakala provides mainly three types of services: a permanent identifier to the resource, a permanent access to the data and associated metadata and an exposition of metadata based on semantic web technologies and OAI-PMH server.
</crm:P3_has_note>
<crm:P1_is_identified_by rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/Appellation/nakalatest"/>
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE17_Curated_Data_E-Service"/>
<rdfs:label>Nakala</rdfs:label>
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE1_Service"/>
</rdf:Description>
</rdf:RDF>

View File

@ -0,0 +1,18 @@
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns="http://www.openarchives.org/OAI/2.0/">
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/thing/https%3A%2F%2Fgithub.com%2FAriadnePlusWP4%2FSSK%2Fblob%2Fmaster%2Fspec%2FTEI_SSK_ODD.xml">
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E89_Propositional_Object"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E73_Information_Object"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E71_Man-Made_Thing"/>
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE28_Curation_Plan"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E72_Legal_Object"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E28_Conceptual_Object"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E77_Persistent_Item"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E70_Thing"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E29_Design_or_Procedure"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E90_Symbolic_Object"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">https://github.com/AriadnePlusWP4/SSK/blob/master/spec/TEI_SSK_ODD.xml</rdfs:label>
</rdf:Description>
</rdf:RDF>

View File

@ -0,0 +1,25 @@
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crmpe="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/"
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/">
<!-- For testing contact point -->
<rdf:Description about="uuid:AAAH">
<crmpe:PP28_has_designated_access_point resource="https://portal.clarin.inl.nl"/>
<crmpe:PP2_provided_by resource="http://ariadneplus.d4science.org/handle/Clarin/VLO/Actor/Institute%20for%20Dutch%20Lexicology%20%28Instituut%20voor%20Nederlandse%20Lexicologie%2C%20INL%29"/>
<rdfs:label>Main Hosting for Online Personal Exploration and Navigation of SoNaR</rdfs:label>
<rdf:type resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE2_Hosting_Service"/>
</rdf:Description>
<rdf:Description about="http://ariadneplus.d4science.org/handle/Clarin/VLO/Actor/Institute%20for%20Dutch%20Lexicology%20%28Instituut%20voor%20Nederlandse%20Lexicologie%2C%20INL%29">
<crm:P76_has_contact_point resource="http://www.inl.nl/"/>
<crm:P76_has_contact_point resource="http://ariadneplus.d4science.org/handle/Clarin/VLO/Thing/Appellation/31%20%280%29715272276"/>
<crm:P107_has_current_or_former_member resource="http://ariadneplus.d4science.org/handle/Clarin/VLO/Actor/Dr.%20J.%20Th.%20Bakker"/>
<crm:P76_has_contact_point resource="http://ariadneplus.d4science.org/handle/Clarin/VLO/thingappellation/Witte%20Singel%2FDoelencomplex%2C%20Matthias%20de%20Vrieshof%202-3%2C%202311%20BZ%20Leiden%2C%20The%20Netherlands"/>
<rdfs:label>Institute for Dutch Lexicology (Instituut voor Nederlandse Lexicologie, INL)</rdfs:label>
<rdf:type resource="http://www.cidoc-crm.org/cidoc-crm/E40_Legal_Body"/>
</rdf:Description>
<rdf:Description about="http://ariadneplus.d4science.org/handle/Clarin/VLO/Thing/Appellation/31%20%280%29715272276">
<crm:P2_has_type resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/contacttype/phone"/>
<rdfs:label>31 (0)715272276</rdfs:label>
<rdf:type resource="http://www.cidoc-crm.org/cidoc-crm/E51_Contact_Point"/>
</rdf:Description>
</rdf:RDF>

View File

@ -0,0 +1,28 @@
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/">
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/PAR/WP8Contacts/uv6cuc6wii47">
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E39_Actor"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E74_Group"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E1_CRM_Entity"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E77_Persistent_Item"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Special Interest Group AudioVisual Material in Digital Humanities</rdfs:label>
<crm:P107_has_current_or_former_member rdf:resource="http://ariadneplus.d4science.org/handle/PAR/WP8Contacts/rkxaaag20t42"/>
<crm:P2_has_type rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Associations, consortia and committees</crm:P2_has_type>
<crm:P76_has_contact_point rdf:resource="https://avindhsig.wordpress.com/"/>
<crm:P76_has_contact_point rdf:resource="https://avindhsig.wordpress.com/contact/"/>
<crm:P102_has_title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Special Interest Group AudioVisual Material in Digital Humanities</crm:P102_has_title>
<crm:P102_has_title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">AVinDH SIG</crm:P102_has_title>
</rdf:Description>
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/vb94wfii4sit">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Contact Page</rdfs:label>
</rdf:Description>
<rdf:Description rdf:about="https://avindhsig.wordpress.com/">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">https://avindhsig.wordpress.com/</rdfs:label>
</rdf:Description>
<rdf:Description rdf:about="https://avindhsig.wordpress.com/contact/">
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">https://avindhsig.wordpress.com/contact/</rdfs:label>
<crm:P2_has_type rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/vb94wfii4sit"/>
</rdf:Description>
</rdf:RDF>

View File

@ -0,0 +1,33 @@
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crmpe="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/"
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/">
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/Cendari%20Sparql%20Endpoint">
<crm:P16_used_specific_object rdf:resource="urn:uuid:290a645e-343c-4850-8b81-80f4705f691a"/>
<crmpe:PP28_has_designated_access_point rdf:resource="http://git-trame.fefonlus.it/sparql/"/>
<crmpe:PP2_provided_by rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/SISMEL"/>
<crmpe:PP45_has_competency rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Concept/righttype/Cultural%20Heritage%20Dataset"/>
<crm:P3_has_note>Cendari provides access to data through a SPARQL access point. The dataset is composed by 16 different resources, all related to medieval and romance philology and history. It contains data about 115000+ manuscripts, 95000+ texts and 18000+ authors.</crm:P3_has_note>
<crm:P1_is_identified_by rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/Appellation/Cendari%20Sparql%20Endpoint"/>
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE15_Data_E-Service"/>
<rdfs:label>Cendari Sparql Endpoint</rdfs:label>
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE1_Service"/>
<crmpe:PP2_provided_by rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/EHRI%20Consortium"/>
</rdf:Description>
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/SISMEL">
<crm:P107_has_current_or_former_member rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/Emiliano%20Degl%27Innocenti"/>
<crm:P76_has_contact_point rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Thing/Appellation/S.I.S.M.E.L.%2C%20via%20Montebello%207%2C%2050123%20Firenze"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E39_Actor"/>
<crm:P1_is_identified_by>SISMEL</crm:P1_is_identified_by>
<crm:P3_has_note>S.I.S.M.E.L. is a leader in national and international research projects in the field of medieval culture and one of the most advanced research centers in Italy for the creation of innovative applications in digital humanities, including: bibliographic and onomastic databases, catalogues of authors, texts and manuscripts, tools for research data discoverability, interoperability and semantic integration and enrichment.</crm:P3_has_note>
<rdfs:label>SISMEL</rdfs:label>
<crm:P76_has_contact_point rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Thing/Appellation/055%20204%208501"/>
<crm:P76_has_contact_point rdf:resource="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Thing/Appellation/maurizio.sanesi%40virgilio.it"/>
<rdf:type rdf:resource="http://ariadneplus.d4science.org/CRMext/CRMpe.rdfs/PE34_Team"/>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E40_Legal_Body"/>
<crm:P76_has_contact_point rdf:resource="http://www.sismelfirenze.it/index.php?lang=en"/>
</rdf:Description>
<rdf:Description rdf:about="http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/EHRI%20Consortium">
<crm:P1_is_identified_by>EHRI Consortium</crm:P1_is_identified_by>
</rdf:Description>
</rdf:RDF>

View File

@ -0,0 +1,100 @@
DEFINE input:inference 'ariadneplus_rules'
CONSTRUCT {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crm:P1_is_identified_by ?title .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crm:P3_has_note ?description .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> a ?type .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP2_provided_by ?provider .
?provider crm:P1_is_identified_by ?providerTitle .
?provider crm:P3_has_note ?providerDescr .
?provider crm:P76_has_contact_point ?contactpoint .
?contactpoint crm:P2_has_type ?contactpointType .
?contactpoint rdfs:label ?contactpointLabel .
?contactpointType rdfs:label ?contactpointTypeLabel .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP28_has_designated_access_point ?accesspoint .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP1i_is_currently_offered_by ?offerer .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP45_has_competency ?competency .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP4_hosts_object ?object .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP31_uses_curation_plan ?curationplan .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP32_curates ?object2 .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP6_hosts_digital_object ?object3 .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP7_hosts_software_object <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP8_hosts_dataset ?dataset .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP29_uses_access_protocol ?protocol .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP47_has_protocol_type ?protocoltype .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP48_uses_protocol_parameter ?protocolparam .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP46_brokers_access_to ?brokered .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP11_curates_volatile_digital_object ?curatedObj .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP12_curates_volatile_software ?curatedSw .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP13_curates_volatile_dataset ?curatedData .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP15_delivers_on_request ?delivered .
}
WHERE {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> a crmpe:PE1_Service .
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> a ?type .
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crm:P1_is_identified_by ?titleRes .
?titleRes rdfs:label ?title .
}
OPTIONAL{
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crm:P3_has_note ?description .
}
OPTIONAL{
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP2_provided_by ?provider .
}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP2_provided_by ?provider .
?provider crm:P1_is_identified_by ?providerTitleRes .
?providerTitleRes rdfs:label ?providerTitle .
}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP2_provided_by ?provider .
?provider crm:P3_has_note ?providerDescr .
}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP2_provided_by ?provider .
?provider crm:P76_has_contact_point ?contactpoint .
?contactpoint rdfs:label ?contactpointLabel .
}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP2_provided_by ?provider .
?provider crm:P76_has_contact_point ?contactpoint .
?contactpoint crm:P2_has_type ?contactpointType .
?contactpointType rdfs:label ?contactpointTypeLabel .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP28_has_designated_access_point ?accesspoint .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP1i_is_currently_offered_by ?offerer .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP45_has_competency ?competency .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP4_hosts_object ?object .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP31_uses_curation_plan ?curationplan .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP32_curates ?object2 .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP6_hosts_digital_object ?object3 .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP7_hosts_software_object <http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP8_hosts_dataset ?dataset .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP29_uses_access_protocol ?protocol .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP47_has_protocol_type ?protocoltype .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP48_uses_protocol_parameter ?protocolparam .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP46_brokers_access_to ?brokered .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP11_curates_volatile_digital_object ?curatedObj .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP12_curates_volatile_software ?curatedSw .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP13_curates_volatile_dataset ?curatedData .}
OPTIONAL {
<http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Service/ARIADNE%20Visual%20Media%20Service> crmpe:PP15_delivers_on_request ?delivered .}
}

View File

@ -0,0 +1,21 @@
@prefix : <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
:alice
a foaf:Person ;
foaf:name "Alice" ;
foaf:mbox <mailto:alice@example.org> ;
foaf:knows :bob ;
foaf:knows :charlie ;
foaf:knows :snoopy ;
.
:bob
foaf:name "Bob" ;
foaf:knows :charlie ;
.
:charlie
foaf:name "Charlie" ;
foaf:knows :alice ;
.

View File

@ -0,0 +1,234 @@
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:acdm="http://registry.ariadne-infrastructure.eu/"
xmlns:ariadneplus="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crmdig="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/"
xmlns:rdaGr2="http://rdvocab.info/ElementsGr2/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enrichment="http://www.europeana.eu/schemas/edm/enrichment/"
xmlns:aat="http://vocab.getty.edu/aat/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:sch="http://purl.oclc.org/dsdl/schematron"
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/"
xmlns:wgs84="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:dbpedia-owl="http://dbpedia.org/ontology/"
xmlns:ore="http://www.openarchives.org/ore/terms/"
xmlns:adms="http://www.w3.org/ns/adms#"
xmlns:vcard="https://www.w3.org/TR/vcard-rdf/"
xmlns:frbr="http://www.cidoc-crm.org/frbr/"
xmlns:edm="http://www.europeana.eu/schemas/edm/"
xmlns:crmpe="http://www.ics.forth.gr/isl/CRMext/CRMpe.rdfs/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<crm:E53_Place rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Place/Pesaro">
<crm:P1_is_identified_by>
<crm:E44_Place_Appellation rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Place/Appellation/Pesaro"/>
</crm:P1_is_identified_by>
<rdfs:label>Pesaro</rdfs:label>
</crm:E53_Place>
<crm:E33_Linguistic_Object rdf:about="uuid:AAAT">
<crm:P67i_is_referred_to_by>
<crm:E73_Information_Object rdf:about="http://vocab.getty.edu/aat/300178243">
<rdfs:label>http://vocab.getty.edu/aat/300178243</rdfs:label>
</crm:E73_Information_Object>
</crm:P67i_is_referred_to_by>
<crm:P2_has_type>ex-votos (religious visual works)</crm:P2_has_type>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E55_Type"/>
</crm:E33_Linguistic_Object>
<crm:E33_Linguistic_Object rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Dataset/http%3A%2F%2Fregistry.ariadne-infrastructure.eu%2Fdataset%2F25058478">
<crm:P104_is_subject_to>
<crm:E30_Right rdf:about="uuid:AAAF">
<crm:P75i_is_possessed_by>
<crm:E39_Actor rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Actor/Regione%20Calabria">
<rdfs:label>Regione Calabria</rdfs:label>
</crm:E39_Actor>
</crm:P75i_is_possessed_by>
</crm:E30_Right>
</crm:P104_is_subject_to>
<crmpe:PP8i_is_dataset_hosted_by>
<crmpe:PE15_Data_E-Service rdf:about="uuid:AAAL">
<crm:P01i_is_domain_of>
<crm:PC14_carried_out_by rdf:about="uuid:AAAM">
<crm:P02_has_range rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Actor/Regione%20Calabria"/>
<crm:P14.1_in_the_role_of>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/role">
<rdfs:label>Technical Responsible</rdfs:label>
<rdfs:label>Legal Responsible</rdfs:label>
<rdfs:label>Creator</rdfs:label>
<rdfs:label>Contributor</rdfs:label>
<rdfs:label>publisher</rdfs:label>
</crm:E55_Type>
</crm:P14.1_in_the_role_of>
</crm:PC14_carried_out_by>
</crm:P01i_is_domain_of>
</crmpe:PE15_Data_E-Service>
</crmpe:PP8i_is_dataset_hosted_by>
<rdfs:label>http://registry.ariadne-infrastructure.eu/dataset/25058478</rdfs:label>
<crm:P104_is_subject_to>
<crm:E30_Right rdf:about="uuid:AAAO">
<crm:P2_has_type>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/Creative%20Commons%20CC0%201.0%20Universal%20Public%20Domain%20Dedication">
<crm:P2_has_type>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/accessrights">
<rdfs:label>Access Rights</rdfs:label>
</crm:E55_Type>
</crm:P2_has_type>
<rdfs:label>Creative Commons CC0 1.0 Universal Public Domain Dedication</rdfs:label>
</crm:E55_Type>
</crm:P2_has_type>
</crm:E30_Right>
</crm:P104_is_subject_to>
<crm:P104_is_subject_to>
<crm:E30_Right rdf:about="uuid:AAAN">
<crm:P2_has_type>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/http%3A%2F%2Fwww.culturaitalia.it%2Fopencms%2Faderisci_al_portale_en.jsp%3Flanguage%3Den%26tematica%3Dstatic">
<crm:P2_has_type>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/accesspolicy">
<rdfs:label>Access Policy</rdfs:label>
</crm:E55_Type>
</crm:P2_has_type>
<rdfs:label>http://www.culturaitalia.it/opencms/aderisci_al_portale_en.jsp?language=en&amp;tematica=static</rdfs:label>
</crm:E55_Type>
</crm:P2_has_type>
</crm:E30_Right>
</crm:P104_is_subject_to>
<crm:P129_is_about>
<skos:Concept rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/ex%20voto">
<skos:prefLabel>ex voto</skos:prefLabel>
<crm:P2_has_type>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/nativesubject"/>
</crm:P2_has_type>
<rdfs:label>ex voto</rdfs:label>
<rdf:type rdf:resource="http://www.cidoc-crm.org/cidoc-crm/E55_Type"/>
</skos:Concept>
</crm:P129_is_about>
<crmpe:PP20i_is_persistent_dataset_part_of>
<crmpe:PE22_Persistent_Dataset rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Dataset/http%3A%2F%2Fregistry.ariadne-infrastructure.eu%2Fcollection%2F22391628">
<rdfs:label>http://registry.ariadne-infrastructure.eu/collection/22391628</rdfs:label>
</crmpe:PE22_Persistent_Dataset>
</crmpe:PP20i_is_persistent_dataset_part_of>
<crm:P3_has_note>STCC=integro</crm:P3_has_note>
<crm:P102_has_title>
<crm:E35_Title rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Dataset/Appellation/ex%20voto">
<rdfs:label>ex voto</rdfs:label>
</crm:E35_Title>
</crm:P102_has_title>
<crmpe:PP8i_is_dataset_hosted_by>
<crmpe:PE15_Data_E-Service rdf:about="uuid:AAAP">
<crmpe:PP49_provides_access_point>
<crmpe:PE29_Access_Point rdf:about="uuid:AAAR"/>
</crmpe:PP49_provides_access_point>
<crmpe:PP49_provides_access_point>
<crmpe:PE29_Access_Point rdf:about="uuid:AAAQ"/>
</crmpe:PP49_provides_access_point>
<crmpe:PP49_provides_access_point>
<crmpe:PE29_Access_Point rdf:about="http://sirpac.cultura.marche.it/web/Ricerca.aspx?ids=91961">
<rdfs:label>http://sirpac.cultura.marche.it/web/Ricerca.aspx?ids=91961</rdfs:label>
</crmpe:PE29_Access_Point>
</crmpe:PP49_provides_access_point>
</crmpe:PE15_Data_E-Service>
</crmpe:PP8i_is_dataset_hosted_by>
<crm:P1_is_identified_by>
<crm:E42_Identifier rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Dataset/Appellation/NCTR%3D11%3B%20NCTN%3D00031596">
<crm:P2_has_type>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/idtype">
<rdfs:label>Original ID</rdfs:label>
</crm:E55_Type>
</crm:P2_has_type>
</crm:E42_Identifier>
</crm:P1_is_identified_by>
<rdf:type rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMpe.rdfs/PE22_Persistent_Dataset"/>
<crm:P2_has_type>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/Artefact%20databases%20or%20image%20collections">
<rdfs:label>Artefact databases or image collections</rdfs:label>
</crm:E55_Type>
</crm:P2_has_type>
<crm:P43_has_dimension>
<crm:E54_Dimension rdf:about="uuid:AAAS">
<rdfs:label>MISA=8.5; MISL=5.5; MISP=2.5</rdfs:label>
</crm:E54_Dimension>
</crm:P43_has_dimension>
<crm:P12i_was_present_at>
<crm:E7_Activity rdf:about="uuid:AAAG">
<crm:P01i_is_domain_of>
<crm:PC14_carried_out_by rdf:about="uuid:AAAH">
<crm:P02_has_range rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Actor/Regione%20Calabria"/>
<crm:P14.1_in_the_role_of rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/role"/>
</crm:PC14_carried_out_by>
</crm:P01i_is_domain_of>
<crm:P2_has_type>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/activitytype">
<rdfs:label>ARIADNE Content Legal Responsibility</rdfs:label>
<rdfs:label>ARIADNE Content Creation</rdfs:label>
<rdfs:label>ARIADNE Content Contribution</rdfs:label>
<rdfs:label>ARIADNE Content Provision</rdfs:label>
</crm:E55_Type>
</crm:P2_has_type>
</crm:E7_Activity>
</crm:P12i_was_present_at>
<crmpe:PP24i_is_dataset_snapshot_of>
<crmpe:PE24_Volatile_Dataset rdf:about="uuid:AAAI">
<crmpe:PP13i_was_volatile_dataset_curated_by>
<crmpe:PE12_Data_Curating_Service rdf:about="uuid:AAAJ">
<crm:P01i_is_domain_of>
<crm:PC14_carried_out_by rdf:about="uuid:AAAK">
<crm:P02_has_range rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Actor/Regione%20Calabria"/>
<crm:P14.1_in_the_role_of rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/role"/>
</crm:PC14_carried_out_by>
</crm:P01i_is_domain_of>
</crmpe:PE12_Data_Curating_Service>
</crmpe:PP13i_was_volatile_dataset_curated_by>
</crmpe:PE24_Volatile_Dataset>
</crmpe:PP24i_is_dataset_snapshot_of>
<crm:P94i_was_created_by>
<crm:E65_Creation rdf:about="uuid:AAAC">
<crm:P01i_is_domain_of>
<crm:PC14_carried_out_by rdf:about="uuid:AAAE">
<crm:P02_has_range rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Actor/Regione%20Calabria"/>
<crm:P14.1_in_the_role_of rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/role"/>
</crm:PC14_carried_out_by>
</crm:P01i_is_domain_of>
<crm:P01i_is_domain_of>
<crm:PC14_carried_out_by rdf:about="uuid:AAAD">
<crm:P02_has_range rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Actor/Regione%20Calabria"/>
<crm:P14.1_in_the_role_of rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/role"/>
</crm:PC14_carried_out_by>
</crm:P01i_is_domain_of>
<crm:P2_has_type rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/activitytype"/>
</crm:E65_Creation>
</crm:P94i_was_created_by>
<crm:P1_is_identified_by>
<crm:E42_Identifier rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Dataset/Appellation/1100031596">
<crm:P2_has_type rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/idtype"/>
</crm:E42_Identifier>
</crm:P1_is_identified_by>
<crm:P12i_was_present_at>
<crm:E7_Activity rdf:about="uuid:AAAA">
<crm:P01i_is_domain_of>
<crm:PC14_carried_out_by rdf:about="uuid:AAAB">
<crm:P02_has_range>
<crm:E39_Actor rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Actor/MIBACT-ICCU%20-%20Central%20Institute%20of%20the%20Union%20Catalogue">
<crm:P2_has_type>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/Organization">
<rdfs:label>Organization</rdfs:label>
</crm:E55_Type>
</crm:P2_has_type>
<crm:P1_is_identified_by>
<crm:E41_Appellation rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Actor/Appellation/MIBACT-ICCU%20-%20Central%20Institute%20of%20the%20Union%20Catalogue">
<rdfs:label>MIBACT-ICCU - Central Institute of the Union Catalogue</rdfs:label>
</crm:E41_Appellation>
</crm:P1_is_identified_by>
<rdfs:label>MIBACT-ICCU - Central Institute of the Union Catalogue</rdfs:label>
</crm:E39_Actor>
</crm:P02_has_range>
<crm:P14.1_in_the_role_of rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/role"/>
</crm:PC14_carried_out_by>
</crm:P01i_is_domain_of>
<crm:P2_has_type rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/activitytype"/>
</crm:E7_Activity>
</crm:P12i_was_present_at>
</crm:E33_Linguistic_Object>
</rdf:RDF>

View File

@ -0,0 +1,57 @@
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:acdm="http://registry.ariadne-infrastructure.eu/"
xmlns:ariadneplus="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crmdig="http://www.ics.forth.gr/isl/CRMext/CRMdig.rdfs/"
xmlns:rdaGr2="http://rdvocab.info/ElementsGr2/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enrichment="http://www.europeana.eu/schemas/edm/enrichment/"
xmlns:aat="http://vocab.getty.edu/aat/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:sch="http://purl.oclc.org/dsdl/schematron"
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:crm="http://www.cidoc-crm.org/cidoc-crm/"
xmlns:wgs84="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:dbpedia-owl="http://dbpedia.org/ontology/"
xmlns:ore="http://www.openarchives.org/ore/terms/"
xmlns:adms="http://www.w3.org/ns/adms#"
xmlns:vcard="https://www.w3.org/TR/vcard-rdf/"
xmlns:frbr="http://www.cidoc-crm.org/frbr/"
xmlns:edm="http://www.europeana.eu/schemas/edm/"
xmlns:crmpe="http://www.ics.forth.gr/isl/CRMext/CRMpe.rdfs/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<crm:E33_Linguistic_Object rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Dataset/http%3A%2F%2Fregistry.ariadne-infrastructure.eu%2Fdataset%2F25058478">
<crm:P104_is_subject_to>
<crm:E30_Right rdf:about="uuid:AAAF">
<crm:P75i_is_possessed_by>
<crm:E39_Actor rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Actor/Regione%20Calabria">
<rdfs:label>Regione Calabria</rdfs:label>
</crm:E39_Actor>
</crm:P75i_is_possessed_by>
</crm:E30_Right>
</crm:P104_is_subject_to>
<crmpe:PP8i_is_dataset_hosted_by>
<crmpe:PE15_Data_E-Service rdf:about="uuid:AAAL">
<crm:P01i_is_domain_of>
<crm:PC14_carried_out_by rdf:about="uuid:AAAM">
<crm:P02_has_range rdf:resource="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Actor/Regione%20Calabria"/>
<crm:P14.1_in_the_role_of>
<crm:E55_Type rdf:about="http://www.ariadneplus-project.eu/ARIADNE/ARIADNECatalog/Concept/role">
<rdfs:label>Technical Responsible</rdfs:label>
<rdfs:label>Legal Responsible</rdfs:label>
<rdfs:label>Creator</rdfs:label>
<rdfs:label>Contributor</rdfs:label>
<rdfs:label>publisher</rdfs:label>
</crm:E55_Type>
</crm:P14.1_in_the_role_of>
</crm:PC14_carried_out_by>
</crm:P01i_is_domain_of>
</crmpe:PE15_Data_E-Service>
</crmpe:PP8i_is_dataset_hosted_by>
<rdfs:label>http://registry.ariadne-infrastructure.eu/dataset/25058478</rdfs:label>
<rdf:type rdf:resource="http://www.ics.forth.gr/isl/CRMext/CRMpe.rdfs/PE22_Persistent_Dataset"/>
</crm:E33_Linguistic_Object>
</rdf:RDF>

View File

@ -0,0 +1,97 @@
<factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/junit/junit/4.12/junit-4.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/4.2.5.RELEASE/spring-core-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-data-services/2.0.1-SAXONHE-SNAPSHOT/dnet-data-services-2.0.1-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-core-components/2.0.1-SAXONHE-SNAPSHOT/dnet-core-components-2.0.1-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/4.2.5.RELEASE/spring-webmvc-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/4.2.5.RELEASE/spring-expression-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/quartz-scheduler/quartz/2.2.2/quartz-2.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/c3p0/c3p0/0.9.1.1/c3p0-0.9.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/4.2.5.RELEASE/spring-context-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/4.2.5.RELEASE/spring-aop-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/4.2.5.RELEASE/spring-beans-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context-support/4.2.5.RELEASE/spring-context-support-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/18.0/guava-18.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/ehcache/ehcache-core/2.6.2/ehcache-core-2.6.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-queryparser/5.5.0/lucene-queryparser-5.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-core/5.5.0/lucene-core-5.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-queries/5.5.0/lucene-queries-5.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/lucene/lucene-sandbox/5.5.0/lucene-sandbox-5.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/z3950/zing/cql-java/1.7/cql-java-1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/stringtemplate/3.2/stringtemplate-3.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/2.4/commons-io-2.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.4.1/httpclient-4.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.1/httpcore-4.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-core/3.1.5/cxf-core-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/woodstox/woodstox-core-asl/4.4.1/woodstox-core-asl-4.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/woodstox/stax2-api/3.1.4/stax2-api-3.1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/ws/xmlschema/xmlschema-core/2.2.1/xmlschema-core-2.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-frontend-jaxws/3.1.5/cxf-rt-frontend-jaxws-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-bindings-soap/3.1.5/cxf-rt-bindings-soap-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-wsdl/3.1.5/cxf-rt-wsdl-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-databinding-jaxb/3.1.5/cxf-rt-databinding-jaxb-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/xml/bind/jaxb-impl/2.2.11/jaxb-impl-2.2.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/xml/bind/jaxb-core/2.2.11/jaxb-core-2.2.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-bindings-xml/3.1.5/cxf-rt-bindings-xml-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-frontend-simple/3.1.5/cxf-rt-frontend-simple-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-ws-addr/3.1.5/cxf-rt-ws-addr-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-ws-policy/3.1.5/cxf-rt-ws-policy-3.1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/neethi/neethi/3.0.3/neethi-3.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.8/commons-codec-1.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/sf/saxon/Saxon-HE/9.5.1-5/Saxon-HE-9.5.1-5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jaxen/jaxen/1.1.6/jaxen-1.1.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ximpleware/vtd-xml/2.13.4/vtd-xml-2.13.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/mycila/xmltool/3.3/xmltool-3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.10.2/joda-time-2.10.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-test/4.2.5.RELEASE/spring-test-4.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-core-services/2.0.1-SAXONHE-SNAPSHOT/dnet-core-services-2.0.1-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/groovy/groovy-all/2.4.6/groovy-all-2.4.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mongodb/mongo-java-driver/3.4.2/mongo-java-driver-3.4.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-net/commons-net/3.3/commons-net-3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/jcraft/jsch/0.1.53/jsch-0.1.53.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-csv/1.0/commons-csv-1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.6/commons-compress-1.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/tukaani/xz/1.4/xz-1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/svenson/svenson-json/1.4.0/svenson-json-1.4.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/xsom/xsom/20110809/xsom-20110809.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/relaxngDatatype/relaxngDatatype/20020414/relaxngDatatype-20020414.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/oro/oro/2.0.8/oro-2.0.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/eu/dnetlib/dnet-msro-service/6.0.1-SAXONHE-SNAPSHOT/dnet-msro-service-6.0.1-SAXONHE-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/typesafe/config/1.3.0/config-1.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/mail/mail/1.4.7/mail-1.4.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/gr/forth/ics/isl/x3ml-engine/1.9.0/x3ml-engine-1.9.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/thoughtworks/xstream/xstream/1.4.2/xstream-1.4.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/damnhandy/handy-uri-templates/2.1.6/handy-uri-templates-2.1.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/jena/jena-core/2.12.0/jena-core-2.12.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/jena/jena-iri/1.1.0/jena-iri-1.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jooq/joox/1.2.0/joox-1.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/gr/forth/ics/isl/X3ML_reverse_utils/1.5/X3ML_reverse_utils-1.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jsoup/jsoup/1.7.3/jsoup-1.7.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/jena/jena-arq/2.12.0/jena-arq-2.12.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jsonld-java/jsonld-java/0.5.0/jsonld-java-0.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.3.3/jackson-core-2.3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.3.3/jackson-databind-2.3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.3.0/jackson-annotations-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient-cache/4.2.6/httpclient-cache-4.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jcl-over-slf4j/1.7.6/jcl-over-slf4j-1.7.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.16.16/lombok-1.16.16.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/4.3.14.RELEASE/spring-web-4.3.14.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/log4j/log4j/1.2.17/log4j-1.2.17.jar" enabled="true" runInBatchMode="false"/>
</factorypath>

View File

@ -0,0 +1,10 @@
{
"type_source": "SVN",
"goal": "clean dependency:tree package -U source:jar",
"url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet50/modules/dnet-ariadneplus/trunk/",
"deploy_repository": "dnet5-snapshots",
"version": "5",
"mail": "sandro.labruzzo@isti.cnr.it,michele.artini@isti.cnr.it, claudio.atzori@isti.cnr.it, alessia.bardi@isti.cnr.it",
"deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet5-snapshots",
"name": "dnet-ariadneplus"
}

175
dnet-ariadneplus/pom.xml Normal file
View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath />
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-ariadneplus</artifactId>
<packaging>jar</packaging>
<version>1.0.1-SNAPSHOT</version>
<scm>
<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet50/modules/dnet-ariadneplus/trunk</developerConnection>
</scm>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-data-services</artifactId>
<version>[2.0.0-SAXONHE, 3.0.0-SAXONHE)</version>
</dependency>
<dependency>
<groupId>eu.dnetlib</groupId>
<artifactId>dnet-msro-service</artifactId>
<version>[6.0.0-SAXONHE, 7.0.0-SAXONHE)</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.gcube.common</groupId>-->
<!--<artifactId>authorization-client</artifactId>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.gcube.information-system</groupId>-->
<!--<artifactId>information-system-model</artifactId>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.gcube.information-system</groupId>-->
<!--<artifactId>gcube-resources</artifactId>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.gcube.information-system</groupId>-->
<!--<artifactId>resource-registry-client</artifactId>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.gcube.information-system</groupId>-->
<!--<artifactId>resource-registry-publisher</artifactId>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.gcube.core</groupId>-->
<!--<artifactId>common-scope</artifactId>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.gcube.information-system</groupId>-->
<!--<artifactId>ariadneplus-entities</artifactId>-->
<!--<version>0.0.1-SNAPSHOT</version>-->
<!--</dependency>-->
</dependencies>
<!--<dependencyManagement>-->
<!--<dependencies>-->
<!--<dependency>-->
<!--<groupId>org.gcube.distribution</groupId>-->
<!--<artifactId>gcube-bom</artifactId>-->
<!--<version>LATEST</version>-->
<!--<type>pom</type>-->
<!--<scope>import</scope>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.gcube.distribution</groupId>-->
<!--<artifactId>gcube-smartgears-bom</artifactId>-->
<!--<version>LATEST</version>-->
<!--<type>pom</type>-->
<!--<scope>import</scope>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.gcube.information-system</groupId>-->
<!--<artifactId>information-system-bom</artifactId>-->
<!--<version>LATEST</version>-->
<!--<type>pom</type>-->
<!--<scope>import</scope>-->
<!--</dependency>-->
<!--</dependencies>-->
<!--</dependencyManagement>-->
<!--<repositories>-->
<!--<repository>-->
<!--<id>gcube-snapshots</id>-->
<!--<name>gCube Snapshots</name>-->
<!--<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-snapshots</url>-->
<!--<releases>-->
<!--<enabled>false</enabled>-->
<!--</releases>-->
<!--<snapshots>-->
<!--<enabled>true</enabled>-->
<!--</snapshots>-->
<!--</repository>-->
<!--<repository>-->
<!--<id>gcube-releases</id>-->
<!--<name>gCube Releases</name>-->
<!--<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-releases</url>-->
<!--<snapshots>-->
<!--<enabled>false</enabled>-->
<!--</snapshots>-->
<!--<releases>-->
<!--<enabled>true</enabled>-->
<!--</releases>-->
<!--</repository>-->
<!--<repository>-->
<!--<id>gcube-externals</id>-->
<!--<name>gCube Externals</name>-->
<!--<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-externals</url>-->
<!--<snapshots>-->
<!--<enabled>false</enabled>-->
<!--</snapshots>-->
<!--<releases>-->
<!--<enabled>true</enabled>-->
<!--</releases>-->
<!--</repository>-->
<!--</repositories>-->
<!--<pluginRepositories>-->
<!--<pluginRepository>-->
<!--<id>gcube-snapshots</id>-->
<!--<name>gCube Snapshots</name>-->
<!--<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-snapshots</url>-->
<!--<releases>-->
<!--<enabled>false</enabled>-->
<!--</releases>-->
<!--<snapshots>-->
<!--<enabled>true</enabled>-->
<!--</snapshots>-->
<!--</pluginRepository>-->
<!--<pluginRepository>-->
<!--<id>gcube-releases</id>-->
<!--<name>gCube Releases</name>-->
<!--<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-releases</url>-->
<!--<snapshots>-->
<!--<enabled>false</enabled>-->
<!--</snapshots>-->
<!--<releases>-->
<!--<enabled>true</enabled>-->
<!--</releases>-->
<!--</pluginRepository>-->
<!--<pluginRepository>-->
<!--<id>gcube-externals</id>-->
<!--<name>gCube Externals</name>-->
<!--<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-externals</url>-->
<!--<snapshots>-->
<!--<enabled>false</enabled>-->
<!--</snapshots>-->
<!--<releases>-->
<!--<enabled>true</enabled>-->
<!--</releases>-->
<!--</pluginRepository>-->
<!--</pluginRepositories>-->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -0,0 +1,122 @@
package eu.dnetlib.ariadneplus.workflows.nodes;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import eu.dnetlib.clients.enabling.ISLookUpClient;
import eu.dnetlib.enabling.locators.UniqueServiceLocator;
import eu.dnetlib.msro.workflows.graph.Arc;
import eu.dnetlib.msro.workflows.nodes.AsyncJobNode;
import eu.dnetlib.msro.workflows.procs.Env;
import eu.dnetlib.msro.workflows.util.WorkflowsConstants;
import eu.dnetlib.rmi.datasource.DatasourceManagerService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* Created by Alessia Bardi on 12/01/2018.
*
* @author Alessia Bardi
*/
public class ClarinAPIGeneratorJobNode extends AsyncJobNode {
private static final Log log = LogFactory.getLog(ClarinAPIGeneratorJobNode.class);
/** Path to a local folder containing the subfolders with Clarin mapping files **/
private String folderPath;
/** Path to a local folder containing the subfolders with Clarin input files **/
private String inputBaseUrlPrefix;
private String metadataIdentifierPath;
private String clarinDatasourceProfileID;
private String clarinDatasourceOriginalId;
@Autowired
private UniqueServiceLocator serviceLocator;
@Autowired
private ISLookUpClient isLookupClient;
@Override
protected String execute(final Env env) throws Exception {
Path folder = Paths.get(getFolderPath());
if (!Files.isDirectory(folder)){
throw new IllegalArgumentException(getFolderPath()+" must be a directory");
}
final DatasourceManagerService dsMan = getServiceLocator().getService(DatasourceManagerService.class);
List<String> apiIds = getIsLookupClient().search("//RESOURCE_PROFILE[./HEADER/RESOURCE_IDENTIFIER/@value='"+getClarinDatasourceProfileID()+"']//INTERFACE/@id/string()");
ClarinFileVisitor visitor = new ClarinFileVisitor(getClarinDatasourceProfileID(), getClarinDatasourceOriginalId(),
getInputBaseUrlPrefix(), getMetadataIdentifierPath(), apiIds, getServiceLocator(), getIsLookupClient());
Files.walkFileTree(folder, visitor);
env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX +"visitedFiles", visitor.getCountVisitedFiles());
env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX +"createdTDS", visitor.getCountCreatedTDS());
env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX +"updatedTDS", visitor.getCountUpdatedTDS());
env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX +"visitedFolders", visitor.getCountVisitedFolders());
env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX +"createdInterfaces", visitor.getCountCreatedInterfaces());
return Arc.DEFAULT_ARC;
}
public String getFolderPath() {
return folderPath;
}
public void setFolderPath(final String folderPath) {
this.folderPath = folderPath;
}
public String getInputBaseUrlPrefix() {
return inputBaseUrlPrefix;
}
public void setInputBaseUrlPrefix(final String inputBaseUrlPrefix) {
this.inputBaseUrlPrefix = inputBaseUrlPrefix;
}
public String getMetadataIdentifierPath() {
return metadataIdentifierPath;
}
public void setMetadataIdentifierPath(final String metadataIdentifierPath) {
this.metadataIdentifierPath = metadataIdentifierPath;
}
public String getClarinDatasourceProfileID() {
return clarinDatasourceProfileID;
}
public void setClarinDatasourceProfileID(final String clarinDatasourceProfileID) {
this.clarinDatasourceProfileID = clarinDatasourceProfileID;
}
public String getClarinDatasourceOriginalId() {
return clarinDatasourceOriginalId;
}
public void setClarinDatasourceOriginalId(final String clarinDatasourceOriginalId) {
this.clarinDatasourceOriginalId = clarinDatasourceOriginalId;
}
public UniqueServiceLocator getServiceLocator() {
return serviceLocator;
}
public void setServiceLocator(final UniqueServiceLocator serviceLocator) {
this.serviceLocator = serviceLocator;
}
public ISLookUpClient getIsLookupClient() {
return isLookupClient;
}
public void setIsLookupClient(final ISLookUpClient isLookupClient) {
this.isLookupClient = isLookupClient;
}
}

View File

@ -0,0 +1,263 @@
package eu.dnetlib.ariadneplus.workflows.nodes;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import eu.dnetlib.clients.enabling.ISLookUpClient;
import eu.dnetlib.enabling.locators.UniqueServiceLocator;
import eu.dnetlib.miscutils.datetime.DateUtils;
import eu.dnetlib.rmi.datasource.DatasourceManagerService;
import eu.dnetlib.rmi.datasource.DatasourceManagerServiceException;
import eu.dnetlib.rmi.datasource.IfaceDesc;
import eu.dnetlib.rmi.enabling.ISLookUpException;
import eu.dnetlib.rmi.enabling.ISRegistryException;
import eu.dnetlib.rmi.enabling.ISRegistryService;
import org.antlr.stringtemplate.StringTemplate;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import static java.nio.file.FileVisitResult.CONTINUE;
/**
* Created by Alessia Bardi on 12/01/2018.
*
* @author Alessia Bardi
*/
public class ClarinFileVisitor extends SimpleFileVisitor<Path> {
private static final Log log = LogFactory.getLog(ClarinFileVisitor.class);
private static final String API_PREFIX = "api_________::";
private static final String TDS_TEMPLATE ="/eu/dnetlib/ariadneplus/workflows/nodes/clarin_tds.xml.st";
private List<String> interfaces = Lists.newArrayList();
private String clarinDatasourceProfileID;
private String clarinDatasourceOriginalId;
private DatasourceManagerService dsMan = null;
private String inputBaseUrlPrefix;
private String metadataIdentifierPath;
private ISLookUpClient lookupClient;
private ISRegistryService registryService;
private int countVisitedFiles = 0;
private int countCreatedTDS = 0;
private int countUpdatedTDS = 0;
private int countVisitedFolders = 0;
private int countCreatedInterfaces = 0;
@Override
public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) throws IOException {
log.info("Processing " + dir.toString());
countVisitedFolders++;
String dirName = dir.getFileName().toString();
if(dirName.equalsIgnoreCase("x3ml-mappings")) return CONTINUE;
String apiId = API_PREFIX + getClarinDatasourceOriginalId() + "::" + dirName;
if (!interfaces.contains(apiId)) {
//API TO BE CREATED
IfaceDesc iface = new IfaceDesc();
iface.setActive(false);
iface.setCompliance("metadata");
iface.setContentDescription("metadata");
iface.setId(apiId);
iface.setRemovable(true);
iface.setTypology("dnet:repository::clarin");
iface.setAccessProtocol("filesystem");
Map<String, String> accessParams = Maps.newHashMap();
accessParams.put("extensions", "xml");
iface.setAccessParams(accessParams);
iface.setBaseUrl(StringUtils.appendIfMissing(getInputBaseUrlPrefix(), "/") + dirName);
Map<String, String> extraFields = Maps.newHashMap();
extraFields.put("metadata_identifier_path", getMetadataIdentifierPath());
iface.setExtraFields(extraFields);
try {
dsMan.addInterface(getClarinDatasourceProfileID(), iface);
countCreatedInterfaces++;
log.info("CREATED NEW INTERFACE " + iface.getId() + " for " + getClarinDatasourceOriginalId() + "(" + getClarinDatasourceProfileID() + ")");
} catch (DatasourceManagerServiceException e) {
log.error("Can't add interface " + iface.getId() + " to " + getClarinDatasourceOriginalId() + "(" + getClarinDatasourceProfileID() + ")", e);
return CONTINUE;
}
} else {
if (log.isDebugEnabled()) {
log.debug("Interface " + apiId + " already exists");
}
}
return CONTINUE;
}
@Override
public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException {
String filename = file.getFileName().toString();
log.info("Processing " + file.toString());
countVisitedFiles++;
String tdsTitle = filename;
//call Files.lines which will use a stream to iterate over each line of the file.
//Next we will convert the stream to a string by calling Collectors.joining() which will join all the strings together.
String updatedCode = Files.lines(file).collect(Collectors.joining()).replace("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>", "");
try {
List<String> res = this.lookupClient.search("//RESOURCE_PROFILE[.//RESOURCE_TYPE/@value=\"TransformationRuleDSResourceType\" and .//CONFIGURATION/SCRIPT/TITLE/string()=\""+tdsTitle+"\"]/HEADER/RESOURCE_IDENTIFIER/@value/string()");
if(res == null || res.isEmpty()){
log.debug("Creating new TDS profile for "+filename);
final String template = IOUtils.toString(getClass().getResourceAsStream(TDS_TEMPLATE), Charset.forName("UTF-8"));
final StringTemplate st = new StringTemplate(template);
st.setAttribute("date", DateUtils.calculate_ISO8601(DateUtils.now()));
st.setAttribute("title", tdsTitle);
st.setAttribute("mapping", "<![CDATA["+updatedCode+"]]>");
String profId = this.registryService.registerProfile(st.toString());
countCreatedTDS++;
log.info("REGISTERED NEW TDS FOR "+filename+": "+profId);
}
else{
String tdsProfileId = res.get(0);
log.debug("Updating TDS profile "+tdsProfileId+"for "+filename);
boolean done = this.registryService.updateProfileNode(tdsProfileId, "//CONFIGURATION/SCRIPT/CODE", "<CODE><![CDATA["+updatedCode+"]]></CODE>");
if(done){
log.info("TDS PROFILE "+tdsProfileId+" UPDATED with contents from "+filename);
countUpdatedTDS++;
}
if(!done){
log.error("!!! TDS PROFILE "+tdsProfileId+" COULD NOT BE UPDATED with contents from "+filename);
}
}
} catch (ISLookUpException | ISRegistryException e) {
log.error("CANNOT UPDATE/CREATE TDS PROFILE FOR "+filename, e);
}
return CONTINUE;
}
protected ClarinFileVisitor() {
super();
}
public ClarinFileVisitor(final String clarinDatasourceProfileID, final String clarinDatasourceOriginalId,
final String inputBaseUrlPrefix, final String metadataIdentifierPath, final List<String> interfaces,
final UniqueServiceLocator locator, final ISLookUpClient lookupClient) {
super();
this.clarinDatasourceOriginalId = clarinDatasourceOriginalId;
this.clarinDatasourceProfileID = clarinDatasourceProfileID;
this.inputBaseUrlPrefix = inputBaseUrlPrefix;
this.metadataIdentifierPath = metadataIdentifierPath;
this.interfaces = interfaces;
this.dsMan = locator.getService(DatasourceManagerService.class);
this.registryService = locator.getService(ISRegistryService.class);
this.lookupClient = lookupClient;
}
public List<String> getInterfaces() {
return interfaces;
}
public void setInterfaces(final List<String> interfaces) {
this.interfaces = interfaces;
}
public String getClarinDatasourceOriginalId() {
return clarinDatasourceOriginalId;
}
public void setClarinDatasourceOriginalId(final String clarinDatasourceOriginalId) {
this.clarinDatasourceOriginalId = clarinDatasourceOriginalId;
}
public DatasourceManagerService getDsMan() {
return dsMan;
}
public void setDsMan(final DatasourceManagerService dsMan) {
this.dsMan = dsMan;
}
public String getInputBaseUrlPrefix() {
return inputBaseUrlPrefix;
}
public void setInputBaseUrlPrefix(final String inputBaseUrlPrefix) {
this.inputBaseUrlPrefix = inputBaseUrlPrefix;
}
public String getMetadataIdentifierPath() {
return metadataIdentifierPath;
}
public void setMetadataIdentifierPath(final String metadataIdentifierPath) {
this.metadataIdentifierPath = metadataIdentifierPath;
}
public String getClarinDatasourceProfileID() {
return clarinDatasourceProfileID;
}
public void setClarinDatasourceProfileID(final String clarinDatasourceProfileID) {
this.clarinDatasourceProfileID = clarinDatasourceProfileID;
}
public ISLookUpClient getLookupClient() {
return lookupClient;
}
public void setLookupClient(final ISLookUpClient lookupClient) {
this.lookupClient = lookupClient;
}
public ISRegistryService getRegistryService() {
return registryService;
}
public void setRegistryService(final ISRegistryService registryService) {
this.registryService = registryService;
}
public int getCountVisitedFiles() {
return countVisitedFiles;
}
public void setCountVisitedFiles(final int countVisitedFiles) {
this.countVisitedFiles = countVisitedFiles;
}
public int getCountCreatedTDS() {
return countCreatedTDS;
}
public void setCountCreatedTDS(final int countCreatedTDS) {
this.countCreatedTDS = countCreatedTDS;
}
public int getCountUpdatedTDS() {
return countUpdatedTDS;
}
public void setCountUpdatedTDS(final int countUpdatedTDS) {
this.countUpdatedTDS = countUpdatedTDS;
}
public int getCountVisitedFolders() {
return countVisitedFolders;
}
public void setCountVisitedFolders(final int countVisitedFolders) {
this.countVisitedFolders = countVisitedFolders;
}
public int getCountCreatedInterfaces() {
return countCreatedInterfaces;
}
public void setCountCreatedInterfaces(final int countCreatedInterfaces) {
this.countCreatedInterfaces = countCreatedInterfaces;
}
}

View File

@ -0,0 +1,140 @@
package eu.dnetlib.ariadneplus.workflows.nodes;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.gson.Gson;
import eu.dnetlib.enabling.resultset.client.ResultSetClient;
import eu.dnetlib.msro.workflows.graph.Arc;
import eu.dnetlib.msro.workflows.nodes.AsyncJobNode;
import eu.dnetlib.msro.workflows.procs.Env;
import eu.dnetlib.msro.workflows.util.WorkflowsConstants;
import eu.dnetlib.rmi.common.ResultSet;
import eu.dnetlib.rmi.manager.MSROException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.springframework.beans.factory.annotation.Autowired;
/**
* Created by Alessia Bardi on 09/10/2017.
*
* @author Alessia Bardi
*/
public abstract class PublishAbstractJobNode extends AsyncJobNode {
private static final Log log = LogFactory.getLog(PublishAbstractJobNode.class);
private String inputEprParam;
@Autowired
private ResultSetClient resultSetClient;
private String publisherEndpoint;
//for parallel requests to the publisher endpoint
private int nThreads = 5;
private ExecutorService executorService = Executors.newFixedThreadPool(nThreads);
private List<Future<Integer>> resList = Lists.newArrayList();
@Override
protected String execute(final Env env) throws Exception {
final ResultSet<?> rsIn = env.getAttribute(getInputEprParam(), ResultSet.class);
if ((rsIn == null)) { throw new MSROException("InputEprParam (" + getInputEprParam() + ") not found in ENV"); }
int countAll = 0;
int countOk = 0;
Map<Integer, Integer> errors = Maps.newHashMap();
log.info("Publisher endpoint: " + getPublisherEndpoint());
for (String record : getResultSetClient().iter(rsIn, String.class)) {
countAll++;
Future<Integer> res = executorService.submit( () -> {
try {
HttpPost post = new HttpPost(getPublisherEndpoint());
List<NameValuePair> params = Lists.newArrayList();
params.add(new BasicNameValuePair("record", record));
params.add(new BasicNameValuePair("ariadneplusTarget", getTarget()));
UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params, "UTF-8");
post.setEntity(ent);
HttpClient client = HttpClients.createDefault();
HttpResponse responsePOST = client.execute(post);
int statusCode = responsePOST.getStatusLine().getStatusCode();
switch (statusCode) {
case 200:
return statusCode;
default:
log.error(responsePOST.getStatusLine().getStatusCode() + ": " + responsePOST.getStatusLine().getReasonPhrase());
log.error("Source record causing error: " + record);
errors.merge(statusCode, 1, Integer::sum);
return statusCode;
}
} catch (IOException e) {
e.printStackTrace();
errors.merge(-1, 1, Integer::sum);
}
return -1;
});
resList.add(res);
}
executorService.shutdown();
//now let's wait for the results. We can block ourselves here: we have nothing else to do
log.info("Waiting for responses");
for(Future<Integer> res : resList){
if(res.get() == 200) countOk++;
}
log.info(String.format("Got all responses. Ok %s/%s", countOk, countAll));
env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX + "countOk", countOk);
env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX + "countAll", countAll);
env.setAttribute(WorkflowsConstants.MAIN_LOG_PREFIX + "errorsMap", new Gson().toJson(errors));
log.info("publishing completed");
if (!errors.isEmpty()) {
log.warn("Problems in publishing on "+getTarget()+": "+countOk+"/"+countAll+" see error maps for details");
}
if(countAll == 0) log.warn("0 resources to publish");
return Arc.DEFAULT_ARC;
}
public abstract String getTarget();
public String getInputEprParam() {
return this.inputEprParam;
}
public void setInputEprParam(final String inputEprParam) {
this.inputEprParam = inputEprParam;
}
public String getPublisherEndpoint() {
return publisherEndpoint;
}
public void setPublisherEndpoint(final String publisherEndpoint) {
this.publisherEndpoint = publisherEndpoint;
}
public ResultSetClient getResultSetClient() {
return resultSetClient;
}
public void setResultSetClient(final ResultSetClient resultSetClient) {
this.resultSetClient = resultSetClient;
}
}

View File

@ -0,0 +1,10 @@
package eu.dnetlib.ariadneplus.workflows.nodes;
public class PublishJRRJobNode extends PublishAbstractJobNode {
@Override
public String getTarget() {
return "JRR";
}
}

View File

@ -0,0 +1,10 @@
package eu.dnetlib.ariadneplus.workflows.nodes;
public class PublishVirtuosoJobNode extends PublishAbstractJobNode {
@Override
public String getTarget() {
return "VIRTUOSO";
}
}

Some files were not shown because too many files have changed in this diff Show More