adding mat-select components and logic to manage changes in facet

default relation
This commit is contained in:
Maria Teresa Paratore 2024-03-14 17:33:29 +01:00
parent 835a116b5e
commit 21a2e40495
16 changed files with 150 additions and 681 deletions

View File

@ -37,7 +37,7 @@
"src/main/webapp/assets" "src/main/webapp/assets"
], ],
"styles": ["src/main/webapp/content/scss/vendor.scss", "src/main/webapp/content/scss/global.scss"], "styles": ["src/main/webapp/content/scss/vendor.scss", "src/main/webapp/content/scss/global.scss"],
"scripts": [ "node_modules/jsonpath-plus/src/jsonpath.js"] "scripts": []
}, },
"configurations": { "configurations": {
"production": { "production": {

18
package-lock.json generated
View File

@ -33,7 +33,6 @@
"bootstrap-icons": "^1.11.1", "bootstrap-icons": "^1.11.1",
"cytoscape": "3.25.0", "cytoscape": "3.25.0",
"dayjs": "1.11.5", "dayjs": "1.11.5",
"jsonpath-plus": "^8.1.0",
"mat-select-filter": "^2.4.1", "mat-select-filter": "^2.4.1",
"material-icons-font": "^2.1.0", "material-icons-font": "^2.1.0",
"mdb-angular-ui-kit": "^3.0.1", "mdb-angular-ui-kit": "^3.0.1",
@ -17024,18 +17023,6 @@
"node >= 0.2.0" "node >= 0.2.0"
] ]
}, },
"node_modules/jsonpath-plus": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-8.1.0.tgz",
"integrity": "sha512-qVTiuKztFGw0dGhYi3WNqvddx3/SHtyDT0xJaeyz4uP0d1tkpG+0y5uYQ4OcIo1TLAz3PE/qDOW9F0uDt3+CTw==",
"bin": {
"jsonpath": "bin/jsonpath-cli.js",
"jsonpath-plus": "bin/jsonpath-cli.js"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/jsprim": { "node_modules/jsprim": {
"version": "1.4.2", "version": "1.4.2",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
@ -38645,11 +38632,6 @@
"integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==",
"dev": true "dev": true
}, },
"jsonpath-plus": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-8.1.0.tgz",
"integrity": "sha512-qVTiuKztFGw0dGhYi3WNqvddx3/SHtyDT0xJaeyz4uP0d1tkpG+0y5uYQ4OcIo1TLAz3PE/qDOW9F0uDt3+CTw=="
},
"jsprim": { "jsprim": {
"version": "1.4.2", "version": "1.4.2",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",

View File

@ -97,7 +97,6 @@
"bootstrap-icons": "^1.11.1", "bootstrap-icons": "^1.11.1",
"cytoscape": "3.25.0", "cytoscape": "3.25.0",
"dayjs": "1.11.5", "dayjs": "1.11.5",
"jsonpath-plus": "^8.1.0",
"mat-select-filter": "^2.4.1", "mat-select-filter": "^2.4.1",
"material-icons-font": "^2.1.0", "material-icons-font": "^2.1.0",
"mdb-angular-ui-kit": "^3.0.1", "mdb-angular-ui-kit": "^3.0.1",

View File

@ -1,6 +1,7 @@
package org.gcube.informationsystem.service; package org.gcube.informationsystem.service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
@ -37,6 +38,11 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.jayway.jsonpath.JsonPath;
import com.nimbusds.jose.shaded.json.JSONUtil;
import net.minidev.json.JSONArray;
/** /**
* Service class for managing InformationSystem resources. * Service class for managing InformationSystem resources.
*/ */
@ -154,13 +160,7 @@ public class InformationSystemService {
ArrayList<FacetTypeDTO> facetTypes = new ArrayList<FacetTypeDTO>(); ArrayList<FacetTypeDTO> facetTypes = new ArrayList<FacetTypeDTO>();
//TODO: RIEMPI LE FACET //TODO: RIEMPI LE FACET
for(LinkedEntity le: fcts) { for(LinkedEntity le: fcts) {
/* FacetTypeDTO ftDto = new FacetTypeDTO(le.getRelation(),le.getTarget(),le.getDescription(),le.getMin(),le.getMax());
log.debug("le.getRelation()..."+le.getRelation());
log.debug("le.getTarget()..."+le.getTarget());
log.debug("le.getDescription()..."+le.getDescription());
log.debug("le.getMin()..."+le.getMin());
log.debug("le.getMax()..."+le.getMax());
*/
facetTypes.add(new FacetTypeDTO(le.getRelation(),le.getTarget(),le.getDescription(),le.getMin(),le.getMax())); facetTypes.add(new FacetTypeDTO(le.getRelation(),le.getTarget(),le.getDescription(),le.getMin(),le.getMax()));
} }
dto.setFacetTypes(facetTypes); dto.setFacetTypes(facetTypes);
@ -168,6 +168,29 @@ public class InformationSystemService {
return dto; return dto;
} }
public String[] getFacetRelationsOptions(String parentRelation) throws Exception {
JSONArray res = new JSONArray();
String tmp = this.getResourceTypeJson(parentRelation);
try {
res = JsonPath.parse(tmp).read("$[*].name");
}catch(Exception e) {
log.error(e.getMessage());
e.printStackTrace();
}
return this.toStringArray(res);
}
private String[] toStringArray(JSONArray jsonArray) {
ArrayList<String> list = new ArrayList<>();
for (int i = 0; i < jsonArray.size(); i++) {
String str = jsonArray.get(i).toString();
list.add(str);
}
return list.toArray(new String[0]);
}
/* /*
//questa ritorna anche le facet figlie che possono essere usate nella select per il campo relation //questa ritorna anche le facet figlie che possono essere usate nella select per il campo relation
//in caso si parta da zero si sceglie ConsistsOf //in caso si parta da zero si sceglie ConsistsOf
@ -181,14 +204,6 @@ public class InformationSystemService {
} }
//per i tipi di risorse come HostingNode, EService, ecc.
public String getResourceTypeSpecs(String typeName) throws Exception {
String currentCtx = SecretManagerProvider.instance.get().getContext();
ResourceRegistryClient resourceRegistryClient= ResourceRegistryClientFactory.create(currentCtx);
String jsonResult = resourceRegistryClient.getType(typeName, true);
return jsonResult;
}
public List<ContextDTO> getAllContexts() throws Exception { public List<ContextDTO> getAllContexts() throws Exception {
ArrayList<ContextDTO> res = new ArrayList<ContextDTO>(); ArrayList<ContextDTO> res = new ArrayList<ContextDTO>();
//log.debug("GetAllContext: [rootCtx=]",rootCtx); //log.debug("GetAllContext: [rootCtx=]",rootCtx);

View File

@ -9,6 +9,7 @@ public class FacetPropGui {
private String value; private String value;
private ArrayList<ValidationObjDTO> validations; private ArrayList<ValidationObjDTO> validations;
private String pattern; private String pattern;
public String getPattern() { public String getPattern() {
return pattern; return pattern;

View File

@ -28,6 +28,8 @@ public class FacetSpecDTO {
private String description; //descrizione della facet private String description; //descrizione della facet
private ArrayList<FacetPropertyDTO> properties; private ArrayList<FacetPropertyDTO> properties;
private ArrayList<FacetPropGui> guiProps; //per costruire le GUI private ArrayList<FacetPropGui> guiProps; //per costruire le GUI
public ArrayList<FacetPropGui> getGuiProps() { public ArrayList<FacetPropGui> getGuiProps() {
return guiProps; return guiProps;
} }
@ -41,6 +43,15 @@ public class FacetSpecDTO {
this.properties = properties; this.properties = properties;
} }
//questi campi sono presi dalla descrizione del tipo di risorsa (ad es. HostingNode) //questi campi sono presi dalla descrizione del tipo di risorsa (ad es. HostingNode)
private String[] relationOptions;
public String[] getRelationOptions() {
return relationOptions;
}
public void setRelationOptions(String[] relationOptions) {
this.relationOptions = relationOptions;
}
private String relation; private String relation;
public String getRelation() { public String getRelation() {
return relation; return relation;

View File

@ -12,6 +12,7 @@ public class FacetTypeDTO {
this.relation = relation; this.relation = relation;
this.target = target; this.target = target;
this.description = description; this.description = description;
this.relation = relation;
this.min = min; this.min = min;
if(max==null) { if(max==null) {
//prefer to avoid null in a field (MEANS MAX>1) //prefer to avoid null in a field (MEANS MAX>1)
@ -27,6 +28,14 @@ public class FacetTypeDTO {
private Integer min; private Integer min;
private Integer max; private Integer max;
private String[] relationOptions;
public String[] getRelationOptions() {
return relationOptions;
}
public void setRelationOptions(String[] relationOptions) {
this.relationOptions = relationOptions;
}
public String getRelation() { public String getRelation() {
return relation; return relation;

View File

@ -33,7 +33,10 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.util.UriUtils; import org.springframework.web.util.UriUtils;
import com.jayway.jsonpath.JsonPath;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import net.minidev.json.JSONArray;
import tech.jhipster.web.util.HeaderUtil; import tech.jhipster.web.util.HeaderUtil;
@ -149,6 +152,7 @@ public class InformationSystemResource {
fs.setMax(ft.getMax()); fs.setMax(ft.getMax());
fs.setMin(ft.getMin()); fs.setMin(ft.getMin());
fs.setRelation(ft.getRelation()); fs.setRelation(ft.getRelation());
fs.setRelationOptions(informationSystemService.getFacetRelationsOptions(ft.getRelation()));
facetSpecs.add(fs); facetSpecs.add(fs);
} }
builderDto.setFacetSpecs(facetSpecs); builderDto.setFacetSpecs(facetSpecs);

View File

@ -1,209 +0,0 @@
# ===================================================================
# Spring Boot configuration.
#
# This configuration will be overridden by the Spring profile you use,
# for example application-dev.yml if you use the "dev" profile.
#
# More information on profiles: https://www.jhipster.tech/profiles/
# More information on configuration properties: https://www.jhipster.tech/common-application-properties/
# ===================================================================
# ===================================================================
# Standard Spring Boot properties.
# Full reference is available at:
# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
# ===================================================================
---
# Conditionally disable springdoc on missing api-docs profile
spring:
config:
activate:
on-profile: '!api-docs'
springdoc:
api-docs:
enabled: false
---
management:
endpoints:
web:
base-path: /management
exposure:
include:
['configprops', 'env', 'health', 'info', 'jhimetrics', 'jhiopenapigroups', 'logfile', 'loggers', 'prometheus', 'threaddump']
endpoint:
health:
show-details: when-authorized
roles: 'ROLE_ADMIN'
probes:
enabled: true
group:
liveness:
include: livenessState
readiness:
include: readinessState
jhimetrics:
enabled: true
info:
git:
mode: full
env:
enabled: true
health:
mail:
enabled: false # When using the MailService, configure an SMTP server and set this to true
metrics:
export:
# Prometheus is the default metrics backend
prometheus:
enabled: true
step: 60
enable:
http: true
jvm: true
logback: true
process: true
system: true
distribution:
percentiles-histogram:
all: true
percentiles:
all: 0, 0.5, 0.75, 0.95, 0.99, 1.0
tags:
application: ${spring.application.name}
web:
server:
request:
autotime:
enabled: true
spring:
application:
name: information-system-gui
profiles:
# The commented value for `active` can be replaced with valid Spring profiles to load.
# Otherwise, it will be filled in by maven when building the JAR file
# Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS`
active: #spring.profiles.active#
group:
dev:
- dev
- api-docs
# Uncomment to activate TLS for the dev profile
#- tls
jmx:
enabled: false
messages:
basename: i18n/messages
main:
allow-bean-definition-overriding: true
mvc:
pathmatch:
matching-strategy: ant-path-matcher
task:
execution:
thread-name-prefix: information-system-gui-task-
pool:
core-size: 2
max-size: 50
queue-capacity: 10000
scheduling:
thread-name-prefix: information-system-gui-scheduling-
pool:
size: 2
thymeleaf:
mode: HTML
output:
ansi:
enabled: always
security:
oauth2:
#resourceserver:
# jwt:
# issuer-uri: http://localhost:8083/auth/realms/baeldung
# jwk-set-uri: http://localhost:8083/auth/realms/baeldung/protocol/openid-connect/certs
client:
provider:
oidc:
issuer-uri: https://accounts.dev.d4science.org/auth/realms/d4science
authorization-uri: https://accounts.dev.d4science.org/auth/realms/d4science/protocol/openid-connect/auth
token-uri: https://accounts.dev.d4science.org/auth/realms/d4science/protocol/openid-connect/token
user-info-uri: https://accounts.dev.d4science.org/auth/realms/d4science/protocol/openid-connect/userinfo
jwk-set-uri: https://accounts.dev.d4science.org/auth/realms/d4science/protocol/openid-connect/certs
registration:
oidc:
client-id: pc-paratore.isti.cnr.it
client-secret: LlyFPtjlHdv95PQ3wb7rYp0PVVDK2fNj
scope: openid, profile, email, phone, offline_access # last one for refresh tokens
#authorization-grant-type: urn:ietf:params:oauth:grant-type:jwt-bearer
#redirect-uri: '{baseUrl}/code/{registrationId}'
#redirect-uri: '{baseUrl}/login/oauth2/code/{registrationId}'
server:
servlet:
session:
cookie:
http-only: true
#forward-headers-strategy: native
#forward-headers-strategy: true
#tomcat:
# use-relative-redirects: true
# protocol-header: x-forwarded-proto
# remote-ip-header: x-forwarded-for
springdoc:
show-actuator: true
# Properties to be exposed on the /info management endpoint
info:
# Comma separated list of profiles that will trigger the ribbon to show
display-ribbon-on-profiles: 'dev'
# ===================================================================
# JHipster specific properties
#
# Full reference is available at: https://www.jhipster.tech/common-application-properties/
# ===================================================================
jhipster:
clientApp:
name: 'InformationSystemGUIApp'
#cors:
# allowed-origins: "http://accounts.dev.d4science.org,http://localhost:8080,http://127.0.0.1:8080"
# By default CORS is disabled. Uncomment to enable.
# cors:
# allowed-origins: "http://localhost:8100,http://localhost:9000"
# allowed-methods: "*"
# allowed-headers: "*"
# exposed-headers: "Authorization,Link,X-Total-Count,X-${jhipster.clientApp.name}-alert,X-${jhipster.clientApp.name}-error,X-${jhipster.clientApp.name}-params"
# allow-credentials: true
# max-age: 1800
mail:
from: information-system-gui@localhost
api-docs:
default-include-pattern: ${server.servlet.context-path:}/api/**
management-include-pattern: ${server.servlet.context-path:}/management/**
title: IS Monitor API
description: IS Monitor API documentation
version: 1.0.0
terms-of-service-url:
contact-name:
contact-url:
contact-email:
license: unlicensed
license-url:
security:
content-security-policy: "default-src 'self'; frame-src 'self' data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"
oauth2:
audience:
- account
- api://default
# ===================================================================
# Application specific properties
# Add your own application properties here, see the ApplicationProperties class
# to have type-safe configuration, like in the JHipsterProperties above
#
# More documentation is available at:
# https://www.jhipster.tech/common-application-properties/
# ===================================================================
# application:

View File

@ -33,12 +33,13 @@
<!--TODO: trasforma in una select--> <!--TODO: trasforma in una select-->
<mat-label for="relation">relation</mat-label> <mat-label for="relation">relation</mat-label>
<input matInput formControlName="relation" id="relation" type="text" value="{{typeSpec.facetSpecs[ind].relation}}"/> <input matInput formControlName="relation" id="relation" type="text" value="{{typeSpec.facetSpecs[ind].relation}}"/>
<!--
<mat-select placeholder="relation" formControlName="relation"> <mat-select formControlName="relation">
<mat-option *ngFor="let item of relationOptions(typeSpec.facetSpecs[ind].relation)" [value]="item"> <mat-option *ngFor="let item of typeSpec.facetSpecs[ind].relationOptions" [value]="item">
{{item}}
</mat-option> </mat-option>
</mat-select> </mat-select>
-->
</mat-form-field> </mat-form-field>
<!-- <!--
<mat-form-field id="pathfield" [style.width.px]="200" class="form-field"> <mat-form-field id="pathfield" [style.width.px]="200" class="form-field">

View File

@ -13,7 +13,8 @@ import { MatButtonModule } from '@angular/material/button';
import { MatInputModule } from '@angular/material/input'; import { MatInputModule } from '@angular/material/input';
import { MatExpansionModule } from '@angular/material/expansion'; import { MatExpansionModule } from '@angular/material/expansion';
import { IFacetComposer, IFacetProps } from './i-facet-composer'; import { IFacetComposer, IFacetProps } from './i-facet-composer';
import {JSONPath} from 'jsonpath-plus' import { SharedModule } from 'app/shared/shared.module';
import { MatSelectFilterModule } from 'mat-select-filter';
@ -22,9 +23,9 @@ import {JSONPath} from 'jsonpath-plus'
selector: 'jhi-facet-composer', selector: 'jhi-facet-composer',
templateUrl: './facet-composer.component.html', templateUrl: './facet-composer.component.html',
styleUrls: ['./facet-composer.component.scss'], styleUrls: ['./facet-composer.component.scss'],
imports:[CommonModule,MatFormFieldModule, imports:[CommonModule,MatFormFieldModule,SharedModule,
ReactiveFormsModule,MatButtonModule, ReactiveFormsModule,MatButtonModule,
MatDialogModule,MatInputModule,MatExpansionModule], MatDialogModule,MatInputModule,MatExpansionModule,MatSelectFilterModule],
providers: [FacetComposerService] providers: [FacetComposerService]
}) })
@ -36,6 +37,7 @@ export class FacetComposerComponent implements OnInit {
myForm: FormGroup; //form complessiva myForm: FormGroup; //form complessiva
typeSpec: ITypeSpecification; typeSpec: ITypeSpecification;
// relationOptions: string[]|undefined;
// eslint-disable-next-line @typescript-eslint/member-ordering // eslint-disable-next-line @typescript-eslint/member-ordering
constructor(private guiService: FacetComposerService, private fb: FormBuilder, constructor(private guiService: FacetComposerService, private fb: FormBuilder,
@ -66,24 +68,18 @@ export class FacetComposerComponent implements OnInit {
this.typeSpec = res; this.typeSpec = res;
this.createForm(res); this.createForm(res);
}); });
this.relationOptions('ConsistsOf');
} }
relationOptions(relationName:string): void{
let options : string[];
this.guiService.getRelationOptions(this.titlePath, relationName).subscribe(res => {
/* /*
this.City = values.json() as string[]; relationOptions(relationName:string): string[]{
this.var1 = this.City[0]; let options: string[]=[];
this.var2 = this.City[1]; this.guiService.getRelationOptions(this.titlePath, relationName).subscribe(res => {
*/ options = JSONPath({path: '$[*].name', json: res});
const result = JSONPath({path: '$[*].name', json: res});
console.debug('******* OGGETTI *******');
console.debug(result);
console.debug('******* ******* *******');
}) })
} return options;
}*/
//TODO: NOTA BENE--> FormGroup->access by NAME, FormArray->access by INDEX!! //TODO: NOTA BENE--> FormGroup->access by NAME, FormArray->access by INDEX!!
createForm(facetData:ITypeSpecification):void{ createForm(facetData:ITypeSpecification):void{
@ -140,6 +136,7 @@ export class FacetComposerComponent implements OnInit {
//const relationFc = new FormControl('relation',Validators.required); //const relationFc = new FormControl('relation',Validators.required);
const relationFc = this.fb.control(item.relation,Validators.required); const relationFc = this.fb.control(item.relation,Validators.required);
facetFg.addControl('relation', relationFc); facetFg.addControl('relation', relationFc);
//1. creo formArray con le properties //1. creo formArray con le properties
const propertiesFa = this.createPropertyArray(item.guiProps); const propertiesFa = this.createPropertyArray(item.guiProps);
//2. aggiungo formarray delle properties ai controls per la facet //2. aggiungo formarray delle properties ai controls per la facet

View File

@ -4,6 +4,8 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { ApplicationConfigService } from 'app/core/config/application-config.service'; import { ApplicationConfigService } from 'app/core/config/application-config.service';
import { IFacetComposer } from './i-facet-composer'; import { IFacetComposer } from './i-facet-composer';
export interface ITypeSpecification{ export interface ITypeSpecification{
name:string, //nome tipo name:string, //nome tipo
description:string; //descrizione tipo description:string; //descrizione tipo

View File

@ -2,6 +2,7 @@ export interface IFacetComposer {
name:string //facet name (name) name:string //facet name (name)
description:string //facet description (textarea) description:string //facet description (textarea)
relation:string relation:string
relationOptions: string[]
min:number min:number
max:number max:number
guiProps:IFacetProps[] guiProps:IFacetProps[]
@ -15,7 +16,7 @@ export interface IFacetProps {
value: string; value: string;
pattern: string; pattern: string;
propDescription: string; propDescription: string;
validations: IValidation[] validations: IValidation[];
} }
export interface IValidation { export interface IValidation {

View File

@ -1,13 +0,0 @@
import { HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class FacetBuilderService {
httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
}
}

View File

@ -1,19 +0,0 @@
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { ApplicationConfigService } from 'app/core/config/application-config.service';
@Injectable({
providedIn: 'root',
})
export class RestypesService {
httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
};
constructor(private http: HttpClient, private applicationConfigService: ApplicationConfigService){ }
}

View File

@ -1,312 +0,0 @@
[
{
"serviceType": "EService",
"facets": [
{
"facetName": "SoftwareFacet",
"relation": "IsIdentifiedBy",
"notNull": "true",
"unique": "true",
"properties": [
{
"name": "qualifier",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "description",
"type": "string"
},
{
"name": "optional",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "group",
"type": "string"
}
]
},
{
"facetName": "SoftwareFacet",
"relation": "ConsistsOf",
"notNull": "false",
"unique": "false",
"properties": [
{
"name": "qualifier",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "description",
"type": "string"
},
{
"name": "optional",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "group",
"type": "string"
}
]
},
{
"facetName": "AccessPointFacet",
"relation": "ConsistsOf",
"notNull": "true",
"unique": "false",
"properties": [
{
"name": "endpoint",
"type": "string"
},
{
"name": "protocol",
"type": "string"
},
{
"name": "entryName",
"type": "string"
},
{
"name": "description",
"type": "string"
}
]
},
{
"facetName": "EventFacet",
"relation": "ConsistsOf",
"notNull": "true",
"unique": "false",
"properties": [
{
"name": "date",
"type": "date"
},
{
"name": "event",
"type": "string"
}
]
},
{
"facetName": "StateFacet",
"relation": "ConsistsOf",
"notNull": "true",
"unique": "true",
"properties": [
{
"name": "date",
"type": "date"
},
{
"name": "value",
"type": "string"
}
]
},
{
"facetName": "LicenseFacet",
"relation": "ConsistsOf",
"notNull": "false",
"unique": "false",
"properties": [
{
"name": "textURL",
"type": "string"
},
{
"name": "name",
"type": "string"
}
]
}
]
},
{
"serviceType": "HostingNode",
"facets": [
{
"facetName": "NetworkingFacet",
"relation": "IsIdentifiedBy",
"notNull": "true",
"unique": "true",
"properties": [
{
"name": "hostName",
"type": "string"
},
{
"name": "domainName",
"type": "string"
},
{
"name": "Port",
"type": "string"
},
{
"name": "IPAddress",
"type": "string"
},
{
"name": "mask",
"type": "string"
},
{
"name": "broadcastAddress",
"type": "string"
}
]
},
{
"facetName": "CPUFacet",
"relation": "ConsistsOf",
"notNull": "true",
"unique": "false",
"properties": [
{
"name": "model",
"type": "string"
},
{
"name": "vendor",
"type": "string"
},
{
"name": "clockSpeed",
"type": "number"
}
]
},
{
"facetName": "MemoryFacet",
"relation": "HasPersistentMemory",
"notNull": "true",
"unique": "false",
"properties": [
{
"name": "used",
"type": "string"
},
{
"name": "unit",
"type": "string"
},
{
"name": "size",
"type": "number"
}
]
},
{
"facetName": "EventFacet",
"relation": "ConsistsOf",
"notNull": "true",
"unique": "false",
"properties": [
{
"name": "event",
"type": "string"
},
{
"name": "date",
"type": "date"
}
]
},
{
"facetName": "StateFacet",
"relation": "ConsistsOf",
"notNull": "true",
"unique": "true",
"properties": [
{
"name": "value",
"type": "string"
}
]
},
{
"facetName": "SimplePropertyFacet",
"relation": "ConsistsOf",
"notNull": "false",
"unique": "false",
"properties": [
{
"name": "value",
"type": "string"
},
{
"name": "name",
"type": "string"
}
]
},
{
"facetName": "SimplePropertyFacet",
"relation": "ConsistsOf",
"notNull": "false",
"unique": "false",
"properties": [
{
"name": "value",
"type": "string"
},
{
"name": "name",
"type": "string"
}
]
},
{
"facetName": "SoftwareFacet",
"relation": "ConsistsOf",
"notNull": "false",
"unique": "false",
"properties": [
{
"name": "optional",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "group",
"type": "string"
},
{
"name": "description",
"type": "string"
},
{
"name": "qualifier",
"type": "string"
},
{
"name": "version",
"type": "string"
}
]
}
]
}
]