uk.apl.jxc.filter
Class XMLFilterCriteriaFileIterator

java.lang.Object
  extended by uk.apl.jxc.filter.XMLFilterCriteriaFileIterator
All Implemented Interfaces:
java.util.Iterator

public class XMLFilterCriteriaFileIterator
extends java.lang.Object
implements java.util.Iterator

Reads criteria from a .properties file. The properties file should contain three key/value pairs per criteria in the following format:

KeyValue
MAPPING[sequence].ELEMENTvalue of elementName
MAPPING[sequence].ACTIONvalue of action
MAPPING[sequence].CONDITIONvalue of condition

Author:
Andrew Leigh
See Also:
XMLFilterCriteria

Field Summary
static java.lang.String ACTION
           
static java.lang.String CONDITION
           
static java.lang.String CRITERIA
           
static java.lang.String ELEMENT
           
 
Constructor Summary
XMLFilterCriteriaFileIterator(java.io.File savedCriteria)
          Constructs a new XMLMappingFileIterator.
 
Method Summary
 boolean hasNext()
          Determines whether or not more criteria are available.
 XMLFilterCriteria next()
          Returns the next XML citeria 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
 

Field Detail

CRITERIA

public static final java.lang.String CRITERIA
See Also:
Constant Field Values

ELEMENT

public static final java.lang.String ELEMENT
See Also:
Constant Field Values

ACTION

public static final java.lang.String ACTION
See Also:
Constant Field Values

CONDITION

public static final java.lang.String CONDITION
See Also:
Constant Field Values
Constructor Detail

XMLFilterCriteriaFileIterator

public XMLFilterCriteriaFileIterator(java.io.File savedCriteria)
                              throws java.io.FileNotFoundException,
                                     java.io.IOException
Constructs a new XMLMappingFileIterator.

Parameters:
savedCriteria - a file containing a saved XMLFilter configuration
Throws:
java.io.FileNotFoundException - if the file cannot be found
java.io.IOException - if an error occurs reading the file
Method Detail

next

public XMLFilterCriteria next()
Returns the next XML citeria in the configuration

Specified by:
next in interface java.util.Iterator
Returns:
the next XML criteria

hasNext

public boolean hasNext()
Determines whether or not more criteria are available.

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if more criteria 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.