@@ 195-230 (lines=36) @@ | ||
192 | } |
|
193 | } |
|
194 | ||
195 | @Override |
|
196 | public void saveRep(Repository repository, ObjectId idOfTransformation, ObjectId idOfStep) throws KettleException { |
|
197 | try { |
|
198 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.VERSION.name(), 3); |
|
199 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.LANGTAG_OUT_FIELD_NAME.name(), |
|
200 | langTagOutputFieldName); |
|
201 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.DATATYPE_OUT_FIELD_NAME.name(), |
|
202 | datatypeOutputFieldName); |
|
203 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.SUBJECT_URI_FIELD_NAME.name(), |
|
204 | subjectUriFieldName); |
|
205 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.SUBJECT_OUT_FIELD_NAME.name(), |
|
206 | subjectOutputFieldName); |
|
207 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.PREDICATE_OUT_FIELD_NAME.name(), |
|
208 | predicateOutputFieldName); |
|
209 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.OBJECT_OUT_FIELD_NAME.name(), |
|
210 | objectOutputFieldName); |
|
211 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.KEEP_INPUT_FIELDS.name(), keepInputFields); |
|
212 | ||
213 | // Lista de RDF Type URIs |
|
214 | for (int i = 0; i < rdfTypeUris.size(); i++) { |
|
215 | repository.saveStepAttribute(idOfTransformation, idOfStep, i, Field.RDF_TYPE_URIS.name(), |
|
216 | rdfTypeUris.get(i)); |
|
217 | } |
|
218 | ||
219 | // Map Table |
|
220 | int linhas = (int) mapTable.size(); |
|
221 | int colunas = mapTable.getHeader().size(); |
|
222 | repository.saveStepAttribute(idOfTransformation, idOfStep, "nr_lines", linhas); |
|
223 | for (int i = 0; i < linhas; i++) { |
|
224 | for (int f = 0; f < colunas; f++) { |
|
225 | repository.saveStepAttribute(idOfTransformation, idOfStep, i, mapTable.getHeader().get(f), |
|
226 | mapTable.getValue(i, f)); |
|
227 | } |
|
228 | } |
|
229 | } catch (Exception e) { |
|
230 | throw new KettleException("Unable to save step information to the repository for id_step=" + idOfStep, e); |
|
231 | } |
|
232 | } |
|
233 |
@@ 186-210 (lines=25) @@ | ||
183 | } |
|
184 | ||
185 | // Rogers (2012): Persistir campos no repositorio |
|
186 | @Override |
|
187 | public void saveRep(Repository repository, ObjectId idOfTransformation, ObjectId idOfStep) throws KettleException { |
|
188 | try { |
|
189 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.VERSION.name(), 1); |
|
190 | ||
191 | // Map Table |
|
192 | int linhas = (int) mapTable.size(); |
|
193 | int colunas = mapTable.getHeader().size(); |
|
194 | repository.saveStepAttribute(idOfTransformation, idOfStep, "nr_lines", linhas); |
|
195 | for (int i = 0; i < linhas; i++) { |
|
196 | for (int f = 0; f < colunas; f++) { |
|
197 | repository.saveStepAttribute(idOfTransformation, idOfStep, i, mapTable.getHeader().get(f), |
|
198 | mapTable.getValue(i, f)); |
|
199 | } |
|
200 | } |
|
201 | ||
202 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.SUBJECT_OUT_FIELD_NAME.name(), |
|
203 | subjectOutputFieldName); |
|
204 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.PREDICATE_OUT_FIELD_NAME.name(), |
|
205 | predicateOutputFieldName); |
|
206 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.OBJECT_OUT_FIELD_NAME.name(), |
|
207 | objectOutputFieldName); |
|
208 | repository.saveStepAttribute(idOfTransformation, idOfStep, Field.KEEP_INPUT_FIELDS.name(), keepInputFields); |
|
209 | } catch (Exception e) { |
|
210 | throw new KettleException("Unable to save step information to the repository for id_step=" + idOfStep, e); |
|
211 | } |
|
212 | } |
|
213 |