|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.name.NameFormat
public class NameFormat
NameFormat
provides methods for formatting and parsing names.
Constructor Summary | |
---|---|
NameFormat()
Deprecated. |
Method Summary | |
---|---|
static void |
checkFormat(String jcrName)
Deprecated. Checks if jcrName is a valid JCR-style name. |
static String[] |
format(QName[] qNames,
NamespaceResolver resolver)
Deprecated. Same as format(QName, NamespaceResolver) except that this
method takes an array of QName s and returns an array of
corresponding string representations. |
static String |
format(QName qName,
NamespaceResolver resolver)
Deprecated. Formats the given QName to produce a string representation,
i.e. |
static void |
format(QName qName,
NamespaceResolver resolver,
StringBuffer buffer)
Deprecated. Same as format(QName, NamespaceResolver) except that this
method appends the JCR-style name to the given buffer rather
than returning it directly. |
static QName[] |
parse(String[] jcrNames,
NamespaceResolver resolver)
Deprecated. Converts each JCR-style name in the passed array to its corresponding QName and returns the resulting QName array. |
static QName |
parse(String jcrName,
NamespaceResolver resolver)
Deprecated. Converts the jcrName to its corresponding QName . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NameFormat()
Method Detail |
---|
public static QName parse(String jcrName, NamespaceResolver resolver) throws IllegalNameException, UnknownPrefixException
jcrName
to its corresponding QName
.
If the resolver
passed is also an instance of
NameCache
then this method first attempts to find the
corresponding QName
in the cache. If it cannot be found then
the jcrName
is parsed and the corresponding
QName
constructed.
jcrName
- the JCR-style name to be parsedresolver
- NamespaceResolver
used for resolving
prefixes into namespace URIs
QName
IllegalNameException
- If jcrName
is not a valid
JCR-style name.
UnknownPrefixException
public static QName[] parse(String[] jcrNames, NamespaceResolver resolver) throws IllegalNameException, UnknownPrefixException
QName
and returns the resulting QName
array.
If the resolver
passed is also an instance of
NameCache
then this method first attempts to find the
corresponding QName
in the cache. If it cannot be found then
the jcrName
is parsed and the corresponding
QName
constructed.
jcrNames
- the array of JCR-style names to be parsedresolver
- NamespaceResolver
used for resolving
prefixes into namespace URIs
QName
array
IllegalNameException
- If any of the passed names is not a valid
JCR-style name.
UnknownPrefixException
public static void checkFormat(String jcrName) throws IllegalNameException
jcrName
is a valid JCR-style name.
jcrName
- the name to be checked
IllegalNameException
- If jcrName
is not a valid
JCR-style name.public static String format(QName qName, NamespaceResolver resolver) throws NoPrefixDeclaredException
QName
to produce a string representation,
i.e. JCR-style name. If the resolver
passed is also an
instance of NameCache
then this method first attempts to find the
corresponding JCR-style name in the cache. If it cannot be found then
a new string representation is constructed.
qName
- the QName
to formatresolver
- NamespaceResolver
used for resolving
namespace URIs into prefixes
QName
NoPrefixDeclaredException
- if a namespace can not be resolvedformat(QName, NamespaceResolver, StringBuffer)
public static String[] format(QName[] qNames, NamespaceResolver resolver) throws NoPrefixDeclaredException
format(QName, NamespaceResolver)
except that this
method takes an array of QName
s and returns an array of
corresponding string representations.
qNames
- the array QName
s to formatresolver
- NamespaceResolver
used for resolving
namespace URIs into prefixes
NoPrefixDeclaredException
- if a namespace can not be resolvedformat(QName, NamespaceResolver)
public static void format(QName qName, NamespaceResolver resolver, StringBuffer buffer) throws NoPrefixDeclaredException
format(QName, NamespaceResolver)
except that this
method appends the JCR-style name to the given buffer
rather
than returning it directly.
qName
- the QName
to formatresolver
- NamespaceResolver
used for resolving
namespace URIs into prefixesbuffer
- StringBuffer where the string representation should be
appended to
NoPrefixDeclaredException
- if a namespace can not be resolved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |