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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidendElement(String uri, String localName, String qName) voidvoidreturns 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.voidperformImportation(ASMModel format, ASMModel extent, InputStream in, String other) voidsetDocumentLocator(Locator locator) voidstartElement(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, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
XMLInjector
public XMLInjector()
-
-
Method Details
-
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
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:
IOException
-
inject
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:
IOException
-
getPrefix
-
performImportation
public void performImportation(ASMModel format, ASMModel extent, InputStream in, String other) throws IOException - Specified by:
performImportationin interfaceInjector- Parameters:
format-extent-in-other-- Throws:
IOException
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler- Overrides:
setDocumentLocatorin classDefaultHandler
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
error
- Specified by:
errorin interfaceErrorHandler- Overrides:
errorin classDefaultHandler
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler- Overrides:
fatalErrorin classDefaultHandler
-