Package org.ontospread.gui.view.nodes

Examples of org.ontospread.gui.view.nodes.PrintNode


  public static DefaultGraph createGraph(Concept concept){
    DefaultGraph graph = new DefaultGraph();
    ArrayList <Node> nodes = new ArrayList <Node> ();
    ArrayList <Edge> edges = new ArrayList <Edge> ();      
    Node conceptNode = new ConceptNode(concept.getConceptDescription().getName());
    Node superClassRoot = new PrintNode( ApplicationResources.getString("superclasses.node.root"));
    Node subClassRoot = new PrintNode( ApplicationResources.getString("subclasses.node.root"));
    Node relationsRoot = new PrintNode( ApplicationResources.getString("relations.node.root"));
    Node instancesRoot = new PrintNode( ApplicationResources.getString("instances.node.root"));
    Node instancesOfRoot = new PrintNode( ApplicationResources.getString("instancesOf.node.root"));
    nodes.add(superClassRoot);
    nodes.add(subClassRoot);
    nodes.add(relationsRoot);
    nodes.add(instancesRoot);
    nodes.add(instancesOfRoot);
View Full Code Here


  public static DefaultGraph createGraphFromOntoSpreadState(OntologyDAO ontologyDAO, OntoSpreadState ontoSpreadState) throws Exception{
    DefaultGraph graph = new DefaultGraph();
    ArrayList <Node> nodes = new ArrayList <Node> ();
    ArrayList <Edge> edges = new ArrayList <Edge> ();
    //FIXME: Refactor, using relations and draw instances and concepts, equals
    Node root = new PrintNode( ApplicationResources.getString("info.node.root"));
    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);
View Full Code Here

    DefaultGraph graph = new DefaultGraph();
    ArrayList <Node> nodes = new ArrayList <Node> ();
    ArrayList <Edge> edges = new ArrayList <Edge> ();
    ConceptTO pathConceptTO = null;
    Node spreadedNode = new ActivateNode(formatActivation(conceptTO.getName(),concepts.get(conceptTO.getUri())), conceptTO.getUri());
    Node activatedRoot = new PrintNode(ApplicationResources.getString("initial.node.activated") );
    for (String conceptUri : spreadPathTable.keySet()) {
      PathTO[]path = spreadPathTable.get(conceptUri);
      if(path[path.length-1].getConceptUri().equals(conceptTO.getUri()) && !conceptUri.equals(conceptTO.getUri())){
        Node sonNode = spreadedNode;
        for (int i = path.length-1; i >=0 ; i--) {
View Full Code Here

    DefaultGraph graph = new DefaultGraph();
    ArrayList <Node> nodes = new ArrayList <Node> ();
    ArrayList <Edge> edges = new ArrayList <Edge> ();
    ConceptTO pathConceptTO = null;
    Node spreadedNode = new SpreadingNode(formatActivation(conceptTO.getName(),concepts.get(conceptTO.getUri())), conceptTO.getUri());
    Node activatedRoot = new PrintNode(ApplicationResources.getString("initial.node.activated") );
    for (String conceptUri : spreadPathTable.keySet()) {
      PathTO[]path = spreadPathTable.get(conceptUri);
      if(path[path.length-1].getConceptUri().equals(conceptTO.getUri()) && !conceptUri.equals(conceptTO.getUri())){
        Node sonNode = spreadedNode;
        for (int i = path.length-1; i >=0 ; i--) {
View Full Code Here

TOP

Related Classes of org.ontospread.gui.view.nodes.PrintNode

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.