|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--antlr.Parser
|
+--antlr.LLkParser
|
+--org.semanticweb.owl.io.abstract_syntax.ANTLRParser
ANTLR generated parser for
OWL abstract
syntax. It is invoked by AbstractOWLParser which implements
Parser.
Builds two tables: a namespaceTable with all name spaces
used in the ontology and
an idsTable with the types
of the OWLPropertys which can be inferred from
the ontology.
While parsing an ontology, builds a corresponding OWLOntology
using the utility class OWLBuilder.
Generated by ANTLR
from file abstract-owl.g.
Relies on AbstractOWLLexer.
Warning:
ObjectProperty and
DatatypeProperty entities have to be defined
before they can be used.
Eg:
Namespace(people=<http://cohse.semanticweb.org/ontologies/people#>)
Ontology(
ObjectProperty(people:has_pet)
Individual(people:fred value(people:has_pet people:felix))
)
Namespace(people=<http://cohse.semanticweb.org/ontologies/people#>)
Ontology(
Individual(people:fred value(people:has_pet people:felix))
ObjectProperty(people:has_pet)
)
| Field Summary | |
static String[] |
_tokenNames
|
static antlr.collections.impl.BitSet |
_tokenSet_0
|
static antlr.collections.impl.BitSet |
_tokenSet_1
|
static antlr.collections.impl.BitSet |
_tokenSet_10
|
static antlr.collections.impl.BitSet |
_tokenSet_11
|
static antlr.collections.impl.BitSet |
_tokenSet_12
|
static antlr.collections.impl.BitSet |
_tokenSet_13
|
static antlr.collections.impl.BitSet |
_tokenSet_14
|
static antlr.collections.impl.BitSet |
_tokenSet_15
|
static antlr.collections.impl.BitSet |
_tokenSet_16
|
static antlr.collections.impl.BitSet |
_tokenSet_17
|
static antlr.collections.impl.BitSet |
_tokenSet_18
|
static antlr.collections.impl.BitSet |
_tokenSet_19
|
static antlr.collections.impl.BitSet |
_tokenSet_2
|
static antlr.collections.impl.BitSet |
_tokenSet_20
|
static antlr.collections.impl.BitSet |
_tokenSet_21
|
static antlr.collections.impl.BitSet |
_tokenSet_22
|
static antlr.collections.impl.BitSet |
_tokenSet_23
|
static antlr.collections.impl.BitSet |
_tokenSet_24
|
static antlr.collections.impl.BitSet |
_tokenSet_25
|
static antlr.collections.impl.BitSet |
_tokenSet_3
|
static antlr.collections.impl.BitSet |
_tokenSet_4
|
static antlr.collections.impl.BitSet |
_tokenSet_5
|
static antlr.collections.impl.BitSet |
_tokenSet_6
|
static antlr.collections.impl.BitSet |
_tokenSet_7
|
static antlr.collections.impl.BitSet |
_tokenSet_8
|
static antlr.collections.impl.BitSet |
_tokenSet_9
|
static String |
ANN_PROP
|
static int |
ANN_PROP_INT
|
OWLBuilder |
builder
Main helper to build the OWLOntology. |
static int |
DATA_PROP_INT
|
static String |
DATA_PROPERTY
|
static String |
OBJ_PROP
|
static int |
OBJ_PROP_INT
|
static int |
ONT_PROP_INT
|
static String |
ONTO_PROP
|
static URI |
RDFS_LIT_URI
|
| Fields inherited from class antlr.Parser |
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth |
| Constructor Summary | |
|
ANTLRParser(antlr.ParserSharedInputState state)
|
|
ANTLRParser(antlr.TokenBuffer tokenBuf)
|
protected |
ANTLRParser(antlr.TokenBuffer tokenBuf,
int k)
|
|
ANTLRParser(antlr.TokenStream lexer)
|
protected |
ANTLRParser(antlr.TokenStream lexer,
int k)
|
| Methods inherited from class antlr.LLkParser |
consume, LA, LT, traceIn, traceOut |
| Methods inherited from class antlr.Parser |
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public OWLBuilder builder
public static final String DATA_PROPERTY
public static final String OBJ_PROP
public static final String ANN_PROP
public static final String ONTO_PROP
public static final URI RDFS_LIT_URI
public static final int DATA_PROP_INT
public static final int OBJ_PROP_INT
public static final int ANN_PROP_INT
public static final int ONT_PROP_INT
public static final String[] _tokenNames
public static final antlr.collections.impl.BitSet _tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_4
public static final antlr.collections.impl.BitSet _tokenSet_5
public static final antlr.collections.impl.BitSet _tokenSet_6
public static final antlr.collections.impl.BitSet _tokenSet_7
public static final antlr.collections.impl.BitSet _tokenSet_8
public static final antlr.collections.impl.BitSet _tokenSet_9
public static final antlr.collections.impl.BitSet _tokenSet_10
public static final antlr.collections.impl.BitSet _tokenSet_11
public static final antlr.collections.impl.BitSet _tokenSet_12
public static final antlr.collections.impl.BitSet _tokenSet_13
public static final antlr.collections.impl.BitSet _tokenSet_14
public static final antlr.collections.impl.BitSet _tokenSet_15
public static final antlr.collections.impl.BitSet _tokenSet_16
public static final antlr.collections.impl.BitSet _tokenSet_17
public static final antlr.collections.impl.BitSet _tokenSet_18
public static final antlr.collections.impl.BitSet _tokenSet_19
public static final antlr.collections.impl.BitSet _tokenSet_20
public static final antlr.collections.impl.BitSet _tokenSet_21
public static final antlr.collections.impl.BitSet _tokenSet_22
public static final antlr.collections.impl.BitSet _tokenSet_23
public static final antlr.collections.impl.BitSet _tokenSet_24
public static final antlr.collections.impl.BitSet _tokenSet_25
| Constructor Detail |
protected ANTLRParser(antlr.TokenBuffer tokenBuf,
int k)
public ANTLRParser(antlr.TokenBuffer tokenBuf)
protected ANTLRParser(antlr.TokenStream lexer,
int k)
public ANTLRParser(antlr.TokenStream lexer)
public ANTLRParser(antlr.ParserSharedInputState state)
| Method Detail |
public Map getIdsTable()
public void setIdsTable(Map newIdsTable)
newIdsTable - The new IdsTable value.public Map getNamespaceTable()
public void setNamespaceTable(Map newNamespaceTable)
newNamespaceTable - The new NamespaceTable value.public void setPropertyHandler(SomeUndefinedOWLPropertyHandler handler)
propertyHandler property to handler.
handler - a SomeUndefinedOWLPropertyHandler value
public int inferPropertyType(Set ids)
throws UndefinedOWLPropertyException,
UndefinedOWLPropertyTypeException,
SomeUndefinedOWLPropertyException
ids with the keys
in idsTable and returns the first not null type
in the form of
one of DATA_PROP_INT, OBJ_PROP_INT,
ANN_PROP_INT, ONT_PROP_INT.
ids - a Set of Strings corresponding to property uris.
UndefinedOWLPropertyException - if no property type
is defined.
SomeUndefinedOWLPropertyException - if the
property type can be inferred but some properties are undefined;
the exception might beeen have handled by
the SomeUndefinedOWLPropertyHandler though.
UndefinedOWLPropertyTypeException
public final OWLOntology ontology(URI physicalURI,
OWLBuilder builder)
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final void namespace()
throws antlr.RecognitionException,
antlr.TokenStreamException
namespaceTable.
antlr.RecognitionException
antlr.TokenStreamException
public final URI ontologyID()
throws antlr.RecognitionException,
antlr.TokenStreamException,
MalformedOWLURIException
antlr.RecognitionException
antlr.TokenStreamException
MalformedOWLURIException
public final void directive()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final URI annotationPropertyID()
throws antlr.RecognitionException,
antlr.TokenStreamException,
MalformedOWLURIException
antlr.RecognitionException
antlr.TokenStreamException
MalformedOWLURIException
public final URI uriReference()
throws antlr.RecognitionException,
antlr.TokenStreamException,
MalformedOWLURIException
antlr.RecognitionException
antlr.TokenStreamException
MalformedOWLURIException
public final OWLIndividual individual()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLDataValue dataLiteral()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final void fact()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final void axiom()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final URI individualID()
throws antlr.RecognitionException,
antlr.TokenStreamException,
MalformedOWLURIException
antlr.RecognitionException
antlr.TokenStreamException
MalformedOWLURIException
public final OWLBuilder.AnnotationComponent annotation()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLDescription type()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLBuilder.PropertyValue value()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
UndefinedOWLPropertyException - if
the first property is not defined.
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLDescription description()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLClass owlClass()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLClass enumeratedClass()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final void disjointClasses()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final void equivalentClasses()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final void subClass()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLDataType dataType()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLDataProperty dataTypeProperty()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLObjectProperty objectProperty()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLAnnotationProperty annotationProperty()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final void ontologyProperty()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final void equivalentProperties()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
UndefinedOWLPropertyException - if none of the properties is
defined.
MalformedOWLPropertyURIException - if one of the properties is
not a well formed URI.
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final void subprop()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
UndefinedOWLPropertyException - if neither of the properties is
defined.
MalformedOWLPropertyURIException - if one of the two properties is
not a well formed URI.
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final URI classID()
throws antlr.RecognitionException,
antlr.TokenStreamException,
MalformedOWLURIException
antlr.RecognitionException
antlr.TokenStreamException
MalformedOWLURIException
public final boolean modality()
throws antlr.RecognitionException,
antlr.TokenStreamException
true is the modality is partial.
antlr.RecognitionException
antlr.TokenStreamException
public final URI datatypeID()
throws antlr.RecognitionException,
antlr.TokenStreamException,
MalformedOWLURIException
antlr.RecognitionException
antlr.TokenStreamException
MalformedOWLURIException
public final URI datavaluedPropertyID()
throws antlr.RecognitionException,
antlr.TokenStreamException,
MalformedOWLURIException
antlr.RecognitionException
antlr.TokenStreamException
MalformedOWLURIException
public final OWLDataRange dataRange()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final URI individualvaluedPropertyID()
throws antlr.RecognitionException,
antlr.TokenStreamException,
MalformedOWLURIException
antlr.RecognitionException
antlr.TokenStreamException
MalformedOWLURIException
public final URI ontologyPropertyID()
throws antlr.RecognitionException,
antlr.TokenStreamException,
MalformedOWLURIException
antlr.RecognitionException
antlr.TokenStreamException
MalformedOWLURIException
public final OWLDescription externalDescription(OWLBuilder newBuilder,
Map newIdsTable,
Map newNamespaceTable)
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
AbstractOWLParser.parseDescription(Reader).
Returns the OWLDescription corresponding to the description in the Reader
using newBuilder and newIdsTable.
newBuilder - the OWLBuilder used to build the description.newIdsTable - the table of ids used to disambiguate
the property types.
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLRestriction restriction()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
UndefinedOWLPropertyException - if the property is not defined.
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLBuilder.RestrictionComponent dataRestrictionComponent()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLBuilder.RestrictionComponent individualRestrictionComponent()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final OWLBuilder.CardinalityComponent cardinality()
throws antlr.RecognitionException,
antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final OWLDataValue datatypeString()
throws antlr.RecognitionException,
antlr.TokenStreamException,
OWLException
antlr.RecognitionException
antlr.TokenStreamException
OWLException
public final String[] qname()
throws antlr.RecognitionException,
antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||