|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.semanticweb.owl.util.NamespaceUtil
public class NamespaceUtil
Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 04-Apr-2007
| Constructor Summary | |
|---|---|
NamespaceUtil()
|
|
| Method Summary | |
|---|---|
java.lang.String |
generatePrefix(java.lang.String namespace)
Generates a candidate prefix for the specified namespace. |
java.util.Map<java.lang.String,java.lang.String> |
getNamespace2PrefixMap()
|
java.lang.String |
getPrefix(java.lang.String namespace)
Gets a prefix for the given namespace. |
static boolean |
isDigit(char ch)
|
static boolean |
isLetter(char ch)
|
static boolean |
isNCNameChar(char ch)
|
static boolean |
isNCNameStartChar(char ch)
|
void |
setPrefix(java.lang.String namespace,
java.lang.String prefix)
Sets the prefix for the specified namespace. |
java.lang.String[] |
split(java.lang.String s,
java.lang.String[] result)
Splits a string into a namespace and local name. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NamespaceUtil()
| Method Detail |
|---|
public static boolean isLetter(char ch)
public static boolean isDigit(char ch)
public static boolean isNCNameChar(char ch)
public static boolean isNCNameStartChar(char ch)
public java.lang.String[] split(java.lang.String s,
java.lang.String[] result)
s - The string to be split.result - May be null. If not null the method will
fill the array with the result and return the passed in array. This allows a
String array to be reused. If this parameter is null then a new
String array will be created to hold the result. The size of the array
must be 2
public java.lang.String getPrefix(java.lang.String namespace)
namespace - The namespace whose prefix is to be
retrieved.
public java.util.Map<java.lang.String,java.lang.String> getNamespace2PrefixMap()
public java.lang.String generatePrefix(java.lang.String namespace)
namespace - The namespace that a prefix should be generated
for. The implementation attempts to generate a prefix based on
the namespace. If it cannot do this, a prefix of the form pn
is generated, where n is an integer.
public void setPrefix(java.lang.String namespace,
java.lang.String prefix)
namespace - The namespace whose prefix is to be set.prefix - The prefix for the namespace
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||