Search in sources :

Example 1 with XmlPrettyPrinterVisitor

use of org.whole.lang.xml.visitors.XmlPrettyPrinterVisitor in project whole by wholeplatform.

the class XmlLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new XmlLanguageKit());
    platform.addOperationFactory(XmlLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new XmlGenericBuilderAdapter((IXmlBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(XmlLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new XmlSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(XmlLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new XmlPrettyPrinterVisitor((PrettyPrinterOperation) operation);
        }
    });
    platform.addOperationFactory(XmlLanguageKit.URI, NormalizerOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new XmlNormalizerVisitor();
        }
    });
    platform.addPersistenceKit("org.whole.lang.xml.XmlBuilderEditor", XmlBuilderPersistenceKit.instance());
    platform.addPersistenceKit("org.whole.lang.xml.XmlSourceEditor", XmlSourcePersistenceKit.instance());
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) PrettyPrinterOperation(org.whole.lang.operations.PrettyPrinterOperation) XmlNormalizerVisitor(org.whole.lang.xml.visitors.XmlNormalizerVisitor) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) XmlGenericBuilderAdapter(org.whole.lang.xml.builders.XmlGenericBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) XmlPrettyPrinterVisitor(org.whole.lang.xml.visitors.XmlPrettyPrinterVisitor) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) XmlSpecificBuilderAdapter(org.whole.lang.xml.builders.XmlSpecificBuilderAdapter) IXmlBuilder(org.whole.lang.xml.builders.IXmlBuilder)

Aggregations

IBuilder (org.whole.lang.builders.IBuilder)1 IBuilderFactory (org.whole.lang.builders.IBuilderFactory)1 IEntityContext (org.whole.lang.contexts.IEntityContext)1 IOperation (org.whole.lang.operations.IOperation)1 PrettyPrinterOperation (org.whole.lang.operations.PrettyPrinterOperation)1 IVisitor (org.whole.lang.visitors.IVisitor)1 IVisitorFactory (org.whole.lang.visitors.IVisitorFactory)1 IXmlBuilder (org.whole.lang.xml.builders.IXmlBuilder)1 XmlGenericBuilderAdapter (org.whole.lang.xml.builders.XmlGenericBuilderAdapter)1 XmlSpecificBuilderAdapter (org.whole.lang.xml.builders.XmlSpecificBuilderAdapter)1 XmlNormalizerVisitor (org.whole.lang.xml.visitors.XmlNormalizerVisitor)1 XmlPrettyPrinterVisitor (org.whole.lang.xml.visitors.XmlPrettyPrinterVisitor)1