Package org.rcsb.cif.schema
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 Summary
-
Constructor Summary
Constructors Constructor Description DelegatingCifFile(CifFile delegate) -
Method Summary
Modifier and Type Method Description List<B>getBlocks()Access to all blocks of this file.BgetFirstBlock()Convenience function to give access to all data in this file.protected abstract BgetTypedBlock(Block block)
-
Field Details
-
Constructor Details
-
Method Details
-
getBlocks
Description copied from interface:CifFileAccess to all blocks of this file. -
getFirstBlock
Convenience function to give access to all data in this file.CifFiledoes 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
-