Examples of Collection


Examples of org.apache.abdera.model.Collection

    workspace.setTitle(title);
    return workspace;
  }

  public Collection getCollection(String workspace, String collection) {
    Collection col = null;
    Workspace w = getWorkspace(workspace);
    if (w != null) {
      col = w.getCollection(collection);
    }
    return col;
View Full Code Here

Examples of org.apache.isis.viewer.scimpi.dispatcher.view.collection.Collection

        addElementProcessor(new AddMessage());
        addElementProcessor(new AddWarning());
        addElementProcessor(new BlockDefine());
        addElementProcessor(new BlockUse());
        addElementProcessor(new History());
        addElementProcessor(new Collection());
        addElementProcessor(new Commit());
        addElementProcessor(new ContentTag());
        addElementProcessor(new CountElements());
        addElementProcessor(new Diagnostics());
        addElementProcessor(new DebugAccessCheck());
View Full Code Here

Examples of org.apache.olingo.odata2.api.servicedocument.Collection

    assertEquals(2, workspace.getCollections().size());

    workspace = atomInfo.getWorkspaces().get(1);
    assertEquals("Sidebar Blog", workspace.getTitle().getText());
    assertEquals(1, workspace.getCollections().size());
    Collection collection = workspace.getCollections().get(0);
    assertEquals("Remaindered Links", collection.getTitle().getText());

    assertEquals(1, collection.getAcceptElements().size());
    assertEquals("application/atom+xml;type=entry", collection.getAcceptElements().get(0).getValue());

  }
View Full Code Here

Examples of org.apache.sentry.core.model.search.Collection

public class TestSearchModelAuthorizables {

  @Test
  public void testServer() throws Exception {
    Collection coll = (Collection)SearchModelAuthorizables.from("CoLleCtiOn=collection1");
    assertEquals("collection1", coll.getName());
  }
View Full Code Here

Examples of org.apache.tuscany.sca.binding.atom.collection.Collection

        }
    }   

    @Test
    public void testServiceDocumentGet() throws Exception {
        Collection resourceCollection = testService.getCustomerCollection();
        Assert.assertNotNull(resourceCollection);

        Entry postEntry = postEntry("Sponge Bob");
        Entry newEntry = resourceCollection.post(postEntry);
        postEntry = postEntry("Austin Powers");
        newEntry = resourceCollection.post(postEntry);
        postEntry = postEntry("Count Dracula");
        newEntry = resourceCollection.post(postEntry);

        // Service document
        ClientResponse res = client.get(providerURI + "/atomsvc");
        Assert.assertNotNull(res);
        try {
View Full Code Here

Examples of org.apache.wink.webdav.model.Collection

                }
            }

            if (synd instanceof SyndFeed) {
                if (property instanceof Resourcetype) {
                    ((Resourcetype)property).setCollection(new Collection());
                    response.setPropertyOk(property);
                    return;
                }
            }
View Full Code Here

Examples of org.apache.xindice.client.corba.db.Collection

      }
   }
  
   public void testGetParentCollection() {
  
      Collection parentcol = null;
     
      try {
         parentcol = col.getParentCollection();
           
         // Verify that a collection was returned
         assertNotNull(parentcol);
         assertTrue( parentcol.getName().equals(INSTANCE_NAME) );
        
      } catch ( Exception e) {
         fail( e.getMessage() );
      } finally {
         parentcol.remove();
      }
   }
View Full Code Here

Examples of org.apache.xindice.core.Collection

            container = col.getContainer(name);
            document = container.getDocument();
            return DOCUMENT;

         case COLLECTION:
            Collection c = col.getCollection(name);
            if ( c != null ) {
               collection = c;
               String tmp = parseName("/(?");
               // If we have another name recurse to handle it.
               if (! tmp.equals("")) {
View Full Code Here

Examples of org.dbxml.core.corba.db.Collection

      }
   }

   public void testGetCollection() {
  
      Collection gottencol = null;
     
      try {
     
         // Retrieve an instance of our test collection
         gottencol = db.getCollection(TEST_COLLECTION_NAME);
        
         // Verify that the correct col was returned
         assertTrue( gottencol.getName().equals(TEST_COLLECTION_NAME) );
        
         // Try getting a collection with the empty string as the name
         try {
            exceptioncaught = false;
            gottencol = db.getCollection("");
         } catch(APIException e) {
            exceptioncaught=true;
            assertTrue( e.faultCode == FaultCodes.COL_COLLECTION_NOT_FOUND );
         } finally {
            assertTrue( exceptioncaught );
         }
        
         // Try getting a collection with a bogus name
         try {
            exceptioncaught = false;
            gottencol = db.getCollection("totallybogusname");
         } catch(APIException e) {
            exceptioncaught=true;
            assertTrue( e.faultCode == FaultCodes.COL_COLLECTION_NOT_FOUND );
         } finally {
            assertTrue( exceptioncaught );
         }

      } catch (Exception e) {
         fail( e.getMessage() );
      } finally {
         gottencol.remove();
      }
   }
View Full Code Here

Examples of org.dspace.content.Collection

        //////////////////////
        Collection[] collections = Collection.findAll(c);

        for (int i = 0; i < collections.length; i++)
        {
            Collection t = collections[i];

            System.out.println("Collection " + t + " " + t.getMetadata("name"));

            // check for READ
            if (checkForPolicy(c, t, Constants.READ))
            {
                System.out.println("\tFound READ policies!");
            }
            else
            {
                System.out.println("\tNo READ policy found, adding anonymous.");
                addAnonymousPolicy(c, t, Constants.READ);
            }

            if (checkForPolicy(c, t, Constants.DEFAULT_ITEM_READ))
            {
                System.out.println("\tFound DEFAULT_ITEM_READ policies!");
            }
            else
            {
                System.out
                        .println("\tNo DEFAULT_ITEM_READ policy found, adding anonymous.");
                addAnonymousPolicy(c, t, Constants.DEFAULT_ITEM_READ);
            }

            if (checkForPolicy(c, t, Constants.DEFAULT_BITSTREAM_READ))
            {
                System.out.println("\tFound DEFAULT_BITSTREAM_READ policies!");
            }
            else
            {
                System.out
                        .println("\tNo DEFAULT_BITSTREAM_READ policy found, adding anonymous.");
                addAnonymousPolicy(c, t, Constants.DEFAULT_BITSTREAM_READ);
            }
        }

        // now ensure communities have READ policies
        Community[] communities = Community.findAll(c);

        for (int i = 0; i < communities.length; i++)
        {
            Community t = communities[i];

            System.out.println("Community " + t + " " + t.getMetadata("name"));

            // check for READ
            if (checkForPolicy(c, t, Constants.READ))
            {
                System.out.println("\tFound READ policies!");
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.