/*
 */

package au.gov.ansto.bragg.nexus.tool;

import java.net.MalformedURLException;
import java.util.Set;

/** A Project for managing a set of NeXus XML MetaDTD templates for conversion to Java NeXusBeans.
 *
 * <p>The XML MetaDTD files are known here as "XML templates".</p>
 *
 * @author drck
 * @version "%I%, %G%"
 */
public interface Project {
    
    /** The root directory of the project (under which Java will be written) */
    String get$directory();
    
    /** A string representation of the Java output package. 
     *
     * <p>The current policy does not permit setting of this,
     * Bragg Institute package naming is enforced.</p>
     */
    String get$package_out();
    
    /** The directory where the Java NeXusBean files will be written, derived from the root directory.
     *
     * <p>The current policy does not permit setting of this,
     * Bragg Institute package hierarchy is enforced (under the settable root directory)</p>
     */
    String get$directory_out();
    
    /** A read-only set of the XML "MetaDTD" template files in this project.
     */
    Set<XmlTemplate> getXmlTemplates();

    /** Adds an XML "MetaDTD" template file identified by a string URL to the project.
     * 
     * @param A string URL for the NeXus XML MetaDTD.
     * @return true if the URL was valid and the URL was not repeated.
     */
    boolean addXmlTemplate(String $url) throws MalformedURLException;
    
    /** Recursively adds all XML "MetaDTD" files under the given directory to the project.
     *
     * @param A string path for a directory with NeXus XML MetaDTD files.
     * @return true if all files under the directory could be recursively added.
     */
    boolean addXmlTemplateDirectory(String $directory) throws MalformedURLException;
}
