Package net.sf.okapi.common
Interface IResource
-
- All Superinterfaces:
Cloneable
,IWithAnnotations
,IWithProperties
,IWithSkeleton
- All Known Subinterfaces:
IMultilingual
,INameable
,ITextUnit
- All Known Implementing Classes:
BaseNameable
,BaseReferenceable
,Custom
,DocumentPart
,Ending
,EndSubfilter
,MultiEvent
,PipelineParameters
,RawDocument
,Segment
,StartDocument
,StartGroup
,StartSubDocument
,StartSubfilter
,StorageList
,TextContainer
,TextPart
,TextUnit
public interface IResource extends IWithProperties, IWithAnnotations, IWithSkeleton, Cloneable
Common set of features all the types of resources associated with events have.
-
-
Field Summary
Fields Modifier and Type Field Description static int
COPY_ALL
static int
COPY_CONTENT
static int
COPY_PROPERTIES
static int
COPY_SEGMENTATION
static int
COPY_SEGMENTED_CONTENT
static int
CREATE_EMPTY
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static void
copy(IResource from, IResource to)
Copy allIWithProperties
andIWithAnnotations
Unless destination already has the property or annotation. Properties are cloned before copying.String
getId()
Gets the identifier of the resource.void
setId(String id)
Sets the identifier of this resource.-
Methods inherited from interface net.sf.okapi.common.resource.IWithAnnotations
annotationIterator, clear, getAnnotation, getAnnotations, getAnnotationsTypesAsSet, hasAnnotation, hasAnnotations, remove, setAnnotation
-
Methods inherited from interface net.sf.okapi.common.resource.IWithProperties
getProperties, getProperty, getPropertyNames, hasProperty, propertyIterator, removeProperty, setProperty
-
Methods inherited from interface net.sf.okapi.common.resource.IWithSkeleton
getSkeleton, setSkeleton
-
-
-
-
Field Detail
-
CREATE_EMPTY
static final int CREATE_EMPTY
- See Also:
- Constant Field Values
-
COPY_CONTENT
static final int COPY_CONTENT
- See Also:
- Constant Field Values
-
COPY_PROPERTIES
static final int COPY_PROPERTIES
- See Also:
- Constant Field Values
-
COPY_SEGMENTATION
static final int COPY_SEGMENTATION
- See Also:
- Constant Field Values
-
COPY_SEGMENTED_CONTENT
static final int COPY_SEGMENTED_CONTENT
- See Also:
- Constant Field Values
-
COPY_ALL
static final int COPY_ALL
- See Also:
- Constant Field Values
-
-
Method Detail
-
copy
static void copy(IResource from, IResource to)
Copy allIWithProperties
andIWithAnnotations
Unless destination already has the property or annotation. Properties are cloned before copying. Annotations are not cloned but this should be fixed in future versions ofIAnnotation
-
getId
String getId()
Gets the identifier of the resource. This identifier is unique per extracted document and by type of resource. This value is filter-specific. It and may be different from one extraction of the same document to the next. It can a sequential number or not, incremental or not, and it can be not a number. It has no correspondence in the source document ("IDs" coming from the source document are "names" and not available for all resources).- Returns:
- the identifier of this resource.
-
-