Package org.apache.cayenne.map

Examples of org.apache.cayenne.map.MapLoader


            getStatus().addFailedMap(mapName, location, "map location not found");
            return null;
        }

        try {
            DataMap map = new MapLoader().loadDataMap(new InputSource(mapIn));

            logObj.info("loaded <map name='"
                    + mapName
                    + "' location='"
                    + location
View Full Code Here


    protected MapLoader getMapLoader() {
        // it is worth caching the map loader, as it precompiles some XML operations
        // starting from release 3.0
        if (mapLoader == null) {
            mapLoader = new MapLoader();
        }

        return mapLoader;
    }
View Full Code Here

   
    /** Loads and returns a DataMap by File. */
    public DataMap loadDataMap(File mapName) throws Exception {
        InputSource in = new InputSource(mapName.toURL().toString());
        if(mapLoader == null) {
            mapLoader = new MapLoader();
        }
        return mapLoader.loadDataMap(in);
    }
View Full Code Here

    }

    /** 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

     */
    protected void postInitialize(File projectFile) {
        if (projectFile != null) {
            try {
                InputStream in = new FileInputStream(projectFile.getCanonicalFile());
                map = new MapLoader().loadDataMap(new InputSource(in));

                String fileName = resolveSymbolicName(projectFile);
                String mapName = (fileName != null && fileName
                        .endsWith(DataMapFile.LOCATION_SUFFIX))
                        ? fileName.substring(0, fileName.length()
View Full Code Here

    }

    /** Loads and returns a DataMap by File. */
    protected DataMap loadDataMap(File mapName) throws Exception {
        InputSource in = new InputSource(mapName.getCanonicalPath());
        return new MapLoader().loadDataMap(in);
    }
View Full Code Here

    }

    /** 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

    }

    /** 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

            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

    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

TOP

Related Classes of org.apache.cayenne.map.MapLoader

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.