Class PrefsMediator
java.lang.Object
org.apache.uima.tools.docanalyzer.PrefsMediator
The Class PrefsMediator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The default input dir.private String
The default output dir.private String
The encoding.private static final String
The Constant ENCODING.private static final String
The Constant INDIR.private String
The input dir.private String
The input file format.private static final String
The Constant INPUTFILEFORMAT.private FileSelector
The input file selector.private JButton
The view button.private String
The language.private static final String
The Constant LANGUAGE.private boolean
The lenient.private static final String
The Constant LENIENT.private static final String
The Constant OUTDIR.private String
The output dir.private FileSelector
The output file selector.private Preferences
The prefs.private JButton
The view button.private static final String
The Constant TAEDESCRIPTOR.private String
The tae dir.private JButton
The view button.private String
The view type.private static final String
The Constant VIEWTYPE.private FileSelector
The xml file selector.private String
The xml tag.private static final String
The Constant XMLTAG. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Field focus lost.Gets the encoding.Gets the input dir.Gets the input file format.Gets the language.Gets the lenient.Gets the output dir.returns the new edited stylemap file.Gets the TA efile.Gets the TAE file name root.get the path to the TAE that is where the StyleMap file should be written.Gets the view type.Gets the xml tag.private int
Gets index of last file separator character in a file path.void
Restore preferences.void
Save preferences.void
setDocButtons
(JButton run, JButton inter, JButton view) Sets the doc buttons.void
setEncoding
(String encoding) Sets the encoding.void
setFileSelectors
(FileSelector input, FileSelector output, FileSelector xml) Sets the file selectors.void
setInputDir
(String inputDir) Sets the input dir.void
setInputFileFormat
(String inputFileFormat) Sets the input file format.void
setLanguage
(String language) Sets the language.void
setLenient
(Boolean lenient) Sets the lenient.void
setOutputDir
(String outputDir) Sets the output dir.void
setOutputDirForInteractiveMode
(String outputDir, String outputDirToSave) Special case of setOutpuDir needed for interactive mode.void
setTAEfile
(String edir) Sets the TA efile.void
setViewType
(String viewType) Sets the view type.void
Sets the xml tag.
-
Field Details
-
inputFileSelector
The input file selector. -
outputFileSelector
The output file selector. -
xmlFileSelector
The xml file selector. -
runButton
The view button. -
interButton
The view button. -
viewButton
The view button. -
prefs
The prefs. -
taeDir
The tae dir. -
outputDir
The output dir. -
inputDir
The input dir. -
defaultInputDir
The default input dir. -
defaultOutputDir
The default output dir. -
inputFileFormat
The input file format. -
language
The language. -
encoding
The encoding. -
viewType
The view type. -
xmlTag
The xml tag. -
lenient
private boolean lenientThe lenient. -
VIEWTYPE
The Constant VIEWTYPE.- See Also:
-
ENCODING
The Constant ENCODING.- See Also:
-
INPUTFILEFORMAT
The Constant INPUTFILEFORMAT.- See Also:
-
LANGUAGE
The Constant LANGUAGE.- See Also:
-
TAEDESCRIPTOR
The Constant TAEDESCRIPTOR.- See Also:
-
OUTDIR
The Constant OUTDIR.- See Also:
-
INDIR
The Constant INDIR.- See Also:
-
XMLTAG
The Constant XMLTAG.- See Also:
-
LENIENT
The Constant LENIENT.- See Also:
-
-
Constructor Details
-
PrefsMediator
public PrefsMediator()Instantiates a new prefs mediator.
-
-
Method Details
-
restorePreferences
public void restorePreferences()Restore preferences. -
savePreferences
public void savePreferences()Save preferences. -
getInputDir
Gets the input dir.- Returns:
- Returns the inputDir.
-
setInputDir
Sets the input dir.- Parameters:
inputDir
- The inputDir to set.
-
getOutputDir
Gets the output dir.- Returns:
- Returns the outputDir.
-
setOutputDir
Sets the output dir.- Parameters:
outputDir
- The outputDir to set.
-
setOutputDirForInteractiveMode
Special case of setOutpuDir needed for interactive mode. In interactive mode, we append "/interactive_out" to the end, but we don't want to save this in the preferences. To support that, this method takes one parameter which is the output dir to be set and used by the application, and a second parameter to set the directory that is saved to the preferences.- Parameters:
outputDir
- the output dir to setoutputDirToSave
- the output dir to save to the preferences
-
getTAEfile
Gets the TA efile.- Returns:
- Returns the tAEdir.
-
getTAEPath
get the path to the TAE that is where the StyleMap file should be written.- Returns:
- the TAE path
-
getTAEFileNameRoot
Gets the TAE file name root.- Returns:
- the TAE file name root
-
indexOfLastFileSeparator
Gets index of last file separator character in a file path. Supports File.separator but also / on Windows.- Parameters:
path
- the path- Returns:
- index of the last file separator char. Returns -1 if none.
-
setTAEfile
Sets the TA efile.- Parameters:
edir
- set the TAE directory
-
getEncoding
Gets the encoding.- Returns:
- Returns the encoding.
-
setEncoding
Sets the encoding.- Parameters:
encoding
- The encoding to set.
-
getInputFileFormat
Gets the input file format.- Returns:
- Returns the input file format.
-
setInputFileFormat
Sets the input file format.- Parameters:
inputFileFormat
- The input file format to set.
-
getLanguage
Gets the language.- Returns:
- Returns the language.
-
setLanguage
Sets the language.- Parameters:
language
- The language to set.
-
getViewType
Gets the view type.- Returns:
- Returns the view type.
-
setViewType
Sets the view type.- Parameters:
viewType
- The view type to set.
-
getXmlTag
Gets the xml tag.- Returns:
- Returns the xmlTag.
-
setXmlTag
Sets the xml tag.- Parameters:
xmlTag
- The xmlTag to set.
-
getLenient
Gets the lenient.- Returns:
- Returns lenient.
-
setLenient
Sets the lenient.- Parameters:
lenient
- The lenient to set.
-
getStylemapFile
returns the new edited stylemap file.- Returns:
- the stylemap file
-
setDocButtons
Sets the doc buttons.- Parameters:
run
- the runinter
- the interview
- the view
-
setFileSelectors
Sets the file selectors.- Parameters:
input
- the inputoutput
- the outputxml
- the xml
-
fieldFocusLost
public void fieldFocusLost()Field focus lost.
-