Java Doc for JAXBRIContext.java in  » 6.0-JDK-Modules » jaxb-impl » com » sun » xml » bind » api » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » jaxb impl » com.sun.xml.bind.api 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.xml.bind.JAXBContext
      com.sun.xml.bind.api.JAXBRIContext

All known Subclasses:   com.sun.xml.bind.v2.runtime.JAXBContextImpl,
JAXBRIContext
abstract public class JAXBRIContext extends JAXBContext (Code)
JAXBContext enhanced with JAXB RI specific functionalities.

Subject to change without notice.
since:
   2.0 EA1
author:
   Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)



Field Summary
final public static  StringANNOTATION_READER
     The property that you can specify to JAXBContext.newInstance to use alternative RuntimeAnnotationReader implementation.
final public static  StringCANONICALIZATION_SUPPORT
     The property that you can specify to JAXBContext.newInstance and Marshaller.setProperty(StringObject) to enable the c14n marshalling support in the JAXBContext .
final public static  StringDEFAULT_NAMESPACE_REMAP
     The property that you can specify to JAXBContext.newInstance to reassign the default namespace URI to something else at the runtime.
final public static  StringENABLE_XOP
     Marshaller/Unmarshaller property to enable XOP processing.
final public static  StringSUBCLASS_REPLACEMENTS
     The property that you can specify to JAXBContext.newInstance to specify specific classes that replace the reference to generic classes.

See the release notes for more details about this feature.

final public static  StringTREAT_EVERYTHING_NILLABLE
     The property that you can specify to JAXBContext.newInstance to allow unmarshaller to honor xsi:nil anywhere, even if they are not specifically allowed by the schema.
final public static  StringTYPE_REFERENCES
     The property that you can specify to JAXBContext.newInstance to put additional JAXB type references into the JAXBContext .
final public static  StringXMLACCESSORFACTORY_SUPPORT
     The property that you can specify to JAXBContext.newInstance enable support of XmlAccessorFactory annotation in the JAXBContext .

Constructor Summary
protected  JAXBRIContext()
    

Method Summary
abstract public  BridgecreateBridge(TypeReference ref)
     Creates a mini-marshaller/unmarshaller that can process a TypeReference .
abstract public  BridgeContextcreateBridgeContext()
     Creates a new BridgeContext instance.
abstract public  voidgenerateEpisode(Result output)
     Generates the episode file that represents the binding known to this JAXBContext , so that XJC can later do separate compilation.
abstract public  voidgenerateSchema(SchemaOutputResolver outputResolver)
     Generates the schema documents from the model.
public static  TypegetBaseType(Type type, Class baseType)
     Gets the parameterization of the given base type.
abstract public  StringgetBuildId()
     Gets the build information of the JAXB runtime.
abstract public  QNamegetElementName(Object o)
     If the given object is bound to an element in XML by JAXB, returns the element name.
abstract public  RawAccessor<B, V>getElementPropertyAccessor(Class<B> wrapperBean, String nsUri, String localName)
     Gets a RawAccessor for the specified element property of the specified wrapper bean class.

This method is designed to assist the JAX-RPC RI fill in a wrapper bean (in the doc/lit/wrap mode.) In the said mode, a wrapper bean is supposed to only have properties that match elements, and for each element that appear in the content model there's one property.

Therefore, this method takes a wrapper bean and a tag name that identifies a property on the given wrapper bean, then returns a RawAccessor that allows the caller to set/get a value from the property of the bean.

This method is not designed for a performance.

abstract public  List<String>getKnownNamespaceURIs()
     Gets the namespace URIs statically known to this JAXBContext .
abstract public  QNamegetTypeName(TypeReference tr)
     Returns the name of the XML Type bound to the specified Java type.
Parameters:
  tr - must not be null.
abstract public  booleanhasSwaRef()
     Returns true if this context includes a class that has XmlAttachmentRef .
public static  StringmangleNameToClassName(String localName)
     Computes a Java class name from a local name.
