uk.apl.jxc.mapper
Class XMLMappingFileIterator
java.lang.Object
uk.apl.jxc.mapper.XMLMappingFileIterator
- All Implemented Interfaces:
- java.util.Iterator
public class XMLMappingFileIterator
- extends java.lang.Object
- implements java.util.Iterator
Provides mappings read from a .properties file. The properties file should
contain five key/value pairs per mapping in the following format:
Key | Value |
MAPPING[sequence].SOURCE | value of sourcePath |
MAPPING[sequence].TARGET | value of targetPath |
MAPPING[sequence].CONDITION | value of condition |
MAPPING[sequence].FUNCTION | value of function |
MAPPING[sequence].DEFAULT | value of defaultValue |
- Author:
- Andrew Leigh
- See Also:
AbstractXMLMapping
,
XMLControl
,
XMLDefault
,
XMLMapping
Constructor Summary |
XMLMappingFileIterator(java.io.File savedMapping)
Constructs a new XMLMappingFileIterator. |
Method Summary |
boolean |
hasNext()
Determines whether or not more mappings are available. |
AbstractXMLMapping |
next()
Returns the next XML mapping in the configuration. |
void |
remove()
Not currently implemented. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAPPING
public static final java.lang.String MAPPING
- See Also:
- Constant Field Values
SOURCE
public static final java.lang.String SOURCE
- See Also:
- Constant Field Values
TARGET
public static final java.lang.String TARGET
- See Also:
- Constant Field Values
CONDITION
public static final java.lang.String CONDITION
- See Also:
- Constant Field Values
FUNCTION
public static final java.lang.String FUNCTION
- See Also:
- Constant Field Values
DEFAULT
public static final java.lang.String DEFAULT
- See Also:
- Constant Field Values
XMLMappingFileIterator
public XMLMappingFileIterator(java.io.File savedMapping)
throws java.io.FileNotFoundException,
java.io.IOException
- Constructs a new XMLMappingFileIterator.
- Parameters:
savedMapping
- a file containing a saved XMLMapper configuration
- Throws:
java.io.FileNotFoundException
- if the file cannot be found
java.io.IOException
- if an error occurs reading the file
InvalidMappingException
- if the mappings found within the file are
invalid
next
public AbstractXMLMapping next()
- Returns the next XML mapping in the configuration.
- Specified by:
next
in interface java.util.Iterator
- Returns:
- the next XML mapping
hasNext
public boolean hasNext()
- Determines whether or not more mappings are available.
- Specified by:
hasNext
in interface java.util.Iterator
- Returns:
- true if more mappings are available, false otherwise
remove
public void remove()
- Not currently implemented.
- Specified by:
remove
in interface java.util.Iterator
Copyright 2010 Andrew Leigh. All Rights Reserved.