001package org.biojava.nbio.structure.io.cif; 002 003import org.biojava.nbio.structure.Chain; 004import org.rcsb.cif.model.CifFile; 005 006import java.util.ArrayList; 007import java.util.List; 008 009/** 010 * Convert a chain to a {@link CifFile}. 011 * @author Sebastian Bittrich 012 */ 013public class CifChainSupplierImpl extends AbstractCifFileSupplier<Chain> { 014 @Override 015 public CifFile get(Chain container) { 016 return getInternal(container.getStructure(), collectWrappedAtoms(container)); 017 } 018 019 private List<WrappedAtom> collectWrappedAtoms(Chain chain) { 020 List<WrappedAtom> wrappedAtoms = new ArrayList<>(); 021 handleChain(chain, 1, wrappedAtoms); 022 return wrappedAtoms; 023 } 024}