Examples of Builder


Examples of eu.mosaic_cloud.platform.interop.idl.IdlCommon.Error.Builder

  {
    Message message;
    this.logger.trace ("MemcachedTransmitter: send response for " + operation + " request " + token.getMessageId () + " client id " + token.getClientId ());
    if (isError) {
      // NOTE: create error message
      final Builder errorPayload = IdlCommon.Error.newBuilder ();
      errorPayload.setToken (token);
      errorPayload.setErrorMessage (result.toString ());
      message = new Message (KeyValueMessage.ERROR, errorPayload.build ());
    } else {
      switch (operation) {
        case ADD :
        case APPEND :
        case REPLACE :
View Full Code Here

Examples of eu.planets_project.services.datatypes.DigitalObject.Builder

            }
          }
            log.info("OAIDigitalObjectManagerDCImpl retrieveAll() found idurl: " + url);
          if (url != null) {
                resultList.add(URI.create(url));
            Builder builder = new DigitalObject.Builder(Content.byReference(new URL(url)));
            builder.title(title);
            String filename = "";
                  if(url != null) {
                      filename = URI.create(url).getPath();
                      log.info("OAIDigitalObjectManagerKBImpl list() filename: " + filename);
                      if(filename != null) {
                          String[] parts = filename.split("/");
                          if( parts != null && parts.length > 0 )
                            filename = parts[parts.length-1];
                      }
                  }
                  log.info("OAIDigitalObjectManagerKBImpl list() filename: " + filename +
                      ", pdURI.toString(): " + pdURI.toString() + ", url: " + url);

                   URI permanentUri = URI.create(getBaseRegistryURI() +"/"+ filename).normalize();           
            builder.permanentUri(permanentUri);
            builder.metadata(new Metadata(namespaceURI, record.getMetadataAsString()));
              long endtime = System.currentTimeMillis();
              log.info("OAIDigitalObjectManagerDCImpl retrieve() timediff: " + (endtime - starttime));
            DigitalObject o = builder.build();
            if (url != null && !leafMap.containsKey(URI.create(url))) {
                log.info("OAIDigitalObjectManagerDCImpl retrieve() add to map uri: " + URI.create(url));
              leafMap.put(URI.create(url), o);
            }
          }
View Full Code Here

Examples of eu.planets_project.services.datatypes.Parameter.Builder

    value = currentNode.getNodeValue();
      }
  }
  final String parameterName = getAttributeValue(parameterElement,
    Constants.NAME_ATTRIBUTE);
  final Builder parameterBuilder = new Builder(parameterName, value);
  parameterBuilder.description(description);

  return parameterBuilder.build();
    }
View Full Code Here

Examples of eu.planets_project.services.datatypes.ServiceDescription.Builder

             */
            String[] split = metadataType.sample.split("\\.");
            String extension = split[split.length - 1];
            inputFormats.addAll(formatRegistry.getUrisForExtension(extension));
        }
        Builder builder = new ServiceDescription.Builder("New Zealand Metadata Extractor Service",
                Characterise.class.getName());
        builder.author("Fabian Steeg");
        builder.classname(this.getClass().getName());
        builder
                .description("Metadata extraction service based on the Metadata Extraction Tool of the National "
                        + "Library of New Zealand (patched 3.4GA).");
        builder.serviceProvider("The Planets Consortium");
        builder.tool(Tool.create(null, "New Zealand Metadata Extractor", "3.4GA (patched)", null,
                "http://meta-extractor.sourceforge.net/"));
        builder
                .furtherInfo(URI
                        .create("http://sourceforge.net/tracker/index.php?func=detail&aid=2027729&group_id=189407"
                                + "&atid=929202"));
        builder.inputFormats(inputFormats.toArray(new URI[] {}));
        return builder.build();
    }
View Full Code Here

Examples of fitnesse.FitNesseContext.Builder

    return !dontExitAfterSingleCommand;
  }

  private static FitNesseContext loadContext(Arguments arguments)
      throws Exception {
    Builder builder = new Builder();
    WikiPageFactory wikiPageFactory = new WikiPageFactory();
    ComponentFactory componentFactory = new ComponentFactory(
        arguments.getRootPath());

    builder.port = arguments.getPort();
    builder.rootPath = arguments.getRootPath();
    builder.rootDirectoryName = arguments.getRootDirectory();

    builder.pageTheme = componentFactory
        .getProperty(ComponentFactory.THEME);
    builder.defaultNewPageContent = componentFactory
        .getProperty(ComponentFactory.DEFAULT_NEWPAGE_CONTENT);

    builder.root = wikiPageFactory.makeRootPage(builder.rootPath,
        builder.rootDirectoryName, componentFactory);

    builder.logger = makeLogger(arguments);
    builder.authenticator = makeAuthenticator(arguments.getUserpass(),
        componentFactory);

    FitNesseContext context = builder.createFitNesseContext();

    extraOutput = componentFactory.loadPlugins(context.responderFactory,
        wikiPageFactory);
    extraOutput += componentFactory.loadWikiPage(wikiPageFactory);
    extraOutput += componentFactory
View Full Code Here

Examples of heart.xtt.Type.Builder

  }
 
  protected Type createTypeWithDomain(List<Value> domain)
      throws BuilderException {
    SetValue domainValue = new SetValue(domain);
    Builder builder = createBuilderParameters(domainValue);

    return builder.build();
  }
View Full Code Here

Examples of hudson.tasks.Builder

        /**
         * Creates a builder that blocks until the latch opens.
         */
        public Builder createBuilder() {
            return new Builder() {
                public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
                    block();
                    return true;
                }
            };
View Full Code Here

Examples of io.airlift.http.client.Request.Builder

        }

        try {
            ServiceDescriptorsRepresentation serviceDescriptorsRepresentation;
            if (serviceInventoryUri.getScheme().toLowerCase().startsWith("http")) {
                Builder requestBuilder = prepareGet()
                        .setUri(serviceInventoryUri)
                        .setHeader("User-Agent", nodeInfo.getNodeId());
                serviceDescriptorsRepresentation = httpClient.execute(requestBuilder.build(), createJsonResponseHandler(serviceDescriptorsCodec));
            }
            else {
                File file = new File(serviceInventoryUri);
                serviceDescriptorsRepresentation = serviceDescriptorsCodec.fromJson(readAllBytes(file.toPath()));
            }
View Full Code Here

Examples of io.reactivex.netty.client.RxClient.ClientConfig.Builder

    }

    @Test
    public void testTimeout() throws Exception {
        int timeoutMillis = 10;
        RxClient.ClientConfig clientConfig = new Builder(null)
                .readTimeout(timeoutMillis, TimeUnit.MILLISECONDS).build();
        HttpClient<ByteBuf, ByteBuf> client = new HttpClientBuilder<ByteBuf, ByteBuf>("localhost", port)
                .config(clientConfig).build();
        Observable<HttpClientResponse<ByteBuf>> response =
                client.submit(HttpClientRequest.createGet("test/timeout?timeout=" + timeoutMillis * 2 /*Create bigger wait than timeout*/));
 
View Full Code Here

Examples of io.searchbox.client.config.HttpClientConfig.Builder

                }else{
                    connectionUrls.add(urlChunk);
                }
            }
        }
        final Builder builder = new Builder(connectionUrls)
                .multiThreaded(true);
       
        builder.gson(JestRichResult.createGsonWithDateFormat());
        HttpClientConfig clientConfig = builder.build();

        // Construct a new Jest client according to configuration via factory
        JestClientFactory factory = new JestClientFactory();
        factory.setHttpClientConfig(clientConfig);
        return factory.getObject();
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.