Examples of BindingLoader


Examples of org.geotools.xml.impl.BindingLoader

        MutablePicoContainer context = new DefaultPicoContainer();
        context = configuration.setupContext(context);

        //create the binding container
        Map bindings = configuration.setupBindings();
        BindingLoader bindingLoader = new BindingLoader(bindings);
//        MutablePicoContainer container = bindingLoader.getContainer();
//        container = configuration.setupBindings(container);
//        bindingLoader.setContainer(container);

        //register cmponents available to bindings at runtime
        context.registerComponentInstance(new BindingFactoryImpl(bindingLoader));

        //binding walker support
        context.registerComponentInstance(new BindingWalkerFactoryImpl(bindingLoader, context));

        //logger
        context.registerComponentInstance(logger);

        //setup the namespace support
        NamespaceSupport namespaces = new NamespaceSupport();
        HashMap mappings = new HashMap();

        try {
            for (Iterator d = configuration.getXSD().getDependencies().iterator(); d.hasNext();) {
                XSD xsd = (XSD) d.next();
                XSDSchema schema = xsd.getSchema();

                mappings.putAll(schema.getQNamePrefixToNamespaceMap());
            }

            mappings.putAll(configuration.getXSD().getSchema().getQNamePrefixToNamespaceMap());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }

        for (Iterator m = mappings.entrySet().iterator(); m.hasNext();) {
            Map.Entry mapping = (Map.Entry) m.next();
            String key = (String) mapping.getKey();

            if (key == null) {
                key = "";
            }

            namespaces.declarePrefix(key, (String) mapping.getValue());
        }

        context.registerComponentInstance(namespaces);
        context.registerComponentInstance(new NamespaceSupportWrapper(namespaces));
       
        SchemaIndex index = new SchemaIndexImpl( new XSDSchema[]{configuration.schema()} );
        context.registerComponentInstance(index);
       
        context.registerComponentInstance(configuration);
       
        return bindingLoader.loadBinding(name, context);
    }
View Full Code Here

Examples of org.geotools.xml.impl.BindingLoader

    public Encoder(Configuration configuration, XSDSchema schema) {
        this.schema = schema;

        index = new SchemaIndexImpl(new XSDSchema[] { schema });

        bindingLoader = new BindingLoader(configuration.setupBindings());
        bindingWalker = new BindingWalker(bindingLoader);

        //create the context
        context = new DefaultPicoContainer();
View Full Code Here

Examples of org.geotools.xml.impl.BindingLoader

        Map bindings = wfsConfiguration.setupBindings();
        if(mappedBindings != null) {
            bindings.putAll(mappedBindings);
        }
        BindingLoader bindingLoader = new BindingLoader(bindings);

        // create the document handler + root context
        // DocumentHandler docHandler =
        // handlerFactory.createDocumentHandler(this);
View Full Code Here

Examples of org.geotools.xml.impl.BindingLoader

        Map bindings = wfsConfiguration.setupBindings();
        if(mappedBindings != null) {
            bindings.putAll(mappedBindings);
        }
        BindingLoader bindingLoader = new BindingLoader(bindings);

        // create the document handler + root context
        // DocumentHandler docHandler =
        // handlerFactory.createDocumentHandler(this);
View Full Code Here

Examples of org.geotools.xml.impl.BindingLoader

     */
    public static SimpleFeatureType parse(Configuration configuration, XSDElementDeclaration elementDecl,
            CoordinateReferenceSystem crs) throws IOException {
       
        Map<?, ?> bindings = configuration.setupBindings();
        BindingLoader bindingLoader = new BindingLoader(bindings);

        // create the document handler + root context
        // DocumentHandler docHandler =
        // handlerFactory.createDocumentHandler(this);

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.