if (isRoot) { processingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); processingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); processingCleanables = deliveryConfig.getVisitCleanables().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { processingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(elementName); processingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(elementName); processingCleanables = deliveryConfig.getVisitCleanables().getMappings(elementName);
if (isRoot) { elementVisitBefores = visitBeforeTable.getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); elementVisitAfters = visitAfterTable.getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { elementVisitBefores = visitBeforeTable.getMappings(elementName); elementVisitAfters = visitAfterTable.getMappings(elementName);
if (isRoot) { processingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); processingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); processingCleanables = deliveryConfig.getVisitCleanables().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { processingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(elementName); processingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(elementName); processingCleanables = deliveryConfig.getVisitCleanables().getMappings(elementName);
if (isRoot) { elementVisitBefores = visitBeforeTable.getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); elementVisitAfters = visitAfterTable.getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { elementVisitBefores = visitBeforeTable.getMappings(elementName); elementVisitAfters = visitAfterTable.getMappings(elementName);
if (isRoot) { processingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); processingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); processingCleanables = deliveryConfig.getVisitCleanables().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { processingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(elementName); processingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(elementName); processingCleanables = deliveryConfig.getVisitCleanables().getMappings(elementName);
if (isRoot) { elementVisitBefores = visitBeforeTable.getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); elementVisitAfters = visitAfterTable.getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { elementVisitBefores = visitBeforeTable.getMappings(elementName); elementVisitAfters = visitAfterTable.getMappings(elementName);
if (isRoot) { elementVisitBefores = visitBeforeTable.getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); elementVisitAfters = visitAfterTable.getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { elementVisitBefores = visitBeforeTable.getMappings(elementName); elementVisitAfters = visitAfterTable.getMappings(elementName);
if (isRoot) { processingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); processingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); processingCleanables = deliveryConfig.getVisitCleanables().getMappings(new String[]{SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { processingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(elementName); processingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(elementName); processingCleanables = deliveryConfig.getVisitCleanables().getMappings(elementName);
public Node filter(Element element) { ContentHandlerConfigMapTable<DOMVisitBefore> visitBefores = deliveryConfig.getAssemblyVisitBefores(); ContentHandlerConfigMapTable<DOMVisitAfter> visitAfters = deliveryConfig.getAssemblyVisitAfters(); globalAssemblyBefores = visitBefores.getMappings(GLOBAL_SELECTORS); globalAssemblyAfters = visitAfters.getMappings(GLOBAL_SELECTORS); globalProcessingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(GLOBAL_SELECTORS); if(globalProcessingBefores != null && globalProcessingBefores.isEmpty()) { globalProcessingBefores = null; globalProcessingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(GLOBAL_SELECTORS); if(globalProcessingAfters != null && globalProcessingAfters.isEmpty()) { globalProcessingAfters = null;
ContentHandlerConfigMapTable<DOMVisitBefore> visitBefores = deliveryConfig.getAssemblyVisitBefores(); ContentHandlerConfigMapTable<DOMVisitAfter> visitAfters = deliveryConfig.getAssemblyVisitAfters(); globalAssemblyBefores = visitBefores.getMappings(GLOBAL_SELECTORS); globalAssemblyAfters = visitAfters.getMappings(GLOBAL_SELECTORS); globalProcessingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(GLOBAL_SELECTORS); if(globalProcessingBefores != null && globalProcessingBefores.isEmpty()) { globalProcessingBefores = null; globalProcessingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(GLOBAL_SELECTORS); if(globalProcessingAfters != null && globalProcessingAfters.isEmpty()) { globalProcessingAfters = null;
elementSUs = serializationUnits.getMappings(new String[] {SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { elementSUs = serializationUnits.getMappings(elementName);
ContentHandlerConfigMapTable<DOMVisitBefore> visitBefores = deliveryConfig.getAssemblyVisitBefores(); ContentHandlerConfigMapTable<DOMVisitAfter> visitAfters = deliveryConfig.getAssemblyVisitAfters(); globalAssemblyBefores = visitBefores.getMappings(GLOBAL_SELECTORS); globalAssemblyAfters = visitAfters.getMappings(GLOBAL_SELECTORS); globalProcessingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(GLOBAL_SELECTORS); if(globalProcessingBefores != null && globalProcessingBefores.isEmpty()) { globalProcessingBefores = null; globalProcessingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(GLOBAL_SELECTORS); if(globalProcessingAfters != null && globalProcessingAfters.isEmpty()) { globalProcessingAfters = null;
ContentHandlerConfigMapTable<DOMVisitBefore> visitBefores = deliveryConfig.getAssemblyVisitBefores(); ContentHandlerConfigMapTable<DOMVisitAfter> visitAfters = deliveryConfig.getAssemblyVisitAfters(); globalAssemblyBefores = visitBefores.getMappings(GLOBAL_SELECTORS); globalAssemblyAfters = visitAfters.getMappings(GLOBAL_SELECTORS); globalProcessingBefores = deliveryConfig.getProcessingVisitBefores().getMappings(GLOBAL_SELECTORS); if(globalProcessingBefores != null && globalProcessingBefores.isEmpty()) { globalProcessingBefores = null; globalProcessingAfters = deliveryConfig.getProcessingVisitAfters().getMappings(GLOBAL_SELECTORS); if(globalProcessingAfters != null && globalProcessingAfters.isEmpty()) { globalProcessingAfters = null;
elementSUs = serializationUnits.getMappings(new String[] {SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { elementSUs = serializationUnits.getMappings(elementName);
elementSUs = serializationUnits.getMappings(new String[] {SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { elementSUs = serializationUnits.getMappings(elementName);
elementSUs = serializationUnits.getMappings(new String[] {SmooksResourceConfiguration.DOCUMENT_FRAGMENT_SELECTOR, elementName}); } else { elementSUs = serializationUnits.getMappings(elementName);
/** * Public constructor. * @param node Node to be serialized. * @param executionContext Target device context. */ public Serializer(Node node, ExecutionContext executionContext) { if(node == null) { throw new IllegalArgumentException("null 'node' arg passed in method call."); } else if(executionContext == null) { throw new IllegalArgumentException("null 'executionContext' arg passed in method call."); } this.node = node; this.executionContext = executionContext; eventListener = executionContext.getEventListener(); // Get the delivery context for the device. deliveryConfig = (DOMContentDeliveryConfig) executionContext.getDeliveryConfig(); // Initialise the serializationUnits member serializationUnits = deliveryConfig.getSerailizationVisitors(); globalSUs = serializationUnits.getMappings(new String[] {"*", "**"}); // Set the default SerializationUnit defaultSerializationOn = ParameterAccessor.getBoolParameter(Filter.DEFAULT_SERIALIZATION_ON, true, executionContext.getDeliveryConfig()); if(defaultSerializationOn) { defaultSerializationUnit = new DefaultSerializationUnit(); boolean rewriteEntities = ParameterAccessor.getBoolParameter(Filter.ENTITIES_REWRITE, true, executionContext.getDeliveryConfig()); defaultSerializationUnit.setRewriteEntities(rewriteEntities); } terminateOnVisitorException = ParameterAccessor.getBoolParameter(Filter.TERMINATE_ON_VISITOR_EXCEPTION, true, executionContext.getDeliveryConfig()); }
globalSUs = serializationUnits.getMappings(new String[] {"*", "**"});
globalSUs = serializationUnits.getMappings(new String[] {"*", "**"});
globalSUs = serializationUnits.getMappings(new String[] {"*", "**"});