/** * Encodes this context into its XML representation and writes this * encoding to the given <code>OutputStream</code> with no * indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Encodes this class into its XML representation and writes this * encoding to the given <code>OutputStream</code> with indentation. * * @param output a stream into which the XML-encoded data is written * @param indenter an object that creates indentation strings */ public void encode(OutputStream output, Indenter indenter) { PrintStream out = new PrintStream(output); String indent = indenter.makeString(); out.println(indent + "<VariableDefinition VariableId=\"" + variableId + "\">"); indenter.in(); expression.encode(output, indenter); out.println("</VariableDefinition>"); indenter.out(); }
/** * Encodes this class into its XML representation and writes this * encoding to the given <code>OutputStream</code> with indentation. * * @param output a stream into which the XML-encoded data is written * @param indenter an object that creates indentation strings */ public void encode(OutputStream output, Indenter indenter) { PrintStream out = new PrintStream(output); String indent = indenter.makeString(); out.println(indent + "<VariableReference VariableId=\"" + variableId + "\"/>"); }
/** * Encodes this <code>MapFunction</code> into its XML representation and * writes this encoding to the given <code>OutputStream</code> with * indentation. * * @param output a stream into which the XML-encoded data is written * @param indenter an object that creates indentation strings */ public void encode(OutputStream output, Indenter indenter) { PrintStream out = new PrintStream(output); out.println(indenter.makeString() + "<Function FunctionId=\"" + NAME_MAP + "\"/>"); }
/** * Encodes the object in XML */ private void encodeStatusCode(PrintStream out, Indenter indenter, Iterator iterator) { String in = indenter.makeString(); String code = (String)(iterator.next()); if (iterator.hasNext()) { indenter.in(); out.println(in + "<StatusCode Value=\"" + code + "\">"); encodeStatusCode(out, indenter, iterator); out.println(in + "</StatusCode>"); indenter.out(); } else { out.println(in + "<StatusCode Value=\"" + code + "\"/>"); } }
/** * Encodes this context into its XML representation and writes this * encoding to the given <code>OutputStream</code>. No * indentation is used. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Encodes this selector into its XML representation and * writes this encoding to the given <code>OutputStream</code> with * indentation. * * @param output a stream into which the XML-encoded data is written * @param indenter an object that creates indentation strings */ public void encode(OutputStream output, Indenter indenter) { PrintStream out = new PrintStream(output); String indent = indenter.makeString(); String tag = "<AttributeSelector RequestContextPath=\"" + contextPath + "\" DataType=\"" + type.toString() + "\""; if (mustBePresent) tag += " MustBePresent=\"true\""; tag += "/>"; out.println(indent + tag); }
public void encode(OutputStream output, Indenter indenter, String nsURI) { // Make a PrintStream for a nicer printing interface PrintStream out = new PrintStream(output); // Prepare the indentation string String topIndent = indenter.makeString(); out.println(topIndent + "<Response xmlns='"+nsURI+"'>"); // Now write the XML... // Go through all results Iterator it = results.iterator(); indenter.in(); while (it.hasNext()) { Result result = (Result)(it.next()); result.encode(out, indenter); } indenter.out(); // Finish the XML for a response out.println(topIndent + "</Response>"); } }
/** * Encodes this <code>Target</code> into its XML representation and writes * this encoding to the given <code>OutputStream</code> with no * indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
@Override public void encode(OutputStream output, Indenter indenter) { // setup the formatting & outstream stuff String indent = indenter.makeString(); PrintStream out = new PrintStream(output); // write out the encoded form out.append(indent); encodeToStream(out); }
/** * Encodes this <code>TargetMatchGroup</code> into its XML representation * and writes this encoding to the given <code>OutputStream</code> with * indentation. * * @param output a stream into which the XML-encoded data is written * @param indenter an object that creates indentation strings */ public void encode(OutputStream output, Indenter indenter) { PrintStream out = new PrintStream(output); String indent = indenter.makeString(); Iterator it = matches.iterator(); String name = TargetMatch.NAMES[matchType]; out.println(indent + "<" + name + ">"); indenter.in(); while (it.hasNext()) { TargetMatch tm = (TargetMatch)(it.next()); tm.encode(output, indenter); } out.println(indent + "</" + name + ">"); indenter.out(); }
/** * Encodes this status data into its XML representation and writes * this encoding to the given <code>OutputStream</code> with no * indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Encodes this <code>HigherOrderFunction</code> into its XML * representation and writes this encoding to the given * <code>OutputStream</code> with indentation. * * @param output a stream into which the XML-encoded data is written * @param indenter an object that creates indentation strings */ public void encode(OutputStream output, Indenter indenter) { PrintStream out = new PrintStream(output); out.println(indenter.makeString() + "<Function FunctionId=\"" + getIdentifier().toString() + "\"/>"); }
/** * Encodes this status data into its XML representation and writes * this encoding to the given <code>OutputStream</code> with * indentation. * * @param output a stream into which the XML-encoded data is written * @param indenter an object that creates indentation strings */ public void encode(OutputStream output, Indenter indenter) { PrintStream out = new PrintStream(output); String indent = indenter.makeString(); out.println(indent + "<Status>"); indenter.in(); encodeStatusCode(out, indenter, code.iterator()); if (message != null) out.println(indenter.makeString() + "<StatusMessage>" + message + "</StatusMessage>"); if (detail != null) out.println(detail.getEncoded()); indenter.out(); out.println(indent + "</Status>"); }
/** * Encodes this <code>Policy</code> into its XML representation and writes * this encoding to the given <code>OutputStream</code> with no * indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
@Override public void encode(OutputStream output, Indenter indenter) { // setup the formatting & outstream stuff String indent = indenter.makeString(); PrintStream out = new PrintStream(output); // write out the encoded form out.append(indent); encodeToStream(out); }
/** * Private helper that encodes the parameters based on the type */ private void encodeParamaters(OutputStream output, Indenter indenter, String prefix, String id) { PrintStream out = new PrintStream(output); String indent = indenter.makeString(); Iterator it = getParameters().iterator(); out.println(indent + "<" + prefix + "CombinerParameters " + prefix + "IdRef=\"" + id + "\">"); indenter.in(); while (it.hasNext()) { CombinerParameter param = (CombinerParameter)(it.next()); param.encode(output, indenter); } out.println(indent + "</" + prefix + "CombinerParameters>"); indenter.out(); }
/** * Encodes this <code>Result</code> into its XML form and writes this * out to the provided <code>OutputStream<code> with no indentation. * * @param output a stream into which the XML-encoded data is written */ public void encode(OutputStream output) { encode(output, new Indenter(0)); }
/** * Encodes this <code>FunctionBase</code> into its XML representation and * writes this encoding to the given <code>OutputStream</code> with * indentation. * * @param output a stream into which the XML-encoded data is written * @param indenter an object that creates indentation strings */ public void encode(OutputStream output, Indenter indenter) { PrintStream out = new PrintStream(output); out.println(indenter.makeString() + "<Function FunctionId=\"" + getFunctionName() + "\"/>"); }
/** * Encodes this context into its XML representation and writes * this encoding to the given <code>OutputStream</code> with * indentation. * * @param output a stream into which the XML-encoded data is written * @param indenter an object that creates indentation strings */ public void encode(OutputStream output, Indenter indenter) { // Make a PrintStream for a nicer printing interface PrintStream out = new PrintStream(output); // Prepare the indentation string String indent = indenter.makeString(); // Now write the XML... out.println(indent + "<Response>"); // Go through all results Iterator it = results.iterator(); indenter.in(); while (it.hasNext()) { Result result = (Result)(it.next()); result.encode(out, indenter); } indenter.out(); // Finish the XML for a response out.println(indent + "</Response>"); }