@@ -113,27 +113,27 @@ public Stream<ProgressInfo> importFile(
113113 },
114114 HashMap ::putAll );
115115
116- String relType = (String ) row .remove (FIELD_TYPE );
116+ String relType = (String ) row .remove (FIELD_TYPE . getName () );
117117 if (relType == null ) {
118118 // is node
119- String [] stringLabels = (String []) row .remove (FIELD_LABELS );
119+ String [] stringLabels = (String []) row .remove (FIELD_LABELS . getName () );
120120 Label [] labels = Optional .ofNullable (stringLabels )
121121 .map (l -> Arrays .stream (l ).map (Label ::label ).toArray (Label []::new ))
122122 .orElse (new Label [] {});
123123 final Node node = btx .getTransaction ().createNode (labels );
124124
125- long id = (long ) row .remove (FIELD_ID );
125+ long id = (long ) row .remove (FIELD_ID . getName () );
126126 idMapping .put (id , node .getId ());
127127
128128 addProps (row , node );
129129 reporter .update (1 , 0 , row .size ());
130130 } else {
131131 // is relationship
132- long sourceId = (long ) row .remove (FIELD_SOURCE_ID );
132+ long sourceId = (long ) row .remove (FIELD_SOURCE_ID . getName () );
133133 Long idSource = idMapping .get (sourceId );
134134 final Node source = btx .getTransaction ().getNodeById (idSource );
135135
136- long targetId = (long ) row .remove (FIELD_TARGET_ID );
136+ long targetId = (long ) row .remove (FIELD_TARGET_ID . getName () );
137137 Long idTarget = idMapping .get (targetId );
138138 final Node target = btx .getTransaction ().getNodeById (idTarget );
139139
@@ -269,7 +269,6 @@ public static Object toValidValue(Object object, String field, Map<String, Objec
269269 */
270270 private static Object convertValue (String value , String typeName ) {
271271 switch (typeName ) {
272- // {"crs":"wgs-84-3d","latitude":13.1,"longitude":33.46789,"height":100.0}
273272 case "Point" :
274273 return getPointValue (value );
275274 case "LocalDateTime" :
@@ -323,7 +322,7 @@ private static Object convertValue(String value, String typeName) {
323322 private static PointValue getPointValue (String value ) {
324323 try {
325324 return PointValue .parse (value );
326- } catch (Neo4jException e ) {
325+ } catch (RuntimeException e ) {
327326 // fallback in case of double-quotes, e.g.
328327 // {"crs":"wgs-84-3d","latitude":13.1,"longitude":33.46789,"height":100.0}
329328 // we remove the double quotes before parsing the result, e.g.
0 commit comments