package com.dbxml.db.server;

/*
 * dbXML - Native XML Database
 * Copyright (C) 1999-2004  The dbXML Group, L.L.C.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Id: dbXML.java,v 1.8 2004/08/03 12:42:31 bradford Exp $
 */

import com.dbxml.db.core.ClassResolver;

/**
 * The dbXML class defines global properties about the current dbXML profile.
 */

public final class dbXML {
   // dbXML Home Directory
   public static final String PROP_DBXML_HOME = "dbxml.home";

   // Global Defaults
   public static final int DEFAULT_PORT = 7280;
   public static final int DEFAULT_SSL_PORT = 7643;
   public static final String DEFAULT_HOST = "";

   // Version Information
   public static final int MajorVersion = 2;
   public static final int MinorVersion = 0;
   public static final int SubMinorVersion = 0;
   public static final String Version = "2.0";
   public static final String Codename = "Dragonfly";

   // Copyright/Authorship Information
   public static final String Title = "dbXML";
   public static final String Author = "The dbXML Group";
   public static final String Year = "1999-2004";
   public static final String Company = "The dbXML Group";
   public static final String URL = "http://www.dbxml.com/";

   public static final String VersionString = dbXML.Title + " " + dbXML.Version + " (" + dbXML.Codename + ")";

   // Class Defaults
   public static final Class DEFAULT_FILER_CLASS = com.dbxml.db.common.btree.BTreeFiler.class;
   public static final String DEFAULT_FILER = DEFAULT_FILER_CLASS.getName();

   public static final Class DEFAULT_VALUE_INDEXER_CLASS = com.dbxml.db.common.indexers.ValueIndexer.class;
   public static final String DEFAULT_VALUE_INDEXER = DEFAULT_VALUE_INDEXER_CLASS.getName();

   public static final Class DEFAULT_NAME_INDEXER_CLASS = com.dbxml.db.common.indexers.NameIndexer.class;
   public static final String DEFAULT_NAME_INDEXER = DEFAULT_NAME_INDEXER_CLASS.getName();

   public static final Class DEFAULT_TEXT_INDEXER_CLASS = com.dbxml.db.common.fulltext.FullTextIndexer.class;
   public static final String DEFAULT_TEXT_INDEXER = DEFAULT_TEXT_INDEXER_CLASS.getName();

   public static final Class DEFAULT_SECURITY_MANAGER_CLASS = com.dbxml.db.common.security.DefaultSecurityManager.class;
   public static final String DEFAULT_SECURITY_MANAGER = DEFAULT_SECURITY_MANAGER_CLASS.getName();

   static {
      ClassResolver.register(DEFAULT_FILER, DEFAULT_FILER_CLASS);
      ClassResolver.register(DEFAULT_VALUE_INDEXER, DEFAULT_VALUE_INDEXER_CLASS);
      ClassResolver.register(DEFAULT_NAME_INDEXER, DEFAULT_NAME_INDEXER_CLASS);
      ClassResolver.register(DEFAULT_TEXT_INDEXER, DEFAULT_TEXT_INDEXER_CLASS);
      ClassResolver.register(DEFAULT_SECURITY_MANAGER, DEFAULT_SECURITY_MANAGER_CLASS);
   }
}

