Package org.apache.torque.generator.source.transform

Examples of org.apache.torque.generator.source.transform.SourceTransformer


                    + " Could not link class " + className
                    + " : " + e.getMessage());
            throw e;
        }

        SourceTransformer result;
        try
        {
            Constructor<?> constructor
                    = transformerClass.getConstructor();
            result = (SourceTransformer) constructor.newInstance();
View Full Code Here


    {
        SourceElement result = rootElement;
        for (SourceTransformerDefinition transformerDefinition
                : transformerDefinitions)
        {
            SourceTransformer sourceTransformer
                    = transformerDefinition.getSourceTransformer();
            String elements = transformerDefinition.getElements();
            log.debug("Applying source transformer "
                    + sourceTransformer.getClass().getName()
                    + (elements == null
                            ? " to the root element"
                            : " to the elements " + elements));

            List<SourceElement> toTransform
                    = SourcePath.getElementsFromRoot(rootElement, elements);
            if (toTransform.isEmpty())
            {
                log.debug("No element found, nothing transformed");
            }
            for (SourceElement sourceElement : toTransform)
            {
                log.debug("transforming element " + sourceElement);
                SourceElement transformedElement = sourceTransformer.transform(
                        sourceElement,
                        controllerState);
                if (transformedElement == null)
                {
                    throw new SourceTransformerException("Transformer "
                            + sourceTransformer.getClass().getName()
                            + " returned null for element "
                            + sourceElement.getName());
                }
                SourceElement parent = sourceElement.getParent();
                if (parent == null)
View Full Code Here

            OMTransformer.setRootDatabaseNameAttribute(databaseElement);
            // load referenced external schemata
            String path = (String) fileElement.getAttribute(
                    CombinedFileSource.PATH_ATTRIBUTE_NAME);
            File pathFile = new File(path);
            SourceTransformer loadExternalSchemaTransformer
                   = new LoadExternalSchemaTransformer(
                           pathFile.getParentFile());
            loadExternalSchemaTransformer.transform(
                    databaseElement,
                    controllerState);

            SourceElement allTablesRoot
                = databaseElement.getChild(DatabaseChildElementName.ALL_TABLES);
View Full Code Here

TOP

Related Classes of org.apache.torque.generator.source.transform.SourceTransformer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.