1 package gboat2.base.bridge.util.xml;
2
3 import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
4
5
6
7
8
9
10
11
12 class NamespacePrefixMapperImpl extends NamespacePrefixMapper {
13
14 @Override
15 public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {
16 if ("http://www.w3.org/2001/XMLSchema-instance".equals(namespaceUri))
17 return "xsi";
18
19 if ("http://i2b2.mgh.harvard.edu/message".equals(namespaceUri))
20 return "i2b2";
21
22 return suggestion;
23 }
24
25 @Override
26 public String[] getPreDeclaredNamespaceUris() {
27 return new String[] {};
28 }
29 }