Interface SchemaProvider<F extends CifFile,​B extends CifFileBuilder>

Type Parameters:
F - the type of files returned
B - 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
    B createTypedBuilder()
    Create an instance of a schema-supporting builder.
    F createTypedFile​(CifFile cifFile)
    Wrap a CifFile in a schema-supporting implementation of the data model.
    default void validate​(CifFile cifFile)
    Perform an optional check if the provided argument matches this schema.
  • Method Details

    • createTypedFile

      F createTypedFile​(CifFile cifFile)
      Wrap a CifFile in 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

      default void validate​(CifFile cifFile) throws SchemaMismatchException
      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