Package com.esri.gpt.catalog.lucene

Examples of com.esri.gpt.catalog.lucene.ParserAdaptorInfo


    for (int i = 0; i < ndLstProxies.getLength(); i++) {
      Node ndProxy = ndLstProxies.item(i);
      String proxyName = xpath.evaluate("@name", ndProxy);
      String proxyClassName = xpath.evaluate("@className", ndProxy);

      ParserAdaptorInfo info = new ParserAdaptorInfo();
      info.setName(proxyName);
      info.setClassName(proxyClassName);

      NodeList ndListProps = (NodeList) xpath.evaluate("attribute", ndProxy,
          XPathConstants.NODESET);
      for (int p = 0; p < ndListProps.getLength(); p++) {
        Node ndProp = ndListProps.item(p);
        String key = xpath.evaluate("@key", ndProp);
        String value = xpath.evaluate("@value", ndProp);
        info.getAttributes().set(key, value);
      }

      infos.add(info);
    }

    cfg.getLuceneConfig().setParserProxies(infos.createParserProxies());
   
    NodeList ndObservers = (NodeList) xpath.evaluate("observer", ndLucene, XPathConstants.NODESET);
    for (Node ndObserver: new NodeListAdapter(ndObservers)) {
      LuceneIndexObserverInfo info = new LuceneIndexObserverInfo();
      info.setClassName(Val.chkStr(xpath.evaluate("@className", ndObserver)));
      NodeList ndListProps = (NodeList) xpath.evaluate("attribute", ndObserver, XPathConstants.NODESET);
      for (Node ndAttribute: new NodeListAdapter(ndListProps)) {
        String key = xpath.evaluate("@key", ndAttribute);
        String value = xpath.evaluate("@value", ndAttribute);
        info.getAttributes().set(key, value);
      }
      LuceneIndexObserver observer = info.createObserver();
      if (observer!=null) {
        cfg.getLuceneConfig().getObservers().add(observer);
      }
    }
   
View Full Code Here

TOP

Related Classes of com.esri.gpt.catalog.lucene.ParserAdaptorInfo

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.