/** * Serialize a sequence of Java objects into a YAML stream. * * @param data * Iterator with Objects * @param output * stream to write to */ public void dumpAll(Iterator<? extends Object> data, Writer output) { dumpAll(data, output, null); }
/** * Serialize a Java object into a YAML String. * * @param data * Java object to be Serialized to YAML * @return YAML String */ public String dump(Object data) { List<Object> list = new ArrayList<Object>(1); list.add(data); return dumpAll(list.iterator()); }
/** * Serialize a sequence of Java objects into a YAML String. * * @param data * Iterator with Objects * @return YAML String with all the objects in proper sequence */ public String dumpAll(Iterator<? extends Object> data) { StringWriter buffer = new StringWriter(); dumpAll(data, buffer, null); return buffer.toString(); }
/** * Serialize a Java object into a YAML stream. * * @param data * Java object to be serialized to YAML * @param output * stream to write to */ public void dump(Object data, Writer output) { List<Object> list = new ArrayList<Object>(1); list.add(data); dumpAll(list.iterator(), output, null); }
list.add(data); StringWriter buffer = new StringWriter(); dumpAll(list.iterator(), buffer, rootTag); representer.setDefaultFlowStyle(oldStyle); return buffer.toString();
/** * Encode the passed {@link StyledLayerDescriptor} as YSLD. * * @param sld * @throws IOException */ public void encode(StyledLayerDescriptor sld) throws IOException { DumperOptions dumpOpts = new DumperOptions(); dumpOpts.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); Yaml yaml = YamlUtil.getSafeYaml(new YsldRepresenter(uomMapper), dumpOpts); yaml.dumpAll(new RootEncoder(sld), out); } }
/** * Serialize a sequence of Java objects into a YAML stream. * * @param data * Iterator with Objects * @param output * stream to write to */ public void dumpAll(Iterator<? extends Object> data, Writer output) { dumpAll(data, output, null); }
/** * Serialize a sequence of Java objects into a YAML stream. * * @param data * Iterator with Objects * @param output * stream to write to */ public void dumpAll(Iterator<? extends Object> data, Writer output) { dumpAll(data, output, null); }
/** * Serialize a sequence of Java objects into a YAML stream. * * @param data * Iterator with Objects * @param output * stream to write to */ public void dumpAll(Iterator<? extends Object> data, Writer output) { dumpAll(data, output, null); }
/** * Serialize a sequence of Java objects into a YAML String. * * @param data * Iterator with Objects * @return YAML String with all the objects in proper sequence */ public String dumpAll(Iterator<? extends Object> data) { StringWriter buffer = new StringWriter(); dumpAll(data, buffer, null); return buffer.toString(); }
/** * Serialize a sequence of Java objects into a YAML String. * * @param data * Iterator with Objects * @return YAML String with all the objects in proper sequence */ public String dumpAll(Iterator<? extends Object> data) { StringWriter buffer = new StringWriter(); dumpAll(data, buffer, null); return buffer.toString(); }
/** * Serialize a sequence of Java objects into a YAML String. * * @param data * Iterator with Objects * @return YAML String with all the objects in proper sequence */ public String dumpAll(Iterator<? extends Object> data) { StringWriter buffer = new StringWriter(); dumpAll(data, buffer, null); return buffer.toString(); }
/** * Serialize a Java object into a YAML String. * * @param data * Java object to be Serialized to YAML * @return YAML String */ public String dump(Object data) { List<Object> list = new ArrayList<Object>(1); list.add(data); return dumpAll(list.iterator()); }
/** * Serialize a Java object into a YAML stream. * * @param data * Java object to be serialized to YAML * @param output * stream to write to */ public void dump(Object data, Writer output) { List<Object> list = new ArrayList<Object>(1); list.add(data); dumpAll(list.iterator(), output, null); }
/** * Serialize a Java object into a YAML String. * * @param data * Java object to be Serialized to YAML * @return YAML String */ public String dump(Object data) { List<Object> list = new ArrayList<Object>(1); list.add(data); return dumpAll(list.iterator()); }
/** * Takes an Iterator of YAML API objects and returns a YAML string representing all of them * * @param data The list of YAML API objects * @return A String representing the list of YAML API objects. */ public static String dumpAll(Iterator<? extends Object> data) { return getSnakeYaml().dumpAll(data); }
/** * Takes an Iterator of YAML API objects and writes a YAML String representing all of them. * * @param data The list of YAML API objects. * @param output The writer to output the YAML String to. */ public static void dumpAll(Iterator<? extends Object> data, Writer output) { getSnakeYaml().dumpAll(data, output); }
/** * Takes an Iterator of YAML API objects and returns a YAML string representing all of them * * @param data The list of YAML API objects * @return A String representing the list of YAML API objects. */ public static String dumpAll(Iterator<? extends Object> data) { return getSnakeYaml().dumpAll(data); }
/** * Takes an Iterator of YAML API objects and writes a YAML String representing all of them. * * @param data The list of YAML API objects. * @param output The writer to output the YAML String to. */ public static void dumpAll(Iterator<? extends Object> data, Writer output) { getSnakeYaml().dumpAll(data, output); }
/** * Encode the passed {@link StyledLayerDescriptor} as YSLD. * * @param sld * @throws IOException */ public void encode(StyledLayerDescriptor sld) throws IOException { DumperOptions dumpOpts = new DumperOptions(); dumpOpts.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); Yaml yaml = YamlUtil.getSafeYaml(new YsldRepresenter(uomMapper), dumpOpts); yaml.dumpAll(new RootEncoder(sld), out); } }