de.bsd.x2svg.outputConverter
Class OutputFormat

java.lang.Object
  extended by de.bsd.x2svg.outputConverter.OutputFormat

public class OutputFormat
extends java.lang.Object

This class represents an output file plus its type.

Since:
1.1
Author:
hwr@pilhuhn.de

Field Summary
(package private)  java.lang.String directory
           
(package private)  java.lang.String fileName
           
(package private)  boolean noFile
           
(package private)  OutputType type
           
 
Constructor Summary
OutputFormat(OutputType type)
          Construct the output format partially.
OutputFormat(java.lang.String fileName)
          Construct the output format and tries to guess the desired format by the file name suffix
OutputFormat(java.lang.String fileName, OutputType type, boolean isDirectory)
          Construct the output format
 
Method Summary
 java.lang.String getFileName()
          Returns the name of the output file
 OutputType getType()
          Return the file/converter type
 void updateFileName(java.lang.String name)
          Sets the file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileName

java.lang.String fileName

directory

java.lang.String directory

type

OutputType type

noFile

boolean noFile
Constructor Detail

OutputFormat

public OutputFormat(java.lang.String fileName)
Construct the output format and tries to guess the desired format by the file name suffix

Parameters:
fileName - the name of the output file

OutputFormat

public OutputFormat(java.lang.String fileName,
                    OutputType type,
                    boolean isDirectory)
Construct the output format

Parameters:
fileName - the name of the output file
type - the type of the output
isDirectory - Is the passed fileName a real file or a directory?

OutputFormat

public OutputFormat(OutputType type)
Construct the output format partially.

Parameters:
type - the type of the output
Method Detail

getFileName

public java.lang.String getFileName()
Returns the name of the output file

Returns:
the fileName

getType

public OutputType getType()
Return the file/converter type

Returns:
the type

updateFileName

public void updateFileName(java.lang.String name)
Sets the file name. Should only be used when the file name was not given in the constructor.

Parameters:
name - file name
Throws:
java.lang.IllegalStateException - if we already have a file present


x2svg version 1.2.1