Package org.apache.jetspeed.capabilities

Examples of org.apache.jetspeed.capabilities.MimeType


                            {
                                Iterator<String> _it1 = list.iterator();
                                int added = 0;
                                while (_it1.hasNext())
                                {
                                    MimeType _mt = caps.createMimeType((String) _it1.next());
                                    if (_mt != null)
                                    {
                                        client.getMimetypes().add(_mt);
                                        if (_mt.getMimetypeId() == 0)
                                        {
                                            caps.storeMimeType(_mt);
                                        }
                                        if (myPrefMimeType.equalsIgnoreCase(_mt.getName()))
                                            client.setPreferredMimeTypeId(_mt.getMimetypeId());

                                    }
                                    added++;
                                }
                            }
View Full Code Here


        while (list.hasNext())
        {
            try
            {
                MimeType _mt = (MimeType) list.next();
                JSMimeType _jsM = new JSMimeType();
                _jsM.setName(_mt.getName());
                refs.mimeMap.put(_jsM.getName(), _jsM);
                refs.mimeMapInt.put(new Integer(_mt.getMimetypeId()), _jsM);

                snapshot.getMimeTypes().add(_jsM);
            } catch (Exception e)
            {
                throw new SerializerException(
View Full Code Here

            JSClient jsC = new JSClient(c);
            // find the mimeTypes
            Iterator _itM = c.getMimetypes().iterator();
            while (_itM.hasNext())
            {
                MimeType _m = (MimeType) _itM.next();
                JSMimeType _mt = (JSMimeType) refs.mimeMap.get(_m.getName());
                if (_mt != null) jsC.getMimeTypes().add(_mt);
            }
           
            Integer id = new Integer(c.getPreferredMimeTypeId());
            JSMimeType _mt = (JSMimeType) refs.mimeMapInt.get(id);
View Full Code Here

                JSMediaType jsMediaType = new JSMediaType(mediaType);
                // find the mimeTypes
                Iterator mimeTypeIterator = mediaType.getMimetypes().iterator();
                while (mimeTypeIterator.hasNext())
                {
                    MimeType mimeType = (MimeType) mimeTypeIterator.next();
                    JSMimeType jsMimeType = (JSMimeType) refs.mimeMap.get(mimeType.getName());
                    if (jsMimeType != null) jsMediaType.getMimeTypes().add(jsMimeType);
                }
                // find the capabilities
                Iterator iterator = mediaType.getCapabilities().iterator();
                while (iterator.hasNext())
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.capabilities.MimeType

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.