org.ow2.jonas.deployment.ws
Class MappingFile

java.lang.Object
  extended by org.ow2.jonas.deployment.ws.MappingFile

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

Constructor Detail

MappingFile

public MappingFile(JavaWsdlMapping jwMapping)
Constructor : creates a MappingFile object.

Parameters:
jwMapping - XML Element java-wsdl-mapping
Method Detail

getXmlJavaWsdlMapping

public JavaWsdlMapping getXmlJavaWsdlMapping()
Returns:
Returns the XML Element representing this MappingFile (use only for Test).

getMappings

public 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 String getMapping(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 String getClassname(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 Iterator getXmlTypeMappings()
Return an iterator traversing the list of xmlType mappings.

Returns:
an iterator traversing the list of xmlType mappings.

toString

public String toString()
Build a string representation of MappingFile

Overrides:
toString in class Object
Returns:
String representation of the mapping file.

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

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

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


Copyright © 2010 OW2 Consortium. All Rights Reserved.