public class Annotator extends Object implements com.aspose.ms.System.IDisposable, Closeable
Represents main class that controls document annotating process.
Constructor and Description |
---|
Annotator(InputStream document)
Initialise annotator class which accept document stream
|
Annotator(InputStream document,
AnnotatorSettings settings)
Initialise annotator class which accept document stream
|
Annotator(InputStream document,
LoadOptions loadOptions)
Initialise annotator class which accept document stream
|
Annotator(InputStream document,
LoadOptions loadOptions,
AnnotatorSettings settings)
Initialise annotator class which accept document stream
|
Annotator(com.aspose.ms.System.IO.Stream document) |
Annotator(com.aspose.ms.System.IO.Stream document,
AnnotatorSettings settings) |
Annotator(com.aspose.ms.System.IO.Stream document,
LoadOptions loadOptions) |
Annotator(com.aspose.ms.System.IO.Stream document,
LoadOptions loadOptions,
AnnotatorSettings settings) |
Annotator(String filePath)
Initialise annotator class which accept document path
|
Annotator(String filePath,
AnnotatorSettings settings)
Initialise annotator class which accept document path
|
Annotator(String filePath,
LoadOptions loadOptions)
Initialise annotator class which accept document path
|
Annotator(String filePath,
LoadOptions loadOptions,
AnnotatorSettings settings)
Initialise annotator class which accept document path
|
Modifier and Type | Method and Description |
---|---|
void |
add(AnnotationBase annotation)
Adds annotation to document
|
void |
add(List<AnnotationBase> annotations)
Adds collection of annotations to a document.
|
void |
close() |
void |
dispose()
Dispose
|
List<AnnotationBase> |
get()
Gets collections of document annotations.
|
List<AnnotationBase> |
get(int type)
Gets collection of document annotations by annotation type.
|
Document |
getDocument()
Document
|
List<AnnotationBase> |
getVersion(Object version)
Get annotations from versions.
|
List<Object> |
getVersionsList()
Get versions.
|
void |
remove(AnnotationBase annotation)
Removes annotation from document.
|
void |
remove(int annotationId)
Removes annotation from document by Id.
|
void |
remove(List<Integer> annotationIds)
Removes collection of annotations from document by provided annotation
ids.
|
void |
removeInternal(List<AnnotationBase> annotationsToDelete)
Removes collection of annotations from document.
|
void |
save()
Saves document after adding, updating or removing annotations.
|
void |
save(InputStream document)
Saves document after adding, updating or removing annotations.
|
void |
save(InputStream document,
SaveOptions saveOptions)
Saves document after adding, updating or removing annotations.
|
void |
save(SaveOptions saveOptions)
Saves document after adding, updating or removing annotations.
|
void |
save(String filePath)
Saves document after adding, updating or removing annotations.
|
void |
save(String filePath,
SaveOptions saveOptions)
Saves document after adding, updating or removing annotations.
|
void |
saveInternal(com.aspose.ms.System.IO.Stream document,
SaveOptions saveOptions) |
void |
update(AnnotationBase newAnnotation)
Updates document annotation.
|
void |
update(List<AnnotationBase> annotations)
Updates collection of document annotations.
|
public Annotator(InputStream document)
Initialise annotator class which accept document stream
document
- Document stream
<b>Learn more</b>
public Annotator(InputStream document, AnnotatorSettings settings)
Initialise annotator class which accept document stream
document
- Document streamsettings
- Annotator settings
<b>Learn more</b>
public Annotator(InputStream document, LoadOptions loadOptions)
Initialise annotator class which accept document stream
document
- Document streamloadOptions
- Load options
<b>Learn more</b>
public Annotator(InputStream document, LoadOptions loadOptions, AnnotatorSettings settings)
Initialise annotator class which accept document stream
document
- Document streamloadOptions
- Load optionssettings
- Annotator settings
<b>Learn more</b>
public Annotator(com.aspose.ms.System.IO.Stream document)
public Annotator(com.aspose.ms.System.IO.Stream document, AnnotatorSettings settings)
public Annotator(com.aspose.ms.System.IO.Stream document, LoadOptions loadOptions)
public Annotator(com.aspose.ms.System.IO.Stream document, LoadOptions loadOptions, AnnotatorSettings settings)
public Annotator(String filePath)
Initialise annotator class which accept document path
filePath
- File path
<b>Learn more</b>
public Annotator(String filePath, AnnotatorSettings settings)
Initialise annotator class which accept document path
filePath
- File pathsettings
- Annotator settings
<b>Learn more</b>
public Annotator(String filePath, LoadOptions loadOptions)
Initialise annotator class which accept document path
filePath
- File pathloadOptions
- Load options
<b>Learn more</b>
public Annotator(String filePath, LoadOptions loadOptions, AnnotatorSettings settings)
Initialise annotator class which accept document path
filePath
- File pathloadOptions
- Load optionssettings
- Annotator settings
<b>Learn more</b>
public final void add(AnnotationBase annotation)
Adds annotation to document
annotation
- The annotation to add.
<b>Learn more</b>
public final void add(List<AnnotationBase> annotations)
Adds collection of annotations to a document.
annotations
- The annotations list to add.
<b>Learn more</b>
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public final void dispose()
Dispose
dispose
in interface com.aspose.ms.System.IDisposable
public final List<AnnotationBase> get()
Gets collections of document annotations.
<b>Learn more</b>
public final List<AnnotationBase> get(int type)
Gets collection of document annotations by annotation type.
type
- The annotations type that must be returned.
<b>Learn more</b>
public final Document getDocument()
Document
public final List<AnnotationBase> getVersion(Object version)
Get annotations from versions.
version
- The version's Key of versions which you want to returnpublic final List<Object> getVersionsList()
Get versions.
public final void remove(AnnotationBase annotation)
Removes annotation from document.
annotation
- Annotation that must be removed.
<b>Learn more</b>
public final void remove(int annotationId)
Removes annotation from document by Id.
annotationId
- The annotation's id that must be removed.
<b>Learn more</b>
public final void remove(List<Integer> annotationIds)
Removes collection of annotations from document by provided annotation ids.
annotationIds
- The annotation's id that must be removed.
<b>Learn more</b>
public final void removeInternal(List<AnnotationBase> annotationsToDelete)
Removes collection of annotations from document.
annotationsToDelete
- The annotations that must be removed.
<b>Learn more</b>
public final void save()
Saves document after adding, updating or removing annotations.
<b>Learn more about saving annotated documents</b>
public final void save(InputStream document)
Saves document after adding, updating or removing annotations.
document
- The output stream.
<b>Learn more about saving annotated documents</b>
public final void save(InputStream document, SaveOptions saveOptions)
Saves document after adding, updating or removing annotations.
document
- The output stream.saveOptions
- The save options.
<b>Learn more about saving annotated documents</b>
public final void save(SaveOptions saveOptions)
Saves document after adding, updating or removing annotations.
saveOptions
- The save options.
<b>Learn more about saving annotated documents</b>
public final void save(String filePath)
Saves document after adding, updating or removing annotations.
filePath
- The output file path.
<b>Learn more about saving annotated documents</b>
public final void save(String filePath, SaveOptions saveOptions)
Saves document after adding, updating or removing annotations.
filePath
- The output file path.saveOptions
- The save options.
<b>Learn more about saving annotated documents</b>
public final void saveInternal(com.aspose.ms.System.IO.Stream document, SaveOptions saveOptions)
public final void update(AnnotationBase newAnnotation)
Updates document annotation.
newAnnotation
- The annotation to update (Id should be provided).
<b>Learn more</b>
public final void update(List<AnnotationBase> annotations)
Updates collection of document annotations.
annotations
- The annotations list that will be set.
<b>Learn more</b>