public class StorageList extends ArrayList<IResource> implements INameable, IReferenceable
This class is designed to be used with GenericSkeletonWriter and derived classes.
modCountCOPY_ALL, COPY_CONTENT, COPY_PROPERTIES, COPY_SEGMENTATION, COPY_SEGMENTED_CONTENT, CREATE_EMPTY| Constructor and Description |
|---|
StorageList(StartGroup startGroup)
Creates a new StorageList object with w StartGroup.
|
| Modifier and Type | Method and Description |
|---|---|
Property |
createTargetProperty(LocaleId locId,
String name,
boolean overwrite,
int creationOptions)
Creates or get a target property based on the corresponding source.
|
<A extends IAnnotation> |
getAnnotation(Class<A> annotationType)
Gets the annotation object for a given class for this resource.
|
Iterable<IAnnotation> |
getAnnotations()
Gets the iterable list of the annotations for this resource.
|
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.
|
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.
|
int |
getReferenceCount()
Gets the number of time this referent is referenced to.
|
ISkeleton |
getSkeleton()
Gets the skeleton object for this resource.
|
Property |
getSourceProperty(String name)
Gets the source property for a given name.
|
Set<String> |
getSourcePropertyNames()
Gets the names of all the source properties for this resource.
|
StartGroup |
getStartGroup() |
Set<LocaleId> |
getTargetLocales()
Gets all the target locales for this resource.
|
Property |
getTargetProperty(LocaleId language,
String name)
Gets the target property for a given name and target locale.
|
Set<String> |
getTargetPropertyNames(LocaleId language)
Gets the names of all the properties for a given target locale in 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 |
hasSourceProperty(String name)
Indicates if a source property exists for a given name.
|
boolean |
hasTargetProperty(LocaleId language,
String name)
Indicates if a property exists for a given name and target locale.
|
boolean |
isReferent()
Indicates if this resource is a referent (i.e.
|
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 |
removeSourceProperty(String name)
Removes a source property of a given name.
|
void |
removeTargetProperty(LocaleId language,
String name)
Removes a target 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 |
setIsReferent(boolean value)
Sets the flag indicating if this resource is a referent (i.e.
|
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.
|
Property |
setProperty(Property property)
Sets a resource-level property.
|
void |
setReferenceCount(int value)
Sets the number of time this referent is referenced to.
|
void |
setSkeleton(ISkeleton skeleton)
Sets the skeleton object for this resource.
|
Property |
setSourceProperty(Property property)
Sets a source property.
|
Property |
setTargetProperty(LocaleId language,
Property property)
Sets a target property.
|
void |
setType(String value)
Sets the type information associated with this resource.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcopycopycopycontainsAll, equals, hashCodeparallelStream, streampublic StorageList(StartGroup startGroup)
startGroup - StartGroup to start with.public String getId()
IResourcepublic void setId(String id)
IResourcesetId in interface IResourceid - the new identifier value.IResource.getId()public ISkeleton getSkeleton()
IResourcegetSkeleton in interface IResourcepublic void setSkeleton(ISkeleton skeleton)
IResourcesetSkeleton in interface IResourceskeleton - the skeleton object to set.public boolean isReferent()
IReferenceableisReferent in interface IReferenceablepublic void setIsReferent(boolean value)
IReferenceablesetIsReferent in interface IReferenceablevalue - true if the resource is a referent, false if it is not.public int getReferenceCount()
IReferenceablegetReferenceCount in interface IReferenceablepublic void setReferenceCount(int value)
IReferenceablesetReferenceCount in interface IReferenceablevalue - the number of time this referent is referenced to.public String getName()
INameablepublic Property getProperty(String name)
IWithPropertiesgetProperty in interface IWithPropertiesname - Name of the property to retrieve.public void setName(String name)
INameablepublic Property setProperty(Property property)
IWithPropertiessetProperty in interface IWithPropertiesproperty - The new property to set.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 void setAnnotation(IAnnotation annotation)
IWithAnnotationssetAnnotation in interface IWithAnnotationsannotation - the annotation object to set.public Property createTargetProperty(LocaleId locId, String name, boolean overwrite, int creationOptions)
INameablecreateTargetProperty in interface INameablelocId - The target locale to use.name - The name of the property to create (or retrieve)overwrite - True to overwrite any existing property.
False to not create a new property if one exists already.creationOptions - Creation options:
public Property setTargetProperty(LocaleId language, Property property)
IWithBilingualPropertiessetTargetProperty in interface IWithBilingualPropertieslanguage - The target locale for which this property should be set.property - The new property to set. This name is case-sensitive.public Property getTargetProperty(LocaleId language, String name)
IWithBilingualPropertiesgetTargetProperty in interface IWithBilingualPropertieslanguage - the locale of the property to retrieve.name - The name of the property to retrieve. This name is case-sensitive.public boolean hasTargetProperty(LocaleId language, String name)
IWithBilingualPropertieshasTargetProperty in interface IWithBilingualPropertieslanguage - the target locale to query.name - the name of the property to query.public Set<String> getPropertyNames()
IWithPropertiesgetPropertyNames in interface IWithPropertiespublic Set<String> getTargetPropertyNames(LocaleId language)
IWithBilingualPropertiesgetTargetPropertyNames in interface IWithBilingualPropertieslanguage - the target locale to query.public Property getSourceProperty(String name)
IWithBilingualPropertiesgetSourceProperty in interface IWithBilingualPropertiesname - The name of the source property to retrieve.public Set<String> getSourcePropertyNames()
IWithBilingualPropertiesgetSourcePropertyNames in interface IWithBilingualPropertiespublic Set<LocaleId> getTargetLocales()
IWithBilingualPropertiesgetTargetLocales in interface IWithBilingualPropertiespublic Property setSourceProperty(Property property)
IWithBilingualPropertiessetSourceProperty in interface IWithBilingualPropertiesproperty - The new property to set.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 String getType()
INameablepublic void setType(String value)
INameablepublic 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 String getMimeType()
INameablegetMimeType in interface INameablepublic void setMimeType(String value)
INameablesetMimeType in interface INameablevalue - The new type of content of this resource.public boolean hasProperty(String name)
IWithPropertieshasProperty in interface IWithPropertiesname - The name of the resource-level property to query.public boolean hasSourceProperty(String name)
IWithBilingualPropertieshasSourceProperty in interface IWithBilingualPropertiesname - The name of the source property to query.public void removeProperty(String name)
IWithPropertiesremoveProperty in interface IWithPropertiesname - The name of the property to remove.public void removeSourceProperty(String name)
IWithBilingualPropertiesremoveSourceProperty in interface IWithBilingualPropertiesname - The name of the property to remove.public void removeTargetProperty(LocaleId language, String name)
IWithBilingualPropertiesremoveTargetProperty in interface IWithBilingualPropertieslanguage - The target locale for which this property should be set.name - The name of the property to remove.public Iterable<IAnnotation> getAnnotations()
IWithAnnotationsgetAnnotations in interface IWithAnnotationspublic StartGroup getStartGroup()
Copyright © 2021. All rights reserved.