Interface Source

All Known Implementing Classes:
CombinedFileSource, FileSource, JdbcMetadataSource, SourceImpl

public interface Source
An entity which serves as an input for the generation process.
  • Method Details

    • getRootElement

      SourceElement getRootElement() throws SourceException
      Returns the root element of the source.
      Returns:
      the root element of the source, not null.
      Throws:
      SourceException - if the source cannot be constructed.
    • getDescription

      String getDescription()
      Gets a description of this source for debugging purposes.
      Returns:
      the description, which should make it possible to identify the currently processed output.
    • getSourceFile

      File getSourceFile()
      Returns the source file, if it exists.
      Returns:
      the source file, or null if the source is not read from a file.
    • getLastModified

      Date getLastModified()
      Returns the date when the source was last modified.
      Returns:
      the last modification date, or null when unknown.
    • getContentChecksum

      byte[] getContentChecksum()
      Returns the checksum of the content of the source. It is not defined which checksum is returned, the only requirement is that collisions should be extremely rare, i.e it can be assumed that if the checksum is the same, the content is also the same.
      Returns:
      the checksum of the content of the source, or null if it cannot be determined.