Examples of Node


Examples of org.codehaus.aspectwerkz.expression.ast.Node

        // for execution() pointcut, this is equals to CALLEE info
        ReflectionInfo info = context.getWithinReflectionInfo();
        ClassInfo classInfo = (info instanceof MemberInfo) ?
                              ((MemberInfo) info).getDeclaringType() : (ClassInfo) info;

        Node childNode = node.jjtGetChild(0);
        MethodInfo[] methodInfos = classInfo.getMethods();
        for (int i = 0; i < methodInfos.length; i++) {
            if (Boolean.TRUE.equals(childNode.jjtAccept(this, methodInfos[i]))) {
                return Boolean.TRUE;
            }
        }

        ConstructorInfo[] constructorInfos = classInfo.getConstructors();
        for (int i = 0; i < constructorInfos.length; i++) {
            if (Boolean.TRUE.equals(childNode.jjtAccept(this, constructorInfos[i]))) {
                return Boolean.TRUE;
            }
        }

        return Boolean.FALSE;

Examples of org.codehaus.jettison.Node

                array.put(newCurrent);
               
                currentNode.put(currentKey, array);
               
                currentNode = newCurrent;
                Node node = new Node(currentNode);
                nodes.push(node);
            } else {
                JSONObject newCurrent = new JSONObject();
               
                if (existing instanceof JSONArray) {
                    ((JSONArray) existing).put(newCurrent);
                } else {
                    currentNode.put(currentKey, newCurrent);
                }
               
                currentNode = newCurrent;
                Node node = new Node(currentNode);
                nodes.push(node);
            }
        } catch (JSONException e) {
            throw new XMLStreamException("Could not write start element!", e);
        }

