Search in sources :

Example 1 with ExtNamespaceHandler

use of org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler in project aries by apache.

the class AbstractBlueprintTest method parse.

protected ComponentDefinitionRegistryImpl parse(String name) throws Exception {
    final URI extensionHandler = new URI("http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0");
    NamespaceHandlerSet handlers = new NamespaceHandlerSet() {

        public Set<URI> getNamespaces() {
            return null;
        }

        public NamespaceHandler getNamespaceHandler(URI namespace) {
            if (namespace.equals(extensionHandler)) {
                return new ExtNamespaceHandler();
            } else {
                return null;
            }
        }

        public void removeListener(NamespaceHandlerSet.Listener listener) {
        }

        public Schema getSchema() throws SAXException, IOException {
            return null;
        }

        public Schema getSchema(Map<String, String> locations) throws SAXException, IOException {
            return null;
        }

        public boolean isComplete() {
            return false;
        }

        public void addListener(NamespaceHandlerSet.Listener listener) {
        }

        public void destroy() {
        }
    };
    return parse(name, handlers);
}
Also used : NamespaceHandlerSet(org.apache.aries.blueprint.parser.NamespaceHandlerSet) URI(java.net.URI) ExtNamespaceHandler(org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler) Map(java.util.Map)

Aggregations

URI (java.net.URI)1 Map (java.util.Map)1 ExtNamespaceHandler (org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler)1 NamespaceHandlerSet (org.apache.aries.blueprint.parser.NamespaceHandlerSet)1