org.kuali.student.datadictionary.util
Class KradDictionaryCreator
java.lang.Object
org.kuali.student.datadictionary.util.KradDictionaryCreator
public class KradDictionaryCreator
- extends Object
- Author:
- nwright
Method Summary |
private void |
addValue(String value)
|
private String |
calcBaseKualiParentBean(MessageStructure ms)
|
private String |
calcBeanName(String pathName)
|
private String |
calcDataObjectClass(MessageStructure ms)
|
private String |
calcDataObjectClass(XmlType xmlType)
|
private String |
calcDescription(MessageStructure ms)
|
private String |
calcElementLabel(MessageStructure ms)
|
private String |
calcLabel(MessageStructure ms)
|
private String |
calcMinOccurs(MessageStructure ms)
|
private String |
calcObjectLabel()
|
private String |
calcPathName(String parentName,
MessageStructure ms)
|
private List<String> |
calcPrimaryKeys()
|
private boolean |
calcReadOnly(MessageStructure ms)
|
private String |
calcRequired(MessageStructure ms)
|
private String |
calcShortLabel(MessageStructure ms)
|
private String |
calcSimpleName(MessageStructure ms)
|
private String |
calcSummary(MessageStructure ms)
|
private String |
calcTitleAttribute()
|
private KradDictionaryCreator.Category |
calculateCategory(MessageStructure ms)
|
private String |
escapeHtml(String str)
|
private MessageStructure |
findMessageStructure(String shortName)
|
private MessageStructure |
findMessageStructureEndsWith(String shortNameEndsWith)
|
private List<String> |
getComplexSubObjectsThatAreLists()
|
private MessageStructure |
getMessageStructure(String shortName)
|
private static String |
initLower(String str)
|
private static String |
initUpper(String str)
|
private void |
initXmlWriters()
|
private String |
replaceDoubleQuotes(String str)
|
private boolean |
shouldWriteDetails(MessageStructure ms)
|
private static String |
splitCamelCase(String s)
|
private String |
stripListOffEnd(String name)
|
void |
write()
|
private void |
writeAllGeneratedAttributeRefBeans(String currentClassName,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
|
private void |
writeGeneratedAttributeDefinition(String currentClassName,
String parentName,
Stack<String> parents,
MessageStructure ms,
XmlWriter out)
|
private void |
writeGeneratedAttributeDefinitions(String currentClassName,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
|
private void |
writeGeneratedAttributeRefBeans(String currentClass,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out,
KradDictionaryCreator.Category filter)
|
private void |
writeGeneratedImports(XmlWriter out)
|
private void |
writeGeneratedObjectStructure(XmlWriter out)
|
private void |
writeManualAttributeDefinition(String currentClass,
String parentName,
MessageStructure ms,
XmlWriter out)
|
private void |
writeManualAttributeDefinitions(String currentClass,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
|
private void |
writeManualImports(XmlWriter out)
|
private void |
writeManualObjectStructure(XmlWriter out)
|
private void |
writeNote(XmlWriter out)
|
private void |
writeProperty(String propertyName,
String propertyValue,
XmlWriter out)
|
private void |
writePropertyEnd(XmlWriter out)
|
private void |
writePropertyStart(String propertyName,
XmlWriter out)
|
private void |
writePropertyValue(String propertyName,
String propertyValue,
XmlWriter out)
|
private void |
writeReadOnlyAttributeSecurity(XmlWriter out)
|
private void |
writeSpringHeaderClose(XmlWriter out)
|
private void |
writeSpringHeaderOpen(XmlWriter out)
|
private void |
writeWarning(XmlWriter out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
model
private ServiceContractModel model
finder
private ModelFinder finder
directory
private String directory
className
private String className
xmlType
private XmlType xmlType
gwriter
private XmlWriter gwriter
mwriter
private XmlWriter mwriter
messageStructures
private List<MessageStructure> messageStructures
writeManual
private boolean writeManual
writeGenerated
private boolean writeGenerated
predefinedFieldMap
private static Map<String,String> predefinedFieldMap
- list of predefined fields that should map to entries in ks-base-dictionary.xml
endsWithMap
private static Map<String,String> endsWithMap
- list of fields that if they end with the key the should be based on the entry
in ks-base-dictionary.xml
typeMap
private static Map<String,String> typeMap
- list of types that if the type matches this key then
it should be based on that type entry as defined in the
ks-base-dictionary.xml
KradDictionaryCreator
public KradDictionaryCreator(String directory,
ServiceContractModel model,
String className,
boolean writeManual,
boolean writeGenerated)
write
public void write()
initXmlWriters
private void initXmlWriters()
initLower
private static String initLower(String str)
initUpper
private static String initUpper(String str)
writeSpringHeaderClose
private void writeSpringHeaderClose(XmlWriter out)
writeSpringHeaderOpen
private void writeSpringHeaderOpen(XmlWriter out)
writeWarning
private void writeWarning(XmlWriter out)
writeNote
private void writeNote(XmlWriter out)
writeGeneratedImports
private void writeGeneratedImports(XmlWriter out)
writeManualImports
private void writeManualImports(XmlWriter out)
getComplexSubObjectsThatAreLists
private List<String> getComplexSubObjectsThatAreLists()
stripListOffEnd
private String stripListOffEnd(String name)
calcDataObjectClass
private String calcDataObjectClass(XmlType xmlType)
writeGeneratedObjectStructure
private void writeGeneratedObjectStructure(XmlWriter out)
writeAllGeneratedAttributeRefBeans
private void writeAllGeneratedAttributeRefBeans(String currentClassName,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
addValue
private void addValue(String value)
calcObjectLabel
private String calcObjectLabel()
splitCamelCase
private static String splitCamelCase(String s)
calculateCategory
private KradDictionaryCreator.Category calculateCategory(MessageStructure ms)
writeGeneratedAttributeRefBeans
private void writeGeneratedAttributeRefBeans(String currentClass,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out,
KradDictionaryCreator.Category filter)
writeGeneratedAttributeDefinitions
private void writeGeneratedAttributeDefinitions(String currentClassName,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
shouldWriteDetails
private boolean shouldWriteDetails(MessageStructure ms)
writeGeneratedAttributeDefinition
private void writeGeneratedAttributeDefinition(String currentClassName,
String parentName,
Stack<String> parents,
MessageStructure ms,
XmlWriter out)
calcDataObjectClass
private String calcDataObjectClass(MessageStructure ms)
calcBeanName
private String calcBeanName(String pathName)
calcPathName
private String calcPathName(String parentName,
MessageStructure ms)
calcSimpleName
private String calcSimpleName(MessageStructure ms)
calcReadOnly
private boolean calcReadOnly(MessageStructure ms)
writeReadOnlyAttributeSecurity
private void writeReadOnlyAttributeSecurity(XmlWriter out)
calcElementLabel
private String calcElementLabel(MessageStructure ms)
calcShortLabel
private String calcShortLabel(MessageStructure ms)
calcLabel
private String calcLabel(MessageStructure ms)
calcSummary
private String calcSummary(MessageStructure ms)
calcDescription
private String calcDescription(MessageStructure ms)
calcMinOccurs
private String calcMinOccurs(MessageStructure ms)
calcRequired
private String calcRequired(MessageStructure ms)
writeManualObjectStructure
private void writeManualObjectStructure(XmlWriter out)
writeManualAttributeDefinitions
private void writeManualAttributeDefinitions(String currentClass,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
writeManualAttributeDefinition
private void writeManualAttributeDefinition(String currentClass,
String parentName,
MessageStructure ms,
XmlWriter out)
calcBaseKualiParentBean
private String calcBaseKualiParentBean(MessageStructure ms)
calcTitleAttribute
private String calcTitleAttribute()
findMessageStructureEndsWith
private MessageStructure findMessageStructureEndsWith(String shortNameEndsWith)
findMessageStructure
private MessageStructure findMessageStructure(String shortName)
getMessageStructure
private MessageStructure getMessageStructure(String shortName)
calcPrimaryKeys
private List<String> calcPrimaryKeys()
writePropertyStart
private void writePropertyStart(String propertyName,
XmlWriter out)
writePropertyEnd
private void writePropertyEnd(XmlWriter out)
writeProperty
private void writeProperty(String propertyName,
String propertyValue,
XmlWriter out)
writePropertyValue
private void writePropertyValue(String propertyName,
String propertyValue,
XmlWriter out)
escapeHtml
private String escapeHtml(String str)
replaceDoubleQuotes
private String replaceDoubleQuotes(String str)
Copyright © 2007-2012 The Kuali Foundation. All Rights Reserved.