Package com.sun.msv.datatype.xsd

Examples of com.sun.msv.datatype.xsd.TypeIncubator.derive()


      }

      // derive a new type by those facets
      String newTypeName = null;

      return incubator.derive("", newTypeName);
    } catch (DatatypeException e) {
      onSchemaError("Invalid restriction: " + e.getMessage()
          + " when trying to build restriction: " + xsdRestriction);

      return null;
View Full Code Here


                Iterator itr = facets.iterator();
                for( int i=0; i<facetSize; i++ ) {
                    Facet f = (Facet)itr.next();
                    ti.addFacet( f.name, f.value, f.fixed, f.context );
                }
                return ti.derive(nsUri,localName);
            }
        });
    }
   
    /** store the information about one added facet. */
 
View Full Code Here

           
            public void addFacet( String name, String value, boolean fixed, ValidationContext context ) throws DatatypeException {
                core.addFacet(name,value,fixed,context);
            }
            public XSDatatypeExp derive(String uri,String localName) throws DatatypeException {
                return new XSDatatypeExp( core.derive(uri,localName), pool );
            }
        };
    }
   
   
View Full Code Here

        {
          String value = tokens.nextToken();
                   
          // a type can be derived by derive method.
          // the new type contains all facets that were added.
          XSDatatype dt = incubator.derive("","anonymous");
         
          // check validity.
          if( dt.isValid(value,null) )
            // verify method returns true if the value is valid.
            System.out.println("valid value");
View Full Code Here

            }

            // derive a new type by those facets
            String newTypeName = null;

            return incubator.derive("", newTypeName);
        } catch (DatatypeException e) {
            onSchemaError("Invalid restriction: " + e.getMessage()
                    + " when trying to build restriction: " + xsdRestriction);

            return null;
View Full Code Here

/* 470 */         incubator.addFacet(name, value, fixed, context);
/*     */       }
/*     */
/* 474 */       String newTypeName = null;
/*     */
/* 476 */       return incubator.derive("", newTypeName);
/*     */     } catch (DatatypeException e) {
/* 478 */       onSchemaError("Invalid restriction: " + e.getMessage() + " when trying to build restriction: " + xsdRestriction);
/*     */     }
/*     */
/* 481 */     return null;
View Full Code Here

           
            // derive a type with test facets.
            XSDatatype typeObj=null;
            try
            {
                typeObj = ti.derive("anonymousURI","anonymousLocal");
            }
            catch( DatatypeException bte )
            {
                err.reportTestCaseError(baseType,ti,bte);
            }
View Full Code Here

                Iterator itr = facets.iterator();
                for( int i=0; i<facetSize; i++ ) {
                    Facet f = (Facet)itr.next();
                    ti.addFacet( f.name, f.value, f.fixed, f.context );
                }
                return ti.derive(nsUri,localName);
            }
        });
    }
   
    /** store the information about one added facet. */
 
View Full Code Here

           
            public void addFacet( String name, String value, boolean fixed, ValidationContext context ) throws DatatypeException {
                core.addFacet(name,value,fixed,context);
            }
            public XSDatatypeExp derive(String uri,String localName) throws DatatypeException {
                return new XSDatatypeExp( core.derive(uri,localName), pool );
            }
        };
    }
   
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.