Class DelegatingCifFile<B extends DelegatingBlock>

java.lang.Object
org.rcsb.cif.schema.DelegatingCifFile<B>
Type Parameters:
B - the type of Block instances according to this schema
All Implemented Interfaces:
CifFile
Direct Known Subclasses:
CifCoreFile, MmCifFile

public abstract class DelegatingCifFile<B extends DelegatingBlock>
extends Object
implements CifFile
The schema is implemented by wrapping a CifFile and all block, category, and column data therein in dedicated classes that provide the schema (category names, column names, and column types) defined by some dictionary.

The implementation achieves this behavior by reimplementing all model interfaces (CifFile, Block, Category, Column) using a delegating approach. Each schema-supporting wraps a schema-unaware instance of the original data. Schemata subclass all model instances and are than able to enumerate all child nodes in the data model and provide appropriate types by additional schema-specific code. Code is generated by SchemaGenerator from dictionary files.

  • Field Details

  • Constructor Details

  • Method Details

    • getBlocks

      public List<B> getBlocks()
      Description copied from interface: CifFile
      Access to all blocks of this file.
      Specified by:
      getBlocks in interface CifFile
      Returns:
      a list of present blocks
    • getFirstBlock

      public B getFirstBlock()
      Convenience function to give access to all data in this file. CifFile does not provide this functionality to give users a subtle indication whether a schema is in place or the model is accessed in the generic, 'low-level' mode.
      Returns:
      the typed block that wraps all data of this file
    • getTypedBlock

      protected abstract B getTypedBlock​(Block block)