org.milyn.edisax.util
Class EDIUtils

java.lang.Object
  extended by org.milyn.edisax.util.EDIUtils

public class EDIUtils
extends java.lang.Object

EDIUtils contain different helper-methods for handling edifact.

Author:
bardl

Field Summary
static java.lang.String EDI_MAPPING_MODEL_INTERCHANGE_PROPERTIES_FILE
           
static java.lang.String EDI_MAPPING_MODEL_URN
           
static java.lang.String EDI_MAPPING_MODEL_ZIP_LIST_FILE
           
static Description MODEL_SET_DEFINITIONS_DESCRIPTION
          Most model sets contain a set of common definitions (common types).
 
Constructor Summary
EDIUtils()
           
 
Method Summary
static java.lang.String concatAndTruncate(java.util.List<java.lang.String> nodeTokens, DelimiterType outerDelimiterType, Delimiters delimiters)
           
static java.util.Properties getInterchangeProperties(java.lang.String ediMappingModel)
           
static void loadMappingModels(java.lang.String mappingModelFiles, java.util.Map<Description,EdifactModel> mappingModels, java.net.URI baseURI)
           
static java.lang.String[] split(java.lang.String value, java.lang.String delimiter, java.lang.String escape)
          Splits a String by delimiter as long as delimiter does not follow an escape sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDI_MAPPING_MODEL_ZIP_LIST_FILE

public static final java.lang.String EDI_MAPPING_MODEL_ZIP_LIST_FILE
See Also:
Constant Field Values

EDI_MAPPING_MODEL_INTERCHANGE_PROPERTIES_FILE

public static final java.lang.String EDI_MAPPING_MODEL_INTERCHANGE_PROPERTIES_FILE
See Also:
Constant Field Values

EDI_MAPPING_MODEL_URN

public static final java.lang.String EDI_MAPPING_MODEL_URN
See Also:
Constant Field Values

MODEL_SET_DEFINITIONS_DESCRIPTION

public static final Description MODEL_SET_DEFINITIONS_DESCRIPTION
Most model sets contain a set of common definitions (common types).

Constructor Detail

EDIUtils

public EDIUtils()
Method Detail

split

public static java.lang.String[] split(java.lang.String value,
                                       java.lang.String delimiter,
                                       java.lang.String escape)
Splits a String by delimiter as long as delimiter does not follow an escape sequence. The split method follows the same behavior as the method splitPreserveAllTokens(String, String) in org.apache.commons.lang.StringUtils.

Parameters:
value - the string to split, may be null.
delimiter - the delimiter sequence. A null delimiter splits on whitespace.
escape - the escape sequence. A null escape is allowed, and result will be consistent with the splitPreserveAllTokens method.
Returns:
an array of split edi-sequences, null if null string input.

loadMappingModels

public static void loadMappingModels(java.lang.String mappingModelFiles,
                                     java.util.Map<Description,EdifactModel> mappingModels,
                                     java.net.URI baseURI)
                              throws EDIConfigurationException,
                                     java.io.IOException,
                                     org.xml.sax.SAXException
Throws:
EDIConfigurationException
java.io.IOException
org.xml.sax.SAXException

getInterchangeProperties

public static java.util.Properties getInterchangeProperties(java.lang.String ediMappingModel)
                                                     throws java.io.IOException
Throws:
java.io.IOException

concatAndTruncate

public static java.lang.String concatAndTruncate(java.util.List<java.lang.String> nodeTokens,
                                                 DelimiterType outerDelimiterType,
                                                 Delimiters delimiters)


Copyright © 2011. All Rights Reserved.