Package org.exolab.castor.xml.schema.simpletypes.factory

Examples of org.exolab.castor.xml.schema.simpletypes.factory.TypeProperty


        //Adds the facets to the result
        Vector facets = type.getFacet();
        FacetFactory facetFactory = FacetFactory.getInstance();
        for (int index = 0; index < facets.size(); index++) {
            TypeProperty prop = (TypeProperty) facets.elementAt(index);
            if (!prop.getPseudo()) {
                //adds a "real" facet (defined in the xml specs)
                Facet facet = facetFactory.createFacet(prop.getName(), prop.getValue());
                facet.setOwningType(result);
                result.addFacet(facet);
            } else {
                //sets the information linked with the pseudo facet
                if (RealType.class.isInstance(result)) {
                    RealType realResult = (RealType) result;
                    if (prop.getName().equals("minM")) {
                        realResult.setMinMantissa(Long.parseLong(prop.getValue()));
                    } else if (prop.getName().equals("maxM")) {
                        realResult.setMaxMantissa(Long.parseLong(prop.getValue()));
                    } else if (prop.getName().equals("minE")) {
                        realResult.setMinExponent(Long.parseLong(prop.getValue()));
                    } else if (prop.getName().equals("maxE")) {
                        realResult.setMaxExponent(Long.parseLong(prop.getValue()));
                    }
                }
            }
        }
        return result;
View Full Code Here

TOP

Related Classes of org.exolab.castor.xml.schema.simpletypes.factory.TypeProperty

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.