edu.stanford.smi.protegex.owl.swrl.parser
Class SWRLParser
java.lang.Object
edu.stanford.smi.protegex.owl.swrl.parser.SWRLParser
- public class SWRLParser
- extends Object
- Author:
- Martin O'Connor , Holger Knublauch
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AND_CHAR
public static final char AND_CHAR
- See Also:
- Constant Field Values
IMP_CHAR
public static final char IMP_CHAR
- See Also:
- Constant Field Values
owlModel
private OWLModel owlModel
swrlFactory
private SWRLFactory swrlFactory
parseOnly
private boolean parseOnly
tokenizer
private StringTokenizer tokenizer
delimiters
private String delimiters
xmlSchemaSymbols
private Collection xmlSchemaSymbols
variables
private HashSet variables
inHead
private boolean inHead
SWRLParser
public SWRLParser(OWLModel owlModel)
setParseOnly
public void setParseOnly(boolean parseOnly)
parse
public SWRLImp parse(String rule)
throws SWRLParseException
- Throws:
SWRLParseException
parse
public SWRLImp parse(String rule,
SWRLImp imp)
throws SWRLParseException
- Throws:
SWRLParseException
parseAtom
private SWRLAtom parseAtom(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
checkAndSkipToken
private void checkAndSkipToken(String skipToken,
String unexpectedTokenMessage)
throws SWRLParseException
- Throws:
SWRLParseException
getNextStringToken
private String getNextStringToken(String noTokenMessage)
throws SWRLParseException
- Throws:
SWRLParseException
getNextNonSpaceToken
private String getNextNonSpaceToken(String noTokenMessage)
throws SWRLParseException
- Throws:
SWRLParseException
hasMoreNonSpaceTokens
private boolean hasMoreNonSpaceTokens()
parseSameAsAtomParameters
private SWRLAtom parseSameAsAtomParameters()
throws SWRLParseException
- Throws:
SWRLParseException
parseDifferentFromAtomParameters
private SWRLAtom parseDifferentFromAtomParameters()
throws SWRLParseException
- Throws:
SWRLParseException
parseClassAtomParameters
private SWRLAtom parseClassAtomParameters(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
parseIndividualPropertyAtomParameters
private SWRLAtom parseIndividualPropertyAtomParameters(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
parseDatavaluedPropertyAtomParameters
private SWRLAtom parseDatavaluedPropertyAtomParameters(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
parseBuiltinParameters
private SWRLAtom parseBuiltinParameters(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
parseXSDDatatypeParameters
private SWRLAtom parseXSDDatatypeParameters(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
parseEnumeratedListParameters
private SWRLAtom parseEnumeratedListParameters(List enumeratedList)
throws SWRLParseException
- Throws:
SWRLParseException
parseDObjectList
private List parseDObjectList()
throws SWRLParseException
- Throws:
SWRLParseException
parseIObject
private RDFResource parseIObject()
throws SWRLParseException
- Throws:
SWRLParseException
parseDObject
private RDFObject parseDObject()
throws SWRLParseException
- Throws:
SWRLParseException
isSameAs
private boolean isSameAs(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
isDifferentFrom
private boolean isDifferentFrom(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
isOWLClassName
private boolean isOWLClassName(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
isOWLObjectPropertyName
private boolean isOWLObjectPropertyName(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
isOWLDatatypePropertyName
private boolean isOWLDatatypePropertyName(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
isBuiltinName
private boolean isBuiltinName(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
isXSDDatatype
private boolean isXSDDatatype(String identifier)
throws SWRLParseException
- Throws:
SWRLParseException
isValidIdentifier
private boolean isValidIdentifier(String s)
isValidIndividualName
private boolean isValidIndividualName(String name)
throws SWRLParseException
- Throws:
SWRLParseException
getIndividual
private RDFResource getIndividual(String name)
throws SWRLParseException
- Throws:
SWRLParseException
getSWRLVariable
private SWRLVariable getSWRLVariable(String name)
throws SWRLParseException
- Throws:
SWRLParseException