Package org.jdom

Examples of org.jdom.Parent


        }
      }
      Iterator itemsToRemove = v.iterator();
      while (itemsToRemove.hasNext()) {
        Element anItemToDelete = (Element) itemsToRemove.next();
        Parent parent = anItemToDelete.getParent();
        if (parent != null) {
          Tracing.logWarn("item no longer exists so remove " + anItemToDelete.getAttributeValue(ITEM_IDENTIFIER),null,SequencerModel.class);
          parent.removeContent(anItemToDelete);
        }
      }
    }
    v.clear();
  }
View Full Code Here


    public IdAttribute(String name, String value, int type) {
        this(name, value, type, Namespace.NO_NAMESPACE);
    }

    protected Attribute setParent(Element parent) {
        Parent oldParent = this.getParent();

        super.setParent(parent);

        if (this.getAttributeType() == Attribute.ID_TYPE) {
            Document doc;

            // Udpate the owning document's lookup table.
            if (oldParent != null) {
                doc = oldParent.getDocument();
                if (doc instanceof IdDocument) {
                    ((IdDocument)doc).removeId(this.getValue());
                }
            }
            doc = this.getDocument();
View Full Code Here

        if (suppress) return;

        flushCharacters();

        if (!atRoot) {
            Parent p = currentElement.getParent();
            if (p instanceof Document) {
               atRoot = true;
            }
            else {
                currentElement = (Element) p;
View Full Code Here

            else
            {
                // double check for register at Init
                if (jetspeedServlet instanceof Element)
                {
                    Parent jetspeedServletElement =((Element)jetspeedServlet).getParent();
                    if (null == getXPath("js:init-param/js:param-name[contains(child::text(), \"contextName\")]").selectSingleNode(jetspeedServletElement))
                    {
                      insertContextNameParam((Element)jetspeedServletElement);
                    }
                    if (null == getXPath("js:load-on-startup").selectSingleNode(jetspeedServletElement))
View Full Code Here

            else
            {
                // double check for register at Init
                if (jetspeedServlet instanceof Element)
                {
                    Parent jetspeedServletElement =((Element)jetspeedServlet).getParent();
                    if (null == getXPath("js:init-param/js:param-name[contains(child::text(), \"contextName\")]").selectSingleNode(jetspeedServletElement))
                    {
                      insertContextNameParam((Element)jetspeedServletElement);
                    }
                    if (null == getXPath("js:load-on-startup").selectSingleNode(jetspeedServletElement))
View Full Code Here

    builder.append( element.getName() );


    Element actual = element;
    while ( true ) {
      Parent parent = actual.getParent();
      if ( parent == null ) {
        break;
      }

      if ( parent instanceof Element ) {
View Full Code Here

    builder.append( element.getName() );


    Element actual = element;
    while ( true ) {
      Parent parent = actual.getParent();
      if ( parent == null ) {
        break;
      }

      if ( parent instanceof Element ) {
View Full Code Here

    protected void generateForeignMarkup(Element e, List foreignMarkup) {
        if (foreignMarkup != null) {
            Iterator elems = (Iterator) foreignMarkup.iterator();
            while (elems.hasNext()) {
                Element elem = (Element) elems.next();
                Parent parent = elem.getParent();
                if (parent != null) {
                    parent.removeContent(elem);
                }
                e.addContent(elem);
            }
        }
    }
View Full Code Here

            else
            {
                // double check for register at Init
                if (this.registerAtInit && jetspeedServlet instanceof Element)
                {
                    Parent jetspeedServletElement =((Element)jetspeedServlet).getParent();
                    if (null == XPath.selectSingleNode(jetspeedServletElement, REGISTER_AT_INIT_XPATH))
                    {
                        insertRegisterAtInit((Element) jetspeedServletElement);
                    }
                }
View Full Code Here

                                .getAsTree(GeoTiffConstants.GEOTIFF_IIO_METADATA_FORMAT_NAME);
                final Element element = new DOMBuilder().build(w3cElement);

                geoTIFFMetadata.assignTo(element);
               
                final Parent parent = element.getParent();
                parent.removeContent(element);

                final Document document = new Document(element);

                try {
                        final org.w3c.dom.Document w3cDoc = new DOMOutputter()
View Full Code Here

TOP

Related Classes of org.jdom.Parent

Copyright © 2018 www.massapicom. 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.