Class UPParser

  • All Implemented Interfaces:
    UPParserConstants

    public class UPParser
    extends java.lang.Object
    implements UPParserConstants
    Update Parser for reading updates for dynamic Preference Aggregation Please note: update file syntax changed from (index, operation, amount, element) e.g. (1, WEAKEN, 2, a) to (index, operation(amount), element) e.g. (1, -2, a) where -(/+) is equal to WEAKEN(/STRENGTHEN) and 2 is the amount
    • Field Detail

      • token

        public Token token
        Current token.
      • jj_nt

        public Token jj_nt
        Next token.
      • jj_ntk

        private int jj_ntk
      • jj_gen

        private int jj_gen
      • jj_la1

        private final int[] jj_la1
      • jj_la1_0

        private static int[] jj_la1_0
      • jj_expentries

        private java.util.List<int[]> jj_expentries
      • jj_expentry

        private int[] jj_expentry
      • jj_kind

        private int jj_kind
    • Constructor Detail

      • UPParser

        public UPParser()
      • UPParser

        public UPParser​(java.io.InputStream stream)
        Constructor with InputStream.
      • UPParser

        public UPParser​(java.io.InputStream stream,
                        java.lang.String encoding)
        Constructor with InputStream and supplied encoding
      • UPParser

        public UPParser​(java.io.Reader stream)
        Constructor.
    • Method Detail

      • parse

        public static java.util.ArrayList<Update<java.lang.String>> parse​(java.lang.String updatefile)
                                                                   throws ParseException,
                                                                          java.io.FileNotFoundException
        Throws:
        ParseException
        java.io.FileNotFoundException
      • getUpdate

        public final java.util.ArrayList<Update<java.lang.String>> getUpdate()
                                                                      throws ParseException,
                                                                             java.io.FileNotFoundException
        Throws:
        ParseException
        java.io.FileNotFoundException
      • jj_la1_init_0

        private static void jj_la1_init_0()
      • ReInit

        public void ReInit​(java.io.InputStream stream)
        Reinitialise.
      • ReInit

        public void ReInit​(java.io.InputStream stream,
                           java.lang.String encoding)
        Reinitialise.
      • ReInit

        public void ReInit​(java.io.Reader stream)
        Reinitialise.
      • getNextToken

        public final Token getNextToken()
        Get the next Token.
      • getToken

        public final Token getToken​(int index)
        Get the specific Token.
      • jj_ntk

        private int jj_ntk()
      • generateParseException

        public ParseException generateParseException()
        Generate ParseException.
      • enable_tracing

        public final void enable_tracing()
        Enable tracing.
      • disable_tracing

        public final void disable_tracing()
        Disable tracing.