public final class XTCEDatabase extends XTCEDatabaseParser
| Constructor and Description |
|---|
XTCEDatabase(File dbFile,
boolean validateOnLoad,
boolean applyXIncludes,
boolean readOnly)
Constructor for use with an XTCE database file on the filesystem.
|
XTCEDatabase(InputStream istream,
File dbFile,
boolean validateOnLoad,
boolean applyXIncludes,
boolean readOnly)
Constructor for use with an XTCE database file from a stream.
|
XTCEDatabase(String topLevelSpaceSystemName)
Constructor for creating a new XTCE database object based on a top
level SpaceSystem element name.
|
XTCEDatabase(URL dbLocation,
boolean validateOnLoad,
boolean applyXIncludes,
boolean readOnly)
Constructor for use with an XTCE database file on the filesystem.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSpaceSystem(String name,
String path)
Function to add a new Space System element to the XTCE document
structure.
|
void |
deleteSpaceSystem(String ssPath)
Deletes a SpaceSystem element from the current XTCE document.
|
List<XTCETMContainer> |
findContainers(XTCEParameter parameter)
Retrieve the containers in the XTCE document that directly reference
an entry in their manifest that includes the provided Parameter.
|
org.omg.space.xtce.NameDescriptionType |
getArgumentTypeReference(String typePath)
Retrieve the type reference from the JAXB generated objects for a
particular TC Argument fully qualified type object path in the XTCE
data model.
|
XTCETMContainer |
getContainer(String contFullPath)
Retrieve a specific container in the XTCE database by the fully
qualified path name to the container, using XTCE document path rules.
|
List<XTCETMContainer> |
getContainers()
Function to retrieve all of the Telemetry Containers that are defined
in the XTCE document.
|
List<XTCETMContainer> |
getContainers(String nameGlob)
Retrieve a List of SequenceContainers that match a user provided string
glob, modeled as XTCETMContainer objects.
|
XTCESpaceSystemMetrics |
getMetrics()
Retrieve the metrics for the XTCE document represented by this object.
|
List<XTCEParameter> |
getParameters()
Function to retrieve all of the Parameters that are defined in the XTCE
document.
|
org.omg.space.xtce.NameDescriptionType |
getParameterTypeReference(String typePath)
Retrieve the type reference from the JAXB generated objects for a
particular TM Parameter fully qualified type object path in the XTCE
data model.
|
XTCESpaceSystem |
getRootSpaceSystem()
Retrieve an XTCESpaceSystem object that represents the root SpaceSystem
element of this XTCE document.
|
XTCESpaceSystem |
getSpaceSystem(String fullPath)
Retrieve an arbitrary SpaceSystem wrapped element from the document.
|
List<XTCESpaceSystem> |
getSpaceSystemTree()
Retrieve a list of all the SpaceSystem elements in this XTCE document,
wrapped inside XTCESpaceSystem objects.
|
XTCETMStream |
getStream(String name)
Function to retrieve a the Telemetry Streams that is defined in the
XTCE document.
|
List<XTCETMStream> |
getStreams()
Function to retrieve all of the Telemetry Streams that are defined
in the XTCE document.
|
XTCETelecommand |
getTelecommand(String contFullPath)
Retrieve a specific telecommand in the XTCE database by the fully
qualified path name to the telecommand, using XTCE document path rules.
|
List<XTCEParameter> |
getTelecommandParameters()
Function to retrieve all of the Telecommand Parameters that are defined
in the XTCE document.
|
List<XTCEParameter> |
getTelecommandParameters(String nameGlob)
Function to retrieve all of the Telecommand Parameters that are defined
in the XTCE document that match a glob style name pattern.
|
List<XTCEParameter> |
getTelecommandParameters(String aliasGlob,
String aliasNameSpace)
Function to retrieve all of the Telecommand Parameters that are defined
in the XTCE document that match a glob style alias pattern in a
specified namespace.
|
List<XTCETelecommand> |
getTelecommands()
Function to retrieve all of the Telecommands that are defined
in the XTCE document.
|
List<XTCETelecommand> |
getTelecommands(String nameGlob)
Retrieve a List of Telecommands that match a user provided string
glob, modeled as XTCETelecommand objects.
|
List<XTCEParameter> |
getTelemetryParameters()
Function to retrieve all of the Telemetry Parameters that are defined
in the XTCE document.
|
List<XTCEParameter> |
getTelemetryParameters(String nameGlob)
Function to retrieve all of the Telemetry Parameters that are defined
in the XTCE document that match a glob style name pattern.
|
List<XTCEParameter> |
getTelemetryParameters(String aliasGlob,
String aliasNameSpace)
Function to retrieve all of the Telemetry Parameters that are defined
in the XTCE document that match a glob style alias pattern in a
specified namespace.
|
XTCEContainerContentModel |
processContainer(XTCETMContainer container,
BitSet binaryData)
Function to decompose an XTCETMContainer object into a simple array of
entries that an application can iterate over without the need to
resolve XTCE data model references, included additional containers,
base containers, and conditional processing.
|
XTCEContainerContentModel |
processContainer(XTCETMContainer container,
byte[] bytes)
Function to decompose an XTCETMContainer object into a simple array of
entries that an application can iterate over without the need to
resolve XTCE data model references, included additional containers,
base containers, and conditional processing.
|
XTCEContainerContentModel |
processContainer(XTCETMContainer container,
InputStream stream)
Function to decompose an XTCETMContainer object into a simple array of
entries that an application can iterate over without the need to
resolve XTCE data model references, included additional containers,
base containers, and conditional processing.
|
XTCEContainerContentModel |
processContainer(XTCETMContainer container,
List<XTCEContainerEntryValue> userValues,
boolean showAllConditions)
Function to decompose an XTCETMContainer object into a simple array of
entries that an application can iterate over without the need to
resolve XTCE data model references, included additional containers,
base containers, and conditional processing.
|
XTCETelecommandContentModel |
processTelecommand(XTCETelecommand telecommand,
BitSet binaryData)
Function to decompose an XTCETelecommand object into a simple array of
entries that an application can iterate over without the need to
resolve XTCE data model references, included additional containers,
base containers, and conditional processing.
|
XTCETelecommandContentModel |
processTelecommand(XTCETelecommand telecommand,
byte[] bytes)
Function to decompose an XTCETelecommand object into a simple array of
entries that an application can iterate over without the need to
resolve XTCE data model references, included additional containers,
base containers, and conditional processing.
|
XTCETelecommandContentModel |
processTelecommand(XTCETelecommand telecommand,
InputStream stream)
Function to decompose an XTCETelecommand object into a simple array of
entries that an application can iterate over without the need to
resolve XTCE data model references, included additional containers,
base containers, and conditional processing.
|
XTCETelecommandContentModel |
processTelecommand(XTCETelecommand tcObject,
List<XTCEContainerEntryValue> userValues,
boolean showAllConditions)
Function to decompose an XTCETelecommand object into a simple array of
entries that an application can iterate over without the need to
resolve XTCE data model references, included additional containers,
base containers, and conditional processing.
|
void |
save(File dbFile)
Function to save the currently loaded database file.
|
evaluateXPathQuery, getChanged, getDocument, getDocumentElement, getDocumentWarnings, getErrorCount, getFilename, getNamespaceFromDocument, getSchemaFromDocument, isReadOnly, loadDatabase, loadDatabase, loadDatabase, newDatabase, normalizeDocument, removeDefaultAttribute, renameElement, saveDatabase, setChanged, setFilename, updateHistorySet, validateDocumentpublic XTCEDatabase(URL dbLocation, boolean validateOnLoad, boolean applyXIncludes, boolean readOnly) throws XTCEDatabaseException
dbLocation - URL object containing the location of the XTCE
document to load.validateOnLoad - boolean indicating if the XSD validation should be
performed during the loading.applyXIncludes - boolean indicating if the XInclude processing for
the loaded file should be applied or ignored.readOnly - boolean indicating if the document should be opened in
a read-only context, which is faster because only the JAXB structure is
created, avoiding the need to build the Document Object Model that is
needed for round trip processing.XTCEDatabaseException - in the event that the file could not be
successfully loaded in a valid state. This can be partly bypassed by
not enabling the XSD validation, which is not recommended because it
may de-stabilize the application using this data file.public XTCEDatabase(File dbFile, boolean validateOnLoad, boolean applyXIncludes, boolean readOnly) throws XTCEDatabaseException
dbFile - File object containing the name and path to the XTCE
database file to load and optionally validate.validateOnLoad - boolean indicating if the XSD validation should be
performed during the loading.applyXIncludes - boolean indicating if the XInclude processing for
the loaded file should be applied or ignored.readOnly - boolean indicating if the document should be opened in
a read-only context, which is faster because only the JAXB structure is
created, avoiding the need to build the Document Object Model that is
needed for round trip processing.XTCEDatabaseException - in the event that the file could not be
successfully loaded in a valid state. This can be partly bypassed by
not enabling the XSD validation, which is not recommended because it
may de-stabilize the application using this data file.public XTCEDatabase(InputStream istream, File dbFile, boolean validateOnLoad, boolean applyXIncludes, boolean readOnly) throws XTCEDatabaseException
istream - InputStream containing the stream to read the data from.dbFile - File containing the name and path to the XTCE
database file to load and optionally validate.validateOnLoad - boolean indicating if the XSD validation should be
performed during the loading.applyXIncludes - boolean indicating if the XInclude processing for
the loaded file should be applied or ignored.readOnly - boolean indicating if the document should be opened in
a read-only context, which is faster because only the JAXB structure is
created, avoiding the need to build the Document Object Model that is
needed for round trip processing.XTCEDatabaseException - in the event that the file could not be
successfully loaded in a valid state. This can be partly bypassed by
not enabling the XSD validation, which is not recommended because it
may de-stabilize the application using this data file.public XTCEDatabase(String topLevelSpaceSystemName) throws XTCEDatabaseException
topLevelSpaceSystemName - String containing the name of the top
level SpaceSystem element to create a new and empty XTCE database.XTCEDatabaseException - in the event that the name being used
cannot be a name for the top level SpaceSystem element. Examine the
exception message for more details on the cause.public XTCESpaceSystemMetrics getMetrics()
public void save(File dbFile) throws XTCEDatabaseException
dbFile - File object containing the file and path for which to save
the file containing the XTCE document.XTCEDatabaseException - thrown in the event that the file cannot
be saved. The caller should inspect the message inside the exception
for more specific details on the cause of this error.public XTCESpaceSystem getSpaceSystem(String fullPath)
fullPath - String containing the full path to the XTCE SpaceSystem
element using the fully qualified UNIX style path rules of an XTCE
reference.public XTCESpaceSystem getRootSpaceSystem()
public List<XTCESpaceSystem> getSpaceSystemTree()
public void addSpaceSystem(String name, String path) throws XTCEDatabaseException
name - String containing the name of the Space System to add.path - String containing the fully qualified XTCE UNIX style path
to the new Space System in the hierarchy.XTCEDatabaseException - thrown in the event that this add method
is called for a root SpaceSystem element or the desired name conflicts
with another SpaceSystem element that already exists.public void deleteSpaceSystem(String ssPath) throws XTCEDatabaseException
ssPath - String containing the fully qualified path to the XTCE
SpaceSystem element that should be removed from the data model
structure.XTCEDatabaseException - thrown in the event that this method is
called to remove the root SpaceSystem or the SpaceSystem element to be
removed cannot be located (as in, it does not exist).public List<XTCEParameter> getTelemetryParameters()
public List<XTCEParameter> getTelemetryParameters(String nameGlob)
nameGlob - String containing a precise name or a glob of potential
names.public List<XTCEParameter> getTelemetryParameters(String aliasGlob, String aliasNameSpace)
aliasGlob - String containing a precise alias or a glob of
potential alias strings.aliasNameSpace - String containing the namespace of the alias in
the XTCE data model.public List<XTCEParameter> getTelecommandParameters()
public List<XTCEParameter> getTelecommandParameters(String nameGlob)
nameGlob - String containing a precise name or a glob of potential
names.public List<XTCEParameter> getTelecommandParameters(String aliasGlob, String aliasNameSpace)
aliasGlob - String containing a precise alias or a glob of
potential alias strings.aliasNameSpace - String containing the namespace of the alias in
the XTCE data model.public List<XTCEParameter> getParameters()
public List<XTCETMContainer> getContainers()
public XTCETMContainer getContainer(String contFullPath) throws XTCEDatabaseException
contFullPath - String containing the fully qualified path to the
container desired.XTCEDatabaseException - thrown in the event that the container
cannot be located using the provided path.public List<XTCETMContainer> getContainers(String nameGlob)
nameGlob - String containing a glob style matching pattern to match
against the container names.public List<XTCETelecommand> getTelecommands()
public List<XTCETelecommand> getTelecommands(String nameGlob)
nameGlob - String containing a glob style matching pattern to match
against the telecommand names.public XTCETelecommand getTelecommand(String contFullPath) throws XTCEDatabaseException
contFullPath - String containing the fully qualified path to the
telecommand desired.XTCEDatabaseException - thrown in the event that the telecommand
cannot be located using the provided path.public List<XTCETMStream> getStreams()
public XTCETMStream getStream(String name) throws XTCEDatabaseException
name - String containing a specific stream name to locate.XTCEDatabaseException - in the event that the stream does not
exist or does not process correctly. Interrogate the reason in the
exception for more information.public XTCEContainerContentModel processContainer(XTCETMContainer container, List<XTCEContainerEntryValue> userValues, boolean showAllConditions) throws XTCEDatabaseException
container - XTCETMContainer object containing the container/packet
that the caller wishes to decompose.userValues - List of XTCEContainerEntryValue objects that
represent desired setpoints for parameters in the container. This
permits the caller to decompose a specific packet instance from a
container by specifying values for parameters that satisfy include
conditions for variable content. Restriction values for Base Container
portions are automatically applied and do not need to be supplied by
the caller.showAllConditions - boolean indicating if the returned content
model should provide an array of entry results that include information
only rows. These information only rows consist of rows to announce the
start of a new Container or a new Aggregate. If false, only those rows
will be returned for which a concrete start bit and length exist.XTCEDatabaseException - thrown in the event that it is not
possible to decompose the container completely due to bad references in
the XTCE document.public XTCEContainerContentModel processContainer(XTCETMContainer container, BitSet binaryData) throws XTCEDatabaseException
container - XTCETMContainer object containing the container/packet
that the caller wishes to decompose.binaryData - BitSet containing the container binary encoded data
so that the output object contains entries with actual values from a
real binary image.XTCEDatabaseException - thrown in the event that it is not
possible to decompose the container completely due to bad references in
the XTCE document.public XTCEContainerContentModel processContainer(XTCETMContainer container, byte[] bytes) throws XTCEDatabaseException
container - XTCETMContainer object containing the container/packet
that the caller wishes to decompose.bytes - byte[] containing the container binary encoded data
so that the output object contains entries with actual values from a
real binary image.XTCEDatabaseException - thrown in the event that it is not
possible to decompose the container completely due to bad references in
the XTCE document.public XTCEContainerContentModel processContainer(XTCETMContainer container, InputStream stream) throws XTCEDatabaseException
container - XTCETMContainer object containing the container/packet
that the caller wishes to decompose.stream - InputStream containing the container binary encoded data
so that the output object contains entries with actual values from a
real binary image.XTCEDatabaseException - thrown in the event that it is not
possible to decompose the container completely due to bad references in
the XTCE document, or if the stream throws an IOException.public XTCETelecommandContentModel processTelecommand(XTCETelecommand tcObject, List<XTCEContainerEntryValue> userValues, boolean showAllConditions) throws XTCEDatabaseException
tcObject - XTCETelecommand object containing the telecommand
that the caller wishes to decompose.userValues - List of XTCEContainerEntryValue objects that
represent desired setpoints for arguments and/or parameters in the
telecommand container. This permits the caller to decompose a specific
telecommand instance from a more general telecommand by specifying
values for parameters that satisfy include conditions for variable
content. Restriction values for Base MetaComamand portions are
automatically applied and do not need to be supplied by the caller.showAllConditions - boolean indicating if the returned content
model should provide an array of entry results that include information
only rows. These information only rows consist of rows to announce the
start of a new Container or a new Aggregate. If false, only those rows
will be returned for which a concrete start bit and length exist.XTCEDatabaseException - thrown in the event that it is not
possible to decompose the container completely due to bad references in
the XTCE document.public XTCETelecommandContentModel processTelecommand(XTCETelecommand telecommand, BitSet binaryData) throws XTCEDatabaseException
telecommand - XTCETelecommand object containing the telecommand
that the caller wishes to decompose.binaryData - BitSet containing the telecommand binary encoded data
so that the output object contains entries with actual values from a
real binary image.XTCEDatabaseException - thrown in the event that it is not
possible to decompose the telecommand completely due to bad references
in the XTCE document.public XTCETelecommandContentModel processTelecommand(XTCETelecommand telecommand, byte[] bytes) throws XTCEDatabaseException
telecommand - XTCETelecommand object containing the telecommand
that the caller wishes to decompose.bytes - byte[] containing the container binary encoded data
so that the output object contains entries with actual values from a
real binary image.XTCEDatabaseException - thrown in the event that it is not
possible to decompose the container completely due to bad references in
the XTCE document.public XTCETelecommandContentModel processTelecommand(XTCETelecommand telecommand, InputStream stream) throws XTCEDatabaseException
telecommand - XTCETelecommand object containing the telecommand
that the caller wishes to decompose.stream - InputStream containing the container binary encoded data
so that the output object contains entries with actual values from a
real binary image.XTCEDatabaseException - thrown in the event that it is not
possible to decompose the container completely due to bad references in
the XTCE document, or if the stream throws an IOException.public List<XTCETMContainer> findContainers(XTCEParameter parameter)
parameter - XTCEParameter object to find in the containers defined
in this XTCE database document.public org.omg.space.xtce.NameDescriptionType getParameterTypeReference(String typePath)
typePath - String containing the UNIX style fully qualified path
to the TM Parameter type object.public org.omg.space.xtce.NameDescriptionType getArgumentTypeReference(String typePath)
typePath - String containing the UNIX style fully qualified path
to the TC Argument type object.Copyright © 2015–2019. All rights reserved.