Package org.rcsb.cif

Class CifOptions


  • public class CifOptions
    extends Object

    Allows to set options for CIF writing. Acquire by calling builder(). Pass into CifIO functions. Use white- and blacklist functions to select a subset of categories and/or columns to write. If a value is present in both white- and blacklist, the blacklist values will trump the whitelist.

    For now only writer classes will respect these options. They can be passed to reader classes as well, however there are currently no relevant options for CIF reading.

    • Method Detail

      • isGeneric

        public boolean isGeneric()
        Reading should not care about category and column types.
        Returns:
        true if reading should be untyped
      • isGzip

        public boolean isGzip()
        Allows for downstream GZIP operations.
        Returns:
        true if the output should be gzipped
      • getEncoder

        public String getEncoder()
        The name of the encoder which should be written to files.
        Returns:
        a String representing the encoder name
      • getFetchUrl

        public String getFetchUrl()
        The URL from which files should be fetched - must follow the pattern: www.source.com/%s.cif, where %s represents the pdbId to be inserted into the URL to fetch the correct file.
        Returns:
        the specified fetch URL
      • getEncodingStrategyHint

        public Optional<EncodingStrategyHint> getEncodingStrategyHint​(String categoryName,
                                                                      String columnName)
        Reports whether a particular encoding or floating-point precision is specified for this particular column.
        Parameters:
        categoryName - the category name to check
        columnName - the column name to check
        Returns:
        an optional wrapping an EncodingStrategyHint