private static Domain extractDomain(String topDomainFile,boolean fullExtract){
  Domain domain=new Domain();
  File f=new File(topDomainFile);
  domain.setSourceFile(f);
  try {
    Document doc=XMLUtils.getXMLDocument(topDomainFile);
    Node mainNode=XMLUtils.getMainNode(doc);
    String rootpath=f.getParent();
    NodeList firstElements=mainNode.getChildNodes();
    for (int j=0; j < firstElements.getLength(); j++) {
      Node node=firstElements.item(j);
      domain=extractPartialDomain(node,domain,rootpath,fullExtract);
    }
  }
 catch (  RuntimeException e) {
    if (fullExtract) {
      throw e;
    }
  }
  return domain;
}

private static Domain extractDomain ( String topDomainFile , boolean fullExtract ) { Domain domain = new Domain ( ) ; File f = new File ( topDomainFile ) ; domain . setSourceFile ( f ) ; try { Document doc = XMLUtils . getXMLDocument ( topDomainFile ) ; Node mainNode = XMLUtils . getMainNode ( doc ) ; String rootpath = f . getParent ( ) ; NodeList firstElements = mainNode . getChildNodes ( ) ; for ( int j = 0 ; j < firstElements . getLength ( ) ; j ++ ) { Node node = firstElements . item ( j ) ; domain = extractPartialDomain ( node , domain , rootpath , fullExtract ) ; } } catch ( RuntimeException e ) { if ( fullExtract ) { throw e ; } } return domain ; }
extract a dialogue domain from the xml specification
