Class Directory

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class Directory
    extends DirectoryLayout
    The Directory class used for Site Catalog Schema version 4 onwards. The type of directory is determined based on type attribute rather than having separate classes for it.
    Version:
    $Revision$
    Author:
    Karan Vahi
    • Constructor Detail

      • Directory

        public Directory()
        Default constructor
      • Directory

        public Directory​(DirectoryLayout directory,
                         Directory.TYPE type)
        Convenience constructor for adapter class
        Parameters:
        directory - the directory layout object
        type - the type associated
    • Method Detail

      • accept

        public void accept​(SiteDataVisitor visitor)
                    throws java.io.IOException
        Accept method for the SiteData classes that accepts a visitor
        Specified by:
        accept in class AbstractSiteData
        Parameters:
        visitor - the visitor to be used
        Throws:
        java.io.IOException - if something fishy happens to the stream.
      • setType

        public void setType​(java.lang.String type)
        Set the type of directory
        Parameters:
        type - the type of directory
      • setType

        public void setType​(Directory.TYPE type)
        Set the type of directory
        Parameters:
        type - the type of directory
      • getType

        public Directory.TYPE getType()
        Set the type of directory
        Returns:
        the type of directory
      • toXML

        public void toXML​(java.io.Writer writer,
                          java.lang.String indent)
                   throws java.io.IOException
        Description copied from class: AbstractSiteData
        Writes out the xml description of the object.
        Specified by:
        toXML in class AbstractSiteData
        Parameters:
        writer -
        indent -
        Throws:
        java.io.IOException
      • clone

        public java.lang.Object clone()
        Returns the clone of the object.
        Overrides:
        clone in class DirectoryLayout
        Returns:
        the clone