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 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 boolean equals( Object o ) { if (o == null) return false; // Note that equals method of this class *can* be sloppy, // since this class does not have a pattern as its child. // Therefore datatype vocaburary does not necessarily provide // strict equals method. if(o.getClass()!=this.getClass()) return false; ValueExp rhs = (ValueExp)o; if(!rhs.dt.equals(dt)) return false; return dt.sameValue(value,rhs.value); }
boolean samePattern(Pattern other) { if (getClass() != other.getClass()) return false; if (!(other instanceof ValuePattern)) return false; return (dt.equals(((ValuePattern)other).dt) && dt.sameValue(obj, ((ValuePattern)other).obj)); }
public boolean equals( Object o ) { // Note that equals method of this class *can* be sloppy, // since this class does not have a pattern as its child. // Therefore datatype vocaburary does not necessarily provide // strict equals method. if(o.getClass()!=this.getClass()) return false; ValueExp rhs = (ValueExp)o; if(!rhs.dt.equals(dt)) return false; return dt.sameValue(value,rhs.value); }
boolean samePattern(Pattern other) { if (getClass() != other.getClass()) return false; if (!(other instanceof ValuePattern)) return false; return (dt.equals(((ValuePattern)other).dt) && dt.sameValue(obj, ((ValuePattern)other).obj)); }
public boolean equals( Object o ) { // Note that equals method of this class *can* be sloppy, // since this class does not have a pattern as its child. // Therefore datatype vocaburary does not necessarily provide // strict equals method. if(o.getClass()!=this.getClass()) return false; ValueExp rhs = (ValueExp)o; if(!rhs.dt.equals(dt)) return false; return dt.sameValue(value,rhs.value); }
boolean samePattern(Pattern other) { if (getClass() != other.getClass()) return false; if (!(other instanceof ValuePattern)) return false; return (dt.equals(((ValuePattern)other).dt) && dt.sameValue(obj, ((ValuePattern)other).obj)); }
public boolean equals( Object o ) { if (o == null) return false; // Note that equals method of this class *can* be sloppy, // since this class does not have a pattern as its child. // Therefore datatype vocaburary does not necessarily provide // strict equals method. if(o.getClass()!=this.getClass()) return false; ValueExp rhs = (ValueExp)o; if(!rhs.dt.equals(dt)) return false; return dt.sameValue(value,rhs.value); }
boolean samePattern(Pattern other) { if (getClass() != other.getClass()) return false; if (!(other instanceof ValuePattern)) return false; return (dt.equals(((ValuePattern)other).dt) && dt.sameValue(obj, ((ValuePattern)other).obj)); }
public void onValue( ValueExp exp ) { String text; if( exp.dt instanceof XSDatatype ) { XSDatatype xsd = (XSDatatype)exp.dt; text = xsd.convertToLexicalValue(exp.value,getContext()); } else { text = exp.value.toString(); if(!exp.dt.sameValue( exp.value, exp.dt.createValue(text,getContext()) ) ) throw new Error("unable to produce a value for the datatype:"+exp.name); } node.appendChild( domDoc.createTextNode(text) ); return; } public void onData( DataExp exp ) {
public boolean match(ValueExp exp) { Object thisValue = exp.dt.createValue(literal, context); if (!exp.dt.sameValue(thisValue, exp.value)) return false; // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
public boolean match(ValueExp exp) { Object thisValue = exp.dt.createValue(literal, context); if (!exp.dt.sameValue(thisValue, exp.value)) return false; // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
public boolean match(ValueExp exp) { Object thisValue = exp.dt.createValue(literal, context); if (!exp.dt.sameValue(thisValue, exp.value)) return false; // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
public boolean match(ValueExp exp) { Object thisValue = exp.dt.createValue(literal, context); if (!exp.dt.sameValue(thisValue, exp.value)) return false; // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
ValueExp vexp = (ValueExp)texp; if(!vexp.dt.sameValue(vexp.value, vexp.dt.createValue(srt.literal,srt.context))) {
public Pattern caseValue(ValuePattern p) { Datatype dt = p.getDatatype(); Object value = dt.createValue(str, vc); if (value != null && dt.sameValue(p.getValue(), value)) return builder.makeEmpty(); if (fail != null) { if (value == null) { try { dt.checkValid(str, vc); } catch (DatatypeException e) { fail.add(new DataDerivFailure(dt, p.getDatatypeName(), e)); } } else fail.add(new DataDerivFailure(p)); } return builder.makeNotAllowed(); }
ValueExp vexp = (ValueExp)texp; if(!vexp.dt.sameValue(vexp.value, vexp.dt.createValue(srt.literal,srt.context))) {
ValueExp vexp = (ValueExp)texp; if(!vexp.dt.sameValue(vexp.value, vexp.dt.createValue(srt.literal,srt.context))) {
public Pattern caseValue(ValuePattern p) { Datatype dt = p.getDatatype(); Object value = dt.createValue(str, vc); if (value != null && dt.sameValue(p.getValue(), value)) return builder.makeEmpty(); if (fail != null) { if (value == null) { try { dt.checkValid(str, vc); } catch (DatatypeException e) { fail.add(new DataDerivFailure(dt, p.getDatatypeName(), e)); } } else fail.add(new DataDerivFailure(p)); } return builder.makeNotAllowed(); }