public static  StringmangleNameToPropertyName(String localName)
     Computes a Java class name from a local name.
public static  StringmangleNameToVariableName(String localName)
     Computes a Java identifier from a local name.
public static  JAXBRIContextnewInstance(Class[] classes, Collection<TypeReference> typeRefs, Map<Class, Class> subclassReplacements, String defaultNamespaceRemap, boolean c14nSupport, RuntimeAnnotationReader ar)
     Creates a new JAXBRIContext .

JAXBContext.newInstance(Class[]) JAXBContext.newInstance() methods may return other JAXB providers that are not compatible with the JAX-RPC RI. This method guarantees that the JAX-WS RI will finds the JAXB RI.
Parameters:
  classes - Classes to be bound.

public static  JAXBRIContextnewInstance(Class[] classes, Collection<TypeReference> typeRefs, String defaultNamespaceRemap, boolean c14nSupport)
    

Field Detail
ANNOTATION_READER
final public static String ANNOTATION_READER(Code)
The property that you can specify to JAXBContext.newInstance to use alternative RuntimeAnnotationReader implementation.
since:
   2.1 EA2



CANONICALIZATION_SUPPORT
final public static String CANONICALIZATION_SUPPORT(Code)
The property that you can specify to JAXBContext.newInstance and Marshaller.setProperty(StringObject) to enable the c14n marshalling support in the JAXBContext .
See Also:   C14nSupport_ArchitectureDocument
since:
   2.0 EA2



DEFAULT_NAMESPACE_REMAP
final public static String DEFAULT_NAMESPACE_REMAP(Code)
The property that you can specify to JAXBContext.newInstance to reassign the default namespace URI to something else at the runtime.

The value of the property is String , and it is used as the namespace URI that succeeds the default namespace URI.
since:
   2.0 EA1




ENABLE_XOP
final public static String ENABLE_XOP(Code)
Marshaller/Unmarshaller property to enable XOP processing.
since:
   2.0 EA2



SUBCLASS_REPLACEMENTS
final public static String SUBCLASS_REPLACEMENTS(Code)
The property that you can specify to JAXBContext.newInstance to specify specific classes that replace the reference to generic classes.

See the release notes for more details about this feature.
since:
   2.1 EA2




TREAT_EVERYTHING_NILLABLE
final public static String TREAT_EVERYTHING_NILLABLE(Code)
The property that you can specify to JAXBContext.newInstance to allow unmarshaller to honor xsi:nil anywhere, even if they are not specifically allowed by the schema.
since:
   2.1.3



TYPE_REFERENCES
final public static String TYPE_REFERENCES(Code)
The property that you can specify to JAXBContext.newInstance to put additional JAXB type references into the JAXBContext .

The value of the property is Collection < TypeReference >. Those TypeReference s can then be used to create Bridge s.

This mechanism allows additional element declarations that were not a part of the schema into the created JAXBContext .
since:
   2.0 EA1




XMLACCESSORFACTORY_SUPPORT
final public static String XMLACCESSORFACTORY_SUPPORT(Code)
The property that you can specify to JAXBContext.newInstance enable support of XmlAccessorFactory annotation in the JAXBContext .
since:
   2.1 EA2




Constructor Detail
JAXBRIContext
protected JAXBRIContext()(Code)




Method Detail
createBridge
abstract public Bridge createBridge(TypeReference ref)(Code)
Creates a mini-marshaller/unmarshaller that can process a TypeReference . null if the specified reference is not given to JAXBRIContext.newInstance.
since:
   2.0 EA1



createBridgeContext
abstract public BridgeContext createBridgeContext()(Code)
Creates a new BridgeContext instance. always a valid non-null instance.
since:
   2.0 EA1



generateEpisode
abstract public void generateEpisode(Result output)(Code)
Generates the episode file that represents the binding known to this JAXBContext , so that XJC can later do separate compilation.

Episode file is really just a JAXB customization file, except that currently we use the RI-specific SCD to refer to schema components.
Parameters:
  output - This receives the generated episode file.
