Examples of TargetType


Examples of org.apache.abdera.protocol.server.TargetType

    RequestContext context = (RequestContext) request;
    String uri = context.getTargetPath();
    for (Pattern pattern : patterns.keySet()) {
      Matcher matcher = pattern.matcher(uri);
      if (matcher.matches()) {
        TargetType type = this.patterns.get(pattern);
        String[] fields = this.fields.get(pattern);
        return getTarget(type, context, matcher, fields);
      }
    }
    return null;
View Full Code Here

Examples of org.apache.abdera.protocol.server.TargetType

 
  public String toString() {
    StringBuilder buf = new StringBuilder();
    buf.append("Regex Target Resolver:\n");
    for (Pattern pattern : patterns.keySet()) {
      TargetType type = this.patterns.get(pattern);
      String[] fields = this.fields.get(pattern);
      buf.append(pattern.toString() + ", Type: " + type + ", Fields: " + Arrays.toString(fields));
    }
    return buf.toString();
  }
View Full Code Here

Examples of org.apache.abdera.protocol.server.TargetType

  public ResponseContext filter(
    RequestContext request,
    FilterChain chain) {
   
      Target target = request.getTarget();
      TargetType type = target.getType();
      if (type == TYPE_OPENSEARCH_DESCRIPTION) {
        return getOpenSearchDescription(request);
      } else {
        for (Entry<String,String> entry : map.entrySet()) {
          String value = target.getParameter(entry.getKey());
View Full Code Here

Examples of org.apache.abdera.protocol.server.TargetType

      Target target = request.getTarget();
      if (target == null ||
          target.getType() == TargetType.TYPE_NOT_FOUND)
        return ProviderHelper.notfound(request);
      String method = request.getMethod();
      TargetType type = target.getType();
      if (type == TargetType.TYPE_SERVICE &&
          method.equalsIgnoreCase("GET")) {
          return getServiceDocument(request);
      }
      WorkspaceManager wm = getWorkspaceManager(request);
View Full Code Here

Examples of org.apache.abdera.protocol.server.TargetType

  protected IRI resolveBase(RequestContext request) {
    return request.getBaseUri().resolve(request.getUri());
  }

  public ResponseContext request(RequestContext request) {
    TargetType type = request.getTarget().getType();
    String method = request.getMethod();
    log.debug(Messages.format("TARGET.TYPE",type));
    log.debug(Messages.format("TARGET.ID",request.getTarget().getIdentity()));
    log.debug(Messages.format("METHOD",method));
    if (method.equals("GET")) {
View Full Code Here

Examples of org.apache.abdera.protocol.server.TargetType

  }
 
  public RegexTargetResolver(Map<String, TargetType> patterns) {
    this.patterns = new HashMap<Pattern, TargetType>();
    for (String p : patterns.keySet()) {
      TargetType type = patterns.get(p);
      setPattern(p,type);
    }
  }
View Full Code Here

Examples of org.apache.abdera.protocol.server.TargetType

    RequestContext context = (RequestContext) request;
    String uri = context.getTargetPath();
    for (Pattern pattern : patterns.keySet()) {
      Matcher matcher = pattern.matcher(uri);
      if (matcher.matches()) {
        TargetType type = patterns.get(pattern);
        return getTarget(type, context, matcher);
      }
    }
    return null;
  }
View Full Code Here

Examples of org.apache.abdera.protocol.server.provider.TargetType

  }
 
  public RegexTargetResolver(Map<String, TargetType> patterns) {
    this.patterns = new HashMap<Pattern, TargetType>();
    for (String p : patterns.keySet()) {
      TargetType type = patterns.get(p);
      Pattern pattern = Pattern.compile(p);
      this.patterns.put(pattern,type);
    }
  }
View Full Code Here

Examples of org.apache.abdera.protocol.server.provider.TargetType

  public Target resolve(RequestContext request) {
    String uri = request.getUri().toString();
    for (Pattern pattern : patterns.keySet()) {
      Matcher matcher = pattern.matcher(uri);
      if (matcher.matches()) {
        TargetType type = patterns.get(pattern);
        return getTarget(type, request, matcher);
      }
    }
    return null;
  }
View Full Code Here

Examples of org.apache.abdera.protocol.server.provider.TargetType

 
  protected ResponseContext process(
    Provider provider,
    RequestContext request) {
     
      TargetType type = request.getTarget().getType();   
      TypeHandler handler = getHandler(type);
      if (handler == null) {
        String method = request.getMethod().intern();
       
        handler = getMethodHandler(type,method);
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.