Module org.eclipse.persistence.sdo
Class SDOUtil
java.lang.Object
org.eclipse.persistence.sdo.helper.extension.SDOUtil
Purpose: Common functions in support of SDO.
Responsibilities:
- JAXB 1.0 Name Mangling algorithm functions are provided to support generation of valid class/method names..
- JSR-222 JAXB 2.0 Java Package Name generation algorithm function follows https://jaxb.dev.java.net/spec-download.html in section D.5.1 "Mapping from a Namespace URI"
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringINTERNAL: Return a valid Java class name or method name for a given stringstatic StringINTERNAL: Return a valid Java class name or method name for a given stringstatic StringINTERNAL:static StringgetBooleanGetMethodName(String s, String returnType) INTERNAL: Return a valid Java get method name for a given string.static StringgetBuiltInType(String typeName) static StringINTERNAL: Get default package name when no targetNamespace URI exists.
This function follows the JSR-222 JAXB 2.0 algorithm from https://jaxb.dev.java.net/spec-download.htmlstatic StringgetJavaTypeForProperty(SDOProperty property) static StringgetMethodName(String s, String returnType) INTERNAL: Return a valid Java get method name for a given string.static StringgetPackageNameFromURI(String uriString) INTERNAL: Get default package name from a namespace URI.
This function follows the JSR-222 JAXB 2.0 algorithm from https://jaxb.dev.java.net/spec-download.html.static booleanisValidXmlNCName(String name) INTERNAL: Validates whether given string is a valid XML non-colonial name (NCName).static StringmethodName(String s) INTERNAL: Return a valid Java method name for a given stringstatic StringmethodName(String s, boolean flag) INTERNAL: Return a valid Java method name for a given stringstatic StringINTERNAL: Return a valid Java set method name for a given string
-
Constructor Details
-
SDOUtil
public SDOUtil()
-
-
Method Details
-
getDefaultPackageName
INTERNAL: Get default package name when no targetNamespace URI exists.
This function follows the JSR-222 JAXB 2.0 algorithm from https://jaxb.dev.java.net/spec-download.html- Returns:
- default Java package name String
-
getPackageNameFromURI
INTERNAL: Get default package name from a namespace URI.
This function follows the JSR-222 JAXB 2.0 algorithm from https://jaxb.dev.java.net/spec-download.html.- Parameters:
uriString- - a namespace URL or URN- Returns:
- Java package name String
-
className
INTERNAL: Return a valid Java class name or method name for a given string- Parameters:
s-isClass- (flag whether called from a method context)- Returns:
-
className
INTERNAL: Return a valid Java class name or method name for a given string- Parameters:
s-flag-isClass- (flag whether called from a method context)- Returns:
-
methodName
INTERNAL: Return a valid Java method name for a given string- Parameters:
s-- Returns:
-
methodName
INTERNAL: Return a valid Java method name for a given string- Parameters:
s-flag-- Returns:
-
setMethodName
INTERNAL: Return a valid Java set method name for a given string- Parameters:
s-- Returns:
-
getMethodName
INTERNAL: Return a valid Java get method name for a given string. This method will check the returnType to see if it is a boolean/Boolean: if so, 'is' will be used in the method name instead of 'get'.- Parameters:
s-returnType-- Returns:
-
getBooleanGetMethodName
INTERNAL: Return a valid Java get method name for a given string. This method will NOT check the returnType to see if it is a boolean/Boolean and all method names will start with "GET"- Parameters:
s-returnType-- Returns:
-
constantName
INTERNAL:- Parameters:
s-- Returns:
-
getJavaTypeForProperty
-
getBuiltInType
-
isValidXmlNCName
INTERNAL: Validates whether given string is a valid XML non-colonial name (NCName).- Parameters:
name- string- Returns:
truegiven string is a valid NCName- See Also:
-