Examples of Target


Examples of org.eclipse.orion.server.cf.objects.Target

            } catch (Exception e) {
              // do nothing
            }
          }

          Target target = CFActivator.getDefault().getTargetRegistry().getTarget(userId, targetUrl);
          if (target == null) {
            return HttpUtil.createErrorStatus(IStatus.WARNING, "CF-TargetNotSet", "Target not set");
          }

          return new GetInfoCommand(this.userId, target.getCloud()).doIt();
        } catch (Exception e) {
          String msg = NLS.bind("Failed to handle request for {0}", path); //$NON-NLS-1$
          ServerStatus status = new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg, e);
          logger.error(msg, e);
          return status;
View Full Code Here

Examples of org.eclipse.tycho.model.Target

            } catch (URISyntaxException e) {
                getLogger().warn("Could not parse repository URL", e);
            }
        }

        Target target = configuration.getTarget();

        if (target != null) {
            Set<URI> uris = new HashSet<URI>();

            for (Target.Location location : target.getLocations()) {
                String type = location.getType();
                if (!"InstallableUnit".equalsIgnoreCase(type)) {
                    getLogger().warn("Target location type: " + type + " is not supported");
                    continue;
                }
View Full Code Here

Examples of org.eweb4j.spiderman.xml.Target

//    System.out.println("parse.next->"+page.getUrl());
    Model mdl = rule.getNextPage();
    if (mdl == null)
      return ;
   
    Target tgt = new Target();
    tgt.setName(target.getName());
    tgt.setModel(mdl);
   
    //解析Model获得next URL
//    System.out.println("page--!!!!!!----->"+page.getUrl());
    Collection<String> nextUrls = UrlUtils.digUrls(page, task, rule, tgt, listener, finalFields);
//    System.out.println("visitedUrls-->>>>>>>>>>>>!!!!!!!!!!!!!!" + visitedUrls);
//    System.out.println("nextUrls-->>>>>>>>>>>>!!!!!!!!!!!!!!" + nextUrls);
    if (nextUrls == null || nextUrls.isEmpty())
      return ;
    String nextUrl = new ArrayList<String>(nextUrls).get(0);
    if (nextUrl == null || nextUrl.trim().length() == 0)
      return ;
   
    if (visitedUrls.contains(nextUrl)){
      return ;
    }
   
    FetchRequest req = new FetchRequest();
    req.setUrl(nextUrl);
    FetchResult fr = task.site.fetcher.fetch(req);
    if (fr == null || fr.getPage() == null)
      return ;
   
    //记录已经访问过该url,下次不要重复访问它
    visitedUrls.add(nextUrl);
   
    //解析nextPage
    Task nextTask = new Task(nextUrl, task.url, task.site, 0);
    Model nextModel = new Model();
    List<Field> isAlsoParseInNextPageFields = target.getModel().getIsAlsoParseInNextPageFields();
    if (isAlsoParseInNextPageFields == null || isAlsoParseInNextPageFields.isEmpty())
      return ;
   
    nextModel.getField().addAll(isAlsoParseInNextPageFields);
    tgt.setModel(nextModel);
   
    ModelParser parser = new ModelParser(nextTask, tgt, listener);
    Page nextPageResult = fr.getPage();
    List<Map<String, Object>> nextMaps = parser.parse(nextPageResult);
    if (nextMaps == null)
View Full Code Here

Examples of org.fnlp.nlp.parser.Target

   
    //preReader为了把ysize定下来
    la.lookupIndex("S");
    while(preReader.hasNext()){
      Sentence sent = (Sentence) preReader.next();
      Target targets = (Target)sent.getTarget();
      for(int i=0; i<sent.length(); i++){
        String label;
        if(targets.getHead(i) != -1){
          if(targets.getHead(i) < i){
            label = "L" + targets.getDepClass(i);
          }
          //else if(targets.getHead(i) > i){
          else{
            label = "R" + targets.getDepClass(i);
          }
          la.lookupIndex(label);
        }
      }
    }
    int ysize = la.size();
    la.setStopIncrement(true);
       
    while (reader.hasNext()) {
      Sentence sent = (Sentence) reader.next();
      //  int[] heads = (int[]) instance.getTarget();
      String depClass = null;
      Target targets = (Target)sent.getTarget();
      JointParsingState state = new JointParsingState(sent);
     
      while (!state.isFinalState()) {
        // 左右焦点词在句子中的位置
        int[] lr = state.getFocusIndices();

        ArrayList<String> features = state.getFeatures();
        JointParsingState.Action action = getAction(lr[0], lr[1],
            targets);
        switch (action) {
        case LEFT:
          depClass = targets.getDepClass(lr[1]);
          break;
        case RIGHT:
          depClass = targets.getDepClass(lr[0]);
          break;
        default:

        }
        state.next(action,depClass);
        if (action == JointParsingState.Action.LEFT)
          targets.setHeads(lr[1],-1);
        if (action == JointParsingState.Action.RIGHT)
          targets.setHeads(lr[0],-1);
        String label = "";
        switch (action) {
        case LEFT:
          label += "L"+sent.getDepClass(lr[1]);   
          break;
View Full Code Here

Examples of org.glassfish.internal.api.Target

     * @param context information
     */

    @Override
    public void execute(AdminCommandContext context) {
        final Target targetUtil = services.getService(Target.class ) ;
        final Config config = targetUtil.getConfig(target ) ;
        final ActionReport report = context.getActionReport();

        IiopService iiopService = config.getExtensionByType(IiopService.class);

        // ensure we don't already have one of this name
View Full Code Here

Examples of org.jboss.as.logging.handlers.console.Target

    @Override
    public void validateParameter(final String parameterName, final ModelNode value) throws OperationFailedException {
        super.validateParameter(parameterName, value);
        if (value.isDefined()) {
            final Target target = Target.fromString(value.asString());
            if (target == null || !allowedValues.contains(target)) {
                throw new OperationFailedException(new ModelNode().set(MESSAGES.invalidTargetName(allowedValues)));
            }
        }
    }
View Full Code Here

Examples of org.jboss.ws.extensions.security.Target

   private LinkedList buildOperations()
   {
      List targets = new ArrayList();
      QName name = new QName("http://org.jboss.ws/2004", "echoString2");
      Target target = new QNameTarget(name);
      targets.add(target);
      name = new QName("http://org.jboss.ws/2004", "someHeader");
      target = new QNameTarget(name);
      targets.add(target);
      targets.add(new WsuIdTarget("timestamp"));
View Full Code Here

Examples of org.jitterbit.integration.data.entity.Target

            DataLocationType type = location.getDataLocationType();
            return StructureLocationAssociations.hasAssociatedStructure(type);
        }

        private static void checkTarget(Transformation tx, TransformationPipelineBrowser browser) {
            Target target = browser.getTarget();
            if (isApplicable(target)) {
                tx.setTargetId(target.getID());
            }
        }
View Full Code Here

Examples of org.jooq.util.jaxb.Target

        // Some default values for optional elements to avoid NPE's
        if (g.getStrategy() == null)
            g.setStrategy(new Strategy());
        if (g.getTarget() == null)
            g.setTarget(new Target());

        try {

            // Initialise connection
            // ---------------------
View Full Code Here

Examples of org.jpokemon.battle.Target

  public void effect(Slot user, Slot enemy, int damage) {
    if (chance < Math.random())
      return; // didn't hit

    MoveEffectType type = MoveEffectType.valueOf(this.type);
    Target target = Target.valueOf(this.target);

    Pokemon pokemon = target == Target.SELF ? user.leader() : enemy.leader();

    if (type.isStatModifier())
      pokemon.getStat(StatType.valueOf(type.toString())).effect(power);
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.