public class Document extends Object implements IResource, IWithAnnotations, Iterable<IResource>
COPY_ALL, COPY_CONTENT, COPY_PROPERTIES, COPY_SEGMENTATION, COPY_SEGMENTED_CONTENT, CREATE_EMPTY| Constructor and Description |
|---|
Document() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResource(IResource resource) |
<A extends IAnnotation> |
getAnnotation(Class<A> annotationType)
Gets the annotation object for a given class for this resource.
|
Annotations |
getAnnotations()
Gets the iterable list of the annotations for this resource.
|
String |
getId()
Gets the identifier of the resource.
|
ISkeleton |
getSkeleton()
Always throws an exception as there is never a skeleton associated to a RawDocument.
|
Iterator<IResource> |
iterator() |
void |
setAnnotation(IAnnotation annotation)
Sets an annotation object for this resource.
|
void |
setId(String id)
Sets the identifier of this resource.
|
void |
setSkeleton(ISkeleton skeleton)
This method has no effect as there is never a skeleton for a Document.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopyforEach, spliteratorpublic void addResource(IResource resource)
public <A extends IAnnotation> A getAnnotation(Class<A> annotationType)
IWithAnnotationsgetAnnotation in interface IWithAnnotationsA - the type of the class.annotationType - the class of the annotation object to retrieve.public String getId()
IResourcepublic ISkeleton getSkeleton()
getSkeleton in interface IResourceOkapiNotImplementedException - this method is not implemented.public void setAnnotation(IAnnotation annotation)
IWithAnnotationssetAnnotation in interface IWithAnnotationsannotation - the annotation object to set.public void setId(String id)
IResourcesetId in interface IResourceid - the new identifier value.IResource.getId()public void setSkeleton(ISkeleton skeleton)
setSkeleton in interface IResourceskeleton - the skeleton.OkapiNotImplementedException - this method is not implemented.public Annotations getAnnotations()
IWithAnnotationsgetAnnotations in interface IWithAnnotationsCopyright © 2021. All rights reserved.