org.fcrepo.test
Class TemplatedResourceIterator
java.lang.Object
org.fcrepo.test.TemplatedResourceIterator
- All Implemented Interfaces:
- Iterator<String>
public class TemplatedResourceIterator
- extends Object
- implements Iterator<String>
Iterator that takes a set of attribute values from a values file
and iterates by repeatedly substituting in the next set of values into the
template
values file format: java properties, with
template.attribute.sets.count=n :
number of sets to iterate over
template.attribute.set.0.someattribute1=value1:
template.attribute.set.0.someattribute2=value2:
when on set iteration 0, substitute $someattribute1$ with value1
and similarly $someattribute2$ with value2
nb: sets are zero-indexed, numbered 0 to count - 1
escape backslashes to \\
- Version:
- $Id$
- Author:
- Stephen Bayliss
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemplatedResourceIterator
public TemplatedResourceIterator(String template,
String valuesFilename)
throws Exception
- Throws:
Exception
TemplatedResourceIterator
public TemplatedResourceIterator(String template,
String valuesFilename,
boolean escapeXML)
throws Exception
- Throws:
Exception
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<String>
next
public String next()
- Specified by:
next in interface Iterator<String>
getAttributeValue
public String getAttributeValue(String attributeName)
remove
public void remove()
- Specified by:
remove in interface Iterator<String>
Copyright © 2012 DuraSpace. All Rights Reserved.