public class RouteXml extends Object
| Modifier and Type | Field and Description |
|---|---|
protected DocumentBuilder |
documentBuilder |
static org.slf4j.Logger |
LOG |
protected TransformerFactory |
transformerFactory |
| Constructor and Description |
|---|
RouteXml() |
| Modifier and Type | Method and Description |
|---|---|
protected de.pdark.decentxml.Node |
cloneAndReplaceNamespace(de.pdark.decentxml.Node node,
String oldNS,
String newNS) |
void |
copyRoutesToElement(org.apache.camel.CamelContext context,
org.apache.camel.spring.CamelContextFactoryBean contextElement) |
void |
copyRoutesToElement(List<org.apache.camel.model.RouteDefinition> routeDefinitionList,
org.apache.camel.spring.CamelContextFactoryBean contextElement) |
protected DocumentBuilder |
createDocumentBuilder() |
protected de.pdark.decentxml.Document |
createExemplarDoc() |
protected DocumentBuilder |
documentBuilder(ErrorHandler handler) |
JAXBContext |
jaxbContext() |
void |
marshal(File file,
org.apache.camel.CamelContext context) |
void |
marshal(File file,
org.apache.camel.spring.CamelContextFactoryBean context) |
void |
marshal(File file,
List<org.apache.camel.model.RouteDefinition> routeDefinitionList)
Loads the given file then updates the route definitions from the given list then stores the file again
|
void |
marshal(File file,
io.fabric8.camel.tooling.util.RouteXml.Model2Model transformer) |
void |
marshal(File file,
XmlModel model) |
void |
marshalToDoc(XmlModel model)
Marshals the model to XML and updates the model's doc property to contain the
new marshalled model
|
String |
marshalToText(String text,
List<org.apache.camel.model.RouteDefinition> routeDefinitionList) |
String |
marshalToText(String text,
io.fabric8.camel.tooling.util.RouteXml.Model2Model transformer) |
String |
marshalToText(XmlModel model) |
protected void |
replaceCamelElement(de.pdark.decentxml.Element docElem,
de.pdark.decentxml.Node camelElem,
de.pdark.decentxml.Node oldNode) |
protected de.pdark.decentxml.Node |
replaceNamespace(de.pdark.decentxml.Node node,
String oldNS,
String newNS) |
void |
setJaxbContext(JAXBContext jaxbContext) |
XmlModel |
unmarshal(de.pdark.decentxml.Document doc) |
XmlModel |
unmarshal(de.pdark.decentxml.Document doc,
String message) |
XmlModel |
unmarshal(File file) |
XmlModel |
unmarshal(String text) |
void |
writeXml(de.pdark.decentxml.Document doc,
File file) |
public static org.slf4j.Logger LOG
protected TransformerFactory transformerFactory
protected DocumentBuilder documentBuilder
protected DocumentBuilder documentBuilder(ErrorHandler handler)
public JAXBContext jaxbContext() throws JAXBException
JAXBExceptionpublic void setJaxbContext(JAXBContext jaxbContext)
protected de.pdark.decentxml.Document createExemplarDoc()
throws IOException
IOExceptionpublic XmlModel unmarshal(de.pdark.decentxml.Document doc) throws Exception
Exceptionpublic XmlModel unmarshal(de.pdark.decentxml.Document doc, String message) throws Exception
Exceptionprotected de.pdark.decentxml.Node cloneAndReplaceNamespace(de.pdark.decentxml.Node node,
String oldNS,
String newNS)
protected de.pdark.decentxml.Node replaceNamespace(de.pdark.decentxml.Node node,
String oldNS,
String newNS)
public void marshal(File file, org.apache.camel.spring.CamelContextFactoryBean context) throws Exception
Exceptionpublic void marshal(File file, org.apache.camel.CamelContext context) throws Exception
Exceptionpublic void copyRoutesToElement(List<org.apache.camel.model.RouteDefinition> routeDefinitionList, org.apache.camel.spring.CamelContextFactoryBean contextElement)
public void copyRoutesToElement(org.apache.camel.CamelContext context,
org.apache.camel.spring.CamelContextFactoryBean contextElement)
public void marshal(File file, List<org.apache.camel.model.RouteDefinition> routeDefinitionList) throws Exception
Exceptionpublic void marshal(File file, io.fabric8.camel.tooling.util.RouteXml.Model2Model transformer) throws Exception
Exceptionpublic String marshalToText(String text, List<org.apache.camel.model.RouteDefinition> routeDefinitionList) throws Exception
Exceptionpublic String marshalToText(String text, io.fabric8.camel.tooling.util.RouteXml.Model2Model transformer) throws Exception
Exceptionpublic void marshal(File file, XmlModel model) throws JAXBException, IOException
JAXBExceptionIOExceptionpublic String marshalToText(XmlModel model) throws JAXBException, IOException
JAXBExceptionIOExceptionprotected void replaceCamelElement(de.pdark.decentxml.Element docElem,
de.pdark.decentxml.Node camelElem,
de.pdark.decentxml.Node oldNode)
public void marshalToDoc(XmlModel model) throws JAXBException
model - JAXBExceptionpublic void writeXml(de.pdark.decentxml.Document doc,
File file)
throws IOException
IOExceptionprotected DocumentBuilder createDocumentBuilder()
Copyright © 2011–2014 Red Hat. All rights reserved.