Package org.apache.imperius.spl.parser.expressions.impl

Examples of org.apache.imperius.spl.parser.expressions.impl.StringConstant


      propertySensor5 = new ByteConstant((byte)5);
      propertySensor6 = new ByteConstant((byte)6);
      propertySensor7 = new ByteConstant((byte)7);
      propertySensor8 = new ByteConstant((byte)8);
     
      StringConstant stringLOR = new StringConstant("\"OR\"");
      StringConstant stringLAND = new StringConstant("\"AND\"");
      StringConstant stringBXOR = new StringConstant("\"XOR\"");
      StringConstant stringNOT_EQUAL = new StringConstant("\"NOT_EQUAL\"");
      StringConstant stringEQUAL = new StringConstant("\"EQUAL\"");
      StringConstant stringLT = new StringConstant("\"LESS\"");
      StringConstant stringGT = new StringConstant("\"GREATER\"");
      StringConstant stringLE = new StringConstant("\"LESS_OR_EQUAL\"");
      StringConstant stringGE = new StringConstant("\"GREATER_OR_EQUAL\"");
     
   

   
   
View Full Code Here


    }
   
    public void testApplyToCollection() {
      propertySensor8 = new ByteConstant((byte)8);
     
      StringConstant stringPLUS = new StringConstant("\"PLUS\"");
      StringConstant stringMINUS = new StringConstant("\"MINUS\"");
      StringConstant stringSTAR = new StringConstant("\"MULTIPLY\"");
      StringConstant stringDIV = new StringConstant("\"DIVIDE\"");
   

   
   
     
View Full Code Here

  /*
   * This will test MiddleSubstring Expression
   */
  public void testMiddleSubstring() {
    String string = "\"AutonomicComputing\"";
    StringConstant lr = new StringConstant("\"LeftToRight\"");
    StringConstant rl = new StringConstant("\"RightToLeft\"");
    IntegerConstant ic4 = new IntegerConstant(4);
    IntegerConstant ic5 = new IntegerConstant(5);
    //HashMap map = new HashMap();
    //SensorLookup lookup = new SensorLookupImpl(map);

    try {
      Vector v = new Vector();
      Expression exp;
      v.add(new StringConstant(string));
      v.add(ic4);
      v.add(ic5);
      v.add(lr);
      Expression esnnl = new MiddleSubstring(v,true);

      v.clear();
      v.add(new StringConstant(string));
      v.add(ic4);
      v.add(ic5);
      v.add(rl);
      Expression esnnr = new MiddleSubstring(v,true);

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(ic5);
      v.add(lr);
      Expression essnl = new MiddleSubstring(v,true);

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(ic5);
      v.add(rl);
      Expression essnr = new MiddleSubstring(v,true);

      v.clear();
      v.add(new StringConstant(string));
      v.add(ic4);
      v.add(new StringConstant("\"om\""));
      v.add(lr);
      Expression esnsl = new MiddleSubstring(v,true);

      v.clear();
      v.add(new StringConstant(string));
      v.add(ic4);
      v.add(new StringConstant("\"om\""));
      v.add(rl);
      Expression esnsr = new MiddleSubstring(v,true);

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"on\""));
      v.add(new StringConstant("\"om\""));
      v.add(lr);
      Expression esssl = new MiddleSubstring(v,true);

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"on\""));
      v.add(new StringConstant("\"om\""));
      v.add(rl);
      Expression esssr = new MiddleSubstring(v,true);

      assertTrue(((String) esnnl.evaluate()).equals("nomic"));
      assertTrue(((String) esnnr.evaluate()).equals("ing"));
      assertTrue(((String) essnl.evaluate()).equals("icCom"));
      assertTrue(((String) essnr.evaluate()).equals("putin"));
      assertTrue(((String) esnsl.evaluate()).equals("n"));
      assertTrue(((String) esnsr.evaluate()).equals("pu"));
      assertTrue(((String) esssl.evaluate()).equals(""));
      assertTrue(((String) esssr.evaluate()).equals("Aut"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(4));
      v.add(new IntegerConstant(5));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("nomic"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(4));
      v.add(new IntegerConstant(5));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("ing"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(4));
      v.add(new IntegerConstant(-1));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("o"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(8));
      v.add(new IntegerConstant(-1));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("o"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(-1));
      v.add(new IntegerConstant(5));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("g"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(-1));
      v.add(new IntegerConstant(5));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("tonom"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(-1));
      v.add(new IntegerConstant(-1));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("n"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(-1));
      v.add(new IntegerConstant(-1));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("u"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(19));
      v.add(new IntegerConstant(5));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(19));
      v.add(new IntegerConstant(5));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("Auton"));
      //////////////////////////////////////////////////////
      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new IntegerConstant(5));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("icCom"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new IntegerConstant(5));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("putin"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new IntegerConstant(18));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("icComputing"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new IntegerConstant(18));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("puting"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new IntegerConstant(-1));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("n"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new IntegerConstant(-1));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("C"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"bz\""));
      v.add(new IntegerConstant(5));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"bz\""));
      v.add(new IntegerConstant(5));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"bz\""));
      v.add(new IntegerConstant(-1));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"bz\""));
      v.add(new IntegerConstant(-1));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"bz\""));
      v.add(new IntegerConstant(20));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"bz\""));
      v.add(new IntegerConstant(20));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));
      ///////////////////////////////////////////////

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(4));
      v.add(new StringConstant("\"om\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("n"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(4));
      v.add(new StringConstant("\"om\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("pu"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(7));
      v.add(new StringConstant("\"om\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("icC"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(7));
      v.add(new StringConstant("\"om\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(-1));
      v.add(new StringConstant("\"om\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("g"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(-1));
      v.add(new StringConstant("\"om\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(-1));
      v.add(new StringConstant("\"bz\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("g"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(-1));
      v.add(new StringConstant("\"bz\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(4));
      v.add(new StringConstant("\"bz\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(
          ((String) exp.evaluate()).equals("nomicComputing"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(4));
      v.add(new StringConstant("\"bz\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(20));
      v.add(new StringConstant("\"om\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(20));
      v.add(new StringConstant("\"om\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(20));
      v.add(new StringConstant("\"bz\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(20));
      v.add(new StringConstant("\"bz\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));
      /////////////////////////////////////
      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new StringConstant("\"om\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("icC"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new StringConstant("\"om\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("icC"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"bz\""));
      v.add(new StringConstant("\"om\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"bz\""));
      v.add(new StringConstant("\"om\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new StringConstant("\"bz\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("icComputing"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new StringConstant("\"bz\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals("AutonomicC"));


      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"bz\""));
      v.add(new StringConstant("\"bz\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"bz\""));
      v.add(new StringConstant("\"bz\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new StringConstant("\"icC\""));
      v.add(lr);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(new StringConstant("\"icC\""));
      v.add(rl);
      exp = new MiddleSubstring(v,true);
      assertTrue(((String) exp.evaluate()).equals(""));


View Full Code Here

  /*
   * This will test RightSubstring Expression
   */
  public void testRightSubstring() {
    String string = "\"AutonomicComputing\"";
    StringConstant lr = new StringConstant("\"LeftToRight\"");
    StringConstant rl = new StringConstant("\"RightToLeft\"");
    IntegerConstant icmin1 = new IntegerConstant(-1);

    IntegerConstant ic4 = new IntegerConstant(4);
//    IntegerConstant ic5 = new IntegerConstant(5);
    //HashMap map = new HashMap();
    //SensorLookup lookup = new SensorLookupImpl(map);

    try {
      Vector v = new Vector();
      v.add(new StringConstant(string));
      v.add(ic4);
      v.add(lr);
      Expression esnl = new RightSubstring(v,true);
      // Examples: RightSubstring("AutonomicComputing", 4, LeftToRight) = "ting".

      v.clear();
      v.add(new StringConstant(string));
      v.add(icmin1);
      v.add(lr);
      Expression esnlmin1 = new RightSubstring(v,true);
      // Examples: RightSubstring("AutonomicComputing", -1, LeftToRight) = "AutonomicComputing".

      v.clear();
      v.add(new StringConstant(string));
      v.add(ic4);
      v.add(rl);
      Expression esnr = new RightSubstring(v,true);
      // RightSubstring("AutonomicComputing", 4, RightToLeft) = "nomicComputing".<p>

      v.clear();
      v.add(new StringConstant(string));
      v.add(icmin1);
      v.add(rl);
      Expression esnrmin1 = new RightSubstring(v,true);
      // Examples: RightSubstring("AutonomicComputing", -1, RightToLeft) = "".

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(lr);
      Expression essl = new RightSubstring(v,true);
      // Examples: RightSubstring("AutonomicComputing", "om", LeftToRight)="icComputing"

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"jj\""));
      v.add(lr);
      Expression esslne = new RightSubstring(v,true);
      // Examples: RightSubstring("AutonomicComputing", "jj", LeftToRight)=""

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(rl);
      Expression essr = new RightSubstring(v,true);
      // RightSubstring("AutonomicComputing", "om", RightToLeft)="puting".

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"jj\""));
      v.add(rl);
      Expression essrne = new RightSubstring(v,true);
      // RightSubstring("AutonomicComputing", "jj", RightToLeft)="".

      assertTrue(((String) esnl.evaluate()).equals("ting"));
View Full Code Here

  /*
   * This will test LeftSubstring Expression
   */
  public void testLeftSubstring() {
    String string = "\"AutonomicComputing\"";
    StringConstant lr = new StringConstant("\"LeftToRight\"");
    StringConstant rl = new StringConstant("\"RightToLeft\"");
    IntegerConstant ic4 = new IntegerConstant(4);
//    IntegerConstant ic5 = new IntegerConstant(5);
    //HashMap map = new HashMap();
    //SensorLookup lookup = new SensorLookupImpl(map);
    IntegerConstant icmin1 = new IntegerConstant(-1);

    try {
      Vector v = new Vector();
      v.add(new StringConstant(string));
      v.add(ic4);
      v.add(lr);
      Expression esnl = new LeftSubstring(v,true);
      // Examples: LeftSubstring("AutonomicComputing", 4, LeftToRight) = "Auto".

      v.clear();
      v.add(new StringConstant(string));
      v.add(icmin1);
      v.add(lr);
      Expression esnlmin1 = new LeftSubstring(v,true);
      // Examples: LeftSubstring("AutonomicComputing", -1, LeftToRight) = "AutonomicComputing".

      v.clear();
      v.add(new StringConstant(string));
      v.add(ic4);
      v.add(rl);
      Expression esnr = new LeftSubstring(v,true);
      // LeftSubstring("AutonomicComputing", 4, RightToLeft) = "AutonomicCompu".

      v.clear();
      v.add(new StringConstant(string));
      v.add(icmin1);
      v.add(rl);
      Expression esnrmin1 = new LeftSubstring(v,true);
      // Examples: LeftSubstring("AutonomicComputing", -1, RightToLeft) = "".

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(lr);
      Expression essl = new LeftSubstring(v,true);
      // Examples: LeftSubstring("AutonomicComputing", "om", LeftToRight)="Auton"

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"\""));
      v.add(lr);
      Expression esslempty = new LeftSubstring(v,true);
      // Examples: LeftSubstring("AutonomicComputing", "", LeftToRight)=""

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"om\""));
      v.add(rl);
      Expression essr = new LeftSubstring(v,true);
      // LeftSubstring("AutonomicComputing", "om", RightToLeft)="AutonomicC"

      v.clear();
      v.add(new StringConstant(string));
      v.add(new StringConstant("\"\""));
      v.add(lr);
      Expression essrempty = new LeftSubstring(v,true);
      // Examples: LeftSubstring("AutonomicComputing", "", RightToLeft)=""

      assertTrue(((String) esnl.evaluate()).equals("Auto"));
View Full Code Here

    String s1 = "\"AutonomicComputing\"";
    String s2 = "\"StringLength\"";
    String s3 = "\"PMAC1.2\"";

    //HashMap map = new HashMap();
    propertySensor1=new StringConstant(s1);
    propertySensor2=new StringConstant(s2);
    propertySensor3=new StringConstant(s3);

    //SensorLookup lookup = new SensorLookupImpl(map);

    try {
      Vector v = new Vector();
      v.add(new StringConstant(s1));
      Expression e1 = new StringLength(v,true);

      v.clear();
      v.add(new StringConstant(s2));
      Expression e2 = new StringLength(v,true);

      v.clear();
      v.add(new StringConstant(s3));
      Expression e3 = new StringLength(v,true);

      v.clear();
      v.add(propertySensor1);
      Expression eps1 = new StringLength(v,true);
View Full Code Here

    String s2 = "\"This\"";
    String s3 = "\"That\"";
    String s4 = "\"ThatIsADogThatIsAPenThatIsATelevisionSetThatIsAHouse.\"";

    //HashMap map = new HashMap();
    propertySensor1=new StringConstant(s1);
    propertySensor2=new StringConstant(s2);
    propertySensor3=new StringConstant(s3);

    //SensorLookup lookup = new SensorLookupImpl(map);

    try {
      Vector v = new Vector();
      v.add(new StringConstant(s1));
      v.add(new StringConstant(s2));
      v.add(new StringConstant(s3));
      Expression e1 = new ReplaceSubstring(v,true);

      v.clear();
      v.add(propertySensor1);
      v.add(propertySensor2);
View Full Code Here

  public void testStartsWith() {
    String s1 = "\"ThisIsADogThisIsAPenThisIsATelevisionSetThisIsAHouse.\"";
    String s2 = "\"This\"";

    //HashMap map = new HashMap();
    propertySensor1=new StringConstant(s1);
    propertySensor2=new StringConstant(s2);
    //SensorLookup lookup = new SensorLookupImpl(map);

    try {
      Vector v = new Vector();
      v.add(new StringConstant(s1));
      v.add(new StringConstant(s2));
      Expression e1 = new StartsWith(v,true);

      v.clear();
      v.add(propertySensor1);
      v.add(propertySensor2);
View Full Code Here

  public void testEndsWith() {
    String s1 = "\"ThisIsADogThisIsAPenThisIsATelevisionSetThisIsAHouse.\"";
    String s2 = "\"ThisIsAHouse.\"";

    //HashMap map = new HashMap();
    propertySensor1=new StringConstant(s1);
    propertySensor2=new StringConstant(s2);
    //SensorLookup lookup = new SensorLookupImpl(map);

    try {
      Vector v = new Vector();
      v.add(new StringConstant(s1));
      v.add(new StringConstant(s2));
      Expression e1 = new EndsWith(v,true);

      v.clear();
      v.add(propertySensor1);
      v.add(propertySensor2);
View Full Code Here

    String s2 = "\"ThisIsAPen\"";
    //String s3 = "ThisIsATelevisionSet";
    //String s4 = "ThisIsAHouse.";

    //HashMap map = new HashMap();
    propertySensor1=new StringConstant(s1);
    propertySensor2=new StringConstant(s2);
   
    //SensorLookup lookup = new SensorLookupImpl(map);

    try {
      Vector v = new Vector();
      v.add(new StringConstant(s1));
      v.add(new StringConstant(s2));
     
      Expression e1 = new Concatenate(v,true);

      v.clear();
      v.add(propertySensor1);
View Full Code Here

TOP

Related Classes of org.apache.imperius.spl.parser.expressions.impl.StringConstant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.