Examples of ElementImpl


Examples of org.apache.hivemind.impl.ElementImpl

    private void beginContribution(String elementName)
    {
        // This is where things get tricky, the point where we outgrew Jakarta Digester.

        ElementImpl element = buildLWDomElement(elementName);

        ContributionDescriptor ed = (ContributionDescriptor) peekObject();
        ed.addElement(element);

        push(elementName, element, STATE_LWDOM, false);
View Full Code Here

Examples of org.apache.hivemind.impl.ElementImpl

        unexpectedElement(elementName);
    }

    private void beginLWDom(String elementName)
    {
        ElementImpl element = buildLWDomElement(elementName);

        ElementImpl parent = (ElementImpl) peekObject();
        parent.addElement(element);

        push(elementName, element, STATE_LWDOM, false);
    }
View Full Code Here

Examples of org.apache.hivemind.impl.ElementImpl

        }
    }

    private ElementImpl buildLWDomElement(String elementName)
    {
        ElementImpl result = new ElementImpl();
        result.setElementName(elementName);

        Iterator i = _attributes.entrySet().iterator();
        while (i.hasNext())
        {
            Map.Entry entry = (Map.Entry) i.next();

            String name = (String) entry.getKey();
            String value = (String) entry.getValue();

            Attribute a = new AttributeImpl(name, value);

            result.addAttribute(a);
        }

        return result;
    }
View Full Code Here

Examples of org.apache.hivemind.impl.ElementImpl

        cd.addRulesForModel();
    }

    private void endLWDom()
    {
        ElementImpl element = (ElementImpl) peekObject();
        element.setContent(peekContent());
    }
View Full Code Here

Examples of org.apache.xerces.dom.ElementImpl

        throws SAXException

    {

        ElementImpl elem;

        int         i;

       

  if ( tagName == null )

      throw new SAXException( "HTM004 Argument 'tagName' is null." );



  // If this is the root element, this is the time to create a new document,

  // because only know we know the document element name and namespace URI.

  if ( _document == null )

  {

      // No need to create the element explicitly.

      _document = new HTMLDocumentImpl();

      elem = (ElementImpl) _document.getDocumentElement();

      _current = elem;

      if ( _current == null )

    throw new SAXException( "HTM005 State error: Document.getDocumentElement returns null." );



      // Insert nodes (comment and PI) that appear before the root element.

      if ( _preRootNodes != null )

      {

    for ( i = _preRootNodes.size() ; i-- > 0 ; )

        _document.insertBefore( (Node) _preRootNodes.elementAt( i ), elem );

    _preRootNodes = null;

      }

      

  }

  else

  {

      // This is a state error, indicates that document has been parsed in full,

      // or that there are two root elements.

      if ( _current == null )

    throw new SAXException( "HTM006 State error: startElement called after end of document element." );

      elem = (ElementImpl) _document.createElement( tagName );

      _current.appendChild( elem );

      _current = elem;

  }



  // Add the attributes (specified and not-specified) to this element.

        if ( attrList != null )

        {

            for ( i = 0 ; i < attrList.getLength() ; ++ i )

                elem.setAttribute( attrList.getName( i ), attrList.getValue( i ) );

        }

    }
View Full Code Here

Examples of org.apache.xerces.dom.ElementImpl

     * @param name DOCUMENT ME!
     *
     * @return DOCUMENT ME!
     */
    public Element newElementNode(Document document, String name) {
        return new ElementImpl((DocumentImpl) document, name);
    }
View Full Code Here

Examples of org.apache.xerces.impl.xs.opti.ElementImpl

     */
    public boolean element2Locator(Element e, SimpleLocator l) {
        if (l == null)
            return false;
        if (e instanceof ElementImpl) {
            ElementImpl ele = (ElementImpl)e;
            // get system id from document object
            Document doc = ele.getOwnerDocument();
            String sid = (String)fDoc2SystemId.get(doc);
            // line/column numbers are stored in the element node
            int line = ele.getLineNumber();
            int column = ele.getColumnNumber();
            l.setValues(sid, sid, line, column);
            return true;
        }
        if (e instanceof ElementNSImpl) {
            ElementNSImpl ele = (ElementNSImpl)e;
            // get system id from document object
            Document doc = ele.getOwnerDocument();
            String sid = (String)fDoc2SystemId.get(doc);
            // line/column numbers are stored in the element node
            int line = ele.getLineNumber();
            int column = ele.getColumnNumber();
            l.setValues(sid, sid, line, column);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.document.ElementImpl

  protected void setTagName(String tagName) {
    super.setTagName(tagName);
  }
  public Node cloneNode(boolean deep) {
    ElementImpl cloned = new ElementImplForJSP(this);
    if (deep)
      cloneChildNodes(cloned, deep);
    return cloned;
  }
View Full Code Here

Examples of org.exist.dom.ElementImpl

        final DOMFile domDb = ( (NativeBroker)broker ).getDOMFile();
        return (ErrorReport)new DOMTransaction( this, domDb, Lock.WRITE_LOCK, doc ) {
            public Object start() {
                EmbeddedXMLStreamReader reader = null;
                try {
                    final ElementImpl root = (ElementImpl)doc.getDocumentElement();
                    if (root == null) {
                        return new ErrorReport.ResourceError(ErrorReport.RESOURCE_ACCESS_FAILED, "Failed to access document data");
                    }
                } catch( final Exception e ) {
                    e.printStackTrace();
View Full Code Here

Examples of org.exist.memtree.ElementImpl

                query = getParameter(request, Query);
            }
        }
        final String _var = getParameter(request, Variables);
        List /*<Namespace>*/ namespaces = null;
        ElementImpl variables = null;
        try {
            if (_var != null) {
                final NamespaceExtractor nsExtractor = new NamespaceExtractor();
                variables = parseXML(_var, nsExtractor);
                namespaces = nsExtractor.getNamespaces();
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.