public class ServiceMappingConfigurationBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME
The name of this class
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.String |
MAPPING_ACTION_ATTR
The name of the action attribute in a service mapping
|
static java.lang.String |
MAPPING_CONFIG_TAG
The name of the XML tag that is corresponding to a service mapping configuration
|
static java.lang.String |
MAPPING_GROUP_DEFAULT_NOUN_TYPE_ATTR
The name of the attribute for default noun type of a service mapping group
|
static java.lang.String |
MAPPING_GROUP_NAME_ATTR
The name of the name attribute of a service mapping group
|
static java.lang.String |
MAPPING_GROUP_SERVICE_INPUT_TYPE_ATTR
The name of the attribute for service input type
|
static java.lang.String |
MAPPING_GROUP_SERVICE_NAME_ATTR
The name of the service attribute of a service mapping group
|
static java.lang.String |
MAPPING_GROUP_TAG
The tag name of a service mapping group
|
static java.lang.String |
MAPPING_GROUP_VERB_TYPE_ATTR
The name of the attribute for verb type of a service input
|
static java.lang.String |
MAPPING_NOUN_TYPE_ATTR
The name of the attribute for noun type in a service mapping
|
static java.lang.String |
MAPPING_SOURCE_ATTR
The name of the source attribute in a service mapping
|
static java.lang.String |
MAPPING_TAG
The tag name of a service mapping
|
static java.lang.String |
MAPPING_TARGET_ATTR
The name of the target attribute in a service mapping
|
static java.lang.String |
XPATH_MAPPING_GROUPS
The XPath that describes all the service mapping groups in the mapping file
|
Constructor and Description |
---|
ServiceMappingConfigurationBuilder() |
Modifier and Type | Method and Description |
---|---|
ServiceMappingConfiguration |
buildMappingConfiguration(java.io.File mappingFile)
Builds a service mapping configuration based on a given service mapping file
|
ServiceMappingConfiguration |
buildMappingConfiguration(java.io.InputStream mappingInfo)
Builds a service mapping configuration based on a given service mapping stream.
|
void |
buildMappingConfiguration(java.lang.String fileName,
ServiceMappingConfiguration configuration)
Builds the given configuration with the data in the given file.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
public static java.lang.String MAPPING_CONFIG_TAG
public static final java.lang.String MAPPING_GROUP_TAG
public static final java.lang.String MAPPING_GROUP_NAME_ATTR
public static final java.lang.String MAPPING_GROUP_SERVICE_NAME_ATTR
public static final java.lang.String MAPPING_GROUP_SERVICE_INPUT_TYPE_ATTR
public static final java.lang.String MAPPING_GROUP_DEFAULT_NOUN_TYPE_ATTR
public static final java.lang.String MAPPING_GROUP_VERB_TYPE_ATTR
public static final java.lang.String MAPPING_TAG
public static final java.lang.String MAPPING_SOURCE_ATTR
public static final java.lang.String MAPPING_TARGET_ATTR
public static final java.lang.String MAPPING_ACTION_ATTR
public static final java.lang.String MAPPING_NOUN_TYPE_ATTR
public static final java.lang.String XPATH_MAPPING_GROUPS
public ServiceMappingConfiguration buildMappingConfiguration(java.io.File mappingFile) throws java.io.FileNotFoundException, javax.xml.parsers.FactoryConfigurationError, java.lang.Exception
mappingFile
- the service mapping file that contains the mapping informationServiceMappingConfiguration
objectjava.io.FileNotFoundException
- thrown if the given File
is not associated with any physical file.org.xml.sax.SAXException
- thrown if the given file is invalid or ill-formedjava.io.IOException
- thrown if the file can not be read while being parsedFactoryConfigurationException
- thrown if a XML DOM builder can not be retrieved due to factory configuration problemsjavax.xml.parsers.ParserConfigurationException
- thrown if the parser used to parse the configuration file is not properly configuredjavax.xml.transform.TransformerException
- thrown if the XPath expressions being used can not be processed properlyjava.lang.ClassNotFoundException
- thrown if a type specified in the configuration file has no corresponding classes definedjavax.xml.parsers.FactoryConfigurationError
java.lang.Exception
public ServiceMappingConfiguration buildMappingConfiguration(java.io.InputStream mappingInfo) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.FactoryConfigurationError, javax.xml.parsers.ParserConfigurationException, javax.xml.transform.TransformerException, java.lang.ClassNotFoundException
mappingInfo
- An InputStream
that contains the mapping informationServiceMappingConfiguration
object. An empty ServiceMappingConfiguration
when the given input stream is null.java.io.FileNotFoundException
- thrown if the given File
is not associated with any physical file.org.xml.sax.SAXException
- thrown if the given file is invalid or ill-formedjava.io.IOException
- thrown if the file can not be read while being parsedFactoryConfigurationException
- thrown if the XML DOM builder can not be retrieved due to factory configuration problemsjavax.xml.parsers.ParserConfigurationException
- thrown if the parser used to parse the configuration file is not properly configuredjavax.xml.transform.TransformerException
- thrown if the XPath expressions being used can not be processed properlyjava.lang.ClassNotFoundException
- thrown if a type specified in the configuration file has no corresponding classes definedjavax.xml.parsers.FactoryConfigurationError
public void buildMappingConfiguration(java.lang.String fileName, ServiceMappingConfiguration configuration) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.FactoryConfigurationError, javax.xml.parsers.ParserConfigurationException, javax.xml.transform.TransformerException, java.lang.ClassNotFoundException
fileName
- the name of the configuration fileconfiguration
- a non-null ServiceMappingConfiguration
instancejava.io.FileNotFoundException
- thrown if the given File
is not associated with any physical file.org.xml.sax.SAXException
- thrown if the given file is invalid or ill-formedjava.io.IOException
- thrown if the file can not be read while being parsed, or when the input stream can not be closedFactoryConfigurationException
- thrown if a XML DOM builder can not be retrieved due to factory configuration problemsjavax.xml.parsers.ParserConfigurationException
- thrown if the parser used to parse the configuration file is not properly configuredjavax.xml.transform.TransformerException
- thrown if the XPath expressions being used can not be processed properlyjava.lang.ClassNotFoundException
- thrown if a type specified in the configuration file has no corresponding classes definedjavax.xml.parsers.FactoryConfigurationError
ServiceMappingConfiguration.clear()