1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // Authors : Guillaume Boulant (EDF) - 01/06/2011
25 #ifndef _MED_DATAMANAGER_IDL_
26 #define _MED_DATAMANAGER_IDL_
28 #include "SALOME_GenericObj.idl"
29 #include "SALOME_Exception.idl"
33 struct DatasourceHandler {
37 // The source could be a filepath or the ior of a field servant
45 typedef sequence<MeshHandler> MeshHandlerList;
48 * The Fieldseries is a virtal object that does not exist in the MED
49 * data model (at least in the MEDCoupling data model). It is just a
50 * point that aggregate a list of fields that relie on the same mesh
51 * with the same type (the fields in a timeseries differ by their
54 * Then you could have a field with no fieldseries associated but
55 * directly associated to a mesh. That is typically the case of
56 * fields created by MED operations: if you operate tow fields
57 * coming from 2 different timeseries (and relying on the same
58 * mesh), you obtain a field that can not be associate to the
59 * original timeseries. Then this new created field must be directly
60 * associated to its underlying mesh (as defined in the MEDCoupling
63 * In conclusion, the fieldseries is a facilities for data
64 * management but must not be a structuration of the data model. The
67 * field->fieldseries->mesh
71 * field->fieldseries (optional)
76 * fieldseries->mesh (mandatory)
78 struct FieldseriesHandler {
85 typedef sequence<FieldseriesHandler> FieldseriesHandlerList;
87 // The FieldHandler structure is a lightweigth data structure that
88 // represents a single field (as understood in MEDCoupling model).
92 string fieldname; // @warn : if fieldseriesId then get from fieldseries->name
93 string meshname; // @deprecated: replace by meshid and get from mesh->name
95 long type; // @warn : if fieldseriesId then get from fieldseries->type
98 string source; // @deprecated : get from mesh->datasource->uri
101 typedef sequence<FieldHandler> FieldHandlerList;
102 typedef sequence<long> FieldIdList;
104 interface MEDDataManager: SALOME::GenericObj
107 //==========================================================
108 // Datasource management
109 //==========================================================
110 DatasourceHandler addDatasource(in string filepath);
112 //==========================================================
113 // Mesh data management
114 //==========================================================
116 MeshHandler getMesh(in long meshId) raises (SALOME::SALOME_Exception);
117 MeshHandlerList getMeshList(in long datasourceId);
119 //==========================================================
120 // Field data management
121 //==========================================================
122 FieldseriesHandlerList getFieldseriesListOnMesh(in long meshId);
123 FieldHandlerList getFieldListInFieldseries(in long fieldseriesId);
125 FieldHandler getFieldHandler(in long fieldHandlerId);
126 FieldHandlerList getFieldHandlerList();
127 // __GBO__ Maybe it could be usefull to define a getFieldHandlerList with a datasourceId in argument
128 string getFieldRepresentation(in long fieldHandlerId);
130 // Persistency management
131 void saveFields(in string filepath, in FieldIdList list)
132 raises (SALOME::SALOME_Exception);
133 void markAsPersistent(in long fieldHandlerId, in boolean persistent);
134 void savePersistentFields(in string filepath)
135 raises (SALOME::SALOME_Exception);
138 void updateFieldMetadata(in long fieldHandlerId,
144 //void saveFields(in FieldHandlerList fieldHandlerList, in string filepath);
146 void changeUnderlyingMesh(in long fieldHandlerId, in long meshHandlerId)
147 raises (SALOME::SALOME_Exception);
149 //==========================================================
150 // General purpose data management
151 //==========================================================
152 void setEventListenerIOR(in string ior);
153 string getEventListenerIOR() raises (SALOME::SALOME_Exception);
155 // Print out server data
160 #endif // _MED_DATAMANAGER_IDL_