Some ideas for the interface to the Translation Resources.
Many of the operations are similar between the different types of translation resources, so we can probably use a set of interfaces for common set of functuionalities and a few specialized one for each feature specific to a type of resource.
|
TM |
MT |
TermDB |
Sets the parameters for this connector |
setParameters(IParameters params) |
setParameters(IParameters params) |
setParameters(IParameters params) |
Gets the current parameters of the connector |
IParameters getParameters() |
IParameters getParameters() |
IParameters getParameters() |
Opens the connector |
void open() |
void open() |
void open() |
Closes the connector |
void close() |
void close() |
void close() |
Sets the source locale |
void setSource(LocaleId locId) |
void setSource(LocaleId locId) |
void setSource(LocaleId locId) |
Gets the current source locale |
LocaleId getSourceLocale() |
LocaleId getSourceLocale() |
LocaleId getSourceLocale() |
Sets the target locale |
void setTargetLocale(LocaleId locId) |
void setTargetLocale(LocaleId locId) |
void setTargetLocale(LocaleId locId) |
Gets the current target locale |
LocaleId getTargetLocale() |
LocaleId getTargetLocale() |
LocaleId getTargetLocale() |
Searches
a plain text string. |
Iterable<Result> search(String text) |
Iterable<Result> search(String text) |
|
Searches
a TextFragment. |
Iterable<Result> search(TextFragment text) |
Iterable<Result> search(TextFragment text) |
|
Performs
a concordance search with a string. |
Iterable<Result> searchConcordances(String text) |
|
|
Performs
a concordance search with a TextFragment. |
Iterable<Result> searchConcordances(TextFragment text) |
|
|
Performs
a term search with a text. |
|
|
Iterable<TermUnit> searchTerm(String term) |
Sets the threshold of fuzzyness for the search |
void setThreshold(int min) |
void setThreshold(int min) |
??? void setThreshold(int min) |
Gets the current threshold |
int getThreshold() |
int getThreshold() |
??? int getThreshold() |
Sets the maximum number of results to return. |
void setMaximumResults(int max) |
void setMaximumResults(int max) |
??? void setMaximumResults(int max) |
Get the current maximum number of results. |
int getThreshold() |
int getThreshold() |
??? int getThreshold() |
Imports a TMX document into the resource |
void importTMX(String path) |
??? void importTMX(String path) |
|
Exports a TMX files from the resource. |
void exportTMX(String path) |
|
|
Sets a given attribute |
void setAttribute(String name, String value) |
void setAttribute(String name, String value) |
void setAttribute(String name, String value) |
Gets an attribute. |
String getAttribute(String name) |
String getAttribute(String name) |
String getAttribute(String name) |
Clears all the current attributes |
void clearAttributes() |
void clearAttributes() |
void clearAttributes() |
Sets a group of attributes. |
void setAttributes(Map<String, String> map) |
void setAttributes(Map<String, String> map) |
void setAttributes(Map<String, String> map) |
Gets all the current attributes. |
Map<String, String> getAttributes() |
Map<String, String> getAttributes() |
Map<String, String> getAttributes() |
Updates (or adds) an entry in the resource from plain text |
updateEntry(String source, String target, Map<String, String> attributes) |
|
|
Updates (or adds) an entry in the resource from TextFragment objects. |
updateEntry(TextFragment source, TextFragment target, Map<String, String> attributes) |
|
|
??? Updates (or adds) an entry in the resource from a TextUnit object. |
updateEntry(TextUnit tu, Map<String, String> attributes) |
|
|
??? Updates (or adds) an entry in the resource from a TextContainer object. |
updateEntry(TextContainer source, TextContainer target, Map<String, String> attributes) |
|
|
|
|
|
|
-ys