private void addImports(List<Import> imports, Element edimapEl) { for(Import importInst : imports) { mapBeanProperties(importInst, newElement("import", edimapEl), "resource", "namespace", "truncatableComponents", "truncatableFields", "truncatableSegments"); } }
private Element newElement(String name, Node parent, MappingNode mappingNode) { Element element = newElement(name, parent); if(mappingNode != null && mappingNode.getDocumentation() != null) { Element documentation = newElement("documentation", element); documentation.appendChild(doc.createTextNode(mappingNode.getDocumentation())); } return element; } }
private void addSubComponents(List<SubComponent> subComponents, Element componentEl) { for(SubComponent subComponent : subComponents) { Element subComponentEl = newElement("sub-component", componentEl, subComponent); mapBeanProperties(subComponent, subComponentEl, "name", "xmltag", "nodeTypeRef", "maxLength", "minLength", "required", "dataType", "dataTypeParametersString|dataTypeParameters"); } }
private Element newElement(String name, Node parent, MappingNode mappingNode) { Element element = newElement(name, parent); if(mappingNode != null && mappingNode.getDocumentation() != null) { Element documentation = newElement("documentation", element); documentation.appendChild(doc.createTextNode(mappingNode.getDocumentation())); } return element; } }
private void addSubComponents(List<SubComponent> subComponents, Element componentEl) { for(SubComponent subComponent : subComponents) { Element subComponentEl = newElement("sub-component", componentEl, subComponent); mapBeanProperties(subComponent, subComponentEl, "name", "xmltag", "nodeTypeRef", "maxLength", "minLength", "required", "dataType", "dataTypeParametersString|dataTypeParameters"); } }
private void addSubComponents(List<SubComponent> subComponents, Element componentEl) { for(SubComponent subComponent : subComponents) { Element subComponentEl = newElement("sub-component", componentEl, subComponent); mapBeanProperties(subComponent, subComponentEl, "name", "xmltag", "nodeTypeRef", "maxLength", "minLength", "required", "dataType", "dataTypeParametersString|dataTypeParameters"); } }
private void addDescription(Description description, Element edimapEl) { Element descriptionElement = newElement("description", edimapEl); mapBeanProperties(description, descriptionElement, "name", "version"); if (!StringUtils.isEmpty(description.getNamespace())) { descriptionElement.setAttribute("namespace", description.getNamespace()); } }
private void addDescription(Description description, Element edimapEl) { Element descriptionElement = newElement("description", edimapEl); mapBeanProperties(description, descriptionElement, "name", "version"); if (!StringUtils.isEmpty(description.getNamespace())) { descriptionElement.setAttribute("namespace", description.getNamespace()); } }
private void addDescription(Description description, Element edimapEl) { Element descriptionElement = newElement("description", edimapEl); mapBeanProperties(description, descriptionElement, "name", "version"); if (!StringUtils.isEmpty(description.getNamespace())) { descriptionElement.setAttribute("namespace", description.getNamespace()); } }
private void addDescription(Description description, Element edimapEl) { Element descriptionElement = newElement("description", edimapEl); mapBeanProperties(description, descriptionElement, "name", "version"); if (!StringUtils.isEmpty(description.getNamespace())) { descriptionElement.setAttribute("namespace", description.getNamespace()); } }
private void addComponents(List<Component> components, Element fieldEl) { for(Component component : components) { Element componentEl = newElement("component", fieldEl, component); mapBeanProperties(component, componentEl, "name", "xmltag", "nodeTypeRef", "truncatable", "maxLength", "minLength", "required", "dataType", "dataTypeParametersString|dataTypeParameters"); addSubComponents(component.getSubComponents(), componentEl); } }
private void addFields(List<Field> fields, Element segmentEl) { for(Field field : fields) { Element fieldEl = newElement("field", segmentEl, field); mapBeanProperties(field, fieldEl, "name", "xmltag", "nodeTypeRef", "truncatable", "maxLength", "minLength", "required", "dataType", "dataTypeParametersString|dataTypeParameters"); addComponents(field.getComponents(), fieldEl); } }
private void addFields(List<Field> fields, Element segmentEl) { for(Field field : fields) { Element fieldEl = newElement("field", segmentEl, field); mapBeanProperties(field, fieldEl, "name", "xmltag", "nodeTypeRef", "truncatable", "maxLength", "minLength", "required", "dataType", "dataTypeParametersString|dataTypeParameters"); addComponents(field.getComponents(), fieldEl); } }
private void addComponents(List<Component> components, Element fieldEl) { for(Component component : components) { Element componentEl = newElement("component", fieldEl, component); mapBeanProperties(component, componentEl, "name", "xmltag", "nodeTypeRef", "truncatable", "maxLength", "minLength", "required", "dataType", "dataTypeParametersString|dataTypeParameters"); addSubComponents(component.getSubComponents(), componentEl); } }
private void addComponents(List<Component> components, Element fieldEl) { for(Component component : components) { Element componentEl = newElement("component", fieldEl, component); mapBeanProperties(component, componentEl, "name", "xmltag", "nodeTypeRef", "truncatable", "maxLength", "minLength", "required", "dataType", "dataTypeParametersString|dataTypeParameters"); addSubComponents(component.getSubComponents(), componentEl); } }
private void addFields(List<Field> fields, Element segmentEl) { for(Field field : fields) { Element fieldEl = newElement("field", segmentEl, field); mapBeanProperties(field, fieldEl, "name", "xmltag", "nodeTypeRef", "truncatable", "maxLength", "minLength", "required", "dataType", "dataTypeParametersString|dataTypeParameters"); addComponents(field.getComponents(), fieldEl); } }
private void write(Edimap edimap) { Element edimapEl = newElement("edimap", doc); addImports(edimap.getImports(), edimapEl); addDescription(edimap.getDescription(), edimapEl); addDelimiters(edimap.getDelimiters(), edimapEl); SegmentGroup segments = edimap.getSegments(); Element segmentsEl = newElement("segments", edimapEl, segments); mapBeanProperties(segments, segmentsEl, "name", "xmltag"); addChildSegments(segments, segmentsEl); }
private void write(Edimap edimap) { Element edimapEl = newElement("edimap", doc); addImports(edimap.getImports(), edimapEl); addDescription(edimap.getDescription(), edimapEl); addDelimiters(edimap.getDelimiters(), edimapEl); SegmentGroup segments = edimap.getSegments(); Element segmentsEl = newElement("segments", edimapEl, segments); mapBeanProperties(segments, segmentsEl, "name", "xmltag"); addChildSegments(segments, segmentsEl); }
private void write(Edimap edimap) { Element edimapEl = newElement("edimap", doc); addImports(edimap.getImports(), edimapEl); addDescription(edimap.getDescription(), edimapEl); addDelimiters(edimap.getDelimiters(), edimapEl); SegmentGroup segments = edimap.getSegments(); Element segmentsEl = newElement("segments", edimapEl, segments); mapBeanProperties(segments, segmentsEl, "name", "xmltag"); addChildSegments(segments, segmentsEl); }
private void write(Edimap edimap) { Element edimapEl = newElement("edimap", doc); addImports(edimap.getImports(), edimapEl); addDescription(edimap.getDescription(), edimapEl); addDelimiters(edimap.getDelimiters(), edimapEl); SegmentGroup segments = edimap.getSegments(); Element segmentsEl = newElement("segments", edimapEl, segments); mapBeanProperties(segments, segmentsEl, "name", "xmltag"); addChildSegments(segments, segmentsEl); }