org.kuali.student.datadictionary.util
Class DictionaryFormatter

java.lang.Object
  extended by org.kuali.student.datadictionary.util.DictionaryFormatter

public class DictionaryFormatter
extends Object


Nested Class Summary
private static class DictionaryFormatter.AttributeDefinitionNameComparator
           
 
Field Summary
private  String beanId
           
private  Map<String,org.kuali.rice.krad.datadictionary.DataObjectEntry> beansOfType
           
private  org.kuali.rice.krad.datadictionary.DataObjectEntry doe
           
private  String outputFileName
           
private static String PAGE_PREFIX
           
private static String PAGE_SUFFIX
           
 
Constructor Summary
DictionaryFormatter(org.kuali.rice.krad.datadictionary.DataObjectEntry doe, Map<String,org.kuali.rice.krad.datadictionary.DataObjectEntry> beansOfType, String beanId, String outputFileName)
           
 
Method Summary
private  String appendIfNotNull(StringBuilder sb, String value, String comma)
           
private  String asString(Object value)
           
private  String calcComplexSubStructureName(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcControl(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcCrossField(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcCrossFieldRequire(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)
           
private  String calcCrossFieldWhen(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcDataType(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcDefaultValue(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcDescription(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)
           
private  String calcDescription(org.kuali.rice.krad.datadictionary.CollectionDefinition cd)
           
private  String calcDynamic(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcDynamicHiddenReadOnly(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcForceUpperCase(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcForceUpperValidCharsMinMax(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcHidden(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcLabel(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)
           
private  String calcLabel(org.kuali.rice.krad.datadictionary.CollectionDefinition cd)
           
private  String calcLength(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcLookup(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcLookup(org.kuali.rice.krad.datadictionary.validation.constraint.LookupConstraint lc)
           
private  String calcMinMax(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcName(String name, Stack<String> parents)
           
private  String calcNotSoSimpleName(String name)
           
private  String calcOverride(org.kuali.rice.krad.datadictionary.AttributeDefinition ad, org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint cons)
           
private  String calcOverride(String attribute, boolean val1, boolean val2)
           
private  String calcOverride(String attribute, org.kuali.rice.krad.datadictionary.validation.constraint.LookupConstraint val1, org.kuali.rice.krad.datadictionary.validation.constraint.LookupConstraint val2)
           
private  String calcOverride(String attribute, Object val1, Object val2)
           
private  String calcOverride(String attribute, String val1, String val2)
           
private  String calcOverride(String attribute, org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint val1, org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint val2)
           
private  String calcReadOnly(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcRequired(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)
           
private  String calcRequired(org.kuali.rice.krad.datadictionary.CollectionDefinition cd)
           
private  String calcShortLabel(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)
           
private  String calcShortLabel(org.kuali.rice.krad.datadictionary.CollectionDefinition cd)
           
private  String calcSimpleName(String simpleName)
           
private  String calcSummary(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)
           
private  String calcSummary(org.kuali.rice.krad.datadictionary.CollectionDefinition ad)
           
private  String calcValidChars(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)
           
private  String calcValidChars(org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint cons)
           
private  String calcWikigPageAbbrev(String searchType)
           
private  String calcWikiSearchPage(String searchType)
           
static String escapeXML(String s)
           
private  List<org.kuali.rice.krad.datadictionary.validation.constraint.CommonLookupParam> filterConfiguredParams(List<org.kuali.rice.krad.datadictionary.validation.constraint.CommonLookupParam> params)
           
private  String formatAsString(List<String> discrepancies)
           
 void formatForHtml()
           
private  org.kuali.rice.krad.datadictionary.DataObjectEntry getDataOjbectEntry(String className)
           
private  List<org.kuali.rice.krad.datadictionary.AttributeDefinition> getSortedFields()
           
private  String initUpper(String str)
           
private  String nbsp(String str)
           
private  void writeAttributes(PrintStream out, org.kuali.rice.krad.datadictionary.DataObjectEntry ode, Stack<String> parentNames, Stack<org.kuali.rice.krad.datadictionary.DataObjectEntry> parents)
           
private  void writeBody(PrintStream out)
           
static void writeFooter(PrintStream out)
           
static void writeHeader(PrintStream out, String title)
           
private  void writeLink(PrintStream out, String url, String value)
           
static void writeTag(PrintStream out, String tag, String value)
           
static void writeTag(PrintStream out, String tag, String modifiers, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doe

private org.kuali.rice.krad.datadictionary.DataObjectEntry doe

beansOfType

private Map<String,org.kuali.rice.krad.datadictionary.DataObjectEntry> beansOfType

beanId

private String beanId

outputFileName

private String outputFileName

PAGE_PREFIX

private static final String PAGE_PREFIX
See Also:
Constant Field Values

PAGE_SUFFIX

private static final String PAGE_SUFFIX
See Also:
Constant Field Values
Constructor Detail

DictionaryFormatter

public DictionaryFormatter(org.kuali.rice.krad.datadictionary.DataObjectEntry doe,
                           Map<String,org.kuali.rice.krad.datadictionary.DataObjectEntry> beansOfType,
                           String beanId,
                           String outputFileName)
Method Detail

formatForHtml

public void formatForHtml()

writeHeader

public static void writeHeader(PrintStream out,
                               String title)

writeFooter

public static void writeFooter(PrintStream out)

initUpper

private String initUpper(String str)

writeBody

private void writeBody(PrintStream out)

writeAttributes

private void writeAttributes(PrintStream out,
                             org.kuali.rice.krad.datadictionary.DataObjectEntry ode,
                             Stack<String> parentNames,
                             Stack<org.kuali.rice.krad.datadictionary.DataObjectEntry> parents)

getDataOjbectEntry

private org.kuali.rice.krad.datadictionary.DataObjectEntry getDataOjbectEntry(String className)

calcName

private String calcName(String name,
                        Stack<String> parents)

calcShortLabel

private String calcShortLabel(org.kuali.rice.krad.datadictionary.CollectionDefinition cd)

calcShortLabel

private String calcShortLabel(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)

calcLabel

private String calcLabel(org.kuali.rice.krad.datadictionary.CollectionDefinition cd)

calcLabel

private String calcLabel(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)

calcSummary

private String calcSummary(org.kuali.rice.krad.datadictionary.CollectionDefinition ad)

calcSummary

private String calcSummary(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)

calcDescription

private String calcDescription(org.kuali.rice.krad.datadictionary.CollectionDefinition cd)

calcDescription

private String calcDescription(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)

getSortedFields

private List<org.kuali.rice.krad.datadictionary.AttributeDefinition> getSortedFields()

formatAsString

private String formatAsString(List<String> discrepancies)

calcDataType

private String calcDataType(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcDefaultValue

private String calcDefaultValue(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcDynamicHiddenReadOnly

private String calcDynamicHiddenReadOnly(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

appendIfNotNull

private String appendIfNotNull(StringBuilder sb,
                               String value,
                               String comma)

calcDynamic

private String calcDynamic(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcHidden

private String calcHidden(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcReadOnly

private String calcReadOnly(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcComplexSubStructureName

private String calcComplexSubStructureName(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcSimpleName

private String calcSimpleName(String simpleName)

calcNotSoSimpleName

private String calcNotSoSimpleName(String name)

calcRequired

private String calcRequired(org.kuali.rice.krad.datadictionary.CollectionDefinition cd)

calcRequired

private String calcRequired(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)

calcForceUpperCase

private String calcForceUpperCase(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcValidChars

private String calcValidChars(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcValidChars

private String calcValidChars(org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint cons)

calcLookup

private String calcLookup(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcLookup

private String calcLookup(org.kuali.rice.krad.datadictionary.validation.constraint.LookupConstraint lc)

calcForceUpperValidCharsMinMax

private String calcForceUpperValidCharsMinMax(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcMinMax

private String calcMinMax(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcWikiSearchPage

private String calcWikiSearchPage(String searchType)

calcWikigPageAbbrev

private String calcWikigPageAbbrev(String searchType)

filterConfiguredParams

private List<org.kuali.rice.krad.datadictionary.validation.constraint.CommonLookupParam> filterConfiguredParams(List<org.kuali.rice.krad.datadictionary.validation.constraint.CommonLookupParam> params)

calcLength

private String calcLength(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcControl

private String calcControl(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcCrossField

private String calcCrossField(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcCrossFieldRequire

private String calcCrossFieldRequire(org.kuali.rice.krad.datadictionary.AttributeDefinitionBase ad)

calcCrossFieldWhen

private String calcCrossFieldWhen(org.kuali.rice.krad.datadictionary.AttributeDefinition ad)

calcOverride

private String calcOverride(org.kuali.rice.krad.datadictionary.AttributeDefinition ad,
                            org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint cons)

calcOverride

private String calcOverride(String attribute,
                            org.kuali.rice.krad.datadictionary.validation.constraint.LookupConstraint val1,
                            org.kuali.rice.krad.datadictionary.validation.constraint.LookupConstraint val2)

calcOverride

private String calcOverride(String attribute,
                            org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint val1,
                            org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint val2)

calcOverride

private String calcOverride(String attribute,
                            boolean val1,
                            boolean val2)

calcOverride

private String calcOverride(String attribute,
                            String val1,
                            String val2)

calcOverride

private String calcOverride(String attribute,
                            Object val1,
                            Object val2)

asString

private String asString(Object value)

nbsp

private String nbsp(String str)

writeTag

public static void writeTag(PrintStream out,
                            String tag,
                            String value)

writeTag

public static void writeTag(PrintStream out,
                            String tag,
                            String modifiers,
                            String value)

escapeXML

public static String escapeXML(String s)

writeLink

private void writeLink(PrintStream out,
                       String url,
                       String value)


Copyright © 2007-2012 The Kuali Foundation. All Rights Reserved.