Package com.esri.gpt.framework.util

Examples of com.esri.gpt.framework.util.ResourcePath


 
 
  // XML parser load doc specified by filename
  DocumentBuilder builder = DocumentBuilderFactory.newInstance()
      .newDocumentBuilder();
  ResourcePath rscPath = new ResourcePath();
  InputSource configFile = rscPath.makeInputSource(
      configuration_folder_path + filename);
  if (configFile == null) {
    configFile = rscPath.makeInputSource(
        "/" + configuration_folder_path + filename);
  }

  Document doc = builder.parse(configFile);
 
View Full Code Here


      String js = Val.chkStr(profile.getResponsexslt());
      //String js = Val.chkStr(this.getFactoryAttributes().get("searchResponseJsT"));
      String xml = null;
      if(js.toLowerCase().endsWith(".js")) {
        try {
          ResourcePath rPath = new ResourcePath();
          URL fileUrl = rPath.makeUrl(js);
          is = fileUrl.openStream();
          String jsTransFile = IOUtils.toString(is, "UTF-8");
          jsTransFile = "var jsGptInput =" + response + ";" + jsTransFile;
          HttpServletRequest servletRequest = (HttpServletRequest)
              this.getRequestContext().getServletRequest();
View Full Code Here

    String imagePath = basePath+"/catalog/images";
    String shortName = Val.escapeXml(msgBroker.retrieveMessage("catalog.openSearch.shortName"));
    String description = Val.escapeXml(msgBroker.retrieveMessage("catalog.openSearch.description"));
       
    // read the XML, substitute values
    ResourcePath rp = new ResourcePath();
    rp.makeUrl(XML_LOCATION);
    String xml = XmlIoUtil.readXml(rp.makeUrl(XML_LOCATION).toExternalForm());
    xml = xml.replaceAll("\\{openSearch.restPath\\}",restPath);
    xml = xml.replaceAll("\\{openSearch.imagePath\\}",imagePath);
    xml = xml.replaceAll("\\{openSearch.shortName\\}",shortName);
    xml = xml.replaceAll("\\{openSearch.description\\}",description);
   
View Full Code Here

* @throws IOException if an i/o exception occurs
*/
public static Document makeDomFromResourcePath(String path,
                                                 boolean namespaceAware)
  throws ParserConfigurationException, SAXException, IOException {
  ResourcePath rp = new ResourcePath();
  return makeDomFromSource(rp.makeInputSource(path), namespaceAware);
}
View Full Code Here

* @throws IOException if the is an io problem with the XSLT file
* @throws TransformerConfigurationException if a configuration exception occurs
*/
protected void compileFromResourcePath(String resourcePath)
  throws IOException, TransformerConfigurationException {
  URL url = (new ResourcePath()).makeUrl(resourcePath);
  compileFromSystemId(url.toExternalForm());
}
View Full Code Here

    if (config == null) {
      config = new StringAttributeMap();
     
      String configFile = IntegrationContextFactory.CONFIG_FILE;
      URL configUrl = null;
      ResourcePath rp = new ResourcePath();
      try {
        configUrl = rp.makeUrl(configFile);
      } catch (IOException e) {
        LOGGER.finer(configFile+" was not loaded.");
      }
      if (configUrl != null) {
       
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.util.ResourcePath

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.