Examples of toJSON()


Examples of lupos.gui.operatorgraph.visualeditor.ruleeditor.operators.AbstractRuleOperator.toJSON()

    JSONObject connectionsObject = new JSONObject();

    for(GraphWrapper gw : this.boxes.keySet()) {
      AbstractRuleOperator op = (AbstractRuleOperator) gw.getElement();

      saveObject.put(op.getName(), op.toJSON(connectionsObject));
    }

    if(connectionsObject.length() > 0) {
      saveObject.put("connections", connectionsObject);
    }
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.AbstractContainer.toJSON()

      if (op instanceof AbstractContainer) {
        final AbstractContainer ac = (AbstractContainer) op;

        try {
          saveObject.put(this.checkName("AbstractContainer",
              "AbstractContainer", 0), ac.toJSON());
        } catch (final JSONException e) {
          e.printStackTrace();
        }

      }
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.AbstractTermOperator.toJSON()

      if (op instanceof AbstractTermOperator) {
        final AbstractTermOperator ato = (AbstractTermOperator) op;
        if (!ato.isChild()) {
          try {
            saveObject.put(this.checkName("AbstractTermOperator",
                "AbstractTermOperator", 0), ato.toJSON());
          } catch (final JSONException e) {
            e.printStackTrace();
          }
        }
      }
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.ConstantOperator.toJSON()

      if (op instanceof ConstantOperator) {
        final ConstantOperator co = (ConstantOperator) op;
        if (!co.isChild()) {
          try {
            saveObject.put(this.checkName("ConstantOperator",
                "ConstantOperator", 0), co.toJSON());
          } catch (final JSONException e) {
            e.printStackTrace();
          }
        }
      }
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.PrefixOperator.toJSON()

//      }
     
      // Prefix
      if (op instanceof PrefixOperator){
        PrefixOperator po = ( PrefixOperator ) op;
        saveObject.put("PREFIXOPERATOR", po.toJSON(connectionsObject));
      }
    }

    if(connectionsObject.length() > 0) {
      saveObject.put("CONNECTIONS", connectionsObject);
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.RuleOperator.toJSON()

       
        if( ro.getRuleName().equals(ruleName) ){
         
//          saveObject.put(ro.getRuleName(), ro.toJSON(connectionsObject));
         
          return ro.toJSON(connectionsObject);
       
        }
      }
     
   
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.VariableOperator.toJSON()

      if (op instanceof VariableOperator) {
        final VariableOperator vo = (VariableOperator) op;
        if (!vo.isChild()) {
          try {
            saveObject.put(this.checkName("VariableOperator",
                "VariableOperator", 0), vo.toJSON());
          } catch (final JSONException e) {
            e.printStackTrace();
          }
        }
      }
View Full Code Here

Examples of net.caprazzi.minima.model.MasterRecord.toJson()

  }

  byte[] getMasterRecord() {
    MasterRecord record = new MasterRecord();
    record.setDbVersion(DB_VERSION);
    return record.toJson();
  }
 
  public void upgradeEntry(Entry entry) throws Exception {
   
    System.out.println("upgrading " + entry);
View Full Code Here

Examples of net.thucydides.core.reports.json.JSONConverter.toJson()

    }

    public String toJson() {
        JSONConverter jsonConverter = Injectors.getInjector().getInstance(JSONConverter.class);
        try(ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
            jsonConverter.toJson(this, outputStream);
            return outputStream.toString();
        } catch (IOException e) {
            return "";
        }
    }
View Full Code Here

Examples of oi.thekraken.grok.api.Match.toJson()

    g.compile("%{COMBINEDAPACHELOG}");

    Match gm =
        g.match("112.169.19.192 - - [06/Mar/2013:01:36:30 +0900] \"GET / HTTP/1.1\" 200 44346 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22\"");
    gm.captures();
    assertNotNull(gm.toJson());
    assertEquals(
        gm.toMap().get("agent").toString(),
        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22");
    assertEquals(gm.toMap().get("clientip").toString(), "112.169.19.192");
    assertEquals(gm.toMap().get("httpversion").toString(), "1.1");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.