Package org.fcrepo.server

Examples of org.fcrepo.server.Context


                                                                        String serviceDefinitionPid,
                                                                        String methodName,
                                                                        org.fcrepo.server.types.gen.GetDissemination.Parameters parameters,
                                                                        String asOfDateTime) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            org.fcrepo.server.storage.types.Property[] properties =
                    TypeUtility
                            .convertGenPropertyArrayToPropertyArray(parameters);
View Full Code Here


     */
    @Override
    public org.fcrepo.server.types.gen.ObjectProfile getObjectProfile(String pid,
                                                                      String asOfDateTime) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            org.fcrepo.server.access.ObjectProfile objectProfile =
                    m_access.getObjectProfile(context, pid, DateUtility
                            .parseDateOrNull(asOfDateTime));
View Full Code Here

    @Override
    public org.fcrepo.server.types.gen.FieldSearchResult findObjects(org.fcrepo.server.types.gen.ArrayOfString resultFields,
                                                                     java.math.BigInteger maxResults,
                                                                     org.fcrepo.server.types.gen.FieldSearchQuery query) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            String[] resultFieldsArray =
                    resultFields.getItem().toArray(new String[0]);
View Full Code Here

     * @see org.fcrepo.server.access.FedoraAPIA#getObjectHistory(String pid )*
     */
    @Override
    public List<String> getObjectHistory(String pid) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            String[] sDefs = m_access.getObjectHistory(context, pid);
            if (sDefs != null && debug) {
                for (int i = 0; i < sDefs.length; i++) {
View Full Code Here

    @Override
    public org.fcrepo.server.types.gen.MIMETypedStream getDatastreamDissemination(String pid,
                                                                                  String dsID,
                                                                                  String asOfDateTime) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            org.fcrepo.server.storage.types.MIMETypedStream mimeTypedStream =
                    m_access.getDatastreamDissemination(context,
                                                        pid,
View Full Code Here

     * @see org.fcrepo.server.access.FedoraAPIA#describeRepository(*
     */
    @Override
    public org.fcrepo.server.types.gen.RepositoryInfo describeRepository() {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            org.fcrepo.server.access.RepositoryInfo repositoryInfo =
                    m_access.describeRepository(context);
            org.fcrepo.server.types.gen.RepositoryInfo genRepositoryInfo =
View Full Code Here

     */
    @Override
    public List<org.fcrepo.server.types.gen.ObjectMethodsDef> listMethods(String pid,
                                                                          String asOfDateTime) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            org.fcrepo.server.storage.types.ObjectMethodsDef[] objectMethodDefs =
                    m_access.listMethods(context, pid, DateUtility
                            .parseDateOrNull(asOfDateTime));
View Full Code Here

     * sessionToken )*
     */
    @Override
    public org.fcrepo.server.types.gen.FieldSearchResult resumeFindObjects(String sessionToken) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            org.fcrepo.server.search.FieldSearchResult result =
                    m_access.resumeFindObjects(context, sessionToken);
            return TypeUtility
View Full Code Here

     */
    @Override
    public List<org.fcrepo.server.types.gen.DatastreamDef> listDatastreams(String pid,
                                                                           String asOfDateTime) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            org.fcrepo.server.storage.types.DatastreamDef[] datastreamDefs =
                    m_access.listDatastreams(context, pid, DateUtility
                            .parseDateOrNull(asOfDateTime));
View Full Code Here

        String contextId = getContextId(ctx);
        logger.debug("contextId=" + contextId + " attributeId=" + attributeId);
        if (contextId == null || contextId.equals("")) {
            return null;
        }
        Context context = m_contexts.getContext(contextId);
        logger.debug("got context");
        Object values = null;
        logger.debug("designatorType" + designatorType);
        switch (designatorType) {
            case AttributeDesignator.SUBJECT_TARGET:
                if (0 > context.nSubjectValues(attributeId)) {
                    values = null;
                } else {
                    logger.debug("getting n values for " + attributeId + "="
                            + context.nSubjectValues(attributeId));
                    switch (context.nSubjectValues(attributeId)) {
                        case 0:
                            values = null;
                            /*
                             * values = new String[1]; ((String[])values)[0] =
                             * Authorization.UNDEFINED;
                             */
                            break;
                        case 1:
                            values = new String[1];
                            ((String[]) values)[0] =
                                    context.getSubjectValue(attributeId);
                            break;
                        default:
                            values = context.getSubjectValues(attributeId);
                    }
                    if (logger.isDebugEnabled()) {
                        if (values == null) {
                            logger.debug("RETURNING NO VALUES FOR " + attributeId);
                        } else {
                            StringBuffer sb = new StringBuffer();
                            sb.append("RETURNING " + ((String[]) values).length
                                    + " VALUES FOR " + attributeId + " ==");
                            for (int i = 0; i < ((String[]) values).length; i++) {
                                sb.append(" " + ((String[]) values)[i]);
                            }
                            logger.debug(sb.toString());
                        }
                    }
                }
                break;
            case AttributeDesignator.ACTION_TARGET:
                if (0 > context.nActionValues(attributeId)) {
                    values = null;
                } else {
                    switch (context.nActionValues(attributeId)) {
                        case 0:
                            values = null;
                            /*
                             * values = new String[1]; ((String[])values)[0] =
                             * Authorization.UNDEFINED;
                             */
                            break;
                        case 1:
                            values = new String[1];
                            ((String[]) values)[0] =
                                    context.getActionValue(attributeId);
                            break;
                        default:
                            values = context.getActionValues(attributeId);
                    }
                }
                break;
            case AttributeDesignator.RESOURCE_TARGET:
                if (0 > context.nResourceValues(attributeId)) {
                    values = null;
                } else {
                    switch (context.nResourceValues(attributeId)) {
                        case 0:
                            values = null;
                            /*
                             * values = new String[1]; ((String[])values)[0] =
                             * Authorization.UNDEFINED;
                             */
                            break;
                        case 1:
                            values = new String[1];
                            ((String[]) values)[0] =
                                    context.getResourceValue(attributeId);
                            break;
                        default:
                            values = context.getResourceValues(attributeId);
                    }
                }
                break;
            case AttributeDesignator.ENVIRONMENT_TARGET:
                if (0 > context.nEnvironmentValues(attributeId)) {
                    values = null;
                } else {
                    switch (context.nEnvironmentValues(attributeId)) {
                        case 0:
                            values = null;
                            /*
                             * values = new String[1]; ((String[])values)[0] =
                             * Authorization.UNDEFINED;
                             */
                            break;
                        case 1:
                            values = new String[1];
                            ((String[]) values)[0] =
                                    context.getEnvironmentValue(attributeId);
                            break;
                        default:
                            values = context.getEnvironmentValues(attributeId);
                    }
                }
                break;
            default:
        }
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.