Package org.fao.geonet

Examples of org.fao.geonet.ContextContainer


    public IRResultSet evaluate(IRQuery q, Object userInfo, Observer[] observers) {

        if (Log.isDebugEnabled(Geonet.Z3950_SERVER))
            Log.debug(Geonet.Z3950_SERVER, "evaluating...");

        ContextContainer cnt = (ContextContainer) ctx.getBean("ContextGateway");

        GNResultSet result = null;

        try {
            result = new GNResultSet(new GNXMLQuery(q, ctx), userInfo, observers, cnt.getSrvctx()); // SRUResultSet(observers, base_url,
                                                                                                    // getCQLString(q), code);
            result.evaluate(timeout);
            result.setStatus(IRResultSetStatus.COMPLETE);
        } catch (Exception e) {
            if(result!=null)
View Full Code Here


  public Document transform(Document input, @SuppressWarnings("rawtypes") Map additional_properties) throws FragmentTransformationException {

    DOMBuilder builder = new DOMBuilder();
    org.jdom.Document jdomDoc = builder.build(input);

    ContextContainer cnt = (ContextContainer)ctx.getBean("ContextGateway");

    // now transform using stylesheet passed in

    org.jdom.Element elem = null;
    try {
      // Call GetSchemaInfo to place schema titles and codelists into
      // xpath /root/gui/schemas/{} for xsl transformation to use
      org.jdom.Element root = new org.jdom.Element(Jeeves.Elem.ROOT);
      org.jdom.Element gui = new org.jdom.Element(Jeeves.Elem.GUI);
      GetSchemaInfo gsi = new GetSchemaInfo();
      gui.addContent(gsi.exec(new org.jdom.Element(Jeeves.Elem.REQUEST), cnt.getSrvctx()));
      root.addContent(gui);

      org.jdom.Element metadata = new org.jdom.Element(Geonet.Elem.METADATA);
      metadata.addContent(jdomDoc.detachRootElement());
      root.addContent(metadata);
View Full Code Here

TOP

Related Classes of org.fao.geonet.ContextContainer

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.