de.bsd.x2svg
Class RuntimeParameters

java.lang.Object
  extended by de.bsd.x2svg.RuntimeParameters

public class RuntimeParameters
extends java.lang.Object

Object to hold various passed parameters

Since:
1.0
Author:
hwr@pilhuhn.de

Field Summary
private  java.lang.String comment
          A comment to be printed on the generated SVG
private  boolean debug
           
private  java.lang.String inputFileName
          Name of the input file that should be converted
private  java.lang.String opMode
          Mode of operation - individual for each parser.
private  java.util.List<OutputFormat> outputs
          List of formats into which the generated SVG will be converted
private  java.lang.String[] parserSpecificOptions
          Options specific to each parser.
private  java.lang.String propertiesLocation
          The location of the x2svg.properties file, can be empty - if so this is read from the classpath.
private  java.lang.String svgOutputFile
          Name of the file were the SVG output will be written to
private  java.lang.Boolean withAttributes
          Should the parser also parse attributes if it supports it?
private  java.lang.Boolean withElementComments
          Should the parser also parse comments of elements (and possibly attributes)?
 
Constructor Summary
RuntimeParameters()
          Default constructor to create empty runtime parameters.
RuntimeParameters(RuntimeParameters parameters)
          Create RuntimeParameters based on an existing set of parameters.
 
Method Summary
 void addOutputFormat(OutputFormat outputFormat)
          Add a new OutputFormat to the list of output formats
 java.lang.String getComment()
          A comment that is printed on the generated diagram
 java.lang.String getInputFileName()
          Return the name of the input file that should be converted
 java.lang.String getOpMode()
          Return mode of operation - individual for each parser.
 java.util.List<OutputFormat> getOutputFormats()
          Return the list of defined output formats.
 java.lang.String[] getParserSpecificOptions()
          Get the options that are specific to the current parser.
 java.lang.String getPropertiesLocation()
          Get the location of the x2svg properties file.
 java.lang.String getSvgOutputFile()
          Return the name of the file were the SVG output will be written to
 java.lang.Boolean getWithAttributes()
           
 java.lang.Boolean getWithElementComments()
           
 boolean isDebug()
           
 void setComment(java.lang.String comment)
          A comment that is printed on the generated diagram
 void setDebug(boolean debug)
           
 void setInputFileName(java.lang.String fileName)
          Set the name of the input file that should be converted
 void setOpMode(java.lang.String opMode)
          Set mode of operation - individual for each parser.
 void setParserSpecificOptions(java.lang.String[] options)
          Set the options that are specific to the current parser.
 void setPropertiesLocation(java.lang.String propertiesLocation)
          Set the location of the x2svg properties file.
 void setSvgOutputFile(java.lang.String svgOutputFile)
          Set the name of the file were the SVG output will be written to
 void setWithAttributes(java.lang.Boolean withAttributes)
           
 void setWithElementComments(java.lang.Boolean withElementComments)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputFileName

private java.lang.String inputFileName
Name of the input file that should be converted


svgOutputFile

private java.lang.String svgOutputFile
Name of the file were the SVG output will be written to


opMode

private java.lang.String opMode
Mode of operation - individual for each parser. This is meant for explicit parser selection in case x2svg can not determine the right parser from the file name.

See Also:
InputParser.getMode()

parserSpecificOptions

private java.lang.String[] parserSpecificOptions
Options specific to each parser.

See Also:
InputParser.setParserOptions(String[])

debug

private boolean debug

outputs

private java.util.List<OutputFormat> outputs
List of formats into which the generated SVG will be converted


comment

private java.lang.String comment
A comment to be printed on the generated SVG


propertiesLocation

private java.lang.String propertiesLocation
The location of the x2svg.properties file, can be empty - if so this is read from the classpath.


withAttributes

private java.lang.Boolean withAttributes
Should the parser also parse attributes if it supports it?


withElementComments

private java.lang.Boolean withElementComments
Should the parser also parse comments of elements (and possibly attributes)?

Constructor Detail

RuntimeParameters

public RuntimeParameters()
Default constructor to create empty runtime parameters.


RuntimeParameters

public RuntimeParameters(RuntimeParameters parameters)
Create RuntimeParameters based on an existing set of parameters. (Copy constructor).

Parameters:
parameters - The existing parameter set to copy as a new instance.
Method Detail

isDebug

public boolean isDebug()

setDebug

public void setDebug(boolean debug)

getInputFileName

public java.lang.String getInputFileName()
Return the name of the input file that should be converted

Returns:
the name of the input file to convert

setInputFileName

public void setInputFileName(java.lang.String fileName)
Set the name of the input file that should be converted

Parameters:
fileName - the name/path of the file to convert

getOpMode

public java.lang.String getOpMode()
Return mode of operation - individual for each parser. This is meant for explicit parser selection in case x2svg can not determine the right parser from the file name.

Returns:
the operation mode
See Also:
InputParser.getMode()

setOpMode

public void setOpMode(java.lang.String opMode)
Set mode of operation - individual for each parser. This is meant for explicit parser selection in case x2svg can not determine the right parser from the file name.

Parameters:
opMode - the mode of operation
See Also:
InputParser.getMode()

getParserSpecificOptions

public java.lang.String[] getParserSpecificOptions()
Get the options that are specific to the current parser.

Returns:
The array of Strings that represent options specific to the parser.
See Also:
InputParser.setParserOptions(String[])

setParserSpecificOptions

public void setParserSpecificOptions(java.lang.String[] options)
Set the options that are specific to the current parser.

Parameters:
options - The array of Strings that represent the options for this parser.
See Also:
InputParser.setParserOptions(String[])

getSvgOutputFile

public java.lang.String getSvgOutputFile()
Return the name of the file were the SVG output will be written to

Returns:
file name of the svg file

setSvgOutputFile

public void setSvgOutputFile(java.lang.String svgOutputFile)
Set the name of the file were the SVG output will be written to

Parameters:
svgOutputFile - the new file name of the svg file

getOutputFormats

public java.util.List<OutputFormat> getOutputFormats()
Return the list of defined output formats. This List is never null, but can be empty

Returns:
List of OutputFormat items

addOutputFormat

public void addOutputFormat(OutputFormat outputFormat)
Add a new OutputFormat to the list of output formats

Parameters:
outputFormat - a new OutputFormat

getPropertiesLocation

public java.lang.String getPropertiesLocation()
Get the location of the x2svg properties file.

Returns:
The location of the properties file, null indicates load from classpathl.

setPropertiesLocation

public void setPropertiesLocation(java.lang.String propertiesLocation)
Set the location of the x2svg properties file.

Parameters:
propertiesLocation - The location to set, or null to indicate load from classpath.

getComment

public java.lang.String getComment()
A comment that is printed on the generated diagram

Returns:
the comment

setComment

public void setComment(java.lang.String comment)
A comment that is printed on the generated diagram

Parameters:
comment - the comment to set

getWithAttributes

public java.lang.Boolean getWithAttributes()
Returns:
the withAttributes

setWithAttributes

public void setWithAttributes(java.lang.Boolean withAttributes)
Parameters:
withAttributes - the withAttributes to set

getWithElementComments

public java.lang.Boolean getWithElementComments()
Returns:
the withElementComments

setWithElementComments

public void setWithElementComments(java.lang.Boolean withElementComments)
Parameters:
withElementComments - the withElementComments to set


x2svg version 1.2.1