Package net.sf.gum.xml.v1

Examples of net.sf.gum.xml.v1.ObjectFactory


    if( selectedNode != null )
    {
      logger.finer( "adding node to: '" + selectedNode.getTitle() + "'" );

      ItemType newNode = new ItemType();
      newNode.setTitle( "New Item" );
      newNode.setType( TaskType.TASK );

      GregorianCalendar g = new GregorianCalendar();
      g.setTime( new Date() );
      try
      {
        newNode.setDateCreated( DatatypeFactory.newInstance().newXMLGregorianCalendar( g ) );
      }
      catch( DatatypeConfigurationException e )
      {
        logger.severe( "Trying to create a date on the TaskNode.  " + e );
      }
View Full Code Here


  @Override
  protected Transferable createTransferable( JComponent jComponent )
  {   
    JTree jTree = (JTree) jComponent;
   
    ItemType itemType = (ItemType) jTree.getSelectionPath().getLastPathComponent();   
    this.parent = (BaseType) jTree.getSelectionPath().getParentPath().getLastPathComponent();

    this.originalPath= jTree.getSelectionPath().getParentPath();
   
    return new BaseTypeTransferable( itemType );
View Full Code Here

    JTree jTree = (JTree) jComponent;   
    BaseType target = (BaseType) jTree.getSelectionPath().getLastPathComponent();   

    try
    {
      ItemType source = (ItemType) transferable.getTransferData( ITEM_TYPE_DATA_FLAVOR );
      target.getItem().add( source );
     
     
      //System.out.println( "BEFORE---this.parent.getItem().size()= " + this.parent.getItem().size() );
     
View Full Code Here

        if( this.projectName.getText().trim().length() > 0 )
        {
          log.log( Level.FINEST, "Adding new project" );

          ProjectType projectType = new ProjectType();
          projectType.setTitle( this.projectName.getText().trim() );
          // this.gumData.getProject().add( projectType );
        }
      }

      this.newButton.setVisible( true );
View Full Code Here

    if( this.gumData == null )
    {
      this.gumData = new GumData();

      //TODO do this until the New Project functionality gets added...
      ProjectType p = new ProjectType();
      p.setTitle( "Big Brutus" );


//      List<ProjectType> projectTypes = this.gumData.getProject();


      ProjectType p2 = new ProjectType();
      p2.setTitle( "Mangy" );
     
      List<ProjectType> projectTypes = this.gumData.getProject();
      projectTypes.add( p );
      projectTypes.add( p2 );
      this.taskTree.setProjectType( p );
View Full Code Here

    Component component = super.getTreeCellRendererComponent( tree, value, selected, expanded, leaf, row, hasFocus );

    if( value instanceof ProjectType )
    {
      ProjectType p = (ProjectType) value;

      super.setText( p.getTitle() );
      //super.setBackgroundNonSelectionColor( Color.BLUE );

    }
    else if( value instanceof ItemType )
    {
View Full Code Here

        verifyHeaders(message, new String[] {RMConstants.SEQUENCE_FAULT_NAME});

    }

    private void setUpOutbound() {
        ObjectFactory factory = new ObjectFactory();
        s1 = factory.createSequenceType();
        Identifier sid = factory.createIdentifier();
        sid.setValue("sequence1");
        s1.setIdentifier(sid);
        s1.setMessageNumber(ONE);
        s2 = factory.createSequenceType();
        sid = factory.createIdentifier();
        sid.setValue("sequence2");
        s2.setIdentifier(sid);
        s2.setMessageNumber(TEN);

        ack1 = factory.createSequenceAcknowledgement();
        SequenceAcknowledgement.AcknowledgementRange r =
            factory.createSequenceAcknowledgementAcknowledgementRange();
        r.setLower(ONE);
        r.setUpper(ONE);
        ack1.getAcknowledgementRange().add(r);
        ack1.setIdentifier(s1.getIdentifier());

        ack2 = factory.createSequenceAcknowledgement();
        r = factory.createSequenceAcknowledgementAcknowledgementRange();
        r.setLower(ONE);
        r.setUpper(TEN);
        ack2.getAcknowledgementRange().add(r);
        ack2.setIdentifier(s2.getIdentifier());

        ar1 = factory.createAckRequestedType();
        ar1.setIdentifier(s1.getIdentifier());

        ar2 = factory.createAckRequestedType();
        ar2.setIdentifier(s2.getIdentifier());
    }
View Full Code Here

        assertNull(rmps.getAcks());
    }

    private void setUpOutbound() {
        ObjectFactory factory = new ObjectFactory();
        s1 = factory.createSequenceType();
        Identifier sid = factory.createIdentifier();
        sid.setValue("sequence1");
        s1.setIdentifier(sid);
        s1.setMessageNumber(ONE);
        s2 = factory.createSequenceType();
        sid = factory.createIdentifier();
        sid.setValue("sequence2");
        s2.setIdentifier(sid);
        s2.setMessageNumber(TEN);

        ack1 = factory.createSequenceAcknowledgement();
        SequenceAcknowledgement.AcknowledgementRange r =
            factory.createSequenceAcknowledgementAcknowledgementRange();
        r.setLower(ONE);
        r.setUpper(ONE);
        ack1.getAcknowledgementRange().add(r);
        ack1.setIdentifier(s1.getIdentifier());

        ack2 = factory.createSequenceAcknowledgement();
        r = factory.createSequenceAcknowledgementAcknowledgementRange();
        r.setLower(ONE);
        r.setUpper(TEN);
        ack2.getAcknowledgementRange().add(r);
        ack2.setIdentifier(s2.getIdentifier());

        ar1 = factory.createAckRequestedType();
        ar1.setIdentifier(s1.getIdentifier());

        ar2 = factory.createAckRequestedType();
        ar2.setIdentifier(s2.getIdentifier());
    }
View Full Code Here

    private SequenceTerminationPolicyType stp;
    private RetransmissionQueue rq;
 
    @Before
    public void setUp() {       
        factory = new ObjectFactory();
        id = factory.createIdentifier();
        id.setValue("seq");
       
        control = EasyMock.createNiceControl();
    }
View Full Code Here

    @Before
    public void setUp() {
        control = EasyMock.createNiceControl();
        control.makeThreadSafe(true);
        factory = new ObjectFactory();
        ref = control.createMock(EndpointReferenceType.class);
        id = factory.createIdentifier();
        id.setValue("seq");
    }
View Full Code Here

TOP

Related Classes of net.sf.gum.xml.v1.ObjectFactory

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.