since:
   2.1




generateSchema
abstract public void generateSchema(SchemaOutputResolver outputResolver) throws IOException(Code)
Generates the schema documents from the model.

The caller can use the additionalElementDecls parameter to add element declarations to the generate schema. For example, if the JAX-RPC passes in the following entry: {foo}bar -> DeclaredType for java.lang.String then JAXB generates the following element declaration (in the schema document for the namespace "foo")" <xs:element name="bar" type="xs:string" /> This can be used for generating schema components necessary for WSDL.
Parameters:
  outputResolver - this object controls the output to which schemaswill be sent.
throws:
  IOException - if SchemaOutputResolver throws an IOException.




getBaseType
public static Type getBaseType(Type type, Class baseType)(Code)
Gets the parameterization of the given base type.

For example, given the following


 interface Foo<T> extends List<List<T>> {}
 interface Bar extends Foo<String> {}
 
This method works like this:

 getBaseClass( Bar, List ) = List<List<String>
 getBaseClass( Bar, Foo  ) = Foo<String>
 getBaseClass( Foo<? extends Number>, Collection ) = Collection<List<? extends Number>>
 getBaseClass( ArrayList<? extends BigInteger>, List ) = List<? extends BigInteger>
 

Parameters:
  type - The type that derives from baseType
Parameters:
  baseType - The class whose parameterization we are interested in.The use of baseType in type .or null if the type is not assignable to the base type.
since:
   2.0 FCS



getBuildId
abstract public String getBuildId()(Code)
Gets the build information of the JAXB runtime. may be null, if the runtime is loaded by a class loader that doesn't supportthe access to the manifest informatino.



getElementName
abstract public QName getElementName(Object o) throws JAXBException(Code)
If the given object is bound to an element in XML by JAXB, returns the element name. nullif the object is not bound to an element.
throws:
  JAXBException - if the object is not known to this context.
since:
   2.0 EA1



getElementPropertyAccessor
abstract public RawAccessor<B, V> getElementPropertyAccessor(Class<B> wrapperBean, String nsUri, String localName) throws JAXBException(Code)
Gets a RawAccessor for the specified element property of the specified wrapper bean class.

This method is designed to assist the JAX-RPC RI fill in a wrapper bean (in the doc/lit/wrap mode.) In the said mode, a wrapper bean is supposed to only have properties that match elements, and for each element that appear in the content model there's one property.

Therefore, this method takes a wrapper bean and a tag name that identifies a property on the given wrapper bean, then returns a RawAccessor that allows the caller to set/get a value from the property of the bean.

This method is not designed for a performance. The caller is expected to cache the result. <
Parameters:
  B - >type of the wrapper bean<
Parameters:
  V - >type of the property of the beanalways return non-null valid accessor object.
throws:
  JAXBException - if the specified wrapper bean is not bound by JAXB, or if it doesn't have an element propertyof the given name.
since:
   2.0 EA1




getKnownNamespaceURIs
abstract public List<String> getKnownNamespaceURIs()(Code)
Gets the namespace URIs statically known to this JAXBContext .

When JAXB is used to marshal into sub-trees, it declares these namespace URIs at each top-level element that it marshals. To avoid repeated namespace declarations at sub-elements, the application may declare those namespaces at a higher level. always non-null.
since:
   2.0 EA2




getTypeName
abstract public QName getTypeName(TypeReference tr)(Code)
Returns the name of the XML Type bound to the specified Java type.
Parameters:
  tr - must not be null. This must be one of the TypeReferences specifiedin the JAXBRIContext.newInstance method.
throws:
  IllegalArgumentException - if the parameter is null or not a part of the TypeReferences specifiedin the JAXBRIContext.newInstance method. nullif the referenced type is an anonymous and therefore doesn't have a name.



hasSwaRef
abstract public boolean hasSwaRef()(Code)
Returns true if this context includes a class that has XmlAttachmentRef .
since:
   2.1



