Package org.geppetto.core.model.runtime

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


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

    EntityNode entity_A = new EntityNode("Entity_A");

    AspectNode aspect_A = new AspectNode("Aspect_A");

    AspectSubTreeNode model = new AspectSubTreeNode(
        AspectTreeType.MODEL_TREE);

    AspectSubTreeNode visualization = new AspectSubTreeNode(
        AspectTreeType.VISUALIZATION_TREE);

    visualization.setModified(false);

    AspectSubTreeNode simulation = new AspectSubTreeNode(
        AspectTreeType.WATCH_TREE);

    simulation.setModified(false);

    runtime.addChild(entity_A);
    entity_A.getAspects().add(aspect_A);
    entity_A.setModified(true);
    aspect_A.setParent(entity_A);
    aspect_A.setModified(true);
    aspect_A.addChild(model);
    aspect_A.addChild(visualization);
    aspect_A.addChild(simulation);

    SerializeTreeVisitor visitor = new SerializeTreeVisitor();
    runtime.apply(visitor);
    String serialized = visitor.getSerializedTree();
    System.out.println(serialized);
View Full Code Here


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

    EntityNode entity_A = new EntityNode("Entity_A");

    AspectNode aspect_A = new AspectNode("Aspect_A");

    AspectSubTreeNode model = new AspectSubTreeNode(
        AspectTreeType.MODEL_TREE);
    model.setModified(false);
    AspectSubTreeNode visualization = new AspectSubTreeNode(
        AspectTreeType.VISUALIZATION_TREE);
    visualization.setModified(false);
    AspectSubTreeNode simulation = new AspectSubTreeNode(
        AspectTreeType.WATCH_TREE);

    runtime.addChild(entity_A);
    entity_A.getAspects().add(aspect_A);
    entity_A.setModified(true);
    aspect_A.setParent(entity_A);
    aspect_A.setModified(true);
    aspect_A.addChild(model);
    aspect_A.addChild(visualization);
    aspect_A.addChild(simulation);

    SerializeTreeVisitor visitor = new SerializeTreeVisitor();
    runtime.apply(visitor);
    String serialized = visitor.getSerializedTree();
    System.out.println(serialized);
View Full Code Here

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

    EntityNode entity_A = new EntityNode("Entity_A");

    AspectNode aspect_A = new AspectNode("Aspect_A");

    AspectSubTreeNode model = new AspectSubTreeNode(
        AspectTreeType.MODEL_TREE);
    model.setModified(false);
    AspectSubTreeNode visualization = new AspectSubTreeNode(
        AspectTreeType.VISUALIZATION_TREE);

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

    runtime.addChild(entity_A);
    entity_A.getAspects().add(aspect_A);
    entity_A.setModified(true);
    aspect_A.setParent(entity_A);
    aspect_A.setModified(true);
    aspect_A.addChild(model);
    aspect_A.addChild(visualization);
    aspect_A.addChild(simulation);

    SerializeTreeVisitor visitor = new SerializeTreeVisitor();
    runtime.apply(visitor);
    String serialized = visitor.getSerializedTree();
    System.out.println(serialized);
View Full Code Here

TOP

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

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.