|
|
Line 212: |
Line 212: |
| | | | | |
| |- | | |- |
− | | endpoint'''*''' | + | | endpoint '''*''' |
| | URI | | | URI |
| | The URI which identify the endpoint of a resource | | | The URI which identify the endpoint of a resource |
Revision as of 08:41, 26 July 2016
Basic Concepts
- Two typologies of entities are envisaged:
- Resources, i.e. entities representing a description of "thing" to be managed;
- Every Resource is characterised by a number of Facets.
- Facets, i.e. entities contributing to "build" a description of a Resource. Every facet, once attached to a Resource profile captures a certain aspect / characterization of the resource;
- Every facet is characterised by a number of properties;
- Entities and relations can be specialized.
- A number of specializations are identified below. Such specializations are managed by the gCube Core services, i.e. Core services builds upon these specialization to realize its management tasks;
- Other specializations can be defined by clients, the system make it possible to store these additional typologies of relations and facets and to discover them.
- On relations:
- Any relation has a direction, i.e. a "source" (out bound of the relation) and a "target" (in bound of the relation). Anyway the relation can be also navigated in the opposite direction;
- It is not permitted to define a Relation having a Facet as "source". In other words:
- It is not permitted to define a Relation connecting a Facet with another one;
- It is not permitted to define a Relation connecting a Facet with a Resource (as target);
- A Facet instance can be linked (by consistsOf or any specialization of it) from different Resources.
Property
Any Property can be enriched with the following attributes:
- Name : Property Name
- Type : The Type of the Property (e.g. String, Integer, ...). See Property Type
- Description : The description of the Property.
default=null
.
- Mandatory (M): Indicate if the Property is mandatory.
default=false
.
- ReadOnly (RO): The Property cannot change its value.
default=false
.
- NotNull (NN):
default=false
- Max (Max):
default=null
- Min (Min):
default=null
- Regexpr (Reg)): A Regular Expression to validate the property value.
default=null
Property Type
Basic Property Type
Type
|
Description
|
Java type
|
Boolean
|
Handles only the values True or False
|
java.lang.Boolean or boolean
|
Integer
|
32-bit signed Integers
|
java.lang.Integer or int
|
Short
|
Small 16-bit signed integers
|
java.lang.Short or short
|
Long
|
Big 64-bit signed integers
|
java.lang.Long or long
|
Float
|
Decimal numbers
|
java.lang.Float or float
|
Double
|
Decimal numbers with high precision
|
java.lang.Double or double
|
Datetime
|
Any date with the precision up to milliseconds.
|
java.util.Date
|
String
|
Any string as alphanumeric sequence of chars
|
java.lang.String
|
Embedded
|
This is an Object contained inside the owner Entity and has no Header. It is reachable only by navigating the owner Entity.
|
org.gcube.informationsystem.model.embedded.Embedded
|
Embedded list
|
List of Objects contained inside the owner Entity and have no Header. They are reachable only by navigating the owner Entity.
|
List<? extends Embedded>
|
Embedded set
|
Set (no duplicates) of Objects contained inside the owner Entity and have no Header. They are reachable only by navigating the owner Entity.
|
Set<? extends Embedded>
|
Embedded map
|
Map of Objects contained inside the owner Entity and have no Header. They are reachable only by navigating the owner Entity.
|
Map<String, ? extends Embedded>
|
Link ...
|
Link to another Entity.
|
...
|
Byte
|
Single byte. usesful to store small 8-bit signed integers
|
java.lang.Byte or byte
|
Binary
|
Can contain any value as byte array
|
java.lang.Byte[] or byte[]
|
Any
|
Not determinated type, used to specify Collections of mixed type, and null
|
java.lang.Object
|
Derived Property Type
The following are obtained using a String as real type and adding a validation regex.
Type
|
Description
|
Java type
|
Enum
|
by default it is represented using the String representation of the Enum. So that the primitive type used will be String. The enumeration is checked by setting Regexpr property. The Regular Expression is auto-generated and it will be something like (FIRST-ENUM-STRING_REPRESENTATION|SECOND-ENUM-STRING_REPRESENTATION|...|LAST_ENUM_STRING_REPRESENTATION) .
Otherwise (if indicated using an annotation), it can be represented using the Integer value of the Enum. So that the primitive type used will be Integer. The enumeration is checked using Max and Min properties.
|
java.lang.Enum or enum
|
UUID
|
String representation of the UUID. The check is obtained using the regular expression ([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}){1}
|
java.util.UUID
|
URL
|
String representation of the URL. The check is obtained using a regex available at https://mathiasbynens.be/demo/url-regex (see diegoperini one).
|
java.net.URL
|
URI
|
String representation of the URI. The check is obtained using .
|
java.net.URI
|
Every Entity and Relation has an Header automatically filled by the System. The Header has the following properties:
Name
|
Type
|
Description
|
Attributes
|
uuid
|
UUID
|
This uuid can be used to univocally identify the Entity or the Relation
|
Mandatory=true NotNull=true ReadOnly=true
|
creator
|
String
|
Filled at creation time. The creator is retrieved using the authorization token
|
Mandatory=true NotNull=true ReadOnly=true
|
creationTime
|
Datetime
|
Creation time in milliseconds. Represent the difference, measured in milliseconds, between the creation time and midnight, January 1, 1970 UTC
|
Mandatory=true NotNull=true ReadOnly=true
|
lastUpdateTime
|
Datetime
|
Last Update time in milliseconds. Represent the difference, measured in milliseconds, between the last update time and midnight, January 1, 1970 UTC
|
Mandatory=true NotNull=true
|
Resources and (isRelatedTo) Relations
Facets
Early ideas and thinking on facets were documented at 2nd Generation Resource Model : Facets
Facet
Every Facet has:
Access Point Facet
The goal of this facet is expected to capture information on “access points” for a resource, i.e. any endpoint to interact with the resource via a known protocol.
Access Point Facet extends
Facet
Access Point Facet
Name
|
Type
|
Description
|
Attributes
|
|
entryName
|
String
|
An unique identifier
|
|
|
endpoint *
|
URI
|
The URI which identify the endpoint of a resource
|
Mandatory=true ReadOnly=true NotNull=true
|
|
protocol
|
String
|
The high-level protocol used by the access point. The String could contains the version if needed.
E.g. WMS not http which is already contained in URI.
|
|
|
description
|
String
|
.....
|
|
|
authorization
|
String
|
Contains authorization information. E.g: a token, username:password. By relying on schema it should be sufficient to capture also whether the content is encrypted or not
|
|
|
authorizationSchema
|
URI
|
....
|
|
|
properties
|
String
|
This can be an arbitrarily complex element whose "structure" is defined by the associated schema
|
|
|
propertiesSchema
|
URI
|
....
|
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Dataset
|
consistsOf
|
0..n
|
Access Point Facet
|
The embargoState can be modeled through the access policy defined in the consistsOf relation
|
Concrete Dataset
|
consistsOf
|
1..n
|
Access Point Facet
|
The embargoState can be modeled through the access policy defined in the consistsOf relation
|
E-Service
|
consistsOf
|
1..n
|
Access Point Facet
|
Identify the endpoints of the E-Service
|
Software
|
consistsOf
|
1..n
|
Access Point Facet
|
Links to maven artifact on nexus, javadoc, wiki, svn ...
|
Contact Facet
The goal of this facet is expected to capture contact information.
Contact Reference Facet
Coverage Facet
The goal of this facet is to collect any extent-related information.
CPU Facet
The goal of this facet is to describe CPU information.
CPU Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
model
|
String
|
...
|
Mandatory=true NotNull=true
|
|
vendor
|
String
|
...
|
Mandatory=true NotNull=true
|
|
clockSpeed
|
String
|
...
|
Mandatory=true NotNull=true
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Hosting Node
|
consistsOf
|
1..n
|
CPU Facet
|
CPU Information
|
Descriptive Metadata Facet
The goal of this facet is to collect any descriptive metadata about the resource.
Event Facet
The goal of this facet is to collect any descriptive metadata about the resource.
Identifier Facet
The goal of this facet is to collect information on Identifiers that can be attached to a resource.
License Facet
License Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
name
|
String
|
E.g. EUPL 1.1, GPLv2, BSD, ...
|
Mandatory=true NotNull=true
|
|
text
|
URL
|
Licence URL
|
Mandatory=true NotNull=true
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Dataset
|
consistsOf
|
0..n
|
License Facet
|
The duration of license if any can can be modeled through the expiry date defined in the consistsOf relation
|
E-Service
|
consistsOf
|
0..n
|
License Facet
|
The specific terms of use for programmatic access to the service
|
Software
|
consistsOf
|
1..n
|
License Facet
|
...
|
Location Facet
The goal of this facet is to collect information about Location
Location Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
Country
|
String
|
...
|
|
|
Location
|
String
|
...
|
|
|
Latitude
|
String
|
...
|
|
|
Longitude
|
String
|
...
|
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Site
|
consistsOf
|
1..n
|
Location Facet
|
...
|
Memory Facet
The goal of this facet is to .....
Memory Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
size
|
Long
|
Total amount of memory.
|
Mandatory=true NotNull=true
|
|
used
|
Long
|
usesd amount of memory.
|
Mandatory=true NotNull=true
|
|
unit
|
Enum
|
I.e. Byte, kB (kilobyte 10^3), MB (megabyte 10^6), GB (gigabyte 10^9), TB (terabyte 10^12), PB (petabyte 10^15), EB (exabyte 10^18), ZB (zettabyte 10^21), YB (yottabyte 10^24)
|
Mandatory=true NotNull=true Regex=(Byte|kB,|MB|GB|TB|PB|EB|ZB|YB)
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Hosting Node
|
hasPersistent
|
1..n
|
Memory Facet
|
Disk Space
|
Hosting Node
|
hasVolatile
|
1..n
|
Memory Facet
|
RAM
|
Network Address Facet
The goal of this facet is to capture IP information
Regular expression to validate different IPv4 addresses are available at:
http://www.regextester.com/22
https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
Both IPv4 and IPv6:
http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
Provenance Facet
The goal of this facet is to collect information related with resource lineage/provenance
Provenance Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
relationship
|
Enum
|
wasGeneratedBy | ...
|
|
|
reference
|
String
|
resourceID (a reference to the "originator" Resource associated to the resource the facet is attached to by the relationship)
|
|
|
provenanceDocument
|
String
|
... E.g. the xml format
|
|
|
provenanceDocumentSchema
|
String
|
... E.g. a reference to the format
|
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Dataset
|
consistsOf
|
0..n
|
Provenance Facet
|
...
|
Schema Facet
The goal of this facet is to provide a way to store a schema. This is an Abstract
facet.
Abstract
Schema Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
name
|
String
|
...
|
Mandatory=true NotNull=true
|
|
description
|
String
|
...
|
Mandatory=true NotNull=true
|
|
schemaURL
|
URL
|
...
|
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Schema
|
isIdentifiedBy
|
1..n
|
Schema Facet
|
...
|
JSON Schema Facet
JSON Schema Facet extends
Schema Facet
Name
|
Type
|
Description
|
Attributes
|
|
content
|
...
|
...
|
Mandatory=true NotNull=true
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
XSD Schema Facet
XSD Schema Facet extends
Schema Facet
Name
|
Type
|
Description
|
Attributes
|
|
content
|
...
|
...
|
Mandatory=true NotNull=true
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Simple Property Facet
The goal of this facet is to ...
Software Facet
The goal of this facet is to capture SW related features"
Software Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
name
|
String
|
The name of the software artefact being described. E.g. artifactId in maven, Service Name in gCube software, the software name for retail software Microsoft Office 2013-SP2.
|
|
|
group
|
String
|
The name of "group" the software artefact belongs to. E.g. groupId in Maven, ServiceClass in gCube software, company name for retail software Microsoft Office 2013-SP2.
|
|
|
version
|
String
|
The particular release of the software artefact. E.g. maven version, Service Version in gCube software, artifactId in maven, the software version for retail software Microsoft Office 2013-SP2.
|
|
|
description
|
String
|
A human oriented description of the software artefact being described.
|
|
|
qualifier
|
String
|
E.g. packaging or scope in maven, scope level or sharable level in gCube software, target architecture for retail software x86 or amd64.
|
|
|
optional
|
Boolean
|
.... usesd in maven and in gcube
|
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
E-Service
|
isIdentifiedBy
|
1..n
|
Software Facet
|
The software enabling the E-Service capabilities
|
E-Service
|
consistsOf
|
0..n
|
Software Facet
|
Software available in the E-Service environment that characterizes the specific E-Service instance
|
Running Plugin
|
isIdentifiedBy
|
1..1
|
Software Facet
|
The software enabling the Running Plugin
|
Hosting Node
|
consistsOf
|
0..n
|
Software Facet
|
Useful to report the hosted software that are not registered in the Resource Registry as Software Resource, e.g. Operating System
|
Virtual Service
|
isIdentifiedBy
|
1..n
|
Software Facet
|
...
|
Software
|
isIdentifiedBy
|
1..n
|
Software Facet
|
Software coordinates which identify the Software per se.
|
Software
|
consistsOf
|
1..n
|
Software Facet
|
Apart the one connected with isIdentifiedBy relation (gCube coordinates) the others identify the sw in other way e.g. (Maven coordinates)
|
Plugin
|
isIdentifiedBy
|
1..n
|
Software Facet
|
Software coordinates which identify the Plugin per se.
|
State Facet
The goal of this facet is to ...
State Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
value
|
String
|
The value of the state. Must be compliant with schema.
|
Mandatory=true NotNull=true
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Software
|
consistsOf
|
1..n
|
State Facet
|
E.g. Deprecated, Active, Obsolete
|
Container State Facet
Container State Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
value
|
String
|
The value of the state
|
Mandatory=true NotNull=true Regex=(started|ready|certified|down|failed)
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Hosting Node
|
consistsOf
|
1..1
|
Container State Facet
|
I.e. started, ready, certified, down, failed
|
Service State Facet
Service State Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
value
|
String
|
The value of the state
|
Mandatory=true NotNull=true Regex=(STARTED|ready|down|failed)
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
E-Service
|
consistsOf
|
1..1
|
Service State Facet
|
I.e. STARTED, ready, down, failed
|
Subject Facet
The goal of this facet is to ...
Subject Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
value
|
String
|
The value of the state. Must be compliant with schema.
|
Mandatory=true NotNull=true
|
|
schema
|
URI
|
The URI of the schema. It is only an informative field. It is not used for validation from IS part.
|
Mandatory=true NotNull=true
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Dataset
|
consistsOf
|
0..n
|
Subject Facet
|
...
|
Schema
|
consistsOf
|
0..n
|
Subject Facet
|
...
|
Relations
Every relation has:
Relation Property
Name
|
Type
|
Description
|
referentialIntegrity
|
Enum
|
I.e. onDeleteCascadeWhenOrphan, onDeleteCascade, onDeleteKeep. The meaning is related to the relation direction.
|
accessPolicy
|
Embedded (i.e. AccessPolicy)
|
A policy is characterized by a name, a description, and the period ([start], [end]) when the policies apply
|
expiryTime
|
Long
|
The expiry date can be used to model the time until the relationship is valid, Expiry time in milliseconds. Represent the difference, measured in milliseconds, between the creation time and midnight, January 1, 1970 UTC
|
isRelatedTo
belongsTo
callsFor
demands
dependsOn
discovers
hosts
involves
isActivatedBy
isCompliantWith
isConfiguredBy
isCorrelatedTo
isPartOf
isCustomizedBy
isDerivationOf
isManagedBy
isOwnedBy
isPluginOf
isPoweredBy
manages
requires
runs
runsPlugin
uses
consistsOf
isIdentifiedBy
hasCoverage
hasTemporal
hasSpatial
hasMemory
hasPersistent
hasVolatile
hasContact
hasContributor
hasCreator
hasCurator
hasDeveloper
hasMaintainer
hasManager
hasOwner
Resources
Every Resource has:
A class can be identified as Abstract
. This means that cannot be instantiated. uses specialization instead.
It is not required that an Abstract class establish an isIdentifiedBy relation with a Facet.
Resource
Abstract
Resource Profile
This entity is conceived to describe every "main thing" to be registered and discovered by the Information System.
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Facets
|
Resource
|
isIdentifiedBy
|
1..n
|
Facet
|
Any Resource has at least one Facet which in some way allow to identify the Resource per se.
|
Resource
|
consistsOf
|
0..n
|
Facet
|
Any Resource consist of zero or more Facets which describes the different aspects of the facet.
|
Resources
|
Resource
|
isRelatedTo
|
0..n
|
Resource
|
Any Resource can be related to any other resource.
|
The following Resources have been identified:
Actor
Legal Body
Person
Configuration Template
It represents a template for a configuration. It describe how a configuration has to be realized. E.g. Used to define the accounting configuration parameters template.
Configuration
Dataset
Concrete Dataset
Service
E-Service
Running Plugin
Hosting Node
Virtual Service
Schema
Site
Software
Plugin
Best practices and guidelines
- On Facet instances "reuse" across Resource Profiles:
- This can be guaranteed automatically by the system, if and just in the case the system want to avoid duplication of information. It is based on a configuration policy;
- This MUST be done only when a change in a facet instance MUST affect a change in all Resources connected to such a Facet.
Suggested Extensions
The gCube Resource Model supports extensions at runtime meaning that new facets, relations, and resources can be defined and registered at any time by authorized clients. Those extensions must necessarily specialize an existing gCube Entity.
An example of those specializations is the following:
Functionality Related Facet
The goal of this facet is to capture what are the facilities supported by the Service Entity and it aims to model the service interface.
Functionality Related Facet extends
Facet
Name
|
Type
|
Description
|
Attributes
|
|
name
|
String
|
...
|
|
|
description
|
String
|
...
|
|
|
input
|
String
|
...
|
|
|
output
|
String
|
...
|
|
Known Usage
|
Source
|
Relation
|
Multiplicity
|
Target
|
Description
|
Service
|
consistsOf
|
0..n
|
Functionality Related Facet
|
...
|
Internal Entity and Relation
For internal use only are defined the following entity and relation:
Context
Model a Context (aka scope)
isParentOf