1 16 package org.apache.commons.betwixt; 17 18 27 public class NodeDescriptor extends Descriptor { 28 29 30 private String localName; 31 32 private String qualifiedName; 33 34 private String uri = ""; 35 36 37 public NodeDescriptor() { 38 } 39 40 46 public NodeDescriptor(String localName) { 47 this.localName = localName; 48 this.qualifiedName = localName; 49 } 50 51 52 58 public NodeDescriptor(String localName, String qualifiedName, String uri) { 59 this.localName = localName; 60 this.qualifiedName = qualifiedName; 61 this.uri = uri; 62 } 63 64 68 public String getLocalName() { 69 return localName; 70 } 71 72 76 public void setLocalName(String localName) { 77 this.localName = localName; 78 } 79 80 84 public String getQualifiedName() { 85 if ( qualifiedName == null ) { 86 qualifiedName = localName; 87 } 88 return qualifiedName; 89 } 90 91 95 public void setQualifiedName(String qualifiedName) { 96 this.qualifiedName = qualifiedName; 97 } 98 99 104 public String getURI() { 105 return uri; 106 } 107 108 109 113 public void setURI(String uri) { 114 if ( uri == null ) { 115 throw new IllegalArgumentException ( 116 "The namespace URI cannot be null. " 117 + "No namespace URI is specified with the empty string" 118 ); 119 } 120 this.uri = uri; 121 } 122 } 123 | Popular Tags |