Package org.apache.abdera.protocol.server.impl

Examples of org.apache.abdera.protocol.server.impl.RegexTargetResolver$RegexTarget


  private static final Logger logger = Logger.getLogger(FeedServerProvider.class.getName());

  public FeedServerProvider() {
    this(FeedServerConfiguration.getIntance());
    // The target resolver provides the URL path mappings
    RegexTargetResolver targetResolver = new RegexTargetResolver();
    // service
    targetResolver.setPattern("/([^/#?]+)/(\\?[^#]*)?", TargetType.TYPE_SERVICE,
        AbstractManagedCollectionAdapter.PARAM_NAMESPACE);
    // categories
    targetResolver.setPattern("/([^/#?]+)/([^/#?]+);categories", TargetType.TYPE_CATEGORIES,
        AbstractManagedCollectionAdapter.PARAM_NAMESPACE,
        AbstractManagedCollectionAdapter.CATEGORY_PARAMETER);
    // feed
    targetResolver.setPattern("/([^/#?]+)/([^/#?;]+)(\\?[^#]*)?",
        TargetType.TYPE_COLLECTION, AbstractManagedCollectionAdapter.PARAM_NAMESPACE,
        AbstractManagedCollectionAdapter.PARAM_FEED);
    // entry
    targetResolver.setPattern("/([^/#?]+)/([^/#?]+)/([^/#?]+)(\\?[^#]*)?", TargetType.TYPE_ENTRY,
        AbstractManagedCollectionAdapter.PARAM_NAMESPACE,
        AbstractManagedCollectionAdapter.PARAM_FEED, AbstractManagedCollectionAdapter.PARAM_ENTRY);
    // user feed
    targetResolver.setPattern("/([^/#?]+)/user/([^/#?]+)/([^/#?;]+)(\\?[^#]*)?",
        TargetType.TYPE_COLLECTION, AbstractManagedCollectionAdapter.PARAM_NAMESPACE,
        AbstractManagedCollectionAdapter.PARAM_USER, AbstractManagedCollectionAdapter.PARAM_FEED);
    // user entry
    targetResolver.setPattern("/([^/#?]+)/user/([^/#?]+)/([^/#?]+)/([^/#?]+)(\\?[^#]*)?",
        TargetType.TYPE_ENTRY, AbstractManagedCollectionAdapter.PARAM_NAMESPACE,
        AbstractManagedCollectionAdapter.PARAM_USER, AbstractManagedCollectionAdapter.PARAM_FEED,
        AbstractManagedCollectionAdapter.PARAM_ENTRY);
  super.setTargetResolver(targetResolver);
  }
View Full Code Here

TOP

Related Classes of org.apache.abdera.protocol.server.impl.RegexTargetResolver$RegexTarget

Copyright © 2018 www.massapicom. 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.