Examples of fromJson()


Examples of gherkin.deps.com.google.gson.Gson.fromJson()

                "  ]\n" +
                "}\n";

        Gson gson = new Gson();
        String actual = gson.toJson(map);
        assertEquals(gson.fromJson(new StringReader(expected), Map.class), gson.fromJson(new StringReader(actual), Map.class));
    }

}
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.AndContainer.fromJSON()

      if (operatorObject.has("OP TYPE")
          && operatorObject.getString("OP TYPE").equals(
              "and")) {
        final AndContainer andContainer = new AndContainer();
        andContainer.setVisualRifEditor(this.visualRifEditor);
        andContainer.fromJSON(operatorObject.getJSONObject("OPERATORGRAPH"));
        op = andContainer;
      }

      // Or
      if (operatorObject.has("OP TYPE")
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.AnnotationOperator.fromJSON()

      JSONObject annotation = null;
     
      if(canvasInfo.has("ANNOTATION")){
        annotation = canvasInfo.getJSONObject("ANNOTATION");
        AnnotationOperator annotationOperator = new AnnotationOperator();
        annotationOperator.fromJSON(annotation);
        JSONArray positionArrayAnnotation = annotation.getJSONArray("POSITION");
        this.addOperator(positionArrayAnnotation.getInt(0), positionArrayAnnotation.getInt(1), annotationOperator);
        AnnotationConnection annotationConnection = new AnnotationConnection(visualEditor, annotationOperator,op);
      }
  }
View Full Code Here

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

      if (operatorObject.has("OP TYPE")
          && operatorObject.getString("OP TYPE").equals(
              "ConstantOperator")) {
        final ConstantOperator constantOperator = new ConstantOperator();
        constantOperator.setVisualRifEditor(this.visualRifEditor);
        constantOperator.fromJSON(operatorObject, constantOperator, this);
        op = constantOperator;
      }

      System.out.println(operatorObject.getString("OP TYPE"));
      final JSONArray positionArray = operatorObject.getJSONArray("POSITION");
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.ExistsContainer.fromJSON()

      if (operatorObject.has("OP TYPE")
          && operatorObject.getString("OP TYPE").equals(
              "exists")) {
        final ExistsContainer existsContainer = new ExistsContainer();
        existsContainer.setVisualRifEditor(this.visualRifEditor);
        existsContainer.fromJSON(operatorObject.getJSONObject("OPERATORGRAPH"));
        op = existsContainer;
      }

      // Variable
      if (operatorObject.has("OP TYPE")
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.ListOperator.fromJSON()

          && operatorObject.getString("OP TYPE").equals(
              "ListOperator") && (termsObject != null)) {

        final ListOperator listOp = new ListOperator();

        listOp.fromJSON(operatorObject, listOp, this);

        listOp.setConstantComboBoxEntries(this.visualRifEditor.getDocumentContainer().getActiveDocument().getDocumentEditorPane().getPrefixList());
        listOp.setVisualRifEditor(this.visualRifEditor);
        listOp.setOpen(operatorObject.getBoolean("ISOPEN"));
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.OrContainer.fromJSON()

      if (operatorObject.has("OP TYPE")
          && operatorObject.getString("OP TYPE").equals(
              "or")) {
        final OrContainer orContainer = new OrContainer();
        orContainer.setVisualRifEditor(this.visualRifEditor);
        orContainer.fromJSON(operatorObject.getJSONObject("OPERATORGRAPH"));
        op = orContainer;
      }

      // Exists
      if (operatorObject.has("OP TYPE")
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.UnitermOperator.fromJSON()

      if (operatorObject.has("OP TYPE")
          && operatorObject.getString("OP TYPE").equals(
              "UnitermOperator" ) && (termsObject != null)) {

        final UnitermOperator uniTerm = new UnitermOperator();
        uniTerm.fromJSON(operatorObject, uniTerm, this);

        uniTerm.setConstantComboBoxEntries(this.visualRifEditor.getDocumentContainer().getActiveDocument().getDocumentEditorPane().getPrefixList());
        uniTerm.setVisualRifEditor(this.visualRifEditor);
        uniTerm.setTermName(operatorObject.getString("TERMNAME"));
        uniTerm.getUniTermComboBox().setSelectedItem(operatorObject.getString("SELECTEDPREFIX"));
View Full Code Here

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

      if (operatorObject.has("OP TYPE")
          && operatorObject.getString("OP TYPE").equals(
              "VariableOperator")) {
        final VariableOperator variableOperator = new VariableOperator();
        variableOperator.setVisualRifEditor(this.visualRifEditor);
        variableOperator.fromJSON(operatorObject,variableOperator,this);
        op = variableOperator;
      }

      // Constant
      if (operatorObject.has("OP TYPE")
View Full Code Here

Examples of org.amplafi.json.JsonSelfRenderer.fromJson()

    @Override
    protected Object doDeserialize(FlowPropertyProvider flowPropertyProvider, FlowPropertyDefinition flowPropertyDefinition, DataClassDefinition dataClassDefinition, Object serializedObject) throws FlowValidationException {
        try {
            JsonSelfRenderer jsonSelfRenderer = (JsonSelfRenderer) dataClassDefinition.getDataClass().newInstance();
            return jsonSelfRenderer.fromJson(serializedObject);
        } catch (InstantiationException e) {
            throw new IllegalStateException(e);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException(e);
        }
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.