Class ParserException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.semanticweb.owlapi.model.OWLRuntimeException
org.semanticweb.owlapi.io.OWLParserException
org.semanticweb.owlapi.manchestersyntax.renderer.ParserException
- All Implemented Interfaces:
Serializable
The Class ParserException.
- Since:
- 2.2.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParserException
(String message, List<String> tokenSequence, int lineNumber, int columnNumber, boolean integerExpected, int startPos) Instantiates a new parser exception.ParserException
(String message, List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, boolean ontologyNameExpected, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, boolean integerExpected, Set<String> expectedKeywords) Instantiates a new parser exception.ParserException
(String message, List<String> tokenSeqence, int startPos, int lineNumber, int columnNumber, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, String... keywords) Instantiates a new parser exception.ParserException
(String message, List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, Set<String> expectedKeywords) Instantiates a new parser exception.ParserException
(String message, List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, String... keywords) Instantiates a new parser exception.ParserException
(List<String> tokenSequence, int lineNumber, int columnNumber, boolean integerExpected, int startPos) Instantiates a new parser exception.ParserException
(List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, boolean ontologyNameExpected, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, boolean integerExpected, Set<String> expectedKeywords) Instantiates a new parser exception.ParserException
(List<String> tokenSeqence, int startPos, int lineNumber, int columnNumber, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, String... keywords) Instantiates a new parser exception.ParserException
(List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, Set<String> expectedKeywords) Instantiates a new parser exception.ParserException
(List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, String... keywords) Instantiates a new parser exception.ParserException
(ParserException delegate) -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the current token.Gets the expected keywords.int
Gets the line number of the line that the parser was parsing when the error occurred.int
Gets the token sequence.boolean
Checks if is annotation property name expected.boolean
Checks if is class name expected.boolean
Checks if is data property name expected.boolean
Checks if is datatype name expected.boolean
Checks if is individual name expected.boolean
Checks if is integer expected.boolean
Checks if is object property name expected.boolean
Checks if is ontology name expected.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ParserException
public ParserException(String message, List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, boolean ontologyNameExpected, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, boolean integerExpected, Set<String> expectedKeywords) Instantiates a new parser exception.- Parameters:
message
- the messagetokenSequence
- the token sequencestartPos
- the start positionlineNumber
- the line numbercolumnNumber
- the column numberontologyNameExpected
- the ontology name expectedclassNameExpected
- the class name expectedobjectPropertyNameExpected
- the object property name expecteddataPropertyNameExpected
- the data property name expectedindividualNameExpected
- the individual name expecteddatatypeNameExpected
- the datatype name expectedannotationPropertyExpected
- the annotation property expectedintegerExpected
- the integer expectedexpectedKeywords
- the expected keywords
-
ParserException
public ParserException(List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, boolean ontologyNameExpected, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, boolean integerExpected, Set<String> expectedKeywords) Instantiates a new parser exception.- Parameters:
tokenSequence
- the token sequencestartPos
- the start positionlineNumber
- the line numbercolumnNumber
- the column numberontologyNameExpected
- the ontology name expectedclassNameExpected
- the class name expectedobjectPropertyNameExpected
- the object property name expecteddataPropertyNameExpected
- the data property name expectedindividualNameExpected
- the individual name expecteddatatypeNameExpected
- the datatype name expectedannotationPropertyExpected
- the annotation property expectedintegerExpected
- the integer expectedexpectedKeywords
- the expected keywords
-
ParserException
public ParserException(String message, List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, @Nullable Set<String> expectedKeywords) Instantiates a new parser exception.- Parameters:
message
- the messagetokenSequence
- the token sequencestartPos
- the start positionlineNumber
- the line numbercolumnNumber
- the column numberclassNameExpected
- the class name expectedobjectPropertyNameExpected
- the object property name expecteddataPropertyNameExpected
- the data property name expectedindividualNameExpected
- the individual name expecteddatatypeNameExpected
- the datatype name expectedannotationPropertyExpected
- the annotation property expectedexpectedKeywords
- the expected keywords
-
ParserException
public ParserException(String message, List<String> tokenSeqence, int startPos, int lineNumber, int columnNumber, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, String... keywords) Instantiates a new parser exception.- Parameters:
message
- the messagetokenSeqence
- the token sequencestartPos
- the start positionlineNumber
- the line numbercolumnNumber
- the column numberclassNameExpected
- the class name expectedobjectPropertyNameExpected
- the object property name expecteddataPropertyNameExpected
- the data property name expectedindividualNameExpected
- the individual name expecteddatatypeNameExpected
- the datatype name expectedannotationPropertyExpected
- the annotation property expectedkeywords
- the keywords
-
ParserException
public ParserException(List<String> tokenSeqence, int startPos, int lineNumber, int columnNumber, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, String... keywords) Instantiates a new parser exception.- Parameters:
tokenSeqence
- the token sequencestartPos
- the start positionlineNumber
- the line numbercolumnNumber
- the column numberclassNameExpected
- the class name expectedobjectPropertyNameExpected
- the object property name expecteddataPropertyNameExpected
- the data property name expectedindividualNameExpected
- the individual name expecteddatatypeNameExpected
- the datatype name expectedannotationPropertyExpected
- the annotation property expectedkeywords
- the keywords
-
ParserException
public ParserException(String message, List<String> tokenSequence, int lineNumber, int columnNumber, boolean integerExpected, int startPos) Instantiates a new parser exception.- Parameters:
message
- the messagetokenSequence
- the token sequencelineNumber
- the line numbercolumnNumber
- the column numberintegerExpected
- the integer expectedstartPos
- the start position
-
ParserException
public ParserException(List<String> tokenSequence, int lineNumber, int columnNumber, boolean integerExpected, int startPos) Instantiates a new parser exception.- Parameters:
tokenSequence
- the token sequencelineNumber
- the line numbercolumnNumber
- the column numberintegerExpected
- the integer expectedstartPos
- the start position
-
ParserException
public ParserException(String message, List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, String... keywords) Instantiates a new parser exception.- Parameters:
message
- the messagetokenSequence
- the token sequencestartPos
- the start positionlineNumber
- the line numbercolumnNumber
- the column numberkeywords
- the keywords
-
ParserException
public ParserException(List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, String... keywords) Instantiates a new parser exception.- Parameters:
tokenSequence
- the token sequencestartPos
- the start positionlineNumber
- the line numbercolumnNumber
- the column numberkeywords
- the keywords
-
ParserException
- Parameters:
delegate
- delegate
-
ParserException
public ParserException(List<String> tokenSequence, int startPos, int lineNumber, int columnNumber, boolean classNameExpected, boolean objectPropertyNameExpected, boolean dataPropertyNameExpected, boolean individualNameExpected, boolean datatypeNameExpected, boolean annotationPropertyExpected, @Nullable Set<String> expectedKeywords) Instantiates a new parser exception.- Parameters:
tokenSequence
- the token sequencestartPos
- the start positionlineNumber
- the line numbercolumnNumber
- the column numberclassNameExpected
- the class name expectedobjectPropertyNameExpected
- the object property name expecteddataPropertyNameExpected
- the data property name expectedindividualNameExpected
- the individual name expecteddatatypeNameExpected
- the datatype name expectedannotationPropertyExpected
- the annotation property expectedexpectedKeywords
- the expected keywords
-
-
Method Details
-
getTokenSequence
Gets the token sequence.- Returns:
- the token sequence
-
getStartPos
public int getStartPos()- Returns:
- the start position
-
isClassNameExpected
public boolean isClassNameExpected()Checks if is class name expected.- Returns:
- true, if is class name expected
-
isObjectPropertyNameExpected
public boolean isObjectPropertyNameExpected()Checks if is object property name expected.- Returns:
- true, if is object property name expected
-
isDataPropertyNameExpected
public boolean isDataPropertyNameExpected()Checks if is data property name expected.- Returns:
- true, if is data property name expected
-
isIndividualNameExpected
public boolean isIndividualNameExpected()Checks if is individual name expected.- Returns:
- true, if is individual name expected
-
isDatatypeNameExpected
public boolean isDatatypeNameExpected()Checks if is datatype name expected.- Returns:
- true, if is datatype name expected
-
isAnnotationPropertyNameExpected
public boolean isAnnotationPropertyNameExpected()Checks if is annotation property name expected.- Returns:
- true, if is annotation property name expected
-
isOntologyNameExpected
public boolean isOntologyNameExpected()Checks if is ontology name expected.- Returns:
- true, if is ontology name expected
-
getExpectedKeywords
Gets the expected keywords.- Returns:
- the expected keywords
-
getCurrentToken
Gets the current token.- Returns:
- the current token
-
getLineNumber
public int getLineNumber()Description copied from class:OWLParserException
Gets the line number of the line that the parser was parsing when the error occurred.- Overrides:
getLineNumber
in classOWLParserException
- Returns:
- A positive integer which represents the line number, or -1 if the line number could not be determined.
-
getColumnNumber
public int getColumnNumber()- Overrides:
getColumnNumber
in classOWLParserException
- Returns:
- the column number
-
isIntegerExpected
public boolean isIntegerExpected()Checks if is integer expected.- Returns:
- true, if is integer expected
-
getMessage
- Overrides:
getMessage
in classOWLParserException
-