Package org.milyn.edisax.model.internal

Examples of org.milyn.edisax.model.internal.Component


        NodeList nodes = node.getChildNodes();
        for (int i = 0; i < nodes.getLength(); i++) {
            Node currentNode = nodes.item(i);

            if (currentNode.getNodeName().equalsIgnoreCase(namespacePrefix + "component")) {
                Component component = new Component();
                field.getComponents().add(component);
                digestComponent(currentNode, component, namespacePrefix, field);
            }
        }
    }
View Full Code Here


        line = readUntilValue(reader);
        LinePart linePart;
        while (line != null && line.length() != 0) {
            linePart = getLinePart(reader, line);
            if (linePart != null) {
                Component component = new Component();
                component.setRequired(linePart.isMandatory());
                populateComponent(component, components.get(linePart.getId()));
                field.getComponents().add(component);
            }
            line = reader.readLine();
        }
View Full Code Here

        Map<String, Component> datas = new HashMap<String, Component>();

        BufferedReader _reader = new BufferedReader(reader);
        moveToNextPart(_reader);

        Component component = new Component();
        String id = populateComponent(_reader, component, useShortName);
        while (id != null) {
            datas.put(id, component);
            moveToNextPart(_reader);
            component = new Component();
            id = populateComponent(_reader, component, useShortName);
        }

        return datas;
    }
View Full Code Here

            if (currentFieldComponents.length > 0 || !ignoreEmptyNodes()) {
              startElement(expectedField, true);
              // Iterate over the field components and map them...
        for(int i = 0; i < currentFieldComponents.length; i++) {
          String componentMessageVal = currentFieldComponents[i];
          Component expectedComponent = expectedComponents.get(i);
 
          mapComponent(componentMessageVal, expectedComponent, fieldIndex, i, segmentCode, expectedField.getXmltag());
        }
            endElement(expectedField, true);
            }
View Full Code Here

                throw new EDIParseException(edifactModel.getEdimap(), "Segment [" + segmentCode + "], field " + (fieldIndex + 1) + " (" + expectedField.getXmltag() + ") expected to contain " + expectedComponents.size() + " components.  Actually contains " + currentFieldComponents.length + " components.  Currently at segment number " + segmentReader.getCurrentSegmentNumber() + ".", expectedField, segmentReader.getCurrentSegmentNumber(), segmentReader.getCurrentSegmentFields());
            }
        }

        for (int i = 0; i < currentFieldComponents.length; i++) {
            Component component = expectedComponents.get(i);
            if (component.getSubComponents().size() == 0 && (!currentFieldComponents[i].equals(""))) {
                validateValueNode(component, currentFieldComponents[i]);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.milyn.edisax.model.internal.Component

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.