1 19 package org.enhydra.zeus.binding; 20 21 import java.util.BitSet ; 23 import java.util.Vector ; 24 25 42 public class AtomicProperty extends BaseProperty { 43 44 45 private static BitSet DEFAULT_MODIFIER = new BitSet (); 46 47 static { 48 DEFAULT_MODIFIER.set(Property.ACCESS_PRIVATE); 49 } 50 51 75 public AtomicProperty(String xmlName, 76 String xmlNamespaceURI, 77 String xmlType, 78 String xmlTypeNamespaceURI, 79 BitSet modifier, 80 Vector enumeration, 81 Object defaultValue) { 82 super(); 83 84 if (xmlName == null) { 86 throw new IllegalArgumentException ("An AtomicProperty cannot " + 87 "have a null XML name."); 88 } 89 if (xmlNamespaceURI == null) { 90 throw new IllegalArgumentException ("An AtomicProperty cannot " + 91 "have a null XML namespace URI. To specify no namespace URI, " + 92 "use the empty String (\"\")"); 93 } 94 if (xmlType == null) { 95 throw new IllegalArgumentException ("An AtomicProperty cannot " + 96 "have a null XML type."); 97 } 98 if (xmlTypeNamespaceURI == null) { 99 throw new IllegalArgumentException ("An AtomicProperty cannot " + 100 "have a null XML type namespace URI. To specify no namespace " + 101 "URI, use the empty String (\"\")"); 102 } 103 if (modifier == null) { 104 throw new IllegalArgumentException ("A Binding cannot have a " + 105 "null set of modifiers."); 106 } 107 108 this.xmlName = xmlName; 109 this.xmlNamespaceURI = xmlNamespaceURI; 110 this.xmlType = xmlType; 111 this.xmlTypeNamespaceURI = xmlTypeNamespaceURI; 112 this.modifier = modifier; 113 this.enumeration = enumeration; 114 this.defaultValue = defaultValue; 115 } 116 117 138 public AtomicProperty(String xmlName, 139 String xmlNamespaceURI, 140 String xmlType, 141 String xmlTypeNamespaceURI) { 142 this(xmlName, xmlNamespaceURI, xmlType, xmlTypeNamespaceURI, 143 DEFAULT_MODIFIER, null, null); 144 } 145 146 164 public AtomicProperty(String xmlName, 165 String xmlType) { 166 this(xmlName, "", xmlType, "", 167 DEFAULT_MODIFIER, null, null); 168 } 169 } 170 | Popular Tags |