/** Derives a new type by setting final values. */ public XSDatatypeExp createFinalizedType( final int finalValue, GrammarReader reader ) { if(finalValue==0) return this; // there is no need to create a new object. if( !isLateBind() ) return new XSDatatypeExp( new FinalComponent( (XSDatatypeImpl)dt, finalValue ), pool ); // create datatype lazily return new XSDatatypeExp( this.namespaceUri, this.name, reader, new Renderer() { public XSDatatype render( RenderingContext context ) throws DatatypeException { return new FinalComponent( (XSDatatypeImpl)getType(context), finalValue ); } }); }
/** Derives a new type by setting final values. */ public XSDatatypeExp createFinalizedType( final int finalValue, GrammarReader reader ) { if(finalValue==0) return this; // there is no need to create a new object. if( !isLateBind() ) return new XSDatatypeExp( new FinalComponent( (XSDatatypeImpl)dt, finalValue ), pool ); // create datatype lazily return new XSDatatypeExp( this.namespaceUri, this.name, reader, new Renderer() { public XSDatatype render( RenderingContext context ) throws DatatypeException { return new FinalComponent( (XSDatatypeImpl)getType(context), finalValue ); } }); }
/** Derives a new type by setting final values. */ public XSDatatypeExp createFinalizedType( final int finalValue, GrammarReader reader ) { if(finalValue==0) return this; // there is no need to create a new object. if( !isLateBind() ) return new XSDatatypeExp( new FinalComponent( (XSDatatypeImpl)dt, finalValue ), pool ); // create datatype lazily return new XSDatatypeExp( this.namespaceUri, this.name, reader, new Renderer() { public XSDatatype render( RenderingContext context ) throws DatatypeException { return new FinalComponent( (XSDatatypeImpl)getType(context), finalValue ); } }); }
public XSDatatype render( RenderingContext context ) throws DatatypeException { return new FinalComponent( (XSDatatypeImpl)getType(context), finalValue ); } });
public XSDatatype render( RenderingContext context ) throws DatatypeException { return new FinalComponent( (XSDatatypeImpl)getType(context), finalValue ); } });
/** Derives a new type by setting final values. */ public XSDatatypeExp createFinalizedType( final int finalValue, GrammarReader reader ) { if(finalValue==0) return this; // there is no need to create a new object. if( !isLateBind() ) return new XSDatatypeExp( new FinalComponent( (XSDatatypeImpl)dt, finalValue ), pool ); // create datatype lazily return new XSDatatypeExp( this.namespaceUri, this.name, reader, new Renderer() { public XSDatatype render( RenderingContext context ) throws DatatypeException { return new FinalComponent( (XSDatatypeImpl)getType(context), finalValue ); } }); }
public XSDatatype render( RenderingContext context ) throws DatatypeException { return new FinalComponent( (XSDatatypeImpl)getType(context), finalValue ); } });
public XSDatatype render( RenderingContext context ) throws DatatypeException { return new FinalComponent( (XSDatatypeImpl)getType(context), finalValue ); } });
public void testDerivationByRestriction() throws DatatypeException { TypeIncubator inc = new TypeIncubator( new FinalComponent( StringType.theInstance, XSDatatype.DERIVATION_BY_RESTRICTION ) ); try { inc.derive("test","test"); fail("should throw Exception here"); } catch( DatatypeException bte ) {;} }
public void testDerivationByList() { try { DatatypeFactory.deriveByList("test","test", new FinalComponent( StringType.theInstance, XSDatatype.DERIVATION_BY_LIST ) ); fail("should throw Exception here"); } catch( DatatypeException bte ) {;} }
public void testDerivationByUnion() { try { DatatypeFactory.deriveByUnion("","intermediate", new XSDatatype[]{ new FinalComponent( StringType.theInstance, XSDatatype.DERIVATION_BY_UNION ), NumberType.theInstance } ); fail("should throw Exception here"); } catch( DatatypeException bte ) {;} } }
return new FinalComponent(newNameUri, newLocalName, baseType, 0);
return new FinalComponent(newNameUri, newLocalName, baseType, 0);
return new FinalComponent(newNameUri, newLocalName, baseType, 0);
return new FinalComponent(newNameUri, newLocalName, baseType, 0);
return new FinalComponent(newNameUri, newLocalName, baseType, 0);