Package org.rcsb.cif.schema
Interface SchemaProvider<F extends CifFile,B extends CifFileBuilder>
- Type Parameters:
F- the type of files returnedB- the type of builder instances returned
- All Known Implementing Classes:
CifCoreSchemaProvider,MmCifSchemaProvider
public interface SchemaProvider<F extends CifFile,B extends CifFileBuilder>
A SchemaProvides wraps
CifFile and CifFileBuilder instances in their schema-aware subclass.-
Method Summary
Modifier and Type Method Description BcreateTypedBuilder()Create an instance of a schema-supporting builder.FcreateTypedFile(CifFile cifFile)Wrap aCifFilein a schema-supporting implementation of the data model.default voidvalidate(CifFile cifFile)Perform an optional check if the provided argument matches this schema.
-
Method Details
-
createTypedFile
Wrap aCifFilein a schema-supporting implementation of the data model.- Parameters:
cifFile- the generic file- Returns:
- a schema-aware cif file instance
-
createTypedBuilder
B createTypedBuilder()Create an instance of a schema-supporting builder.- Returns:
- a schema-aware builder instance
-
validate
Perform an optional check if the provided argument matches this schema.- Parameters:
cifFile- the CifFile to check- Throws:
SchemaMismatchException- if the argument fails this test
-