Package org.apache.abdera.ext.features

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


        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);

        Selector s2 = new AcceptSelector("image/png");

        collections = FeaturesHelper.select(service, s2);

        assertEquals(1, collections.length);
        assertEquals(collections[0], collection2);

        Selector s3 = new XPathSelector("f:features/f:feature[@ref='" + FeaturesHelper.FEATURE_SUPPORTS_DRAFTS + "']");

        collections = FeaturesHelper.select(service, s3);

        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);
   
    Selector s2 = new AcceptSelector("image/png");
   
    collections = FeaturesHelper.select(service,s2);
   
    assertEquals(1,collections.length);
    assertEquals(collections[0],collection2);
   
    Selector s3 = new XPathSelector(
      "f:features/f:feature[@ref='" + FeaturesHelper.FEATURE_SUPPORTS_DRAFTS + "']");
   
    collections = FeaturesHelper.select(service,s3);
   
    assertEquals(1,collections.length);
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);
   
    Selector s2 = new AcceptSelector("image/png");
   
    collections = FeaturesHelper.select(service,s2);
   
    assertEquals(1,collections.length);
    assertEquals(collections[0],collection2);
   
    Selector s3 = new XPathSelector(
      "f:feature[@ref='http://www.w3.org/2007/app/drafts']");
   
    collections = FeaturesHelper.select(service,s3);
   
    assertEquals(1,collections.length);
View Full Code Here

TOP

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

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.