Package org.jitterbit.integration.data.structure.text

Examples of org.jitterbit.integration.data.structure.text.SegmentPersistor


    @Override
    public void writeTo(Persistor p) {
        synchronized (getDataLock()) {
            super.writeTo(p);
            new SegmentPersistor().save(segment, p.createChild("Segment"));
        }
    }
View Full Code Here


        if (segRoot == null) {
            throw new IllegalArgumentException("Invalid persistor: the Segment field is missing");
        }
        synchronized (getDataLock()) {
            super.restoreFrom(p);
            segment = new SegmentPersistor().restoreFrom(segRoot);
            // In some versions the Segment got the name of the TextDocument. This does not work -
            // the segment name for a SimpleTextStructure must be empty - so we blank it out.
            // Doing this may break some mappings, but on the other hand those Transformations
            // would not have worked anyway, because of the unexpected Segment name, so this
            // does not make the situation worse. (At least that's what Frank tells me.)
View Full Code Here

            writeSegmentsTo(p);
        }
    }

    private void writeSegmentsTo(Persistor media) {
        SegmentPersistor writer = new SegmentPersistor();
        Persistor segmentRoot = media.createChild("Segments");
        for (Segment s : segmentList) {
            writer.save(s, segmentRoot.createChild("Segment"));
        }
    }
View Full Code Here

        Persistor segmentRoot = media.getFirstChild("Segments");
        if (segmentRoot == null) {
            throw new IllegalArgumentException("Invalid persistor: the Segments root is missing");
        }
        segmentList = Lists.newArrayList();
        SegmentPersistor loader = new SegmentPersistor();
        for (Persistor sp : segmentRoot.getChildren("Segment")) {
            segmentList.add(loader.restoreFrom(sp));
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.structure.text.SegmentPersistor

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.