org.scijava.annotations
Class AbstractIndexWriter
java.lang.Object
org.scijava.annotations.AbstractIndexWriter
- Direct Known Subclasses:
- AnnotationCombiner, DirectoryIndexer
public abstract class AbstractIndexWriter
- extends Object
Writes annotations as JSON-formatted files.
The file names are the names of the annotations, and the serialized data
describe the class which was annotated together with the specific annotation
fields.
- Author:
- Johannes Schindelin
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractIndexWriter
public AbstractIndexWriter()
foundAnnotations
protected boolean foundAnnotations()
add
protected void add(Map<String,Object> annotationValues,
String annotationName,
String className)
write
protected void write(AbstractIndexWriter.StreamFactory factory)
throws IOException
- Throws:
IOException
merge
protected void merge(String annotationName,
AbstractIndexWriter.StreamFactory factory)
throws IOException
- Merges an existing annotation index into the currently-generated one.
This method is used to read previously-indexed annotations and reconcile
them with the newly-generated ones just.
- Parameters:
annotationName
- the name of the annotation for which the index
contains the annotated classesfactory
- the factory to generate input and output streams given an
annotation name
- Throws:
IOException
adapt
protected Object adapt(Object o)
adapt
protected <A extends Annotation> Map<String,Object> adapt(A annotation)
writeMap
protected void writeMap(PrintStream out,
Object... pairs)
throws IOException
- Throws:
IOException
Copyright © 2009–2014 SciJava. All rights reserved.