org.apache.jackrabbit.name
Class ParsingNameResolver

java.lang.Object
  extended by org.apache.jackrabbit.name.ParsingNameResolver
All Implemented Interfaces:
NameResolver

Deprecated. Use the ParsingNameResolver class from the org.apache.jackrabbit.spi.commons.conversion package of the jackrabbit-spi-commons component.

public class ParsingNameResolver
extends Object
implements NameResolver

Name resolver that parsers and formats prefixed JCR names. A NamespaceResolver is used for resolving the namespace prefixes.


Constructor Summary
ParsingNameResolver(NamespaceResolver resolver)
          Deprecated. Creates a parsing name resolver.
ParsingNameResolver(Session session)
          Deprecated. Creates a parsing name resolver for a JCR session.
 
Method Summary
 String getJCRName(QName name)
          Deprecated. Returns the prefixed JCR name for the given qualified name.
 QName getQName(String name)
          Deprecated. Parses the prefixed JCR name and returns the resolved qualified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParsingNameResolver

public ParsingNameResolver(NamespaceResolver resolver)
Deprecated. 
Creates a parsing name resolver.

Parameters:
resolver - namespace resolver

ParsingNameResolver

public ParsingNameResolver(Session session)
Deprecated. 
Creates a parsing name resolver for a JCR session.

Parameters:
session - JCR session
Method Detail

getQName

public QName getQName(String name)
               throws NameException,
                      NamespaceException
Deprecated. 
Parses the prefixed JCR name and returns the resolved qualified name.

Specified by:
getQName in interface NameResolver
Parameters:
name - prefixed JCR name
Returns:
qualified name
Throws:
NameException - if the JCR name format is invalid
NamespaceException - if the namespace prefix can not be resolved

getJCRName

public String getJCRName(QName name)
                  throws NamespaceException
Deprecated. 
Returns the prefixed JCR name for the given qualified name. If the name is in the default namespace, then the local name is returned without a prefix. Otherwise the prefix for the namespace is resolved and used to construct returned the JCR name.

Specified by:
getJCRName in interface NameResolver
Parameters:
name - qualified name
Returns:
prefixed JCR name
Throws:
NamespaceException - if the namespace URI can not be resolved


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.