public class BaseNameable extends Object implements INameable
| Modifier and Type | Field and Description |
|---|---|
protected String |
id |
protected boolean |
isTranslatable |
protected String |
mimeType |
protected String |
name |
protected boolean |
preserveWS |
protected String |
type |
COPY_ALL, COPY_CONTENT, COPY_PROPERTIES, COPY_SEGMENTATION, COPY_SEGMENTED_CONTENT, CREATE_EMPTY| Constructor and Description |
|---|
BaseNameable() |
| Modifier and Type | Method and Description |
|---|---|
<A extends IAnnotation> |
getAnnotation(Class<A> type)
Gets the annotation object for a given class for this resource.
|
Annotations |
getAnnotations() |
String |
getId()
Gets the identifier of the resource.
|
String |
getMimeType()
Gets the type of content of this resource.
|
String |
getName()
Gets the name of this resource.
|
Map<String,Property> |
getProperties() |
Property |
getProperty(String name)
Gets the resource-level property for a given name.
|
Set<String> |
getPropertyNames()
Gets the names of all the resource-level properties for this resource.
|
ISkeleton |
getSkeleton()
Gets the skeleton object for this resource.
|
String |
getType()
Gets the type information associated with this resource.
|
boolean |
hasProperty(String name)
Indicates if a resource-level property exists for a given name.
|
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(String name)
Removes a resource-level property of a given name.
|
void |
setAnnotation(IAnnotation annotation)
Sets an annotation object for this resource.
|
void |
setId(String id)
Sets the identifier of this resource.
|
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 value)
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.
|
void |
setSkeleton(ISkeleton skeleton)
Sets the skeleton object for this resource.
|
void |
setType(String value)
Sets the type information associated with this resource.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcopy, propertyIteratorannotationIterator, clear, copy, getAnnotationsTypesAsSet, hasAnnotation, hasAnnotations, removeprotected String id
protected String name
protected String type
protected String mimeType
protected boolean isTranslatable
protected boolean preserveWS
public String getId()
IResourcepublic void setId(String id)
IResourcesetId in interface IResourceid - the new identifier value.IResource.getId()public String getName()
INameablepublic void setName(String value)
INameablepublic String getType()
INameablepublic void setType(String value)
INameablepublic String getMimeType()
INameablegetMimeType in interface INameablepublic void setMimeType(String value)
INameablesetMimeType in interface INameablevalue - The new type of content of this resource.public boolean isTranslatable()
INameableisTranslatable in interface INameablepublic void setIsTranslatable(boolean value)
INameablesetIsTranslatable in interface INameablevalue - True to indicate that the content of this resource is translatable.public boolean preserveWhitespaces()
INameablepreserveWhitespaces in interface INameablepublic void setPreserveWhitespaces(boolean value)
INameablesetPreserveWhitespaces in interface INameablevalue - True to indicate that the white-spaces in the content of this resource should be preserved.public ISkeleton getSkeleton()
IWithSkeletongetSkeleton in interface IWithSkeletonpublic void setSkeleton(ISkeleton skeleton)
IWithSkeletonsetSkeleton in interface IWithSkeletonskeleton - the skeleton object to set.public Map<String,Property> getProperties()
getProperties in interface IWithPropertiesMap of properties for the implementer of interfacepublic Annotations getAnnotations()
getAnnotations in interface IWithAnnotationsAnnotations for the implementer of interfacepublic boolean hasProperty(String name)
IWithPropertieshasProperty in interface IWithPropertiesname - The name of the resource-level property to query.public Property getProperty(String name)
IWithPropertiesgetProperty in interface IWithPropertiesname - Name of the property to retrieve.public Property setProperty(Property property)
IWithPropertiessetProperty in interface IWithPropertiesproperty - The new property to set.public void removeProperty(String name)
IWithPropertiesremoveProperty in interface IWithPropertiesname - The name of the property to remove.public Set<String> getPropertyNames()
IWithPropertiesgetPropertyNames in interface IWithPropertiespublic <A extends IAnnotation> A getAnnotation(Class<A> type)
IWithAnnotationsgetAnnotation in interface IWithAnnotationspublic void setAnnotation(IAnnotation annotation)
IWithAnnotationssetAnnotation in interface IWithAnnotationsannotation - the annotation object to set.Copyright © 2022. All rights reserved.