298 throw new UnsupportedOperationException(); 299 } 300 301 @Override 302 public Object getProperty(final String name) throws IllegalArgumentException { 303 //TODO the following line is to make eclipselink happy ... they are aware of this problem - 304 if (javax.xml.stream.XMLOutputFactory.IS_REPAIRING_NAMESPACES.equals(name)) return Boolean.FALSE; 305 return null; 306 } 307 308 @Override 309 public NamespaceContext getNamespaceContext() { 310 return new NamespaceContext() { 311 public String getNamespaceURI(final String prefix) { 312 return currentElement.getNamespaceURI(prefix); 313 } 314 public String getPrefix(final String namespaceURI) { 315 return currentElement.lookupPrefix(namespaceURI); 316 } 317 public Iterator getPrefixes(final String namespaceURI) { 318 return new Iterator() { 319 String prefix = getPrefix(namespaceURI); 320 public boolean hasNext() { 321 return (prefix != null); 322 } 323 public Object next() { 324 if (!hasNext()) throw new java.util.NoSuchElementException(); 325 String next = prefix; 326 prefix = null; 327 return next; 328 } 329 public void remove() {} 330 }; 331 } 332 }; 333 } 334 } | 298 throw new UnsupportedOperationException(); 299 } 300 301 @Override 302 public Object getProperty(final String name) throws IllegalArgumentException { 303 //TODO the following line is to make eclipselink happy ... they are aware of this problem - 304 if (javax.xml.stream.XMLOutputFactory.IS_REPAIRING_NAMESPACES.equals(name)) return Boolean.FALSE; 305 return null; 306 } 307 308 @Override 309 public NamespaceContext getNamespaceContext() { 310 return new NamespaceContext() { 311 public String getNamespaceURI(final String prefix) { 312 return currentElement.getNamespaceURI(prefix); 313 } 314 public String getPrefix(final String namespaceURI) { 315 return currentElement.lookupPrefix(namespaceURI); 316 } 317 public Iterator getPrefixes(final String namespaceURI) { 318 return new Iterator<String>() { 319 String prefix = getPrefix(namespaceURI); 320 public boolean hasNext() { 321 return (prefix != null); 322 } 323 public String next() { 324 if (!hasNext()) throw new java.util.NoSuchElementException(); 325 String next = prefix; 326 prefix = null; 327 return next; 328 } 329 public void remove() {} 330 }; 331 } 332 }; 333 } 334 } |