Package eu.planets_project.pp.plato.services.characterisation.xcl

Examples of eu.planets_project.pp.plato.services.characterisation.xcl.XcdlExtractor


       
        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);
                } else {
                    DigitalObject rec2 = em.merge(record);
                    xcdl = extractor.extractProperties(rec2);
                }
               
                //xcdl = extractor.extractProperties(record.getFullname(), record);
            } catch (PlatoServiceException e) {
                log.error("XCDL characterisation failed: "+e.getMessage(),e);
View Full Code Here


    /**
     * Extracts object properties of all experiment results.
     */
    public void extractObjectProperties(){
        List<SampleObject> records = selectedPlan.getSampleRecordsDefinition().getRecords();
        XcdlExtractor extractor = new XcdlExtractor();
       
        boolean missingResultfiles = false;
        ArrayList<String> failed = new ArrayList<String>();
       
        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);
                        } else {
                            // we have to merge it back into the session because we the data bytestream
                            // is lazy loaded
                            DigitalObject u = (DigitalObject)em.merge(result);
                            xcdl = extractor.extractProperties(u);
                            // Should we call System.gc afterwards?
                        }
                        // there should be a file now
                        if (xcdl == null) {
                            failed.add(alt.getName()+ ", " + record.getFullname() + ": The description service returned an empty result.");
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.services.characterisation.xcl.XcdlExtractor

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.