Class XMLInjector
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.eclipse.m2m.atl.engine.injectors.xml.XMLInjector
-
-
Constructor Summary
Constructors Constructor Description XMLInjector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidendElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)voiderror(org.xml.sax.SAXParseException e)voidfatalError(org.xml.sax.SAXParseException e)java.util.MapgetParameterTypes()returns the list of parameters supported by this injector in the form of a Map with parameter names as keys and type name as value.java.lang.StringgetPrefix()ASMModelElementinject(ASMModel target, java.io.InputStream source, java.util.Map params)Performs the injection.ASMModelElementinject(ASMModel target, java.io.Reader source, java.util.Map params)Performs the injection.voidperformImportation(ASMModel format, ASMModel extent, java.io.InputStream in, java.lang.String other)voidsetDocumentLocator(org.xml.sax.Locator locator)voidstartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
-
-
-
Method Detail
-
getParameterTypes
public java.util.Map getParameterTypes()
Description copied from interface:Injectorreturns the list of parameters supported by this injector in the form of a Map with parameter names as keys and type name as value. Known type names are: "String" "Model"- Specified by:
getParameterTypesin interfaceInjector- Returns:
- the Map of parameter types
-
inject
public ASMModelElement inject(ASMModel target, java.io.InputStream source, java.util.Map params) throws java.io.IOException
Description copied from interface:InjectorPerforms the injection.- Specified by:
injectin interfaceInjector- Parameters:
target- The target model to populate.source- The source InputStream. Alternative source kinds can be passed in params.params- A Map of additional parameters. The key is the name.- Returns:
- The root element of the populated model if it exists, any element else.
- Throws:
java.io.IOException
-
inject
public ASMModelElement inject(ASMModel target, java.io.Reader source, java.util.Map params) throws java.io.IOException
Description copied from interface:InjectorPerforms the injection.- Specified by:
injectin interfaceInjector- Parameters:
target- The target model to populate.source- The source Reader. Alternative source kinds can be passed in params.params- A Map of additional parameters. The key is the name.- Returns:
- The root element of the populated model if it exists, any element else.
- Throws:
java.io.IOException
-
performImportation
public void performImportation(ASMModel format, ASMModel extent, java.io.InputStream in, java.lang.String other) throws java.io.IOException
- Specified by:
performImportationin interfaceInjector- Throws:
java.io.IOException
-
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
- Specified by:
setDocumentLocatorin interfaceorg.xml.sax.ContentHandler- Overrides:
setDocumentLocatorin classorg.xml.sax.helpers.DefaultHandler
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException- Specified by:
charactersin interfaceorg.xml.sax.ContentHandler- Overrides:
charactersin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException- Specified by:
startElementin interfaceorg.xml.sax.ContentHandler- Overrides:
startElementin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException- Specified by:
endElementin interfaceorg.xml.sax.ContentHandler- Overrides:
endElementin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
error
public void error(org.xml.sax.SAXParseException e)
- Specified by:
errorin interfaceorg.xml.sax.ErrorHandler- Overrides:
errorin classorg.xml.sax.helpers.DefaultHandler
-
fatalError
public void fatalError(org.xml.sax.SAXParseException e)
- Specified by:
fatalErrorin interfaceorg.xml.sax.ErrorHandler- Overrides:
fatalErrorin classorg.xml.sax.helpers.DefaultHandler
-
-