Package org.jdom

Examples of org.jdom.Element.addNamespaceDeclaration()


      if (elMd.getAttribute(schemaLocAtt.getName(), schemaLocAtt.getNamespace()) == null) {
        elMd.setAttribute(schemaLocAtt);
        // make sure namespace declaration for schemalocation is present -
        // remove it first (does nothing if not there) then add it
        elMd.removeNamespaceDeclaration(schemaLocAtt.getNamespace());
        elMd.addNamespaceDeclaration(schemaLocAtt.getNamespace());
      }
    }

    //--- increase metadata popularity
    if (!skipPopularity)
View Full Code Here


                    Processor.detachXLink(metadataXml, srvContext);
                }
            }
        }

        metadataXml.addNamespaceDeclaration(Edit.NAMESPACE);
        Element info = buildInfoElem(srvContext, id, version);
        metadataXml.addContent(info);

        metadataXml.detach();
        return metadataXml;
View Full Code Here

        // JDOM has special handling for element's "own" ns:
          if (prefix.equals(elemPrefix)) {
              ; // already set by when it was constructed...
          } else {
              result.addNamespaceDeclaration(org.jdom.Namespace.getNamespace(prefix, ns.getNamespaceURI()));
          }
      }

      @SuppressWarnings("unchecked")
        Iterator<Attribute> atts = event.asStartElement().getAttributes();
View Full Code Here

  {
    //--- setup root node

    Element root = new Element("ExceptionReport", Csw.NAMESPACE_OWS);
    root.setAttribute("version", Csw.OWS_VERSION);
    root.addNamespaceDeclaration(Csw.NAMESPACE_XSI);
    root.setAttribute("schemaLocation", Csw.NAMESPACE_OWS.getURI() + " " + Csw.OWS_SCHEMA_LOCATIONS + "/ows/1.0.0/owsExceptionReport.xsd", Csw.NAMESPACE_XSI);
   
    while (e != null)
    {
      Element exc = new Element("Exception", Csw.NAMESPACE_OWS);
View Full Code Here

  protected Element getPostParams()
  {
    Element params  = new Element(getRequestName(), Csw.NAMESPACE_CSW);
        // Add queryable namespaces to POST query
        params.addNamespaceDeclaration(Csw.NAMESPACE_DC);

    //--- 'service' and 'version' are common mandatory attributes
    setAttrib(params, "service", Csw.SERVICE);
    setAttrib(params, "version", getServerVersion());
View Full Code Here

    throw new InvalidParameterValueEx("schemaLanguage", schemaLanguage);

  //--- build output

  Element response = new Element(getName() +"Response", Csw.NAMESPACE_CSW);
  response.addNamespaceDeclaration(Csw.NAMESPACE_CSW)
  Attribute schemaLocation = new Attribute("schemaLocation","http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",Csw.NAMESPACE_XSI);
  response.setAttribute(schemaLocation);


  @SuppressWarnings("unchecked")
View Full Code Here

       
      String uriA = oaiUrl + "/metadata/handle/" + item.getHandle() + "/ore.xml";
     
        // Top level atom feed element
        Element aggregation = new Element("entry",ATOM_NS);
        aggregation.addNamespaceDeclaration(ATOM_NS);
        aggregation.addNamespaceDeclaration(ORE_NS);
        aggregation.addNamespaceDeclaration(ORE_ATOM);
        aggregation.addNamespaceDeclaration(DCTERMS_NS);

        // Atom-entry specific info
View Full Code Here

      String uriA = oaiUrl + "/metadata/handle/" + item.getHandle() + "/ore.xml";
     
        // Top level atom feed element
        Element aggregation = new Element("entry",ATOM_NS);
        aggregation.addNamespaceDeclaration(ATOM_NS);
        aggregation.addNamespaceDeclaration(ORE_NS);
        aggregation.addNamespaceDeclaration(ORE_ATOM);
        aggregation.addNamespaceDeclaration(DCTERMS_NS);

        // Atom-entry specific info
        Element atomId = new Element("id",ATOM_NS);
View Full Code Here

     
        // Top level atom feed element
        Element aggregation = new Element("entry",ATOM_NS);
        aggregation.addNamespaceDeclaration(ATOM_NS);
        aggregation.addNamespaceDeclaration(ORE_NS);
        aggregation.addNamespaceDeclaration(ORE_ATOM);
        aggregation.addNamespaceDeclaration(DCTERMS_NS);

        // Atom-entry specific info
        Element atomId = new Element("id",ATOM_NS);
        atomId.addContent(uriA);
View Full Code Here

        // Top level atom feed element
        Element aggregation = new Element("entry",ATOM_NS);
        aggregation.addNamespaceDeclaration(ATOM_NS);
        aggregation.addNamespaceDeclaration(ORE_NS);
        aggregation.addNamespaceDeclaration(ORE_ATOM);
        aggregation.addNamespaceDeclaration(DCTERMS_NS);

        // Atom-entry specific info
        Element atomId = new Element("id",ATOM_NS);
        atomId.addContent(uriA);
        aggregation.addContent(atomId);
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.