org.objectweb.jonas_ws.deployment.api
Class MappingFile

java.lang.Object
  extended byorg.objectweb.jonas_ws.deployment.api.MappingFile

public class MappingFile
extends java.lang.Object

this Class is used to manipulate jaxrpc-mapping-file. This file contains informations for mapping between XML namespaces and java packages. We actually support just a few part of this file. According with JSR 921, this file must contain class mapping information (exceptions/faults, types/classes, portTypes/interfaces ...).

Author:
Guillaume Sauthier, Xavier Delplanque, Helene Joanin

Constructor Summary
MappingFile(java.io.InputStream is, java.lang.String name)
          Constructor : creates a MappingFile object.
MappingFile(java.io.InputStream is, java.lang.String name, boolean validate)
          Constructor : creates a MappingFile object.
MappingFile(java.io.Reader is, java.lang.String name, boolean validate)
          Constructor : creates a MappingFile object.
 
Method Summary
 boolean equals(java.lang.Object other)
          Return true if the 2 objects are equals in value.
 java.lang.String getClassname(javax.xml.namespace.QName xmlType)
          Return the Java classname representing the xml type.
 java.lang.String getMapping(java.lang.String namespaceURI)
          Return the package associated with the specified namespaceURI (can be null).
 java.util.Map getMappings()
          return the mapping between XML namespaces and Java packages defined in the jaxrpc-mapping file.
 JavaWsdlMapping getXmlJavaWsdlMapping()
          Return the XML JavaWsdlMapping object
 java.util.Iterator getXmlTypeMappings()
          Return an iterator traversing the list of xmlType mappings.
 java.lang.String toString()
          Build a string representation of MappingFile
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappingFile

public MappingFile(java.io.Reader is,
                   java.lang.String name,
                   boolean validate)
            throws WSDeploymentDescException
Constructor : creates a MappingFile object.

Parameters:
is - mapping file Reader.
name - file name (only for messages).
validate - Flag for parser validation.
Throws:
WSDeploymentDescException - When reading/parsing fails.

MappingFile

public MappingFile(java.io.InputStream is,
                   java.lang.String name)
            throws WSDeploymentDescException
Constructor : creates a MappingFile object.

Parameters:
is - mapping file InputStream.
name - file name (only for messages).
Throws:
WSDeploymentDescException - When reading/parsing fails.

MappingFile

public MappingFile(java.io.InputStream is,
                   java.lang.String name,
                   boolean validate)
            throws WSDeploymentDescException
Constructor : creates a MappingFile object.

Parameters:
is - mapping file InputStream.
name - file name (only for messages).
validate - Flag for parser validation.
Throws:
WSDeploymentDescException - When reading/parsing fails.
Method Detail

getMappings

public java.util.Map getMappings()
return the mapping between XML namespaces and Java packages defined in the jaxrpc-mapping file.

Returns:
the mapping between XML namespaces and Java packages

getMapping

public java.lang.String getMapping(java.lang.String namespaceURI)
Return the package associated with the specified namespaceURI (can be null).

Parameters:
namespaceURI - the namespace key to retrieve the package name
Returns:
the package associated with the specified namespaceURI. (null if namespace not present).

getClassname

public java.lang.String getClassname(javax.xml.namespace.QName xmlType)
Return the Java classname representing the xml type.

Parameters:
xmlType - the QName of the xml type
Returns:
the Java classname representing the xml type.

getXmlTypeMappings

public java.util.Iterator getXmlTypeMappings()
Return an iterator traversing the list of xmlType mappings.

Returns:
an iterator traversing the list of xmlType mappings.

getXmlJavaWsdlMapping

public JavaWsdlMapping getXmlJavaWsdlMapping()
Return the XML JavaWsdlMapping object

Returns:
the XML JavaWsdlMapping object

toString

public java.lang.String toString()
Build a string representation of MappingFile

Returns:
String representation of the mapping file.

equals

public boolean equals(java.lang.Object other)
Return true if the 2 objects are equals in value.

Parameters:
other - the object to compare.
Returns:
true if objects are equals in value, else false.