Examples of NodeImpl


Examples of org.apache.tuscany.sca.impl.NodeImpl

            boolean sharedRuntime = runtime != null;
            if (runtime == null) {
                runtime = newInstance();
            }
            EndpointRegistry endpointRegistry = new EndpointRegistryImpl(runtime.extensionPointRegistry, null, null);
            NodeImpl node = new NodeImpl("default", runtime.deployer, runtime.compositeActivator, endpointRegistry, runtime.extensionPointRegistry, sharedRuntime? null : runtime);

            if (dependentContributionURLs != null) {
                for (int i=dependentContributionURLs.length-1; i>-1; i--) {
                    node.installContribution(null, dependentContributionURLs[i], null, null, false);
                }
            }

            String curi = node.installContribution(null, contributionURL, null, null, compositeURI == null);
            if (compositeURI != null) {
                node.start(curi, compositeURI);
            }
            return node;
           
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of org.apache.tuscany.sca.node.impl.NodeImpl

        }
        return getServletHost(node);
    }
   
    private static WebAppServletHost getServletHost(Node node) {
        NodeImpl nodeImpl = (NodeImpl) node;
        ExtensionPointRegistry eps = nodeImpl.getExtensionPoints();
        ServletHostExtensionPoint servletHosts = eps.getExtensionPoint(ServletHostExtensionPoint.class);
        List<ServletHost> hosts = servletHosts.getServletHosts();
        if (hosts == null || hosts.size() < 1) {
            throw new IllegalStateException("No ServletHost found");
        }
View Full Code Here

Examples of org.apache.tuscany.sca.node2.impl.NodeImpl

     */
    public static Node newStandaloneNode(String compositeURI, String contributionURL, String... dependentContributionURLs) {
        try {
            NodeFactory nodeFactory = newInstance();
            EndpointRegistry endpointRegistry = new EndpointRegistryImpl(nodeFactory.extensionPointRegistry, null, null);
            NodeImpl node = new NodeImpl("default", nodeFactory.deployer, nodeFactory.compositeActivator, endpointRegistry, nodeFactory.extensionPointRegistry, nodeFactory);

            if (dependentContributionURLs != null) {
                for (int i=dependentContributionURLs.length-1; i>-1; i--) {
                    node.installContribution(null, dependentContributionURLs[i], null, null, false);
                }
            }

            String curi = node.installContribution(null, contributionURL, null, null, compositeURI == null);
            if (compositeURI != null) {
                node.addToDomainLevelComposite(curi, compositeURI);
            }
            return node;
           
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of org.apache.xerces.dom.NodeImpl


    public Node cloneNode( boolean deep )
    {
        HTMLDocumentImpl    clone;
        NodeImpl            node;

        clone = new HTMLDocumentImpl();
        if ( deep ) {
            node = (NodeImpl) getFirstChild();
            while ( node != null ) {
                clone.appendChild( clone.importNode( node, true ) );
                node = (NodeImpl) node.getNextSibling();
            }
        }
        return clone;
    }
View Full Code Here

Examples of org.apache.xerces.dom.NodeImpl


    public Node cloneNode( boolean deep )
    {
        HTMLDocumentImpl    clone;
        NodeImpl            node;
       
        clone = new HTMLDocumentImpl();
        if ( deep ) {
            node = (NodeImpl) getFirstChild();
            while ( node != null ) {
                clone.appendChild( clone.importNode( node, true ) );
                node = (NodeImpl) node.getNextSibling();
            }
        }
        return clone;
    }
View Full Code Here

Examples of org.apache.xerces.dom.NodeImpl

   public void startElement(QName elementQName, XMLAttributes attrList, Augmentations augs)
    throws XNIException {
      super.startElement(elementQName, attrList, augs);

      NodeImpl node = null;
      try {
      node = (NodeImpl) this.getProperty( "http://apache.org/xml/properties/dom/current-element-node" );
      //System.out.println( "The node = " + node );  TODO JEFF
      }
      catch( org.xml.sax.SAXException ex )
      {
          System.err.println( "except" + ex );;
      }
      //NodeImpl node = (NodeImpl)getCurrentNode();       // Get current node
      if( node != null )
          node.setUserData( "startLine", String.valueOf( locator.getLineNumber() ), null ); // Save location String into node
   } //startElement
View Full Code Here

Examples of org.apache.xerces.dom.NodeImpl

            super.startElement(qName, xmlAttributes, augmentations);
            setLocation();
        }

        private final void setLocation() {
            NodeImpl node = null;
            try {
                node = (NodeImpl) this.getProperty("http://apache.org/xml/properties/dom/current-element-node");
            } catch (org.xml.sax.SAXException ex) {
                System.err.println("except" + ex);
            }
            if (node != null) {
                String location = locator.getLiteralSystemId() + ": line " + locator.getLineNumber();
                node.setUserData("location", location, null);
            }
        }
View Full Code Here

Examples of org.drools.workflow.core.impl.NodeImpl

        if (nodeAndType != null) {
          throw new IllegalArgumentException("Cannot link incoming connection type more than once: " + type);
        }
      } else {
          if (nodeAndType != null) {
            NodeImpl node = (NodeImpl) nodeAndType.getNode();
            if (node != null) {
              node.validateAddIncomingConnection(nodeAndType.getType(), connection);
            }
          }
      }
    }
