Package org.bifrost.xmlio.config

Examples of org.bifrost.xmlio.config.DateConverter


  {
    // Configure date/timestamp formats
    XmlIOConfig config = XmlIOConfig.getInstance();
    // Override the default date and timestamp converters to use a different
    // format.
    DateConverter dconv = new DateConverter("yyyy-MM-dd");
    config.addConverter(dconv);
    TimestampConverter tconv = new TimestampConverter("yyyy-MM-dd HH:mm");
    config.addConverter(tconv);
   
    List plist = new LinkedList();
    PropertyMap pmap = new PropertyMap("created");
    plist.add(pmap);
    pmap = new PropertyMap("startDate");
    plist.add(pmap);
    pmap = new PropertyMap("startTime");
    dconv = new DateConverter("HH:mm:ss");
    pmap.setConverter(dconv);
    plist.add(pmap);
    pmap = new PropertyMap("endTime");
    pmap.setConverter(dconv);
    plist.add(pmap);
View Full Code Here


    InputStream reader = new ByteArrayInputStream(configString.getBytes());
    XmlReader xmlReader = null;

    // Configure date/timestamp formats
    XmlIOConfig config = XmlIOConfig.getInstance();
    DateConverter dconv = new DateConverter("yyyy-MM-dd");
    config.addConverter(dconv);
    TimestampConverter tconv = new TimestampConverter("yyyy-MM-dd HH:mm");
    config.addConverter(tconv);

    try
View Full Code Here

    InputStream reader = new ByteArrayInputStream(configString.getBytes());
    XmlReader xmlReader = null;

    // Configure date/timestamp formats
    XmlIOConfig config = XmlIOConfig.getInstance();
    DateConverter dconv = new DateConverter("yyyy-MM-dd");
    config.addConverter(dconv);
    TimestampConverter tconv = new TimestampConverter("yyyy-MM-dd HH:mm");
    config.addConverter(tconv);

    List plist = new LinkedList();
    PropertyMap pmap = new PropertyMap("created");
    plist.add(pmap);
    pmap = new PropertyMap("startDate");
    plist.add(pmap);
    pmap = new PropertyMap("startTime");
    dconv = new DateConverter("HH:mm:ss");
    pmap.setConverter(dconv);
    plist.add(pmap);
    pmap = new PropertyMap("endTime");
    pmap.setConverter(dconv);
    plist.add(pmap);
View Full Code Here

TOP

Related Classes of org.bifrost.xmlio.config.DateConverter

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.