/** * Returns the prefixes of all known namespace mappings. All global * mappings not already included in the local set of namespace mappings * are added there. * <p> * This behaviour is based on JSR 283 (JCR 2.0), but remains backwards * compatible with JCR 1.0. * * @return namespace prefixes * @throws RepositoryException if a repository error occurs */ public String[] getNamespacePrefixes() throws RepositoryException { for (String uri : getWorkspace().getNamespaceRegistry().getURIs()) { getNamespacePrefix(uri); } synchronized (namespaces) { return namespaces.keySet().toArray(new String[namespaces.size()]); } }
/** * Returns the prefixes of all known namespace mappings. All global * mappings not already included in the local set of namespace mappings * are added there. * <p> * This behaviour is based on JSR 283 (JCR 2.0), but remains backwards * compatible with JCR 1.0. * * @return namespace prefixes * @throws RepositoryException if a repository error occurs */ public String[] getNamespacePrefixes() throws RepositoryException { for (String uri : getWorkspace().getNamespaceRegistry().getURIs()) { getNamespacePrefix(uri); } synchronized (namespaces) { return namespaces.keySet().toArray(new String[namespaces.size()]); } }
/** * Returns the prefixes of all known namespace mappings. All global * mappings not already included in the local set of namespace mappings * are added there. * <p> * This behaviour is based on JSR 283 (JCR 2.0), but remains backwards * compatible with JCR 1.0. * * @return namespace prefixes * @throws RepositoryException if a repository error occurs */ public String[] getNamespacePrefixes() throws RepositoryException { for (String uri : getWorkspace().getNamespaceRegistry().getURIs()) { getNamespacePrefix(uri); } synchronized (namespaces) { return namespaces.keySet().toArray(new String[namespaces.size()]); } }