Package eu.planets_project.pp.plato.model

Examples of eu.planets_project.pp.plato.model.FormatInfo


             */
            bodyEnd = filename.lastIndexOf(".");
            if ((bodyEnd < 0) &&
                ((result.getTargetFormat().getDefaultExtension() == null) ||
                  "".equals(result.getTargetFormat().getDefaultExtension()))) {
                FormatInfo targetFormat = new FormatInfo();
                setFormatFromCRiBID(action.getTargetFormat(), targetFormat);
                result.setTargetFormat(targetFormat);
                filename = filename + "." + result.getTargetFormat().getDefaultExtension();
                result.getMigratedObject().setFullname(filename);
            }
View Full Code Here


             */
            bodyEnd = filename.lastIndexOf(".");
            if ((bodyEnd < 0) &&
                ((result.getTargetFormat().getDefaultExtension() == null) ||
                  "".equals(result.getTargetFormat().getDefaultExtension()))) {
                FormatInfo targetFormat = new FormatInfo();
                setFormatFromCRiBID(action.getTargetFormat(), targetFormat);
                result.setTargetFormat(targetFormat);
                filename = filename + "." + result.getTargetFormat().getDefaultExtension();
                result.getMigratedObject().setFullname(filename);
                result.getMigratedObject().getFormatInfo().assignValues(targetFormat);
View Full Code Here

                     }                             

                     if(OBJECT_FORMAT_CORRECT_CONFORMS.equals(propertyURI)) {
                         if (alternative.getAction() != null) {
                             String puid = "UNDEFINED";
                             FormatInfo info = alternative.getAction().getTargetFormatInfo();
                             if (info != null) {
                                 puid = info.getPuid();
                             }
                             String fitsText = extractor.extractText(fitsDocResult,"//fits:externalIdentifier[@type='puid']/text()");
                             v = identicalValues(puid, fitsText, scale);
                         }
                     }  else if((OBJECT_IMAGE_DIMENSION_WIDTH + "#equal").equals(propertyURI)) {
View Full Code Here

         * there was no specific hit, maybe
         */
        if (found == null)
            return null;
       
        FormatInfo info = new FormatInfo();
        info.setName(found.getFileFormatName());
        info.setPuid(found.getFileFormatPUID());
        info.setVersion(found.getFileFormatVersion());
        info.setMimeType(found.getMimeType());
        /*
         * choose first file extension as default
         */
        if (found.getFileFormat().getNumExtensions() > 0)
            info.setDefaultExtension(found.getFileFormat().getExtension(0));

        return info;
    }
View Full Code Here

            byte[] migratedFile = new byte[]{};
            try {
                migratedFile = FileUtils.getBytesFromFile(new File(outputFile));
                DigitalObject u = new DigitalObject();
                u.getData().setData(migratedFile);
                FormatInfo tFormat = new FormatInfo();
                tFormat.setDefaultExtension(config.getOutEnding());
                result.setTargetFormat(tFormat);
                result.setMigratedObject(u);
            } catch (Exception e) {
                log.error("Could not get outputfile "+outputFile);
                result.setSuccessful(false);
View Full Code Here

        // prepare commonly used parameters
        Map<String, String> params = new HashMap<String, String>();

        // PUID: use the PUID from action.targetformat
        String puid = "Target format PUID undefined for this action";
        FormatInfo targetInfo = alternative.getAction().getTargetFormatInfo();
        if (targetInfo != null && !"".equals(targetInfo.getPuid())) {
            puid = targetInfo.getPuid();
        }
        params.put("PUID", puid);
       
       
        for (MeasurementInfoUri info: measurementInfoUris) {
View Full Code Here

        // get first sample with data
        SampleObject sample = selectedPlan.getSampleRecordsDefinition().getFirstSampleWithFormat();
        if (sample == null) {
            return null;
        }
        FormatInfo formatInfo = sample.getFormatInfo();

        PreservationActionRegistryDefinition reg = (PreservationActionRegistryDefinition) registry;
        try {
            availableActions.clear();
            List<PreservationActionDefinition> actions = queryRegistry(formatInfo, reg);
View Full Code Here

        SampleObject sample = selectedPlan.getSampleRecordsDefinition()
                .getFirstSampleWithFormat();
        if (sample == null) {
            return;
        }
        FormatInfo formatInfo = sample.getFormatInfo();

        for (PreservationActionRegistryDefinition reg : allRegistries) {
            if (reg.getShortname().contains("MiniMEE")
            ) {
                try {
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.model.FormatInfo

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.