/*------------------------------------------------------------------------------------
Copyright (c)2000 TogetherSoft Corporation. Patents pending. All rights reserved. 
------------------------------------------------------------------------------------*/ 

package com.togethersoft.modules.xmleditor.dtd;

import java.util.*;
import java.io.*;
import com.togethersoft.modules.xmleditor.dtd.impl.*;
import com.togethersoft.modules.ejbframework.utils.ConfigProperties;


public abstract class DTDDocumentType
{
  public abstract DTDElementDef     createElementDef (String tagName, int type);
  public abstract DTDElementItemDef createElementItemDef (DTDElementDef elementDef, int cardinality);
  public abstract DTDGroupItemDef   createGroupItemDef (int groupType, int cardinality);
  public abstract DTDAttributeDef   createAttributeDef (String attrName, int dataType);
  public abstract DTDAttributeDef   createAttributeDef (String attrName);

  public abstract DTDElementDef     findElementDef (String tagName);
  public abstract Vector            elementDefs();
  public abstract void              load (InputStream is, String dtdFileName) throws IOException, IllegalArgumentException;
  public abstract void              load (String dtdFileName) throws IOException, IllegalArgumentException;
  public abstract void              load (String dtdFileName, String dtdConfigFileName) throws IOException, IllegalArgumentException;
  public abstract void              loadConfig (InputStream is) throws IOException;
  public abstract void              loadConfig (String dtdConfigFileName) throws IOException;
  public abstract ConfigProperties  getConfigProperties();

  //--------------------------------------------------------------------
  public static DTDDocumentType newInstance()
  {
    return new DTDDocumentTypeImpl();
  }

}
