equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
50 * Set the name attribute. |
50 * Set the name attribute. |
51 * @param name The name attribute value. |
51 * @param name The name attribute value. |
52 */ |
52 */ |
53 public void setName(String name) { |
53 public void setName(String name) { |
54 CatalogMessages.reportNPEOnNull("name", name); |
54 CatalogMessages.reportNPEOnNull("name", name); |
55 this.name = Normalizer.normalizeURI(name); |
55 if (name.startsWith(Util.PUBLICID_PREFIX) || name.startsWith(Util.PUBLICID_PREFIX_ALT)) { |
|
56 this.name = Normalizer.normalizePublicId(name); |
|
57 } else { |
|
58 this.name = Normalizer.normalizeURI(name); |
|
59 } |
56 } |
60 } |
57 |
61 |
58 /** |
62 /** |
59 * Set the uri attribute. If the value of the uri attribute is relative, it |
63 * Set the uri attribute. If the value of the uri attribute is relative, it |
60 * must be made absolute with respect to the base URI currently in effect. |
64 * must be made absolute with respect to the base URI currently in effect. |
70 * @return The name |
74 * @return The name |
71 */ |
75 */ |
72 public String getName() { |
76 public String getName() { |
73 return name; |
77 return name; |
74 } |
78 } |
|
79 |
75 /** |
80 /** |
76 * Get the uri attribute. |
81 * Get the uri attribute. |
77 * @return The uri attribute value. |
82 * @return The uri attribute value. |
78 */ |
83 */ |
79 public URL getURI() { |
84 public URL getURI() { |