public class EDIUtils extends Object
| Modifier and Type | Field and Description | 
|---|---|
static String | 
EDI_MAPPING_MODEL_INTERCHANGE_PROPERTIES_FILE  | 
static String | 
EDI_MAPPING_MODEL_URN  | 
static String | 
EDI_MAPPING_MODEL_ZIP_LIST_FILE  | 
static Description | 
MODEL_SET_DEFINITIONS_DESCRIPTION
Most model sets contain a set of common definitions (common types). 
 | 
static String | 
MODEL_SET_DEFINITIONS_DESCRIPTION_LOOKUP_NAME
Lookup name (string representation) of  
MODEL_SET_DEFINITIONS_DESCRIPTION | 
static HashSet<String> | 
reservedKeywords  | 
| Constructor and Description | 
|---|
EDIUtils()  | 
| Modifier and Type | Method and Description | 
|---|---|
static void | 
assertLegalName(String name)
Checks that the name is not a reserved word in java. 
 | 
static String | 
concatAndTruncate(List<String> nodeTokens,
                 DelimiterType outerDelimiterType,
                 Delimiters delimiters)  | 
static String | 
deleteWithPascalNotation(String value,
                        char deleteChar)
Removes all occurances of deleteChar and sets next character in value to uppercase. 
 | 
static String | 
encodeAttributeName(JType type,
                   String name)
Encodes a String into standard java attribute name convention. 
 | 
static String | 
encodeAttributeName(String name)  | 
static String | 
encodeClassName(String name)
Encodes a String into standard java class name convention. 
 | 
static String | 
encodeJavaIdentifier(String identifier)  | 
static Properties | 
getInterchangeProperties(String ediMappingModel)  | 
static List<String> | 
getMappingModelList(InputStream modelListStream)  | 
static void | 
loadMappingModels(Map<String,EdifactModel> mappingModels,
                 URI baseURI,
                 List<String> rootMappingModels)  | 
static void | 
loadMappingModels(String mappingModelFiles,
                 Map<String,EdifactModel> mappingModels,
                 URI baseURI)  | 
static String[] | 
split(String value,
     String delimiter,
     String escape)
Splits a String by delimiter as long as delimiter does not follow an escape sequence. 
 | 
static String | 
toLookupName(Description description)
Convert  
Description to the string representation
 that is used for lookup in the hashmaps | 
public static final String EDI_MAPPING_MODEL_ZIP_LIST_FILE
public static final String EDI_MAPPING_MODEL_INTERCHANGE_PROPERTIES_FILE
public static final String EDI_MAPPING_MODEL_URN
public static final Description MODEL_SET_DEFINITIONS_DESCRIPTION
public static final String MODEL_SET_DEFINITIONS_DESCRIPTION_LOOKUP_NAME
MODEL_SET_DEFINITIONS_DESCRIPTIONpublic static String[] split(String value, String delimiter, String escape)
StringUtils.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.public static void loadMappingModels(String mappingModelFiles, Map<String,EdifactModel> mappingModels, URI baseURI) throws EDIConfigurationException, IOException, SAXException
public static void loadMappingModels(Map<String,EdifactModel> mappingModels, URI baseURI, List<String> rootMappingModels) throws IOException, SAXException, EDIConfigurationException
public static Properties getInterchangeProperties(String ediMappingModel) throws IOException
IOExceptionpublic static String concatAndTruncate(List<String> nodeTokens, DelimiterType outerDelimiterType, Delimiters delimiters)
public static List<String> getMappingModelList(InputStream modelListStream) throws IOException
IOExceptionpublic static String encodeClassName(String name) throws IllegalNameException
name - the original class name.IllegalNameException - when class name is a reserved keyword in java.public static String encodeAttributeName(JType type, String name) throws IllegalNameException
type - the type of attribute.name - the original attribut name.IllegalNameException - when attribute name is a reserved keyword in java.public static String deleteWithPascalNotation(String value, char deleteChar)
value - the String to perform deletion on.deleteChar - the character to delete.public static void assertLegalName(String name) throws IllegalNameException
name - the value to check.IllegalNameException - when name is a reserved keyword in java.public static String toLookupName(Description description)
Description to the string representation
 that is used for lookup in the hashmapsdescription - Copyright © 2020. All rights reserved.