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 void
characters(char[] ch, int start, int length)
void
endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
void
error(org.xml.sax.SAXParseException e)
void
fatalError(org.xml.sax.SAXParseException e)
java.util.Map
getParameterTypes()
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.String
getPrefix()
ASMModelElement
inject(ASMModel target, java.io.InputStream source, java.util.Map params)
Performs the injection.ASMModelElement
inject(ASMModel target, java.io.Reader source, java.util.Map params)
Performs the injection.void
performImportation(ASMModel format, ASMModel extent, java.io.InputStream in, java.lang.String other)
void
setDocumentLocator(org.xml.sax.Locator locator)
void
startElement(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:Injector
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. Known type names are: "String" "Model"- Specified by:
getParameterTypes
in 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:Injector
Performs the injection.- Specified by:
inject
in 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:Injector
Performs the injection.- Specified by:
inject
in 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:
performImportation
in interfaceInjector
- Throws:
java.io.IOException
-
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
- Specified by:
setDocumentLocator
in interfaceorg.xml.sax.ContentHandler
- Overrides:
setDocumentLocator
in classorg.xml.sax.helpers.DefaultHandler
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
- Specified by:
characters
in interfaceorg.xml.sax.ContentHandler
- Overrides:
characters
in 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:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in 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:
endElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
error
public void error(org.xml.sax.SAXParseException e)
- Specified by:
error
in interfaceorg.xml.sax.ErrorHandler
- Overrides:
error
in classorg.xml.sax.helpers.DefaultHandler
-
fatalError
public void fatalError(org.xml.sax.SAXParseException e)
- Specified by:
fatalError
in interfaceorg.xml.sax.ErrorHandler
- Overrides:
fatalError
in classorg.xml.sax.helpers.DefaultHandler
-
-