Package pedro.model

Examples of pedro.model.DataFieldModel


     
      final Collection editFields = sampleRecordModel.getEditFields();
     
      for( Iterator iterator2 = editFields.iterator(); iterator2.hasNext(); )
      {
        final DataFieldModel dataFieldModel = (DataFieldModel)iterator2.next();
       
        if( dataFieldModel.isAttribute() )
        {
          returnValues.add( stripAttribute( schemaContext + SEPARATOR + dataFieldModel.getName() ) );
        }
        else
        {
          returnValues.add( schemaContext + SEPARATOR + dataFieldModel.getName() );
        }
      }
    }
   
    return generateQuery( null, returnValues );
View Full Code Here


      }
     
      for( Iterator iterator = query.getQueryFields().iterator(); iterator.hasNext(); )
      {
        final QueryField queryField = (QueryField)iterator.next();
        final DataFieldModel dataFieldModel = queryField.getEditFieldModel();
        final String fieldValue = queryField.getValue();
       
        if( fieldValue.length() > 0 )
        {
          conditionValues.add( getCondition( normaliseQueryContext( query.getSchemaContext() ), dataFieldModel.isAttribute() ? asAttribute( queryField.getName() ) : queryField.getName(), queryField.getOperator(), fieldValue ) );
        }
      }
    }
   
    final Collection returnValues = new HashSet();
    final QueryResult[] queryResultTemplates = queryFeature.getQueryResultTemplates();
   
    for( int i = 0; i < queryResultTemplates.length; i++ )
    {
      final QueryResult queryResult = queryResultTemplates[ i ];
      RecordModel recordModel = queryResult.getRecordModel();
     
      if( recordModel == null )
      {
        recordModel= recordModelFactory.createRecordModel( queryResult.getRecordClassName() );
      }
     
      final Collection editFields = recordModel.getEditFields();
     
      for( Iterator iterator = editFields.iterator(); iterator.hasNext(); )
      {
        final DataFieldModel dataFieldModel = (DataFieldModel)iterator.next();
       
        if( dataFieldModel.isAttribute() )
        {
          returnValues.add( stripAttribute( SEPARATOR + normaliseQueryContext( queryResult.getSchemaContext() ) + SEPARATOR + dataFieldModel.getName() ) );
        }
        else
        {
          returnValues.add( SEPARATOR + normaliseQueryContext( queryResult.getSchemaContext() ) + SEPARATOR + dataFieldModel.getName() );
        }
      }
    }

    final StringBuffer query = ( isTamino ) ? new StringBuffer( "declare namespace tf=\"http://namespaces.softwareag.com/tamino/TaminoFunction\" " ) : new StringBuffer(); //$NON-NLS-1$;
View Full Code Here

                        spotRecordModel.setValue( "acquisition_time", recording.getAquisitionTime(), false ); //$NON-NLS-1$
                        spotRecordModel.updateDisplayName();

                        for( Iterator iterator = spotRecordModel.getFields().iterator(); iterator.hasNext(); )
                        {
                          final DataFieldModel dataFieldModel = (DataFieldModel)iterator.next();

                          if( dataFieldModel.getName().trim().equals( "Microscope" ) ) //$NON-NLS-1$
                          {
                            spotRecordModel.removeField( dataFieldModel )
                          }
                        }

                        // TODO: Work out why Microscope cannot be added.
                        // spotRecordModel.addChild( "Microscope", microscopeRecordModel, false ); //$NON-NLS-1$

                        // Add Results stub to this spot reading
                        final RecordModel resultRecordModel = recordModelFactory.createRecordModel( "Result" ); //$NON-NLS-1$

                        resultRecordModel.setValue( "results_file", recording.getName(), false ); //$NON-NLS-1$
                        resultRecordModel.updateDisplayName();

                        spotRecordModel.addChild( "Result", resultRecordModel, false ); //$NON-NLS-1$
                        spotRecordModel.updateDisplayName();         
                      }
                      else if( deleteNonTrackedSpots )
                      {
                        final NavigationTreeNode parentNode = (NavigationTreeNode)spotNode.getParent();
                        final RecordModel parentRecordModel = parentNode.getRecordModel();

                        for( Iterator iterator = parentRecordModel.getFields().iterator(); iterator.hasNext(); )
                        {
                          final DataFieldModel dataFieldModel = (DataFieldModel)iterator.next();

                          if( dataFieldModel.getName().trim().equals( "SpotReading" ) ) //$NON-NLS-1$
                          {
                            if( dataFieldModel instanceof ListFieldModel )
                            {
                              final ListFieldModel listFieldModel = (ListFieldModel)dataFieldModel;
                              listFieldModel.removeChild( spotRecordModel );
View Full Code Here

TOP

Related Classes of pedro.model.DataFieldModel

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.