mangleNameToClassName
public static String mangleNameToClassName(String localName)(Code)
Computes a Java class name from a local name.

This method faithfully implements the name mangling rule as specified in the JAXB spec. Typically, this method returns "NameLikeThis".




mangleNameToPropertyName
public static String mangleNameToPropertyName(String localName)(Code)
Computes a Java class name from a local name.

This method faithfully implements the name mangling rule as specified in the JAXB spec. This method works like JAXBRIContext.mangleNameToClassName(String) except that it looks for "getClass" and returns something else. Typically, this method returns "NameLikeThis".




mangleNameToVariableName
public static String mangleNameToVariableName(String localName)(Code)
Computes a Java identifier from a local name.

This method faithfully implements the name mangling rule as specified in the JAXB spec.

In JAXB, a collision with a Java reserved word (such as "return") never happens. Accordingly, this method may return an identifier that collides with reserved words.

Use JJavaName.isJavaIdentifier(String) to check for such collision. Typically, this method returns "nameLikeThis".




newInstance
public static JAXBRIContext newInstance(Class[] classes, Collection<TypeReference> typeRefs, Map<Class, Class> subclassReplacements, String defaultNamespaceRemap, boolean c14nSupport, RuntimeAnnotationReader ar) throws JAXBException(Code)
Creates a new JAXBRIContext .

JAXBContext.newInstance(Class[]) JAXBContext.newInstance() methods may return other JAXB providers that are not compatible with the JAX-RPC RI. This method guarantees that the JAX-WS RI will finds the JAXB RI.
Parameters:
  classes - Classes to be bound. See JAXBContext.newInstance(Class[]) for the meaning.
Parameters:
  typeRefs - See JAXBRIContext.TYPE_REFERENCES for the meaning of this parameter.Can be null.
Parameters:
  subclassReplacements - See JAXBRIContext.SUBCLASS_REPLACEMENTS for the meaning of this parameter.Can be null.
Parameters:
  defaultNamespaceRemap - See JAXBRIContext.DEFAULT_NAMESPACE_REMAP for the meaning of this parameter.Can be null (and should be null for ordinary use of JAXB.)
Parameters:
  c14nSupport - See JAXBRIContext.CANONICALIZATION_SUPPORT for the meaning of this parameter.
Parameters:
  ar - See JAXBRIContext.ANNOTATION_READER for the meaning of this parameter.Can be null.
since:
   JAXB 2.1 EA2




newInstance
public static JAXBRIContext newInstance(Class[] classes, Collection<TypeReference> typeRefs, String defaultNamespaceRemap, boolean c14nSupport) throws JAXBException(Code)



Fields inherited from javax.xml.bind.JAXBContext
final public static String JAXB_CONTEXT_FACTORY(Code)(Java Doc)

Methods inherited from javax.xml.bind.JAXBContext
public Binder<T> createBinder(Class<T> domType)(Code)(Java Doc)
public Binder<Node> createBinder()(Code)(Java Doc)
public JAXBIntrospector createJAXBIntrospector()(Code)(Java Doc)
abstract public Marshaller createMarshaller() throws JAXBException(Code)(Java Doc)
abstract public Unmarshaller createUnmarshaller() throws JAXBException(Code)(Java Doc)
abstract public Validator createValidator() throws JAXBException(Code)(Java Doc)
public void generateSchema(SchemaOutputResolver outputResolver) throws IOException(Code)(Java Doc)
public static JAXBContext newInstance(String contextPath) throws JAXBException(Code)(Java Doc)
public static JAXBContext newInstance(String contextPath, ClassLoader classLoader) throws JAXBException(Code)(Java Doc)
public static JAXBContext newInstance(String contextPath, ClassLoader classLoader, Map<String, ?> properties) throws JAXBException(Code)(Java Doc)
public static JAXBContext newInstance(Class... classesToBeBound) throws JAXBException(Code)(Java Doc)
public static JAXBContext newInstance(Class[] classesToBeBound, Map<String, ?> properties) throws JAXBException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.