Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02

weblogic.xml.schema.binding
Interface TypeMapping


public interface TypeMapping

A Collection of TypeMappingEntry objects.

Uniqueness constraints: Either of the get methods should be able to uniquely identify and retrieve a mapping. This might be implemented with two Maps which check this uniquness constraint on insert.

TypeMappings may be chained. An implementation can then use use the parent mapping to perform a lookup that fails in the current mapping.


Method Summary
 boolean add(Class clazz, XMLName xml_type, Serializer serializer, Deserializer deserializer)
          Shortcut for add(TypeMappingEntry)
 boolean add(Class clazz, XMLName xml_type, SerializerFactory serializer, DeserializerFactory deserializer)
          Shortcut for add(TypeMappingEntry)
 boolean add(TypeMappingEntry e)
          Add a type mapping entry.
 TypeMappingEntry get(Class c, ClassContext ctx)
          Get the TypeMappingEntry corresponding to the given Class and ClassContext
 TypeMappingEntry get(XMLName schema_type, SchemaContext ctx)
          Get the TypeMappingEntry corresponding to the given XMLName and SchemaContext
 Class getClassFromXMLName(XMLName xml_name)
          return the class for a given xml_name, as currently thought of by this mapping.
 TypeMappingEntry[] getEntries()
          Return an array of all the TypeMappingEntry's in this TypeMapping
 Class getHolderClass(Class clazz, QName xmlType)
          get JAX-RPC Holder class for this class.
 TypeMapping getParent()
          Get the parent TypeMapping
 XMLName getXMLNameFromClass(Class clazz)
          return the xml_name for a given class, as currently thought of by this mapping.
 void readXML(XMLInputStream stream)
          read from xml in the format defined by the webservices deployment descriptor, and add each entry found to this mapping.
 void remove(TypeMappingEntry e)
          Remove a type mapping.
 void replace(TypeMappingEntry e)
          Add a type mapping entry, first removing a mapping if neccessary to maintain the uniqueness constraints.
 void setParent(TypeMapping v)
          Set the parent TypeMapping
 void writeXML(XMLOutputStream xout)
          write each entry found to this mapping to xml in the format defined by the webservices deployment descriptor.
 

Method Detail

getClassFromXMLName

Class getClassFromXMLName(XMLName xml_name)
return the class for a given xml_name, as currently thought of by this mapping.


getXMLNameFromClass

XMLName getXMLNameFromClass(Class clazz)
return the xml_name for a given class, as currently thought of by this mapping.


getHolderClass

Class getHolderClass(Class clazz,
                     QName xmlType)
                     throws IOException
get JAX-RPC Holder class for this class. Passed in class must be in the type mapping

Throws:
IOException

add

boolean add(TypeMappingEntry e)
Add a type mapping entry. It is illegal to add a mapping which will violate the uniqueness constraints. This method follow the semantics of java.util.Set.add.

Returns:
true if this mapping did not already contain the entry
See Also:
Set.add(E)

add

boolean add(Class clazz,
            XMLName xml_type,
            Serializer serializer,
            Deserializer deserializer)
Shortcut for add(TypeMappingEntry)

See Also:
TypeMapping.add(TypeMappingEntry)

add

boolean add(Class clazz,
            XMLName xml_type,
            SerializerFactory serializer,
            DeserializerFactory deserializer)
Shortcut for add(TypeMappingEntry)

See Also:
TypeMapping.add(TypeMappingEntry)

replace

void replace(TypeMappingEntry e)
Add a type mapping entry, first removing a mapping if neccessary to maintain the uniqueness constraints.


remove

void remove(TypeMappingEntry e)
Remove a type mapping.


get

TypeMappingEntry get(Class c,
                     ClassContext ctx)
Get the TypeMappingEntry corresponding to the given Class and ClassContext

Parameters:
c - Java Class object
ctx - ClassContext for this use of Class c.

get

TypeMappingEntry get(XMLName schema_type,
                     SchemaContext ctx)
Get the TypeMappingEntry corresponding to the given XMLName and SchemaContext

Parameters:
schema_type -
ctx - SchemaContext for this use of schema_type.

getEntries

TypeMappingEntry[] getEntries()
Return an array of all the TypeMappingEntry's in this TypeMapping


getParent

TypeMapping getParent()
Get the parent TypeMapping

Returns:
value of parent.

setParent

void setParent(TypeMapping v)
Set the parent TypeMapping

Parameters:
v - Value to assign to parent.

readXML

void readXML(XMLInputStream stream)
             throws IOException,
                    XMLStreamException
read from xml in the format defined by the webservices deployment descriptor, and add each entry found to this mapping.

Throws:
IOException
XMLStreamException

writeXML

void writeXML(XMLOutputStream xout)
              throws XMLStreamException
write each entry found to this mapping to xml in the format defined by the webservices deployment descriptor.

Throws:
XMLStreamException

Copyright 1996, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02