Package com.dbxml.util

Examples of com.dbxml.util.Configuration


      try {
         String userHome = System.getProperty("user.home");
         File cfgFile = new File(userHome, ".dbxml.config");
         if ( cfgFile.exists() && cfgFile.isFile() ) {
            Document cfgDoc = DOMHelper.parse(cfgFile);
            Configuration cfg = new Configuration(cfgDoc);
            cl.setProperties(cfg);
         }
      }
      catch ( Exception e ) {
         System.err.println("Error: "+e.getMessage());
View Full Code Here


   public String getName() {
      return "BTreeFiler";
   }

   public boolean create() throws DBException {
      Configuration cfg = getConfig();
      if ( cfg != null )
         fileHeader.setPageSize(cfg.getIntAttribute(PAGESIZE, fileHeader.getPageSize()));
      return super.create();
   }
View Full Code Here

         InputStream is = getClass().getResourceAsStream(SYSCOL_XML);
         InputStreamReader isr = new InputStreamReader(is, "UTF8");
         BufferedReader br = new BufferedReader(isr, 4096);

         Document sysDoc = DOMHelper.parse(new InputSource(br));
         Configuration sysCfg = new Configuration(sysDoc);
         setConfig(sysCfg);
         br.close();
      }
      catch ( Exception e ) {
         System.err.println("FATAL ERROR: Generating System Collection '" + SYSCOL + "'");
View Full Code Here

      else
         throw new dbXMLException("Collection '" + name + "' not found");
   }

   public CollectionClient createCollection(String path, Document configuration) throws dbXMLException {
      Configuration cfg = new Configuration(configuration);
      Collection c = col.createCollection(path, cfg);
      if ( c != null )
         return new CollectionClientImpl(client, c);
      else
         throw new dbXMLException("Couldn't create Collection '" + path + "'");
View Full Code Here

      else
         return false;
   }

   public String createTrigger(Document configuration) throws dbXMLException {
      Configuration cfg = new Configuration(configuration);
      return col.getTriggerManager().create(cfg).getName();
   }
View Full Code Here

   public String[] listTriggers() throws dbXMLException {
      return col.getTriggerManager().list();
   }

   public String createIndexer(Document configuration) throws dbXMLException {
      Configuration cfg = new Configuration(configuration);
      return col.getIndexManager().create(cfg).getName();
   }
View Full Code Here

   public String getExtension(String name) throws dbXMLException {
      return col.getExtensionManager().getCanonicalName(name);
   }

   public String createExtension(Document configuration) throws dbXMLException {
      Configuration cfg = new Configuration(configuration);
      String name = col.getExtensionManager().create(cfg).getName();
      return col.getExtensionManager().getCanonicalName(name);
   }
View Full Code Here

   }

   public static final String[] PARAMS_createCollection = {"path", "configuration"};

   public String createCollection(String path, Document configuration) throws DBException {
      Configuration cfg = new Configuration(configuration);
      return col.createCollection(path, cfg).getCanonicalName();
   }
View Full Code Here

   }

   public static final String[] PARAMS_createTrigger = {"configuration"};

   public String createTrigger(Document configuration) throws DBException {
      Configuration cfg = new Configuration(configuration);
      return col.getTriggerManager().create(cfg).getName();
   }
View Full Code Here

   }

   public static final String[] PARAMS_createIndexer = {"configuration"};

   public String createIndexer(Document configuration) throws DBException {
      Configuration cfg = new Configuration(configuration);
      return col.getIndexManager().create(cfg).getName();
   }
View Full Code Here

TOP

Related Classes of com.dbxml.util.Configuration

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.