Package org.rcsb.cif.model.builder
Class CifFileBuilderImpl
java.lang.Object
org.rcsb.cif.model.builder.CifFileBuilderImpl
- All Implemented Interfaces:
CifFileBuilder
- Direct Known Subclasses:
CifCoreFileBuilder,MmCifFileBuilder
public class CifFileBuilderImpl extends Object implements CifFileBuilder
-
Constructor Summary
Constructors Constructor Description CifFileBuilderImpl() -
Method Summary
Modifier and Type Method Description CifFileBuilderaddBlock(Block block)Add a block to this builder.CifFilebuild()Build the file described by this builder.voiddigest(BlockBuilder<? extends CifFileBuilder> builder)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.
-
Constructor Details
-
CifFileBuilderImpl
public CifFileBuilderImpl()
-
-
Method Details
-
enterBlock
Description copied from interface:CifFileBuilderDescend 1 level and enter a new Block.- Specified by:
enterBlockin interfaceCifFileBuilder- Parameters:
blockHeader- the name for this block (usually the structure ID)- Returns:
- a parent-aware builder instance at block level
-
digest
Description copied from interface:CifFileBuilderA hook to make this instance aware of the data in all child nodes.- Specified by:
digestin interfaceCifFileBuilder- Parameters:
builder- the child builder to digest
-
leaveFile
Description copied from interface:CifFileBuilderLeave this builder instance. As this is the top-level and no parent exists, return the finished CifFile instance.- Specified by:
leaveFilein interfaceCifFileBuilder- Returns:
- a CifFile instance
-
build
Description copied from interface:CifFileBuilderBuild the file described by this builder.- Specified by:
buildin interfaceCifFileBuilder- Returns:
- a CifFile instance
-
addBlock
Description copied from interface:CifFileBuilderAdd a block to this builder.- Specified by:
addBlockin interfaceCifFileBuilder- Parameters:
block- some block with data- Returns:
- this builder instance
-