| java.lang.Object org.ontoware.rdfreactor.generator.JavaNamingUtils
JavaNamingUtils | public class JavaNamingUtils (Code) | | Helper methods for creating legal and unique Java Bean Identifiers for
resources.
Use toBeanName() as the main entry point to the helper functions.
author: mvo |
getLocalPart | public static String getLocalPart(String uriString)(Code) | | Get the local part of a URI, which is the fragment identifier (after #)
or part after the last / .
Parameters: uriString - -URI given as String URI fragment identifier OR part after last slash OR null |
getNamespacePart | public static String getNamespacePart(String uriString)(Code) | | Get the Name Space Part of an URI (before the # or last / )
Parameters: uriString - -URI given as String the part BEFORE the # or last slash |
guessNSPrefix | public static String guessNSPrefix(String uriString)(Code) | | try to find a suitable prefix to represent a uri, much like the prefixed
used in N3 notation.
Parameters: uriString - a URI given as String a short, lowercase name without spaces, usable as a N3 namespaceprefix |
toBeanName | public static String toBeanName(Resource rresource, Set<String> usedNames)(Code) | | Create a legal and unique Java Bean Identifier for a resource.
Parameters: rresource - -Resource for which to create the Identifier Parameters: usedNames - -Set of already used names a new unique name from label or URI |
toLegalJavaIdentifier | public static String toLegalJavaIdentifier(String illegal)(Code) | | Convert any String into a legal Java Bean Identifier (no spaces,
everything concatenated)
Parameters: illegal - -String which has to be converted legal Java Bean Identifier |
uri2beanname | public static String uri2beanname(Object uriOrBlankNode, Set<String> usedNames)(Code) | | Take a URI and generate a legal and unique Java Bean Identifier from it.
Parameters: uriOrBlankNode - -URI or BlankNode for which a bean identifiers has to becreated. Parameters: usedNames - -Set of alread used bean identifiers a legal and unique Java Bean Identifier |
|
|