public class OBOFormatParser extends Object
Constructor and Description |
---|
OBOFormatParser() |
OBOFormatParser(Map<String,OBODoc> importsMap) |
Modifier and Type | Method and Description |
---|---|
boolean |
addImport(String key,
OBODoc doc) |
List<String> |
checkDanglingReferences(OBODoc doc) |
boolean |
getFollowImports() |
OBODoc |
parse(File file)
Parses a local file to an OBODoc.
|
OBODoc |
parse(Reader reader) |
OBODoc |
parse(String fn)
Parses a local file or URL to an OBODoc.
|
OBODoc |
parse(URL url)
Parses a remote URL to an OBODoc.
|
void |
parseEntityFrame(OBODoc obodoc) |
void |
parseEOL(Clause cl) |
void |
parseHeaderFrame(Frame h) |
void |
parseOBODoc(OBODoc obodoc) |
void |
parseTermFrame(OBODoc obodoc)
term-frame ::= nl* '[Term]' nl id-Tag Class-ID EOL { term-frame-clause EOL }.
|
Clause |
parseTermFrameClause() |
void |
parseTypedefFrame(OBODoc obodoc)
Typedef-frame ::= nl* '[Typedef]' nl id-Tag Class-ID EOL { Typedef-frame-clause EOL }.
|
Clause |
parseTypedefFrameClause() |
OBODoc |
parseURL(String urlstr)
Parses a remote URL to an OBODoc.
|
void |
setFollowImports(boolean followImports) |
void |
setReader(BufferedReader r) |
public boolean addImport(String key, OBODoc doc)
key
- key for the importdoc
- documentpublic void setReader(BufferedReader r)
r
- rpublic boolean getFollowImports()
public void setFollowImports(boolean followImports)
followImports
- true if imports should be followedpublic OBODoc parse(String fn) throws IOException
fn
- file nameIOException
- if there was a problem reading from the output streamOBOFormatParserException
- parser exceptionpublic OBODoc parse(File file) throws IOException
file
- fileIOException
- if there was a problem reading from the output streamOBOFormatParserException
- parser exceptionpublic OBODoc parse(URL url) throws IOException
url
- URLIOException
- if there was a problem reading from the output streamOBOFormatParserException
- parser exceptionpublic OBODoc parseURL(String urlstr) throws IOException
urlstr
- URL stringIOException
- if there was a problem reading from the output streamOBOFormatParserException
- parser exceptionpublic OBODoc parse(Reader reader) throws IOException
reader
- readerIOException
- if there was a problem reading from the output streamOBOFormatParserException
- parser exceptionpublic void parseOBODoc(OBODoc obodoc)
obodoc
- obodocOBOFormatParserException
- parser exceptionpublic List<String> checkDanglingReferences(OBODoc doc)
doc
- docOBOFormatDanglingReferenceException
- dangling reference errorpublic void parseHeaderFrame(Frame h)
h
- hOBOFormatParserException
- parser exceptionpublic void parseEntityFrame(OBODoc obodoc)
obodoc
- obodocOBOFormatParserException
- parser exceptionpublic void parseTermFrame(OBODoc obodoc)
obodoc
- obodocOBOFormatParserException
- parser exceptionpublic Clause parseTermFrameClause()
OBOFormatParserException
- parser exceptionpublic void parseTypedefFrame(OBODoc obodoc)
obodoc
- obodocOBOFormatParserException
- parser exceptionpublic Clause parseTypedefFrameClause()
OBOFormatParserException
- parser exceptionpublic void parseEOL(Clause cl)
cl
- clOBOFormatParserException
- parser exceptionCopyright © 2020 The University of Manchester. All rights reserved.