Package eu.scape_project.planning.xml

Examples of eu.scape_project.planning.xml.C3POProfileParser


    public void loadCollectionProfileElements() {
        DigitalObject profile = plan.getSampleRecordsDefinition().getCollectionProfile().getProfile();
        try {
            DigitalObject datafilledProfile = digitalObjectManager.getCopyOfDataFilledDigitalObject(profile);

            C3POProfileParser parser = new C3POProfileParser();
            parser.read(new ByteArrayInputStream(datafilledProfile.getData().getRealByteStream().getData()), false);

            collectionProfileElements = parser.getObjectIdentifiers();

            parser = null;
            datafilledProfile = null;
        } catch (StorageException e) {
            facesMessages.addError("Could not load collection profile. Please try again.");
View Full Code Here


            throw new PlanningException("An error occurred while storing the profile");
        }

        log.info("Parsing profile information");
        stream = new ByteArrayInputStream(bsData.getData());
        C3POProfileParser parser = new C3POProfileParser();
        parser.read(stream, false);

        // if we are here the profile was read successfully
        String id = parser.getCollectionId();
        String key = parser.getPartitionFilterKey();
        String count = parser.getObjectsCountInPartition();
        String typeOfObjects = parser.getTypeOfObjects();
        String description = parser.getDescriptionOfObjects();
       
        final String repositoryURL = user.getUserGroup().getRepository().getUrl();
        List<SampleObject> samples = parser.getSampleObjects();
        for (SampleObject sample : samples) {
            sample.setFullname(sample.getFullname().replace("http://localhost:8080", repositoryURL));
        }
        String name = id + "_" + key + ".xml";
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.xml.C3POProfileParser

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.