public class StorageList extends ArrayList<IResource> implements IReferenceable, IMultilingual
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() |
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)
Create target
Property without access to the source property |
<A extends IAnnotation> |
getAnnotation(Class<A> annotationType)
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.
|
int |
getReferenceCount()
Gets the number of time this referent is referenced to.
|
ISkeleton |
getSkeleton()
Gets the skeleton object for this resource.
|
Map<String,Property> |
getSourceProperties() |
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, waitcopy, propertyIteratorannotationIterator, clear, copy, getAnnotationsTypesAsSet, hasAnnotation, hasAnnotations, removecopycopy, createTargetProperty, getTargetPropertiescontainsAll, equals, hashCodeparallelStream, streampublic StorageList()
public 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()
IWithSkeletongetSkeleton in interface IWithSkeletonpublic void setSkeleton(ISkeleton skeleton)
IWithSkeletonsetSkeleton in interface IWithSkeletonskeleton - 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 IWithAnnotationspublic void setAnnotation(IAnnotation annotation)
IWithAnnotationssetAnnotation in interface IWithAnnotationsannotation - the annotation object to set.public Property createTargetProperty(LocaleId locId, String name, boolean overwrite, int creationOptions)
IWithTargetPropertiesProperty without access to the source propertycreateTargetProperty in interface IWithTargetPropertiespublic Property setTargetProperty(LocaleId language, Property property)
IWithTargetPropertiessetTargetProperty in interface IWithTargetPropertieslanguage - 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)
IWithTargetPropertiesgetTargetProperty in interface IWithTargetPropertieslanguage - 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)
IWithTargetPropertieshasTargetProperty in interface IWithTargetPropertieslanguage - 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)
IWithTargetPropertiesgetTargetPropertyNames in interface IWithTargetPropertieslanguage - the target locale to query.public Property getSourceProperty(String name)
IWithSourcePropertiesgetSourceProperty in interface IWithSourcePropertiesname - The name of the source property to retrieve.public Set<String> getSourcePropertyNames()
IWithSourcePropertiesgetSourcePropertyNames in interface IWithSourcePropertiespublic Set<LocaleId> getTargetLocales()
IWithTargetPropertiesgetTargetLocales in interface IWithTargetPropertiespublic Property setSourceProperty(Property property)
IWithSourcePropertiessetSourceProperty in interface IWithSourcePropertiesproperty - 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)
IWithSourcePropertieshasSourceProperty in interface IWithSourcePropertiesname - 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)
IWithSourcePropertiesremoveSourceProperty in interface IWithSourcePropertiesname - The name of the property to remove.public void removeTargetProperty(LocaleId language, String name)
IWithTargetPropertiesremoveTargetProperty in interface IWithTargetPropertieslanguage - The target locale for which this property should be set.name - The name of the property to remove.public StartGroup getStartGroup()
public Map<String,Property> getSourceProperties()
getSourceProperties in interface IWithSourcePropertiesMap of source properties for the implementer of interfacepublic Map<String,Property> getProperties()
getProperties in interface IWithPropertiesMap of properties for the implementer of interfacepublic Annotations getAnnotations()
getAnnotations in interface IWithAnnotationsgetAnnotations in interface IWithTargetPropertiesAnnotations for the implementer of interfaceCopyright © 2022. All rights reserved.