Package ca.uhn.hl7v2.parser

Examples of ca.uhn.hl7v2.parser.EncodingCharacters


  public void parse(String string) throws HL7Exception {
    if (string == null) {
      throw new NullPointerException("String can not be null");
    }
   
    EncodingCharacters encodingCharacters;
    try {
      encodingCharacters = EncodingCharacters.getInstance(getMessage());
    } catch (HL7Exception e) {
      throw new HL7Exception("Can not invoke parse(String) on a segment if the encoding characters (MSH-1 and MSH-2) are not already correctly set on the message");
    }
View Full Code Here


        if (string == null) {
          clear();
          return;
        }
     
      EncodingCharacters encodingCharacters = EncodingCharacters.getInstance(getMessage());
        char subc = encodingCharacters.getSubcomponentSeparator();
        char cmpc = encodingCharacters.getComponentSeparator();

        clear();
       
        // If the string contains subcomponent delimiters, parse
        // these as extra components
View Full Code Here

     * <p><b>Note that this method will not currently work to parse an MSH segment
     * if the encoding characters are not already set. This limitation should be
     * resulved in a future version</b></p>
     */
    public void parse(String string) throws HL7Exception {
        EncodingCharacters encodingCharacters = EncodingCharacters.getInstance(getMessage());
        clear();

        getMessage().getParser().parse(this, string, encodingCharacters);
    }
View Full Code Here

    /**
     * {@inheritDoc }
     */
    @Override
    public void parse(String string) throws HL7Exception {
        EncodingCharacters encodingCharacters = EncodingCharacters.getInstance(getMessage());
        char subc = encodingCharacters.getSubcomponentSeparator();
        char cmpc = encodingCharacters.getComponentSeparator();

        clear();
       
        // If the string contains subcomponent delimiters, parse
        // these as extra components
View Full Code Here

    /**
     * {@inheritDoc }
     */
    @Override
    public void parse(String string) throws HL7Exception {
        EncodingCharacters encodingCharacters = EncodingCharacters.getInstance(getMessage());
        char subc = encodingCharacters.getSubcomponentSeparator();
        char cmpc = encodingCharacters.getComponentSeparator();

        clear();
       
        // If the string contains subcomponent delimiters, parse
        // these as extra components
View Full Code Here

   * if the encoding characters are not already set. This limitation should be
   * resulved in a future version</b>
   * </p>
   */
  public void parse(String string) throws HL7Exception {
    EncodingCharacters encodingCharacters = EncodingCharacters
        .getInstance(getMessage());
    clear();
    getMessage().getParser().parse(this, string, encodingCharacters);
  }
View Full Code Here

  private CodeStore codeStore;
   

  /** Creates a new instance of DefaultValidator */
    public DefaultValidator() {
        enc = new EncodingCharacters('|', null)//the | is assumed later -- don't change
    }
View Full Code Here

                }
            }
        };
        FilterIterator<Structure> segmentIterator = new FilterIterator<Structure>(allIterator, segmentsOnly);
       
        final EncodingCharacters ec = new EncodingCharacters('|', "^~\\&");
        FilterIterator.Predicate<Structure> populatedOnly = new FilterIterator.Predicate<Structure>() {
            public boolean evaluate(Structure obj) {
                String encoded = PipeParser.encode((Segment) obj, ec);               
                if (encoded.length() > 3) {
                    return true;
View Full Code Here

        if (string == null) {
          clear();
          return;
        }
     
      EncodingCharacters encodingCharacters = EncodingCharacters.getInstance(getMessage());
        char subc = encodingCharacters.getSubcomponentSeparator();
        char cmpc = encodingCharacters.getComponentSeparator();

        clear();
       
        // If the string contains subcomponent delimiters, parse
        // these as extra components
View Full Code Here

  private CodeStore codeStore;
   

  /** Creates a new instance of DefaultValidator */
    public DefaultValidator() {
        enc = new EncodingCharacters('|', null)//the | is assumed later -- don't change
    }
View Full Code Here

TOP

Related Classes of ca.uhn.hl7v2.parser.EncodingCharacters

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.