Package io.tiledb.java.api
Class TileDBObjectIterator
- java.lang.Object
-
- io.tiledb.java.api.TileDBObjectIterator
-
public class TileDBObjectIterator extends java.lang.Object
Enables listing TileDB objects in a directory or walking recursively an entire directory tree.
-
-
Constructor Summary
Constructors Constructor Description TileDBObjectIterator(Context ctx, boolean group, boolean array, boolean kv, boolean recursive, WalkOrder walkOrder, java.lang.String root)
Constructs a TileDB Object Iterator, allowing to subselect over certain TileDB object typesTileDBObjectIterator(Context ctx, java.lang.String root)
Creates an object iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<TileDBObject>
getAllObjects()
WalkOrder
getWalkOrder()
boolean
isArray()
boolean
isGroup()
boolean
isKv()
void
setArray(boolean array)
void
setGroup(boolean group)
void
setIteratorPolicy(boolean group, boolean array, boolean kv)
Determines whether group, array and key-value objects will be iterated on during the walk.void
setKv(boolean kv)
void
setNonRecursive()
Disables recursive traversal.void
setRecursive()
Specifies that the iteration will be over all the directories in the tree rooted at `root`.void
setRecursive(WalkOrder walkOrder)
Specifies that the iteration will be over all the directories in the tree rooted at `root`.void
setWalkOrder(WalkOrder walkOrder)
-
-
-
Constructor Detail
-
TileDBObjectIterator
public TileDBObjectIterator(Context ctx, java.lang.String root)
Creates an object iterator. Unless `set_recursive` is invoked, this iterator will iterate only over the children of `root`. It will also retrieve only TileDB-related objects.- Parameters:
ctx
- The TileDB context.root
- The root directory where the iteration will begin.
-
TileDBObjectIterator
public TileDBObjectIterator(Context ctx, boolean group, boolean array, boolean kv, boolean recursive, WalkOrder walkOrder, java.lang.String root)
Constructs a TileDB Object Iterator, allowing to subselect over certain TileDB object types- Parameters:
ctx
- The TileDB context.group
- If `true`, groups will be considered.array
- If `true`, arrays will be considered.kv
- If `true`, key-values will be considered.recursive
- If `true`, the object will be listed for all nested folders.walkOrder
- The walk order.root
- The root directory where the iteration will begin.
-
-
Method Detail
-
setIteratorPolicy
public void setIteratorPolicy(boolean group, boolean array, boolean kv)
Determines whether group, array and key-value objects will be iterated on during the walk. The default (if the function is not invoked) is `true` for all objects.- Parameters:
group
- If `true`, groups will be considered.array
- If `true`, arrays will be considered.kv
- If `true`, key-values will be considered.
-
setRecursive
public void setRecursive(WalkOrder walkOrder)
Specifies that the iteration will be over all the directories in the tree rooted at `root`.- Parameters:
walkOrder
- The walk order.
-
setRecursive
public void setRecursive()
Specifies that the iteration will be over all the directories in the tree rooted at `root`. Default order is preorder
-
setNonRecursive
public void setNonRecursive()
Disables recursive traversal.
-
isGroup
public boolean isGroup()
-
setGroup
public void setGroup(boolean group)
-
isArray
public boolean isArray()
-
setArray
public void setArray(boolean array)
-
isKv
public boolean isKv()
-
setKv
public void setKv(boolean kv)
-
getWalkOrder
public WalkOrder getWalkOrder()
-
getAllObjects
public java.util.List<TileDBObject> getAllObjects() throws TileDBError
- Throws:
TileDBError
-
setWalkOrder
public void setWalkOrder(WalkOrder walkOrder)
-
-