public class AppProperties<L extends SV_DocumentLoader> extends Object
Properties and options for SVG2Vector applications.
| Modifier and Type | Field and Description |
|---|---|
static int |
P_OPTION_DEAILS
Print option details.
|
static int |
P_OPTION_ERROR
Print option error.
|
static int |
P_OPTION_PROGRESS
Print option progress.
|
static int |
P_OPTION_QUIET
Print option quiet.
|
static int |
P_OPTION_VERBOSE
Print option verbose.
|
static int |
P_OPTION_WARNING
Print option warning.
|
static String |
SUBST_PATTERN_ID
Substitution pattern for layers using layer identifier (id) in output file names.
|
static String |
SUBST_PATTERN_INDEX
Substitution pattern for layers using layer index in output file names.
|
protected ArrayList<String> |
warnings
List of warning messages collected during process.
|
| Constructor and Description |
|---|
AppProperties(SvgTargets[] targets,
L loader) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOption(ApplicationOption<?> option)
Adds an application option.
|
boolean |
canWriteFiles()
Tests if the application is allowed to write output files and directories.
|
boolean |
doesCreateDirectories()
Returns the create-directories flag.
|
boolean |
doesKeepTempArtifacts()
Tests if the application should keep (not remove) temporary artifacts (files and directories).
|
boolean |
doesLayers()
Tests if the properties are set to process layers.
|
boolean |
doesNoLayers()
Tests if the properties are set to process for a single output file, not processing patterns.
|
boolean |
doesSimulate()
Returns the simulation flag.
|
boolean |
doesTextAsShape()
Returns the text-as-shape flag as set by CLI.
|
ApplicationOption<?>[] |
getAppOptions()
Returns the list of added application options.
|
String |
getDout()
Returns the output directory name for processing layers.
|
File |
getDoutFile()
Returns the output directory file for processing layers.
|
String |
getFinFn()
Returns the input file name.
|
String |
getFnOut(Map.Entry<String,Integer> entry)
Returns a file name when dealing with layers.
|
String |
getFnOutNoDir(Map.Entry<String,Integer> entry)
Returns a file name when dealing with layers without any directory element.
|
File |
getFoutFile()
Returns the file for a single output file when not processing layers.
|
String |
getFoutFn()
Returns the file name for a single output file when not processing layers.
|
String |
getFoutPattern()
Returns the generated pattern for output files.
|
L |
getLoader()
Returns the document loader.
|
int |
getMsgMode()
Returns the message mode.
|
SvgTargets[] |
getSupportedTargetts()
Returns the supported targets.
|
SvgTargets |
getTarget()
Returns the application target.
|
String |
getTargetValue()
Returns the set value of the target option.
|
ArrayList<String> |
getWarnings()
Returns current warnings.
|
boolean |
processLayers()
Returns the flag for processing layers individually.
|
String |
setInput()
Tests input file settings and loads it.
|
void |
setMessageMode()
Sets the message mode according to CLI settings.
|
String |
setOutput()
Tests all CLI options that influence output names and sets the output name
|
public static int P_OPTION_QUIET
Print option quiet.
public static int P_OPTION_ERROR
Print option error.
public static int P_OPTION_WARNING
Print option warning.
public static int P_OPTION_PROGRESS
Print option progress.
public static int P_OPTION_DEAILS
Print option details.
public static int P_OPTION_VERBOSE
Print option verbose.
public static String SUBST_PATTERN_INDEX
Substitution pattern for layers using layer index in output file names.
public static String SUBST_PATTERN_ID
Substitution pattern for layers using layer identifier (id) in output file names.
public AppProperties(SvgTargets[] targets, L loader)
public void addOption(ApplicationOption<?> option)
Adds an application option.
option - new option, ignored if nullpublic boolean doesLayers()
Tests if the properties are set to process layers.
public boolean doesNoLayers()
Tests if the properties are set to process for a single output file, not processing patterns.
public boolean doesSimulate()
Returns the simulation flag.
public boolean canWriteFiles()
Tests if the application is allowed to write output files and directories.
public boolean doesCreateDirectories()
Returns the create-directories flag.
public boolean doesTextAsShape()
Returns the text-as-shape flag as set by CLI.
public ApplicationOption<?>[] getAppOptions()
Returns the list of added application options.
public String getDout()
Returns the output directory name for processing layers.
public File getDoutFile()
Returns the output directory file for processing layers.
public String getFinFn()
Returns the input file name.
public String getFnOut(Map.Entry<String,Integer> entry)
Returns a file name when dealing with layers.
entry - file name, null if entry or any parts was null or if not set to process layerspublic String getFnOutNoDir(Map.Entry<String,Integer> entry)
Returns a file name when dealing with layers without any directory element.
entry - file name, null if entry or any parts was null or if not set to process layerspublic String getFoutFn()
Returns the file name for a single output file when not processing layers.
public File getFoutFile()
Returns the file for a single output file when not processing layers.
public String getFoutPattern()
Returns the generated pattern for output files.
public L getLoader()
Returns the document loader.
public int getMsgMode()
Returns the message mode.
public SvgTargets[] getSupportedTargetts()
Returns the supported targets.
public SvgTargets getTarget()
Returns the application target.
public String getTargetValue()
Returns the set value of the target option.
public ArrayList<String> getWarnings()
Returns current warnings.
public boolean processLayers()
Returns the flag for processing layers individually.
public String setInput()
Tests input file settings and loads it.
public void setMessageMode()
Sets the message mode according to CLI settings.
public String setOutput()
Tests all CLI options that influence output names and sets the output name
public boolean doesKeepTempArtifacts()
Tests if the application should keep (not remove) temporary artifacts (files and directories).
Copyright © 2012–2017. All rights reserved.