Module: SimpleBioC

Defined in:
lib/simple_bioc.rb,
lib/simple_bioc/node.rb,
lib/simple_bioc/passage.rb,
lib/simple_bioc/version.rb,
lib/simple_bioc/document.rb,
lib/simple_bioc/location.rb,
lib/simple_bioc/relation.rb,
lib/simple_bioc/sentence.rb,
lib/simple_bioc/node_base.rb,
lib/simple_bioc/annotation.rb,
lib/simple_bioc/collection.rb

Overview

SimpleBioC main library

Defined Under Namespace

Classes: Annotation, Collection, Document, Location, Node, NodeBase, Passage, Relation, Sentence

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.from_xml(file_path) ⇒ Object

parse a BioC XML file in the given path and convert it into a collection instance


10
11
12
# File 'lib/simple_bioc.rb', line 10

def from_xml(file_path)
  BioCReader.read(file_path)
end

.to_xml(collection) ⇒ Object

convert a collection instance to a BioC XML text


15
16
17
# File 'lib/simple_bioc.rb', line 15

def to_xml(collection)
  BioCWriter.write(collection)
end