From a172a8d1280c26484bd2a0ded2a22bd901687e8f Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Thu, 2 Feb 2017 17:45:12 +0000 Subject: [PATCH] Added references of Parthenos model git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/parthenos-entities@142113 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../PE20_Volatile_Digital_Object.java | 3 +- ...as_volatile_digital_object_curated_by.java | 13 - .../isrelatedto/cidoc/P9_consists_of.java | 2 + .../PP11_curates_volatile_digital_object.java | 3 +- .../PP12_curates_volatile_software.java | 1 - .../PP13_curates_volatile_dataset.java | 1 - ...as_volatile_digital_object_curated_by.java | 12 + ...P12i_was_volatile_software_curated_by.java | 1 - ...PP13i_was_volatile_dataset_curated_by.java | 1 - .../relation/isrelatedto/parthenos/run.sh | 78 ++ ...{4.1 CRMpe_v1.8.rdfs => CRMpe_v1.8.1.rdfs} | 1073 +++++++++-------- 11 files changed, 635 insertions(+), 553 deletions(-) delete mode 100644 src/main/java/org/gcube/informationsystem/model/relation/PP11i_was_volatile_digital_object_curated_by.java rename src/main/java/org/gcube/informationsystem/model/relation/{ => isrelatedto/parthenos}/PP11_curates_volatile_digital_object.java (73%) create mode 100644 src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP11i_was_volatile_digital_object_curated_by.java create mode 100755 src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/run.sh rename src/main/resources/references/{4.1 CRMpe_v1.8.rdfs => CRMpe_v1.8.1.rdfs} (96%) diff --git a/src/main/java/org/gcube/informationsystem/model/entity/resource/parthenos/PE20_Volatile_Digital_Object.java b/src/main/java/org/gcube/informationsystem/model/entity/resource/parthenos/PE20_Volatile_Digital_Object.java index 6222d64..dcc6f30 100644 --- a/src/main/java/org/gcube/informationsystem/model/entity/resource/parthenos/PE20_Volatile_Digital_Object.java +++ b/src/main/java/org/gcube/informationsystem/model/entity/resource/parthenos/PE20_Volatile_Digital_Object.java @@ -5,6 +5,7 @@ import org.gcube.informationsystem.model.entity.resource.cidoc.D1_Digital_Object /** * @author Luca Frosini (ISTI - CNR) */ -public interface PE20_Volatile_Digital_Object extends D1_Digital_Object { +public interface PE20_Volatile_Digital_Object extends PE32_Curated_Thing, + D1_Digital_Object { } diff --git a/src/main/java/org/gcube/informationsystem/model/relation/PP11i_was_volatile_digital_object_curated_by.java b/src/main/java/org/gcube/informationsystem/model/relation/PP11i_was_volatile_digital_object_curated_by.java deleted file mode 100644 index 8b45208..0000000 --- a/src/main/java/org/gcube/informationsystem/model/relation/PP11i_was_volatile_digital_object_curated_by.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.gcube.informationsystem.model.relation; - -import org.gcube.informationsystem.model.relation.isrelatedto.parthenos.inverse.PP32i_is_curated_by; - - - -/** - * @author Luca Frosini (ISTI - CNR) - */ -public interface PP11i_was_volatile_digital_object_curated_by extends - PP32i_is_curated_by { - -} diff --git a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/cidoc/P9_consists_of.java b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/cidoc/P9_consists_of.java index 87de142..fd93ca4 100644 --- a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/cidoc/P9_consists_of.java +++ b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/cidoc/P9_consists_of.java @@ -5,6 +5,8 @@ import org.gcube.informationsystem.model.relation.IsRelatedTo; /** * @author Luca Frosini (ISTI - CNR) + * + * P9 consists of (forms part of) * Domain: E4 Period * Range: E4 Period * Subproperty of: E92 Spacetime Volume. P132 spatiotemporally overlaps diff --git a/src/main/java/org/gcube/informationsystem/model/relation/PP11_curates_volatile_digital_object.java b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP11_curates_volatile_digital_object.java similarity index 73% rename from src/main/java/org/gcube/informationsystem/model/relation/PP11_curates_volatile_digital_object.java rename to src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP11_curates_volatile_digital_object.java index a28b129..46a50e4 100644 --- a/src/main/java/org/gcube/informationsystem/model/relation/PP11_curates_volatile_digital_object.java +++ b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP11_curates_volatile_digital_object.java @@ -1,8 +1,7 @@ -package org.gcube.informationsystem.model.relation; +package org.gcube.informationsystem.model.relation.isrelatedto.parthenos; import org.gcube.informationsystem.model.entity.resource.parthenos.PE10_Digital_Curating_Service; import org.gcube.informationsystem.model.entity.resource.parthenos.PE20_Volatile_Digital_Object; -import org.gcube.informationsystem.model.relation.isrelatedto.parthenos.PP32_curates; public interface PP11_curates_volatile_digital_object diff --git a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP12_curates_volatile_software.java b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP12_curates_volatile_software.java index c757541..d2d5735 100644 --- a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP12_curates_volatile_software.java +++ b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP12_curates_volatile_software.java @@ -2,7 +2,6 @@ package org.gcube.informationsystem.model.relation.isrelatedto.parthenos; import org.gcube.informationsystem.model.entity.resource.parthenos.PE11_Software_Curating_Service; import org.gcube.informationsystem.model.entity.resource.parthenos.PE23_Volatile_Software; -import org.gcube.informationsystem.model.relation.PP11_curates_volatile_digital_object; /** diff --git a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP13_curates_volatile_dataset.java b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP13_curates_volatile_dataset.java index 933d3f0..014fa73 100644 --- a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP13_curates_volatile_dataset.java +++ b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/PP13_curates_volatile_dataset.java @@ -2,7 +2,6 @@ package org.gcube.informationsystem.model.relation.isrelatedto.parthenos; import org.gcube.informationsystem.model.entity.resource.parthenos.PE12_Data_Curating_Service; import org.gcube.informationsystem.model.entity.resource.parthenos.PE24_Volatile_Dataset; -import org.gcube.informationsystem.model.relation.PP11_curates_volatile_digital_object; /** * @author Luca Frosini (ISTI - CNR) diff --git a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP11i_was_volatile_digital_object_curated_by.java b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP11i_was_volatile_digital_object_curated_by.java new file mode 100644 index 0000000..b6d63ce --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP11i_was_volatile_digital_object_curated_by.java @@ -0,0 +1,12 @@ +package org.gcube.informationsystem.model.relation.isrelatedto.parthenos.inverse; + + + + +/** + * @author Luca Frosini (ISTI - CNR) + */ +public interface PP11i_was_volatile_digital_object_curated_by extends + PP32i_is_curated_by { + +} diff --git a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP12i_was_volatile_software_curated_by.java b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP12i_was_volatile_software_curated_by.java index 4afdb30..b2338bf 100644 --- a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP12i_was_volatile_software_curated_by.java +++ b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP12i_was_volatile_software_curated_by.java @@ -1,6 +1,5 @@ package org.gcube.informationsystem.model.relation.isrelatedto.parthenos.inverse; -import org.gcube.informationsystem.model.relation.PP11i_was_volatile_digital_object_curated_by; diff --git a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP13i_was_volatile_dataset_curated_by.java b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP13i_was_volatile_dataset_curated_by.java index 6d9af7f..65d0d60 100644 --- a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP13i_was_volatile_dataset_curated_by.java +++ b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/inverse/PP13i_was_volatile_dataset_curated_by.java @@ -1,6 +1,5 @@ package org.gcube.informationsystem.model.relation.isrelatedto.parthenos.inverse; -import org.gcube.informationsystem.model.relation.PP11i_was_volatile_digital_object_curated_by; diff --git a/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/run.sh b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/run.sh new file mode 100755 index 0000000..7f93fdc --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/model/relation/isrelatedto/parthenos/run.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# +# The "directory/directory.yml" is the old way that we used to simplify jobs execution. +# The "directory/site.yml" is the syntax used by roles (from ansible version 1.2) +# +# Otherwise we can directly execute a single play (file) +# + +PAR=50 +TIMEOUT=15 +PLAY=site.yml +HOSTS_DIR=. +ANSIBLE_HOSTS= + +export TMPDIR=/var/tmp/${USER} +if [ ! -d ${TMPDIR} ] ; then + mkdir -p ${TMPDIR} +fi + +# No cows! +export ANSIBLE_NOCOWS=1 + +export ANSIBLE_ERROR_ON_UNDEFINED_VARS=True +export ANSIBLE_HOST_KEY_CHECKING=False +export ANSIBLE_LIBRARY="/usr/share/ansible:./modules:../modules:$ANSIBLE_LIBRARY" + +# +# Talk with Foreman +export FOREMAN_URL=https://cm.research-infrastructures.eu +export FOREMAN_SSL_VERIFY=False + +PLAY_OPTS="-T $TIMEOUT -f $PAR" + +if [ -f "$1" ] ; then + PLAY=$1 +elif [ ! -f $PLAY ] ; then + echo "No play file available." + exit 1 +fi + +if [ -f "${PLAY}" ] ; then + MAIN="${PLAY}" + shift +elif [ -f "${PLAY}.yml" ]; then + MAIN="${PLAY}.yml" + shift +fi + +if [ -f ${HOSTS_DIR}/hosts ] ; then + ANSIBLE_HOSTS=${HOSTS_DIR}/hosts +fi +if [ -f ${HOSTS_DIR}/inventory/hosts ] ; then + ANSIBLE_HOSTS=${HOSTS_DIR}/inventory/hosts +fi +if [ ! -z "$ANSIBLE_HOSTS" ] ; then + PLAY_OPTS="-i $ANSIBLE_HOSTS" +fi + +#echo "Find vault encrypted files if any" +if [ -d ./group_vars ] ; then + VAULT_GROUP_FILES=$( find ./group_vars -name \*vault\* ) +fi +if [ -d ./host_vars ] ; then + VAULT_HOST_FILES=$( find ./host_vars -name \*vault\* ) +fi + + +if [ ! -z "$VAULT_GROUP_FILES" -o ! -z "$VAULT_HOST_FILES" ] ; then + # Vault needs a password. You can run playbooks that don't have encrypted files just passing a blank one. + # To encrypt a password for a user: python -c "from passlib.hash import sha512_crypt; print sha512_crypt.encrypt('')" + echo "There are password protected encrypted files, we will ask for password before proceeding" + PLAY_OPTS="$PLAY_OPTS --ask-vault-pass" +fi + +# Main +ansible-playbook $PLAY_OPTS $MAIN $@ + +rm -f /tmp/passwordfile diff --git a/src/main/resources/references/4.1 CRMpe_v1.8.rdfs b/src/main/resources/references/CRMpe_v1.8.1.rdfs similarity index 96% rename from src/main/resources/references/4.1 CRMpe_v1.8.rdfs rename to src/main/resources/references/CRMpe_v1.8.1.rdfs index 6b676a7..f47b209 100644 --- a/src/main/resources/references/4.1 CRMpe_v1.8.rdfs +++ b/src/main/resources/references/CRMpe_v1.8.1.rdfs @@ -1,533 +1,540 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file