Examples of replace()


Examples of org.sonatype.sisu.goodies.common.io.FileReplacer.replace()

      // perform the "safe save"
      getLogger().debug("Saving configuration: {}", file);
      final FileReplacer fileReplacer = new FileReplacer(file);
      fileReplacer.setDeleteBackupFile(true);

      fileReplacer.replace(new ContentWriter()
      {
        @Override
        public void write(final BufferedOutputStream output)
            throws IOException
        {
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.replace()

    @Override
    public void initialize(ConfigurableApplicationContext applicationContext) {
        MutablePropertySources propertySources = applicationContext.getEnvironment().getPropertySources();
        MockPropertySource mockEnvVars = new MockPropertySource().withProperty("bookService.port", PortFactory.findFreePort());
        propertySources.replace(StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME, mockEnvVars);
    }
}
View Full Code Here

Examples of org.waveprotocol.wave.model.document.AnnotationBehaviour.replace()

  private boolean interpretReplace(String key, ContentType type, Builder builder,
      StringMap<Object> inside, StringMap<Object> outside, StringMap<Object> current,
      StringMap<String> changeCollector) {
    AnnotationBehaviour logic = annotationLogic.getClosestBehaviour(key);
    if (logic != null) {
      switch (logic.replace(inside, outside, type)) {
        case INSIDE :
          return safeSet(builder, key, inside.get(key), current.get(key), changeCollector);
        case OUTSIDE :
          return safeSet(builder, key, outside.get(key), current.get(key), changeCollector);
        case NEITHER :
View Full Code Here

Examples of org.xbill.DNS.Update.replace()

        final List<Message> replies = new LinkedList<Message>();

        Name zone = Name.fromString("dyn.test.example.");
        Name host = Name.fromString("host", zone);
        Update message = new Update(zone);
        message.replace(host, Type.A, 3600, "1.2.3.4");

        Query query = TestUtils.getQuery(replies, message);
        ResolveTask task = new ResolveTask(query);
        task.setCache(TestUtils.getEhcache());
        task.setBackendStore(new BackendRepository() {
View Full Code Here

Examples of org.xmlBlaster.contrib.InfoHelper.replace()

      info.put("dbs.encodingName", encodingName);
     
      InfoHelper helper = new InfoHelper(info);
     
      tmp = "CREATE TABLE ${dbs.table} (${dbs.contextName} VARCHAR(255), ${dbs.keyName} VARCHAR(255), ${dbs.valueName} VARCHAR(255), ${dbs.typeName} VARCHAR(16), ${dbs.encodingName} VARCHAR(16), PRIMARY KEY (${dbs.contextName}, ${dbs.keyName}))";
      createSql = helper.replace(info.get("dbs.createSql", tmp));
      createTableOrReadColumnNames(originalNames, info);

     
      log.fine("create statement: '" + createSql + "'");
      tmp = "UPDATE ${dbs.table} SET ${dbs.valueName}=?, ${dbs.typeName}=?, ${dbs.encodingName}=? WHERE ${dbs.contextName}=? AND ${dbs.keyName}=?";
View Full Code Here

Examples of org.xmlBlaster.util.ReplaceVariable.replace()

  
   private String replaceVariables(String template) {
      if (!replaceTokens) return template;
     
      ReplaceVariable r = new ReplaceVariable();
      String result = r.replace(template,
         new I_ReplaceVariable() {
            public String get(String key) {
               return glob.getProperty().get(key, key);
            }
         });
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.toplevel.GoImportDeclarations.replace()

            final PsiElement newImport = getNewImport(da, startElement.getText(), (GoFile) file);
            if (newImport != null) {
                WriteCommandAction writeCommandAction = new WriteCommandAction(file.getProject()) {
                    @Override
                    protected void run(@NotNull Result result) throws Throwable {
                        declarations.replace(newImport);
                    }
                };
                writeCommandAction.execute();
                return;
            }
View Full Code Here

Examples of rocket.widget.client.Hijacker.replace()

      final InlineStyle elementInlineStyle = InlineStyle.getInlineStyle(element);
      elementInlineStyle.setString(Css.POSITION, "relative");
      elementInlineStyle.setInteger(Css.LEFT, 0, CssUnit.PX);
      elementInlineStyle.setInteger(Css.TOP, 0, CssUnit.PX);

      hijacker.replace(element);

      element.appendChild(widgetElement);
    }

    /**
 
View Full Code Here

Examples of water.fvec.Frame.replace()

      if (max_k > predict.numCols()-1) {
        Log.warn("Reducing Hitratio Top-K value to maximum value allowed: " + String.format("%,d", predict.numCols() - 1));
        max_k = predict.numCols() - 1;
      }
      final Frame actual_predict = new Frame(predict.names().clone(), predict.vecs().clone());
      actual_predict.replace(0, va); // place actual labels in first column
      hit_ratios = new HitRatioTask(max_k, seed).doAll(actual_predict).hit_ratios();
    } finally {       // Delete adaptation vectors
      if (va!=null) DKV.remove(va._key);
    }
  }
View Full Code Here

Examples of water.util.RString.replace()

    case xml:  //return new Response(http_code, MIME_XML , new String(S.writeXML (new AutoBuffer()).buf()));
    case java:
      throw H2O.unimpl();
    case html: {
      RString html = new RString(_htmlTemplate);
      html.replace("CONTENTS", s.writeHTML(new water.util.DocGen.HTML()).toString());
      return new Response(http_code, MIME_HTML, html.toString());
    }
    default:
      throw H2O.fail();
    }
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.