Class XtceDb
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Mdb
It contains a SpaceSystem as defined in the Xtce schema and has lots of hashes to help find things quickly
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,ArgumentType> protected HashMap<String,MetaCommand> protected Map<String,ParameterType> protected Map<String,SequenceContainer> protected HashMap<String,SpaceSystem> static final Stringstatic final Stringstatic final Stringstatic final StringNamespaces system parameters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddMetaCommand(MetaCommand c, boolean addSpacesystem) Adds a new command definition to the XTCE db.voidaddSpaceSystem(SpaceSystem system) Adds a newSpaceSystemto the XTCE database.voidCalled after the database has been populated to build the maps for quickly finding thingsbooleancontainsNamespace(String namespace) protected voiddoAddArgumentType(List<ArgumentType> atypeList, boolean createSpaceSystem) Adds new argument types to the XTCE db.protected voiddoAddParameter(Parameter p, boolean addSpaceSystem, boolean addParameterType) protected voiddoAddParameters(List<Parameter> newparams, boolean addSpaceSystems, boolean addParameterTypes) Adds a list of new parameters to the XTCE db.protected voiddoAddParameterType(List<ParameterType> ptypeList, boolean createSpaceSystem) Adds new parameter types to the XTCE db.getAlgorithm(String qualifiedName) getAlgorithm(String namespace, String name) getArgumentType(String qualifiedName) Returns an argument type with the given qualified name or null if it does not existgetIndirectParameterRefEntries(String namespace) Retrieve the list ofIndirectParameterRefEntryfor a given alias namespace.getInheritingContainers(SequenceContainer container) Get the list of containers inheriting from the given containergetMetaCommand(String qualifiedName) Returns a meta command by fully qualified name.getMetaCommand(String namespace, String name) Returns a command based on a name in a namespaceReturns the list of MetaCommmands in the XTCE database<T extends NonStandardData<T>>
TgetNonStandardDataOfType(Class<T> clazz) getParameter(String qualifiedName) returns the parameter with the given qualified name or null if it does not existgetParameter(String namespace, String name) getParameterType(String qualifiedName) getParameterType(String namespace, String name) getSequenceContainer(String qualifiedName) getSequenceContainer(String namespace, String name) getSpaceSystem(String qualifiedName) getSpaceSystem(String namespace, String name) Returns a collection of all theSpaceSystemobjects in the XTCE database.static booleanisSystemParameter(String fqn) Checks if a fully qualified name is the name of a system parameter.static booleanChecks if the named object refers to a system parameter: either the namespace starts withYAMCS_SPACESYSTEM_NAMEor there is no namespace and the fully qualified name starts withYAMCS_SPACESYSTEM_NAMEvoidprint(PrintStream out) voidstatic Yamcs.NamedObjectIdtoNamedObjectId(String qualifiedName)
-
Field Details
-
YAMCS_SPACESYSTEM_NAME
Namespaces system parameters- See Also:
-
YAMCS_CMD_SPACESYSTEM_NAME
- See Also:
-
YAMCS_CMDARG_SPACESYSTEM_NAME
- See Also:
-
YAMCS_CMDHIST_SPACESYSTEM_NAME
- See Also:
-
spaceSystems
-
sequenceContainers
-
parameters
-
parameterTypes
-
argumentTypes
-
algorithms
-
commands
-
-
Constructor Details
-
XtceDb
-
-
Method Details
-
getSequenceContainer
-
getSequenceContainer
-
getSequenceContainer
-
getParameter
returns the parameter with the given qualified name or null if it does not exist -
toNamedObjectId
-
getParameter
-
getParameter
-
getParameterType
-
getArgumentType
Returns an argument type with the given qualified name or null if it does not existNote that not all argument types have qualified names, some are used only locally in the command definitions and are never registered at the global level
-
getParameterType
-
getParameterType
-
getRootSequenceContainer
-
setRootSequenceContainer
-
getAlgorithm
-
getAlgorithm
-
getAlgorithm
-
getAlgorithms
-
getParameters
-
getParameterTypes
-
containsNamespace
-
getNamespaces
-
getMetaCommand
Returns a meta command by fully qualified name.- Parameters:
qualifiedName- - fully qualified name of the command to be returned.- Returns:
- the meta command having the given qualified name. If no such command exists,
nullis returned.
-
getMetaCommand
Returns a command based on a name in a namespace- Parameters:
namespace-name-- Returns:
- the meta command having the given name in the given namespace. If no such meta command exists,
nullis returned.
-
getMetaCommand
-
getMetaCommands
Returns the list of MetaCommmands in the XTCE database- Returns:
-
getRootSpaceSystem
-
getSpaceSystem
-
getSpaceSystem
-
getSpaceSystem
-
getSequenceContainers
-
getParameterEntries
- Returns:
- list of ParameterEntry corresponding to a given parameter or
nullif no such entry exists.
-
getContainerEntries
- Returns:
- list of ContainerEntry corresponding to a given sequence container or
nullif no such entry exists.
-
getParameterNames
-
getNonStandardDataOfType
-
getNonStandardData
-
buildIndexMaps
public void buildIndexMaps()Called after the database has been populated to build the maps for quickly finding things -
getInheritingContainers
Get the list of containers inheriting from the given container- Parameters:
container-- Returns:
-
doAddParameter
-
doAddParameters
protected void doAddParameters(List<Parameter> newparams, boolean addSpaceSystems, boolean addParameterTypes) Adds a list of new parameters to the XTCE db. If createSpaceSystem is true, also create the Space Systems where these parameters belong.Throws a IllegalArgumentException if:
- createSpaceSystem is false and the Space Systems do not exist.
- the parameter with the given qualified name already exist
- Parameters:
newparams- - the list of parameters to be addedaddParameterTypes- - if true, add also the parameter types (if not already in the database)addSpaceSystems- - if true, create all the necessary space systems
-
doAddParameterType
Adds new parameter types to the XTCE db.If the SpaceSystem where this parameter type does not exist, and createSpaceSystem is false, throws an IllegalArgumentException.
If the SpaceSystem where this parameter belongs exists and already contains an parameter type by this name, throws and IllegalArgumentException
If the SpaceSystem where this parameter belongs does not exist, and createSpaceSystem is true, the whole SpaceSystem hierarchy is created.
- Parameters:
ptypeList- - the parameter types to be addedcreateSpaceSystem- - if true, create all the necessary space systems
-
doAddArgumentType
Adds new argument types to the XTCE db.If the SpaceSystem where this argument type does not exist, and createSpaceSystem is false, throws an IllegalArgumentException.
If the SpaceSystem where this argument belongs exists and already contains an argument type by this name, throws and IllegalArgumentException
If the SpaceSystem where this argument belongs does not exist, and createSpaceSystem is true, the whole SpaceSystem hierarchy is created.
- Parameters:
atypeList- - the argument types to be addedcreateSpaceSystem- - if true, create all the necessary space systems
-
addMetaCommand
-
addMetaCommand
Adds a new command definition to the XTCE db. -
addSpaceSystem
Adds a newSpaceSystemto the XTCE database. It throws an IllegalArgumentException in the following circumstances:- if a SpaceSystem with this name already exists
- if
system.getParent()does not return null - if the parent SpaceSystem (identified based on the
NameDescription.getSubsystemName()) does not exist - if the space system is not empty
- Parameters:
system- - the space system to be added.
-
isSystemParameter
Checks if the named object refers to a system parameter:- either the namespace starts with
YAMCS_SPACESYSTEM_NAME - or there is no namespace and the fully qualified name starts with
YAMCS_SPACESYSTEM_NAME
- Parameters:
id-- Returns:
- either the namespace starts with
-
isSystemParameter
Checks if a fully qualified name is the name of a system parameter. That is iffqnstarts withYAMCS_SPACESYSTEM_NAME- Parameters:
fqn-- Returns:
-
getSpaceSystems
Returns a collection of all theSpaceSystemobjects in the XTCE database.- Returns:
- the collection of space systems.
-
getIndirectParameterRefEntries
Retrieve the list ofIndirectParameterRefEntryfor a given alias namespace.- Parameters:
namespace- - the namespace for which the indirect parameter reference entries should be retrieved. Can be null to return the entries without a namespace.- Returns:
- the list of indirect parameter reference entries whose alias namespace is equal to the given namespace.
If no such entry exists,
nullis returned.
-
print
-