All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.altova.text.edi.Message Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
////////////////////////////////////////////////////////////////////////
//
// Message.java
//
// This file was generated by MapForce 2017sp2.
//
// YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
// OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
//
// Refer to the MapForce Documentation for further details.
// http://www.altova.com/mapforce
//
////////////////////////////////////////////////////////////////////////

package com.altova.text.edi;

import java.util.HashSet;

public class Message {
	private HashSet mSegments;
	private Particle mRootParticle;
	private String msMessageType;
    private boolean mShouldCompleteSingleConditions = false;
    private boolean mShouldCompleteSingleValues = false;
    private boolean mShouldCompleteHLSegments = false;

	public Message(String sMessageType, Particle rootParticle, HashSet segments, int completeHL, int completeSingleValues, int completeSingleConditions) {
		msMessageType = sMessageType;
		mRootParticle = rootParticle;
		mSegments = segments;
        mShouldCompleteHLSegments = completeHL == 1;
        mShouldCompleteSingleConditions = completeSingleConditions == 1;
        mShouldCompleteSingleValues = completeSingleValues == 1;
	}

	public Particle getRootParticle() {
		return mRootParticle;
	}
	
	public boolean hasSegment( String sSegmentName ) {
		return mSegments.contains(sSegmentName);
	}

	public String getMessageType() {
		return msMessageType;
	}

    public boolean shouldCompleteSingleConditions() {
        return mShouldCompleteSingleConditions;
    }

    public boolean shouldCompleteSingleValues() {
        return mShouldCompleteSingleValues;
    }

    public boolean shouldCompleteHLSegments() {
        return mShouldCompleteHLSegments;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy