Package com.sun.msv.datatype

Examples of com.sun.msv.datatype.DatabindableDatatype


    if (data == null) {
      String text = getTextTrim();

      if ((text != null) && (text.length() > 0)) {
        if (datatype instanceof DatabindableDatatype) {
          DatabindableDatatype bind = (DatabindableDatatype) datatype;
          data = bind.createJavaObject(text, this);
        } else {
          data = datatype.createValue(text, this);
        }
      }
    }
View Full Code Here


    }
  }

  protected Object convertToValue(String txt) {
    if (datatype instanceof DatabindableDatatype) {
      DatabindableDatatype bindable = (DatabindableDatatype) datatype;

      return bindable.createJavaObject(txt, this);
    } else {
      return datatype.createValue(txt, this);
    }
  }
View Full Code Here

        if (data == null) {
            String text = getTextTrim();

            if ((text != null) && (text.length() > 0)) {
                if (datatype instanceof DatabindableDatatype) {
                    DatabindableDatatype bind = (DatabindableDatatype) datatype;
                    data = bind.createJavaObject(text, this);
                } else {
                    data = datatype.createValue(text, this);
                }
            }
        }
View Full Code Here

        }
    }

    protected Object convertToValue(String txt) {
        if (datatype instanceof DatabindableDatatype) {
            DatabindableDatatype bindable = (DatabindableDatatype) datatype;

            return bindable.createJavaObject(txt, this);
        } else {
            return datatype.createValue(txt, this);
        }
    }
View Full Code Here

/* 104 */     if (this.data == null) {
/* 105 */       String text = getTextTrim();
/*     */
/* 107 */       if ((text != null) && (text.length() > 0)) {
/* 108 */         if ((this.datatype instanceof DatabindableDatatype)) {
/* 109 */           DatabindableDatatype bind = this.datatype;
/* 110 */           this.data = bind.createJavaObject(text, this);
/*     */         } else {
/* 112 */           this.data = this.datatype.createValue(text, this);
/*     */         }
/*     */       }
/*     */     }
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   protected Object convertToValue(String txt) {
/* 184 */     if ((this.datatype instanceof DatabindableDatatype)) {
/* 185 */       DatabindableDatatype bindable = this.datatype;
/*     */
/* 187 */       return bindable.createJavaObject(txt, this);
/*     */     }
/* 189 */     return this.datatype.createValue(txt, this);
/*     */   }
View Full Code Here

        // this type parameter can be always casted into DatabindableDatatype.
        // if you are using RELAX NG, then it depends on the situation.
        if(!(type instanceof DatabindableDatatype)) {
            System.out.print("not databindable");
        } else {
            DatabindableDatatype dt = (DatabindableDatatype)type;
            // the createJavaObject method can be used to convert this literal
            // into Java friendly object. Here, we use the context object
            // which is passed through the startDocument method.
            Object javaObject = dt.createJavaObject( literal, context );
            // dump the class name for a proof that an object is actually created.
            System.out.print( javaObject.getClass().getName() );
        }
        System.out.print(" : ");
        System.out.println(literal.trim());
View Full Code Here

TOP

Related Classes of com.sun.msv.datatype.DatabindableDatatype

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.