Examples of Nodes


Examples of com.dao.Nodes

    ArrayList<Nodes> list = test.getNodeInfo();
    if (list != null && list.size() > 0) {
      out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
      out.println("<nodes>");
      for (int i = 0; i < list.size(); i++) {
        Nodes node = list.get(i);
        out.println("<node file_id='" + node.getFile_id()
            + "' parentid='" + node.getParentid()
            + "' hrefAddress='" + node.getHrefAddress()
            + "' userid='" + node.getUser_id() + "'>"
            + node.getFile_name() + "</node>");
        System.out.println(node.getFile_name());
      }
      out.println("</nodes>");
    }
    System.out.println("调用完成");
View Full Code Here

Examples of com.google.jstestdriver.token.Nodes

        equalsToken,
        htmlTokenOne,
        equalsToken,
        htmlTokenTwo,
        endDocToken);
    Nodes nodes = new Nodes();
    new HtmlDocNodeFactory(
        new HtmlDocNestedNode.NestedNodeStrategy()).create(
            new BufferedTokenStream(tokens.iterator()), nodes);
   
    assertEquals(new Nodes().add(new HtmlDocNestedNode(barToken,
      Lists.newArrayList(htmlTokenOne, equalsToken, htmlTokenTwo))),
        nodes);
  }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.Nodes

            return addr;
        }

        Dom serverDom = Dom.unwrap(server);
        Domain domain = serverDom.getHabitat().getService(Domain.class);
        Nodes nodes = serverDom.getHabitat().getService(Nodes.class);
        ServerEnvironment env =
                serverDom.getHabitat().getService(ServerEnvironment.class);

        if (server.isDas()) {
            if (env.isDas()) {
                // We are the DAS. Return our hostname
                return System.getProperty(
                        SystemPropertyConstants.HOST_NAME_PROPERTY);
            } else {
                return null;    // IT 12778 -- it is impossible to know
            }
        }

        String hostName = null;

        // Get it from the node associated with the server
        String nodeName = server.getNodeRef();
        if (StringUtils.ok(nodeName)) {
            Node node = nodes.getNode(nodeName);
            if (node != null) {
                hostName = node.getNodeHost();
            }
            // XXX Hack to get around the fact that the default localhost
            // node entry is malformed
View Full Code Here

Examples of dbbeans.Nodes

     * @param parent
     * @param tree
     */
    public void addNode(String name, String value, int parent, int tree) {
        try {
            nodesController.create(new Nodes(0, name, value, parent, tree));
        } catch (RollbackFailureException ex) {
            Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

Examples of de.ailis.jollada.model.Nodes

    @Test
    public void testGetBySid()
    {
        final VisualScene scene = new VisualScene();
        final Nodes nodes = scene.getNodes();

        final Node node1 = new Node();
        node1.setSid("node.1");
        nodes.add(node1);

        final Node node2 = new Node();
        node2.setSid("node.2");
        nodes.add(node2);

        final Node node21 = new Node();
        node21.setSid("node.2.1");
        node2.getNodes().add(node21);
View Full Code Here

Examples of nu.xom.Nodes

    boolean hasRootElement = false;
    int i = 0;
   
    // add children of document, retaining the exact same order found in input
    while (src.remaining() > 0) {
      Nodes nodes;
      int type = src.get(); // look ahead
      if (DEBUG) System.err.println("reading type = " + toString(type));
      switch (type & 0x07) { // three low bits indicate node type
        case TEXT: {
          throw new BinaryParsingException("Unreachable text");
        }
        case ATTRIBUTE: {
          throw new BinaryParsingException("Unreachable attribute");
        }
        case BEGIN_ELEMENT: {
          if (factory.getClass() == NodeFactory.class) { // fast path
            Element root = readStartTag(src, type);
            readElement(src, root, input); // reads entire subtree
            nodes = new Nodes(root);
          } else { // slow path
            Element root = readStartTagF(src, type, true);
            if (root == null) {
              throw new NullPointerException("Factory failed to create root element.");
            }
            doc.setRootElement(root);
            readElementF(src, root, input);
            nodes = factory.finishMakingElement(root);
          }
          break;
        }
        case END_ELEMENT: {
          throw new BinaryParsingException("Unreachable end of element");
        }
        case COMMENT: {
          nodes = readCommentF(src, type);
          break;
        }
        case NAMESPACE_DECLARATION: {
          throw new BinaryParsingException("Unreachable namespace declaration");
        }
        case PROCESSING_INSTRUCTION: {
          nodes = readProcessingInstructionF(src);
          break;
        }
        case DOC_TYPE: {
          nodes = readDocTypeF(src);
          break;
        }
        default: {
          throw new BinaryParsingException("Illegal node type code=" + type);
        }
      }

      // append nodes:
      for (int j=0; j < nodes.size(); j++) {
        Node node = nodes.get(j);
        if (node instanceof Element) { // replace fake root with real root
          if (hasRootElement) {
            throw new IllegalAddException(
              "Factory returned multiple root elements");
          }
View Full Code Here

Examples of nu.xom.Nodes

    final FastStack stack = new FastStack();
    stack.push(current);
    boolean addAttributesAndNamespaces = true;
   
    while (true) {
      Nodes nodes = null;
      int type = src.get(); // look ahead
//      if (DEBUG) System.err.println("reading type = " + toString(type));

      switch (type & 0x07) { // three low bits indicate node type
        case TEXT: {
          nodes = readTextF(src, type);
          break;
        }
        case ATTRIBUTE: {
          Element elem = addAttributesAndNamespaces ? current : null;
          nodes = readAttributeF(src, elem, type);
          break;
        }
        case BEGIN_ELEMENT: {
          Element elem = readStartTagF(src, type, false);
          stack.push(elem); // even if it's null
          if (elem != null) {
            current.insertChild(elem, current.getChildCount());
            current = elem; // recurse down
          }
          addAttributesAndNamespaces = elem != null;
          continue;
        }
        case END_ELEMENT: {
          Element elem = stack.pop();
          if (elem == null) {
            continue; // skip element
          }
          ParentNode parent = elem.getParent();
          if (parent == null) throwTamperedWithParent();
          if (parent instanceof Document) {
            return; // we're done with the root element
          }
         
          current = (Element) parent; // recurse up
          nodes = factory.finishMakingElement(elem);
                    
          if (nodes.size()==1 && nodes.get(0)==elem) { // same node? (common case)
            continue; // optimization: no need to remove and then readd same element
          }
         
          if (current.getChildCount()-1 < 0) throwTamperedWithParent();       
          current.removeChild(current.getChildCount()-1);
View Full Code Here

Examples of nu.xom.Nodes

      case XMLStreamConstants.CDATA:
      case XMLStreamConstants.ENTITY_REFERENCE:
      case XMLStreamConstants.CHARACTERS:
        return readText();
      case XMLStreamConstants.DTD: {
        Nodes nodes = null;
        try {
          nodes = readDocType(new NodeFactory());
        } catch (XMLStreamException e) {
          StaxUtil.wrapException(e);
        }
        if (nodes.size() > 0) return nodes.get(0);
        return null; // unsupported extended DTD API
      }
      case XMLStreamConstants.ENTITY_DECLARATION:
        return null; // ignore
      case XMLStreamConstants.NOTATION_DECLARATION:
View Full Code Here

Examples of nu.xom.Nodes

    String systemID = symbols[src.getInt()];
    if (DOCTYPE_NULL_ID.equals(systemID)) systemID = null;
    String internalDTDSubset = symbols[src.getInt()];
    if (internalDTDSubset.length() == 0) internalDTDSubset = null;
   
    Nodes nodes = factory.makeDocType(rootElementName, publicID, systemID);
    for (int i=0; i < nodes.size(); i++) {
      if (nodes.get(i) instanceof DocType) {
        DocType docType = (DocType) nodes.get(i);
        if (docType.getInternalDTDSubset().length() == 0) {
          try {
            docType.setInternalDTDSubset(internalDTDSubset);
          } catch (IllegalAccessError e) {
            ; // ignore; setInternalDTDSubset() is private in xom < 1.1
View Full Code Here

Examples of nu.xom.Nodes

    boolean done = false;
    int i = 0;
   
    while (!done && reader.getEventType() != XMLStreamConstants.END_DOCUMENT) {
     
      Nodes nodes;
//      if (DEBUG) System.out.println(toString(reader.getEventType()));
      switch (reader.getEventType()) {
        case XMLStreamConstants.START_ELEMENT: {
          if (hasRootElement) throw new IllegalAddException(
            "StAX reader must not return multiple root elements");

          if (factory.getClass() == NodeFactory.class) { // fast path
            if (nodeBuilder == null) nodeBuilder = new NodeBuilder();
            Element root = readStartTag();
            addAttributes(root);
            addNamespaceDeclarations(root);
            readElement(root); // reads entire subtree
            nodes = new Nodes(root);
          } else { // slow path     
            Element root = readStartTagF(true);
            if (root == null) {
              throw new NullPointerException(
                "Factory failed to create root element.");
            }
            doc.setRootElement(root);
            addAttributesF(root);
            addNamespaceDeclarations(root);
            readElementF(root); // read entire subtree
            nodes = factory.finishMakingElement(root);
          }
          reader.require(XMLStreamConstants.END_ELEMENT, null, null);
          if (isFragmentMode) done = true;
          break;
        }
        case XMLStreamConstants.END_ELEMENT:
          throw new IllegalAddException(
            "A document must not have more than one root element");
        case XMLStreamConstants.PROCESSING_INSTRUCTION:
          nodes = factory.makeProcessingInstruction(
              reader.getPITarget(), reader.getPIData());
          break;
        case XMLStreamConstants.CHARACTERS:
          nodes = NONE; // ignore text in prolog/epilog
          break;
        case XMLStreamConstants.COMMENT:
          nodes = factory.makeComment(reader.getText());
          break;
        case XMLStreamConstants.SPACE:
          nodes = NONE; // ignore text in prolog/epilog
          break;
        case XMLStreamConstants.START_DOCUMENT:
          nodes = NONE; // has already been handled previously
          break;
        case XMLStreamConstants.END_DOCUMENT:
          throw new IllegalStateException("unreachable");
        case XMLStreamConstants.CDATA:
          nodes = NONE; // ignore text in prolog/epilog
          break;
        case XMLStreamConstants.ATTRIBUTE:
          throw new IllegalAddException(
            "Illegal attribute in prolog/epilog");
        case XMLStreamConstants.NAMESPACE:
          throw new IllegalAddException(
            "Illegal namespace declaration in prolog/epilog");
        case XMLStreamConstants.DTD:
          nodes = readDocType(factory); // FIXME
          break;
        case XMLStreamConstants.ENTITY_DECLARATION:
          nodes = NONE; // ignore (missing StAX support)
          break;
        case XMLStreamConstants.NOTATION_DECLARATION:
          nodes = NONE; // ignore (missing StAX support)
          break;
        case XMLStreamConstants.ENTITY_REFERENCE:
          nodes = NONE; // ignore text in prolog/epilog
          break;
        default:
          throw new XMLException("Unrecognized Stax event type: "
              + reader.getEventType());
      }
     
      // append nodes:
      for (int j=0; j < nodes.size(); j++) {
        Node node = nodes.get(j);
        if (node instanceof Element) { // replace fake root with real root
          if (hasRootElement) {
            throw new IllegalAddException(
              "Factory returned multiple root elements");
          }
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.