Examples of MediaTypeRegistry


Examples of org.apache.jetspeed.om.registry.MediaTypeRegistry

                "securitys",
                CustomizeSetAction.buildList(rundata, Registry.SECURITY));

            context.put("entry", portletEntry);
           
            MediaTypeRegistry mediaTypeReg = (MediaTypeRegistry)Registry.get(Registry.MEDIA_TYPE);
            context.put("media_types", iteratorToCollection(mediaTypeReg.listEntryNames()));
           
            if(portletEntry.getType() != null && portletEntry.getType().equals("ref"))
            {
                PortletEntry parentEntry = (PortletEntry) Registry.getEntry(Registry.PORTLET, portletEntry.getParent());
                if(parentEntry == null)
View Full Code Here

Examples of org.apache.jetspeed.om.registry.MediaTypeRegistry

                (PortletControlEntry) Registry.getEntry(
                    registry,
                    controllerName);
            context.put("entry", controlEntry);

            MediaTypeRegistry mediaTypeReg =
                (MediaTypeRegistry) Registry.get(Registry.MEDIA_TYPE);
            context.put(
                "media_types",
                iteratorToCollection(mediaTypeReg.listEntryNames()));
        }
    }
View Full Code Here

Examples of org.apache.jetspeed.om.registry.MediaTypeRegistry

                (PortletControlEntry) Registry.getEntry(
                    registry,
                    controllerName);
            context.put("entry", controlEntry);

            MediaTypeRegistry mediaTypeReg =
                (MediaTypeRegistry) Registry.get(Registry.MEDIA_TYPE);
            context.put(
                "media_types",
                iteratorToCollection(mediaTypeReg.listEntryNames()));
        }
    }
View Full Code Here

Examples of org.apache.jetspeed.om.registry.MediaTypeRegistry

            (List) PortletSessionState.getAttribute(portlet, rundata, RESULTS);

        List categories = PortletFilter.buildCategoryList(portlets);
        context.put("categories", categories);

        MediaTypeRegistry mediaTypeReg =
            (MediaTypeRegistry) Registry.get(Registry.MEDIA_TYPE);

        ArrayList collection = new ArrayList();
        Iterator iter = mediaTypeReg.listEntryNames();
        while (iter.hasNext())
        {
            collection.add(iter.next());
        }
View Full Code Here

Examples of org.apache.jetspeed.om.registry.MediaTypeRegistry

                "securitys",
                CustomizeSetAction.buildList(rundata, Registry.SECURITY));

            context.put("entry", portletEntry);
           
            MediaTypeRegistry mediaTypeReg = (MediaTypeRegistry)Registry.get(Registry.MEDIA_TYPE);
            context.put("media_types", iteratorToCollection(mediaTypeReg.listEntryNames()));
           
            if(portletEntry.getType() != null && portletEntry.getType().equals("ref"))
            {
                PortletEntry parentEntry = (PortletEntry) Registry.getEntry(Registry.PORTLET, portletEntry.getParent());
                if(parentEntry == null)
View Full Code Here

Examples of org.apache.jetspeed.om.registry.MediaTypeRegistry

            String type = contentType.getContentType();
           
            log.info("Attempting to find media entry with mimetype " + type);
           
            //example:  content type text/html => media type html
            MediaTypeRegistry mediaRegistry = (MediaTypeRegistry) Registry.get(Registry.MEDIA_TYPE);
            Enumeration en = mediaRegistry.getEntries();
            while(en.hasMoreElements())
            {
                MediaTypeEntry mte = (MediaTypeEntry)en.nextElement();

                //TODO:  the type can have wildcards, will REGEXP handle this?
View Full Code Here

Examples of org.apache.jetspeed.om.registry.MediaTypeRegistry

                context.put("entry", controllerEntry);
            }
           
            if(mode.equals(SecurityConstants.PARAM_MODE_UPDATE))
            {
                MediaTypeRegistry mediaTypeReg = (MediaTypeRegistry)Registry.get(Registry.MEDIA_TYPE);
                context.put("media_types", iteratorToCollection(mediaTypeReg.listEntryNames()));
            }
        }
    }
View Full Code Here

Examples of org.apache.tika.mime.MediaTypeRegistry

            }
        }
        if (parsers.isEmpty()) {
            return getDefaultParser(mimeTypes, loader);
        } else {
            MediaTypeRegistry registry = mimeTypes.getMediaTypeRegistry();
            return new CompositeParser(registry, parsers);
        }
    }
View Full Code Here

Examples of org.apache.tika.mime.MediaTypeRegistry

           }
       }
       if (detectors.isEmpty()) {
           return getDefaultDetector(mimeTypes, loader);
       } else {
           MediaTypeRegistry registry = mimeTypes.getMediaTypeRegistry();
           return new CompositeDetector(registry, detectors);
       }
    }
View Full Code Here

Examples of org.apache.tika.mime.MediaTypeRegistry

    /**
     * Prints all the known media types, aliases and matching parser classes.
     */
    private void displaySupportedTypes() {
        AutoDetectParser parser = new AutoDetectParser();
        MediaTypeRegistry registry = parser.getMediaTypeRegistry();
        Map<MediaType, Parser> parsers = parser.getParsers();

        for (MediaType type : registry.getTypes()) {
            System.out.println(type);
            for (MediaType alias : registry.getAliases(type)) {
                System.out.println("  alias:     " + alias);
            }
            MediaType supertype = registry.getSupertype(type);
            if (supertype != null) {
                System.out.println("  supertype: " + supertype);
            }
            Parser p = parsers.get(type);
            if (p != 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.