Package org.geppetto.core.model.runtime

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


    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);
    con1.setName("Connection1");
    hhcell.getConnections().add(con1);
    VisualObjectReferenceNode visObj = new VisualObjectReferenceNode("Vis");
    visObj.setAspectInstancePath(electrical.getInstancePath());
    visObj.setVisualObjectId(sphere.getId());
    TextMetadataNode text = new TextMetadataNode("Text");
    text.setValue(new DoubleValue(2));
   
    URLMetadataNode url = new URLMetadataNode("URL");
    url.setValue(new DoubleValue(2));
    url.setURL("hhtp://url.com");
   
    FunctionNode function = new FunctionNode("Function");
    function.setExpression("x=y^2");
    function.setName("hello");
   
    con1.getCustomNodes().add(text);
    con1.getCustomNodes().add(url);
    con1.getCustomNodes().add(function);
    con1.getVisualReferences().add(visObj);
   
    ConnectionNode con2 = new ConnectionNode("Connection_2");
    con2.setEntityInstancePath(purkinje.getInstancePath());
    con2.setType(ConnectionType.FROM);
    con2.setParent(purkinje);
    purkinje.getConnections().add(con2);
   
    SerializeTreeVisitor visitor = new SerializeTreeVisitor();
    runtime.apply(visitor);
    String serialized = visitor.getSerializedTree();
View Full Code Here

TOP

Related Classes of org.geppetto.core.model.runtime.ConnectionNode

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.