Package org.vietspider.html.path2

Examples of org.vietspider.html.path2.Node


  }

 
  @Override
  public void insertFederatedQueryOperator(final ASTService node, final OperatorConnection connection){
    Node child0 = node.jjtGetChild(0);
    if (child0 instanceof ASTVar) {
      Join join = new Join();
      connection.connect(join);
      SeveralSucceedingOperators sso = new SeveralSucceedingOperators();
      sso.addSucceedingOperator(join, 0);
View Full Code Here


      while(n.jjtGetParent()!=null && !(n instanceof ASTGraphConstraint)){
        n = n.jjtGetParent();
      }
      String additionalGraphVariable = "";
      if(n instanceof ASTGraphConstraint){
        final Node child0 = n.jjtGetChild(0);
        if(child0 instanceof ASTVar) {
          additionalGraphVariable = " " + ((ASTVar)child0).toQueryString();
        }
      }
      // intermediate Strings are used for the special queries
View Full Code Here

  @Override
  public Object evaluate(final ASTFunctionCall node, final Bindings b, final Map<Node, Object> d) throws TypeErrorException, NotBoundException {
    final Literal name = LazyLiteral.getLiteral(node.jjtGetChild(0));
    final ExternalFunction externalFunction = EvaluationVisitorImplementation.externalFunctions.get(name);
    if(externalFunction!=null){
      final Node child1 = node.jjtGetChild(1);
      final int number = child1.jjtGetNumChildren();
      final Object[] args = new Object[number];
      for(int i=0; i<number; i++){
        args[i] = child1.jjtGetChild(i).accept(this, b, d);
      }
      return externalFunction.evaluate(args);
    }
    if (name.toString().startsWith("<http://www.w3.org/2001/XMLSchema#")) {
      return Helper.cast(name.toString(), this.resultOfChildZero(node.jjtGetChild(1), b, d));
View Full Code Here

      final Map<Node, Object> d) throws NotBoundException, TypeErrorException {
    if (node.jjtGetNumChildren() == 0) {
      return "";
    }
    // jump over ASTExpressionList!
    final Node child0 = node.jjtGetChild(0);
    if (child0 instanceof ASTNIL || child0.jjtGetNumChildren() == 0) {
      return "";
    }
    Object result = Helper.unlazy(child0.jjtGetChild(0).accept(this, b, d));
    if (Helper.isNumeric(result)) {
      return null;
    }
    for (int i = 1; i < child0.jjtGetNumChildren(); i++) {

      final Object child = Helper.unlazy(child0.jjtGetChild(i).accept(this, b, d));

      if (Helper.isNumeric(child)) {
        return null;
      }
View Full Code Here

      return !this.handleInAndNotIn(node, b, d);
  }

  protected boolean handleInAndNotIn(final Node node, final Bindings b, final Map<Node, Object> d) throws NotBoundException, TypeErrorException {
    final Object arg1 = Helper.unlazy(this.resultOfChildZero(node, b, d));
    final Node child1 = node.jjtGetChild(1);
    for(int i=0; i<child1.jjtGetNumChildren(); i++) {
      final Object arg2 = Helper.unlazy(child1.jjtGetChild(i).accept(this, b, d));
      if(Helper.equals(arg1, arg2)) {
        return true;
      }
    }
    return false;
View Full Code Here

    }
  }

  @Override
  public Object evaluate(final ASTCoalesceFuncNode node, final Bindings b, final Map<Node, Object> d) throws NotBoundException, TypeErrorException {
    final Node child0 = node.jjtGetChild(0);
    for(int i=0; i<child0.jjtGetNumChildren(); i++){
      try {
        return Helper.unlazy(child0.jjtGetChild(i).accept(this, b, d));
      } catch(final Error e){
        // ignore...
      } catch(final Exception e){
        // ignore...
      }
View Full Code Here

 
  @Test
  public void addClientSubscriptionInfo() {
    ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();
   
    Node node = new Node();
    node.setSecurityUrl("http://localhost:8080/services/securityUrl");
    node.setName("default");
   
    Clerk clerk = new Clerk();
    clerk.setName("default");
    clerk.setPublisher("root");
    clerk.setNode(node);
View Full Code Here

  public void setProperties(Properties properties) {
    this.properties = properties;
  }
 
  public Node getApiNode() {
    Node apiNode = new Node();
    apiNode.setCustodyTransferUrl(custodyTransferUrl);
    apiNode.setDescription(description);
    apiNode.setFactoryInitial(factoryInitial);
    apiNode.setFactoryNamingProvider(factoryNamingProvider);
    apiNode.setFactoryURLPkgs(factoryURLPkgs);
    apiNode.setInquiryUrl(inquiryUrl);
    apiNode.setJuddiApiUrl(juddiApiUrl);
    apiNode.setManagerName(managerName);
    apiNode.setName(name);
    apiNode.setProxyTransport(proxyTransport);
    apiNode.setPublishUrl(publishUrl);
    apiNode.setSecurityUrl(securityUrl);
    apiNode.setSubscriptionUrl(subscriptionUrl);
    return apiNode;
  }
View Full Code Here

 
  @Test
  public void addClientSubscriptionInfo() {
    ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();
   
    Node node = new Node();
    node.setSecurityUrl("http://localhost:8080/services/securityUrl");
    node.setCustodyTransferUrl("http://localhost:8080/services/securityUrl");
    node.setDescription("description");
    node.setInquiryUrl("http://localhost:8080/services/securityUrl");
    node.setPublishUrl("http://localhost:8080/services/securityUrl");
    node.setProxyTransport("class");
    node.setSubscriptionUrl("http://localhost:8080/services/securityUrl");
    node.setName("default");
    node.setManagerName("defaultManager");
    SaveNode saveNode = new SaveNode();
    saveNode.setAuthInfo(authInfoJoe);
    saveNode.getNode().add(node);
   
    Clerk clerk = new Clerk();
    clerk.setName("clerkName");
    clerk.setPublisher("root");
    clerk.setNode(node);
    SaveClerk saveClerk = new SaveClerk();
    saveClerk.setAuthInfo(authInfoJoe);
    saveClerk.getClerk().add(clerk);
   
    clientSubscriptionInfo.setFromClerk(clerk);
   
    Node node2 = new Node();
    node2.setSecurityUrl("http://localhost:8080/services/securityUrl2");
    node2.setCustodyTransferUrl("https://localhost:8080/services/securityUrl2");
    node2.setDescription("description2");
    node2.setInquiryUrl("http://localhost:8080/services/securityUrl2");
    node2.setPublishUrl("http://localhost:8080/services/securityUrl2");
    node2.setProxyTransport("class2");
    node2.setSubscriptionUrl("http://localhost:8080/services/securityUrl2");
    node2.setName("default2");
    node2.setManagerName("default2Manager");
    saveNode.getNode().add(node2);
   
    Clerk clerk2 = new Clerk();
    clerk2.setName("clerkName2");
    clerk2.setPublisher("root");
View Full Code Here

  public void setProperties(Properties properties) {
    this.properties = properties;
  }
 
  public Node getApiNode() {
    Node apiNode = new Node();
    apiNode.setCustodyTransferUrl(custodyTransferUrl);
    apiNode.setDescription(description);
    apiNode.setFactoryInitial(factoryInitial);
    apiNode.setFactoryNamingProvider(factoryNamingProvider);
    apiNode.setFactoryURLPkgs(factoryURLPkgs);
    apiNode.setInquiryUrl(inquiryUrl);
    apiNode.setJuddiApiUrl(juddiApiUrl);
    apiNode.setClientName(clientName);
    apiNode.setName(name);
    apiNode.setProxyTransport(proxyTransport);
    apiNode.setPublishUrl(publishUrl);
    apiNode.setSecurityUrl(securityUrl);
    apiNode.setSubscriptionUrl(subscriptionUrl);
    return apiNode;
  }
View Full Code Here

TOP

Related Classes of org.vietspider.html.path2.Node

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.