public MIMETypedStream viewObjectProfile() throws ServerException {
        try {
            ObjectProfile profile =
                    m_access.getObjectProfile(context,
                                              reader.GetObjectPID(),
                                              asOfDateTime);
            Reader in = null;
            try {
                ReadableCharArrayWriter out = new ReadableCharArrayWriter(1024);
                DefaultSerializer.objectProfileToXML(profile, asOfDateTime, out);
                out.close();
                in = out.toReader();
            } catch (IOException ioe) {
                throw new GeneralException("[DefaultDisseminatorImpl] An error has occurred. "
                        + "The error was a \""
                        + ioe.getClass().getName()
                        + "\"  . The "
                        + "Reason was \""
                        + ioe.getMessage()
                        + "\"  .");
            }
            //InputStream in = getObjectProfile().getStream();
            ReadableByteArrayOutputStream bytes =
                    new ReadableByteArrayOutputStream(4096);
            PrintWriter out =
                    new PrintWriter(
                            new OutputStreamWriter(bytes, Charset.forName("UTF-8")));
            File xslFile =
                    new File(reposHomeDir, "access/viewObjectProfile.xslt");
            Templates template =
                    XmlTransformUtility.getTemplates(xslFile);
            Transformer transformer = template.newTransformer();
            transformer.setParameter("fedora", context
                    .getEnvironmentValue(Constants.FEDORA_APP_CONTEXT_NAME));
            transformer.transform(new StreamSource(in), new StreamResult(out));
            out.close();
            return new MIMETypedStream("text/html", bytes.toInputStream(),
                    null, bytes.length());
        } catch (Exception e) {
            throw new DisseminationException("[DefaultDisseminatorImpl] had an error "
                    + "in transforming xml for viewObjectProfile. "
                    + "Underlying exception was: " + e.getMessage());
        }
    }
public MIMETypedStream viewObjectProfile ( ) throws ServerException { try { ObjectProfile profile = m_access . getObjectProfile ( context , reader . GetObjectPID ( ) , asOfDateTime ) ; Reader in = null ; try { ReadableCharArrayWriter out = new ReadableCharArrayWriter ( 1024 ) ; DefaultSerializer . objectProfileToXML ( profile , asOfDateTime , out ) ; out . close ( ) ; in = out . toReader ( ) ; } catch ( IOException ioe ) { throw new GeneralException ( "[DefaultDisseminatorImpl] An error has occurred. " + "The error was a \"" + ioe . getClass ( ) . getName ( ) + "\"  . The " + "Reason was \"" + ioe . getMessage ( ) + "\"  ." ) ; } ReadableByteArrayOutputStream bytes = new ReadableByteArrayOutputStream ( 4096 ) ; PrintWriter out = new PrintWriter ( new OutputStreamWriter ( bytes , Charset . forName ( "UTF-8" ) ) ) ; File xslFile = new File ( reposHomeDir , "access/viewObjectProfile.xslt" ) ; Templates template = XmlTransformUtility . getTemplates ( xslFile ) ; Transformer transformer = template . newTransformer ( ) ; transformer . setParameter ( "fedora" , context . getEnvironmentValue ( Constants . FEDORA_APP_CONTEXT_NAME ) ) ; transformer . transform ( new StreamSource ( in ) , new StreamResult ( out ) ) ; out . close ( ) ; return new MIMETypedStream ( "text/html" , bytes . toInputStream ( ) , null , bytes . length ( ) ) ; } catch ( Exception e ) { throw new DisseminationException ( "[DefaultDisseminatorImpl] had an error " + "in transforming xml for viewObjectProfile. " + "Underlying exception was: " + e . getMessage ( ) ) ; } }
Returns an HTML rendering of the object profile which contains key
metadata from the object, plus URLs for the object's Dissemination Index
and Item Index. The data is returned as HTML in a presentation-oriented
format. This is accomplished by doing an XSLT transform on the XML that
is obtained from getObjectProfile in API-A.

@return html packaged as a MIMETypedStream
@throws ServerException