net.sourceforge.nrl.parser.type
Class XmlTypeMapping
java.lang.Object
net.sourceforge.nrl.parser.type.TypeMapping
net.sourceforge.nrl.parser.type.XmlTypeMapping
- All Implemented Interfaces:
- ITypeMapping
public class XmlTypeMapping
- extends TypeMapping
A type mapping that can be loaded from and saved to an XML file.
The mapping file format is very simple, and the loading function does not do
any validation - it would just produce an empty mapping if another type of
XML file was passed.
<typeMapping>
<mapping name="ModelElement" package="*" type="String"/>
...
</typeMapping>
Method Summary |
void |
load(File file)
Load the mapping from an XML file. |
void |
load(InputStream stream)
Load the mapping from a stream. |
XmlTypeMapping
public XmlTypeMapping()
load
public void load(File file)
throws Exception
- Load the mapping from an XML file.
- Parameters:
file
- the file
- Throws:
IOException
SAXException
ParserConfigurationException
Exception
load
public void load(InputStream stream)
throws Exception
- Load the mapping from a stream.
- Parameters:
stream
- the stream
- Throws:
IOException
SAXException
ParserConfigurationException
Exception
Copyright © 2006-2010 Christian Nentwich and others