Examples of Update


Examples of org.fnlp.ml.classifier.linear.update.Update

    loadTrainingData();
    /**
     *
     * 更新参数的准则
     */
    Update update;
    // viterbi解码
    Inferencer inference;

    HammingLoss loss = new HammingLoss();
    if (standard) {
View Full Code Here

Examples of org.geoserver.wfs.request.Update

        // check inserts are enabled
        if (!getInfo().getServiceLevel().getOps().contains(WFSInfo.Operation.TRANSACTION_UPDATE) ) {
            throw new WFSException(element, "Transaction Update support is not enabled");
        }

        Update update = (Update) element;
        FilterFactory ff = CommonFactoryFinder.getFilterFactory( null );
       
        try {
            FeatureTypeInfo meta = typeInfos.values().iterator().next();
            FeatureType featureType = meta.getFeatureType();

            List<Property> props = update.getUpdateProperties();
            for (Iterator<Property> prop = props.iterator(); prop.hasNext();) {
                Property property = prop.next();

                //check that valus that are non-nillable exist
                if (property.getValue() == null) {
                    String propertyName = property.getName().getLocalPart();
                    AttributeDescriptor attributeType = null;
                    PropertyDescriptor pd = featureType.getDescriptor(propertyName);
                    if(pd instanceof AttributeDescriptor) {
                        attributeType = (AttributeDescriptor) pd;
                    }
                    if ((attributeType != null) && (attributeType.getMinOccurs() > 0)) {
                        String msg = "Property '" + attributeType.getLocalName()
                            + "' is mandatory but no value specified.";
                        throw new WFSException(element, msg, "MissingParameterValue");
                    }
                }
               
                //check that property names are actually valid
                QName name = property.getName();
                PropertyName propertyName = null;
               
                if ( name.getPrefix() != null && !"".equals( name.getPrefix() )) {
                    propertyName = ff.property( name.getPrefix() + ":" + name.getLocalPart() );
                }
                else {
                    propertyName = ff.property( name.getLocalPart() );
                }
               
                if ( propertyName.evaluate( featureType ) == null ) {
                    String msg = "No such property: " + name;
                    throw new WFSException(element, msg );
                }
            }
        } catch (IOException e) {
            throw new WFSTransactionException("Could not locate feature type information for " +
                update.getTypeName(), e, update.getHandle());
        }
    }
View Full Code Here

