Examples of GetDatastream()


Examples of org.fcrepo.server.storage.DOReader.GetDatastream()

        //For each content model, parse the DS-COMPOSITE-MODEL
        for (String contentmodel : contentmodels) {
            contentmodel = contentmodel.substring("info:fedora/".length());

            DOReader contentmodelReader = doMgr.getReader(false, context, contentmodel);
            Datastream dscompmodelDS = contentmodelReader.GetDatastream("DS-COMPOSITE-MODEL", asOfDateTime);

            if (dscompmodelDS == null) {//NO ds composite model, thats okay, continue to next content model
                continue;
            }
            DsCompositeModel dscompobject = JAXB.unmarshal(dscompmodelDS.getContentStream(), DsCompositeModel.class);
View Full Code Here

Examples of org.fcrepo.server.storage.DOReader.GetDatastream()

                if (!contentmodelReader.getCreateDate().before(asOfDateTime)) {
                    continue;
                }
            }

            Datastream ontologyDS = contentmodelReader.GetDatastream("ONTOLOGY", asOfDateTime);

            if (ontologyDS == null) {//No ontology in the content model, continue
                continue;
            }
            InputStream ontologyStream = ontologyDS.getContentStream();
View Full Code Here

Examples of org.fcrepo.server.storage.DOReader.GetDatastream()

        ArrayList<String> names = new ArrayList<String>();
        if (contentmodel.startsWith("info:fedora/")) {
            contentmodel = contentmodel.substring("info:fedora/".length());
        }
        DOReader reader = doMgr.getReader(false, context, contentmodel);
        Datastream dscompmodelDS = reader.GetDatastream("DS-COMPOSITE-MODEL", asOfDateTime);
        if (dscompmodelDS == null) {//NO ds composite model, thats okay, continue to next content model
            return names;
        }
        DsCompositeModel dscompobject = JAXB.unmarshal(dscompmodelDS.getContentStream(context), DsCompositeModel.class);
View Full Code Here

Examples of org.fcrepo.server.storage.DOReader.GetDatastream()

        MIMETypedStream mimeTypedStream = null;
        long startTime = new Date().getTime();
        DOReader reader =
                m_manager.getReader(Server.USE_DEFINITIVE_STORE, context, PID);

        Datastream ds = reader.GetDatastream(dsID, asOfDateTime);
        if (ds == null) {
            String message =
                    "[DefaulAccess] No datastream could be returned. "
                    + "Either there is no datastream for the digital "
                    + "object \""
View Full Code Here

Examples of org.fcrepo.server.storage.DOReader.GetDatastream()

            throw new DatastreamNotFoundException(message);
        }

        if (ds.DSControlGrp.equalsIgnoreCase("E")) {
            DatastreamReferencedContent drc =
                    (DatastreamReferencedContent) reader
                            .GetDatastream(dsID, asOfDateTime);
            ContentManagerParams params = new ContentManagerParams(drc.DSLocation,
                                                                   drc.DSMIME, null, null);
            params.setContext(context);
            mimeTypedStream = m_externalContentManager.getExternalContent(params);
View Full Code Here

Examples of org.fcrepo.server.storage.DOReader.GetDatastream()

                                                                   drc.DSMIME, null, null);
            params.setContext(context);
            mimeTypedStream = m_externalContentManager.getExternalContent(params);
        } else if (ds.DSControlGrp.equalsIgnoreCase("M")) {
            DatastreamManagedContent dmc =
                    (DatastreamManagedContent) reader
                            .GetDatastream(dsID, asOfDateTime);

            mimeTypedStream = new MIMETypedStream(ds.DSMIME, dmc.getContentStream(context), null,ds.DSSize);
        } else if (ds.DSControlGrp.equalsIgnoreCase("X")) {
            DatastreamXMLMetadata dxm =
View Full Code Here

Examples of org.fcrepo.server.storage.DOReader.GetDatastream()

                            .GetDatastream(dsID, asOfDateTime);

            mimeTypedStream = new MIMETypedStream(ds.DSMIME, dmc.getContentStream(context), null,ds.DSSize);
        } else if (ds.DSControlGrp.equalsIgnoreCase("X")) {
            DatastreamXMLMetadata dxm =
                    (DatastreamXMLMetadata) reader.GetDatastream(dsID,
                                                                 asOfDateTime);
            mimeTypedStream = new MIMETypedStream(ds.DSMIME, dxm.getContentStream(context), null, ds.DSSize);
        } else if (ds.DSControlGrp.equalsIgnoreCase("R")) {
            DatastreamReferencedContent drc =
                    (DatastreamReferencedContent) reader
View Full Code Here

Examples of org.fcrepo.server.storage.DOReader.GetDatastream()

                    (DatastreamXMLMetadata) reader.GetDatastream(dsID,
                                                                 asOfDateTime);
            mimeTypedStream = new MIMETypedStream(ds.DSMIME, dxm.getContentStream(context), null, ds.DSSize);
        } else if (ds.DSControlGrp.equalsIgnoreCase("R")) {
            DatastreamReferencedContent drc =
                    (DatastreamReferencedContent) reader
                            .GetDatastream(dsID, asOfDateTime);
            // The dsControlGroupType of Redirect("R") is a special control type
            // used primarily for streaming media. Datastreams of this type are
            // not mediated (proxied by Fedora) and their physical dsLocation is
            // simply redirected back to the client. Therefore, the contents
View Full Code Here

Examples of org.fcrepo.server.storage.DOReader.GetDatastream()

                    return null;
                }
                logger.debug("datastreamId=" + datastreamId);
                Datastream datastream;
                try {
                    datastream = reader.GetDatastream(datastreamId, new Date()); //right import (above)?
                } catch (ServerException e) {
                    logger.debug("couldn't get datastream");
                    return null;
                }
                if (datastream == null) {
View Full Code Here

Examples of org.fcrepo.server.storage.DOReader.GetDatastream()

        ObjectFields f;
        // If there's a DC record available, use SAX to parse the most
        // recent version of it into f.
        Datastream dcmd = null;
        try {
            dcmd = r.GetDatastream("DC", null);
        } catch (ClassCastException cce) {
            throw new ObjectIntegrityException("Object " + r.GetObjectPID()
                    + " has a DC datastream, but it's not inline XML.");
        }
        if (dcmd != null) {
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.