Package org.apache.abdera.ext.features

Examples of org.apache.abdera.ext.features.FeatureSelector


   
    // Select a collection by feature support status
    Collection[] selectedCollections =
      FeaturesHelper.select(
        service,
        new FeatureSelector(
          FeaturesHelper.FEATURE_DRAFTS,
          FeaturesHelper.ABDERA_FEATURE_BIDI));
    System.out.println("Selected Collections:");
    for (Collection selected : selectedCollections)
      System.out.println("\t" + selected.getTitle());
View Full Code Here


            System.out.println("\t" + feature.getRef());
        }

        // Select a collection by feature
        Collection[] selectedCollections =
            FeaturesHelper.select(service, new FeatureSelector(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS,
                                                               FeaturesHelper.FEATURE_SUPPORTS_BIDI));
        System.out.println("Selected Collections:");
        for (Collection selected : selectedCollections)
            System.out.println("\t" + selected.getTitle());
View Full Code Here

        Features features = FeaturesHelper.addFeaturesElement(collection1);
        features.addFeature(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS);
        Collection collection2 = workspace.addCollection("a2", "a2");
        collection2.setAccept("image/*");

        Selector s1 = new FeatureSelector(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS);

        Collection[] collections = FeaturesHelper.select(service, s1);

        assertEquals(1, collections.length);
        assertEquals(collections[0], collection1);
View Full Code Here

    Features features = FeaturesHelper.addFeaturesElement(collection1);
    features.addFeature(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS);
    Collection collection2 = workspace.addCollection("a2","a2");
    collection2.setAccept("image/*");
   
    Selector s1 = new FeatureSelector(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS);
   
    Collection[] collections = FeaturesHelper.select(service, s1);
   
    assertEquals(1,collections.length);
    assertEquals(collections[0],collection1);
View Full Code Here

   
    // Select a collection by feature
    Collection[] selectedCollections =
      FeaturesHelper.select(
        service,
        new FeatureSelector(
          FeaturesHelper.FEATURE_SUPPORTS_DRAFTS,
          FeaturesHelper.FEATURE_SUPPORTS_BIDI));
    System.out.println("Selected Collections:");
    for (Collection selected : selectedCollections)
      System.out.println("\t" + selected.getTitle());
View Full Code Here

    collection1.setAcceptsEntry();
    FeaturesHelper.addFeature(collection1, FeaturesHelper.FEATURE_DRAFTS);
    Collection collection2 = workspace.addCollection("a2","a2");
    collection2.setAccept("image/*");
   
    Selector s1 = new FeatureSelector(FeaturesHelper.FEATURE_DRAFTS);
   
    Collection[] collections = FeaturesHelper.select(service, s1);
   
    assertEquals(1,collections.length);
    assertEquals(collections[0],collection1);
View Full Code Here

TOP

Related Classes of org.apache.abdera.ext.features.FeatureSelector

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.