Package de.fuberlin.wiwiss.pubby.negotiation.ContentTypeNegotiator

Examples of de.fuberlin.wiwiss.pubby.negotiation.ContentTypeNegotiator.VariantSpec


            conneg=new ContentTypeNegotiator();
            Enumeration enumer = dbProperties.keys();
            int offset;
            String contentLocation, key, mediaType, mimeType, name, recordSchema, value;
            VariantSpec vs;
            while(enumer.hasMoreElements()) {
                key=(String)enumer.nextElement();
                offset=key.indexOf("mimeTypes");
                if(offset>0) {
                    name=key.substring(0, offset-1);
                    value=dbProperties.getProperty(key);
                    log.info(key+"="+value);
                    st=new StringTokenizer(value, ", ");
                    mimeType=st.nextToken();
                    vs=conneg.addVariant(mimeType);
                    mediaType=vs.getMediaType().getMediaType();
                    try {
                        addTransformer(mediaType, null, dbProperties.getProperty(name+".styleSheet"), null, null);
                        while(st.hasMoreTokens())
                            vs.addAliasMediaType(st.nextToken());
                    } catch (Exception e) {
                        log.error("Unable to stylesheet "+dbProperties.getProperty(name+".styleSheet"));
                        log.error(e, e);
                    }
                    // we should only need this when the transformer
View Full Code Here

TOP

Related Classes of de.fuberlin.wiwiss.pubby.negotiation.ContentTypeNegotiator.VariantSpec

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.