|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.name.QName
public final class QName
Qualified name. A qualified name is a combination of a namespace URI and a local part. Instances of this class are used to internally represent the names of JCR content items and other objects within a content repository.
A qualified name is immutable once created, although the prefixed JCR name representation of the qualified name can change depending on the namespace mappings in effect.
This class also contains a number of common namespace and qualified name constants for the namespaces and names specified by the JCR specification.
The prefixed JCR name format of a qualified name is specified by section 4.6 of the the JCR 1.0 specification (JSR 170) as follows:
name ::= simplename | prefixedname simplename ::= onecharsimplename | twocharsimplename | threeormorecharname prefixedname ::= prefix ':' localname localname ::= onecharlocalname | twocharlocalname | threeormorecharname onecharsimplename ::= (* Any Unicode character except: '.', '/', ':', '[', ']', '*', ''', '"', '|' or any whitespace character *) twocharsimplename ::= '.' onecharsimplename | onecharsimplename '.' | onecharsimplename onecharsimplename onecharlocalname ::= nonspace twocharlocalname ::= nonspace nonspace threeormorecharname ::= nonspace string nonspace prefix ::= (* Any valid XML Name *) string ::= char | string char char ::= nonspace | ' ' nonspace ::= (* Any Unicode character except: '/', ':', '[', ']', '*', ''', '"', '|' or any whitespace character *)
In addition to the prefixed JCR name format, a qualified name can also
be represented using the format "{namespaceURI}localPart
".
Field Summary | |
---|---|
static QName[] |
EMPTY_ARRAY
Deprecated. |
static QName |
JCR_AUTOCREATED
Deprecated. jcr:autoCreated |
static QName |
JCR_BASEVERSION
Deprecated. jcr:baseVersion |
static QName |
JCR_CHILDNODEDEFINITION
Deprecated. jcr:childNodeDefinition |
static QName |
JCR_CHILDVERSIONHISTORY
Deprecated. jcr:childVersionHistory |
static QName |
JCR_CONTENT
Deprecated. jcr:content |
static QName |
JCR_CREATED
Deprecated. jcr:created |
static QName |
JCR_DATA
Deprecated. jcr:data |
static QName |
JCR_DEFAULTPRIMARYTYPE
Deprecated. jcr:defaultPrimaryType |
static QName |
JCR_DEFAULTVALUES
Deprecated. jcr:defaultValues |
static QName |
JCR_ENCODING
Deprecated. jcr:encoding |
static QName |
JCR_FROZENMIXINTYPES
Deprecated. jcr:frozenMixinTypes |
static QName |
JCR_FROZENNODE
Deprecated. jcr:frozenNode |
static QName |
JCR_FROZENPRIMARYTYPE
Deprecated. jcr:frozenPrimaryType |
static QName |
JCR_FROZENUUID
Deprecated. jcr:frozenUuid |
static QName |
JCR_HASORDERABLECHILDNODES
Deprecated. jcr:hasOrderableChildNodes |
static QName |
JCR_ISCHECKEDOUT
Deprecated. jcr:isCheckedOut |
static QName |
JCR_ISMIXIN
Deprecated. jcr:isMixin |
static QName |
JCR_LANGUAGE
Deprecated. jcr:language |
static QName |
JCR_LASTMODIFIED
Deprecated. jcr:lastModified |
static QName |
JCR_LOCKISDEEP
Deprecated. jcr:lockIsDeep |
static QName |
JCR_LOCKOWNER
Deprecated. jcr:lockOwner |
static QName |
JCR_MANDATORY
Deprecated. jcr:mandatory |
static QName |
JCR_MERGEFAILED
Deprecated. jcr:mergeFailed |
static QName |
JCR_MIMETYPE
Deprecated. jcr:mimeType |
static QName |
JCR_MIXINTYPES
Deprecated. jcr:mixinTypes |
static QName |
JCR_MULTIPLE
Deprecated. jcr:multiple |
static QName |
JCR_NAME
Deprecated. jcr:name |
static QName |
JCR_NODETYPENAME
Deprecated. jcr:nodeTypeName |
static QName |
JCR_NODETYPES
Deprecated. jcr:nodeTypes |
static QName |
JCR_ONPARENTVERSION
Deprecated. jcr:onParentVersion |
static QName |
JCR_PATH
Deprecated. jcr:path |
static QName |
JCR_PREDECESSORS
Deprecated. jcr:predecessors |
static QName |
JCR_PRIMARYITEMNAME
Deprecated. jcr:primaryItemName |
static QName |
JCR_PRIMARYTYPE
Deprecated. jcr:primaryType |
static QName |
JCR_PROPERTYDEFINITION
Deprecated. jcr:propertyDefinition |
static QName |
JCR_PROTECTED
Deprecated. jcr:protected |
static QName |
JCR_REQUIREDPRIMARYTYPES
Deprecated. jcr:requiredPrimaryTypes |
static QName |
JCR_REQUIREDTYPE
Deprecated. jcr:requiredType |
static QName |
JCR_ROOT
Deprecated. jcr:root (dummy name for root node used in XML serialization) |
static QName |
JCR_ROOTVERSION
Deprecated. jcr:rootVersion |
static QName |
JCR_SAMENAMESIBLINGS
Deprecated. jcr:sameNameSiblings |
static QName |
JCR_SCORE
Deprecated. jcr:score |
static QName |
JCR_STATEMENT
Deprecated. jcr:statement |
static QName |
JCR_SUCCESSORS
Deprecated. jcr:successors |
static QName |
JCR_SUPERTYPES
Deprecated. jcr:supertypes |
static QName |
JCR_SYSTEM
Deprecated. jcr:system |
static QName |
JCR_UUID
Deprecated. jcr:uuid |
static QName |
JCR_VALUECONSTRAINTS
Deprecated. jcr:valueConstraints |
static QName |
JCR_VERSIONABLEUUID
Deprecated. jcr:versionableUuid |
static QName |
JCR_VERSIONHISTORY
Deprecated. jcr:versionHistory |
static QName |
JCR_VERSIONLABELS
Deprecated. jcr:versionLabels |
static QName |
JCR_VERSIONSTORAGE
Deprecated. jcr:versionStorage |
static QName |
JCR_XMLCHARACTERS
Deprecated. jcr:xmlcharacters |
static QName |
JCR_XMLTEXT
Deprecated. jcr:xmltext |
static QName |
MIX_LOCKABLE
Deprecated. mix:referenceable |
static QName |
MIX_REFERENCEABLE
Deprecated. mix:referenceable |
static QName |
MIX_VERSIONABLE
Deprecated. mix:versionable |
static String |
NS_DEFAULT_URI
Deprecated. |
static String |
NS_EMPTY_PREFIX
Deprecated. |
static String |
NS_JCR_PREFIX
Deprecated. |
static String |
NS_JCR_URI
Deprecated. |
static String |
NS_MIX_PREFIX
Deprecated. |
static String |
NS_MIX_URI
Deprecated. |
static String |
NS_NT_PREFIX
Deprecated. |
static String |
NS_NT_URI
Deprecated. |
static String |
NS_REP_PREFIX
Deprecated. |
static String |
NS_REP_URI
Deprecated. |
static String |
NS_SV_PREFIX
Deprecated. |
static String |
NS_SV_URI
Deprecated. |
static String |
NS_XML_PREFIX
Deprecated. |
static String |
NS_XML_URI
Deprecated. |
static String |
NS_XMLNS_PREFIX
Deprecated. |
static String |
NS_XMLNS_URI
Deprecated. |
static QName |
NT_BASE
Deprecated. nt:base |
static QName |
NT_CHILDNODEDEFINITION
Deprecated. nt:childNodeDefinition |
static QName |
NT_FILE
Deprecated. nt:file |
static QName |
NT_FOLDER
Deprecated. nt:folder |
static QName |
NT_FROZENNODE
Deprecated. nt:frozenNode |
static QName |
NT_HIERARCHYNODE
Deprecated. nt:hierarchyNode |
static QName |
NT_NODETYPE
Deprecated. nt:nodeType |
static QName |
NT_PROPERTYDEFINITION
Deprecated. nt:propertyDefinition |
static QName |
NT_QUERY
Deprecated. nt:query |
static QName |
NT_RESOURCE
Deprecated. nt:resource |
static QName |
NT_UNSTRUCTURED
Deprecated. nt:unstructured |
static QName |
NT_VERSION
Deprecated. nt:version |
static QName |
NT_VERSIONEDCHILD
Deprecated. nt:versionedChild |
static QName |
NT_VERSIONHISTORY
Deprecated. nt:versionHistory |
static QName |
NT_VERSIONLABELS
Deprecated. nt:versionLabels |
static QName |
REP_NODETYPES
Deprecated. rep:versionStorage |
static QName |
REP_ROOT
Deprecated. rep:root |
static QName |
REP_SYSTEM
Deprecated. rep:system |
static QName |
REP_VERSIONSTORAGE
Deprecated. rep:versionStorage |
static QName |
ROOT
Deprecated. Extra QName for the root node |
static QName |
SV_NAME
Deprecated. sv:name |
static QName |
SV_NODE
Deprecated. sv:node |
static QName |
SV_PROPERTY
Deprecated. sv:property |
static QName |
SV_TYPE
Deprecated. sv:type |
static QName |
SV_VALUE
Deprecated. sv:value |
Constructor Summary | |
---|---|
QName(String namespaceURI,
String localName)
Deprecated. Creates a new qualified name with the given namespace URI and local part. |
Method Summary | |
---|---|
static void |
checkFormat(String jcrName)
Deprecated. Use NameFormat.checkFormat(String) instead. |
Object |
clone()
Deprecated. Creates a clone of this qualified name. |
int |
compareTo(Object o)
Deprecated. Compares two qualified names. |
boolean |
equals(Object obj)
Deprecated. Compares two qualified names for equality. |
static QName |
fromJCRName(String rawName,
NamespaceResolver resolver)
Deprecated. Use NameFormat.parse(String, NamespaceResolver) instead. |
String |
getLocalName()
Deprecated. Returns the local part of the qualified name. |
String |
getNamespaceURI()
Deprecated. Returns the namespace URI of the qualified name. |
int |
hashCode()
Deprecated. Returns the hash code of this qualified name. |
String |
toJCRName(NamespaceResolver resolver)
Deprecated. Use NameFormat.format(QName, NamespaceResolver)
instead. |
void |
toJCRName(NamespaceResolver resolver,
StringBuffer buf)
Deprecated. Use NameFormat.format(QName, NamespaceResolver, StringBuffer)
instead. |
String |
toString()
Deprecated. Returns the string representation of this QName in the
following format:
{namespaceURI}localName |
static QName |
valueOf(String s)
Deprecated. Returns a QName holding the value of the specified
string. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NS_EMPTY_PREFIX
public static final String NS_DEFAULT_URI
public static final String NS_REP_PREFIX
public static final String NS_REP_URI
public static final String NS_JCR_PREFIX
public static final String NS_JCR_URI
public static final String NS_NT_PREFIX
public static final String NS_NT_URI
public static final String NS_MIX_PREFIX
public static final String NS_MIX_URI
public static final String NS_SV_PREFIX
public static final String NS_SV_URI
public static final String NS_XML_PREFIX
public static final String NS_XML_URI
public static final String NS_XMLNS_PREFIX
public static final String NS_XMLNS_URI
public static final QName ROOT
public static final QName JCR_SYSTEM
public static final QName JCR_NODETYPES
public static final QName JCR_UUID
public static final QName JCR_PRIMARYTYPE
public static final QName JCR_MIXINTYPES
public static final QName JCR_CREATED
public static final QName JCR_LASTMODIFIED
public static final QName JCR_ENCODING
public static final QName JCR_MIMETYPE
public static final QName JCR_DATA
public static final QName JCR_CONTENT
public static final QName JCR_ROOT
public static final QName JCR_XMLTEXT
public static final QName JCR_XMLCHARACTERS
public static final QName JCR_SCORE
public static final QName JCR_PATH
public static final QName JCR_STATEMENT
public static final QName JCR_LANGUAGE
public static final QName JCR_LOCKOWNER
public static final QName JCR_LOCKISDEEP
public static final QName JCR_VERSIONSTORAGE
public static final QName JCR_MERGEFAILED
public static final QName JCR_FROZENNODE
public static final QName JCR_FROZENUUID
public static final QName JCR_FROZENPRIMARYTYPE
public static final QName JCR_FROZENMIXINTYPES
public static final QName JCR_PREDECESSORS
public static final QName JCR_VERSIONLABELS
public static final QName JCR_SUCCESSORS
public static final QName JCR_ISCHECKEDOUT
public static final QName JCR_VERSIONHISTORY
public static final QName JCR_BASEVERSION
public static final QName JCR_CHILDVERSIONHISTORY
public static final QName JCR_ROOTVERSION
public static final QName JCR_VERSIONABLEUUID
public static final QName JCR_NODETYPENAME
public static final QName JCR_HASORDERABLECHILDNODES
public static final QName JCR_ISMIXIN
public static final QName JCR_SUPERTYPES
public static final QName JCR_PROPERTYDEFINITION
public static final QName JCR_NAME
public static final QName JCR_MANDATORY
public static final QName JCR_PROTECTED
public static final QName JCR_REQUIREDTYPE
public static final QName JCR_ONPARENTVERSION
public static final QName JCR_PRIMARYITEMNAME
public static final QName JCR_MULTIPLE
public static final QName JCR_VALUECONSTRAINTS
public static final QName JCR_DEFAULTVALUES
public static final QName JCR_AUTOCREATED
public static final QName JCR_CHILDNODEDEFINITION
public static final QName JCR_SAMENAMESIBLINGS
public static final QName JCR_DEFAULTPRIMARYTYPE
public static final QName JCR_REQUIREDPRIMARYTYPES
public static final QName REP_ROOT
public static final QName REP_SYSTEM
public static final QName REP_VERSIONSTORAGE
public static final QName REP_NODETYPES
public static final QName NT_UNSTRUCTURED
public static final QName NT_BASE
public static final QName NT_HIERARCHYNODE
public static final QName NT_RESOURCE
public static final QName NT_FILE
public static final QName NT_FOLDER
public static final QName NT_QUERY
public static final QName MIX_REFERENCEABLE
public static final QName MIX_LOCKABLE
public static final QName MIX_VERSIONABLE
public static final QName NT_VERSIONHISTORY
public static final QName NT_VERSION
public static final QName NT_VERSIONLABELS
public static final QName NT_VERSIONEDCHILD
public static final QName NT_FROZENNODE
public static final QName NT_NODETYPE
public static final QName NT_PROPERTYDEFINITION
public static final QName NT_CHILDNODEDEFINITION
public static final QName SV_NODE
public static final QName SV_PROPERTY
public static final QName SV_VALUE
public static final QName SV_TYPE
public static final QName SV_NAME
public static final QName[] EMPTY_ARRAY
Constructor Detail |
---|
public QName(String namespaceURI, String localName)
NameFormat.checkFormat(String)
.
namespaceURI
- namespace urilocalName
- local part
IllegalArgumentException
- if localName
is invalid.Method Detail |
---|
public static QName fromJCRName(String rawName, NamespaceResolver resolver) throws IllegalNameException, UnknownPrefixException
NameFormat.parse(String, NamespaceResolver)
instead.
rawName
- prefixed JCR nameresolver
- namespace resolver
IllegalNameException
- if the given name is not a valid JCR name
UnknownPrefixException
- if the JCR name prefix does not resolvepublic static QName valueOf(String s) throws IllegalArgumentException
QName
holding the value of the specified
string. The string must be in the format returned by the
QName.toString()
method, i.e.
{namespaceURI}localName
s
- a String
containing the QName
representation to be parsed.
QName
represented by the argument
IllegalArgumentException
- if the specified string can not be parsed
as a QName
.toString()
public static void checkFormat(String jcrName) throws IllegalNameException
NameFormat.checkFormat(String)
instead.
jcrName
is a valid JCR-style name.
jcrName
- the name to be checked
IllegalNameException
- If jcrName
is not a valid
JCR-style name.public String getLocalName()
public String getNamespaceURI()
public String toJCRName(NamespaceResolver resolver) throws NoPrefixDeclaredException
NameFormat.format(QName, NamespaceResolver)
instead.
resolver
- namespace resolver
NoPrefixDeclaredException
- if the namespace can not be resolvedpublic void toJCRName(NamespaceResolver resolver, StringBuffer buf) throws NoPrefixDeclaredException
NameFormat.format(QName, NamespaceResolver, StringBuffer)
instead.
resolver
- namespace resolverbuf
- string buffer where the prefixed JCR name should be
appended to
NoPrefixDeclaredException
- if the namespace can not be resolvedtoJCRName(NamespaceResolver)
public String toString()
QName
in the
following format:
{namespaceURI}localName
toString
in class Object
QName
.valueOf(String)
,
Object.toString()
public boolean equals(Object obj)
true
if the given object is a qualified name and has the same namespace URI
and local part as this qualified name.
equals
in class Object
obj
- the object to compare this qualified name with
true
if the object is equal to this qualified name,
false
otherwiseObject.equals(Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public Object clone() throws CloneNotSupportedException
clone()
public.
clone
in class Object
CloneNotSupportedException
- never thrownObject.clone()
public int compareTo(Object o)
compareTo
in interface Comparable
o
- the object to compare this qualified name with
ClassCastException
- if the given object is not a qualified nameComparable.compareTo(Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |