Package org.fcrepo.server.storage

Examples of org.fcrepo.server.storage.MockRepositoryReader


        ValidationUtility.setPolicyParser(parser);
        ValidationUtility.validateReservedDatastreams(getDOReader(dsData));
    }

    private static DOReader getDOReader(String[] dsData) {
        MockRepositoryReader repo = new MockRepositoryReader();
        try {
            DigitalObject obj = new BasicDigitalObject();
            obj.setPid(TEST_PID);
            for (int i = 0; i < dsData.length; i+=2) {
                ObjectBuilder.addXDatastream(obj, dsData[i], dsData[i+1]);
            }
            repo.putObject(obj);
            DOReader reader = repo.getReader(false, ReadOnlyContext.EMPTY, TEST_PID);
            return reader;
        } catch (Exception wontHappen) {
            throw new FaultException(wontHappen);
        }
    }
View Full Code Here


        if (riLevel == 0) {
            return new HashSet<Triple>();
        }

        // add all to a mock repository reader
        MockRepositoryReader repo = new MockRepositoryReader();
        for (DigitalObject obj : objects) {
            repo.putObject(obj);
        }

        // prepare appropriate MethodInfoStore and TripleGenerator
        TripleGenerator generator = new ModelBasedTripleGenerator();
View Full Code Here

    /**
     * @throws java.lang.Exception
     */
    @Before
    public void setUp() throws Exception {
        MockRepositoryReader mockRepositoryReader = new MockRepositoryReader();
        mockRepositoryReader.putObject(ObjectConstructor.produceContentModel1());
        mockRepositoryReader.putObject(ObjectConstructor.produceContentModel2());
        mockRepositoryReader.putObject(ObjectConstructor.produceContentModel3());
        mockRepositoryReader.putObject(ObjectConstructor.produceContentModel30());
        mockRepositoryReader.putObject(ObjectConstructor.producefedoraObject30());
        mockRepositoryReader.putObject(ObjectConstructor.produceDataObject1());
        mockRepositoryReader.putObject(ObjectConstructor.produceDataObject2());
        mockRepositoryReader.putObject(ObjectConstructor.produceDataObject3());

        mockRepositoryReader.putObject(ObjectConstructor.produceDataObject5());
        mockRepositoryReader.putObject(ObjectConstructor.produceDataObject6());
        mockRepositoryReader.putObject(ObjectConstructor.produceDataObject7());
        mockRepositoryReader.putObject(ObjectConstructor.produceDataObject8());
        reader = mockRepositoryReader;
    }
View Full Code Here

    }

    private void init(int maxResults,
                      int maxSecondsPerSession,
                      boolean indexDCFields) throws Exception {
        m_repo = new MockRepositoryReader();
        m_impl = new FieldSearchSQLImpl(cPool,
                                        m_repo,
                                        maxResults,
                                        maxSecondsPerSession,
                                        indexDCFields);
View Full Code Here

TOP

Related Classes of org.fcrepo.server.storage.MockRepositoryReader

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.