Package org.fcrepo.server

Examples of org.fcrepo.server.Context


        assertEquals(baseURL, message.getBaseUrl());
    }

    @Test
    public void testFedoraMethodConstructor() throws Exception {
        Context c = new MockContext();
        FedoraMethod fm;
        APIMMessage message;

        fm =
                new FedoraMethod(Management.class
View Full Code Here


        message = new AtomAPIMMessage(fm, baseURL, Server.VERSION, messageFormat);
    }

    @Test
    public void testRoundTrip() throws Exception {
        Context context = new MockContext();
        Method method =
                Management.class.getDeclaredMethod("purgeObject", new Class[]{
                        Context.class, String.class, String.class});
        Object returnValue = "return";
View Full Code Here

    public Datastream() {
    }

    public InputStream getContentStream() throws StreamIOException {
        Context context = null;
        try {
            context = ReadOnlyContext.getContext(null, null, "", false);
        }
        catch (Throwable t){
            context = null;
View Full Code Here

            while (enm.hasMoreElements()) {
                String name = (String) enm.nextElement();
                params.put(name, request.getParameter(name));
            }
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            Context context =
                    ReadOnlyContext.getContext(Constants.HTTP_REQUEST.REST.uri,
                                               request);
            try {
                getResponder().respond(context, params, out);
            } catch (AuthzException ae) {
View Full Code Here

        doGet(request, response);
    }

    public void test(String[] args) throws OAIException, RepositoryException {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        Context context =
                ReadOnlyContext.getContext(Constants.HTTP_REQUEST.REST.uri,
                                           null);
        try {
            getResponder().respond(context, getAsParameterMap(args), out);
        } catch (AuthzOperationalException aoe) {
View Full Code Here

        try {
            if (isGetObjectProfileRequest) {
                logger.debug("Servicing getObjectProfile request " + "(PID="
                        + PID + ", asOfDate=" + versDateTime + ")");

                Context context =
                        ReadOnlyContext.getContext(HTTP_REQUEST.REST.uri,
                                                   request);
                getObjectProfile(context,
                                 PID,
                                 asOfDateTime,
                                 xml,
                                 request,
                                 response);

                logger.debug("Finished servicing getObjectProfile request");
            } else if (isGetDisseminationRequest) {
                sDefPID = URIArray[6];
                logger.debug("Servicing getDissemination request (PID=" + PID
                        + ", sDefPID=" + sDefPID + ", methodName=" + methodName
                        + ", asOfDate=" + versDateTime + ")");

                Context context =
                        ReadOnlyContext.getContext(HTTP_REQUEST.REST.uri,
                                                   request);
                getDissemination(context,
                                 PID,
                                 sDefPID,
                                 methodName,
                                 userParms,
                                 asOfDateTime,
                                 response,
                                 request);

                logger.debug("Finished servicing getDissemination request");
            } else if (isGetDatastreamDisseminationRequest) {
                logger.debug("Servicing getDatastreamDissemination request "
                        + "(PID=" + PID + ", dsID=" + dsID + ", asOfDate="
                        + versDateTime + ")");

                Context context =
                        ReadOnlyContext.getContext(HTTP_REQUEST.REST.uri,
                                                   request);
                getDatastreamDissemination(context,
                                           PID,
                                           dsID,
View Full Code Here

            @DefaultValue("rdf/xml")
            String format,
            @QueryParam(RestParam.FLASH)
            @DefaultValue("false")
            boolean flash) {
        Context context = getContext();
        if (subject == null) {
            // assume the subject is the object as denoted by the pid
            subject = PID.toURI(pid);
        }
        try {
View Full Code Here

            @QueryParam(RestParam.DATATYPE)
            String datatype,
            @QueryParam(RestParam.FLASH)
            @DefaultValue("false")
            boolean flash) {
        Context context = getContext();
        try {
            if (subject == null) {
                // assume the subject is the object as denoted by the pid
                subject = PID.toURI(pid);
            }
View Full Code Here

            @QueryParam(RestParam.DATATYPE)
            String datatype,
            @QueryParam(RestParam.FLASH)
            @DefaultValue("false")
            boolean flash) {
        Context context = getContext();
        try {
            if (subject == null) {
                // assume the subject is the object as denoted by the pid
                subject = PID.toURI(pid);
            }
View Full Code Here

                                    @QueryParam(RestParam.VALIDATE_CHECKSUM) @DefaultValue("false") boolean validateChecksum
                                    ) {

        try {
            Date asOfDateTime = DateUtility.parseDateOrNull(dateTime);
            Context context = getContext();
            MediaType mime = RestHelper.getContentType(format);

            String output;

            if (profiles){
View Full Code Here

TOP

Related Classes of org.fcrepo.server.Context

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.