Examples of Node


Examples of com.couchbase.client.core.node.Node

     *
     * @param hostname the hostname of the node.
     * @return the states of the node (most probably {@link LifecycleState#CONNECTED}).
     */
    public Observable<LifecycleState> addNode(final InetAddress hostname) {
        Node node = nodeBy(hostname);
        if (node != null) {
            return Observable.just(node.state());
        }
        return addNode(new CouchbaseNode(hostname, environment, responseBuffer));
    }

Examples of com.cxy.redisclient.domain.Node

    while (it.hasNext()) {
      String nextKey = it.next();
      NodeType valueType = getValueType(nextKey);

      if(inValueTypes(valueType)){
        Node node = new Node(id, db, nextKey, valueType, order);
        keys.add(node);
      }
    }
  }

Examples of com.denimgroup.threadfix.webapp.viewmodels.Node

          }
        }
      }
    }
    pathList = removeDuplicates(pathList);
    PathTree pt = new PathTree(new Node("root"));
    pt = getTreeStructure(pathList, pt, application);
    mav.addObject(application);
    mav.addObject("pathTree", pt);
    return mav;
  }

Examples of com.dotcms.repackage.org.dom4j.Node

  public String attr(Object o) {
    if (o == null) {
      return null;
    }
    String key = String.valueOf(o);
    Node node = node();
    if (node instanceof Element) {
      return ((Element) node).attributeValue(key);
    }
    return null;
  }

