Class MetaCommand

  • All Implemented Interfaces:
    Serializable

    public class MetaCommand
    extends NameDescription
    The MetaCommand is the base type for a tele-command.

    The rules for MetaCommand inheritance as follows:

    • A MetaCommand may extend another using the BaseMetaCommand element
    • BaseMetaCommands that form loops are illegal
    • Its CommandContainer is only inherited if the BaseContainer is explicitly set between the child and parent.
    • The same rules apply to MetaCommand/CommandContainer inheritance as described in SequenceContainer/BaseContainer.

    Specific rules by element and attribute are:

    • BaseMetaCommand/ArgumentAssignment Child’s content will override parent’s content if present, otherwise child gets parent’s content if it is specified.
    • If argument is the same name, it overrides the parent’s ArgumentAssignment.
    • ArgumentList Child’s content is appended to parent’s content if present
    • CommandContainer Special Case: inherited like other containers if CommandContainer/BaseContainer set. Otherwise it is not inherited.
    • TransmissionConstraintList Child’s content prefixed to parent’s content if present
    • DefaultSignificance Child’s content will override parent’s content if present, otherwise child gets parent’s content if specified
    • VerifierSet Child’s content prefixed to parent’s content if present but: - Same verifiers are overridden by the child
    See Also:
    Serialized Form
    • Constructor Detail

      • MetaCommand

        public MetaCommand​(String name)
    • Method Detail

      • setAbstract

        public void setAbstract​(boolean a)
        Set the command as abstract or non abstract. Abstract commands cannot be instantiated
        Parameters:
        a -
      • isAbstract

        public boolean isAbstract()
      • setCommandContainer

        public void setCommandContainer​(CommandContainer mcc)
      • setBaseMetaCommand

        public void setBaseMetaCommand​(MetaCommand mc)
      • getBaseMetaCommand

        public MetaCommand getBaseMetaCommand()
      • getArgumentAssignmentList

        public List<ArgumentAssignment> getArgumentAssignmentList()
        returns the argument assignment list in relation to the inheritance - this is the list of arguments of the parent(s) which are assigned when the inheritance takes place returns null if there is no such argument
        Returns:
      • getArgumentList

        public List<Argument> getArgumentList()
        returns the list of arguments of this command can be empty if the command doesn't have arguments
        Returns:
      • getArgument

        public Argument getArgument​(String argumentName)
        returns an argument based on name or null if it doesn't exist
        Parameters:
        argumentName -
        Returns:
      • addArgument

        public void addArgument​(Argument arg)
        Adds an argument to the command.
        Parameters:
        arg - - the argument to be added
      • hasTransmissionConstraints

        public boolean hasTransmissionConstraints()
      • getDefaultSignificance

        public Significance getDefaultSignificance()
      • setDefaultSignificance

        public void setDefaultSignificance​(Significance defaultSignificance)
      • hasCommandVerifiers

        public boolean hasCommandVerifiers()
      • setArgumentAssignmentList

        public void setArgumentAssignmentList​(List<ArgumentAssignment> argumentAssignmentList)