Package com.sun.xml.bind.v2.schemagen.xmlschema

Examples of com.sun.xml.bind.v2.schemagen.xmlschema.SimpleType


                    //
                    // <simpleType name="foo">
                    //   <xs:restriction base="xs:int"/>
                    // </>
                    ValuePropertyInfo<T,C> vp = (ValuePropertyInfo<T,C>)c.getProperties().get(0);
                    SimpleType st = ((SimpleTypeHost)parent).simpleType();
                    writeName(c, st);
                    if(vp.isCollection()) {
                        writeTypeRef(st.list(),vp.getTarget(),"itemType");
                    } else {
                        writeTypeRef(st.restriction(),vp.getTarget(),"base");
                    }
                    return;
                } else {
                    // [RESULT 1 - complexType with simpleContent]
                    //
View Full Code Here


        /**
         * writes the schema definition for the specified type-safe enum in the given TypeHost
         */
        private void writeEnum(EnumLeafInfo<T, C> e, SimpleTypeHost th) {
            SimpleType st = th.simpleType();
            writeName(e,st);

            SimpleRestrictionModel base = st.restriction();
            writeTypeRef(base, e.getBaseType(), "base");

            for (EnumConstant c : e.getConstants()) {
                base.enumeration().value(c.getLexicalValue());
            }
            st.commit();
        }
View Full Code Here

                    //
                    // <simpleType name="foo">
                    //   <xs:restriction base="xs:int"/>
                    // </>
                    ValuePropertyInfo<T,C> vp = (ValuePropertyInfo<T,C>)c.getProperties().get(0);
                    SimpleType st = ((SimpleTypeHost)parent).simpleType();
                    writeName(c, st);
                    if(vp.isCollection()) {
                        writeTypeRef(st.list(),vp.getTarget(),"itemType");
                    } else {
                        writeTypeRef(st.restriction(),vp.getTarget(),"base");
                    }
                    return;
                } else {
                    // [RESULT 1 - complexType with simpleContent]
                    //
View Full Code Here

        /**
         * writes the schema definition for the specified type-safe enum in the given TypeHost
         */
        private void writeEnum(EnumLeafInfo<T, C> e, SimpleTypeHost th) {
            SimpleType st = th.simpleType();
            writeName(e,st);

            SimpleRestrictionModel base = st.restriction();
            writeTypeRef(base, e.getBaseType(), "base");

            for (EnumConstant c : e.getConstants()) {
                base.enumeration().value(c.getLexicalValue());
            }
            st.commit();
        }
View Full Code Here

                    //
                    // <simpleType name="foo">
                    //   <xs:restriction base="xs:int"/>
                    // </>
                    ValuePropertyInfo<T,C> vp = (ValuePropertyInfo<T,C>)c.getProperties().get(0);
                    SimpleType st = ((SimpleTypeHost)parent).simpleType();
                    writeName(c, st);
                    if(vp.isCollection()) {
                        writeTypeRef(st.list(),vp.getTarget(),"itemType");
                    } else {
                        writeTypeRef(st.restriction(),vp.getTarget(),"base");
                    }
                    return;
                } else {
                    // [RESULT 1 - complexType with simpleContent]
                    //
View Full Code Here

    public void writeBinary(DataHandler dh) throws XMLStreamException {
        int len =0;
        byte[] data = null;
        InputStream is = null;
        ByteArrayOutputStreamEx baos = null;
        try {
            baos = new ByteArrayOutputStreamEx();
            is = dh.getDataSource().getInputStream();
            baos.readFrom(is);
            data = baos.toByteArray();
            len = data.length;
            baos.close();
            is.close();
        } catch (IOException ioe) {
            logger.log(Level.SEVERE, "could not get the inputstream from the data handler", ioe);
        }
        if (len > 1000) {
View Full Code Here

        /**
         * writes the schema definition for the specified type-safe enum in the given TypeHost
         */
        private void writeEnum(EnumLeafInfo<T, C> e, SimpleTypeHost th) {
            SimpleType st = th.simpleType();
            writeName(e,st);

            SimpleRestrictionModel base = st.restriction();
            writeTypeRef(base, e.getBaseType(), "base");

            for (EnumConstant c : e.getConstants()) {
                base.enumeration().value(c.getLexicalValue());
            }
            st.commit();
        }
View Full Code Here

                    //
                    // <simpleType name="foo">
                    //   <xs:restriction base="xs:int"/>
                    // </>
                    ValuePropertyInfo<T,C> vp = (ValuePropertyInfo<T,C>)c.getProperties().get(0);
                    SimpleType st = ((SimpleTypeHost)parent).simpleType();
                    writeName(c, st);
                    if(vp.isCollection()) {
                        writeTypeRef(st.list(),vp.getTarget(),"itemType");
                    } else {
                        writeTypeRef(st.restriction(),vp.getTarget(),"base");
                    }
                    return;
                } else {
                    // [RESULT 1 - complexType with simpleContent]
                    //
View Full Code Here

        /**
         * writes the schema definition for the specified type-safe enum in the given TypeHost
         */
        private void writeEnum(EnumLeafInfo<T, C> e, SimpleTypeHost th) {
            SimpleType st = th.simpleType();
            writeName(e,st);

            SimpleRestrictionModel base = st.restriction();
            writeTypeRef(base, e.getBaseType(), "base");

            for (EnumConstant c : e.getConstants()) {
                base.enumeration().value(c.getLexicalValue());
            }
            st.commit();
        }
View Full Code Here

                    //
                    // <simpleType name="foo">
                    //   <xs:restriction base="xs:int"/>
                    // </>
                    ValuePropertyInfo<T,C> vp = (ValuePropertyInfo<T,C>)c.getProperties().get(0);
                    SimpleType st = ((SimpleTypeHost)parent).simpleType();
                    writeName(c, st);
                    if(vp.isCollection()) {
                        writeTypeRef(st.list(),vp.getTarget(),"itemType");
                    } else {
                        writeTypeRef(st.restriction(),vp.getTarget(),"base");
                    }
                    return;
                } else {
                    // [RESULT 1 - complexType with simpleContent]
                    //
View Full Code Here

TOP

Related Classes of com.sun.xml.bind.v2.schemagen.xmlschema.SimpleType

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.