Class XMLInjector
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.eclipse.m2m.atl.engine.injectors.xml.XMLInjector
- All Implemented Interfaces:
Injector
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
endElement
(String uri, String localName, String qName) void
void
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.inject
(ASMModel target, InputStream source, Map params) Performs the injection.Performs the injection.void
performImportation
(ASMModel format, ASMModel extent, InputStream in, String other) void
setDocumentLocator
(Locator locator) void
startElement
(String uri, String localName, String qName, 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
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
XMLInjector
public XMLInjector()
-
-
Method Details
-
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
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:
IOException
-
inject
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:
IOException
-
getPrefix
-
performImportation
public void performImportation(ASMModel format, ASMModel extent, InputStream in, String other) throws IOException - Specified by:
performImportation
in interfaceInjector
- Throws:
IOException
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classDefaultHandler
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
error
- Specified by:
error
in interfaceErrorHandler
- Overrides:
error
in classDefaultHandler
-
fatalError
- Specified by:
fatalError
in interfaceErrorHandler
- Overrides:
fatalError
in classDefaultHandler
-