| Class | Bio::FANTOM::MaXML |
| In: |
lib/bio/db/fantom.rb
|
| Parent: | DB |
| DELIMITER | = | RS = "\n--EOF--\n" | DTD of MaXML(Mouse annotation XML) fantom.gsc.riken.go.jp/maxml/maxml.dtd | |
| Data_XPath | = | '' | This class is for {allseq|repseq|allclust}.sep.xml, not for {allseq|repseq|allclust}.xml. |
| elem | [R] |
# File lib/bio/db/fantom.rb, line 62
62: def initialize(x)
63: if x.is_a?(REXML::Element) then
64: @elem = x
65: else
66: if x.is_a?(String) then
67: x = x.sub(/#{Regexp.escape(DELIMITER)}\z/om, "\n")
68: end
69: doc = REXML::Document.new(x)
70: @elem = doc.elements[self.class::Data_XPath]
71: #raise 'element is null' unless @elem
72: @elem = REXML::Document.new('') unless @elem
73: end
74: end
# File lib/bio/db/fantom.rb, line 90
90: def entry_id
91: unless defined?(@entry_id)
92: @entry_id = @elem.attributes['id']
93: end
94: @entry_id
95: end