public abstract class AbstractImporter extends Object
Modifier and Type | Field and Description |
---|---|
protected static Pattern |
CLEAN_PARANTHESIS |
protected static Pattern[] |
CLEAN_REDUCE |
protected OntologyDatabase |
db
Reference to the ontology database into which the data will be imported.
|
protected String |
ontologyName
Name of the ncbi ontology.
|
protected static Pattern |
REDUCE_SPACES |
Constructor and Description |
---|
AbstractImporter(OntologyDatabase db,
String ontologyName)
Instantiates the importer for the given database.
|
Modifier and Type | Method and Description |
---|---|
void |
importOntology(File xmlFile,
boolean override) |
protected abstract void |
parseXML(OntologyHandle onto,
XMLStreamReader parser)
Flushes all data from xml into db.
|
protected final OntologyDatabase db
protected final String ontologyName
protected static final Pattern[] CLEAN_REDUCE
protected static final Pattern REDUCE_SPACES
protected static final Pattern CLEAN_PARANTHESIS
public AbstractImporter(OntologyDatabase db, String ontologyName)
db
- is a reference to the database in which the ontology should be
stored.ontologyName
- is the name of the ontology in which the data will be
stored.protected abstract void parseXML(OntologyHandle onto, XMLStreamReader parser) throws XMLStreamException
parser
- , the XMLStreamReader for the Drugbank xmlonto,
- the OntologyHandleXMLStreamException
public void importOntology(File xmlFile, boolean override)
Copyright (C) 2013, 2014 Raphael Dickfelder, Jan Göpfert, Benjamin Paassen, Andreas Stöckel, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/scie