public class NameParser
extends java.lang.Object
Constructor and Description |
---|
NameParser() |
Modifier and Type | Method and Description |
---|---|
static void |
checkFormat(java.lang.String jcrName)
Check the format of the jcr name.
|
static Name[] |
parse(java.lang.String[] jcrNames,
NamespaceResolver resolver,
NameFactory factory)
Parses an array of
jcrName and returns the respective
array of Name . |
static Name |
parse(java.lang.String jcrName,
NamespaceResolver resolver,
NameFactory factory)
Parses the
jcrName (either qualified or expanded) and
returns a new Name . |
public static Name parse(java.lang.String jcrName, NamespaceResolver resolver, NameFactory factory) throws IllegalNameException, NamespaceException
jcrName
(either qualified or expanded) and
returns a new Name
.jcrName
- the name to be parsed. The jcrName may either be in the
qualified or in the expanded form.resolver
- NamespaceResolver
use to retrieve the
namespace URI from the prefix contained in the given JCR name.Name
IllegalNameException
- If jcrName
is not a valid
JCR-style name.NamespaceException
- If the jcr name contains an unknown prefix.public static Name[] parse(java.lang.String[] jcrNames, NamespaceResolver resolver, NameFactory factory) throws NameException, NamespaceException
jcrName
and returns the respective
array of Name
.jcrNames
- the array of names to be parsedresolver
- NamespaceResolver
use to retrieve the
namespace URI from the prefix contained in the given JCR name.factory
- Name
IllegalNameException
- If jcrName
is not a valid
JCR-style name.NamespaceException
- If the jcr name contains an unknown prefix.NameException
public static void checkFormat(java.lang.String jcrName) throws IllegalNameException
jcrName
- IllegalNameException
- If the jcrName contains an invalid format.Copyright © 2010 - 2020 Adobe. All Rights Reserved