public class Store
extends java.lang.Object
IWithStore (e.g. a Unit).| Constructor and Description |
|---|
Store(IWithStore parent)
Creates a new store and associates it to a given parent object
(e.g.
|
| Modifier and Type | Method and Description |
|---|---|
void |
calculateDataToIdsMap() |
java.lang.String |
getIdForData(CTag ctag) |
java.util.Map<java.lang.String,java.lang.String> |
getOutsideRepresentationMap() |
IWithStore |
getParent()
Gets the main object associated with this store.
|
Directionality |
getSourceDir()
Gets the source directionality for this store.
|
Tags |
getSourceTags()
Gets the source tags for this store.
|
Tag |
getTag(java.lang.String id)
Gets the tag object for a given id.
|
Tag |
getTag(java.lang.String id,
TagType tagType)
Gets the tag for a given id and type (from the whole store).
|
Directionality |
getTargetDir()
Gets the target directionality for this store.
|
Tags |
getTargetTags()
Gets the target tags for this store.
|
boolean |
hasCTagWithData()
Indicates if there is at least one code with original data in this store.
|
boolean |
hasSourceTag()
Indicates if there is at least one tag (for code or marker) in the source content for this store.
|
boolean |
hasTargetTag()
Indicates if there is at least one tag (for code or marker) in the target content for this store.
|
boolean |
isIdUsed(java.lang.String id)
Indicates if a given id value is already in use in the object associated with this store
(i.e.
|
boolean |
isIdUsedInTags(java.lang.String id)
Indicates if a given id value is already used among the existing tags
(not the full scope of a store).
|
void |
setOutsideRepresentationMap(java.util.Map<java.lang.String,java.lang.String> map) |
void |
setSourceDir(Directionality dir)
Sets the source directionality for this store.
|
void |
setTargetDir(Directionality dir)
Sets the target directionality for this store.
|
java.lang.String |
suggestId(boolean forSegment)
Gets a suggested id for code, annotation, ignorable or segment.
|
public Store(IWithStore parent)
parent - the parent object to associate this store with (cannot be null).public boolean hasCTagWithData()
public boolean hasSourceTag()
public boolean hasTargetTag()
public Tags getSourceTags()
public Tags getTargetTags()
public void calculateDataToIdsMap()
public void setOutsideRepresentationMap(java.util.Map<java.lang.String,java.lang.String> map)
public java.util.Map<java.lang.String,java.lang.String> getOutsideRepresentationMap()
public java.lang.String getIdForData(CTag ctag)
public Tag getTag(java.lang.String id, TagType tagType)
id - the id to look for.tagType - the type of the tag to look for.public boolean isIdUsedInTags(java.lang.String id)
id - the id to verify.public boolean isIdUsed(java.lang.String id)
Part or for a Tag).id - the id value to lookup.public Tag getTag(java.lang.String id)
This method does not look for PCont.
id - the id to look for.Tag object for the given id, or null if not found.public java.lang.String suggestId(boolean forSegment)
forSegment - true for a segment id, false for other elements.public Directionality getSourceDir()
public void setSourceDir(Directionality dir)
dir - the new source directionality to set.public Directionality getTargetDir()
public void setTargetDir(Directionality dir)
dir - the new target directionality to set.public IWithStore getParent()