edu.stanford.smi.protegex.owl.model.classparser
Class ParserUtils
java.lang.Object
edu.stanford.smi.protegex.owl.model.classparser.ParserUtils
public class ParserUtils
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESTRICTIONS_CAN_USE_BROWSER_TEXT
public static final String RESTRICTIONS_CAN_USE_BROWSER_TEXT
- See Also:
- Constant Field Values
SINGLE_QUOTE_STRING
public static final String SINGLE_QUOTE_STRING
- See Also:
- Constant Field Values
SUBSTRINGS_REQUIRING_QUOTES
public static final String[] SUBSTRINGS_REQUIRING_QUOTES
ParserUtils
public ParserUtils()
getFrameByName
public static RDFResource getFrameByName(OWLModel model,
String name)
throws AmbiguousNameException
- Throws:
AmbiguousNameException
getOWLClassFromName
public static OWLNamedClass getOWLClassFromName(OWLModel model,
String name)
throws AmbiguousNameException
- Throws:
AmbiguousNameException
getRDFPropertyFromName
public static RDFProperty getRDFPropertyFromName(OWLModel model,
String name)
throws AmbiguousNameException
- Throws:
AmbiguousNameException
getOWLDatatypePropertyFromName
public static OWLDatatypeProperty getOWLDatatypePropertyFromName(OWLModel model,
String name)
throws AmbiguousNameException
- Throws:
AmbiguousNameException
getOWLObjectPropertyFromName
public static OWLObjectProperty getOWLObjectPropertyFromName(OWLModel model,
String name)
throws AmbiguousNameException
- Throws:
AmbiguousNameException
getRDFResourceFromName
public static RDFResource getRDFResourceFromName(OWLModel model,
String name)
throws AmbiguousNameException
- Throws:
AmbiguousNameException
getOWLIndividualFromName
public static OWLIndividual getOWLIndividualFromName(OWLModel model,
String name)
throws AmbiguousNameException
- Throws:
AmbiguousNameException
quoteIfNeeded
public static String quoteIfNeeded(String id)
quoteNeeded
public static boolean quoteNeeded(String id)
dequoteIdentifier
public static String dequoteIdentifier(String id)
isLexError
public static boolean isLexError(Error e)
findSplittingPoint
public static int findSplittingPoint(String text)
- This routine tries a simple approach to splitting the portion of the text
String between 0 and pos-1 into the prefix (which hopefully is well formed) and
the suffix which needs to be auto-completed. This routein attempts two approaches.
If there is no quoting action on the strings then it starts working backwards from the last
character to find the first character that cannot be part of an unquoted identifier. Thus
for the string
hasTopping some Chees
^
the routine will work backwards over the letters 's', 'e', 'e', 'h', 'C' and will stop at the space.
In the second case the user is quoting an identifier that needs auto-completion.
In this case the routine will work backwards to the last quote symbol. Thus for the
string
hasTopping some 'Chees
^
The routine will work backwards to the quote just before the 'C'.
- Parameters:
text
- pos
-
- Returns:
isIdChar
public static boolean isIdChar(char ch)
Submit a bug report or feature request
Copyright (c) 1998-2009 Stanford University.