public class XTCEDatabaseCompressor extends XTCEDatabaseParser
| Constructor and Description |
|---|
XTCEDatabaseCompressor(File file,
Properties options)
Constructor
Create and initialize an instance of the XTCE Database Compressor for
XML document compression.
|
| Modifier and Type | Method and Description |
|---|---|
long |
compress()
Perform all of the compression steps except saving the result.
|
long |
compressAdditionalAttributes()
Compress additional attributes that have default values.
|
long |
compressCalibrationTestAttributes()
Compress calibration test attributes used in several elements.
|
long |
compressContainerStartBits()
Compress location elements in containers where the start bit provided
is the same as it would have been using the default of 0 past end of
previous item.
|
long |
compressDuplicateTypes()
Compress Type elements for Parameter and Argument that can be
considered duplicate when refactoring is possible.
|
long |
compressEmptyUnitSets()
Compress the empty UnitSet elements by removing them to reduce size.
|
long |
compressEncodingAttributes()
Compress Raw Data Encoding attributes.
|
long |
compressIdentityCalibrators()
Remove identity calibrators that have no effect on the calibrated
value.
|
long |
compressListsAndSets()
Remove List and Set element variants that are unnecessary because there
is only 1 child element and that element is valid outside the grouping.
|
long |
compressParameterPropertiesAttributes()
Compress ParameterProperties attributes and remove the element if there
is no additional content.
|
long |
compressSimpleEnumerations()
Compress simple enumeration types to boolean types.
|
long |
compressValidRangeTruisms()
Compress ValidRange specifications that are nothing more than truisms
when taking into account the size of the encoding.
|
List<String> |
getMessages()
Retrieve the messages that were generated, if any, during the file
compression activity.
|
boolean |
save()
Conclude the compression by saving the XML content to an
automatically generated filename.
|
boolean |
save(File xmlFile)
Conclude the compression by saving the XML content to a provided
file.
|
evaluateXPathQuery, getChanged, getDocument, getDocumentElement, getDocumentWarnings, getErrorCount, getFilename, getNamespaceFromDocument, getSchemaFromDocument, isReadOnly, loadDatabase, loadDatabase, loadDatabase, newDatabase, normalizeDocument, removeDefaultAttribute, renameElement, saveDatabase, setChanged, setFilename, updateHistorySet, validateDocumentpublic XTCEDatabaseCompressor(File file, Properties options) throws XTCEDatabaseException
file - File containing the XTCE database XML file to load and use
for the conversion operation.options - Properties containing the compression options.XTCEDatabaseException - thrown in the event that the file cannot
be suitably loaded for conversion.public List<String> getMessages()
public long compress()
public long compressEncodingAttributes()
public long compressParameterPropertiesAttributes()
public long compressCalibrationTestAttributes()
public long compressListsAndSets()
public long compressIdentityCalibrators()
public long compressSimpleEnumerations()
public long compressValidRangeTruisms()
public long compressDuplicateTypes()
public long compressContainerStartBits()
public long compressAdditionalAttributes()
public long compressEmptyUnitSets()
public boolean save()
public boolean save(File xmlFile)
xmlFile - File containing the path and name to the target filename
to save.Copyright © 2015–2019. All rights reserved.