Package org.jdom

Examples of org.jdom.Element.detach()


                mergeFile(children[j], buildLog);
            }
        } else {
            Element auxLogElement = getElement(nextLogFile);
            if (auxLogElement != null) {
                buildLog.addContent(auxLogElement.detach());
            }
        }
    }

    /**
 
View Full Code Here


                mergeFile(children[j], buildLog);
            }
        } else {
            Element auxLogElement = getElement(nextLogFile);
            if (auxLogElement != null) {
                buildLog.addContent(auxLogElement.detach());
            }
        }
    }

    /**
 
View Full Code Here

      if (list.size() == 0) {
                return null;
            }

      response = list.get(0);
      response = (Element) response.detach();

            // validate it here if requested
            if (params.validate) {
                if(!dataMan.validate(response))  {
                    log.info("Ignoring invalid metadata with uuid " + uuid);
View Full Code Here

        result.unknownSchema++;
      }
      else
      {
        if (!params.validate || validates(schema, md))
          return (Element) md.detach();

        log.warning("Skipping metadata that does not validate. Remote id : "+ ri.id);
        result.doesNotValidate++;
      }
    }
View Full Code Here

     * @return
     * @throws Exception
     */
  protected Element internalSelect(String id, boolean isIndexingTask) throws Exception {
    Element rec = super.internalSelect(id, isIndexingTask);
    if (rec != null) return (Element) rec.detach();
    else return null;
  }

    /**
     *  Retrieves the xml element which id matches the given one. The element
View Full Code Here

          else if (result.records[i].getOriginalObject() instanceof org.jdom.Document )
          {
            org.jdom.Document doc = (org.jdom.Document)result.records[i].getOriginalObject();

            Element e = doc.getRootElement();
            e.detach();

            elem.addContent(e);
          }

          else if (result.records[i].getOriginalObject() instanceof Document )
View Full Code Here

            // FIXME: ARHHHHH!!!!! this is inefficient... there must be another way of doing this
            org.jdom.Document doc = builder.build(d);

            Element e = doc.getRootElement();
            e.detach();

            elem.addContent( e ) ;

          }
          else {
View Full Code Here

        }
        if (filterEditOperationElements || (getThreadLocal(false) != null && getThreadLocal(false).forceFilterEditOperation)) {
                removeFilteredElement(metadataXml, editXpathFilter, namespaces);
            }
    }
    return (Element) metadataXml.detach();
  }

    private void xpath(StringBuilder buffer, Element next) {
    if(next.getParentElement() != null) {
      xpath(buffer, next.getParentElement());
View Full Code Here

    }

    //--- remove collected elements

    for (Element child : alToPrune)
      child.detach();

    return elem;
  }

  //-----------------------------------------------------------------------------
View Full Code Here

        SVNRepository repo = getRepository();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        repo.getFile(filePath, -1, new SVNProperties(), baos);

        Element rec = Xml.loadString(baos.toString(org.fao.geonet.Constants.ENCODING), false);
        return (Element) rec.detach();
    }

    /**
     * Creates a directory to hold metadata and property histories and add the metadata specified as the first version.
     *
 
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.