|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.maltparser.core.config.ConfigurationDir
public class ConfigurationDir
This class contains methods for handle the configuration directory.
Field Summary | |
---|---|
protected static int |
BUFFER
|
protected File |
configDirectory
|
protected int |
containerIndex
|
protected String |
createdByMaltParserVersion
|
protected BufferedWriter |
infoFile
|
protected String |
name
|
protected String |
type
|
protected URL |
url
|
protected File |
workingDirectory
|
Constructor Summary | |
---|---|
ConfigurationDir(String name,
String type,
int containerIndex)
Creates a new configuration directory or a configuration directory from a mco-file |
|
ConfigurationDir(URL url)
Creates a configuration directory from a mco-file specified by an URL. |
Method Summary | |
---|---|
protected void |
checkConfigDirectory()
|
protected void |
checkNConvertConfigVersion()
|
void |
copyConfigFile(File in,
File out,
org.maltparser.core.config.version.Versioning versioning)
|
String |
copyToConfig(File source)
Copies a file into the configuration directory. |
String |
copyToConfig(String fileUrl)
|
String |
copyToConfig(URL url)
|
void |
createConfigDirectory()
Creates the configuration directory |
void |
createConfigFile()
Creates the malt configuration file (.mco). |
protected void |
createInfoFile()
|
void |
deleteConfigDirectory()
Removes the configuration directory, if it exists and it contains a .info file. |
void |
echoInfoFile()
Prints the content of the configuration information file to the system logger |
protected void |
finalize()
|
OutputStreamWriter |
getAppendOutputStreamWriter(String fileName)
This method acts the same as getOutputStreamWriter with the difference that the writer append in the file if it already exists instead of deleting the previous content before starting to write. |
File |
getConfigDirectory()
Returns a file handler object for the configuration directory |
JarEntry |
getConfigFileEntry(String fileName)
|
URL |
getConfigFileEntryURL(String fileName)
|
int |
getContainerIndex()
Returns the option container index |
String |
getCreatedByMaltParserVersion()
Returns the version number of MaltParser which created the malt configuration file (.mco) |
HashMap<String,DataFormatInstance> |
getDataFormatInstances()
|
DataFormatManager |
getDataFormatManager()
|
File |
getFile(String fileName)
Returns a file handler object of a file within the configuration directory |
BufferedWriter |
getInfoFileWriter()
Returns a writer to the configuration information file |
InputStreamReader |
getInputStreamReader(String fileName)
Creates an input stream reader for reading a file within the configuration directory. |
InputStreamReader |
getInputStreamReader(String fileName,
String charSet)
Creates an input stream reader for reading a file within the configuration directory |
InputStreamReader |
getInputStreamReaderFromConfigFile(String fileName)
|
InputStreamReader |
getInputStreamReaderFromConfigFileEntry(String fileName,
String charSet)
|
String |
getName()
Returns the name of the configuration directory |
OutputStreamWriter |
getOutputStreamWriter(String fileName)
Creates an output stream writer, where the corresponding file will be included in the configuration directory. |
OutputStreamWriter |
getOutputStreamWriter(String fileName,
String charSet)
Creates an output stream writer, where the corresponding file will be included in the configuration directory |
SymbolTableHandler |
getSymbolTables()
|
String |
getType()
Returns the type of the configuration directory |
URL |
getUrl()
Returns the URL to the malt configuration file (.mco) |
File |
getWorkingDirectory()
Returns a file handler object for the working directory |
void |
initCreatedByMaltParserVersionFromInfoFile()
|
void |
initDataFormat()
|
protected void |
initNameNTypeFromInfoFile(URL url)
|
void |
initWorkingDirectory()
Initialize the working directory |
void |
initWorkingDirectory(String pathPrefixString)
Initialize the working directory according to the path. |
protected void |
setConfigDirectory(File dir)
|
void |
setContainerIndex(int containerIndex)
Sets the option container index |
void |
setCreatedByMaltParserVersion(String createdByMaltParserVersion)
Sets the version number of MaltParser which created the malt configuration file (.mco) |
void |
setDataFormatManager(DataFormatManager dataFormatManager)
|
protected void |
setName(String name)
|
void |
setSymbolTables(SymbolTableHandler symbolTables)
|
protected void |
setType(String type)
|
protected void |
setUrl(URL url)
|
void |
terminate()
Terminates the configuration directory |
void |
unpackConfigFile()
Unpacks the malt configuration file (.mco). |
protected void |
unpackConfigFile(JarInputStream jis)
|
void |
versioning()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int BUFFER
protected File configDirectory
protected String name
protected String type
protected File workingDirectory
protected URL url
protected int containerIndex
protected BufferedWriter infoFile
protected String createdByMaltParserVersion
Constructor Detail |
---|
public ConfigurationDir(URL url) throws MaltChainedException
url
- an URL to a mco-file
MaltChainedException
public ConfigurationDir(String name, String type, int containerIndex) throws MaltChainedException
name
- the name of the configurationtype
- the type of configurationcontainerIndex
- the container index
MaltChainedException
Method Detail |
---|
public void initDataFormat() throws MaltChainedException
MaltChainedException
public OutputStreamWriter getOutputStreamWriter(String fileName, String charSet) throws MaltChainedException
fileName
- a file namecharSet
- a char set
MaltChainedException
public OutputStreamWriter getOutputStreamWriter(String fileName) throws MaltChainedException
fileName
- a file name
MaltChainedException
public OutputStreamWriter getAppendOutputStreamWriter(String fileName) throws MaltChainedException
fileName
- a file name
MaltChainedException
public InputStreamReader getInputStreamReader(String fileName, String charSet) throws MaltChainedException
fileName
- a file namecharSet
- a char set
MaltChainedException
public InputStreamReader getInputStreamReader(String fileName) throws MaltChainedException
fileName
- a file name
MaltChainedException
public JarEntry getConfigFileEntry(String fileName) throws MaltChainedException
MaltChainedException
public InputStreamReader getInputStreamReaderFromConfigFileEntry(String fileName, String charSet) throws MaltChainedException
MaltChainedException
public InputStreamReader getInputStreamReaderFromConfigFile(String fileName) throws MaltChainedException
MaltChainedException
public File getFile(String fileName) throws MaltChainedException
fileName
- a file name
MaltChainedException
public URL getConfigFileEntryURL(String fileName) throws MaltChainedException
MaltChainedException
public String copyToConfig(File source) throws MaltChainedException
source
- a path to file
MaltChainedException
public String copyToConfig(String fileUrl) throws MaltChainedException
MaltChainedException
public String copyToConfig(URL url) throws MaltChainedException
MaltChainedException
public void deleteConfigDirectory() throws MaltChainedException
MaltChainedException
public File getConfigDirectory()
protected void setConfigDirectory(File dir)
public void createConfigDirectory() throws MaltChainedException
MaltChainedException
protected void checkConfigDirectory() throws MaltChainedException
MaltChainedException
protected void createInfoFile() throws MaltChainedException
MaltChainedException
public BufferedWriter getInfoFileWriter() throws MaltChainedException
MaltChainedException
public void createConfigFile() throws MaltChainedException
MaltChainedException
public void copyConfigFile(File in, File out, org.maltparser.core.config.version.Versioning versioning) throws MaltChainedException
MaltChainedException
protected void initNameNTypeFromInfoFile(URL url) throws MaltChainedException
MaltChainedException
public void echoInfoFile() throws MaltChainedException
MaltChainedException
public void unpackConfigFile() throws MaltChainedException
MaltChainedException
protected void unpackConfigFile(JarInputStream jis) throws MaltChainedException
MaltChainedException
public String getName()
protected void setName(String name)
public String getType()
protected void setType(String type)
public File getWorkingDirectory()
public void initWorkingDirectory() throws MaltChainedException
MaltChainedException
public void initWorkingDirectory(String pathPrefixString) throws MaltChainedException
pathPrefixString
- the path to the working directory
MaltChainedException
public URL getUrl()
protected void setUrl(URL url)
public int getContainerIndex()
public void setContainerIndex(int containerIndex)
containerIndex
- a option container indexpublic String getCreatedByMaltParserVersion()
public void setCreatedByMaltParserVersion(String createdByMaltParserVersion)
createdByMaltParserVersion
- a version number of MaltParserpublic void initCreatedByMaltParserVersionFromInfoFile() throws MaltChainedException
MaltChainedException
public void versioning() throws MaltChainedException
MaltChainedException
protected void checkNConvertConfigVersion() throws MaltChainedException
MaltChainedException
public void terminate() throws MaltChainedException
MaltChainedException
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public SymbolTableHandler getSymbolTables()
public void setSymbolTables(SymbolTableHandler symbolTables)
public DataFormatManager getDataFormatManager()
public void setDataFormatManager(DataFormatManager dataFormatManager)
public HashMap<String,DataFormatInstance> getDataFormatInstances()
|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |