@Test public void testSetTransformerProperties() throws Exception { for (int i = 0; i < methods.length; i++) { for (int j = 0; j < booleans.length; j++) { for (int k = 0; k < booleans.length; k++) { Properties props = EvaluateXQuery.getTransformerProperties(methods[i], booleans[j], booleans[k]); assertEquals(3, props.size()); assertEquals(methods[i], props.getProperty(OutputKeys.METHOD)); assertEquals(booleans[j] ? "yes" : "no", props.getProperty(OutputKeys.INDENT)); assertEquals(booleans[k] ? "yes" : "no", props.getProperty(OutputKeys.OMIT_XML_DECLARATION)); } } } }
private Properties getTransformerProperties(ProcessContext context) { final String method = context.getProperty(XML_OUTPUT_METHOD).getValue(); boolean indent = context.getProperty(XML_OUTPUT_INDENT).asBoolean(); boolean omitDeclaration = context.getProperty(XML_OUTPUT_OMIT_XML_DECLARATION).asBoolean(); return getTransformerProperties(method, indent, omitDeclaration); }
EvaluateXQuery extends AbstractProcessor { private Properties getTransformerProperties(ProcessContext context) { final String method = context.getProperty(XML_OUTPUT_METHOD).getValue(); boolean indent = context.getProperty(XML_OUTPUT_INDENT).asBoolean(); boolean omitDeclaration = context.getProperty(XML_OUTPUT_OMIT_XML_DECLARATION).asBoolean(); return getTransformerProperties(method, indent, omitDeclaration); } }
EvaluateXQuery extends AbstractProcessor { private Properties getTransformerProperties(ProcessContext context) { final String method = context.getProperty(XML_OUTPUT_METHOD).getValue(); boolean indent = context.getProperty(XML_OUTPUT_INDENT).asBoolean(); boolean omitDeclaration = context.getProperty(XML_OUTPUT_OMIT_XML_DECLARATION).asBoolean(); return getTransformerProperties(method, indent, omitDeclaration); }  }
EvaluateXQuery extends AbstractProcessor { private Properties getTransformerProperties(ProcessContext context) { final String method = context.getProperty(XML_OUTPUT_METHOD).getValue(); boolean indent = context.getProperty(XML_OUTPUT_INDENT).asBoolean(); boolean omitDeclaration = context.getProperty(XML_OUTPUT_OMIT_XML_DECLARATION).asBoolean(); return getTransformerProperties(method, indent, omitDeclaration); }  @Override Set<Relationship> getRelationships(); @Override void onTrigger(final ProcessContext context, final ProcessSession session); }
EvaluateXQuery extends AbstractProcessor { private Properties getTransformerProperties(ProcessContext context) { final String method = context.getProperty(XML_OUTPUT_METHOD).getValue(); boolean indent = context.getProperty(XML_OUTPUT_INDENT).asBoolean(); boolean omitDeclaration = context.getProperty(XML_OUTPUT_OMIT_XML_DECLARATION).asBoolean(); return getTransformerProperties(method, indent, omitDeclaration); }  @Override Set<Relationship> getRelationships(); @Override void onTrigger(final ProcessContext context, final ProcessSession session); static final String DESTINATION_ATTRIBUTE; static final String DESTINATION_CONTENT; static final String OUTPUT_METHOD_XML; static final String OUTPUT_METHOD_HTML; static final String OUTPUT_METHOD_TEXT; static final String UTF8; static final PropertyDescriptor DESTINATION; static final PropertyDescriptor XML_OUTPUT_METHOD; static final PropertyDescriptor XML_OUTPUT_OMIT_XML_DECLARATION; static final PropertyDescriptor XML_OUTPUT_INDENT; static final Relationship REL_MATCH; static final Relationship REL_NO_MATCH; static final Relationship REL_FAILURE; }