Examples of LineEdge


Examples of net.sourceforge.jpowergraph.example.edges.LineEdge

    nodes.add(superClassRoot);
    nodes.add(subClassRoot);
    nodes.add(relationsRoot);
    nodes.add(instancesRoot);
    nodes.add(instancesOfRoot);
    edges.add(new LineEdge(conceptNode,superClassRoot));
    edges.add(new LineEdge(conceptNode,subClassRoot));
    edges.add(new LineEdge(conceptNode,instancesRoot));
    edges.add(new LineEdge(conceptNode,relationsRoot));
    edges.add(new LineEdge(conceptNode,instancesRoot));
    edges.add(new LineEdge(conceptNode,instancesOfRoot));
    Node relatedNode = null;
    for (Relation r : concept.getRelations().getRelations()) {
      //For each conceptDescription in relation
      for (ConceptDescription conceptDescription : r.getConceptDescriptions()) {
        final String objectConceptUri = conceptDescription.getUri();
        if(objectConceptUri!=null ){
          if (r.getOnproperty() != null) {
            relatedNode = new RelationNode(conceptDescription.getName());           
            edges.add(new TextEdge(relationsRoot,relatedNode,formatRelation(r.getOnproperty())));           
          } else if (isSuperclassOfRelation(r)) {                     
            relatedNode = new SuperClassNode(conceptDescription.getName());           
            edges.add(new LineEdge(superClassRoot, relatedNode));
            } else {
              // otherwise, the object _is superclass of_ this, so...
              relatedNode = new SubClassNode(conceptDescription.getName());
              edges.add(new LineEdge(subClassRoot, relatedNode));
            }
          nodes.add(relatedNode);
          }
         
      }//End for each concept description in relation
View Full Code Here

Examples of net.sourceforge.jpowergraph.example.edges.LineEdge

  private static void addNodes(List<ConceptDescription> descriptions, ArrayList<Node> nodes, ArrayList<Edge> edges, Node instancesRoot) {
    Node relatedNode;
    for (ConceptDescription description : descriptions) {
        relatedNode = new InstanceNode(description.getName());
        edges.add(new LineEdge(instancesRoot, relatedNode));
        nodes.add(relatedNode);
    }
  }
View Full Code Here

Examples of net.sourceforge.jpowergraph.example.edges.LineEdge

    Node initialRoot = new PrintNode( ApplicationResources.getString("initial.node.root"));
    Map<String, Double> concepts = ontoSpreadState.getConcepts();
    for (ScoredConceptTO initialConcept : ontoSpreadState.getInitialConcepts()) {
      ConceptTO conceptTO = ontologyDAO.getConceptTO(initialConcept.getConceptUri());
      Node node = new InitialNode(formatActivation(conceptTO.getName(),concepts.get(conceptTO.getUri())),conceptTO.getUri());
      edges.add(new LineEdge(initialRoot,node));
      nodes.add(node);
    }

    Node spreadedRoot = new PrintNode( ApplicationResources.getString("initial.node.spreaded"));
    for (String currentSpread : ontoSpreadState.getSpreadedConcepts()) {
      ConceptTO conceptTO = ontologyDAO.getConceptTO(currentSpread);
      Node currentNode = new SpreadNode(formatActivation(conceptTO.getName(),concepts.get(conceptTO.getUri())),conceptTO.getUri());
      edges.add(new LineEdge(spreadedRoot,currentNode));
      nodes.add(currentNode);
    }

    Node activatedRoot = new PrintNode(ApplicationResources.getString("initial.node.activated") );
    for (UriDepthPair activated : ontoSpreadState.getSortedList()) {
      ConceptTO conceptTO = ontologyDAO.getConceptTO(activated.getUri())
      Node currentNode = new ActivateNode(formatActivation(conceptTO.getName(),concepts.get(conceptTO.getUri())),conceptTO.getUri());
      edges.add(new ArrowEdge(activatedRoot,currentNode));
      nodes.add(currentNode);
    }
    //Creating skeleton of graph
    edges.add(new LineEdge(root,initialRoot));
    edges.add(new LineEdge(root,spreadedRoot));
    edges.add(new LineEdge(root,activatedRoot));
    nodes.add(root);
    nodes.add(initialRoot);
    nodes.add(spreadedRoot);
    nodes.add(activatedRoot);
    graph.addElements(nodes, edges);
View Full Code Here

Examples of net.sourceforge.jpowergraph.example.edges.LineEdge

                  concepts.get(pathConceptTO.getUri())),path[i].getConceptUri());
//          for(String relation:path[i].getRelationsUri()){
//            if(relation == null) relation = "#INITIAL";
//            edges.add(new TextEdge(pathNode,sonNode,""+formatRelation(relation))); 
//          }
          edges.add(new LineEdge(pathNode,sonNode));
          nodes.add(pathNode);
          sonNode = pathNode;
        }
        pathConceptTO = ontologyDAO.getConceptTO(conceptUri);       
        Node activateNode =
View Full Code Here

Examples of net.sourceforge.jpowergraph.example.edges.LineEdge

                  concepts.get(pathConceptTO.getUri())),path[i].getConceptUri());
//          for(String relation:path[i].getRelationsUri()){
//            if(relation == null) relation = "#INITIAL";
//            edges.add(new TextEdge(pathNode,sonNode,""+formatRelation(relation))); 
//          }
          edges.add(new LineEdge(pathNode,sonNode));
          nodes.add(pathNode);
          sonNode = pathNode;
        }
        pathConceptTO = ontologyDAO.getConceptTO(conceptUri);       
        Node activateNode =
View Full Code Here

Examples of net.sourceforge.jpowergraph.example.edges.LineEdge

  private void showPathNode(Node currentNode, String currentUri, String[] path, OntologyDAO ontologyDAO,  Map<String, Double> concepts ,  ArrayList <Node> nodes, ArrayList <Edge> edges) throws ConceptNotFoundException {
    for (String concept : path) {      
      if(!concept.equals(currentUri)){
        ConceptTO conceptPath = ontologyDAO.getConceptTO(concept);
        Node nodePath = new PathNode(conceptPath.getName()+" "+concepts.get(conceptPath.getUri()),conceptPath.getUri());             
        edges.add(new LineEdge(currentNode,nodePath));
        nodes.add(nodePath);
      }
    }
  }
View Full Code Here

Examples of net.sourceforge.jpowergraph.example.edges.LineEdge

        nodes.add(sn5);
        nodes.add(sn6);
        nodes.add(ssn1);
        nodes.add(ssn2);
       
        edges.add(new LineEdge(n1, sn1));
        edges.add(new TextEdge(n1, sn2, "edge label"));
        edges.add(new ClusterEdge(n1, sn3, true));
        edges.add(new LoopEdge2(sn3));
        edges.add(new LineEdge(n1, sn4));
        edges.add(new LoopEdge(sn4));
        edges.add(new LineEdge(n1, sn5));
        edges.add(new LoopEdge2(sn5));
        edges.add(new LineEdge(n1, sn6));
        edges.add(new ArrowEdge(sn1, ssn1));
        edges.add(new ArrowEdge(sn1, ssn2));
       
        graph.addElements(nodes, edges);
        return graph;
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.