Examples of registerNamespace()


Examples of com.adobe.xmp.XMPSchemaRegistry.registerNamespace()

        XMPSchemaRegistry registry = XMPMetaFactory.getSchemaRegistry();

        for (Namespace namespace : namespaces) {
            // Any already registered namespace is not registered again
            try {
                registry.registerNamespace( namespace.uri, namespace.prefix );
            }
            catch (XMPException e) {
                throw new TikaException(
                        "Namespace needed by converter could not be registiered with XMPCore", e );
            }
View Full Code Here

Examples of com.itextpdf.xmp.XMPSchemaRegistry.registerNamespace()

     
      String prefix = registry.getNamespacePrefix(namespace);
      if (prefix == null)
      {
        prefix = xmlNode.getPrefix() != null ? xmlNode.getPrefix() : DEFAULT_PREFIX;
        prefix = registry.registerNamespace(namespace, prefix);
      }
      childName = prefix + xmlNode.getLocalName();
    }
    else
    {
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.registerNamespace()

    public void registerNamespace(SessionInfo sessionInfo,
                                  String prefix,
                                  String uri) throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException {
        Session session = getSessionInfoImpl(sessionInfo).getSession();
        NamespaceRegistry nsReg = session.getWorkspace().getNamespaceRegistry();
        nsReg.registerNamespace(prefix, uri);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.registerNamespace()

            try {
                // dummy namespace registrations to make sure sling JCR resolver
                // does not get mixed up with the prefixes
                NamespaceRegistry namespaceRegistry = resolver.adaptTo(Session.class).getWorkspace()
                        .getNamespaceRegistry();
                namespaceRegistry.registerNamespace("sling", "http://mock/sling");
                namespaceRegistry.registerNamespace("app", "http://mock/app");
                namespaceRegistry.registerNamespace("dam", "http://mock/dam");
            } catch (RepositoryException ex) {
                throw new RuntimeException("Unable to register namespaces.", ex);
            }
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.registerNamespace()

                // dummy namespace registrations to make sure sling JCR resolver
                // does not get mixed up with the prefixes
                NamespaceRegistry namespaceRegistry = resolver.adaptTo(Session.class).getWorkspace()
                        .getNamespaceRegistry();
                namespaceRegistry.registerNamespace("sling", "http://mock/sling");
                namespaceRegistry.registerNamespace("app", "http://mock/app");
                namespaceRegistry.registerNamespace("dam", "http://mock/dam");
            } catch (RepositoryException ex) {
                throw new RuntimeException("Unable to register namespaces.", ex);
            }
        }
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.registerNamespace()

                // does not get mixed up with the prefixes
                NamespaceRegistry namespaceRegistry = resolver.adaptTo(Session.class).getWorkspace()
                        .getNamespaceRegistry();
                namespaceRegistry.registerNamespace("sling", "http://mock/sling");
                namespaceRegistry.registerNamespace("app", "http://mock/app");
                namespaceRegistry.registerNamespace("dam", "http://mock/dam");
            } catch (RepositoryException ex) {
                throw new RuntimeException("Unable to register namespaces.", ex);
            }
        }
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.registerNamespace()

    private static void initializeJcrMock(ResourceResolverFactory factory) throws RepositoryException, LoginException {
        // register default namespaces
        ResourceResolver resolver = factory.getResourceResolver(null);
        Session session = resolver.adaptTo(Session.class);
        NamespaceRegistry namespaceRegistry = session.getWorkspace().getNamespaceRegistry();
        namespaceRegistry.registerNamespace("sling", "http://sling.apache.org/jcr/sling/1.0");
    }

    private static void initializeJcrJackrabbit(ResourceResolverFactory factory) {
        // register sling node types?
    }
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.registerNamespace()

            try {
                // dummy namespace registrations to make sure sling JCR resolver
                // does not get mixed up with the prefixes
                NamespaceRegistry namespaceRegistry = resolver.adaptTo(Session.class).getWorkspace()
                        .getNamespaceRegistry();
                namespaceRegistry.registerNamespace("sling", "http://mock/sling");
                namespaceRegistry.registerNamespace("app", "http://mock/app");
                namespaceRegistry.registerNamespace("dam", "http://mock/dam");
            } catch (RepositoryException ex) {
                throw new RuntimeException("Unable to register namespaces.", ex);
            }
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.registerNamespace()

                // dummy namespace registrations to make sure sling JCR resolver
                // does not get mixed up with the prefixes
                NamespaceRegistry namespaceRegistry = resolver.adaptTo(Session.class).getWorkspace()
                        .getNamespaceRegistry();
                namespaceRegistry.registerNamespace("sling", "http://mock/sling");
                namespaceRegistry.registerNamespace("app", "http://mock/app");
                namespaceRegistry.registerNamespace("dam", "http://mock/dam");
            } catch (RepositoryException ex) {
                throw new RuntimeException("Unable to register namespaces.", ex);
            }
        }
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.registerNamespace()

                // does not get mixed up with the prefixes
                NamespaceRegistry namespaceRegistry = resolver.adaptTo(Session.class).getWorkspace()
                        .getNamespaceRegistry();
                namespaceRegistry.registerNamespace("sling", "http://mock/sling");
                namespaceRegistry.registerNamespace("app", "http://mock/app");
                namespaceRegistry.registerNamespace("dam", "http://mock/dam");
            } catch (RepositoryException ex) {
                throw new RuntimeException("Unable to register namespaces.", ex);
            }
        }
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.