Package org.rcsb.cif.model
Interface CifFileBuilder
- All Known Implementing Classes:
CifCoreFileBuilder,CifFileBuilderImpl,MmCifFileBuilder
public interface CifFileBuilder
The specification of a builder for generic
CifFile instances.-
Method Summary
Modifier and Type Method Description CifFileBuilderaddBlock(Block block)Add a block to this builder.default <F extends CifFile, B extends CifFileBuilder>
Bas(SchemaProvider<F,B> schemaProvider)Specify a schema for this build operation.CifFilebuild()Build the file described by this builder.voiddigest(BlockBuilder<? extends CifFileBuilder> blockBuilder)A hook to make this instance aware of the data in all child nodes.BlockBuilder<? extends CifFileBuilder>enterBlock(String blockHeader)Descend 1 level and enter a new Block.CifFileleaveFile()Leave this builder instance.
-
Method Details
-
enterBlock
Descend 1 level and enter a new Block.- Parameters:
blockHeader- the name for this block (usually the structure ID)- Returns:
- a parent-aware builder instance at block level
-
leaveFile
CifFile leaveFile()Leave this builder instance. As this is the top-level and no parent exists, return the finished CifFile instance.- Returns:
- a CifFile instance
-
build
CifFile build()Build the file described by this builder.- Returns:
- a CifFile instance
-
addBlock
Add a block to this builder.- Parameters:
block- some block with data- Returns:
- this builder instance
-
digest
A hook to make this instance aware of the data in all child nodes.- Parameters:
blockBuilder- the child builder to digest
-
as
Specify a schema for this build operation.- Type Parameters:
F- the type of file that is being buildB- the type of builder that does the work- Parameters:
schemaProvider- the schema to use - seeStandardSchemata- Returns:
- a schema-aware builder instance
-