Package ca.uhn.hl7v2.model

Examples of ca.uhn.hl7v2.model.Composite


        addToList(testType(type, profile, null, profileID), exList);
       
        //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


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

        addToList(testType(type, profile, null, profileID), exList);
       
        //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

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

        addToList(testType(type, profile, null, profileID), exList);
       
        //test children
        if (profile.getSubComponents() > 0 && !profile.getUsage().equals("X") && hasContent(type)) {
            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

    // test children
    if (theValidateChildren) {
      if (profile.getComponents() > 0 && !profile.getUsage().equals("X")) {
        if (Composite.class.isAssignableFrom(type.getClass())) {
          Composite comp = (Composite) type;
          for (int i = 1; i <= profile.getComponents(); i++) {
            Component childProfile = profile.getComponent(i);
            try {
              Type child = comp.getComponent(i - 1);
              exList.addAll(doTestComponent(child, childProfile, profileID, validateChildren));
            } catch (DataTypeException de) {
              exList.add(new ProfileNotHL7CompliantException(
                  "More components in profile than allowed in message: "
                      + de.getMessage()));
View Full Code Here

    exList.addAll(testType(type, profile, null, profileID));

    // test children
    if (profile.getSubComponents() > 0 && !profile.getUsage().equals("X") && (!type.isEmpty())) {
      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(
                  "More subcomponents in profile than allowed in message: "
                      + de.getMessage()));
View Full Code Here

    // test children
    if (theValidateChildren) {
      if (profile.getComponents() > 0 && !profile.getUsage().equals("X")) {
        if (Composite.class.isAssignableFrom(type.getClass())) {
          Composite comp = (Composite) type;
          for (int i = 1; i <= profile.getComponents(); i++) {
            Component childProfile = profile.getComponent(i);
            try {
              Type child = comp.getComponent(i - 1);
              exList.addAll(doTestComponent(child, childProfile, profileID, validateChildren));
            } catch (DataTypeException de) {
              exList.add(new ProfileNotHL7CompliantException(
                  "More components in profile than allowed in message: "
                      + de.getMessage()));
View Full Code Here

    exList.addAll(testType(type, profile, null, profileID));

    // test children
    if (profile.getSubComponents() > 0 && !profile.getUsage().equals("X") && (!type.isEmpty())) {
      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(
                  "More subcomponents in profile than allowed in message: "
                      + de.getMessage()));
View Full Code Here

    public Type getComponent(int number) throws DataTypeException {

        try {
            return this.data[number];
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)");
        }
    }
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.model.Composite

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.