public static void addErrorInContext(UnmarshallingContext context, Throwable e) { LOGGER.log(FINE, "Failed to load", e); ArrayList<Throwable> list = (ArrayList<Throwable>)context.get("ReadError"); if (list == null) context.put("ReadError", list = new ArrayList<Throwable>()); list.add(e); }
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { if (context.get(IN_NESTED)==null) { context.put(IN_NESTED,true); try { return super.unmarshal(reader,context); } finally { context.put(IN_NESTED,false); } } else return leafLabelConverter.unmarshal(reader,context); }
public Object unmarshal(final HierarchicalStreamReader reader, final UnmarshallingContext context) { TreeStringBuilder builder = (TreeStringBuilder)context.get(TreeStringBuilder.class); if (builder == null) { context.put(TreeStringBuilder.class, builder = new TreeStringBuilder()); // dedup at the end final TreeStringBuilder _builder = builder; context.addCompletionCallback(new Runnable() { public void run() { _builder.dedup(); } }, 0); } return builder.intern(reader.getValue()); }
Iterator it = reader.getAttributeNames(); if (result instanceof Saveable && context.get("Saveable") == null) context.put("Saveable", result); if (context.get("ReadError") != null && context.get("Saveable") == result) { OldDataMonitor.report((Saveable)result, (ArrayList<Throwable>)context.get("ReadError")); context.put("ReadError", null);
public static void addErrorInContext(UnmarshallingContext context, Throwable e) { LOGGER.log(FINE, "Failed to load", e); ArrayList<Throwable> list = (ArrayList<Throwable>)context.get("ReadError"); if (list == null) context.put("ReadError", list = new ArrayList<Throwable>()); list.add(e); }
public static void addErrorInContext(UnmarshallingContext context, Throwable e) { ArrayList<Throwable> list = (ArrayList<Throwable>)context.get("ReadError"); if (list == null) context.put("ReadError", list = new ArrayList<Throwable>()); list.add(e); }
public static void addErrorInContext(UnmarshallingContext context, Throwable e) { ArrayList<Throwable> list = (ArrayList<Throwable>)context.get("ReadError"); if (list == null) context.put("ReadError", list = new ArrayList<Throwable>()); list.add(e); }
public static void addErrorInContext(UnmarshallingContext context, Throwable e) { ArrayList<Throwable> list = (ArrayList<Throwable>)context.get("ReadError"); if (list == null) context.put("ReadError", list = new ArrayList<Throwable>()); list.add(e); }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { Data result = new Data (); // @see the ColumnNames converter as this is added to the context there. ColumnNames columnNames = (ColumnNames) context.get(ColumnNames.COLUMN_NAMES); if (columnNames == null) throw new NullPointerException("Null columnNames reference retrieved from the context."); log.info ("columnNames: " + columnNames); processDatumArray (columnNames, result, reader, context); return result; }
protected List<String> readSupportedBridgeTypeUIDs(NodeIterator nodeIterator, UnmarshallingContext context) { Object nextNode = nodeIterator.next("supported-bridge-type-refs", false); if (nextNode != null) { String bindingID = (String) context.get("thing-descriptions.bindingId"); String uidFormat = String.format("%s:%s", bindingID, "%s"); return ((NodeList) nextNode).getAttributes("bridge-type-ref", "id", uidFormat); } return null; }
protected List<String> readSupportedBridgeTypeUIDs(NodeIterator nodeIterator, UnmarshallingContext context) { Object nextNode = nodeIterator.next("supported-bridge-type-refs", false); if (nextNode != null) { String bindingID = (String) context.get("thing-descriptions.bindingId"); String uidFormat = String.format("%s:%s", bindingID, "%s"); return ((NodeList) nextNode).getAttributes("bridge-type-ref", "id", uidFormat); } return null; }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { Content owner = (Content) context.get("content"); String path = (String) context.get("path"); String id = reader.getAttribute("id"); ComponentList list = new ComponentList(owner, id, path); ComponentList parentList = (ComponentList) context.get("list"); context.put("list", list); populateCollection(reader, context, list); context.put("list", parentList); return list; }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { Content owner = (Content) context.get("content"); String id = reader.getAttribute("id"); ContentMap map = new ContentMapImpl(owner, id); populateMap(reader, context, map); return map; }
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { if (context.get(IN_NESTED)==null) { context.put(IN_NESTED,true); try { return super.unmarshal(reader,context); } finally { context.put(IN_NESTED,false); } } else return leafLabelConverter.unmarshal(reader,context); }
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { if (context.get(IN_NESTED) == null) { context.put(IN_NESTED, true); try { return super.unmarshal(reader, context); } finally { context.put(IN_NESTED, false); } } else { return leafLabelConverter.unmarshal(reader, context); } }
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { if (context.get(IN_NESTED)==null) { context.put(IN_NESTED,true); try { return super.unmarshal(reader,context); } finally { context.put(IN_NESTED,false); } } else return leafLabelConverter.unmarshal(reader,context); }
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { if (context.get(IN_NESTED)==null) { context.put(IN_NESTED,true); try { return super.unmarshal(reader,context); } finally { context.put(IN_NESTED,false); } } else return leafLabelConverter.unmarshal(reader,context); }
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { if (context.get(IN_NESTED)==null) { context.put(IN_NESTED,true); try { return super.unmarshal(reader,context); } finally { context.put(IN_NESTED,false); } } else return leafLabelConverter.unmarshal(reader,context); }
public Object unmarshal(final HierarchicalStreamReader reader, final UnmarshallingContext context) { TreeStringBuilder builder = (TreeStringBuilder)context.get(TreeStringBuilder.class); if (builder == null) { context.put(TreeStringBuilder.class, builder = new TreeStringBuilder()); // dedup at the end final TreeStringBuilder _builder = builder; context.addCompletionCallback(new Runnable() { public void run() { _builder.dedup(); } }, 0); } return builder.intern(reader.getValue()); }
public Object unmarshal(final HierarchicalStreamReader reader, final UnmarshallingContext context) { TreeStringBuilder builder = (TreeStringBuilder)context.get(TreeStringBuilder.class); if (builder == null) { context.put(TreeStringBuilder.class, builder = new TreeStringBuilder()); // dedup at the end final TreeStringBuilder _builder = builder; context.addCompletionCallback(new Runnable() { public void run() { _builder.dedup(); } }, 0); } return builder.intern(reader.getValue()); }