Package org.goplanit.io.xml.util
Class PlanitXmlWriterSettings
- java.lang.Object
-
- org.goplanit.io.xml.util.PlanitXmlWriterSettings
-
- Direct Known Subclasses:
PlanitNetworkWriterSettings
,PlanitZoningWriterSettings
public class PlanitXmlWriterSettings extends Object
Settings relevant for persisting Planit Xml output- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected Character
commaSeparator
tuple separator, default is CharacterUtils.COMMAprotected DecimalFormat
decimalFormat
number of decimals to use, default is Precision.DEFAULT_DECIMAL_FORMATprotected Character
decimalSeparator
decimal separator, default is CharacterUtils.DECIMAL_POINTstatic String
DEFAULT_COUNTRY
default destination country to use if none is setprotected org.opengis.referencing.crs.CoordinateReferenceSystem
destinationCoordinateReferenceSystem
the coordinate reference system used for writing entities of this networkprotected Character
tupleSeparator
tuple separator, default is CharacterUtils.SPACE
-
Constructor Summary
Constructors Constructor Description PlanitXmlWriterSettings()
Default constructorPlanitXmlWriterSettings(String outputPathDirectory)
ConstructorPlanitXmlWriterSettings(String outputPathDirectory, String countryName)
ConstructorPlanitXmlWriterSettings(String outputPathDirectory, String fileName, String countryName)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Character
getCommaSeparator()
Separator to use for separating x,y entries of a single coordinate that is being persistedString
getCountry()
Collect country name usedDecimalFormat
getDecimalFormat()
Collect number of decimals used in writing coordinatesCharacter
getDecimalSeparator()
Separator to use for separating decimals from unit changesorg.opengis.referencing.crs.CoordinateReferenceSystem
getDestinationCoordinateReferenceSystem()
Collect the destination CrsString
getFileName()
Collect the file name to useString
getOutputPathDirectory()
The outputPathDirectory usedCharacter
getTupleSeparator()
Separator to use for tuples of coordinates that are being persistedvoid
logSettings()
Convenience method to log all the current settingsvoid
reset()
Reset contentvoid
setCommaSeparator(Character commaSeparator)
Set separatorvoid
setCountry(String countryName)
Set country name usedvoid
setDecimalFormat(DecimalFormat decimalFormat)
Set number of decimals used in writing coordinatesvoid
setDecimalSeparator(Character decimalSeparator)
Set separatorvoid
setDestinationCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem destinationCoordinateReferenceSystem)
Set the destination Crs to use (if not set, network's native Crs will be used, unless the user has specified a specific country for which we have a more appropriate Crs registered)void
setFileName(String fileName)
Set the file name to usevoid
setOutputDirectory(String outputDirectory)
Set the outputDirectory usedvoid
setTupleSeparator(Character tupleSeparator)
Set separator
-
-
-
Field Detail
-
DEFAULT_COUNTRY
public static String DEFAULT_COUNTRY
default destination country to use if none is set
-
decimalFormat
protected DecimalFormat decimalFormat
number of decimals to use, default is Precision.DEFAULT_DECIMAL_FORMAT
-
tupleSeparator
protected Character tupleSeparator
tuple separator, default is CharacterUtils.SPACE
-
commaSeparator
protected Character commaSeparator
tuple separator, default is CharacterUtils.COMMA
-
decimalSeparator
protected Character decimalSeparator
decimal separator, default is CharacterUtils.DECIMAL_POINT
-
destinationCoordinateReferenceSystem
protected org.opengis.referencing.crs.CoordinateReferenceSystem destinationCoordinateReferenceSystem
the coordinate reference system used for writing entities of this network
-
-
Constructor Detail
-
PlanitXmlWriterSettings
public PlanitXmlWriterSettings()
Default constructor
-
PlanitXmlWriterSettings
public PlanitXmlWriterSettings(String outputPathDirectory)
Constructor- Parameters:
outputPathDirectory
- to use
-
PlanitXmlWriterSettings
public PlanitXmlWriterSettings(String outputPathDirectory, String countryName)
Constructor- Parameters:
outputPathDirectory
- to usecountryName
- to use
-
-
Method Detail
-
getOutputPathDirectory
public String getOutputPathDirectory()
The outputPathDirectory used- Returns:
- directory used
-
setOutputDirectory
public void setOutputDirectory(String outputDirectory)
Set the outputDirectory used- Parameters:
outputDirectory
- to use
-
getCountry
public String getCountry()
Collect country name used- Returns:
- country name
-
setCountry
public void setCountry(String countryName)
Set country name used- Parameters:
countryName
- to use
-
getFileName
public String getFileName()
Collect the file name to use- Returns:
- file name to use
-
setFileName
public void setFileName(String fileName)
Set the file name to use- Parameters:
fileName
- to use
-
logSettings
public void logSettings()
Convenience method to log all the current settings
-
getDecimalFormat
public DecimalFormat getDecimalFormat()
Collect number of decimals used in writing coordinates- Returns:
- number of decimals used
-
setDecimalFormat
public void setDecimalFormat(DecimalFormat decimalFormat)
Set number of decimals used in writing coordinates- Parameters:
decimalFormat
- number of decimals
-
getTupleSeparator
public Character getTupleSeparator()
Separator to use for tuples of coordinates that are being persisted- Returns:
- separator
-
setTupleSeparator
public void setTupleSeparator(Character tupleSeparator)
Set separator- Parameters:
tupleSeparator
- to use
-
getCommaSeparator
public Character getCommaSeparator()
Separator to use for separating x,y entries of a single coordinate that is being persisted- Returns:
- separator
-
setCommaSeparator
public void setCommaSeparator(Character commaSeparator)
Set separator- Parameters:
commaSeparator
- to use
-
getDecimalSeparator
public Character getDecimalSeparator()
Separator to use for separating decimals from unit changes- Returns:
- separator
-
setDecimalSeparator
public void setDecimalSeparator(Character decimalSeparator)
Set separator- Parameters:
decimalSeparator
- to use
-
getDestinationCoordinateReferenceSystem
public org.opengis.referencing.crs.CoordinateReferenceSystem getDestinationCoordinateReferenceSystem()
Collect the destination Crs- Returns:
- destination Crs
-
setDestinationCoordinateReferenceSystem
public void setDestinationCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem destinationCoordinateReferenceSystem)
Set the destination Crs to use (if not set, network's native Crs will be used, unless the user has specified a specific country for which we have a more appropriate Crs registered)- Parameters:
destinationCoordinateReferenceSystem
- to use
-
reset
public void reset()
Reset content
-
-