Package org.geoserver.template

Examples of org.geoserver.template.GeoServerTemplateLoader


    private void writeDescription(SimpleFeature feature,
            final SimpleFeatureType schema) throws IOException {
        if (vectorNameDescription) {
            // descriptions are "templatable" by users, so see if there is a
            // template available for use
            GeoServerTemplateLoader templateLoader = new GeoServerTemplateLoader(
                    getClass());
            templateLoader.setFeatureType(schema);

            Template template = null;

            // Configuration is not thread safe
            synchronized (templateConfig) {
View Full Code Here


     * @throws IOException if the template can't be loaded
     */
    Template getTemplate(SimpleFeatureType featureType, String templateFileName, Charset charset) throws IOException {
        // setup template subsystem
        if(templateLoader == null) {
            templateLoader = new GeoServerTemplateLoader(getClass());
        }
       
        if(featureType != null) {
            final Name name = featureType.getName();
            final WMS wms = getRequest().getWMS();
View Full Code Here

    public void write(Object value, OutputStream output, Operation operation)
        throws IOException, ServiceException {
        FeatureDiffReader[] diffReaders = (FeatureDiffReader[]) value;

        // setup template subsystem
        GeoServerTemplateLoader templateLoader = new GeoServerTemplateLoader(getClass());
        templateLoader.setFeatureType(diffReaders[0].getSchema());

        Template template = null;

        synchronized (templateConfig) {
            templateConfig.setTemplateLoader(templateLoader);
View Full Code Here

        throws IOException, ServiceException {
        FeatureCollectionType fct = (FeatureCollectionType) value;
        FeatureCollection<SimpleFeatureType, SimpleFeature> fc = (FeatureCollection) fct.getFeature().get(0);

        // setup template subsystem
        GeoServerTemplateLoader templateLoader = new GeoServerTemplateLoader(getClass());
        templateLoader.setFeatureType(fc.getSchema());

        Template template = null;

        synchronized (templateConfig) {
            templateConfig.setTemplateLoader(templateLoader);
View Full Code Here

        t = (Template) templateCache.get(key);
        if(t != null)
            return t;
       
        // otherwise, build a loader and do the lookup
        GeoServerTemplateLoader templateLoader =
            new GeoServerTemplateLoader(lookup!=null?lookup:getClass());
        templateLoader.setFeatureType(featureType);

        //Configuration is not thread safe
        synchronized (templateConfig) {
            templateConfig.setTemplateLoader(templateLoader);
            t = templateConfig.getTemplate(template);
View Full Code Here

        throws IOException, ServiceException {
        FeatureCollectionType fct = (FeatureCollectionType) value;
        SimpleFeatureCollection fc = (SimpleFeatureCollection) fct.getFeature().get(0);

        // setup template subsystem
        GeoServerTemplateLoader templateLoader = new GeoServerTemplateLoader(getClass());
        templateLoader.setFeatureType(fc.getSchema());

        Template template = null;

        synchronized (templateConfig) {
            templateConfig.setTemplateLoader(templateLoader);
View Full Code Here

     */
    Template getTemplate(SimpleFeatureType featureType, String templateFileName, Charset charset)
            throws IOException {
        // setup template subsystem
        if (templateLoader == null) {
            templateLoader = new GeoServerTemplateLoader(getClass());
        }

        if (featureType != null) {
            final Name name = featureType.getName();

View Full Code Here

        t = (Template) templateCache.get(key);
        if(t != null)
            return t;
       
        // otherwise, build a loader and do the lookup
        GeoServerTemplateLoader templateLoader =
            new GeoServerTemplateLoader(lookup!=null?lookup:getClass());
        templateLoader.setFeatureType(featureType);

        //Configuration is not thread safe
        synchronized (templateConfig) {
            templateConfig.setTemplateLoader(templateLoader);
            t = templateConfig.getTemplate(template);
View Full Code Here

        }
       
        private Properties processTemplate(FeatureTypeInfo ftInfo, String geometryType) {
            try {
                // setup template subsystem
                GeoServerTemplateLoader templateLoader = new GeoServerTemplateLoader(clazz);
                templateLoader.setFeatureType(ftInfo);
   
                // load the template
                Template template = null;
                synchronized (templateConfig) {
                    templateConfig.setTemplateLoader(templateLoader);
View Full Code Here

        }
       
        private Properties processTemplate(FeatureTypeInfo ftInfo, String geometryType) {
            try {
                // setup template subsystem
                GeoServerTemplateLoader templateLoader = new GeoServerTemplateLoader(clazz);
                templateLoader.setFeatureType(ftInfo);
   
                // load the template
                Template template = null;
                synchronized (templateConfig) {
                    templateConfig.setTemplateLoader(templateLoader);
View Full Code Here

TOP

Related Classes of org.geoserver.template.GeoServerTemplateLoader

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.