public class JavaNamingUtils extends Object
Constructor and Description |
---|
JavaNamingUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getLocalPart(String uriString)
Get the local part of a URI, which is the fragment identifier (after #)
or part after the last / .
|
static String |
getNamespacePart(String uriString)
Get the Name Space Part of an URI (before the # or last / )
|
static String |
guessNSPrefix(String uriString)
try to find a suitable prefix to represent a uri, much like the prefixed
used in N3 notation.
|
static String |
toBeanName(Resource rresource,
Set<String> usedNames)
Create a legal and unique Java Bean Identifier for a resource.
|
static String |
toLegalJavaIdentifier(String illegal)
Convert any String into a legal Java Bean Identifier (no spaces,
everything concatenated)
|
static String |
uri2beanname(Object uriOrBlankNode,
Set<String> usedNames)
Take a URI and generate a legal and unique Java Bean Identifier from it.
|
public static String toBeanName(Resource rresource, Set<String> usedNames)
rresource
- - Resource for which to create the IdentifierusedNames
- - Set of already used namespublic static String toLegalJavaIdentifier(String illegal)
illegal
- - String which has to be convertedpublic static String uri2beanname(Object uriOrBlankNode, Set<String> usedNames)
uriOrBlankNode
- - URI or BlankNode for which a bean identifiers has
to be created.usedNames
- - Set of already used bean identifierspublic static String getLocalPart(String uriString)
uriString
- - URI given as Stringpublic static String getNamespacePart(String uriString)
uriString
- - URI given as StringCopyright © 2005–2019 IT-Consulting Dr. Max Völkel | Project started at FZI Forschungszentrum Informatik, www.fzi.de. All rights reserved.