updated queries (SVN branch) as the porting to git ported the old ones
parent
f75abfeadd
commit
628ba14f41
@ -1,4 +1,7 @@
|
||||
declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry';
|
||||
for $resource in collection('/db/Profiles/<RES_TYPE ISdefault ='' />')//Document/Data/ic:Profile/Resource
|
||||
where $resource/ID/string() eq '<RES_ID/>'
|
||||
return $resource
|
||||
let $_res_type := '<RES_TYPE ISdefault ='' />'
|
||||
let $_res_id := '<RES_ID/>'
|
||||
let $res_type := if (empty($_res_type)) then $_res_id else concat($_res_type, '/', $_res_id )
|
||||
let $res_docname := concat('/db/Profiles/',$res_type)
|
||||
let $res := doc($res_docname)//Document/Data/ic:Profile/Resource
|
||||
return $res
|
@ -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,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/>
|
Loading…
Reference in New Issue