org.eclipse.m2m.atl.engine.injectors.xml
Class XMLInjector
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.eclipse.m2m.atl.engine.injectors.xml.XMLInjector
- All Implemented Interfaces:
- Injector, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
public class XMLInjector
- extends org.xml.sax.helpers.DefaultHandler
- implements Injector
Method Summary |
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. |
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)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLInjector
public XMLInjector()
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 interface Injector
- 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 interface Injector
- 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
getPrefix
public java.lang.String getPrefix()
- Specified by:
getPrefix
in interface Injector
performImportation
public void performImportation(ASMModel format,
ASMModel extent,
java.io.InputStream in,
java.lang.String other)
throws java.io.IOException
- Specified by:
performImportation
in interface Injector
- Throws:
java.io.IOException
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
- Specified by:
setDocumentLocator
in interface org.xml.sax.ContentHandler
- Overrides:
setDocumentLocator
in class org.xml.sax.helpers.DefaultHandler
characters
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
characters
in interface org.xml.sax.ContentHandler
- Overrides:
characters
in class org.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 interface org.xml.sax.ContentHandler
- Overrides:
startElement
in class org.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 interface org.xml.sax.ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
error
public void error(org.xml.sax.SAXParseException e)
- Specified by:
error
in interface org.xml.sax.ErrorHandler
- Overrides:
error
in class org.xml.sax.helpers.DefaultHandler
fatalError
public void fatalError(org.xml.sax.SAXParseException e)
- Specified by:
fatalError
in interface org.xml.sax.ErrorHandler
- Overrides:
fatalError
in class org.xml.sax.helpers.DefaultHandler