public class DefaultSchemaGenerator extends Object implements CruxSchemaGenerator
| Modifier and Type | Field and Description |
|---|---|
protected File |
destDir |
protected Map<String,Class<?>> |
enumTypes |
protected Map<String,File> |
namespacesForCatalog |
protected File |
projectBaseDir |
protected SchemaMessages |
schemaMessages |
protected Stack<Class<? extends WidgetChildProcessor<?>>> |
subTagTypes |
protected TemplateParser |
templateParser |
| Constructor and Description |
|---|
DefaultSchemaGenerator(File projectBaseDir,
File destDir,
File webDir) |
DefaultSchemaGenerator(String projectBaseDir,
String destDir,
String webDir) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyXHTMLSchema() |
protected boolean |
factorySupportsInnerText(Class<? extends WidgetCreator<?>> widgetFactory) |
protected void |
generateAllChild(PrintStream out,
TagConstraints attributes,
TagChildren children,
String library) |
protected void |
generateAttributes(PrintStream out,
String library,
Set<String> added,
Class<?> processorClass) |
protected void |
generateAttributesForFactory(PrintStream out,
Class<?> widgetFactory,
String library,
Set<String> added) |
protected void |
generateAttributesForProcessor(PrintStream out,
Class<?> processorClass,
String library,
Set<String> added) |
protected void |
generateAttributesForTemplate(PrintStream out,
Document template) |
void |
generateCatalog() |
protected void |
generateChild(PrintStream out,
TagChild tagChild,
boolean parentIsAnAgregator,
String library) |
protected void |
generateChildren(PrintStream out,
String library,
Class<?> processorClass) |
protected void |
generateChildrenForFactory(PrintStream out,
Class<? extends WidgetCreator<?>> widgetFactory,
String library) |
protected void |
generateChildrenForProcessor(PrintStream out,
Class<? extends WidgetChildProcessor<?>> processorClass,
String library) |
protected void |
generateChildrenForTemplate(PrintStream out,
Document template) |
protected void |
generateChoiceChild(PrintStream out,
TagConstraints attributes,
TagChildren children,
String library) |
protected void |
generateCoreCrossDeviceElement(PrintStream out) |
protected void |
generateCoreCrossDevWidgetsType(PrintStream out,
Set<String> libraries,
Set<String> templateLibraries) |
protected void |
generateCoreSchema(Set<String> libraries,
Set<String> templateLibraries) |
protected void |
generateCoreSchemaBody(Set<String> libraries,
Set<String> templateLibraries,
PrintStream out) |
protected void |
generateCoreSchemasImport(Set<String> libraries,
Set<String> templateLibraries,
PrintStream out) |
protected void |
generateCoreScreenElement(PrintStream out) |
protected void |
generateCoreSplashScreenElement(PrintStream out) |
protected void |
generateCoreWidgetsType(PrintStream out,
Set<String> libraries,
Set<String> templateLibraries) |
protected void |
generateCoreWidgetsType(PrintStream out,
Set<String> libraries,
Set<String> templateLibraries,
String groupName,
boolean supportCrossDevice,
boolean supportTemplates) |
void |
generateDocumentation() |
protected void |
generateDocumentationForTypeFactory(PrintStream out,
DeclarativeFactory annot) |
protected void |
generateElementAttributesForAllViewElements(PrintStream out) |
protected void |
generateEvents(PrintStream out,
Set<String> added,
Class<?> processorClass) |
protected void |
generateEventsForFactory(PrintStream out,
Class<?> widgetFactory,
Set<String> added) |
protected void |
generateEventsForProcessor(PrintStream out,
Class<?> processorClass,
Set<String> added) |
protected void |
generateGenericChildWithAttributes(PrintStream out,
String library,
Class<? extends WidgetChildProcessor<?>> processorClass,
TagConstraints attributes) |
protected void |
generateOfflineSchema() |
protected void |
generateOfflineScreenElement(PrintStream out) |
protected void |
generateSchemaForLibrary(String library,
Set<String> allLibraries,
Set<String> templateLibraries) |
protected void |
generateSchemaForTemplateLibrary(String library) |
protected void |
generateSchemaImportsForLibrary(String library,
Set<String> allLibraries,
Set<String> templateLibraries,
PrintStream out) |
void |
generateSchemas() |
protected void |
generateSequenceChild(PrintStream out,
TagConstraints attributes,
TagChildren children,
String library) |
protected void |
generateTemplateElement(PrintStream out) |
protected void |
generateTemplateSchema(Set<String> libraries,
Set<String> templateLibraries) |
protected void |
generateTemplateSectionElement(PrintStream out) |
protected void |
generateTypeForFactory(PrintStream out,
Class<? extends WidgetCreator<?>> widgetFactory,
String library) |
protected void |
generateTypeForTemplate(PrintStream out,
Document template,
String templateName) |
protected void |
generateTypesForEnumerations(PrintStream out) |
protected void |
generateTypesForSubTags(PrintStream out,
String library) |
protected void |
generateViewSchema(Set<String> libraries,
Set<String> templateLibraries) |
protected void |
generateViewSchemasImport(Set<String> libraries,
PrintStream out) |
protected void |
generateXDeviceSchema(Set<String> libraries,
Set<String> templateLibraries) |
protected String |
getRelativeName(File value) |
protected String |
getSchemaType(Class<?> type,
String library) |
protected boolean |
hasTextChild(Class<?> processorClass) |
protected void |
initializeSchemaGenerator(File projectBaseDir,
File webDir) |
protected boolean |
isChildAnAgregator(TagChild tagChild) |
protected boolean |
processorSupportsInnerText(Class<? extends WidgetChildProcessor<?>> processorClass) |
protected void |
registerNamespaceForCatalog(String targetNS,
File file) |
protected File destDir
protected File projectBaseDir
protected SchemaMessages schemaMessages
protected Stack<Class<? extends WidgetChildProcessor<?>>> subTagTypes
protected TemplateParser templateParser
public DefaultSchemaGenerator(File projectBaseDir, File destDir, File webDir)
destDir - public void generateCatalog()
throws SchemaGeneratorException
generateCatalog in interface CruxSchemaGeneratorout - SchemaGeneratorExceptionpublic void generateDocumentation()
throws SchemaGeneratorException
generateDocumentation in interface CruxSchemaGeneratorSchemaGeneratorExceptionpublic void generateSchemas()
throws SchemaGeneratorException
generateSchemas in interface CruxSchemaGeneratorSchemaGeneratorExceptionCruxSchemaGenerator.generateSchemas()protected void copyXHTMLSchema()
protected boolean factorySupportsInnerText(Class<? extends WidgetCreator<?>> widgetFactory)
widgetFactory - protected void generateAllChild(PrintStream out, TagConstraints attributes, TagChildren children, String library) throws NoSuchMethodException
out - attributes - children - NoSuchMethodExceptionprotected void generateAttributes(PrintStream out, String library, Set<String> added, Class<?> processorClass)
out - library - added - processorClass - protected void generateAttributesForFactory(PrintStream out, Class<?> widgetFactory, String library, Set<String> added)
out - widgetFactory - protected void generateAttributesForProcessor(PrintStream out, Class<?> processorClass, String library, Set<String> added)
out - processorClass - library - added - protected void generateAttributesForTemplate(PrintStream out, Document template)
out - template - protected void generateChild(PrintStream out, TagChild tagChild, boolean parentIsAnAgregator, String library) throws SecurityException, NoSuchMethodException
out - tagChild - parentIsAnAgregator - library - SecurityExceptionNoSuchMethodExceptionprotected void generateChildren(PrintStream out, String library, Class<?> processorClass) throws NoSuchMethodException
out - library - processorClass - NoSuchMethodExceptionprotected void generateChildrenForFactory(PrintStream out, Class<? extends WidgetCreator<?>> widgetFactory, String library)
out - widgetFactory - protected void generateChildrenForProcessor(PrintStream out, Class<? extends WidgetChildProcessor<?>> processorClass, String library)
out - widgetFactory - library - protected void generateChildrenForTemplate(PrintStream out, Document template)
out - template - protected void generateChoiceChild(PrintStream out, TagConstraints attributes, TagChildren children, String library) throws NoSuchMethodException
out - attributes - children - NoSuchMethodExceptionprotected void generateCoreCrossDeviceElement(PrintStream out)
out - protected void generateCoreCrossDevWidgetsType(PrintStream out, Set<String> libraries, Set<String> templateLibraries)
out - libraries - templateLibraries - protected void generateCoreSchema(Set<String> libraries, Set<String> templateLibraries)
libraries - templateLibraries - protected void generateCoreSchemaBody(Set<String> libraries, Set<String> templateLibraries, PrintStream out)
protected void generateCoreSchemasImport(Set<String> libraries, Set<String> templateLibraries, PrintStream out)
libraries - templateLibraries - out - protected void generateCoreScreenElement(PrintStream out)
out - protected void generateCoreSplashScreenElement(PrintStream out)
out - protected void generateCoreWidgetsType(PrintStream out, Set<String> libraries, Set<String> templateLibraries)
out - libraries - templateLibraries - protected void generateCoreWidgetsType(PrintStream out, Set<String> libraries, Set<String> templateLibraries, String groupName, boolean supportCrossDevice, boolean supportTemplates)
out - libraries - templateLibraries - groupName - supportCrossDevice - protected void generateDocumentationForTypeFactory(PrintStream out, DeclarativeFactory annot)
out - annot - protected void generateElementAttributesForAllViewElements(PrintStream out)
out - protected void generateEvents(PrintStream out, Set<String> added, Class<?> processorClass)
out - added - processorClass - protected void generateEventsForFactory(PrintStream out, Class<?> widgetFactory, Set<String> added)
out - widgetFactory - protected void generateEventsForProcessor(PrintStream out, Class<?> processorClass, Set<String> added)
out - processorClass - protected void generateGenericChildWithAttributes(PrintStream out, String library, Class<? extends WidgetChildProcessor<?>> processorClass, TagConstraints attributes)
out - library - processorClass - attributes - protected void generateOfflineSchema()
libraries - templateLibraries - protected void generateOfflineScreenElement(PrintStream out)
out - protected void generateSchemaForLibrary(String library, Set<String> allLibraries, Set<String> templateLibraries)
library - ClassNotFoundExceptionprotected void generateSchemaForTemplateLibrary(String library)
library - protected void generateSchemaImportsForLibrary(String library, Set<String> allLibraries, Set<String> templateLibraries, PrintStream out)
library - allLibraries - out - protected void generateSequenceChild(PrintStream out, TagConstraints attributes, TagChildren children, String library)
out - attributes - children - protected void generateTemplateElement(PrintStream out)
out - protected void generateTemplateSchema(Set<String> libraries, Set<String> templateLibraries)
libraries - templateLibraries - protected void generateTemplateSectionElement(PrintStream out)
out - protected void generateTypeForFactory(PrintStream out, Class<? extends WidgetCreator<?>> widgetFactory, String library)
out - widgetFactory - protected void generateTypeForTemplate(PrintStream out, Document template, String templateName)
out - template - protected void generateTypesForEnumerations(PrintStream out)
out - protected void generateTypesForSubTags(PrintStream out, String library)
out - library - protected void generateViewSchema(Set<String> libraries, Set<String> templateLibraries)
libraries - templateLibraries - protected void generateViewSchemasImport(Set<String> libraries, PrintStream out)
libraries - templateLibraries - out - protected void generateXDeviceSchema(Set<String> libraries, Set<String> templateLibraries)
libraries - templateLibraries - protected String getSchemaType(Class<?> type, String library)
type - library - protected boolean hasTextChild(Class<?> processorClass)
processorClass - protected void initializeSchemaGenerator(File projectBaseDir, File webDir)
projectBaseDir - webDir - protected boolean isChildAnAgregator(TagChild tagChild)
tagChild - protected boolean processorSupportsInnerText(Class<? extends WidgetChildProcessor<?>> processorClass)
type - Copyright © 2015. All rights reserved.