Package org.yamcs.xtce
Class NameDescription
- java.lang.Object
-
- org.yamcs.xtce.NameDescription
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AggregateDataType,Algorithm,Argument,ArrayDataType,BaseDataType,Container,Member,MetaCommand,Parameter,SpaceSystem
public class NameDescription extends Object implements Serializable
The type definition used by most elements that require a name with optional descriptions.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNameDescription.Builder<T extends NameDescription.Builder<T>>
-
Field Summary
Fields Modifier and Type Field Description protected List<AncillaryData>ancillaryDataEscape hatch for storing any type of informationprotected StringnameName of the objectstatic charPATH_SEPARATORpath separator used in the fully qualified namesprotected StringqualifiedNamefully qualified name (i.e. space system name+"/"+nameprotected XtceAliasSetxtceAliasSetSet of aliases
-
Constructor Summary
Constructors Modifier Constructor Description protectedNameDescription(NameDescription t)NameDescription(NameDescription.Builder<?> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAlias(String namespace, String alias)voidaddAliases(XtceAliasSet newAliases)Adds all aliases to the existing aliases.voidaddAncillaryData(AncillaryData data)Stores the given ancillary data.StringgetAlias(String namespace)XtceAliasSetgetAliasSet()List<AncillaryData>getAncillaryData()StringgetLongDescription()StringgetName()Returns the non qualified name of the itemstatic StringgetName(String fqname)returns the last component of the fully qualified nameStringgetOpsName()OPS name, in XTCE defined as alias for namespace "MDB:OPS Name"StringgetQualifiedName()Returns the fully qualified name.StringgetShortDescription()StringgetSubsystemName()static StringgetSubsystemName(String fqname)returns the subsystem fully qualified name where this name is valid (i.e. the full path of the directory name if it were a filesystem)voidsetAliasSet(XtceAliasSet aliasSet)Assign set of aliases with the object.voidsetAncillaryData(List<AncillaryData> ancillaryData)voidsetLongDescription(String longDescription)voidsetName(String newName)voidsetQualifiedName(String qname)voidsetShortDescription(String shortDescription)
-
-
-
Field Detail
-
PATH_SEPARATOR
public static char PATH_SEPARATOR
path separator used in the fully qualified names
-
name
protected String name
Name of the object
-
qualifiedName
protected String qualifiedName
fully qualified name (i.e. space system name+"/"+name
-
xtceAliasSet
protected XtceAliasSet xtceAliasSet
Set of aliases
-
ancillaryData
protected List<AncillaryData> ancillaryData
Escape hatch for storing any type of information
-
-
Constructor Detail
-
NameDescription
public NameDescription(NameDescription.Builder<?> builder)
-
NameDescription
protected NameDescription(NameDescription t)
-
-
Method Detail
-
setName
public void setName(String newName)
-
getName
public String getName()
Returns the non qualified name of the item- Returns:
-
setQualifiedName
public void setQualifiedName(String qname)
-
addAncillaryData
public void addAncillaryData(AncillaryData data)
Stores the given ancillary data. If an entry already existed for the applicable name, that entry will be overriden.
-
setAncillaryData
public void setAncillaryData(List<AncillaryData> ancillaryData)
-
getAncillaryData
public List<AncillaryData> getAncillaryData()
-
getQualifiedName
public String getQualifiedName()
Returns the fully qualified name.- Returns:
- a name of shape /system/subsys1/subsys2/item
-
setShortDescription
public void setShortDescription(String shortDescription)
-
getShortDescription
public String getShortDescription()
-
setLongDescription
public void setLongDescription(String longDescription)
-
getLongDescription
public String getLongDescription()
-
setAliasSet
public void setAliasSet(XtceAliasSet aliasSet)
Assign set of aliases with the object. The previous aliases if any are replaced by the new ones.- Parameters:
aliasSet- Set of aliases
-
getAliasSet
public XtceAliasSet getAliasSet()
-
addAliases
public void addAliases(XtceAliasSet newAliases)
Adds all aliases to the existing aliases. The new aliases may overwrite already existing aliases - in this case the old ones will be replaced with the new ones.- Parameters:
newAliases-
-
getOpsName
public String getOpsName()
OPS name, in XTCE defined as alias for namespace "MDB:OPS Name"- Returns:
- OPS Name alias if defined, otherwise name in the default namespace
-
getSubsystemName
public String getSubsystemName()
- Returns:
- fully qualified name of the subsystem of which this name is part of
-
getName
public static String getName(String fqname)
returns the last component of the fully qualified name- Parameters:
fqname-- Returns:
-
-