Class | Bio::FlatFileIndex::Indexer::Parser::PDBChemicalComponentParser
In: | lib/bio/io/flatfile/indexer.rb
Parent: | TemplateParser

### Methods

new open_flatfile

### Constants

NAMESTYLE | = | NameSpaces.new( NameSpace.new( 'UNIQUE', Proc.new { |x| x.entry_id } )
PRIMARY | = | 'UNIQUE'

### Public Class methods

new(klass, pri_name = nil, sec_names = nil)

[Source]

         # File lib/bio/io/flatfile/indexer.rb, line 425
    425:           def initialize(klass, pri_name = nil, sec_names = nil)
    426:             super()
    427:             self.format = 'raw'
    428:             self.dbclass = Bio::PDB::ChemicalComponent
    429:             self.set_primary_namespace((pri_name or PRIMARY))
    430:             unless sec_names then
    431:               sec_names = []
    432:               @namestyle.each_value do |x|
    433:                 sec_names << x.name if x.name != self.primary.name
    434:               end
    435:             end
    436:             self.add_secondary_namespaces(*sec_names)
    437:           end

### Public Instance methods

open_flatfile(fileid, file)

[Source]

         # File lib/bio/io/flatfile/indexer.rb, line 438
    438:           def open_flatfile(fileid, file)
    439:             super
    440:             @flatfile.pos = 0
    441:             begin
    442:               pos = @flatfile.pos
    443:               line = @flatfile.gets
    444:             end until (!line or line =~ /^RESIDUE /)
    445:             @flatfile.pos = pos
    446:           end

[Validate]