Package eu.planets_project.ifr.core.simple.impl.util

Examples of eu.planets_project.ifr.core.simple.impl.util.FileTypeResolver


     */
    public IdentifyResult identify(DigitalObject dob, List<Parameter> parameters ) {
        // Initialise the result:
       
        // Use this resolver:
        FileTypeResolver ftr;
        try {
            ftr = FileTypeResolver.instantiate();
        } catch (Exception e) {
            e.printStackTrace();
            return this.returnWithErrorMessage("Could not instanciate the file type resolver.");
        }
        // Can only cope if the object is 'simple':
        if (dob.getContent() == null) {
            return this
                    .returnWithErrorMessage("The Content of the DigitalObject should not be NULL.");
        }
        // URL, can deal with this:
        String type = null;
        try {
            type = ftr.getMIMEType(dob.getPermanentUri().toURL());
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        ServiceReport rep = new ServiceReport(Type.INFO, Status.SUCCESS, "Nothing checked");

View Full Code Here

TOP

Related Classes of eu.planets_project.ifr.core.simple.impl.util.FileTypeResolver

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.