1 // Copyright (C) 2007-2016 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, or (at your option) any later version.
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 struct InterpolationParameters {
110 string intersectionType;
113 interface MEDDataManager: SALOME::GenericObj
116 //==========================================================
117 // Datasource management
118 //==========================================================
119 DatasourceHandler loadDatasource(in string filepath);
120 DatasourceHandler getDatasourceHandler(in string filepath);
121 DatasourceHandler getDatasourceHandlerFromID(in long sourceid);
123 //==========================================================
124 // Mesh data management
125 //==========================================================
127 MeshHandler getMesh(in long meshId) raises (SALOME::SALOME_Exception);
128 MeshHandlerList getMeshList(in long datasourceId);
130 //==========================================================
131 // Field data management
132 //==========================================================
133 FieldseriesHandlerList getFieldseriesListOnMesh(in long meshId);
134 FieldHandlerList getFieldListInFieldseries(in long fieldseriesId);
136 FieldHandler getFieldHandler(in long fieldHandlerId);
137 FieldHandlerList getFieldHandlerList();
138 // __GBO__ Maybe it could be usefull to define a getFieldHandlerList with a datasourceId in argument
139 string getFieldRepresentation(in long fieldHandlerId);
141 // Persistency management
142 void saveFields(in string filepath, in FieldIdList list)
143 raises (SALOME::SALOME_Exception);
144 void markAsPersistent(in long fieldHandlerId, in boolean persistent);
145 void savePersistentFields(in string filepath)
146 raises (SALOME::SALOME_Exception);
149 void updateFieldMetadata(in long fieldHandlerId,
155 //void saveFields(in FieldHandlerList fieldHandlerList, in string filepath);
157 void changeUnderlyingMesh(in long fieldHandlerId, in long meshHandlerId)
158 raises (SALOME::SALOME_Exception);
160 FieldHandler interpolateField(in long fieldHandlerId, in long meshHandlerId, in InterpolationParameters params)
161 raises (SALOME::SALOME_Exception);
163 //==========================================================
164 // General purpose data management
165 //==========================================================
166 void setEventListenerIOR(in string ior);
167 string getEventListenerIOR() raises (SALOME::SALOME_Exception);
169 // Print out server data
174 #endif // _MED_DATAMANAGER_IDL_