| java.lang.Object org.jibx.binding.Utility
Utility | public class Utility (Code) | | Binding compiler support class. Supplies common methods for use in compiling
binding definitions.
author: Dennis M. Sosnoski version: 1.0 |
convertName | public static String convertName(String name)(Code) | | Generate binding name. This takes a base name (such as a file name with
extension stripped off) and converts it to legal form by substituting '_'
characters for illegal characters in the base name.
Parameters: name - base binding name converted binding name |
fileName | public static String fileName(String path)(Code) | | Extract base file name from a full path.
Parameters: path - full file path file name component from path |
getClassPaths | public static String[] getClassPaths()(Code) | | Method builds a string array of items in the class path.
array of classpath components |
loadBinding | public static BindingDefinition loadBinding(String fname, String sname, InputStream istrm, URL url, boolean test) throws JiBXException, IOException(Code) | | Load validated binding definition. This first reads the input stream into
a memory buffer, then parses the data once for validation and a second
time for the actual binding definition construction. If any errors are
found in the binding definition validation the construction is skipped
and an exception is thrown.
Parameters: fname - binding definition full name Parameters: sname - short form of name to use as the default name of the binding Parameters: istrm - input stream for binding definition document Parameters: url - URL for binding definition (null if notavailable) Parameters: test - validate binding flag constructed binding definition exception: FileNotFoundException - if path cannot be accessed exception: JiBXException - if error in processing the binding definition |
loadFileBinding | public static BindingDefinition loadFileBinding(String path, boolean valid) throws JiBXException, IOException(Code) | | Load binding definition from file.
Parameters: path - file path for binding definition Parameters: valid - validate binding flag constructed binding definition exception: IOException - if error accessing file exception: JiBXException - if error in processing the binding definition |
validateBinding | public static BindingElement validateBinding(String name, URL url, InputStream is)(Code) | | Validate binding definition. If issues are found in the binding the
issues are printed directly to the console.
Parameters: name - identifier for binding definition Parameters: url - URL for binding definition (null if notavailable) Parameters: is - input stream for reading binding definition root element of binding model if binding is valid,null if one or more errors in binding |
|
|