| java.lang.Object org.kuali.core.datadictionary.DataDictionaryBuilder
DataDictionaryBuilder | public class DataDictionaryBuilder (Code) | | Assembles a DataDictionary from the contents of one or more specifed XML
files or directories containing XML files.
|
Method Summary | |
protected synchronized void | addEntries(String sourceName, boolean allowOverrides) Parses each XML file on the given list, adding the class entry or entries
defined there to the current DataDictionary. | protected void | addEntriesWrapper(String sourceName, boolean sourceMustExist, boolean allowOverrides) Wraps addEntries with a try-catch block which prevents SourceExceptions
from escaping if sourceMustExist is false. | public void | addOverrideEntries(String sourceName, boolean sourceMustExist) Given the name of an XML file, or of a directory containing XML files,
adds the entries defined in the XML file or files to the DataDictionary
being built. | public void | addUniqueEntries(String sourceName, boolean sourceMustExist) Given the name of an XML file, or of a directory containing XML files,
adds the entries defined in the XML file or files to the DataDictionary
being built. | protected Digester | buildDigester(Rules rules) | protected static void | clearCurrentDigester() | protected void | clearCurrentFilename() | protected void | digest(InputStream inputStream, String fileName, Digester digester) | protected void | digest(File file, Digester digester) | protected static Digester | getCurrentDigester() | public static String | getCurrentFileName() | public static int | getCurrentLineNumber() | public DataDictionary | getDataDictionary() | protected boolean | getExceptionsOccurred() | protected Map<String, String> | getFileLocationMap() | public KualiConfigurationService | getKualiConfigurationService() | public KualiGroupService | getKualiGroupService() | protected void | indexSource(String sourceName, boolean sourceMustExist) | protected void | indexSource(File dir) | protected Rules | loadRules() | public void | parseBO(String boName, boolean allowsOverrides) | public void | parseDocument(String documentTypeDDKey, boolean allowsOverrides) | public void | parseMaintenanceDocument(String businessObjectDDKey, boolean allowsOverrides) | protected static void | setCurrentDigester(Digester newDigester) | protected void | setCurrentFilename(String newFilename) | protected void | setExceptionsOccurred(boolean exceptionsOccured) | public void | setKualiConfigurationService(KualiConfigurationService kualiConfigurationService) | public void | setKualiGroupService(KualiGroupService kualiGroupService) | protected void | setupDigester(Digester digester) |
DTD_REGISTRATION_INFO | final protected static String[][] DTD_REGISTRATION_INFO(Code) | | |
PACKAGE_PREFIX | final protected static String PACKAGE_PREFIX(Code) | | |
addEntries | protected synchronized void addEntries(String sourceName, boolean allowOverrides)(Code) | | Parses each XML file on the given list, adding the class entry or entries
defined there to the current DataDictionary. If allowOverrides is true,
treats duplicate entries (second and subsequent entry using a given
classname) as an error; otherwise, the last entry processed using a given
classname will replace earlier entries.
Parameters: sourceName - name of XML file or directory containing XML files Parameters: sourceMustExist - throw a SourceException if the given source cannot be found Parameters: allowOverrides - throws: ParseException - if an error occurs when processing the given list of xmlFiles throws: DuplicateEntryException - if allowOverrides is false, and an entry is defined using aclassname for which an entry already exists |
addEntriesWrapper | protected void addEntriesWrapper(String sourceName, boolean sourceMustExist, boolean allowOverrides)(Code) | | Wraps addEntries with a try-catch block which prevents SourceExceptions
from escaping if sourceMustExist is false.
throws: SourceException - if the given source does not exist, and sourceMustExist istrue |
addOverrideEntries | public void addOverrideEntries(String sourceName, boolean sourceMustExist)(Code) | | Given the name of an XML file, or of a directory containing XML files,
adds the entries defined in the XML file or files to the DataDictionary
being built. Duplicate class entries will override earlier class entries.
Parameters: sourceName - XML file or directory containing XML files to be added Parameters: sourceMustExist - throw a SourceException if the given source cannot be found throws: IllegalArgumentException - if the given sourceName is blank throws: ParseException - if an error occurs processing an entry file throws: SourceException - if sourceMustExist is true and the source can't be found |
addUniqueEntries | public void addUniqueEntries(String sourceName, boolean sourceMustExist)(Code) | | Given the name of an XML file, or of a directory containing XML files,
adds the entries defined in the XML file or files to the DataDictionary
being built. Duplicate class entries (antries using a classname already
in use) will result in a DuplicateEntryException being added to the
cumulative entryExceptions list. If sourceMustExist is true, a
nonexistent source will result in a SourceException being thrown.
Parameters: sourceName - XML file or directory containing XML files to be added Parameters: sourceMustExist - throw a SourceException if the given source cannot be found throws: IllegalArgumentException - if the given sourceName is blank throws: DuplicateEntryException - if one of the files being added contains an entry using aclassname for which an entrry has already been defined throws: ParseException - if an error occurs processing an entry file throws: SourceException - if sourceMustExist is true and the source can't be found |
buildDigester | protected Digester buildDigester(Rules rules)(Code) | | fully-initialized Digester used to process entry XML files |
clearCurrentDigester | protected static void clearCurrentDigester()(Code) | | |
clearCurrentFilename | protected void clearCurrentFilename()(Code) | | |
getCurrentDigester | protected static Digester getCurrentDigester()(Code) | | |
getCurrentFileName | public static String getCurrentFileName()(Code) | | name of the XML file currently being parsed throws: IllegalStateException - if parsing is not in progress |
getCurrentLineNumber | public static int getCurrentLineNumber()(Code) | | line number in the XML file currently being parsed throws: IllegalStateException - if parsing is not in progress |
getDataDictionary | public DataDictionary getDataDictionary()(Code) | | the current dataDictionary throws: IllegalStateException - if any exceptions occurred during calls to add*Entriesconstructing the dataDictionary |
getExceptionsOccurred | protected boolean getExceptionsOccurred()(Code) | | |
indexSource | protected void indexSource(File dir)(Code) | | |
loadRules | protected Rules loadRules()(Code) | | Rules loaded from the appropriate XML file |
parseBO | public void parseBO(String boName, boolean allowsOverrides)(Code) | | |
parseDocument | public void parseDocument(String documentTypeDDKey, boolean allowsOverrides)(Code) | | |
parseMaintenanceDocument | public void parseMaintenanceDocument(String businessObjectDDKey, boolean allowsOverrides)(Code) | | |
setCurrentDigester | protected static void setCurrentDigester(Digester newDigester)(Code) | | |
setCurrentFilename | protected void setCurrentFilename(String newFilename)(Code) | | |
setExceptionsOccurred | protected void setExceptionsOccurred(boolean exceptionsOccured)(Code) | | |
setupDigester | protected void setupDigester(Digester digester)(Code) | | |
|
|