Search in sources :

Example 1 with SchemaActions

use of org.whole.lang.xsd.codebase.SchemaActions in project whole by wholeplatform.

the class LegacyOperationsDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    // TODO move to MappingStrategyRegistry?
    MappingStrategyRegistry.instance().putMappingStrategy(new CommonsMappingStrategy());
    InterpreterOperation.interpret(new SchemaActions().create());
    platform.addOperationFactory(XsdLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new XsdPrettyPrinterVisitor();
        }
    });
    // TODO rewrite using queries/actions in SchemaActions
    // platform.addOperationFactory(XsdLanguageKit.ID, ArtifactsGeneratorOperation.ID,
    // new IVisitorFactory() {
    // public IVisitor create(IOperation operation, int stage) {
    // return new Xsd2ModelsArtifactsGeneratorVisitor((ArtifactsGeneratorOperation) operation);
    // }
    // });
    InterpreterOperation.interpret(new MappingActions().create());
    // FIXME requires WorkflowsInterpreter see WorkflowsInterpreterDeployer
    XsdRegistry.initialize();
    platform.addPersistenceKit("org.whole.lang.xsd.XsdSourceEditor", XsdPersistenceKit.instance());
    platform.addPersistenceKit("org.whole.lang.xsd.XsiSourceEditor", XsiPersistenceKit.instance());
    InterpreterOperation.interpret(new SchemaModelsActions().create());
}
Also used : IOperation(org.whole.lang.operations.IOperation) SchemaActions(org.whole.lang.xsd.codebase.SchemaActions) CommonsMappingStrategy(org.whole.lang.xsd.codebase.CommonsMappingStrategy) XsdPrettyPrinterVisitor(org.whole.lang.xsd.visitors.XsdPrettyPrinterVisitor) IVisitor(org.whole.lang.visitors.IVisitor) MappingActions(org.whole.lang.xsd.codebase.MappingActions) SchemaModelsActions(org.whole.lang.xsd.codebase.SchemaModelsActions) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory)

Aggregations

IOperation (org.whole.lang.operations.IOperation)1 IVisitor (org.whole.lang.visitors.IVisitor)1 IVisitorFactory (org.whole.lang.visitors.IVisitorFactory)1 CommonsMappingStrategy (org.whole.lang.xsd.codebase.CommonsMappingStrategy)1 MappingActions (org.whole.lang.xsd.codebase.MappingActions)1 SchemaActions (org.whole.lang.xsd.codebase.SchemaActions)1 SchemaModelsActions (org.whole.lang.xsd.codebase.SchemaModelsActions)1 XsdPrettyPrinterVisitor (org.whole.lang.xsd.visitors.XsdPrettyPrinterVisitor)1