Klasse CombinedFileSource

java.lang.Object
org.apache.torque.generator.source.SourceImpl
org.apache.torque.generator.source.stream.CombinedFileSource
Alle implementierten Schnittstellen:
Source

public class CombinedFileSource extends SourceImpl
A source which uses several files as input and combines them into one file. The source tree will look as follows: <source> <file path="path/to/file1"> <rootOfFile1> ... </rootOfFile1> </file> <file path="path/to/file2"> <rootOfFile2> ... </rootOfFile2> </file> ... </source>
  • Felddetails

    • ROOT_ELEMENT_NAME

      public static final String ROOT_ELEMENT_NAME
      The name of the root element of the produced source tree.
      Siehe auch:
    • FILE_ELEMENT_NAME

      public static final String FILE_ELEMENT_NAME
      The name of the root element's children of the produced source tree.
      Siehe auch:
    • PATH_ATTRIBUTE_NAME

      public static final String PATH_ATTRIBUTE_NAME
      The name of the path attribute of the file elements.
      Siehe auch:
  • Konstruktordetails

    • CombinedFileSource

      public CombinedFileSource(Collection<FileSource> fileSources)
      Constructor.
      Parameter:
      fileSources - the file sources, not null.
      Löst aus:
      NullPointerException - if path or format is null.
  • Methodendetails

    • createRootElement

      public SourceElement createRootElement() throws SourceException
      Reads and parses the input file and creates the element tree from it.
      Angegeben von:
      createRootElement in Klasse SourceImpl
      Gibt zurück:
      the root element of the element tree.
      Löst aus:
      SourceException - if the input file cannot be read or parsed.
    • getDescription

      public String getDescription()
      Returns the path of the files as a description.
      Gibt zurück:
      path of the files,separated by a semicolon, not null.
      Siehe auch:
    • getSourceFile

      public File getSourceFile()
      Returns the source file, if applicable. As no single source file exists, the method returns always null.
      Gibt zurück:
      null.
    • getLastModified

      public Date getLastModified()
      Returns the earliest date when any of the source files was last modified.
      Gibt zurück:
      the last modification date, or null when unknown for at least one of the files.
    • getContentChecksum

      public byte[] getContentChecksum()
      Returns the checksum of all files. All bytes are added so order of the files does not matter.
      Gibt zurück:
      a checksum for all files, or null if one of the checksums of the file sources is null.
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object