Package org.apache.xindice.util

Examples of org.apache.xindice.util.ConfigurationCallback


      this.config = config;

      Configuration colConfig = config.getChild(COLLECTIONS);
      if ( colConfig != null ) {
         colConfig.processChildren(COLLECTION,
            new ConfigurationCallback() {
               public void process(Configuration cfg) throws XindiceException {
                  // check for an existing Collection by name and, if found, skip creating a new Collection
                  // else, create a new child Collection, configure it an add it
                  // if the Collection already exists in our collections list,
                  // creating a new one will cause the old one to be discarded
View Full Code Here


         boolean dropped = collection.drop();
         if ( dropped ) {
            collections.remove(name);
            Configuration colConfig = config.getChild(COLLECTIONS);
            colConfig.processChildren(COLLECTION,
               new ConfigurationCallback() {
                  public void process(Configuration cfg) {
                     try {
                        if ( cfg.getAttribute(NAME).equals(name) )
                           cfg.delete();
                     }
View Full Code Here

   public void setConfig(Configuration config) throws XindiceException {
      super.setConfig(config);

      try {
         config.processChildren(INDEX,
            new ConfigurationCallback() {
               public void process(Configuration cfg) {
                  String className = cfg.getAttribute(CLASS);
                  try {
                     register(Class.forName(className), cfg);
                  }
View Full Code Here

    */
   public boolean drop(final String name) {
      Indexer idx = get(name);
      unregister(name);
      config.processChildren(INDEX,
         new ConfigurationCallback() {
            public void process(Configuration cfg) {
               try {
                  if ( cfg.getAttribute(NAME).equals(name) )
                     cfg.delete();
               }
View Full Code Here

   }

   public void setConfig(Configuration config) throws XindiceException {
      super.setConfig(config);
      config.processChildren(RESOLVER,
         new ConfigurationCallback() {
            public void process(Configuration cfg) {
               String className = cfg.getAttribute(CLASS);
               try {
                  QueryResolver res = (QueryResolver)Class.forName(className).newInstance();
                  res.setConfig(cfg);
View Full Code Here

            final String name = collection.getName();
            boolean dropped = collection.drop();
            if (dropped) {
                collections.remove(name);
                Configuration colConfig = config.getChild(COLLECTIONS);
                colConfig.processChildren(COLLECTION, new ConfigurationCallback() {
                    public void process(Configuration cfg) {
                        try {
                            if (cfg.getAttribute(NAME).equals(name)) {
                                cfg.delete();
                            }
View Full Code Here

    public void setConfig(Configuration config) throws XindiceException {
        this.config = config;

        Configuration colConfig = config.getChild(COLLECTIONS);
        if (colConfig != null) {
            colConfig.processChildren(COLLECTION, new ConfigurationCallback() {
                public void process(Configuration cfg) throws XindiceException {
                    // check for an existing Collection by name and, if found, skip creating a new Collection
                    // else, create a new child Collection, configure it an add it
                    // if the Collection already exists in our collections list,
                    // creating a new one will cause the old one to be discarded
View Full Code Here

        this.db = db;
    }

    public void setConfig(Configuration config) throws XindiceException {
        super.setConfig(config);
        config.processChildren(RESOLVER, new ConfigurationCallback() {
            public void process(Configuration cfg) {
                String className = cfg.getAttribute(CLASS);
                try {
                    QueryResolver res = (QueryResolver) Class.forName(className).newInstance();
                    res.setConfig(cfg);
View Full Code Here

    public void setConfig(Configuration config) throws XindiceException {
        super.setConfig(config);

        try {
            config.processChildren(INDEX, new ConfigurationCallback() {
                public void process(Configuration cfg) {
                    String className = cfg.getAttribute(CLASS);
                    try {
                        register(Class.forName(className), cfg);
                    } catch (Exception e) {
View Full Code Here

     * @return Whether or not the Indexer was dropped
     */
    public boolean drop(final String name) {
        Indexer idx = get(name);
        unregister(name);
        config.processChildren(INDEX, new ConfigurationCallback() {
            public void process(Configuration cfg) {
                try {
                    if (cfg.getAttribute(NAME).equals(name)) {
                        cfg.delete();
                    }
View Full Code Here

TOP

Related Classes of org.apache.xindice.util.ConfigurationCallback

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.