|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface INameable
Provides the methods common to all resources that can be named and have properties.
| 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 | |
|---|---|
Property |
createTargetProperty(LocaleId locId,
java.lang.String name,
boolean overwriteExisting,
int creationOptions)
Creates or get a target property based on the corresponding source. |
java.lang.String |
getMimeType()
Gets the type of content of this resource. |
java.lang.String |
getName()
Gets the name of this resource. |
Property |
getProperty(java.lang.String name)
Gets the resource-level property for a given name. |
java.util.Set<java.lang.String> |
getPropertyNames()
Gets the names of all the resource-level properties for this resource. |
Property |
getSourceProperty(java.lang.String name)
Gets the source property for a given name. |
java.util.Set<java.lang.String> |
getSourcePropertyNames()
Gets the names of all the source properties for this resource. |
java.util.Set<LocaleId> |
getTargetLocales()
Gets all the target locales for this resource. |
Property |
getTargetProperty(LocaleId locId,
java.lang.String name)
Gets the target property for a given name and target locale. |
java.util.Set<java.lang.String> |
getTargetPropertyNames(LocaleId locId)
Gets the names of all the properties for a given target locale in this resource. |
java.lang.String |
getType()
Gets the type information associated with this resource. |
boolean |
hasProperty(java.lang.String name)
Indicates if a resource-level property exists for a given name. |
boolean |
hasSourceProperty(java.lang.String name)
Indicates if a source property exists for a given name. |
boolean |
hasTargetProperty(LocaleId locId,
java.lang.String name)
Indicates if a property exists for a given name and target locale. |
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 |
removeProperty(java.lang.String name)
Removes a resource-level property of a given name. |
void |
removeSourceProperty(java.lang.String name)
Removes a source property of a given name. |
void |
removeTargetProperty(LocaleId locId,
java.lang.String name)
Removes a target property of a given name. |
void |
setIsTranslatable(boolean value)
Sets the flag indicating if the content of this resource is translatable. |
void |
setMimeType(java.lang.String value)
Sets the type of content of this resource. |
void |
setName(java.lang.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. |
Property |
setProperty(Property property)
Sets a resource-level property. |
Property |
setSourceProperty(Property property)
Sets a source property. |
Property |
setTargetProperty(LocaleId locId,
Property property)
Sets a target property. |
void |
setType(java.lang.String value)
Sets the type information associated with this resource. |
| Methods inherited from interface net.sf.okapi.common.IResource |
|---|
getAnnotation, getAnnotations, getId, getSkeleton, setAnnotation, setId, setSkeleton |
| Method Detail |
|---|
java.lang.String getName()
void setName(java.lang.String name)
name - New name to set.java.lang.String getType()
void setType(java.lang.String value)
value - The new type information.java.lang.String getMimeType()
void setMimeType(java.lang.String value)
value - The new type of content of this resource.Property getProperty(java.lang.String name)
name - Name of the property to retrieve.
Property setProperty(Property property)
property - The new property to set.
void removeProperty(java.lang.String name)
name - The name of the property to remove.java.util.Set<java.lang.String> getPropertyNames()
boolean hasProperty(java.lang.String name)
name - The name of the resource-level property to query.
Property getSourceProperty(java.lang.String name)
name - The name of the source property to retrieve.
Property setSourceProperty(Property property)
property - The new property to set.
void removeSourceProperty(java.lang.String name)
name - The name of the property to remove.java.util.Set<java.lang.String> getSourcePropertyNames()
boolean hasSourceProperty(java.lang.String name)
name - The name of the source property to query.
Property getTargetProperty(LocaleId locId,
java.lang.String name)
locId - the locale of the property to retrieve.name - The name of the property to retrieve. This name is case-sensitive.
Property setTargetProperty(LocaleId locId,
Property property)
locId - The target locale for which this property should be set.property - The new property to set. This name is case-sensitive.
void removeTargetProperty(LocaleId locId,
java.lang.String name)
locId - The target locale for which this property should be set.name - The name of the property to remove.java.util.Set<java.lang.String> getTargetPropertyNames(LocaleId locId)
locId - the target locale to query.
java.util.Set<LocaleId> getTargetLocales()
boolean hasTargetProperty(LocaleId locId,
java.lang.String name)
locId - the target locale to query.name - the name of the property to query.
Property createTargetProperty(LocaleId locId,
java.lang.String name,
boolean overwriteExisting,
int creationOptions)
locId - The target locale to use.name - The name of the property to create (or retrieve)overwriteExisting - True to overwrite any existing property.
False to not create a new property if one exists already.creationOptions - Creation options:
boolean isTranslatable()
void setIsTranslatable(boolean value)
value - True to indicate that the content of this resource is translatable.boolean preserveWhitespaces()
void setPreserveWhitespaces(boolean value)
value - True to indicate that the white-spaces in the content of this resource should be preserved.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||