1 17 package org.apache.ws.jaxme.xs.jaxb.impl; 18 19 import org.apache.ws.jaxme.xs.jaxb.JAXBJavaType; 20 import org.apache.ws.jaxme.xs.jaxb.JAXBJavadoc; 21 import org.apache.ws.jaxme.xs.jaxb.JAXBProperty; 22 import org.apache.ws.jaxme.xs.jaxb.JAXBXsObjectFactory; 23 import org.apache.ws.jaxme.xs.xml.XsObject; 24 25 26 31 public class JAXBPropertyImpl extends JAXBXsObjectImpl implements JAXBProperty { 32 public static class BaseTypeImpl extends JAXBXsObjectImpl implements JAXBProperty.BaseType { 33 35 protected BaseTypeImpl(XsObject pParent) { 36 super(pParent); 37 } 38 39 private JAXBJavaType javaType; 40 41 public JAXBJavaType createJavaType() { 42 if (javaType != null) { 43 throw new IllegalStateException ("Only one instance of javaType supported."); 44 } 45 javaType = ((JAXBXsObjectFactory) getObjectFactory()).newJAXBJavaType(this); 46 return javaType; 47 } 48 49 public JAXBJavaType getJavaType() { 50 return javaType; 51 } 52 } 53 54 private String name; 55 private String collectionType; 56 private Boolean fixedAttributeAsConstantProperty, generateIsSetMethod, enableFailFastCheck; 57 private JAXBJavadoc javadoc; 58 private BaseType baseType; 59 60 62 protected JAXBPropertyImpl(XsObject pParent) { 63 super(pParent); 64 } 65 66 public void setName(String pName) { 67 name = pName; 68 } 69 70 public String getName() { 71 return name; 72 } 73 74 public void setCollectionType(String pType) throws ClassNotFoundException { 75 collectionType = pType; 76 } 77 78 public String getCollectionType() { return collectionType; } 79 80 public void setFixedAttributeAsConstantProperty(Boolean pFixedAttributeAsConstantProperty) { 81 fixedAttributeAsConstantProperty = pFixedAttributeAsConstantProperty; 82 } 83 84 public Boolean isFixedAttributeAsConstantProperty() { 85 return fixedAttributeAsConstantProperty; 86 } 87 88 public void setGenerateIsSetMethod(Boolean pGenerateIsSetMethod) { 89 generateIsSetMethod = pGenerateIsSetMethod; 90 } 91 92 public Boolean isGenerateIsSetMethod() { 93 return generateIsSetMethod; 94 } 95 96 public void setEnableFailFastCheck(Boolean pEnableFailFastCheck) { 97 enableFailFastCheck = pEnableFailFastCheck; 98 } 99 100 public Boolean isEnableFailFastCheck() { 101 return enableFailFastCheck; 102 } 103 104 public JAXBJavadoc createJavadoc() { 105 if (javadoc != null) { 106 throw new IllegalStateException ("Multiple javadoc elements are not supported."); 107 } 108 javadoc = getJAXBXsObjectFactory().newJAXBJavadoc(this); 109 return javadoc; 110 } 111 112 public JAXBJavadoc getJavadoc() { 113 return javadoc; 114 } 115 116 public BaseType createBaseType() { 117 if (baseType != null) { 118 throw new IllegalStateException ("Multiple instances of baseType are not supported."); 119 } 120 baseType = ((JAXBXsObjectFactory) getObjectFactory()).newBaseType(this); 121 return baseType; 122 } 123 124 public BaseType getBaseType() { 125 return baseType; 126 } 127 } 128 | Popular Tags |