Class OcflObjectRootDirIterator
- java.lang.Object
-
- edu.wisc.library.ocfl.core.storage.OcflObjectRootDirIterator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<String>
- Direct Known Subclasses:
CloudOcflObjectRootDirIterator,FileSystemOcflObjectRootDirIterator
public abstract class OcflObjectRootDirIterator extends Object implements Iterator<String>, Closeable
Iterator that iterates over OCFL object root directories. Object roots are identified by the presence of a file that's prefixed with '0=ocfl_object'.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceOcflObjectRootDirIterator.DirectoryEncapsulates a directory for iterating over its children
-
Field Summary
Fields Modifier and Type Field Description protected static StringOCFL_OBJECT_MARKER_PREFIX
-
Constructor Summary
Constructors Constructor Description OcflObjectRootDirIterator(String start)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()protected abstract OcflObjectRootDirIterator.DirectorycreateDirectory(String path)Creates an object to maintain directory statebooleanhasNext()protected abstract booleanisObjectRoot(String path)Indicates if a directory path is an object root pathStringnext()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Field Detail
-
OCFL_OBJECT_MARKER_PREFIX
protected static final String OCFL_OBJECT_MARKER_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OcflObjectRootDirIterator
public OcflObjectRootDirIterator(String start)
-
-
Method Detail
-
isObjectRoot
protected abstract boolean isObjectRoot(String path)
Indicates if a directory path is an object root path- Parameters:
path- directory path- Returns:
- true if path is an object root path
-
createDirectory
protected abstract OcflObjectRootDirIterator.Directory createDirectory(String path)
Creates an object to maintain directory state- Parameters:
path- directory path- Returns:
- directory object
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-