Examples of com.dotcms.repackage.org.jboss.cache.Node

   * @see com.dotmarketing.business.DotCacheAdministrator#flushGroup(java.lang.String)
   */
  public void flushGroup(String group) {
    //cache.removeNode(group);
    group = group.toUpperCase();
    Node groupNode =cache.getRoot().getChild(group);
    if(groupNode != null){
      flushGroupLocalOnly(group);
    }
    try{
      if(Config.getBooleanProperty("CACHE_CLUSTER_THROUGH_DB", false)){

Examples of com.dotcms.repackage.org.w3c.dom.Node

      is = new ByteArrayInputStream(s.getBytes());
      Document doc = builder.parse(is);

      NodeList nl = doc.getElementsByTagName("img");
      for (int i = 0; i < nl.getLength(); i++) {
        Node n = nl.item(i);
        Node srcNode = n.getAttributes().getNamedItem("src");
        String srcText = srcNode.getNodeValue();
        String newText = getRealPath(srcText, host, url);
        String cleanText = cleanPath(newText);
        srcNode.setNodeValue(cleanText);
      }

      renderer.setDocument(doc, null);
      // renderer.setDocument("http://www.w3.org/");
      renderer.layout();

Examples of com.dotmarketing.util.diff.html.dom.Node

        List<Node> deletedNodes = oldComp.getBodyNode().getMinimalDeletedSet(
                deletedID);

        // Set prevLeaf to the leaf after which the old HTML needs to be
        // inserted
        Node prevLeaf = null;
        if (before > 0)
            prevLeaf = getTextNode(before - 1);

        // Set nextLeaf to the leaf before which the old HTML needs to be
        // inserted
        Node nextLeaf = null;
        if (before < getRangeCount())
            nextLeaf = getTextNode(before);


        while (deletedNodes.size() > 0) {
            LastCommonParentResult prevResult, nextResult;
            if (prevLeaf != null) {
                prevResult = prevLeaf.getLastCommonParent(deletedNodes
                        .get(0));
            } else {
                prevResult = new LastCommonParentResult();
                prevResult.setLastCommonParent(getBodyNode());
                prevResult.setIndexInLastCommonParent(-1);
            }
            if (nextLeaf != null) {
                nextResult = nextLeaf.getLastCommonParent(deletedNodes
                        .get(deletedNodes.size() - 1));
            } else {
                nextResult = new LastCommonParentResult();
                nextResult.setLastCommonParent(getBodyNode());
                nextResult.setIndexInLastCommonParent(getBodyNode()
                        .getNbChildren());
            }

            if (prevResult.getLastCommonParentDepth() == nextResult
                    .getLastCommonParentDepth()) {
                // We need some metric to choose which way to add...
                if (deletedNodes.get(0).getParent() == deletedNodes.get(
                        deletedNodes.size() - 1).getParent()
                        && prevResult.getLastCommonParent() == nextResult
                        .getLastCommonParent()) {
                    // The difference is not in the parent
                    prevResult.setLastCommonParentDepth(prevResult
                            .getLastCommonParentDepth() + 1);

                } else {
                    // The difference is in the parent, so compare them
                    // now THIS is tricky
                    double distancePrev = deletedNodes
                    .get(0)
                    .getParent()
                    .getMatchRatio(prevResult.getLastCommonParent());
                    double distanceNext = deletedNodes
                    .get(deletedNodes.size() - 1)
                    .getParent()
                    .getMatchRatio(nextResult.getLastCommonParent());

                    if (distancePrev <= distanceNext) {
                        prevResult.setLastCommonParentDepth(prevResult
                                .getLastCommonParentDepth() + 1);
                    } else {
                        nextResult.setLastCommonParentDepth(nextResult
                                .getLastCommonParentDepth() + 1);
                    }
                }

            }

            if (prevResult.getLastCommonParentDepth() > nextResult
                    .getLastCommonParentDepth()) {

                // Inserting at the front
                if (prevResult.isSplittingNeeded()) {
                    prevLeaf.getParent().splitUntill(
                            prevResult.getLastCommonParent(), prevLeaf,
                            true);
                }
                prevLeaf = deletedNodes.remove(0).copyTree();
                prevLeaf.setParent(prevResult.getLastCommonParent());
                prevResult.getLastCommonParent().addChild(
                        prevResult.getIndexInLastCommonParent() + 1,
                        prevLeaf);

            } else if (prevResult.getLastCommonParentDepth() < nextResult
                    .getLastCommonParentDepth()) {
                // Inserting at the back
                if (nextResult.isSplittingNeeded()) {
                    boolean splitOccured = nextLeaf.getParent()
                    .splitUntill(nextResult.getLastCommonParent(),
                            nextLeaf, false);

                    if (splitOccured) {
                        // The place where to insert is shifted one place to the
                        // right
                        nextResult.setIndexInLastCommonParent(nextResult
                                .getIndexInLastCommonParent() + 1);
                    }
                }
                nextLeaf = deletedNodes.remove(deletedNodes.size() - 1)
                .copyTree();
                nextLeaf.setParent(nextResult.getLastCommonParent());
                nextResult.getLastCommonParent().addChild(
                        nextResult.getIndexInLastCommonParent(), nextLeaf);
            } else
                throw new IllegalStateException();

Examples of com.dp4j.ast.Node

    protected JCBlock processElement(final JCBlock tree, final CompilationUnitTree cut, Scope validScope) {
        if (tree == null) return null;
        for (Tree stmt : tree.stats) {
            validScope = getScope(stmt, cut, validScope);
            Node n = new Node(validScope, stmt);
            tree.stats = (com.sun.tools.javac.util.List<JCStatement>) processStmt(n, cut, tree);
            if (tree.stats.indexOf(stmt) < tree.stats.size() - 1) {
                validScope = trees.getScope(trees.getPath(cut, stmt));
            }
        }

Examples of com.dragome.compiler.graph.Node

    CatchClause cc= (CatchClause) stmt.getCatchStatements().getFirstChild();
    Iterator iter= catchNodes.iterator();
    while (iter.hasNext())
    {
      Node catchNode= (Node) iter.next();
      graph.rollOut(catchNode, cc);
      cc= (CatchClause) cc.getNextSibling();
    }
  }

Examples of com.dtrules.xmlparser.XMLTree.Node

   
    @Override
    public Label createLabel(AutoDataMap autoDataMap, Group group,
            String labelName, String key, boolean singular, Object object) {
       
        Node xmlnode = (Node)object;
       
        if(!xmlnode.getAttributes().containsKey("node"))return null;
       
        Label labelObj = group.findLabel(labelName,"xml",labelName);
       
        if(labelObj == null ){
            labelObj = Label.newLabel(group,labelName,labelName,key,singular);
        }
        if(labelObj.isCached())return labelObj;
        labelObj.setCached(true);
       
        for(Node xmltag : xmlnode.getTags()){
            String node    = xmltag.getAttributes().get("node");
            String type    = xmltag.getAttributes().get("type");
            String subType = xmltag.getAttributes().get("subType");
            // First check if this is just a tag wrapping the dataload file.  If so,
            // just claim it is a List.
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.