Package org.freezedry.persistence.tree

Examples of org.freezedry.persistence.tree.InfoNode.addChild()


    final String date = DateUtils.createStringFromDate( (Calendar)object, ISO_8601_DATE_FORMAT );
    final InfoNode stringNode = InfoNode.createLeafNode( "value", date, "value", String.class );

    // create the root node and add the string rep of the date
    final InfoNode node = InfoNode.createRootNode( persistName, clazz );
    node.addChild( stringNode );
   
    // return the node
    return node;
  }
View Full Code Here


    final String date = DateUtils.createStringFromDate( (Calendar)object, ISO_8601_DATE_FORMAT );
    final InfoNode stringNode = InfoNode.createLeafNode( "value", date, "value", String.class );

    // create the root node and add the string rep of the date
    final InfoNode node = InfoNode.createRootNode( persistName, clazz );
    node.addChild( stringNode );
   
    // return the node
    return node;
  }
View Full Code Here

      }
      else
      {
        name = elementPersistName;
      }
      node.addChild( createNode( clazz, element, name ) );
    }
   
    return node;
  }
 
View Full Code Here

    // run through the Collection elements, recursively calling createNode(...) to create
    // the appropriate node which to add to the newly created compound node.
    for( Object element : (Collection< ? >)object )
    {
      node.addChild( createNode( null, element, element.getClass().getName() ) );
    }
   
    return node;
  }
 
View Full Code Here

    {
      // create the map entry node
      final InfoNode entryNode = InfoNode.createCompoundNode( "", entryPersistName, entry.getClass() );
     
      // create the key node and add it to the entry node
      entryNode.addChild( createNode( clazz, entry.getKey(), keyPersistName ) );
     
      // create the value node and add it to the entry node
      entryNode.addChild( createNode( clazz, entry.getValue(), valuePersistName ) );
     
      // add the entry node to the info node representing the map
View Full Code Here

     
      // create the key node and add it to the entry node
      entryNode.addChild( createNode( clazz, entry.getKey(), keyPersistName ) );
     
      // create the value node and add it to the entry node
      entryNode.addChild( createNode( clazz, entry.getValue(), valuePersistName ) );
     
      // add the entry node to the info node representing the map
      node.addChild( entryNode );
    }
   
View Full Code Here

    {
      // create the map entry node
      final InfoNode entryNode = InfoNode.createCompoundNode( "", entry.getClass().getSimpleName(), entry.getClass() );
     
      // create the key node and add it to the entry node
      entryNode.addChild( createNode( null, entry.getKey(), KEY_PREFIX + KEY_VALUE_SEPARATOR + entry.getKey().getClass().getName() ) );
     
      // create the value node and add it to the entry node
      entryNode.addChild( createNode( null, entry.getValue(), VALUE_PREFIX + KEY_VALUE_SEPARATOR + entry.getValue().getClass().getName() ) );
     
      // add the entry node to the info node representing the map
View Full Code Here

     
      // create the key node and add it to the entry node
      entryNode.addChild( createNode( null, entry.getKey(), KEY_PREFIX + KEY_VALUE_SEPARATOR + entry.getKey().getClass().getName() ) );
     
      // create the value node and add it to the entry node
      entryNode.addChild( createNode( null, entry.getValue(), VALUE_PREFIX + KEY_VALUE_SEPARATOR + entry.getValue().getClass().getName() ) );
     
      // add the entry node to the info node representing the map
      node.addChild( entryNode );
    }
   
View Full Code Here

    final String date = DateUtils.createStringFromDate( (Calendar)object, ISO_8601_DATE_FORMAT );
    final InfoNode stringNode = InfoNode.createLeafNode( "value", date, "value", String.class );

    // create the root node and add the string rep of the date
    final InfoNode node = InfoNode.createRootNode( persistName, clazz );
    node.addChild( stringNode );
   
    // return the node
    return node;
  }
View Full Code Here

  @Override
  public InfoNode createInfoNode( final Object object, final String persistName )
  {
    // create the root node and add the string rep of the date
    final InfoNode node = InfoNode.createRootNode( persistName, object.getClass() );
    node.addChild( InfoNode.createLeafNode( "value", ((Enum)object).name(), "value", String.class ) );

    // return the node
    return node;
  }
  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.