Examples of SubComponent


Examples of ca.uhn.hl7v2.conf.spec.message.SubComponent

  /** Parses a component profile */
  private AbstractComponent parseComponentProfile(Element elem, boolean isSubComponent) throws ProfileException {
    AbstractComponent comp = null;
    if (isSubComponent) {
      log.debug("      Parsing subcomp profile: " + elem.getAttribute("Name"));
      comp = new SubComponent();
    } else {
      log.debug("    Parsing comp profile: " + elem.getAttribute("Name"));
      comp = new Component();

      int childIndex = 1;
      NodeList children = elem.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node n = children.item(i);
        if (n.getNodeType() == Node.ELEMENT_NODE) {
          Element child = (Element) n;
          if (child.getNodeName().equalsIgnoreCase("SubComponent")) {
            SubComponent subcomp = (SubComponent) parseComponentProfile(child, true);
            ((Component) comp).setSubComponent(childIndex++, subcomp);
          }
        }
      }
    }
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.message.SubComponent

        //test children
        if (profile.getSubComponents() > 0 && !profile.getUsage().equals("X") && hasContent(type)) {
            if (Composite.class.isAssignableFrom(type.getClass())) {
                Composite comp = (Composite) type;
                for (int i = 1; i <= profile.getSubComponents(); i++) {
                    SubComponent childProfile = profile.getSubComponent(i);
                    try {
                        Type child = comp.getComponent(i-1);
                        addToList(testType(child, childProfile, null, profileID), exList);
                    } catch (DataTypeException de) {
                        exList.add(new ProfileNotHL7CompliantException("More subcomponents in profile than allowed in message: " + de.getMessage()));
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.message.SubComponent

  private AbstractComponent parseComponentProfile(Element elem, boolean isSubComponent)
      throws ProfileException {
    AbstractComponent comp = null;
    if (isSubComponent) {
      log.debug("      Parsing subcomp profile: " + elem.getAttribute("Name"));
      comp = new SubComponent();
    } else {
      log.debug("    Parsing comp profile: " + elem.getAttribute("Name"));
      comp = new Component();

      int childIndex = 1;
      NodeList children = elem.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node n = children.item(i);
        if (n.getNodeType() == Node.ELEMENT_NODE) {
          Element child = (Element) n;
          if (child.getNodeName().equalsIgnoreCase("SubComponent")) {
            SubComponent subcomp = (SubComponent) parseComponentProfile(child, true);
            ((Component) comp).setSubComponent(childIndex++, subcomp);
          }
        }
      }
    }
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.message.SubComponent

        //test children
        if (profile.getSubComponents() > 0 && !profile.getUsage().equals("X") && hasContent(type)) {
            if (Composite.class.isAssignableFrom(type.getClass())) {
                Composite comp = (Composite) type;
                for (int i = 1; i <= profile.getSubComponents(); i++) {
                    SubComponent childProfile = profile.getSubComponent(i);
                    try {
                        Type child = comp.getComponent(i-1);
                        addToList(testType(child, childProfile, null, profileID), exList);
                    } catch (DataTypeException de) {
                        exList.add(new ProfileNotHL7CompliantException("More subcomponents in profile than allowed in message: " + de.getMessage()));
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.message.SubComponent

            if (Composite.class.isAssignableFrom(type.getClass())) {
                Composite comp = (Composite) type;
               
                if (theValidateChildren) {
                  for (int i = 1; i <= profile.getSubComponents(); i++) {
                      SubComponent childProfile = profile.getSubComponent(i);
                      try {
                          Type child = comp.getComponent(i-1);
                          addToList(testType(child, childProfile, null, profileID), exList);
                      } catch (DataTypeException de) {
                          exList.add(new ProfileNotHL7CompliantException("More subcomponents in profile than allowed in message: " + de.getMessage()));
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.message.SubComponent

  /** Parses a component profile */
  private AbstractComponent parseComponentProfile(Element elem, boolean isSubComponent) throws ProfileException {
    AbstractComponent comp = null;
    if (isSubComponent) {
      log.debug("      Parsing subcomp profile: " + elem.getAttribute("Name"));
      comp = new SubComponent();
    } else {
      log.debug("    Parsing comp profile: " + elem.getAttribute("Name"));
      comp = new Component();

      int childIndex = 1;
      NodeList children = elem.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node n = children.item(i);
        if (n.getNodeType() == Node.ELEMENT_NODE) {
          Element child = (Element) n;
          if (child.getNodeName().equalsIgnoreCase("SubComponent")) {
            SubComponent subcomp = (SubComponent) parseComponentProfile(child, true);
            ((Component) comp).setSubComponent(childIndex++, subcomp);
          }
        }
      }
    }
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.message.SubComponent

      if (Composite.class.isAssignableFrom(type.getClass())) {
        Composite comp = (Composite) type;

        if (theValidateChildren) {
          for (int i = 1; i <= profile.getSubComponents(); i++) {
            SubComponent childProfile = profile.getSubComponent(i);
            try {
              Type child = comp.getComponent(i - 1);
              exList.addAll(testType(child, childProfile, null, profileID));
            } catch (DataTypeException de) {
              exList.add(new ProfileNotHL7CompliantException(
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.message.SubComponent

  private AbstractComponent<?> parseComponentProfile(Element elem, boolean isSubComponent)
      throws ProfileException {
    AbstractComponent<?> comp = null;
    if (isSubComponent) {
      log.debug("      Parsing subcomp profile: " + elem.getAttribute("Name"));
      comp = new SubComponent();
    } else {
      log.debug("    Parsing comp profile: " + elem.getAttribute("Name"));
      comp = new Component();

      int childIndex = 1;
      NodeList children = elem.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node n = children.item(i);
        if (n.getNodeType() == Node.ELEMENT_NODE) {
          Element child = (Element) n;
          if (child.getNodeName().equalsIgnoreCase("SubComponent")) {
            SubComponent subcomp = (SubComponent) parseComponentProfile(child, true);
            ((Component) comp).setSubComponent(childIndex++, subcomp);
          }
        }
      }
    }
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.message.SubComponent

  /** Parses a component profile */
  private AbstractComponent parseComponentProfile(Element elem, boolean isSubComponent) throws ProfileException {
    AbstractComponent comp = null;
    if (isSubComponent) {
      log.debug("      Parsing subcomp profile: " + elem.getAttribute("Name"));
      comp = new SubComponent();
    } else {
      log.debug("    Parsing comp profile: " + elem.getAttribute("Name"));
      comp = new Component();

      int childIndex = 1;
      NodeList children = elem.getChildNodes();
      for (int i = 0; i < children.getLength(); i++) {
        Node n = children.item(i);
        if (n.getNodeType() == Node.ELEMENT_NODE) {
          Element child = (Element) n;
          if (child.getNodeName().equalsIgnoreCase("SubComponent")) {
            SubComponent subcomp = (SubComponent) parseComponentProfile(child, true);
            ((Component) comp).setSubComponent(childIndex++, subcomp);
          }
        }
      }
    }
View Full Code Here

Examples of ca.uhn.hl7v2.conf.spec.message.SubComponent

      if (Composite.class.isAssignableFrom(type.getClass())) {
        Composite comp = (Composite) type;

        if (theValidateChildren) {
          for (int i = 1; i <= profile.getSubComponents(); i++) {
            SubComponent childProfile = profile.getSubComponent(i);
            try {
              Type child = comp.getComponent(i - 1);
              exList.addAll(testType(child, childProfile, null, profileID));
            } catch (DataTypeException de) {
              exList.add(new ProfileNotHL7CompliantException(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.