IProject.AllTranslations, IProject.DefaultTranslationsIterator, IProject.FileInfo, IProject.MultipleTranslationsIterator, IProject.OptimisticLockingFail
Constructor and Description |
---|
NotLoadedProject() |
Modifier and Type | Method and Description |
---|---|
void |
closeProject()
Close project.
|
void |
commitSourceFiles()
Commit source files in a team project.
|
void |
compileProject(java.lang.String sourcePattern)
Create translated documents.
|
void |
compileProjectAndCommit(java.lang.String sourcePattern,
boolean doPostProcessing,
boolean commitTargetFiles)
Builds translated files corresponding to sourcePattern and creates fresh TM files.
|
void |
decreaseTranslated() |
void |
findNonUniqueSegments() |
java.util.List<SourceTextEntry> |
getAllEntries()
Get all source segments.
|
IProject.AllTranslations |
getAllTranslations(SourceTextEntry ste)
Get default and alternative translations for optimistic locking.
|
java.util.Map<Language,ProjectTMX> |
getOtherTargetLanguageTMs()
Get all translation memories from /other_lang/ folder.
|
java.util.List<IProject.FileInfo> |
getProjectFiles()
Get info about each source file in project.
|
ProjectProperties |
getProjectProperties()
Get project properties.
|
java.util.List<java.lang.String> |
getSourceFilesOrder()
Get ordered list of source file names.
|
ITokenizer |
getSourceTokenizer()
Returns tokenizer for source language.
|
StatisticsInfo |
getStatistics()
Get statistics for project.
|
java.lang.String |
getTargetPathForSourceFile(java.lang.String sourceFile)
For a given source file, calculate the path of the target file that would be created
by running Create Translated Documents (the file may not exist yet).
|
ITokenizer |
getTargetTokenizer()
Returns tokenizer for target language.
|
TMXEntry |
getTranslationInfo(SourceTextEntry ste)
Get translation info for specified entry.
|
java.util.Map<java.lang.String,ExternalTMX> |
getTransMemories()
Get all translation memories from /tm/ folder.
|
java.util.List<StringEntry> |
getUniqueEntries() |
void |
increaseTranslated() |
boolean |
isOrphaned(EntryKey entry)
Check if orphaned.
|
boolean |
isOrphaned(java.lang.String source)
Check if orphaned.
|
boolean |
isProjectLoaded()
Get project loaded status.
|
boolean |
isProjectModified()
Is project modified ?
|
boolean |
isRemoteProject()
Tells whether a project is a team project
|
boolean |
isTeamSyncPrepared()
Check if team synchronization prepared.
|
void |
iterateByDefaultTranslations(IProject.DefaultTranslationsIterator it)
Iterate by all default translations in project.
|
void |
iterateByMultipleTranslations(IProject.MultipleTranslationsIterator it)
Iterate by all multiple translations in project.
|
void |
saveProject(boolean doTeamSync)
Save project.
|
void |
saveProjectProperties()
Save project properties only.
|
void |
setNote(SourceTextEntry entry,
TMXEntry oldTrans,
java.lang.String note)
Change note only for translation.
|
void |
setSourceFilesOrder(java.util.List<java.lang.String> filesList)
Set ordered list of source file names.
|
void |
setTranslation(SourceTextEntry entry,
PrepareTMXEntry trans,
boolean defaultTranslation,
TMXEntry.ExternalLinked externalLinked)
Set translation for entry.
|
void |
setTranslation(SourceTextEntry entry,
PrepareTMXEntry trans,
boolean defaultTranslation,
TMXEntry.ExternalLinked externalLinked,
IProject.AllTranslations previousTranslations)
Set translation for entry with optimistic lock checking: if previous translation is not the same like
in storage, OptimisticLockingFail exception will be generated.
|
void |
teamSync()
Execute synchronization.
|
void |
teamSyncPrepare()
Prepare for team synchronization from save thread.
|
public void compileProject(java.lang.String sourcePattern) throws java.io.IOException, TranslationException
IProject
compileProject
in interface IProject
java.io.IOException
TranslationException
public boolean isRemoteProject()
IProject
isRemoteProject
in interface IProject
public void compileProjectAndCommit(java.lang.String sourcePattern, boolean doPostProcessing, boolean commitTargetFiles) throws java.lang.Exception
IProject
compileProjectAndCommit
in interface IProject
sourcePattern
- The regexp of files to createdoPostProcessing
- Whether or not we should perform external post-processing.commitTargetFiles
- Whether or not we should commit target filesjava.lang.Exception
public void commitSourceFiles() throws java.lang.Exception
IProject
commitSourceFiles
in interface IProject
java.lang.Exception
public void closeProject()
IProject
closeProject
in interface IProject
public void decreaseTranslated()
public java.util.List<SourceTextEntry> getAllEntries()
IProject
getAllEntries
in interface IProject
public java.util.List<StringEntry> getUniqueEntries()
public TMXEntry getTranslationInfo(SourceTextEntry ste)
IProject
getTranslationInfo
in interface IProject
ste
- source entrypublic IProject.AllTranslations getAllTranslations(SourceTextEntry ste)
IProject
getAllTranslations
in interface IProject
public void iterateByDefaultTranslations(IProject.DefaultTranslationsIterator it)
IProject
iterateByDefaultTranslations
in interface IProject
public void iterateByMultipleTranslations(IProject.MultipleTranslationsIterator it)
IProject
iterateByMultipleTranslations
in interface IProject
public void setNote(SourceTextEntry entry, TMXEntry oldTrans, java.lang.String note)
IProject
public boolean isOrphaned(java.lang.String source)
IProject
isOrphaned
in interface IProject
public boolean isOrphaned(EntryKey entry)
IProject
isOrphaned
in interface IProject
public java.util.Map<java.lang.String,ExternalTMX> getTransMemories()
IProject
getTransMemories
in interface IProject
public java.util.Map<Language,ProjectTMX> getOtherTargetLanguageTMs()
IProject
getOtherTargetLanguageTMs
in interface IProject
public java.util.List<IProject.FileInfo> getProjectFiles()
IProject
getProjectFiles
in interface IProject
public ProjectProperties getProjectProperties()
IProject
getProjectProperties
in interface IProject
public StatisticsInfo getStatistics()
IProject
getStatistics
in interface IProject
public void increaseTranslated()
public boolean isProjectLoaded()
IProject
isProjectLoaded
in interface IProject
public boolean isProjectModified()
IProject
isProjectModified
in interface IProject
public void saveProject(boolean doTeamSync)
IProject
saveProject
in interface IProject
public void saveProjectProperties() throws java.io.IOException
IProject
saveProjectProperties
in interface IProject
java.io.IOException
public void setTranslation(SourceTextEntry entry, PrepareTMXEntry trans, boolean defaultTranslation, TMXEntry.ExternalLinked externalLinked)
IProject
setTranslation
in interface IProject
entry
- entrytrans
- translation. It can't be nullpublic void setTranslation(SourceTextEntry entry, PrepareTMXEntry trans, boolean defaultTranslation, TMXEntry.ExternalLinked externalLinked, IProject.AllTranslations previousTranslations) throws IProject.OptimisticLockingFail
IProject
setTranslation
in interface IProject
entry
- entrytrans
- translation. It can't be nullIProject.OptimisticLockingFail
public ITokenizer getSourceTokenizer()
IProject
getSourceTokenizer
in interface IProject
public ITokenizer getTargetTokenizer()
IProject
getTargetTokenizer
in interface IProject
public void findNonUniqueSegments()
public java.util.List<java.lang.String> getSourceFilesOrder()
IProject
getSourceFilesOrder
in interface IProject
public void setSourceFilesOrder(java.util.List<java.lang.String> filesList)
IProject
setSourceFilesOrder
in interface IProject
public java.lang.String getTargetPathForSourceFile(java.lang.String sourceFile)
IProject
The target path must be calculated because it can depend on project properties such as the target language, etc.
getTargetPathForSourceFile
in interface IProject
sourceFile
- The relative path (under the source
directory) of the
source file, e.g. Bundle.properties
target
directory) of the corresponding
target file, e.g. Bundle_fr_FR.properties
public boolean isTeamSyncPrepared()
IProject
isTeamSyncPrepared
in interface IProject
public void teamSync()
IProject
public void teamSyncPrepare() throws java.lang.Exception
IProject
teamSyncPrepare
in interface IProject
java.lang.Exception