Examples of PathNode


Examples of org.ontospread.gui.view.nodes.spread.PathNode

   
  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 org.soybeanMilk.web.vp.PathNode

  @Test
  public void createNotVariable()
  {
    {
      String s="abc";
      PathNode pn=new PathNode(s);
     
      Assert.assertTrue( !pn.isVariable() );
      Assert.assertEquals(s, pn.getNodeValue());
    }
   
    {
      String s="{abc";
      PathNode pn=new PathNode(s);
     
      Assert.assertTrue( !pn.isVariable() );
      Assert.assertEquals(s, pn.getNodeValue());
    }
   
    {
      String s="abc}";
      PathNode pn=new PathNode(s);
     
      Assert.assertTrue( !pn.isVariable() );
      Assert.assertEquals(s, pn.getNodeValue());
    }
  }
View Full Code Here

Examples of org.soybeanMilk.web.vp.PathNode

  @Test
  public void createIsVariable()
  {
    {
      String s="{abc}";
      PathNode pn=new PathNode(s);
     
      Assert.assertTrue( pn.isVariable() );
      Assert.assertEquals("abc", pn.getNodeValue());
    }
   
    {
      String s="{}";
      PathNode pn=new PathNode(s);
     
      Assert.assertTrue( pn.isVariable() );
      Assert.assertEquals("", pn.getNodeValue());
    }
  }
View Full Code Here

Examples of org.soybeanMilk.web.vp.PathNode

 
  @Test
  public void compareTo()
  {
    {
      PathNode pn0=new PathNode("abc");
      PathNode pn1=new PathNode("{def}");
     
      Assert.assertTrue( pn0.compareTo(pn1)>0 );
    }
   
    {
      PathNode pn0=new PathNode("{abc}");
      PathNode pn1=new PathNode("{def}");
     
      Assert.assertTrue( pn0.compareTo(pn1)==0 );
    }
   
    {
      PathNode pn0=new PathNode("{abc}");
      PathNode pn1=new PathNode("{}");
     
      Assert.assertTrue( pn0.compareTo(pn1)==0 );
    }
   
    {
      PathNode pn0=new PathNode("{abc}");
      PathNode pn1=new PathNode("def");
     
      Assert.assertTrue( pn0.compareTo(pn1)<0 );
    }
  }
View Full Code Here

Examples of org.wymiwyg.commons.util.dirbrowser.PathNode

        .getClassLoader().getResources("META-INF/web/application/");
    List<PathNode> nodeList = new ArrayList<PathNode>();
    while (basePathURLEnum.hasMoreElements()) {
      nodeList.add(PathNodeFactory.getPathNode(basePathURLEnum.nextElement()));
    }
    PathNode rootNode = new MultiPathNode(nodeList.toArray(new PathNode[nodeList.size()]));
    prefixHandlerMap.put("/application/", new ApplicationServerHandler(
        rootNode, "/application"));
    prefixHandlerMap.put("/put-infobit", new PutInfoBitHandler(store, identity));
    prefixHandlerMap.put("/meta/sources", new GraphHandlerAdaptor(
        new SourceGraphHandler(store)));
View Full Code Here

Examples of org.wymiwyg.commons.util.dirbrowser.PathNode

    String path = request.getRequestURI().getPath();
    response.addHeader(HeaderName.CACHE_CONTROL, "max-age=300");
    response.addHeader(HeaderName.CACHE_CONTROL, "public");
    path = path.substring(requestURIPrefixLength, path.length());
    StringTokenizer tokens = new StringTokenizer(path, "/");
    PathNode currentBrowseNode = rootNode;
    while (tokens.hasMoreTokens()) {
      String currentToken = tokens.nextToken();
      if (!tokens.hasMoreTokens()) {
        selectBestChild(currentBrowseNode, currentToken,
            request, response);
        return;
      } else {
        currentBrowseNode = currentBrowseNode.getSubPath(currentToken);
      }
    }
    throw new HandlerException(ResponseStatus.NOT_FOUND, "file "+path+" not found");

  }
View Full Code Here

Examples of org.wymiwyg.commons.util.dirbrowser.PathNode

    String fileName = childStrings[0];
    MimeType mimeType = MediaTypesUtil.getDefaultInstance().getTypeForExtension(getExtension(fileName));
    if (mimeType != null) {
      response.addHeader(HeaderName.CONTENT_TYPE, mimeType.toString());
    }
    PathNode resultNode = pathNode.getSubPath(fileName);
    final InputStream dataInputStream;
    try {
      //log.info("getting stream from"+fileName+" in "+pathNode+"("+resultNode+")");
      dataInputStream = resultNode.getInputStream();
    } catch (IOException e) {
      throw new HandlerException(e);
    }
    response.setBody(new MessageBody2Read() {
View Full Code Here

Examples of org.wymiwyg.commons.util.dirbrowser.PathNode

      }

    };
    URL basePathURL = GVSServerLauncher.class
        .getResource("/META-INF/web/application/");
    PathNode rootNode = PathNodeFactory.getPathNode(basePathURL);
    WebServer webServer = webServerFactory.startNewWebServer(
        new ApplicationServerHandler(rootNode, "/application"),
        serverBinding);
    try {
      URL serverURL = new URL("http://"
View Full Code Here

Examples of org.wymiwyg.commons.util.dirbrowser.PathNode

      }

    };
    URL basePathURL = GVSServerLauncher.class
        .getResource("/META-INF/web/application/");
    PathNode rootNode = PathNodeFactory.getPathNode(basePathURL);
    WebServer webServer = webServerFactory.startNewWebServer(
        new ApplicationServerHandler(rootNode, "/application"),
        serverBinding);
    try {
      URL serverURL = new URL("http://"
View Full Code Here

Examples of org.wymiwyg.commons.util.dirbrowser.PathNode

      }

    };
    URL basePathURL = GVSServerLauncher.class
        .getResource("/META-INF/web/application/");
    PathNode rootNode = PathNodeFactory.getPathNode(basePathURL);
    WebServer webServer = webServerFactory.startNewWebServer(
        new ApplicationServerHandler(rootNode, "/application"),
        serverBinding);
    URL serverURL = new URL("http://"
        + serverBinding.getInetAddress().getHostAddress() + ":"
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.