View Full Code Here

Examples of org.exist.dom.NodeImpl

    try {
      final StoredNode[] ql = selectAndLock(transaction);
      final IndexListener listener = new IndexListener(ql);
      final NotificationService notifier = broker.getBrokerPool()
          .getNotificationService();
      NodeImpl parent;
      for (int i = 0; i < ql.length; i++) {
        final StoredNode node = ql[i];
                final DocumentImpl doc = (DocumentImpl)node.getOwnerDocument();
        if (!doc.getPermissions().validate(broker.getSubject(),
            Permission.WRITE)) {
                    throw new PermissionDeniedException("User '" + broker.getSubject().getName() + "' does not have permission to write to the document '" + doc.getDocumentURI() + "'!");
                                }
        doc.getMetadata().setIndexListener(listener);
        parent = (NodeImpl) node.getParentNode();
                if (parent == null || parent.getNodeType() != Node.ELEMENT_NODE) {
          throw new EXistException(
              "you cannot remove the document element. Use update "
                  + "instead");
        } else
          {parent.removeChild(transaction, node);}
        doc.getMetadata().clearIndexListener();
        doc.getMetadata().setLastModified(System.currentTimeMillis());
        modifiedDocuments.add(doc);
        broker.storeXMLResource(transaction, doc);
        notifier.notifyUpdate(doc, UpdateListener.UPDATE);
View Full Code Here

Examples of org.exist.memtree.NodeImpl

                        if (newDoc != null) {
                            NodeId rootId = newDoc.getBrokerPool().getNodeFactory().createInstance();
                            for (int j = i; j < count; j++) {
                                v = (NodeValue) items[j].item;
                                if(v.getImplementationType() != NodeValue.PERSISTENT_NODE) {
                                    NodeImpl node = (NodeImpl) v;
                                    if (node.getDocument() == doc) {
                                        node = expandedDoc.getNode(node.getNodeNumber());
                                        NodeId nodeId = node.getNodeId();
                                        if (nodeId == null)
                                            {throw new XPathException("Internal error: nodeId == null");}
                                        if (node.getNodeType() == Node.DOCUMENT_NODE)
                                            {nodeId = rootId;}
                                        else
                                            {nodeId = rootId.append(nodeId);}
                                        NodeProxy p = new NodeProxy(newDoc, nodeId, node.getNodeType());
                                        if (p != null) {
                                            // replace the node by the NodeProxy
                                            items[j].item = p;
                                        }
                                    }
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.