|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.step.processor.MappingUtilities
A set of utilities for mapping between Windchill and Express entity names and Strings.
Field Summary | |
private static Hashtable |
_entityMappingCache
|
(package private) static HashSet |
_expressReservedWords
|
private static Properties |
_fullnamesMapping
|
private static boolean |
_overridenProperties
|
private static Hashtable |
_wtClassMappingCache
Cache for Step name to Windchill class mappings |
private static Object[] |
NO_ARGS
|
private static Class[] |
NO_CLASS_ARGS
|
Constructor Summary | |
MappingUtilities()
|
Method Summary | |
static String |
convertAttributeNameToWindchillField(String attributeName)
Defaults to starting converted name with an uppercase letter but not removing 'the_' from the start of attribute names (roles). |
static String |
convertAttributeNameToWindchillField(String attributeName,
boolean startUpperCase)
Defaults to not removing 'the_' from the start of attribute names (roles). |
static String |
convertAttributeNameToWindchillField(String attributeName,
boolean startUpperCase,
boolean removeRolePrefix)
Converts an Entity Attribute name to the equivalent Windchill Class attribute name. |
private static String |
convertCapsToUnderscores(String capitalsString)
Converts all capital letters, other that the first, to underscore- lowercase. |
static String |
convertEntityNameToWindchillClassName(String entityName)
Because of the loss of case(Express is case independent) it is necessary to provide an explicit mapping from Express Windchill entity names to their Windchill class equivalents. |
static String |
convertWindchillClassToEntityName(Class wtClass)
Converts a windchill class to its associated Express Entity name. |
static String |
convertWindchillClassToEntityName(String wtClassName)
|
static String |
convertWindchillFieldToAttributeName(String fieldName)
|
static String |
convertWindchillRoleToAttributeName(String roleName)
Converts a windchill role name to an entity attribute name |
static String |
expressToJava(String undecoded)
|
static boolean |
getBooleanProperty(String propertyName)
Get a boolean valued property. |
static String |
getMandatoryProperty(String propertyName)
Uses getProperty() to access the property and exits with an error message if the propery is not set. |
private static String |
getMappingFilename()
|
static String |
getProperty(String propertyName)
A single point of access for property settings. |
static Class |
getWindchillClassForEntityType(String entityTypeName)
|
private static void |
initialiseFullnamesMapping()
|
static boolean |
isEnumeratedType(String stepTypeName)
|
static boolean |
isExpressReservedWord(String word)
|
static boolean |
isIterationType(StepEntity entity)
|
static boolean |
isIterationType(String stepTypeName)
|
static boolean |
isLinkType(StepEntity entity)
|
static boolean |
isLinkType(String stepTypeName)
|
static boolean |
isMasterType(StepEntity entity)
|
static boolean |
isMasterType(String stepTypeName)
|
static boolean |
isNativeStepType(String stepTypeName)
|
static String |
javaToExpress(String unencoded)
|
static String |
localiseFileSeperators(String filePath)
|
private static void |
updateFullnamesMapping(String wtClassName,
String entityTypeName)
|
static void |
writeMappingFile()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Hashtable _wtClassMappingCache
private static final Hashtable _entityMappingCache
private static final Object[] NO_ARGS
private static final Class[] NO_CLASS_ARGS
private static Properties _fullnamesMapping
private static boolean _overridenProperties
static final HashSet _expressReservedWords
Constructor Detail |
public MappingUtilities()
Method Detail |
public static String getProperty(String propertyName)
public static boolean getBooleanProperty(String propertyName)
public static String getMandatoryProperty(String propertyName) throws TransferException
TransferException
private static void initialiseFullnamesMapping() throws TransferException
TransferException
private static String getMappingFilename()
private static void updateFullnamesMapping(String wtClassName, String entityTypeName)
public static void writeMappingFile()
public static Class getWindchillClassForEntityType(String entityTypeName) throws TransferException
TransferException
public static String convertAttributeNameToWindchillField(String attributeName)
public static String convertAttributeNameToWindchillField(String attributeName, boolean startUpperCase)
public static String convertAttributeNameToWindchillField(String attributeName, boolean startUpperCase, boolean removeRolePrefix)
The following rules are used:
public static String convertEntityNameToWindchillClassName(String entityName) throws TransferException
TransferException
public static String convertWindchillRoleToAttributeName(String roleName)
public static String convertWindchillFieldToAttributeName(String fieldName)
public static boolean isExpressReservedWord(String word)
public static String convertWindchillClassToEntityName(Class wtClass)
public static String convertWindchillClassToEntityName(String wtClassName)
private static String convertCapsToUnderscores(String capitalsString)
public static boolean isIterationType(StepEntity entity) throws TransferException
TransferException
public static boolean isIterationType(String stepTypeName) throws TransferException
TransferException
public static boolean isNativeStepType(String stepTypeName)
public static boolean isEnumeratedType(String stepTypeName) throws TransferException
TransferException
public static boolean isLinkType(StepEntity entity) throws TransferException
TransferException
public static boolean isLinkType(String stepTypeName) throws TransferException
TransferException
public static boolean isMasterType(StepEntity entity) throws TransferException
TransferException
public static boolean isMasterType(String stepTypeName) throws TransferException
TransferException
public static String localiseFileSeperators(String filePath)
public static String javaToExpress(String unencoded)
public static String expressToJava(String undecoded)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |