Examples of MapLoader


Examples of org.apache.cayenne.map.MapLoader

    }

    /** Loads and returns DataMap based on <code>map</code> attribute. */
    protected DataMap loadDataMap() throws Exception {
        InputSource in = new InputSource(map.getCanonicalPath());
        return new MapLoader().loadDataMap(in);
    }
View Full Code Here

Examples of org.apache.cayenne.map.MapLoader

            InputStream in = url.openStream();

            try {
                InputSource inSrc = new InputSource(in);
                inSrc.setSystemId(dataMapFile.getAbsolutePath());
                newMap = new MapLoader().loadDataMap(inSrc);
            }
            finally {
                try {
                    in.close();
                }
View Full Code Here

Examples of org.apache.cayenne.map.MapLoader

    private File[] additionalDataMapFiles;
    private DataMap mainDataMap;

    DataMap getMainDataMap() throws MalformedURLException {
        if (mainDataMap == null) {
            MapLoader mapLoader = new MapLoader();

            DataMap mainDataMap = loadDataMap(mapLoader, mainDataMapFile);

            if (additionalDataMapFiles != null) {
View Full Code Here

Examples of org.apache.cayenne.map.MapLoader

        DataMap dataMap;

        if (dataMapFile.exists()) {
            InputSource in = new InputSource(dataMapFile.getCanonicalPath());
            dataMap = new MapLoader().loadDataMap(in);

            if (parameters.isOverwrite()) {
                dataMap.clearObjEntities();
                dataMap.clearEmbeddables();
                dataMap.clearProcedures();
View Full Code Here

Examples of org.apache.cayenne.map.MapLoader

    }

    /** Loads and returns DataMap based on <code>map</code> attribute. */
    protected DataMap loadDataMap() throws Exception {
        InputSource in = new InputSource(map.getCanonicalPath());
        return new MapLoader().loadDataMap(in);
    }
View Full Code Here

Examples of org.apache.cayenne.map.MapLoader

            return;
        }

        try {
            // configure resource locator to take absolute path
            MapLoader mapLoader = new MapLoader() {

                protected ResourceLocator configLocator() {
                    ResourceLocator locator = new ResourceLocator();
                    locator.setSkipAbsolutePath(false);
                    locator.setSkipClasspath(true);
                    locator.setSkipCurrentDirectory(true);
                    locator.setSkipHomeDirectory(true);
                    return locator;
                }
            };

            DataMap newMap = mapLoader.loadDataMap(dataMapFile.getAbsolutePath());
            DataDomain domain = getProjectController().getCurrentDataDomain();

            if (newMap.getName() != null) {
                newMap.setName(NamedObjectFactory.createName(
                        DataMap.class,
View Full Code Here

Examples of org.apache.cayenne.map.MapLoader

    }

    /** Loads and returns DataMap based on <code>map</code> attribute. */
    protected DataMap loadDataMap() throws Exception {
        InputSource in = new InputSource(map.getCanonicalPath());
        return new MapLoader().loadDataMap(in);
    }
View Full Code Here

Examples of org.apache.cayenne.map.MapLoader

    }

    /** Loads and returns DataMap based on <code>map</code> attribute. */
    protected DataMap loadDataMap() throws Exception {
        final InputSource in = new InputSource(mapFile.getCanonicalPath());
        return new MapLoader().loadDataMap(in);
    }
View Full Code Here

Examples of org.apache.cayenne.map.MapLoader

    }

        /** Loads and returns DataMap based on <code>map</code> attribute. */
    protected DataMap loadDataMap() throws Exception {
        InputSource in = new InputSource(map.getCanonicalPath());
        return new MapLoader().loadDataMap(in);
    }
View Full Code Here

Examples of org.apache.cayenne.map.MapLoader

            return;
        }

        try {
            // configure resource locator to take absolute path
            MapLoader mapLoader = new MapLoader() {

                protected ResourceLocator configLocator() {
                    ResourceLocator locator = new ResourceLocator();
                    locator.setSkipAbsolutePath(false);
                    locator.setSkipClasspath(true);
                    locator.setSkipCurrentDirectory(true);
                    locator.setSkipHomeDirectory(true);
                    return locator;
                }
            };

            DataMap newMap = mapLoader.loadDataMap(dataMapFile.getAbsolutePath());
            DataDomain domain = getProjectController().getCurrentDataDomain();

            if (newMap.getName() != null) {
                newMap.setName(NamedObjectFactory.createName(
                        DataMap.class,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.