protected void validate(String txt) throws IllegalArgumentException { try { datatype.checkValid(txt, this); } catch (DatatypeException e) { throw new IllegalArgumentException(e.getMessage()); } }
private void noteDatatype(Datatype dt) { if (dt.getIdType() != Datatype.ID_TYPE_NULL) idTypes = true; } }
public Object _createValue( String content, ValidationContext context ) { if(context.isUnparsedEntity(content)) return content; else return null; } public Class getJavaObjectType() {
public DatatypeBuilder createDatatypeBuilder(String type) throws DatatypeException { if (type.equals("ID") || type.equals("IDREF") || type.equals("IDREFS")) { if (xsdDatatypeLibrary == null) { xsdDatatypeLibrary = factory.createDatatypeLibrary(WellKnownNamespaces.XML_SCHEMA_DATATYPES); if (xsdDatatypeLibrary == null) throw new DatatypeException(); } return xsdDatatypeLibrary.createDatatypeBuilder(type); } throw new DatatypeException(); }
/** obtains a named DataType object referenced by a local name. */ public Datatype resolveDataType( String localName ) { try { return getCurrentDatatypeLibrary().createDatatype(localName); } catch( DatatypeException dte ) { reportError( ERR_UNDEFINED_DATATYPE_1, localName, dte.getMessage() ); return com.sun.msv.datatype.xsd.StringType.theInstance; } }
@Override public String getNamespaceURI(String prefix) { return context.resolveNamespacePrefix(prefix); } });
public boolean equals(Object obj) { if (!(obj instanceof DatatypeValue)) return false; DatatypeValue other = (DatatypeValue)obj; if (other.dt != dt) return false; return dt.sameValue(value, other.value); } }
public DatatypeBuilder createDatatypeBuilder(String type) throws DatatypeException { if (type.equals("ID") || type.equals("IDREF") || type.equals("IDREFS")) { if (xsdDatatypeLibrary == null) { xsdDatatypeLibrary = factory.createDatatypeLibrary(WellKnownNamespaces.XML_SCHEMA_DATATYPES); if (xsdDatatypeLibrary == null) throw new DatatypeException(); } return xsdDatatypeLibrary.createDatatypeBuilder(type); } throw new DatatypeException(); }
/** obtains a named DataType object referenced by a local name. */ public Datatype resolveDataType( String localName ) { try { return getCurrentDatatypeLibrary().createDatatype(localName); } catch( DatatypeException dte ) { reportError( ERR_UNDEFINED_DATATYPE_1, localName, dte.getMessage() ); return com.sun.msv.datatype.xsd.StringType.theInstance; } }
protected void validate(String text) throws IllegalArgumentException { try { datatype.checkValid(text, this); } catch (DatatypeException e) { throw new IllegalArgumentException(e.getMessage()); } } }
private void noteDatatype(Datatype dt) { if (dt.getIdType() != Datatype.ID_TYPE_NULL) idTypes = true; } }
@Override public String getNamespaceURI(String prefix) { return context.resolveNamespacePrefix(prefix); } });
public Object _createValue( String content, ValidationContext context ) { if(context.isUnparsedEntity(content)) return content; else return null; } public Class getJavaObjectType() {
/** obtains a named DataType object referenced by a local name. */ public Datatype resolveDataType( String localName ) { try { return getCurrentDatatypeLibrary().createDatatype(localName); } catch( DatatypeException dte ) { reportError( ERR_UNDEFINED_DATATYPE_1, localName, dte.getMessage() ); return com.sun.msv.datatype.xsd.StringType.theInstance; } }
onSchemaError("Invalid restriction: " + e.getMessage() + " when trying to build restriction: " + xsdRestriction);
private void noteDatatype(Datatype dt) { if (dt.getIdType() != Datatype.ID_TYPE_NULL) idTypes = true; } }
@Override public String getNamespaceURI(String prefix) { return context.resolveNamespacePrefix(prefix); } });
public Object _createValue( String content, ValidationContext context ) { if(context.isUnparsedEntity(content)) return content; else return null; } public Class getJavaObjectType() {
int idType = datatype.getIdType(); Location loc = mContext.getValidationLocation(); PrefixedName elemPName = getElementPName();
public Object _createValue( String content, ValidationContext context ) { if(context.isUnparsedEntity(content)) return content; else return null; } public Class getJavaObjectType() {