Package eu.planets_project.pp.plato.model

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


        return "";
    }

    private boolean describeInXcdl(DigitalObject record) {
        XcdlExtractor extractor = new XcdlExtractor();
        XcdlDescription xcdl = null;
        if (record != null && record.isDataExistent()) {
            try {
                String filepath =  tempDigitalObjects.get(record);
                if ((filepath != null) && (!"".equals(filepath))) {
                    xcdl = extractor.extractProperties(record.getFullname(), filepath);
View Full Code Here


            data = FileUtils.getBytesFromFile(f);
        } catch (IOException e1) {
            throw new IllegalArgumentException("Error reading file.");       
        }
       
        XcdlDescription xcdl = null;
        try {
            xcdl = extract(fullname, data);
        catch (Throwable e) {
            throw new PlatoServiceException("XCL property extraction failed.", e);
        }
View Full Code Here

       
        if ((object == null) || (!object.isDataExistent())) {
            throw new IllegalArgumentException("Digital object must contain some data.");
        }
            
        XcdlDescription xcdl = null;
        try {
            xcdl = extract(object.getFullname(), object.getData().getData());
        } catch (Throwable e) {
            throw new PlatoServiceException("XCL property extraction failed.", e);
        }
View Full Code Here

       
       
        File xcdlFile = extractor.extractXCDL(dIn, null, null, null);
       
       
        XcdlDescription xcdl = null;
       
        if (xcdlFile.exists()) {
            FileInputStream fileInputStream;
            byte[] binaryXcdl = null;
            try {
                fileInputStream = new FileInputStream(xcdlFile);
                binaryXcdl = new byte[(int) xcdlFile.length()];
                fileInputStream.read(binaryXcdl);
                fileInputStream.close();           

            } catch (FileNotFoundException e) {
                return null;
            } catch (IOException e) {
                return null;
            }
           
            xcdlFile.delete();
            xcdl = new XcdlDescription();
            xcdl.getData().setData(binaryXcdl);
            xcdl.setFullname(fullname + ".xcdl");
        }
        return xcdl;
    }
View Full Code Here

        for(Alternative alt : consideredAlternatives) {
            for (SampleObject record : records) {
                // each experiment has one experiment result per sample record
                DigitalObject result = alt.getExperiment().getResults().get(record);
               
                XcdlDescription xcdl = null;
                if ((result != null)&&(result.isDataExistent())) {
                    try {
                        String filepath = tempFiles.get(result);
                        if ((filepath != null) && (!"".equals(filepath))) {
                            xcdl = extractor.extractProperties(result.getFullname(), filepath);
View Full Code Here

TOP

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

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.