public class ProjectProperties
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ProjectProperties.ProjectPath
Class for support project path functionality, like relative path, etc.
|
Modifier and Type | Field and Description |
---|---|
protected ProjectProperties.ProjectPath |
dictDir |
protected ProjectProperties.ProjectPath |
glossaryDir |
protected java.io.File |
projectRootDir |
protected ProjectProperties.ProjectPath |
sourceDir |
protected ProjectProperties.ProjectPath |
targetDir |
protected ProjectProperties.ProjectPath |
tmDir |
protected ProjectProperties.ProjectPath |
writableGlossaryFile |
Modifier | Constructor and Description |
---|---|
protected |
ProjectProperties()
Constructor for tests only.
|
|
ProjectProperties(java.io.File projectDir)
Default constructor to initialize fields (to get no NPEs).
|
Modifier and Type | Method and Description |
---|---|
void |
autocreateDirectories() |
java.lang.String |
computeDefaultWriteableGlossaryFile() |
static java.util.List<java.lang.String> |
getDefaultExcludes() |
ProjectProperties.ProjectPath |
getDictDir() |
java.lang.String |
getDictRoot()
Returns The Dictionaries Files Directory
|
java.lang.String |
getDictRootRelative() |
java.lang.String |
getExternalCommand() |
ProjectProperties.ProjectPath |
getGlossaryDir() |
java.lang.String |
getGlossaryRoot()
Returns The Glossary Files Directory
|
Filters |
getProjectFilters() |
java.lang.String |
getProjectInternal()
Returns The Project's Translation Memory (TMX) File
|
java.io.File |
getProjectInternalDir() |
java.lang.String |
getProjectInternalRelative() |
java.lang.String |
getProjectName()
Returns the name of the Project
|
java.lang.String |
getProjectRoot()
Returns The Project Root Directory
|
java.io.File |
getProjectRootDir() |
SRX |
getProjectSRX() |
java.util.List<RepositoryDefinition> |
getRepositories() |
ProjectProperties.ProjectPath |
getSourceDir() |
Language |
getSourceLanguage()
Returns The Source Language (language of the source files) of the Project
|
java.lang.String |
getSourceRoot()
Returns The Source (to be translated) Files Directory
|
java.util.List<java.lang.String> |
getSourceRootExcludes() |
java.lang.Class<?> |
getSourceTokenizer()
Returns the class name of the source language tokenizer for the Project.
|
ProjectProperties.ProjectPath |
getTargetDir() |
Language |
getTargetLanguage()
Returns The Target Language (language of the translated files) of the Project
|
java.lang.String |
getTargetRoot()
Returns The Target (Compiled) Files Directory
|
java.lang.Class<?> |
getTargetTokenizer()
Returns the class name of the target language tokenizer for the Project.
|
java.lang.String |
getTMAutoRoot()
Returns The Translation Memory (TMX) Files Directory for automatically applied files.
|
ProjectProperties.ProjectPath |
getTmDir() |
java.lang.String |
getTMOtherLangRoot()
Returns The Translation Memory (TMX) with translations to other languages Files Directory
|
java.lang.String |
getTMRoot()
Returns The Translation Memory (TMX) Files Directory
|
ProjectProperties.ProjectPath |
getWritableGlossaryFile() |
java.lang.String |
getWriteableGlossary()
Returns The Glossary File Location
|
java.lang.String |
getWriteableGlossaryDir()
Returns The Glossary File Directory
|
boolean |
hasRepositories() |
boolean |
isDefaultWriteableGlossaryFile() |
boolean |
isProjectValid() |
boolean |
isRemoveTags() |
boolean |
isSentenceSegmentingEnabled()
Returns whether The Sentence Segmenting is Enabled for this Project.
|
boolean |
isSupportDefaultTranslations() |
void |
loadProjectFilters()
Loads filters.xml if found in the /omegat filter of the project
|
void |
loadProjectSRX()
Loads segmentation.conf if found in the /omegat folder of the project
|
void |
setDictRoot(java.lang.String dictRoot)
Sets Dictionaries Files Directory
|
void |
setExternalCommand(java.lang.String command) |
void |
setGlossaryRoot(java.lang.String glossaryRoot)
Sets The Glossary Files Directory
|
void |
setProjectFilters(Filters projectFilters) |
protected void |
setProjectRoot(java.lang.String projectRoot)
Sets The Project Root Directory.
|
void |
setProjectSRX(SRX projectSRX) |
void |
setRemoveTags(boolean removeTags) |
void |
setRepositories(java.util.List<RepositoryDefinition> repositories) |
void |
setSentenceSegmentingEnabled(boolean sentenceSegmentingEnabled)
Sets whether The Sentence Segmenting is Enabled for this Project
|
void |
setSourceLanguage(Language sourceLanguage)
Sets The Source Language (language of the source files) of the Project
|
void |
setSourceLanguage(java.lang.String sourceLanguage)
Sets The Source Language (language of the source files) of the Project
|
void |
setSourceRoot(java.lang.String sourceRoot)
Sets The Source (to be translated) Files Directory
|
void |
setSourceRootRelative(java.lang.String sourceRootRelative) |
void |
setSourceTokenizer(java.lang.Class<?> sourceTokenizer)
Sets the class name of the source language tokenizer for the Project.
|
void |
setSupportDefaultTranslations(boolean supportDefaultTranslations) |
void |
setTargetLanguage(Language targetLanguage)
Sets The Target Language (language of the translated files) of the Project
|
void |
setTargetLanguage(java.lang.String targetLanguage)
Sets The Target Language (language of the translated files) of the Project
|
void |
setTargetRoot(java.lang.String targetRoot)
Sets The Target (Compiled) Files Directory
|
void |
setTargetTokenizer(java.lang.Class<?> targetTokenizer)
Sets the class name of the target language tokenizer for the Project.
|
void |
setTMRoot(java.lang.String tmRoot)
Sets The Translation Memory (TMX) Files Directory
|
void |
setWriteableGlossary(java.lang.String writeableGlossaryFile)
Sets The Writeable Glossary File Location
|
void |
verifyProject()
Verify project and print any problems.
|
protected java.io.File projectRootDir
protected ProjectProperties.ProjectPath sourceDir
protected ProjectProperties.ProjectPath targetDir
protected ProjectProperties.ProjectPath glossaryDir
protected ProjectProperties.ProjectPath writableGlossaryFile
protected ProjectProperties.ProjectPath tmDir
protected ProjectProperties.ProjectPath dictDir
protected ProjectProperties()
public ProjectProperties(java.io.File projectDir) throws java.lang.Exception
java.lang.Exception
public static java.util.List<java.lang.String> getDefaultExcludes()
public java.lang.String getTargetRoot()
public void setTargetRoot(java.lang.String targetRoot)
public ProjectProperties.ProjectPath getTargetDir()
public java.lang.String getGlossaryRoot()
public void setGlossaryRoot(java.lang.String glossaryRoot)
public ProjectProperties.ProjectPath getGlossaryDir()
public ProjectProperties.ProjectPath getWritableGlossaryFile()
public java.lang.String getWriteableGlossary()
public java.lang.String getWriteableGlossaryDir()
public void setWriteableGlossary(java.lang.String writeableGlossaryFile)
public boolean isDefaultWriteableGlossaryFile()
public java.lang.String computeDefaultWriteableGlossaryFile()
public ProjectProperties.ProjectPath getTmDir()
public java.lang.String getTMRoot()
public void setTMRoot(java.lang.String tmRoot)
public java.lang.String getTMOtherLangRoot()
public java.lang.String getTMAutoRoot()
public ProjectProperties.ProjectPath getDictDir()
public java.lang.String getDictRoot()
public void setDictRoot(java.lang.String dictRoot)
public java.lang.String getDictRootRelative()
public java.lang.String getProjectName()
public java.lang.String getProjectRoot()
public java.io.File getProjectRootDir()
protected void setProjectRoot(java.lang.String projectRoot)
public java.lang.String getProjectInternal()
public java.io.File getProjectInternalDir()
public java.lang.String getProjectInternalRelative()
public java.lang.String getSourceRoot()
public void setSourceRoot(java.lang.String sourceRoot)
public void setSourceRootRelative(java.lang.String sourceRootRelative)
public ProjectProperties.ProjectPath getSourceDir()
public java.util.List<java.lang.String> getSourceRootExcludes()
public Language getSourceLanguage()
public void setSourceLanguage(Language sourceLanguage)
public void setSourceLanguage(java.lang.String sourceLanguage)
public Language getTargetLanguage()
public void setTargetLanguage(Language targetLanguage)
public void setTargetLanguage(java.lang.String targetLanguage)
public java.lang.Class<?> getSourceTokenizer()
public void setSourceTokenizer(java.lang.Class<?> sourceTokenizer)
public java.lang.Class<?> getTargetTokenizer()
public void setTargetTokenizer(java.lang.Class<?> targetTokenizer)
public boolean isSentenceSegmentingEnabled()
public void setSentenceSegmentingEnabled(boolean sentenceSegmentingEnabled)
public boolean isSupportDefaultTranslations()
public void setSupportDefaultTranslations(boolean supportDefaultTranslations)
public boolean isRemoveTags()
public void setRemoveTags(boolean removeTags)
public boolean hasRepositories()
public java.util.List<RepositoryDefinition> getRepositories()
public void setRepositories(java.util.List<RepositoryDefinition> repositories)
public SRX getProjectSRX()
public void setProjectSRX(SRX projectSRX)
public void loadProjectSRX()
public Filters getProjectFilters()
public void setProjectFilters(Filters projectFilters)
public void loadProjectFilters() throws java.io.IOException
java.io.IOException
public java.lang.String getExternalCommand()
public void setExternalCommand(java.lang.String command)
public boolean isProjectValid()
public void verifyProject() throws ProjectException
ProjectException
public void autocreateDirectories()