Difference between revisions of "Time Series Management"
Lucio.lelii (Talk | contribs) (→How To Access TimeSeries data) |
m |
||
(8 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | <!-- CATEGORIES --> | ||
+ | [[Category:Developer's Guide]] | ||
+ | <!-- END CATEGORIES --> | ||
Time Series Management and Analysis facilities. | Time Series Management and Analysis facilities. | ||
− | |||
== Overview == | == Overview == | ||
Line 12: | Line 14: | ||
* the <code>ImportFactory</code> port-type serves as the interface of a single WS-Resource, it allows clients to create new import resources (ImportManager instances). | * the <code>ImportFactory</code> port-type serves as the interface of a single WS-Resource, it allows clients to create new import resources (ImportManager instances). | ||
− | * the <code>ImportManager</code> port-type allows clients to import new time series offering | + | * the <code>ImportManager</code> port-type allows clients to import new time series offering operations like import, de-normalization etc. |
* the <code>CurationFactory</code> port-type serves as the interface of a single WS-Resource, it allows clients to create new curation resources (CurationManager instances). | * the <code>CurationFactory</code> port-type serves as the interface of a single WS-Resource, it allows clients to create new curation resources (CurationManager instances). | ||
− | * the <code>CurationManager</code> port-type allows clients to curate time series offering | + | * the <code>CurationManager</code> port-type allows clients to curate time series offering operations like set column type, replace value etc. |
* the <code>TimeSeriesFactory</code> port-type serves as the interface of a single WS-Resource, it allows clients to create new time series resources (TimeSeriesManager instances). | * the <code>TimeSeriesFactory</code> port-type serves as the interface of a single WS-Resource, it allows clients to create new time series resources (TimeSeriesManager instances). | ||
− | * the <code>TimeSeriesManager</code> port-type allows clients to operate on time series offering | + | * the <code>TimeSeriesManager</code> port-type allows clients to operate on time series offering operations like union, grouping, aggregation etc. |
− | + | ||
== How To Access TimeSeries data == | == How To Access TimeSeries data == | ||
− | TimeSeries offers an high-level library for interaction included in the TimeSeriesServiceStubs. This library offers facilities for service retrieving simply instantiating a <code>TimeSeriesFactoryCall</code> Object passing as argument a <code>GCUBEScope</code> and a <code>SecurityManager Array</code>. | + | TimeSeries offers an high-level library for interaction included in the <code>TimeSeriesServiceStubs</code>. This library offers facilities for service retrieving simply instantiating a <code>TimeSeriesFactoryCall</code> Object passing as argument a <code>GCUBEScope</code> and a <code>SecurityManager Array</code>. |
<source lang="java5" highlight="4"> | <source lang="java5" highlight="4"> | ||
Line 59: | Line 60: | ||
− | Once the EPR for the TimeSeries | + | Once the EPR for the TimeSeries has been retrieved the client can interact directly with the <code>TimeSeriesManager</code> port-type to retrieve information about data and column definition. |
+ | |||
+ | <source lang="java5" highlight="4"> | ||
+ | TimeSeriesServiceCall timeSeriesServiceCall = new TimeSeriesServiceCall(user, timeSeriesEPR , scope , secMan); | ||
+ | |||
+ | //retrieving the column definitions | ||
+ | ColumnDefinition[] columns =timeSeriesServiceCall.getDimensions(); | ||
+ | for (ColumnDefinition column: columns){ | ||
+ | EntryType type = column.getColumnType(); //returns the entry type of this column (Attribute, Dimension, Value) | ||
+ | String fieldId = column.getId(); //returns the id of this column (the name of this column in the db) | ||
+ | String label = column.getLabel(); //returns the user defined name for this column | ||
+ | Dimension dimension = column.getDimension(); //in case of dimension entry type it return the information about the related codelist (id, name) otherwise it is null | ||
+ | } | ||
+ | |||
+ | //retrieving data (order can be null only if the default order is required) | ||
+ | String jsonData= timeSeriesServiceCall.getAllDataAsJSon(new Limit(0, 1000), new Order(columnId, OrderType.Descending)); | ||
+ | //json data contains the field id of every column and the related value | ||
+ | </source> |
Latest revision as of 18:27, 11 July 2013
Time Series Management and Analysis facilities.
Overview
The TimeSeriesManagerService is an application that offers facilities to import, curate and access time series data. The main goal of this service is to elaborate large amount of time series data in real time applying multiple operations: aggregation, union, grouping, filters etc.
Architecture
The interface of the TimeSeries Manager service is distributed across 6 port-types:
- the
ImportFactory
port-type serves as the interface of a single WS-Resource, it allows clients to create new import resources (ImportManager instances).
- the
ImportManager
port-type allows clients to import new time series offering operations like import, de-normalization etc.
- the
CurationFactory
port-type serves as the interface of a single WS-Resource, it allows clients to create new curation resources (CurationManager instances).
- the
CurationManager
port-type allows clients to curate time series offering operations like set column type, replace value etc.
- the
TimeSeriesFactory
port-type serves as the interface of a single WS-Resource, it allows clients to create new time series resources (TimeSeriesManager instances).
- the
TimeSeriesManager
port-type allows clients to operate on time series offering operations like union, grouping, aggregation etc.
How To Access TimeSeries data
TimeSeries offers an high-level library for interaction included in the TimeSeriesServiceStubs
. This library offers facilities for service retrieving simply instantiating a TimeSeriesFactoryCall
Object passing as argument a GCUBEScope
and a SecurityManager Array
.
GCUBEScope scope= ..some scope.. //running without security GCUBESecurityManager secMan= new GCUBESecurityManagerImpl(){ @Override public boolean isSecurityEnabled() { return false; } }; TimeSeriesFactoryCall timeSeriesFactoryCall= new TimeSeriesFactoryCall(scope, new GCUBESecurityManager[]{secMan});
The TimeSeriesFactoryCall offers facilities to retrieve information about time series or to open a certain time series giving it a specific id.
... TimeSeriesFactoryCall timeSeriesFactoryCall= new TimeSeriesFactoryCall(scope, new GCUBESecurityManager[]{secMan}); String user = ..some user.. //getting the list of timeseries by ownertimeSeriesFactoryCall.getUserRelatedTimeSeries(user); //getting the list of published timeseries timeSeriesFactoryCall.getPublishedTimeSeries(); //retrieving the EPR to interact with a timeseries String timeSeriesId= ..id.. EndpointReferenceType timeSeriesEPR = timeSeriesFactoryCall.open(timeSeriesId, user);
Once the EPR for the TimeSeries has been retrieved the client can interact directly with the TimeSeriesManager
port-type to retrieve information about data and column definition.
TimeSeriesServiceCall timeSeriesServiceCall = new TimeSeriesServiceCall(user, timeSeriesEPR , scope , secMan); //retrieving the column definitions ColumnDefinition[] columns =timeSeriesServiceCall.getDimensions();for (ColumnDefinition column: columns){ EntryType type = column.getColumnType(); //returns the entry type of this column (Attribute, Dimension, Value) String fieldId = column.getId(); //returns the id of this column (the name of this column in the db) String label = column.getLabel(); //returns the user defined name for this column Dimension dimension = column.getDimension(); //in case of dimension entry type it return the information about the related codelist (id, name) otherwise it is null } //retrieving data (order can be null only if the default order is required) String jsonData= timeSeriesServiceCall.getAllDataAsJSon(new Limit(0, 1000), new Order(columnId, OrderType.Descending)); //json data contains the field id of every column and the related value