Examples of org.codehaus.mojo.pluginsupport.dependency.DependencyTree.Node

        // Generate explicit_versions for all our dependencies...
        Properties props = new Properties();
       
        try {

            Node root = dependencies.getRootNode();
           
            // Skip the root node
            Iterator children = root.getChildren().iterator();
            while (children.hasNext()) {
                Node child = (Node) children.next();
                appendExplicitVersionProperties(child, props);
            }
        }
        catch (Exception e) {
            throw new MojoExecutionException("Failed to determine project dependencies", e);

Examples of org.commoncrawl.io.internal.NIODNSCache.Node

      return queryResult;
    }

    // check bad host cache ...
    Node resolvedNode = _badHostCache.findNode(hostName);

    if (resolvedNode != null) {
      // LOG.info("Found in Bad Host Cache:" + hostName + " ttl:" + new
      // Date(resolvedNode.getTimeToLive()));
    }
    // IFF found and the bad node has not expired ...
    if (resolvedNode != null
        && resolvedNode.getTimeToLive() >= System.currentTimeMillis()) {

      // LOG.info("Host:" + hostName + " Identified as Bad Host via Cache");

      NIODNSQueryResult queryResult = new NIODNSQueryResult(null, client, hostName);

Examples of org.contikios.contiki.collect.Node

      if (update && isVisible()) {
        updateGlobalRange();
      }
    }
    if (isVisible() && selectedNodes != null && selectedNodes.length == timeSeries.getSeriesCount()) {
      Node node = data.getNode();
      for (int i = 0, n = selectedNodes.length; i < n; i++) {
        if (node == selectedNodes[i]) {
          TimeSeries series = timeSeries.getSeries(i);
          int groupSize = getGroupSize(node);
          if (groupSize > 1) {

Examples of org.corrib.s3b.sscf.tools.sscf2js.Node

        if(person.equals(viewer))
          nc.setType("person");
        else
          nc.setType("friend");
     
        Node n = new Node();
        n.setLabel(person.getName());
        n.setId(person.getId());
        n.setStandalone(standalone);
        n.setLevel(level);
       
        nc.setContent(n);
       
        //append the node to the buffer
        nc.toJSON(buffer);

Examples of org.crsh.vfs.spi.url.Node

    exporter.exportTo(file, true);

    //
    URLDriver driver = new URLDriver();
    driver.merge(file.toURI().toURL());
    Node root = driver.root();
    assertEquals("", driver.name(root));
    assertTrue(driver.isDir(root));

    //
    Iterator<Node> rootChildren = driver.children(root).iterator();
    Node org = rootChildren.next();
    assertFalse(rootChildren.hasNext());
    assertEquals("org", driver.name(org));
    assertTrue(driver.isDir(org));

    //
    Iterator<Node> orgChildren = driver.children(org).iterator();
    Node crsh = orgChildren.next();
    assertFalse(orgChildren.hasNext());
    assertEquals("crsh", driver.name(crsh));
    assertTrue(driver.isDir(crsh));

    //
    Iterator<Node> vfsChildren = driver.children(crsh).iterator();
    Node vfs = vfsChildren.next();
    assertFalse(vfsChildren.hasNext());
    assertEquals("vfs", driver.name(vfs));
    assertTrue(driver.isDir(vfs));

    //
    Iterator<Node> clazzChildren = driver.children(vfs).iterator();
    Node clazz = clazzChildren.next();
    assertFalse(clazzChildren.hasNext());
    assertEquals(FSTestCase.class.getSimpleName() + ".class", driver.name(clazz));
    assertFalse(driver.isDir(clazz));
    Iterator<InputStream> in = driver.open(clazz);
    assertTrue(in.hasNext());

Examples of org.cybergarage.xml.Node

* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
public class BuildDevice {
 
  private static Node buildRootNode(){
    Node root = new Node(RootDescription.ROOT_ELEMENT);
    root.setAttribute("xmlns",RootDescription.ROOT_ELEMENT_NAMESPACE);
    Node spec = new Node(RootDescription.SPECVERSION_ELEMENT);
    Node maj =new Node(RootDescription.MAJOR_ELEMENT);
    maj.setValue("1");
    Node min =new Node(RootDescription.MINOR_ELEMENT);
    min.setValue("0");
    spec.addNode(maj);
    spec.addNode(min);
    root.addNode(spec);
    return root;
  }

Examples of org.datanucleus.query.node.Node

     * executing a function, on the literal or the identifier found.
     */
    protected void processPrimary()
    {
        String subqueryKeyword = null;
        Node subqueryNode = null;

        if (p.parseStringIgnoreCase("SOME "))
        {
            subqueryKeyword = "SOME";
            processExpression(); // subquery variable
            subqueryNode = stack.pop();
        }
        else if (p.parseStringIgnoreCase("ALL "))
        {
            subqueryKeyword = "ALL";
            processExpression(); // subquery variable
            subqueryNode = stack.pop();
        }
        else if (p.parseStringIgnoreCase("ANY "))
        {
            subqueryKeyword = "ANY";
            processExpression(); // subquery variable
            subqueryNode = stack.pop();
        }
        else if (p.parseStringIgnoreCase("EXISTS "))
        {
            subqueryKeyword = "EXISTS";
            processExpression(); // subquery variable
            subqueryNode = stack.pop();
        }
        if (subqueryKeyword != null && subqueryNode != null)
        {
            Node subNode = new Node(NodeType.SUBQUERY, subqueryKeyword);
            subNode.appendChildNode(subqueryNode);
            stack.push(subNode);
            return;
        }

        if (p.parseStringIgnoreCase("CURRENT_DATE"))
        {
            // Convert to a method call
            Node node = new Node(NodeType.INVOKE, "CURRENT_DATE");
            stack.push(node);
            return;
        }
        else if (p.parseStringIgnoreCase("CURRENT_TIMESTAMP"))
        {
            // Convert to a method call
            Node node = new Node(NodeType.INVOKE, "CURRENT_TIMESTAMP");
            stack.push(node);
            return;
        }
        else if (p.parseStringIgnoreCase("CURRENT_TIME"))
        {
            // Convert to a method call
            Node node = new Node(NodeType.INVOKE, "CURRENT_TIME");
            stack.push(node);
            return;
        }
        else if (p.parseStringIgnoreCase("CASE "))
        {
            processCaseExpression();
            return;
        }
        else if (p.parseStringIgnoreCase("DISTINCT "))
        {
            // Aggregates can have "count(DISTINCT field1)"
            Node distinctNode = new Node(NodeType.OPERATOR, "DISTINCT");
            processExpression();
            Node identifierNode = stack.pop();
            distinctNode.appendChildNode(identifierNode);
            stack.push(distinctNode);
            return;
        }
        else if (processCreator() || processLiteral() || processMethod())
        {
            return;
        }

        if (p.parseChar('('))
        {
            processExpression();
            if (!p.parseChar(')'))
            {
                throw new QueryCompilerSyntaxException("expected ')'", p.getIndex(), p.getInput());
            }
            return;
        }

        // if primary == null, literal not found...
        // We will have an identifier (variable, parameter, or field of candidate class)
        if (!processIdentifier())
        {
            throw new QueryCompilerSyntaxException("Identifier expected", p.getIndex(), p.getInput());
        }
        int size = stack.size();

        // Generate Node tree, including chained operations
        // e.g identifier.methodX().methodY().methodZ()
        //     -> node (IDENTIFIER) with child (INVOKE), with child (INVOKE), with child (INVOKE)
        // e.g identifier.fieldX.fieldY.fieldZ
        //     -> node (IDENTIFIER) with child (IDENTIFIER), with child (IDENTIFIER), with child (IDENTIFIER)
        while (p.parseChar('.'))
        {
            if (processMethod())
            {
                // "a.method(...)"
            }
            else if (processIdentifier())
            {
                // "a.field"
            }
            else
            {
                throw new QueryCompilerSyntaxException("Identifier expected", p.getIndex(), p.getInput());
            }
        }

        // For all added nodes, step back and chain them so we have
        // Node[IDENTIFIER, a]
        // +--- Node[IDENTIFIER, b]
        //      +--- Node[IDENTIFIER, c]
        while (stack.size() > size)
        {
            Node top = stack.pop();
            Node peek = stack.peek();
            peek.insertChildNode(top);
        }
    }

Examples of org.dmg.pmml.Node

*/
class TreeUtil
  {
  public static Tree createTree( TreeModel model, ModelSchema modelSchema )
    {
    Node parent = model.getNode();

    Tree tree = new Tree( parent.getId() );

    buildTree( modelSchema, tree, parent );

    return tree;
    }
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.