Package org.apache.openjpa.lib.meta
Class MetaDataIteratorChain
- java.lang.Object
 - 
- org.apache.openjpa.lib.meta.MetaDataIteratorChain
 
 
- 
- All Implemented Interfaces:
 MetaDataIterator,Closeable
- Direct Known Subclasses:
 ClasspathMetaDataIterator
public class MetaDataIteratorChain extends Object implements MetaDataIterator
Metadata iterator that combines several iterators.- Author:
 - Abe White
 
 
- 
- 
Constructor Summary
Constructors Constructor Description MetaDataIteratorChain()Default constructor.MetaDataIteratorChain(MetaDataIterator itr1, MetaDataIterator itr2)Combine two iterators. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIterator(MetaDataIterator itr)Add an iterator to the chain.voidclose()Close the resources used by this iterator.FilegetFile()Return the last-iterated metadata resource content as a file, or null if not an extant file.InputStreamgetInputStream()Return the last-iterated metadata resource content as a stream.booleanhasNext()Return whether there is another resource to iterate over.Objectnext()Return the next metadata resource. 
 - 
 
- 
- 
Constructor Detail
- 
MetaDataIteratorChain
public MetaDataIteratorChain()
Default constructor. 
- 
MetaDataIteratorChain
public MetaDataIteratorChain(MetaDataIterator itr1, MetaDataIterator itr2)
Combine two iterators. 
 - 
 
- 
Method Detail
- 
addIterator
public void addIterator(MetaDataIterator itr)
Add an iterator to the chain. 
- 
hasNext
public boolean hasNext() throws IOExceptionDescription copied from interface:MetaDataIteratorReturn whether there is another resource to iterate over.- Specified by:
 hasNextin interfaceMetaDataIterator- Throws:
 IOException
 
- 
next
public Object next() throws IOException
Description copied from interface:MetaDataIteratorReturn the next metadata resource.- Specified by:
 nextin interfaceMetaDataIterator- Throws:
 IOException
 
- 
getInputStream
public InputStream getInputStream() throws IOException
Description copied from interface:MetaDataIteratorReturn the last-iterated metadata resource content as a stream.- Specified by:
 getInputStreamin interfaceMetaDataIterator- Throws:
 IOException
 
- 
getFile
public File getFile() throws IOException
Description copied from interface:MetaDataIteratorReturn the last-iterated metadata resource content as a file, or null if not an extant file.- Specified by:
 getFilein interfaceMetaDataIterator- Throws:
 IOException
 
- 
close
public void close()
Description copied from interface:MetaDataIteratorClose the resources used by this iterator.- Specified by:
 closein interfaceCloseable- Specified by:
 closein interfaceMetaDataIterator
 
 - 
 
 -