public void addNamespaces(NamespaceMapping nsm) throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException { Map m = nsm.getPrefixToURIMapping(); for (Iterator i = m.entrySet().iterator(); i.hasNext();) { Map.Entry e = (Map.Entry) i.next(); String prefix = (String) e.getKey(); String uri = (String) e.getValue(); registry.registerNamespace(prefix, uri); } }
/** * This default implementation first calls {@link #checkSessionInfo(SessionInfo)} * with the <code>sessionInfo</code>, then returns the prefix to namespace * URL mapping that was provided in the constructor of this repository * service. */ public Map<String, String> getRegisteredNamespaces(SessionInfo sessionInfo) throws RepositoryException { checkSessionInfo(sessionInfo); return namespaces.getPrefixToURIMapping(); }
/** * This default implementation first calls {@link #checkSessionInfo(SessionInfo)} * with the <code>sessionInfo</code>, then returns the prefix to namespace * URL mapping that was provided in the constructor of this repository * service. */ public Map<String, String> getRegisteredNamespaces(SessionInfo sessionInfo) throws RepositoryException { checkSessionInfo(sessionInfo); return namespaces.getPrefixToURIMapping(); }
public void addNamespaces(NamespaceMapping nsm) throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException { Map m = nsm.getPrefixToURIMapping(); for (Iterator i = m.entrySet().iterator(); i.hasNext();) { Map.Entry e = (Map.Entry) i.next(); String prefix = (String) e.getKey(); String uri = (String) e.getValue(); registry.registerNamespace(prefix, uri); } }
public void addNamespaces(NamespaceMapping nsm) throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException { Map m = nsm.getPrefixToURIMapping(); for (Iterator i = m.values().iterator(); i.hasNext();) { Map.Entry e = (Map.Entry) i.next(); String prefix = (String) e.getKey(); String uri = (String) e.getKey(); registry.registerNamespace(prefix, uri); } }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof NamespaceMapping) { NamespaceMapping other = (NamespaceMapping) obj; return this.getPrefixToURIMapping().equals(other.getPrefixToURIMapping()) && this.getURIToPrefixMapping().equals(other.getURIToPrefixMapping()); } return false; }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof NamespaceMapping) { NamespaceMapping other = (NamespaceMapping) obj; return this.getPrefixToURIMapping().equals(other.getPrefixToURIMapping()) && this.getURIToPrefixMapping().equals(other.getURIToPrefixMapping()); } return false; }
/** * Override equals() * * @param obj * @return boolean */ public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof NamespaceMapping) { NamespaceMapping other = (NamespaceMapping) obj; return this.getPrefixToURIMapping().equals(other.getPrefixToURIMapping()) && this.getURIToPrefixMapping().equals(other.getURIToPrefixMapping()); } return false; }
private void add(NamespaceMapping mapping) { for (Object o : mapping.getPrefixToURIMapping().keySet()) { try { String pfx = (String) o; String uri = mapping.getURI(pfx); nsMapping.setMapping(pfx, uri); } catch (NamespaceException e) { throw new IllegalStateException("Error while transferring mappings.", e); } } }
new QDefinitionBuilderFactory()); namespaceMap.putAll(mapping.getPrefixToURIMapping()); for (QNodeTypeDefinition ntDef: reader.getNodeTypeDefinitions()) { nodeTypeDefs.add(ntDef);
new QDefinitionBuilderFactory()); namespaceMap.putAll(mapping.getPrefixToURIMapping()); for (QNodeTypeDefinition ntDef: reader.getNodeTypeDefinitions()) { nodeTypeDefs.add(ntDef);
nsHelper.registerNamespaces(set.getNamespaceMapping().getPrefixToURIMapping());
nsHelper.registerNamespaces(defs.getNamespaceMapping().getPrefixToURIMapping());