Examples of org.geotools.data.wfs.internal.TransactionRequest.Update

                    }
                }
            }
            if (e instanceof Update) {
                Diff diff = diff(typeName);
                Update u = (Update) e;
                Filter filter = u.getFilter();
                List<SimpleFeature> features = features(typeName);
                List<QName> propertyNames = u.getPropertyNames();
                List<Object> newValues = u.getNewValues();

                for (SimpleFeature f : features) {
                    if (!filter.evaluate(f)) {
                        continue;
                    }
View Full Code Here

Examples of org.gudy.azureus2.plugins.update.Update

    start();
  }

  private void start() {
    for (int i = 0; i < updates.length; i++) {
      Update update = updates[i];
      ResourceDownloader[] rds = update.getDownloaders();
      for (int j = 0; j < rds.length; j++) {
        ResourceDownloader rd = rds[j];
        downloaders.add(rd);
      }
    }
View Full Code Here

Examples of org.gudy.azureus2.plugins.update.Update

 
 
  private void checkMandatory() {
    TableItem[] items = table.getItems();
    for(int i = 0 ; i < items.length ; i++) {
      Update update = (Update) items[i].getData();
      if(update.isMandatory()) items[i].setChecked(true);
    }
  }
View Full Code Here

Examples of org.gudy.azureus2.plugins.update.Update

    restartRequired = false;
    boolean  restartMaybeRequired = false;
    TableItem[] items = table.getItems();
    for(int i = 0 ; i < items.length ; i++) {
      if(! items[i].getChecked()) continue;
      Update update = (Update) items[i].getData();
      int required = update.getRestartRequired();
      if((required == Update.RESTART_REQUIRED_MAYBE)){
        restartMaybeRequired = true;
      }else if ( required == Update.RESTART_REQUIRED_YES ){
        restartRequired = true;
      }
View Full Code Here

Examples of org.gudy.azureus2.plugins.update.Update

    downloaders = new ArrayList();
   
    for(int i = 0 ; i < items.length ; i++) {
      if(! items[i].getChecked()) continue;
     
      Update update = (Update) items[i].getData();
      ResourceDownloader[] rds = update.getDownloaders();
      for(int j = 0 ; j < rds.length ; j++) {
        downloaders.add(rds[j]);       
        try {
          totalDownloadSize += rds[j].getSize();
        } catch (Exception e) {
View Full Code Here

Examples of org.gudy.azureus2.plugins.update.Update

        {
          Update[]   updates = instance.getUpdates();
         
          for (int i=0;i<updates.length;i++){
           
            Update  update = updates[i];
                       
            out.println( "Update available for '" + update.getName() + "', new version = " + update.getNewVersion());
                       
            String[]  descs = update.getDescription();
           
            for (int j=0;j<descs.length;j++){
             
              out.println( "\t" + descs[j] );
            }
View Full Code Here

Examples of org.gudy.azureus2.plugins.update.Update

        }catch( ResourceDownloaderException e ){
       
          Debug.printStackTrace( e );
        }
       
        final Update update =
          checker.addUpdate("SWT Library for " + versionGetter.getPlatform(),
              new String[] {"SWT is the graphical library used by " + Constants.APP_NAME},
              "" + versionGetter.getLatestVersion(),
              swtDownloader,
              Update.RESTART_REQUIRED_YES
            );
       
        update.setDescriptionURL(versionGetter.getInfoURL());
       
        swtDownloader.addListener(new ResourceDownloaderAdapter() {
           
            public boolean
            completed(
              ResourceDownloader downloader,
              InputStream data)
            {
                //On completion, process the InputStream to store temp files
             
              return processData(checker,update,downloader,data);
            }
           
        public void
        failed(
          ResourceDownloader      downloader,
          ResourceDownloaderException e )
        {
          Debug.out( downloader.getName() + " failed", e );
         
          update.complete( false );
        }
          });
      }
    }catch( Throwable e ){
      Logger.log(new LogAlert(LogAlert.UNREPEATABLE,
View Full Code Here

Examples of org.h2.command.dml.Update

        }
        return filter.getTable().getColumn(columnName);
    }

    private Update parseUpdate() {
        Update command = new Update(session);
        currentPrepared = command;
        int start = lastParseIndex;
        TableFilter filter = readSimpleTableFilter();
        command.setTableFilter(filter);
        read("SET");
        if (readIf("(")) {
            ArrayList<Column> columns = New.arrayList();
            do {
                Column column = readTableColumn(filter);
                columns.add(column);
            } while (readIf(","));
            read(")");
            read("=");
            Expression expression = readExpression();
            for (int i = 0, size = columns.size(); i < size; i++) {
                Column column = columns.get(i);
                Function f = Function.getFunction(database, "ARRAY_GET");
                f.setParameter(0, expression);
                f.setParameter(1, ValueExpression.get(ValueInt.get(i + 1)));
                f.doneWithParameters();
                command.setAssignment(column, f);
            }
        } else {
            do {
                Column column = readTableColumn(filter);
                read("=");
                Expression expression;
                if (readIf("DEFAULT")) {
                    expression = ValueExpression.getDefault();
                } else {
                    expression = readExpression();
                }
                command.setAssignment(column, expression);
            } while (readIf(","));
        }
        if (readIf("WHERE")) {
            Expression condition = readExpression();
            command.setCondition(condition);
        }
        setSQL(command, "UPDATE", start);
        return command;
    }
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.