Package net.sf.okapi.common.resource
Interface INameable
-
- All Superinterfaces:
Cloneable
,IResource
,IWithAnnotations
,IWithProperties
,IWithSkeleton
- All Known Subinterfaces:
IMultilingual
,ITextUnit
- All Known Implementing Classes:
BaseNameable
,BaseReferenceable
,DocumentPart
,StartDocument
,StartGroup
,StartSubDocument
,StartSubfilter
,StorageList
,TextContainer
,TextUnit
public interface INameable extends IResource
Provides the methods common to all resources that can be named.
-
-
Field Summary
-
Fields inherited from interface net.sf.okapi.common.IResource
COPY_ALL, COPY_CONTENT, COPY_PROPERTIES, COPY_SEGMENTATION, COPY_SEGMENTED_CONTENT, CREATE_EMPTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getMimeType()
Gets the type of content of this resource.String
getName()
Gets the name of this resource.String
getType()
Gets the type information associated with this resource.boolean
isTranslatable()
Indicates if the content of this resource is translatable.boolean
preserveWhitespaces()
Indicates if the white-spaces in the content of this resource should be preserved.void
setIsTranslatable(boolean value)
Sets the flag indicating if the content of this resource is translatable.void
setMimeType(String value)
Sets the type of content of this resource.void
setName(String name)
Sets the name of this resource.void
setPreserveWhitespaces(boolean value)
sets the flag indicating if the white-spaces in the content of this resource should be preserved.void
setType(String value)
Sets the type information associated with 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
-
-
-
-
Method Detail
-
getName
String getName()
Gets the name of this resource. The resource name corresponds to different things depending on the type of resource. For a StartDocument the name is the URI of the document. Otherwise, in most cases the name is the identifier of the resource (This is the equivalent of the XLIFF resname attribute).- Returns:
- This resource name, or null if there is none.
-
setName
void setName(String name)
Sets the name of this resource. The resource name is the equivalent of the XLIFF resname attribute.- Parameters:
name
- New name to set.
-
getType
String getType()
Gets the type information associated with this resource. For example "button".- Returns:
- The type information associated with this resource.
-
setType
void setType(String value)
Sets the type information associated with this resource. For example "button".- Parameters:
value
- The new type information.
-
getMimeType
String getMimeType()
Gets the type of content of this resource. For example "text/xml".- Returns:
- The type of content of this resource.
-
setMimeType
void setMimeType(String value)
Sets the type of content of this resource. For example "text/xml".- Parameters:
value
- The new type of content of this resource.
-
isTranslatable
boolean isTranslatable()
Indicates if the content of this resource is translatable. By default this indicator is set to true for all resources.- Returns:
- True if the content of this resource is translatable. False if it is not translatable.
-
setIsTranslatable
void setIsTranslatable(boolean value)
Sets the flag indicating if the content of this resource is translatable.- Parameters:
value
- True to indicate that the content of this resource is translatable.
-
preserveWhitespaces
boolean preserveWhitespaces()
Indicates if the white-spaces in the content of this resource should be preserved. By default this indicator is set to false for all resources.- Returns:
- True if the white-spaces in the content of this resource should be preserved.
-
setPreserveWhitespaces
void setPreserveWhitespaces(boolean value)
sets the flag indicating if the white-spaces in the content of this resource should be preserved.- Parameters:
value
- True to indicate that the white-spaces in the content of this resource should be preserved.
-
-