Examples of AspectNode


Examples of ch.ethz.prose.eclipse.internal.run.AspectNode

     */
    public void testWithdrawAspectNotification() {
        ProseRunNode run = new ProseRunNode("test", "dummyhost", -1, null);
        AspectManagerNode aspectManager = new AspectManagerNode(run, true);
        AspectSurrogate surrogate = new AspectSurrogate("Aspect", null);
        AspectNode aspect = new AspectNode(aspectManager, surrogate);
        ProsePlugin.getDefault().fireAspectWithdrawn(aspect);
        assertEquals(aspect, listener.aspect);
    }
View Full Code Here

Examples of ch.ethz.prose.eclipse.internal.run.AspectNode

        Object target = getTarget(event);
        if ((event.currentDataType != null)
                && (transfer.isSupportedType(event.currentDataType))
                && (target instanceof AspectManagerNode)) {
            if (source instanceof AspectNode) {
                AspectNode aspect = (AspectNode) source;
                // Allow drag operations on a different aspect manager node.
                if (target != aspect.getAspectManager()) {
                    event.detail = lastValidOperation;
                    return;
                }
                // Allow copy drag operations on the same aspect manager node.
                if (event.detail == DND.DROP_COPY) {
View Full Code Here

Examples of ch.ethz.prose.eclipse.internal.run.AspectNode

    public void drop(DropTargetEvent event) {
        IType type = null;
        AspectManagerNode targetManager = (AspectManagerNode) getTarget(event);
        Object source = SelectionUtil.getSingleElement(LocalSelectionTransfer.getInstance().getSelection());
        if (source instanceof AspectNode) {
            AspectNode aspect = (AspectNode) source;

            // Since there is no classpath information in an AspectSurrogate, we
            // have to seek the aspect class.
            IJavaProject[] projects = getJavaProjects();
            for (int i = 0; i < projects.length; i++) {
                try {
                    type = projects[i].findType(aspect.getAspect().getAspectClassName());
                    if (type != null)
                        break;
                } catch (JavaModelException e) {
                    ProsePlugin.log(e.getStatus());
                    break;
                }

            }

            if (type == null) {
                ProsePlugin.openErrorDialog("No aspect found", "No project contains an aspect named "
                        + aspect.getAspect().getAspectClassName() + '.');
                event.detail = DND.DROP_NONE;
                return;
            }
        } else if (source instanceof ICompilationUnit){
            type = ((ICompilationUnit) source).findPrimaryType();
View Full Code Here

Examples of ch.ethz.prose.eclipse.internal.run.AspectNode

     * @see org.eclipse.swt.dnd.DragSourceListener#dragFinished(org.eclipse.swt.dnd.DragSourceEvent)
     */
    public void dragFinished(DragSourceEvent event) {
        Object node = SelectionUtil.getSingleElement(viewer.getSelection());
        if (node instanceof AspectNode && event.detail == DND.DROP_MOVE) {
            AspectNode aspect = (AspectNode) node;
            if (event.detail == DND.DROP_MOVE) {
                try {
                    aspect.withdraw();
                } catch (UnreachableException e) {
                    ProsePlugin.log(e);
                    ProsePlugin.openErrorDialog("Aspect withdrawal failed",
                            "Could not withdraw aspect because the Prose application is not reachable.");
                }
View Full Code Here

Examples of org.geppetto.core.model.runtime.AspectNode

    EntityNode hhcell = new EntityNode("hhcell");
   
    EntityNode purkinje = new EntityNode("purkinje");

    AspectNode electrical = new AspectNode("electrical");
    AspectNode electrical2 = new AspectNode("electrical");

    AspectSubTreeNode visualization = electrical.getSubTree(AspectTreeType.VISUALIZATION_TREE);
    SphereNode sphere = new SphereNode("purkinje");
    visualization.addChild(sphere);

    runtime.addChild(hhcell);
    runtime.addChild(purkinje);
    hhcell.getAspects().add(electrical);
    purkinje.getAspects().add(electrical2);
    electrical.setParent(hhcell);
    electrical2.setParent(purkinje);
   
    VisualGroupNode group = new VisualGroupNode("group");
    group.setName("Group 1");
    group.setHighSpectrumColor("red");
    group.setLowSpectrumColor("yellow");
View Full Code Here

Examples of org.geppetto.core.model.runtime.AspectNode

    EntityNode hhcell = new EntityNode("hhcell");
   
    EntityNode purkinje = new EntityNode("purkinje");

    AspectNode electrical = new AspectNode("electrical");
    AspectNode electrical2 = new AspectNode("electrical");

    AspectSubTreeNode visualization = new AspectSubTreeNode(
        AspectTreeType.VISUALIZATION_TREE);

    SphereNode sphere = new SphereNode("purkinje");
    visualization.addChild(sphere);

    runtime.addChild(hhcell);
    runtime.addChild(purkinje);
    hhcell.getAspects().add(electrical);
    purkinje.getAspects().add(electrical2);
    electrical.setParent(hhcell);
    electrical2.setParent(purkinje);

    ConnectionNode con1 = new ConnectionNode("Connection_1");
    con1.setEntityInstancePath(hhcell.getInstancePath());
    con1.setType(ConnectionType.TO);
    con1.setParent(hhcell);
View Full Code Here

Examples of org.geppetto.core.model.runtime.AspectNode

    EntityNode entity1 = new EntityNode("Entity1");
    EntityNode entity2 = new EntityNode("Entity2");
    EntityNode entity3 = new EntityNode("Entity3");

    AspectNode aspectA = new AspectNode("Aspect1");
    aspectA.setId("12");
    TestSimulator sim = new TestSimulator();
    aspectA.setSimulator(sim);
    TestModelInterpreter modelInt = new TestModelInterpreter();
    aspectA.setModelInterpreter(modelInt);

    AspectNode aspectB = new AspectNode("Aspect2");
    aspectA.setId("125");
    aspectA.setSimulator(sim);
    aspectA.setModelInterpreter(modelInt);

    AspectNode aspectC = new AspectNode("Aspect3");
    aspectB.setId("123");
    aspectB.setSimulator(sim);
    aspectB.setModelInterpreter(modelInt);

    AspectSubTreeNode model = new AspectSubTreeNode(
        AspectTreeType.MODEL_TREE);
    model.setModified(true);

    DynamicsSpecificationNode dynamics = new DynamicsSpecificationNode(
        "Dynamics");

    PhysicalQuantity value = new PhysicalQuantity();
    value.setScalingFactor("10");
    value.setUnit("ms");
    value.setValue(new DoubleValue(10));
    dynamics.setInitialConditions(value);

    FunctionNode function = new FunctionNode("Function");
    function.setExpression("y=x+2");
    List<String> argumentsF = new ArrayList<String>();
    argumentsF.add("1");
    argumentsF.add("2");
    function.setArgument(argumentsF);

    dynamics.setDynamics(function);

    ParameterSpecificationNode parameter = new ParameterSpecificationNode(
        "Parameter");

    PhysicalQuantity value1 = new PhysicalQuantity();
    value1.setScalingFactor("10");
    value1.setUnit("ms");
    value1.setValue(new DoubleValue(10));

    parameter.setValue(value1);

    FunctionNode functionNode = new FunctionNode("FunctionNode");
    functionNode.setExpression("y=x^2");
    List<String> arguments = new ArrayList<String>();
    arguments.add("1");
    functionNode.setArgument(arguments);

    AspectSubTreeNode visualization = new AspectSubTreeNode(
        AspectTreeType.VISUALIZATION_TREE);
    visualization.setModified(true);

    SphereNode sphere = new SphereNode("sphere");
    Point p = new Point();
    p.setX(new Double(3.3));
    p.setY(new Double(4));
    p.setZ(new Double(-1.444));
    sphere.setPosition(p);
    sphere.setRadius(new Double(33));

    CylinderNode cylinder = new CylinderNode("cylinder");
    Point p2 = new Point();
    p2.setX(new Double(6.3));
    p2.setY(new Double(8));
    p2.setZ(new Double(-3.999));
    cylinder.setPosition(p2);
    Point p3 = new Point();
    p3.setX(new Double(6.3));
    p3.setY(new Double(8));
    p3.setZ(new Double(-3.999));
    cylinder.setDistal(p3);
    cylinder.setRadiusBottom(new Double(34.55));
    cylinder.setRadiusTop(new Double(34.55));

    CylinderNode cylinder2 = new CylinderNode("cylinder");
    cylinder2.setPosition(p2);
    cylinder2.setDistal(p3);
    cylinder2.setRadiusBottom(new Double(34.55));
    cylinder2.setRadiusTop(new Double(34.55));

    CylinderNode cylinder3 = new CylinderNode("cylinder");
    cylinder3.setPosition(p2);
    cylinder3.setDistal(p3);
    cylinder3.setRadiusBottom(new Double(34.55));
    cylinder3.setRadiusTop(new Double(34.55));

    CylinderNode cylinder4 = new CylinderNode("cylinder");
    cylinder4.setPosition(p2);
    cylinder4.setDistal(p3);
    cylinder4.setRadiusBottom(new Double(34.55));
    cylinder4.setRadiusTop(new Double(34.55));

    CylinderNode cylinder5 = new CylinderNode("cylinder");
    cylinder5.setPosition(p2);
    cylinder5.setDistal(p3);
    cylinder5.setRadiusBottom(new Double(34.55));
    cylinder5.setRadiusTop(new Double(34.55));

    CompositeNode vg = new CompositeNode("vg");
    vg.addChild(sphere);
    vg.addChild(cylinder);
    vg.addChild(cylinder2);
    vg.addChild(cylinder3);
    vg.addChild(cylinder4);
    vg.addChild(cylinder5);

    CompositeNode vg2 = new CompositeNode("vg2");
    vg2.addChild(cylinder);
    vg2.addChild(cylinder2);
    vg2.addChild(cylinder3);
    vg2.addChild(cylinder4);
    vg2.addChild(cylinder5);
    vg2.addChild(sphere);

    AspectSubTreeNode simulation = new AspectSubTreeNode(
        AspectTreeType.WATCH_TREE);
    simulation.setModified(true);

    CompositeNode hhpop = new CompositeNode("hhpop[0]");

    VariableNode v = new VariableNode("v");
    PhysicalQuantity quantity = new PhysicalQuantity();
    quantity.setValue(ValuesFactory.getDoubleValue(20d));

    PhysicalQuantity quantity2 = new PhysicalQuantity();
    quantity2.setValue(ValuesFactory.getDoubleValue(100d));

    v.addPhysicalQuantity(quantity);
    v.addPhysicalQuantity(quantity2);

    ParameterNode a1 = new ParameterNode("a");

    runtimeTree.addChild(entity1);
    runtimeTree.addChild(entity2);
    entity1.addChild(entity2);
    entity2.addChild(entity3);
    entity2.getAspects().add(aspectB);
    entity1.getAspects().add(aspectA);
    entity3.getAspects().add(aspectC);
    aspectC.setParent(entity3);
    aspectB.setParent(entity2);
    aspectA.setParent(entity1);
    aspectA.addChild(model);
    model.addChild(parameter);
    model.addChild(dynamics);
    model.addChild(functionNode);
    model.setModified(false);
    AspectNode parentAspect = ((AspectNode) model.getParent());
    parentAspect.setModified(false);

    aspectA.addChild(visualization);
    visualization.addChild(vg);
    visualization.addChild(vg2);
    visualization.setModified(false);
    parentAspect = ((AspectNode) visualization.getParent());
    parentAspect.setModified(false);

    aspectA.addChild(simulation);
    simulation.addChild(hhpop);
    simulation.setModified(false);
    parentAspect = ((AspectNode) simulation.getParent());
    parentAspect.setModified(false);
    hhpop.addChild(v);
    hhpop.addChild(a1);

    SerializeTreeVisitor visitor = new SerializeTreeVisitor();
    runtimeTree.apply(visitor);
View Full Code Here

Examples of org.geppetto.core.model.runtime.AspectNode

    EntityNode entity2 = new EntityNode("Entity2");
    EntityNode entity3 = new EntityNode("Entity3");
    EntityNode entity4 = new EntityNode("Entity4");
    EntityNode entity5 = new EntityNode("Entity5");

    AspectNode aspectA = new AspectNode("Aspect1");
    aspectA.setId("12");
    TestSimulator sim = new TestSimulator();
    aspectA.setSimulator(sim);
    TestModelInterpreter modelInt = new TestModelInterpreter();
    aspectA.setModelInterpreter(modelInt);

    AspectNode aspectB = new AspectNode("Aspect2");
    aspectA.setId("125");
    aspectA.setSimulator(sim);
    aspectA.setModelInterpreter(modelInt);

    AspectNode aspectC = new AspectNode("Aspect3");
    aspectB.setId("123");
    aspectB.setSimulator(sim);
    aspectB.setModelInterpreter(modelInt);

    AspectSubTreeNode model = new AspectSubTreeNode(
        AspectTreeType.MODEL_TREE);
    model.setModified(true);

    DynamicsSpecificationNode dynamics = new DynamicsSpecificationNode(
        "Dynamics");

    PhysicalQuantity value = new PhysicalQuantity();
    value.setScalingFactor("10");
    value.setUnit("ms");
    value.setValue(new DoubleValue(10));
    dynamics.setInitialConditions(value);

    FunctionNode function = new FunctionNode("Function");
    function.setExpression("y=x+2");
    List<String> argumentsF = new ArrayList<String>();
    argumentsF.add("1");
    argumentsF.add("2");
    function.setArgument(argumentsF);

    dynamics.setDynamics(function);

    ParameterSpecificationNode parameter = new ParameterSpecificationNode(
        "Parameter");

    PhysicalQuantity value1 = new PhysicalQuantity();
    value1.setScalingFactor("10");
    value1.setUnit("ms");
    value1.setValue(new DoubleValue(10));

    parameter.setValue(value1);

    FunctionNode functionNode = new FunctionNode("FunctionNode");
    functionNode.setExpression("y=x^2");
    List<String> arguments = new ArrayList<String>();
    arguments.add("1");
    functionNode.setArgument(arguments);

    AspectSubTreeNode visualization = new AspectSubTreeNode(
        AspectTreeType.VISUALIZATION_TREE);
    visualization.setModified(true);

    SphereNode sphere = new SphereNode("sphere");
    Point p = new Point();
    p.setX(new Double(3.3));
    p.setY(new Double(4));
    p.setZ(new Double(-1.444));
    sphere.setPosition(p);
    sphere.setRadius(new Double(33));

    CylinderNode cylinder = new CylinderNode("cylinder");
    Point p2 = new Point();
    p2.setX(new Double(6.3));
    p2.setY(new Double(8));
    p2.setZ(new Double(-3.999));
    cylinder.setPosition(p2);
    Point p3 = new Point();
    p3.setX(new Double(6.3));
    p3.setY(new Double(8));
    p3.setZ(new Double(-3.999));
    cylinder.setDistal(p3);
    cylinder.setRadiusBottom(new Double(34.55));
    cylinder.setRadiusTop(new Double(34.55));

    CylinderNode cylinder2 = new CylinderNode("cylinder");
    cylinder2.setPosition(p2);
    cylinder2.setDistal(p3);
    cylinder2.setRadiusBottom(new Double(34.55));
    cylinder2.setRadiusTop(new Double(34.55));

    CylinderNode cylinder3 = new CylinderNode("cylinder");
    cylinder3.setPosition(p2);
    cylinder3.setDistal(p3);
    cylinder3.setRadiusBottom(new Double(34.55));
    cylinder3.setRadiusTop(new Double(34.55));

    CylinderNode cylinder4 = new CylinderNode("cylinder");
    cylinder4.setPosition(p2);
    cylinder4.setDistal(p3);
    cylinder4.setRadiusBottom(new Double(34.55));
    cylinder4.setRadiusTop(new Double(34.55));

    CylinderNode cylinder5 = new CylinderNode("cylinder");
    cylinder5.setPosition(p2);
    cylinder5.setDistal(p3);
    cylinder5.setRadiusBottom(new Double(34.55));
    cylinder5.setRadiusTop(new Double(34.55));

    CompositeNode vg = new CompositeNode("vg");
    vg.addChild(sphere);
    vg.addChild(cylinder);
    vg.addChild(cylinder2);
    vg.addChild(cylinder3);
    vg.addChild(cylinder4);
    vg.addChild(cylinder5);

    CompositeNode vg2 = new CompositeNode("vg2");
    vg2.addChild(cylinder);
    vg2.addChild(cylinder2);
    vg2.addChild(cylinder3);
    vg2.addChild(cylinder4);
    vg2.addChild(cylinder5);
    vg2.addChild(sphere);

    AspectSubTreeNode simulation = new AspectSubTreeNode(
        AspectTreeType.WATCH_TREE);
    simulation.setModified(true);

    CompositeNode hhpop = new CompositeNode("hhpop[0]");

    VariableNode v = new VariableNode("v");
    PhysicalQuantity quantity = new PhysicalQuantity();
    quantity.setValue(ValuesFactory.getDoubleValue(20d));

    PhysicalQuantity quantity2 = new PhysicalQuantity();
    quantity2.setValue(ValuesFactory.getDoubleValue(100d));

    v.addPhysicalQuantity(quantity);
    v.addPhysicalQuantity(quantity2);

    ParameterNode a1 = new ParameterNode("a");

    runtimeTree.addChild(entity1);
    runtimeTree.addChild(entity4);
    entity1.addChild(entity2);
    entity2.addChild(entity3);
    entity4.addChild(entity5);
    entity2.getAspects().add(aspectB);
    entity1.getAspects().add(aspectA);
    entity3.getAspects().add(aspectC);
    aspectC.setParent(entity3);
    aspectB.setParent(entity2);
    aspectA.setParent(entity1);
    aspectA.addChild(model);
    model.addChild(parameter);
    model.addChild(dynamics);
View Full Code Here

Examples of org.geppetto.core.model.runtime.AspectNode

    EntityNode entity2 = new EntityNode("Entity2");
    EntityNode entity3 = new EntityNode("Entity3");
    EntityNode entity4 = new EntityNode("Entity4");
    EntityNode entity5 = new EntityNode("Entity5");

    AspectNode aspectA = new AspectNode("Aspect1");
    aspectA.setId("12");
    TestSimulator sim = new TestSimulator();
    aspectA.setSimulator(sim);
    TestModelInterpreter modelInt = new TestModelInterpreter();
    aspectA.setModelInterpreter(modelInt);

    AspectNode aspectB = new AspectNode("Aspect2");
    aspectA.setId("125");
    aspectA.setSimulator(sim);
    aspectA.setModelInterpreter(modelInt);

    AspectNode aspectC = new AspectNode("Aspect3");
    aspectB.setId("123");
    aspectB.setSimulator(sim);
    aspectB.setModelInterpreter(modelInt);

    AspectSubTreeNode model = new AspectSubTreeNode(
        AspectTreeType.MODEL_TREE);
    model.setModified(true);

    DynamicsSpecificationNode dynamics = new DynamicsSpecificationNode(
        "Dynamics");

    PhysicalQuantity value = new PhysicalQuantity();
    value.setScalingFactor("10");
    value.setUnit("ms");
    value.setValue(new DoubleValue(10));
    dynamics.setInitialConditions(value);

    FunctionNode function = new FunctionNode("Function");
    function.setExpression("y=x+2");
    List<String> argumentsF = new ArrayList<String>();
    argumentsF.add("1");
    argumentsF.add("2");
    function.setArgument(argumentsF);

    dynamics.setDynamics(function);

    ParameterSpecificationNode parameter = new ParameterSpecificationNode(
        "Parameter");

    PhysicalQuantity value1 = new PhysicalQuantity();
    value1.setScalingFactor("10");
    value1.setUnit("ms");
    value1.setValue(new DoubleValue(10));

    parameter.setValue(value1);

    FunctionNode functionNode = new FunctionNode("FunctionNode");
    functionNode.setExpression("y=x^2");
    List<String> arguments = new ArrayList<String>();
    arguments.add("1");
    functionNode.setArgument(arguments);

    AspectSubTreeNode visualization = new AspectSubTreeNode(
        AspectTreeType.VISUALIZATION_TREE);
    visualization.setModified(true);

    SphereNode sphere = new SphereNode("sphere");
    Point p = new Point();
    p.setX(new Double(3.3));
    p.setY(new Double(4));
    p.setZ(new Double(-1.444));
    sphere.setPosition(p);
    sphere.setRadius(new Double(33));

    CylinderNode cylinder = new CylinderNode("cylinder");
    Point p2 = new Point();
    p2.setX(new Double(6.3));
    p2.setY(new Double(8));
    p2.setZ(new Double(-3.999));
    cylinder.setPosition(p2);
    Point p3 = new Point();
    p3.setX(new Double(6.3));
    p3.setY(new Double(8));
    p3.setZ(new Double(-3.999));
    cylinder.setDistal(p3);
    cylinder.setRadiusBottom(new Double(34.55));
    cylinder.setRadiusTop(new Double(34.55));

    CylinderNode cylinder2 = new CylinderNode("cylinder");
    cylinder2.setPosition(p2);
    cylinder2.setDistal(p3);
    cylinder2.setRadiusBottom(new Double(34.55));
    cylinder2.setRadiusTop(new Double(34.55));

    CylinderNode cylinder3 = new CylinderNode("cylinder");
    cylinder3.setPosition(p2);
    cylinder3.setDistal(p3);
    cylinder3.setRadiusBottom(new Double(34.55));
    cylinder3.setRadiusTop(new Double(34.55));

    CylinderNode cylinder4 = new CylinderNode("cylinder");
    cylinder4.setPosition(p2);
    cylinder4.setDistal(p3);
    cylinder4.setRadiusBottom(new Double(34.55));
    cylinder4.setRadiusTop(new Double(34.55));

    CylinderNode cylinder5 = new CylinderNode("cylinder");
    cylinder5.setPosition(p2);
    cylinder5.setDistal(p3);
    cylinder5.setRadiusBottom(new Double(34.55));
    cylinder5.setRadiusTop(new Double(34.55));

    CompositeNode vg = new CompositeNode("vg");
    vg.addChild(sphere);
    vg.addChild(cylinder);
    vg.addChild(cylinder2);
    vg.addChild(cylinder3);
    vg.addChild(cylinder4);
    vg.addChild(cylinder5);

    CompositeNode vg2 = new CompositeNode("vg2");
    vg2.addChild(cylinder);
    vg2.addChild(cylinder2);
    vg2.addChild(cylinder3);
    vg2.addChild(cylinder4);
    vg2.addChild(cylinder5);
    vg2.addChild(sphere);

    AspectSubTreeNode simulation = new AspectSubTreeNode(
        AspectTreeType.WATCH_TREE);
    simulation.setModified(true);

    CompositeNode hhpop = new CompositeNode("hhpop[0]");

    VariableNode v = new VariableNode("v");
    PhysicalQuantity quantity = new PhysicalQuantity();
    quantity.setValue(ValuesFactory.getDoubleValue(20d));

    PhysicalQuantity quantity2 = new PhysicalQuantity();
    quantity2.setValue(ValuesFactory.getDoubleValue(100d));

    v.addPhysicalQuantity(quantity);
    v.addPhysicalQuantity(quantity2);

    ParameterNode a1 = new ParameterNode("a");

    runtimeTree.addChild(entity1);
    runtimeTree.addChild(entity4);
    entity1.addChild(entity2);
    entity2.addChild(entity3);
    entity4.addChild(entity5);
    entity2.getAspects().add(aspectB);
    entity1.getAspects().add(aspectA);
    entity3.getAspects().add(aspectC);
    aspectC.setParent(entity3);
    aspectB.setParent(entity2);
    aspectA.setParent(entity1);
    aspectA.addChild(model);
    model.addChild(parameter);
    model.addChild(dynamics);
View Full Code Here

Examples of org.geppetto.core.model.runtime.AspectNode

  public void testTreeSerialization() {
    RuntimeTreeRoot runtime = new RuntimeTreeRoot("root");

    EntityNode entity_A = new EntityNode("Entity_A");

    AspectNode aspect_A = new AspectNode("Aspect_A");

    AspectSubTreeNode simulation = new AspectSubTreeNode(
        AspectTreeType.WATCH_TREE);

    VariableNode dummyNode = new VariableNode("dummyFloat");
    PhysicalQuantity quantity = new PhysicalQuantity();
    quantity.setValue(ValuesFactory.getDoubleValue(50d));
    dummyNode.addPhysicalQuantity(quantity);

    PhysicalQuantity quantity2 = new PhysicalQuantity();
    quantity2.setValue(ValuesFactory.getDoubleValue(100d));
    dummyNode.addPhysicalQuantity(quantity2);

    VariableNode anotherDummyNode = new VariableNode("dummyDouble");

    PhysicalQuantity quantity3 = new PhysicalQuantity();
    quantity3.setValue(ValuesFactory.getDoubleValue(20d));
    anotherDummyNode.addPhysicalQuantity(quantity3);

    PhysicalQuantity quantity4 = new PhysicalQuantity();
    quantity4.setValue(ValuesFactory.getDoubleValue(100d));
    anotherDummyNode.addPhysicalQuantity(quantity4);

    runtime.addChild(entity_A);
    entity_A.getAspects().add(aspect_A);
    aspect_A.setParent(entity_A);
    aspect_A.addChild(simulation);
    simulation.addChild(dummyNode);
    simulation.addChild(anotherDummyNode);

    simulation.setModified(true);
    aspect_A.setModified(true);
    entity_A.setModified(true);

    SerializeTreeVisitor visitor = new SerializeTreeVisitor();
    runtime.apply(visitor);
    String serialized = visitor.getSerializedTree();
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.