|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.milyn.edisax.util.EDIUtils
public class EDIUtils
EDIUtils contain different helper-methods for handling edifact.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
EDIUtils()
|
|
| Method Summary | |
|---|---|
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(org.milyn.javabean.pojogen.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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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_DESCRIPTION
public static HashSet<String> reservedKeywords
| Constructor Detail |
|---|
public EDIUtils()
| Method Detail |
|---|
public 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
EDIConfigurationException
IOException
SAXException
public static void loadMappingModels(Map<String,EdifactModel> mappingModels,
URI baseURI,
List<String> rootMappingModels)
throws IOException,
SAXException,
EDIConfigurationException
IOException
SAXException
EDIConfigurationException
public static Properties getInterchangeProperties(String ediMappingModel)
throws IOException
IOException
public static String concatAndTruncate(List<String> nodeTokens,
DelimiterType outerDelimiterType,
Delimiters delimiters)
public static List<String> getMappingModelList(InputStream modelListStream)
throws IOException
IOException
public 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(org.milyn.javabean.pojogen.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 encodeAttributeName(String name)
public static String encodeJavaIdentifier(String identifier)
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 hashmaps
description -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||