예제 #1
0
 public String initArray(Element element) {
   StringBuilder sb = new StringBuilder();
   if (isArray(element.getMaxOccurs())) {
     sb.append(" = new ");
     sb.append(mapper.getJavaClassName(element.getType(), types, false));
     sb.append("[0]");
   }
   return sb.toString();
 }
예제 #2
0
 public String loadType(Element element) {
   if (!laxMinOccursMode && element.getMinOccurs() == 1) {
     return "verifyElement";
   } else {
     return "isElement";
   }
 }
예제 #3
0
 public String typeInfo(Element element) {
   String tns = element.getSchema().getTargetNamespace();
   String name = element.getName();
   String typeNs = element.getType().getNamespaceURI();
   String type = element.getType().getLocalPart();
   int minOcc = element.getMinOccurs();
   int maxOcc = element.getMaxOccurs();
   boolean formQualified = element.getSchema().isElementFormQualified();
   return "\""
       + tns
       + "\",\""
       + name
       + "\",\""
       + typeNs
       + "\",\""
       + type
       + "\","
       + minOcc
       + ","
       + maxOcc
       + ","
       + formQualified;
 }
예제 #4
0
 public String fieldName(Element element) {
   return NameMapper.getFieldName(element.getName());
 }
예제 #5
0
 public String javaType(Element element) {
   QName type = element.getType();
   return localJavaType(type, element.getMaxOccurs(), element.isNillable());
 }
예제 #6
0
 public String elementDoc(Element element) {
   return element.getName() + " of type " + element.getType();
 }
예제 #7
0
 public String setMethod(Element element) {
   return "set" + NameMapper.getMethodName(element.getName());
 }
예제 #8
0
 public String booleanGetMethod(Element element) {
   return "is" + NameMapper.getMethodName(element.getName());
 }