Class NamedPEAFTheory

All Implemented Interfaces:
Iterable<BArgument>, Collection<BArgument>, BeliefBase, GeneralGraph<BArgument>, Graph<BArgument>

public class NamedPEAFTheory extends PEAFTheory
This class inherits PEAFTheory to store additional information regarding the arguments inserted
Author:
Taha Dogan Gunes
  • Constructor Details

    • NamedPEAFTheory

      public NamedPEAFTheory()
  • Method Details

    • giveNames

      public static Set<String> giveNames(Map<BArgument,String> names, Set<BArgument> args)
      Helper function to give the names of a set of arguments Static such that it can work with PEAFTheory nodes (EArgument, EAttack and PSupport)
      Parameters:
      names - the map that has arguments as keys and the names of arguments as string
      args - the arguments that are queried
      Returns:
      the set of names
    • getArgumentNameFromIdentifier

      public String getArgumentNameFromIdentifier(String identifier)
      Returns the argument's name give its identifier
      Parameters:
      identifier - the identifier of the argument
      Returns:
      the argument's name
    • getArgumentByIdentifier

      public BArgument getArgumentByIdentifier(String identifier)
      Returns the EArgument object given its identifier
      Parameters:
      identifier - the identifier of the argument
      Returns:
      corresponding EArgument object
    • getNameOfArgument

      public String getNameOfArgument(BArgument argument)
      Returns the name of the argument given EArgument object's reference
      Parameters:
      argument - EArgument reference
      Returns:
      the name in string
    • addArgument

      public BArgument addArgument(int identifier, String name, String aifNodeIdentifier)
      Add argument with names
      Parameters:
      identifier - PEAF identifier as an integer value (index of the argument for efficiency reasons)
      name - The given name of the argument
      aifNodeIdentifier - The aif node identifier
      Returns:
      EArgument object given
    • toString

      public String toString()
      Print the NamedPEAFTheory for debugging purposes
      Specified by:
      toString in interface BeliefBase
      Specified by:
      toString in interface Graph<BArgument>
      Overrides:
      toString in class AbstractEAFTheory<WeightedSetSupport>
    • prettyPrintWithoutNames

      public void prettyPrintWithoutNames()
      prints string reprsentation without names
    • createCopyWithoutArguments

      public NamedPEAFTheory createCopyWithoutArguments(Set<BArgument> args)
      Parameters:
      args - aruments
      Returns:
      copy of thory without args
    • getIdentifier

      public String getIdentifier(BArgument e)
      Parameters:
      e - an argument
      Returns:
      string reprentation of argument