forked from gCubeSystem/rmp-common-library
Compare commits
19 Commits
15
.classpath
15
.classpath
|
@ -6,22 +6,23 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
|
||||
<wb-module deploy-name="rmp-common-library">
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/src/main/java"/>
|
||||
|
||||
</wb-module>
|
||||
|
||||
</project-modules>
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
# Changelog for workspace
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v2.9.0] - 2023-04-22
|
||||
|
||||
- Feature #25384: rmp-common-library ContextManager should read VO IDs as well
|
||||
|
||||
## [v2.8.6] - 2022-06-17
|
||||
|
||||
- Fixed pom for HL portal removal
|
||||
|
||||
## [v2.8.5] - 2022-03-17
|
||||
|
||||
- Fix for #21652 Some keys contain the context and some other (the VRE contextes) contains in the context name.
|
||||
|
||||
## [v2.8.4] - 2020-12-14
|
||||
|
||||
- Fix Bug #20337 infrastructure-monitor: the searchById doesn't work anymore
|
||||
|
||||
## [v2.8.3] - 2020-09-25
|
||||
|
||||
- Ported to git and revised xqueries to support new Exists DB version
|
||||
|
||||
|
||||
## [v1.0.0] - 2010-10-15
|
||||
|
||||
- First release, for other logs see distro/changelog.xml
|
|
@ -0,0 +1,26 @@
|
|||
# Acknowledgments
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes including:
|
||||
|
||||
- the Sixth Framework Programme for Research and Technological Development
|
||||
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
|
||||
- the Seventh Framework Programme for research, technological development and demonstration
|
||||
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
|
||||
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
|
||||
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
|
||||
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
|
||||
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
|
||||
- the H2020 research and innovation programme
|
||||
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
|
||||
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
|
||||
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
|
||||
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
|
||||
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
|
||||
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
|
||||
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
|
||||
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
|
||||
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
|
||||
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
|
||||
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
|
||||
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
|
||||
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
|
14
README.md
14
README.md
|
@ -1,4 +1,4 @@
|
|||
# gCube System - gCube Resource Management Portlet Common LIbrary
|
||||
# gCube System - gCube Resource Management Common LIbrary
|
||||
|
||||
## Structure of the project
|
||||
|
||||
|
@ -32,16 +32,8 @@ This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LIC
|
|||
|
||||
## About the gCube Framework
|
||||
This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
|
||||
open-source software toolkit used for building and operating Hybrid Data
|
||||
open-source software toolkit used for building and operating Data
|
||||
Infrastructures enabling the dynamic deployment of Virtual Research Environments
|
||||
by favouring the realisation of reuse oriented policies.
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes including:
|
||||
|
||||
- the Sixth Framework Programme for Research and Technological Development
|
||||
- DILIGENT (grant no. 004260);
|
||||
- the Seventh Framework Programme for research, technological development and demonstration
|
||||
- D4Science (grant no. 212488), D4Science-II (grant no.239019), ENVRI (grant no. 283465), EUBrazilOpenBio (grant no. 288754), iMarine(grant no. 283644);
|
||||
- the H2020 research and innovation programme
|
||||
- BlueBRIDGE (grant no. 675680), EGIEngage (grant no. 654142), ENVRIplus (grant no. 654182), Parthenos (grant no. 654119), SoBigData (grant no. 654024),DESIRA (grant no. 818194), ARIADNEplus (grant no. 823914), RISIS2 (grant no. 824091), PerformFish (grant no. 727610), AGINFRAplus (grant no. 731001);
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
|
69
pom.xml
69
pom.xml
|
@ -11,16 +11,16 @@
|
|||
|
||||
<groupId>org.gcube.portlets.admin</groupId>
|
||||
<artifactId>rmp-common-library</artifactId>
|
||||
<version>2.8.2-SNAPSHOT</version>
|
||||
<version>2.9.0</version>
|
||||
<name>Resource Management Library</name>
|
||||
<description>
|
||||
gCube Resource Management Library is a common library containing shared code for Information System Operations
|
||||
used by all the Portlets and Widgets partaking into the Monitoring and Management of the Infrasturcture.
|
||||
</description>
|
||||
<scm>
|
||||
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/rmp-common-library.git</connection>
|
||||
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/rmp-common-library.git</developerConnection>
|
||||
<url>https://code-repo.d4science.org/gCubeSystem/rmp-common-library</url>
|
||||
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
|
||||
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
|
||||
<url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url>
|
||||
</scm>
|
||||
<properties>
|
||||
<!-- Convenience property to set the GWT version -->
|
||||
|
@ -28,7 +28,7 @@
|
|||
<distroDirectory>distro</distroDirectory>
|
||||
<!-- GWT needs at least java 1.6 -->
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>LATEST</version>
|
||||
<version>3.7.0</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -104,7 +104,7 @@
|
|||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>1.4.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
@ -126,15 +126,14 @@
|
|||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -143,61 +142,27 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.12</version>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<additionalparam>-Xdoclint:none</additionalparam>
|
||||
<additionalJOption>-Xdoclint:none</additionalJOption>
|
||||
</configuration>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-profile</id>
|
||||
<id>generate-doc</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${distroDirectory}</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>profile.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
|
||||
</descriptors>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>fully.qualified.MainClass</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>servicearchive</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
@ -4,25 +4,26 @@
|
|||
# RES_TYPE the main type of the resource
|
||||
# This query is used by forms
|
||||
|
||||
for $profiles in collection('/db/Profiles/<RES_TYPE ISdefault ='GHN' />')//Resource
|
||||
let $ghn-name := $profiles//Resource/Profile/GHN/@UniqueID/string()
|
||||
let $gcf-version := $profiles//Resource/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'gCF-version']/Value/text()
|
||||
let $ghn-version := $profiles//Resource/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'GHN-distribution-version']/Value/text()
|
||||
let $scopes := string-join( $profiles//Resource/Scopes//Scope/text(), ';')
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
for $profiles in collection('/db/Profiles/<RES_TYPE ISdefault ='GHN' />')//Document/Data/ic:Profile/Resource
|
||||
let $ghn-name := $profiles/Profile/GHN/@UniqueID/string()
|
||||
let $gcf-version := $profiles/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'gCF-version']/Value/text()
|
||||
let $ghn-version := $profiles/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'GHN-distribution-version']/Value/text()
|
||||
let $scopes := string-join( $profiles/Scopes//Scope/text(), ';')
|
||||
let $subtype :=
|
||||
if ($profiles//Resource/Type eq "Service")
|
||||
then $profiles//Resource/Profile/Class/text()
|
||||
else if ($profiles//Resource/Type eq "RunningInstance")
|
||||
then $profiles//Resource/Profile/ServiceClass/text()
|
||||
else if ($profiles//Resource/Type eq "GenericResource")
|
||||
then $profiles//Resource/Profile/SecondaryType/text()
|
||||
else if ($profiles//Resource/Type eq "GHN")
|
||||
then $profiles//Resource/Profile/Site/Domain/text()
|
||||
else if ($profiles//Resource/Type eq "MetadataCollection")
|
||||
then $profiles//Resource/Profile/MetadataFormat/Name/text()
|
||||
else if ($profiles//Resource/Type eq "Collection" and ($profiles//Resource/Profile/IsUserCollection/string(@value) eq 'true'))
|
||||
if ($profiles/Type eq "Service")
|
||||
then $profiles/Profile/Class/text()
|
||||
else if ($profiles/Type eq "RunningInstance")
|
||||
then $profiles/Profile/ServiceClass/text()
|
||||
else if ($profiles/Type eq "GenericResource")
|
||||
then $profiles/Profile/SecondaryType/text()
|
||||
else if ($profiles/Type eq "GHN")
|
||||
then $profiles/Profile/Site/Domain/text()
|
||||
else if ($profiles/Type eq "MetadataCollection")
|
||||
then $profiles/Profile/MetadataFormat/Name/text()
|
||||
else if ($profiles/Type eq "Collection" and ($profiles/Profile/IsUserCollection/string(@value) eq 'true'))
|
||||
then "User"
|
||||
else if ($profiles//Resource/Type eq "Collection" and ($profiles//Resource/Profile/IsUserCollection/string(@value) eq 'false'))
|
||||
else if ($profiles/Type eq "Collection" and ($profiles/Profile/IsUserCollection/string(@value) eq 'false'))
|
||||
then "System"
|
||||
else ""
|
||||
return
|
||||
|
|
|
@ -4,25 +4,26 @@
|
|||
# RES_TYPE the main type of the resource
|
||||
# This query is used by forms
|
||||
|
||||
for $profiles in collection('/db/Profiles/<RES_TYPE ISdefault ='GHN' />')//Resource
|
||||
let $ghn-name := $profiles//Resource/Profile/GHN/@UniqueID/string()
|
||||
let $gcf-version := $profiles//Resource/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'gCF-version']/Value/text()
|
||||
let $ghn-version := $profiles//Resource/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'GHN-distribution-version']/Value/text()
|
||||
let $scopes := string-join( $profiles//Resource/Scopes//Scope/text(), ';')
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
for $profiles in collection('/db/Profiles/<RES_TYPE ISdefault ='GHN' />'))//Document/Data/ic:Profile/Resource
|
||||
let $ghn-name := $profiles/Profile/GHN/@UniqueID/string()
|
||||
let $gcf-version := $profiles/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'gCF-version']/Value/text()
|
||||
let $ghn-version := $profiles/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'GHN-distribution-version']/Value/text()
|
||||
let $scopes := string-join( $profiles/Scopes//Scope/text(), ';')
|
||||
let $subtype :=
|
||||
if ($profiles//Resource/Type eq "Service")
|
||||
then $profiles//Resource/Profile/Class/text()
|
||||
else if ($profiles//Resource/Type eq "RunningInstance")
|
||||
then $profiles//Resource/Profile/ServiceClass/text()
|
||||
else if ($profiles//Resource/Type eq "GenericResource")
|
||||
then $profiles//Resource/Profile/SecondaryType/text()
|
||||
else if ($profiles//Resource/Type eq "GHN")
|
||||
then $profiles//Resource/Profile/Site/Domain/text()
|
||||
else if ($profiles//Resource/Type eq "MetadataCollection")
|
||||
then $profiles//Resource/Profile/MetadataFormat/Name/text()
|
||||
else if ($profiles//Resource/Type eq "Collection" and ($profiles//Resource/Profile/IsUserCollection/string(@value) eq 'true'))
|
||||
if ($profiles/Type eq "Service")
|
||||
then $profiles/Profile/Class/text()
|
||||
else if ($profiles/Type eq "RunningInstance")
|
||||
then $profiles/Profile/ServiceClass/text()
|
||||
else if ($profiles/Type eq "GenericResource")
|
||||
then $profiles/Profile/SecondaryType/text()
|
||||
else if ($profiles/Type eq "GHN")
|
||||
then $profiles/Profile/Site/Domain/text()
|
||||
else if ($profiles/Type eq "MetadataCollection")
|
||||
then $profiles/Profile/MetadataFormat/Name/text()
|
||||
else if ($profiles/Type eq "Collection" and ($profiles/Profile/IsUserCollection/string(@value) eq 'true'))
|
||||
then "User"
|
||||
else if ($profiles//Resource/Type eq "Collection" and ($profiles//Resource/Profile/IsUserCollection/string(@value) eq 'false'))
|
||||
else if ($profiles/Type eq "Collection" and ($profiles/Profile/IsUserCollection/string(@value) eq 'false'))
|
||||
then "System"
|
||||
else ""
|
||||
where $subtype eq '<RES_SUBTYPE ISdefault='isti.cnr.it'/>'
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
let $type := '<RES_TYPE ISdefault ='MetadataCollection'/>'
|
||||
let $subtypes :=
|
||||
for $_profiles in collection('/db/Profiles/<RES_TYPE ISdefault ='MetadataCollection'/>')//Resource
|
||||
for $_profiles in collection('/db/Profiles/<RES_TYPE ISdefault ='MetadataCollection'/>')//Document/Data/ic:Profile/Resource
|
||||
let $elem := if ($type eq "Service")
|
||||
then $_profiles//Resource/Profile/Class
|
||||
then $_profiles/Profile/Class
|
||||
else if ($type eq "RunningInstance")
|
||||
then $_profiles//Resource/Profile/ServiceClass
|
||||
then $_profiles/Profile/ServiceClass
|
||||
else if ($type eq "GenericResource")
|
||||
then $_profiles//Resource/Profile/SecondaryType
|
||||
then $_profiles/Profile/SecondaryType
|
||||
else if ($type eq "GHN")
|
||||
then $_profiles//Resource/Profile/Site/Domain
|
||||
then $_profiles/Profile/Site/Domain
|
||||
else if ($type eq "MetadataCollection")
|
||||
then $_profiles//Resource/Profile/MetadataFormat/Name
|
||||
then $_profiles/Profile/MetadataFormat/Name
|
||||
else if ($type eq "RuntimeResource")
|
||||
then $_profiles//Resource/Profile/Category
|
||||
else if ($type eq "Collection" and ($_profiles//Resource/Profile/IsUserCollection/string(@value) eq 'true'))
|
||||
then $_profiles/Profile/Category
|
||||
else if ($type eq "Collection" and ($_profiles/Profile/IsUserCollection/string(@value) eq 'true'))
|
||||
then "User"
|
||||
else if ($type eq "Collection" and ($_profiles//Resource/Profile/IsUserCollection/string(@value) eq 'false'))
|
||||
else if ($type eq "Collection" and ($_profiles/Profile/IsUserCollection/string(@value) eq 'false'))
|
||||
then "System"
|
||||
else ""
|
||||
return $elem
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
<Status>ready</Status>
|
||||
</Resource>
|
||||
-->
|
||||
for $ris in collection('/db/Profiles/RunningInstance')//Resource
|
||||
where $ris//Resource/Profile/GHN/@UniqueID/string() eq '<RES_ID/>'
|
||||
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
for $ris in collection('/db/Profiles/RunningInstance')//Document/Data/ic:Profile/Resource
|
||||
where $ris/Profile/GHN/@UniqueID/string() eq '<RES_ID/>'
|
||||
return
|
||||
<RESOURCE/>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{$ris/ID}
|
||||
{$ris/Profile/ServiceName}
|
||||
{$ris/Profile/ServiceClass}
|
||||
<ServiceVersion>{$ris//Resource/@version/string()}</ServiceVersion>
|
||||
<ServiceVersion>{$ris/@version/string()}</ServiceVersion>
|
||||
<MainVersion>{$ris/Profile/Version/text()}</MainVersion>
|
||||
<Status>{$ris/Profile/DeploymentData/Status/text()}</Status>
|
||||
</Resource>
|
|
@ -1,7 +1,7 @@
|
|||
<Resources>
|
||||
<Resource>
|
||||
<Key>ID</Key>
|
||||
<Value>{$ri//Resource/ID/string()}</Value>
|
||||
<Value>{$ri/ID/string()}</Value>
|
||||
</Resource>
|
||||
<Resource>
|
||||
<Key>ServiceStatus</Key>
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
<!--
|
||||
Notice: the <Resources> node must be removed in using the resource grid factory.
|
||||
-->
|
||||
let $profiles := collection('/db/Profiles/<RES_TYPE ISdefault ='RunningInstance'/>')//Resource[ID/string() eq '<RES_ID/>']
|
||||
let $relatedghn := collection('/db/Profiles/GHN')//Resource[ID/string() eq $profiles/Profile/GHN/@UniqueID/string()]
|
||||
let $ghn-name := if (empty($relatedghn/Profile/GHNDescription/Name/string()))
|
||||
then $profiles/Profile/GHN/@UniqueID/string()
|
||||
else $relatedghn/Profile/GHNDescription/Name/string()
|
||||
for $ri in $profiles
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
|
||||
let $_ri_type := '<RES_TYPE ISdefault ='RunningInstance'/>'
|
||||
let $_ri_id := '<RES_ID/>'
|
||||
|
||||
let $ri_docname := concat('/db/Profiles/RunningInstance/',$_ri_id)
|
||||
let $ri := doc($ri_docname)//Document/Data/ic:Profile/Resource
|
||||
let $ghn-id := $ri/Profile/GHN/@UniqueID/string()
|
||||
|
||||
let $ghn_docname := concat('/db/Profiles/GHN/',$ri/Profile/GHN/@UniqueID/string())
|
||||
let $relatedghn := doc($ghn_docname)//Document/Data/ic:Profile/Resource
|
||||
let $_ghn-name := $relatedghn/Profile/GHNDescription/Name/string()
|
||||
let $ghn-name := if (empty($_ghn-name)) then $ghn-id else $_ghn-name
|
||||
return
|
||||
<RESOURCE/>
|
|
@ -2,15 +2,17 @@
|
|||
PARAMETS:
|
||||
RES_ID the ID of the Service
|
||||
-->
|
||||
let $service := collection('/db/Profiles/Service')//Resource//Resource[ID/text() eq '<RES_ID/>']
|
||||
-->
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
let $service := collection('/db/Profiles/Service')//Document/Data/ic:Profile/Resource[ID/text() eq '<RES_ID/>']
|
||||
let $ServiceClass := $service/Profile/Class
|
||||
let $ServiceName := $service/Profile/Name
|
||||
let $ServiceVersion := $service/Profile/Version
|
||||
let $riloop := collection('/db/Profiles/RunningInstance')//Resource[Profile/ServiceClass/string() eq $ServiceClass and Profile/ServiceName/string() eq $ServiceName]
|
||||
let $riloop := collection('/db/Profiles/RunningInstance')//Document/Data/ic:Profile/Resource[Profile/ServiceClass/string() eq $ServiceClass and Profile/ServiceName/string() eq $ServiceName]
|
||||
let $relatedris :=
|
||||
for $ri in $riloop
|
||||
let $ghn-id := $ri/Profile/GHN/@UniqueID/string()
|
||||
let $ghn := collection('/db/Profiles/GHN')//Resource[ID/string() eq $ghn-id]
|
||||
let $ghn := doc(concat('/db/Profiles/GHN',$ghn-id))//Document/Data/ic:Profile/Resource
|
||||
<!-- and $ri//Profile/Version/string() eq $ServiceVersion -->
|
||||
return
|
||||
<RESOURCE/>
|
|
@ -1,7 +1,8 @@
|
|||
for $profiles in collection('/db/Profiles/GenericResource')//Resource, $wsresource in collection('/db/Properties')//Document
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
for $profiles in collection('/db/Profiles/GenericResource')//Document/Data/ic:Profile/Resource, $wsresource in collection('/db/Properties')//Document
|
||||
let $scopes := string-join( $profiles/Scopes//Scope/text(), ';')
|
||||
let $subtype := $profiles//Resource/Profile/SecondaryType/text()
|
||||
where $subtype = "DataSource" and $profiles//Resource/ID eq $wsresource/SourceKey and $wsresource/Data//child::*[local-name()='ServiceName']/string() eq 'tree-manager-service'
|
||||
where $subtype = "DataSource" and $profiles/ID eq $wsresource/SourceKey and $wsresource/Data//child::*[local-name()='ServiceName']/string() eq 'tree-manager-service'
|
||||
<RES_SUBTYPE ISdefault =''/>
|
||||
return
|
||||
<RESOURCE/>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
for $profiles in collection('/db/Profiles/GHN')//Resource
|
||||
let $gcf-version := $profiles//Resource/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'gCF-version']/Value/text() | $profiles//Resource/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'SmartGears']/Value/text()
|
||||
let $ghn-version := $profiles//Resource/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'GHN-distribution-version']/Value/text() | $profiles//Resource/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'SmartGearsDistribution']/Value/text()
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
for $profiles in collection('/db/Profiles/GHN')//Document/Data/ic:Profile/Resource
|
||||
let $gcf-version := $profiles/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'gCF-version']/Value/text() | $profiles/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'SmartGears']/Value/text()
|
||||
let $ghn-version := $profiles/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'GHN-distribution-version']/Value/text() | $profiles/Profile/GHNDescription/RunTimeEnv/Variable[Key/text() = 'SmartGearsDistribution']/Value/text()
|
||||
let $scopes := string-join( $profiles/Scopes//Scope/text(), ';')
|
||||
let $subtype := $profiles//Resource/Profile/Site/Domain/text()
|
||||
let $subtype := $profiles/Profile/Site/Domain/text()
|
||||
<RES_SUBTYPE ISdefault =''/>
|
||||
return
|
||||
<RESOURCE/>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<Resource>
|
||||
{$profiles//Resource/ID}
|
||||
<Type>{$profiles//Resource/Type/text()}</Type>
|
||||
{$profiles/ID}
|
||||
<Type>{$profiles/Type/text()}</Type>
|
||||
<SubType>{$subtype}</SubType>
|
||||
<Status>{$profiles//Resource/Profile/GHNDescription/Status/text()}</Status>
|
||||
<Name>{$profiles//Resource/Profile/GHNDescription/Name/text()}</Name>
|
||||
<Uptime>{$profiles//Resource/Profile/GHNDescription/Uptime/text()}</Uptime>
|
||||
<LastUpdate>{$profiles//Resource/Profile/GHNDescription/LastUpdate/text()}</LastUpdate>
|
||||
<LocalAvailableSpace>{$profiles//Resource/Profile/GHNDescription/LocalAvailableSpace/text()}</LocalAvailableSpace>
|
||||
<VirtualSize>{$profiles//Resource/Profile/GHNDescription/MainMemory/string(@VirtualSize)}</VirtualSize>
|
||||
<VirtualAvailable>{$profiles//Resource/Profile/GHNDescription/MainMemory/string(@VirtualAvailable)}</VirtualAvailable>
|
||||
<LoadLast1Min>{$profiles//Resource/Profile/GHNDescription/Load/string(@Last1Min)}</LoadLast1Min>
|
||||
<LoadLast5Min>{$profiles//Resource/Profile/GHNDescription/Load/string(@Last5Min)}</LoadLast5Min>
|
||||
<LoadLast15Min>{$profiles//Resource/Profile/GHNDescription/Load/string(@Last15Min)}</LoadLast15Min>
|
||||
<Status>{$profiles/Profile/GHNDescription/Status/text()}</Status>
|
||||
<Name>{$profiles/Profile/GHNDescription/Name/text()}</Name>
|
||||
<Uptime>{$profiles/Profile/GHNDescription/Uptime/text()}</Uptime>
|
||||
<LastUpdate>{$profiles/Profile/GHNDescription/LastUpdate/text()}</LastUpdate>
|
||||
<LocalAvailableSpace>{$profiles/Profile/GHNDescription/LocalAvailableSpace/text()}</LocalAvailableSpace>
|
||||
<VirtualSize>{$profiles/Profile/GHNDescription/MainMemory/string(@VirtualSize)}</VirtualSize>
|
||||
<VirtualAvailable>{$profiles/Profile/GHNDescription/MainMemory/string(@VirtualAvailable)}</VirtualAvailable>
|
||||
<LoadLast1Min>{$profiles/Profile/GHNDescription/Load/string(@Last1Min)}</LoadLast1Min>
|
||||
<LoadLast5Min>{$profiles/Profile/GHNDescription/Load/string(@Last5Min)}</LoadLast5Min>
|
||||
<LoadLast15Min>{$profiles/Profile/GHNDescription/Load/string(@Last15Min)}</LoadLast15Min>
|
||||
<gcf-version>{$gcf-version}</gcf-version>
|
||||
<ghn-version>{$ghn-version}</ghn-version>
|
||||
<Scopes>{$scopes}</Scopes>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<Resource>
|
||||
{$profiles//Resource/ID}
|
||||
{$profiles/ID}
|
||||
<Type>{$profiles//Resource/Type/text()}</Type>
|
||||
<SubType>{$subtype}</SubType>
|
||||
<Scopes>{$scopes}</Scopes>
|
||||
<Name>{$profiles//Resource/Profile/Name/text()}</Name>
|
||||
<Description>{$profiles//Resource/Profile/Description/text()}</Description>
|
||||
<Name>{$profiles/Profile/Name/text()}</Name>
|
||||
<Description>{$profiles/Profile/Description/text()}</Description>
|
||||
</Resource>
|
|
@ -1,8 +1,8 @@
|
|||
<Resource>
|
||||
{$profiles//Resource/ID}
|
||||
<Type>{$profiles//Resource/Type/text()}</Type>
|
||||
{$profiles/ID}
|
||||
<Type>{$profiles/Type/text()}</Type>
|
||||
<SubType>{$subtype}</SubType>
|
||||
<Scopes>{$scopes}</Scopes>
|
||||
<Name>{$profiles//Resource/Profile/Name/text()}</Name>
|
||||
<Host>{$profiles//Resource/Profile/RunTime/HostedOn/text()}</Host>
|
||||
<Name>{$profiles/Profile/Name/text()}</Name>
|
||||
<Host>{$profiles/Profile/RunTime/HostedOn/text()}</Host>
|
||||
</Resource>
|
|
@ -1,10 +1,10 @@
|
|||
<Resource>
|
||||
{$profiles//Resource/ID}
|
||||
<Type>{$profiles//Resource/Type/text()}</Type>
|
||||
{$profiles/ID}
|
||||
<Type>{$profiles/Type/text()}</Type>
|
||||
<SubType>{$subtype}</SubType>
|
||||
<Scopes>{$scopes}</Scopes>
|
||||
<ServiceClass>{$profiles//Resource/Profile/Class/text()}</ServiceClass>
|
||||
<ServiceName>{$profiles//Resource/Profile/Name/text()}</ServiceName>
|
||||
<Version>{$profiles//Resource/Profile/Packages/Software[1]/Version/text()}</Version>
|
||||
<Shareable>{$profiles//Resource/Profile/Packages/Software/Shareable/string(@level)}</Shareable>
|
||||
<ServiceClass>{$profiles/Profile/Class/text()}</ServiceClass>
|
||||
<ServiceName>{$profiles/Profile/Name/text()}</ServiceName>
|
||||
<Version>{$profiles/Profile/Packages/Software[1]/Version/text()}</Version>
|
||||
<Shareable>{$profiles/Profile/Packages/Software/Shareable/string(@level)}</Shareable>
|
||||
</Resource>
|
|
@ -1,8 +1,7 @@
|
|||
for $profiles in collection('/db/Profiles/RunningInstance')//Resource
|
||||
let $ghns := collection('/db/Profiles/GHN')//Resource
|
||||
let $_ghn-name := for $ghn in $ghns
|
||||
where $ghn/ID/string() eq $profiles/Profile/GHN/@UniqueID/string()
|
||||
return $ghn/Profile/GHNDescription/Name/string()
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
for $profiles in collection('/db/Profiles/RunningInstance')//Document/Data/ic:Profile/Resource
|
||||
let $docname := concat('/db/Profiles/GHN/',$profiles/Profile/GHN/@UniqueID/string())
|
||||
let $_ghn-name := doc($docname)//Document/Data/ic:Profile/Resource/Profile/GHNDescription/Name/string()
|
||||
let $ghn-name := if (empty($_ghn-name)) then $profiles/Profile/GHN/@UniqueID/string() else $_ghn-name
|
||||
let $scopes := string-join( $profiles/Scopes//Scope/text(), ';')
|
||||
let $subtype := $profiles/Profile/ServiceClass/text()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
for $profiles in collection('/db/Profiles/RuntimeResource')//Resource
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
for $profiles in collection('/db/Profiles/RuntimeResource')//Document/Data/ic:Profile/Resource
|
||||
let $scopes := string-join( $profiles/Scopes//Scope/text(), ';')
|
||||
let $subtype := $profiles//Resource/Profile/Category/text()
|
||||
let $subtype := $profiles/Profile/Category/text()
|
||||
<RES_SUBTYPE ISdefault =''/>
|
||||
return
|
||||
<RESOURCE/>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
for $profiles in collection('/db/Profiles/Service')//Resource
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
for $profiles in collection('/db/Profiles/Service')//Document/Data/ic:Profile/Resource
|
||||
let $scopes := string-join( $profiles/Scopes//Scope/text(), ';')
|
||||
let $subtype := $profiles//Resource/Profile/Class/text()
|
||||
let $subtype := $profiles/Profile/Class/text()
|
||||
<RES_SUBTYPE ISdefault =''/>
|
||||
return
|
||||
<RESOURCE/>
|
|
@ -58,7 +58,7 @@ import org.xml.sax.SAXException;
|
|||
public class ContextManager {
|
||||
private static final Map<String, ScopeBean> CONTEXTS = new LinkedHashMap<String, ScopeBean>();
|
||||
private static String confFile = null;
|
||||
private static final String LOG_PREFIX = "[SCOPE-MGR]";
|
||||
private static final String LOG_PREFIX = "[CONTEXT-MGR]";
|
||||
private static final String GEN_RESOURCE_TYPE = "INFRASTRUCTURE";
|
||||
private static final String GEN_RESOURCE_NAME = "VirtualOrganisation";
|
||||
|
||||
|
@ -104,7 +104,7 @@ public class ContextManager {
|
|||
public static LinkedHashMap<String, ScopeBean> readContexts() throws Exception {
|
||||
LinkedHashMap<String, ScopeBean> toReturn = new LinkedHashMap<String, ScopeBean>();
|
||||
String scopeXML = readInfraVoFromIS();
|
||||
System.out.println("**** readContexts()");
|
||||
ServerConsole.info(LOG_PREFIX, "**** readContexts()");
|
||||
Document scopeDocument = getDocumentGivenXML(scopeXML);
|
||||
NodeList voElements = scopeDocument.getElementsByTagName("vo");
|
||||
ServerConsole.debug("voElements="+ voElements.getLength());
|
||||
|
@ -115,9 +115,9 @@ public class ContextManager {
|
|||
|
||||
toReturn.put(vo.toString(), vo);
|
||||
try {
|
||||
for (String vre : getVREFromVO(vo)) {
|
||||
for (String vreName : getVREFromVO(vo)) {
|
||||
// This operation overrides the vo map
|
||||
toReturn.put(vre.toString(), new ScopeBean(vo.toString()+"/"+vre));
|
||||
toReturn.put(new ScopeBean(vo.toString()+"/"+vreName).toString(), new ScopeBean(vo.toString()+"/"+vreName));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ServerConsole.error("Exception raised while loading VREs for VO : " + vo, e);
|
||||
|
@ -136,15 +136,21 @@ public class ContextManager {
|
|||
public static LinkedHashMap<String, D4SEnvironment> readContextsWithUUIDs() throws Exception {
|
||||
LinkedHashMap<String, D4SEnvironment> toReturn = new LinkedHashMap<String, D4SEnvironment>();
|
||||
String scopeXML = readInfraVoFromIS();
|
||||
System.out.println("**** readContexts()");
|
||||
ServerConsole.info(LOG_PREFIX, "**** readContexts()");
|
||||
Document scopeDocument = getDocumentGivenXML(scopeXML);
|
||||
NodeList voElements = scopeDocument.getElementsByTagName("vo");
|
||||
ServerConsole.debug("voElements="+ voElements.getLength());
|
||||
for (int i = 0; i < voElements.getLength(); i++) {
|
||||
NodeList voDetails = voElements.item(i).getChildNodes();
|
||||
String voString = voDetails.item(2).getFirstChild().getNodeValue();
|
||||
String voID = "non-existing-vo-id";
|
||||
try {
|
||||
voID = voDetails.item(3).getFirstChild().getNodeValue();
|
||||
} catch (Exception e) {
|
||||
ServerConsole.error("Exception raised while trying reading VO ID from GenericResource having name: " + GEN_RESOURCE_NAME, e);
|
||||
}
|
||||
ScopeBean vo = new ScopeBean(voString);
|
||||
D4SEnvironment voWrapper = new D4SEnvironment(vo, "uuid-not-exisiting-for-vos");
|
||||
D4SEnvironment voWrapper = new D4SEnvironment(vo, voID);
|
||||
toReturn.put(vo.toString(), voWrapper);
|
||||
try {
|
||||
for (GenericResource resVRE : getVREResourcesFromVO(vo)) {
|
||||
|
|
Loading…
Reference in New Issue