T
- rejection-reason typepublic class DualMarksAnnotationReader<T> extends Object implements AnnotationReader<DualMarksAnnotation<T>>
DualMarksAnnotation
s from the file-system.Constructor and Description |
---|
DualMarksAnnotationReader(boolean acceptUnfinished) |
Modifier and Type | Method and Description |
---|---|
boolean |
annotationExistsAt(Path path)
Whether an annotation exists at a particular path on the file-system.
|
Optional<DualMarksAnnotation<T>> |
read(Path path,
OperationContext context)
Reads an annotation, if possible, from the file-system.
|
MarkCollection |
readDefaultMarks(Path path,
OperationContext context)
Reads the annotations as a
MarkCollection from the file-system. |
public DualMarksAnnotationReader(boolean acceptUnfinished)
public Optional<DualMarksAnnotation<T>> read(Path path, OperationContext context) throws InputReadFailedException
AnnotationReader
read
in interface AnnotationReader<DualMarksAnnotation<T>>
path
- a path representing the annotation (or we derive another path from this path).context
- TODOOptional.empty()
if it can't be read.InputReadFailedException
- if the annotation cannot be read successfully.public boolean annotationExistsAt(Path path)
path
- the path.public MarkCollection readDefaultMarks(Path path, OperationContext context) throws DeserializationFailedException
MarkCollection
from the file-system.path
- the path where the annotations are stored.context
- context for reading a stack from the file-system.MarkCollection
deserialized from path
.DeserializationFailedException
- if the deserialization failed.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.