Package org.apache.ws.jaxme.generator.sg

Examples of org.apache.ws.jaxme.generator.sg.SimpleTypeSG


    SchemaSG jschema = parse(schema, "testNonPositiveInteger.xsd");

    // simple, atomic, with restriction and maxExclusive and maxInclusive
    TypeSG npi = jschema.getElements()[0].getTypeSG();
    assertTrue(!npi.isComplex());
    SimpleTypeSG npis = npi.getSimpleTypeSG();
    assertTrue(npis.isAtomic());
    assertTrue(!npis.isList());
    assertTrue(!npis.isUnion());
    assertEquals(new Long(0), npis.getAtomicType().getFractionDigits());
    assertEquals("0", npis.getAtomicType().getMaxInclusive());
    assertEquals("1", npis.getAtomicType().getMaxExclusive());
  }
View Full Code Here


    SchemaSG jschema = parse(schema, "testNegativeInteger.xsd");

    // simple, atomic, with restrictions on maxInclusive and MaxExclusive
    TypeSG ni = jschema.getElements()[0].getTypeSG();
    assertTrue(!ni.isComplex());
    SimpleTypeSG nis = ni.getSimpleTypeSG();
    assertTrue(nis.isAtomic());
    assertTrue(!nis.isList());
    assertTrue(!nis.isUnion());
    assertEquals(new Long(0), nis.getAtomicType().getFractionDigits());
    assertEquals("-1", nis.getAtomicType().getMaxInclusive());
    assertEquals("0", nis.getAtomicType().getMaxExclusive());
  }
View Full Code Here

    SchemaSG jschema = parse(schema, "testNonNegativeIntegerType.xsd");

    // simple, atomic, with restriction on minInclusive and minExclusive
    TypeSG nni = jschema.getElements()[0].getTypeSG();
    assertTrue(!nni.isComplex());
    SimpleTypeSG nnis = nni.getSimpleTypeSG();
    assertTrue(nnis.isAtomic());
    assertTrue(!nnis.isList());
    assertTrue(!nnis.isUnion());
    assertEquals(new Long(0), nnis.getAtomicType().getFractionDigits());
    assertEquals("-1", nnis.getAtomicType().getMinExclusive());
    assertEquals("0", nnis.getAtomicType().getMinInclusive());
  }
View Full Code Here

    SchemaSG jschema = parse(schema, "testPositiveIntegerType.xsd");

    // simple, atomic, with restriction on minInclusive and minExclusive
    TypeSG pi = jschema.getElements()[0].getTypeSG();
    assertTrue(!pi.isComplex());
    SimpleTypeSG pis = pi.getSimpleTypeSG();
    assertTrue(pis.isAtomic());
    assertTrue(!pis.isList());
    assertTrue(!pis.isUnion());
    assertEquals(new Long(0), pis.getAtomicType().getFractionDigits());
    assertEquals("0", pis.getAtomicType().getMinExclusive());
    assertEquals("1", pis.getAtomicType().getMinInclusive());
  }
View Full Code Here

    // simple, atomic, with restriction on fractionDigits
    ObjectSG[] elements = jschema.getElements();
    TypeSG i = elements[0].getTypeSG();
    assertTrue(!i.isComplex());
    SimpleTypeSG is = i.getSimpleTypeSG();
    assertTrue(is.isAtomic());
    assertTrue(!is.isList());
    assertTrue(!is.isUnion());
    assertEquals(JavaQNameImpl.getInstance(BigInteger.class), is.getRuntimeType());
    assertEquals(new Long(0), is.getAtomicType().getFractionDigits());
  }
View Full Code Here

    // list of one or more nmtoken's
    ObjectSG[] elements = jschema.getElements();
    assertEquals(1, elements.length);
    TypeSG nmts = elements[0].getTypeSG();
    assertTrue(!nmts.isComplex());
    SimpleTypeSG nmtss = nmts.getSimpleTypeSG();
    assertTrue(!nmtss.isAtomic());
    assertTrue(nmtss.isList());
    assertTrue(!nmtss.isUnion());
    ListTypeSG nmtsl = nmtss.getListType();
    assertEquals(new Long(1), nmtsl.getMinLength());
 
View Full Code Here

                }
                TypeSG type = pSchema.getType(simpleType.getRestrictedType().getName());
                runtimeType = type.getSimpleTypeSG().getRuntimeType();
                result = newAtomicTypeRestriction(pController, pFactory, pSchema, pType);
            } else {
                SimpleTypeSG simpleTypeSG = new SimpleTypeSGImpl(result);
                simpleTypeSG.init();
              runtimeType = simpleTypeSG.getRuntimeType();
            }
            if (javaType == null) {
                JAXBJavaType[] globalJavaTypes = pSchema.getJAXBJavaTypes();
                for (int i = 0;  i < globalJavaTypes.length;  i++) {
                  if (runtimeType.equals(globalJavaTypes[i].getName())) {
View Full Code Here

      }
    }
  }
  public void forAllValues(PropertySG pController, JavaMethod pMethod,
               DirectAccessible pElement, SGlet pSGlet) throws SAXException {
    SimpleTypeSG simpleTypeSG = typeSG.getSimpleTypeSG();
    simpleTypeSG.forAllValues(pMethod, pController.getValue(pElement), pSGlet);
  }
View Full Code Here

      }
    }
  }
  public void forAllValues(PropertySG pController, JavaMethod pMethod,
               DirectAccessible pElement, SGlet pSGlet) throws SAXException {
    SimpleTypeSG simpleTypeSG = typeSG.getSimpleTypeSG();
    simpleTypeSG.forAllValues(pMethod, pController.getValue(pElement), pSGlet);
  }
View Full Code Here

      }
    }
  }
  public void forAllValues(PropertySG pController, JavaMethod pMethod,
               DirectAccessible pElement, SGlet pSGlet) throws SAXException {
    SimpleTypeSG simpleTypeSG = typeSG.getSimpleTypeSG();
    simpleTypeSG.forAllValues(pMethod, pController.getValue(pElement), pSGlet);
  }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.generator.sg.SimpleTypeSG

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.