org.deduced.framework
Class FrameworkLoader

java.lang.Object
  extended by org.deduced.framework.FrameworkLoader

public class FrameworkLoader
extends java.lang.Object

Title: FrameworkLoader

Description: FrameworkLoader is used to load generated deduced frameworks in the specified deduced framework. It provides basic methods to add types and instances.

Author:
Steve McDuff

Field Summary
static double MAXIMUM_PERCENTAGE_VALUE
          maximum value for a percentage
private static DeducedModelLayerExtension STATIC_SCHEMA_MODEL
          model layer that contains all the statically loaded models
 
Constructor Summary
FrameworkLoader()
           
 
Method Summary
private static void addRuleToType(DeductionRule ruleToAdd, PropertyCollectionType propertyCollectionType)
          addRuleToType
static DeducedModelLayerExtension createApplicationModel(java.lang.String applicationName)
          create a model to host an application.
static DeducedSchemaLayer createBaseSchema()
          Utility method to create the base schema layer containing basic property types.
static DeducedModelLayerExtension createBaseSchemaModel()
          create the base schema that hosts the basic deduced types this schema is hosted by a model layer.
private static java.util.List<PropertyType> createBasicTypes()
          create Basic Types
private static void createCreationTypeValidatorRule()
          create Creation Type Validator Rule
private static void createEnumerationValidatorRule()
          create Enumeration Validator Rule
private static void createFormattedMultiLanguageTextBuilderRule()
          create a text deduction rule on the FormattedMultiLanguageTextBuilder
private static void createMultiLanguageTextBuilderRule()
          create a text deduction rule on the MultilanguageTextBuilder
private static StringValidationModelImplementation createMultipleLineStringValidationModel()
          create Multiple Line String Validation Model
private static void createNullableValidatorRule()
          create a deduction rule on the NullableValidator
private static NullableValidationModel createNullNotValidValidationModel()
          create Null Not Valid Validation Model
private static void createNumberValidatorRule()
          create Number Validator Rule
private static void createReferenceTypeValidatorRule()
          create Reference Type Validator Rule
private static void createSetIsValidOnErrorMessage()
          create Set Is Valid On Error Message rule
private static DeductionRule createSetTextBasedOnLanguageRule()
          create a "Set Text Based On Language Rule"
private static void createStringValidatorRule()
          create String Validator Rule
private static InstanceReference getRuleOutput(DeductionRule ruleToAdd)
          get Rule Output on a deduction rule.
static DeducedModelLayerExtension getStaticSchemaModel()
          get the static schema model into which all the static models are loaded
private static void initializeInitializerModel()
          initialize Initializer Model
private static void initializeValidationModel()
          initialize Validation Model
private static void initializeValidatorDeductionRules()
          initialize Validator Deduction Rules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXIMUM_PERCENTAGE_VALUE

public static final double MAXIMUM_PERCENTAGE_VALUE
maximum value for a percentage

See Also:
Constant Field Values

STATIC_SCHEMA_MODEL

private static DeducedModelLayerExtension STATIC_SCHEMA_MODEL
model layer that contains all the statically loaded models

Constructor Detail

FrameworkLoader

public FrameworkLoader()
Method Detail

createBaseSchemaModel

public static DeducedModelLayerExtension createBaseSchemaModel()
create the base schema that hosts the basic deduced types this schema is hosted by a model layer. This is the base model layer that both hosts the base schema and also depends on that schema for object creation.

Returns:
the model layer hosting the base schema

initializeInitializerModel

private static void initializeInitializerModel()
initialize Initializer Model


initializeValidationModel

private static void initializeValidationModel()
initialize Validation Model


createMultipleLineStringValidationModel

private static StringValidationModelImplementation createMultipleLineStringValidationModel()
create Multiple Line String Validation Model

Returns:
the created model

createNullNotValidValidationModel

private static NullableValidationModel createNullNotValidValidationModel()
create Null Not Valid Validation Model

Returns:
the created validation model

createBaseSchema

public static DeducedSchemaLayer createBaseSchema()
Utility method to create the base schema layer containing basic property types.

Returns:
the deduced schema layer containing the basic types.

getStaticSchemaModel

public static DeducedModelLayerExtension getStaticSchemaModel()
get the static schema model into which all the static models are loaded

Returns:
the static schema model.

createApplicationModel

public static DeducedModelLayerExtension createApplicationModel(java.lang.String applicationName)
create a model to host an application. This model will automatically reference the static schemas required to host an application.

Parameters:
applicationName - the application name to use
Returns:
the application model

createBasicTypes

private static java.util.List<PropertyType> createBasicTypes()
create Basic Types

Returns:
the list of all the basic types

initializeValidatorDeductionRules

private static void initializeValidatorDeductionRules()
initialize Validator Deduction Rules


createMultiLanguageTextBuilderRule

private static void createMultiLanguageTextBuilderRule()
create a text deduction rule on the MultilanguageTextBuilder


createFormattedMultiLanguageTextBuilderRule

private static void createFormattedMultiLanguageTextBuilderRule()
create a text deduction rule on the FormattedMultiLanguageTextBuilder


createSetTextBasedOnLanguageRule

private static DeductionRule createSetTextBasedOnLanguageRule()
create a "Set Text Based On Language Rule"

Returns:
the created rule

createNullableValidatorRule

private static void createNullableValidatorRule()
create a deduction rule on the NullableValidator


createReferenceTypeValidatorRule

private static void createReferenceTypeValidatorRule()
create Reference Type Validator Rule


createEnumerationValidatorRule

private static void createEnumerationValidatorRule()
create Enumeration Validator Rule


getRuleOutput

private static InstanceReference getRuleOutput(DeductionRule ruleToAdd)
get Rule Output on a deduction rule. If no output is defined, a new one will be created

Parameters:
ruleToAdd - the rule from which to fetch the output
Returns:
the rule output

createCreationTypeValidatorRule

private static void createCreationTypeValidatorRule()
create Creation Type Validator Rule


createStringValidatorRule

private static void createStringValidatorRule()
create String Validator Rule


addRuleToType

private static void addRuleToType(DeductionRule ruleToAdd,
                                  PropertyCollectionType propertyCollectionType)
addRuleToType

Parameters:
ruleToAdd - rule to add
propertyCollectionType - type to get the rule

createNumberValidatorRule

private static void createNumberValidatorRule()
create Number Validator Rule


createSetIsValidOnErrorMessage

private static void createSetIsValidOnErrorMessage()
create Set Is Valid On Error Message rule