Package org.yamcs.xtce
Class AggregateDataType
java.lang.Object
org.yamcs.xtce.NameDescription
org.yamcs.xtce.AggregateDataType
- All Implemented Interfaces:
Serializable
,DataType
- Direct Known Subclasses:
AggregateArgumentType
,AggregateParameterType
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
AggregateDataType.Builder<T extends AggregateDataType.Builder<T>>
-
Field Summary
Fields inherited from class org.yamcs.xtce.NameDescription
ancillaryData, name, PATH_SEPARATOR, qualifiedName, xtceAliasSet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertType
(Object value) Parse the initial value as a JSON string.Get the initial value if anygetMember
(int idx) Returns a member on the given name.Returns a member in a hierarchical aggregate.String which represents the type.Return the expected Value type of an engineering value conforming to this XTCE data typeint
parseStringForRawValue
(String stringValue) parses the string into a java object according to the parameter encodingConverts a value to a string.Methods inherited from class org.yamcs.xtce.NameDescription
addAlias, addAliases, addAncillaryData, getAlias, getAliasSet, getAncillaryData, getLongDescription, getName, getName, getOpsName, getQualifiedName, getShortDescription, getSubsystemName, getSubsystemName, qualifiedName, setAliasSet, setAncillaryData, setLongDescription, setName, setQualifiedName, setShortDescription
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.yamcs.xtce.DataType
getLongDescription, getName, getQualifiedName, getShortDescription
-
Constructor Details
-
AggregateDataType
-
AggregateDataType
-
-
Method Details
-
getTypeAsString
Description copied from interface:DataType
String which represents the type. This string will be presented to the users of the system.- Specified by:
getTypeAsString
in interfaceDataType
- Returns:
-
getMember
Returns a member on the given name. If no such member is present return null- Parameters:
name
- the name of the member to be returned- Returns:
- the member with the given name
-
getMemberList
-
getValueType
Description copied from interface:DataType
Return the expected Value type of an engineering value conforming to this XTCE data type- Specified by:
getValueType
in interfaceDataType
- Returns:
-
getMember
Returns a member in a hierarchical aggregate. It is equivalent with a chained call ofgetMember(String)
:getMember(path[0]).getMember(path[1])...getMember(path[n])
assuming that all the elements on the path exist.- Parameters:
path
- - the path to be traversed. Its length has to be at least 1 - otherwise anIllegalArgumentException
will be thrown.- Returns:
- the member obtained by traversing the path or null if not such member exist.
-
getMemberNames
- Returns:
- the (unique) object encoding the member names
-
numMembers
public int numMembers() -
getMember
-
convertType
Parse the initial value as a JSON string.This allows to specify only partially the values, the rest are copied from the member initial value or the type definition (an exception is thrown if there is any member for which the value cannot be determined).
- Specified by:
convertType
in interfaceDataType
- Parameters:
value
- value to be converted, use boxed primitive values.- Returns:
- a map containing the values for all members.
- Throws:
IllegalArgumentException
- if the string cannot be parsed or if values cannot be determined for all members
-
parseStringForRawValue
Description copied from interface:DataType
parses the string into a java object according to the parameter encoding- Specified by:
parseStringForRawValue
in interfaceDataType
- Returns:
- a java object representation
-
getInitialValue
Description copied from interface:DataType
Get the initial value if any- Specified by:
getInitialValue
in interfaceDataType
- Returns:
-
toString
Description copied from interface:DataType
Converts a value to a string.
-