Java Doc for ReadContext.java in  » Library » Apache-commons-betwixt-0.8-src » org » apache » commons » betwixt » io » read » 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 » Library » Apache commons betwixt 0.8 src » org.apache.commons.betwixt.io.read 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.betwixt.expression.Context
      org.apache.commons.betwixt.io.read.ReadContext

ReadContext
public class ReadContext extends Context (Code)

Extends Context to provide read specific functionality.

Three stacks are used to manage the reading:

  • Action mapping stack contains the MappingAction 's used to execute the mapping of the current element and it's ancesters back to the document root.
  • Result stack contains the objects which are bound to the current element and to each of it's ancester's back to the root
  • Element mapping stack records the names of the element and the classes to which they are bound

author:
   Robert Burrell Donkina
since:
   0.5



Constructor Summary
public  ReadContext(Context context, ReadConfiguration readConfiguration)
     Constructs a ReadContext with the same settings as an existing Context.
public  ReadContext(BindingConfiguration bindingConfiguration, ReadConfiguration readConfiguration)
     Constructs a ReadContext with standard log.
public  ReadContext(Log log, BindingConfiguration bindingConfiguration, ReadConfiguration readConfiguration)
    
public  ReadContext(ReadContext readContext)
     Constructs a ReadContext with the same settings as an existing Context.

Method Summary
public  voidclearBeans()
     Clears the beans indexed by id.
public  MappingActioncurrentMappingAction()
    
public  ActionMappingStrategygetActionMappingStrategy()
     Gets the strategy used to define default mappings actions for elements. ActionMappingStrategy.
public  ObjectgetBean(String id)
     Gets a bean from storage by an (xml) ID.
public  ObjectgetBean()
    
public  BeanCreationChaingetBeanCreationChain()
     Gets the BeanCreationChange to be used to create beans when an element is mapped.
public  ClassLoadergetClassLoader()
     Gets the classloader to be used.
public  ElementDescriptorgetCurrentDescriptor()
     Gets the ElementDescriptor that describes the mapping for the current element.
public  StringgetCurrentElement()
     Gets the element name for the currently mapped element.
public  UpdatergetCurrentUpdater()
     Gets the current Updater.
public  ClassgetLastMappedClass()
     Gets the Class that was last mapped, if there is one.
public  ClassgetRootClass()
    
public  XMLIntrospectorgetXMLIntrospector()
     Gets the XMLIntrospector to be used to create the mappings for the xml.
public  voidmarkClassMap(Class mappedClazz)
     Marks the element name stack with a class mapping.
public  ObjectpopBean()
     Pops the last mapping Object from the stack containing beans that have been mapped.
public  StringpopElement()
     Pops the top element from the element mapping stack.
public  MappingActionpopMappingAction()
    
public  UpdaterpopUpdater()
     Pops the top Updater from the stack.
public  voidpopulateAttributes(AttributeDescriptor[] attributeDescriptors, Attributes attributes)
     Populates the object mapped by the AttributeDescriptors with the values in the given Attributes.
public  voidpushBean(Object bean)
     Pushs a newly mapped Object onto the mapped bean stack.
public  voidpushElement(String elementName)
     Pushes the given element onto the element mapping stack.
Parameters:
  elementName - the local name if the parser is namespace aware,otherwise the full element name.
public  voidpushMappingAction(MappingAction mappingAction)
    
public  voidpushUpdater(Updater updater)
    

Pushes an Updater onto the stack.

NoteAny action pushing an Updater onto the stack should take responsibility for popping the updater from the stack at an appropriate time.

public  voidputBean(String id, Object bean)
     Puts a bean into storage indexed by an (xml) ID.
public  ClassresolvePolymorphicType(ElementMapping mapping)
     Resolves any polymorphism in the element mapping.
public  voidsetBean(Object bean)
    
public  voidsetClassLoader(ClassLoader classLoader)
     Sets the classloader to be used.
public  voidsetRootClass(Class rootClass)
    
public  voidsetXMLIntrospector(XMLIntrospector xmlIntrospector)
     Sets the XMLIntrospector to be used to create the mappings for the xml.


Constructor Detail
ReadContext
public ReadContext(Context context, ReadConfiguration readConfiguration)(Code)
Constructs a ReadContext with the same settings as an existing Context.
Parameters:
  context - not null
Parameters:
  readConfiguration - not null



ReadContext
public ReadContext(BindingConfiguration bindingConfiguration, ReadConfiguration readConfiguration)(Code)
Constructs a ReadContext with standard log.
Parameters:
  bindingConfiguration - the dynamic configuration, not null
Parameters:
  readConfiguration - the extra read configuration not null



ReadContext
public ReadContext(Log log, BindingConfiguration bindingConfiguration, ReadConfiguration readConfiguration)(Code)
Base constructor
Parameters:
  log - log to this Log
Parameters:
  bindingConfiguration - the dynamic configuration, not null
Parameters:
  readConfiguration - the extra read configuration not null



ReadContext
public ReadContext(ReadContext readContext)(Code)
Constructs a ReadContext with the same settings as an existing Context.
Parameters:
  readContext - not null




Method Detail
clearBeans
public void clearBeans()(Code)
Clears the beans indexed by id.



currentMappingAction
public MappingAction currentMappingAction()(Code)
Gets the current mapping action MappingAction



getActionMappingStrategy
public ActionMappingStrategy getActionMappingStrategy()(Code)
Gets the strategy used to define default mappings actions for elements. ActionMappingStrategy. not null



getBean
public Object getBean(String id)(Code)
Gets a bean from storage by an (xml) ID.
Parameters:
  id - the ID string of the xml element associated with the bean the Object that the ID references, otherwise null



getBean
public Object getBean()(Code)



getBeanCreationChain
public BeanCreationChain getBeanCreationChain()(Code)
Gets the BeanCreationChange to be used to create beans when an element is mapped. the BeanCreationChain not null



getClassLoader
public ClassLoader getClassLoader()(Code)
Gets the classloader to be used. the classloader that should be used to load all classes, possibly null



getCurrentDescriptor
public ElementDescriptor getCurrentDescriptor() throws Exception(Code)
Gets the ElementDescriptor that describes the mapping for the current element. ElementDescriptor or null if there is nocurrent mapping
throws:
  Exception -



getCurrentElement
public String getCurrentElement()(Code)
Gets the element name for the currently mapped element. the name of the currently mapped element, or null if there has been no element mapped



getCurrentUpdater
public Updater getCurrentUpdater()(Code)
Gets the current Updater. This may (or may not) be the updater for the current descriptor. If the current descriptor is a bean child, the the current updater will (most likely) be the updater for the property. Actions (that, for example, use proxy objects) may push updaters onto the stack. Updater, possibly null



getLastMappedClass
public Class getLastMappedClass()(Code)
Gets the Class that was last mapped, if there is one. the Class last marked as mapped or null if no class has been mapped



getRootClass
public Class getRootClass()(Code)



getXMLIntrospector
public XMLIntrospector getXMLIntrospector()(Code)
Gets the XMLIntrospector to be used to create the mappings for the xml. XMLIntrospector, not null



markClassMap
public void markClassMap(Class mappedClazz) throws IntrospectionException(Code)
Marks the element name stack with a class mapping. Relative paths and last mapped class are calculated using these marks.
Parameters:
  mappedClazz - the Class which has been mapped at the current path, not null



popBean
public Object popBean()(Code)
Pops the last mapping Object from the stack containing beans that have been mapped. the last bean pushed onto the stack



popElement
public String popElement()(Code)
Pops the top element from the element mapping stack. Also removes any mapped class marks below the top element. the name of the element popped if there are any more elements on the stack, otherwise null.This is the local name if the parser is namespace aware, otherwise the name



popMappingAction
public MappingAction popMappingAction()(Code)
Pops an action mapping from the stack MappingAction, not null



popUpdater
public Updater popUpdater()(Code)
Pops the top Updater from the stack.

NoteAny action pushing an Updater onto the stack should take responsibility for popping the updater from the stack at an appropriate time.

Updater, possibly null



populateAttributes
public void populateAttributes(AttributeDescriptor[] attributeDescriptors, Attributes attributes)(Code)
Populates the object mapped by the AttributeDescriptors with the values in the given Attributes.
Parameters:
  attributeDescriptors - AttributeDescriptors, not null
Parameters:
  attributes - Attributes, not null



pushBean
public void pushBean(Object bean)(Code)
Pushs a newly mapped Object onto the mapped bean stack.
Parameters:
  bean -



pushElement
public void pushElement(String elementName) throws Exception(Code)
Pushes the given element onto the element mapping stack.
Parameters:
  elementName - the local name if the parser is namespace aware,otherwise the full element name. Not null



pushMappingAction
public void pushMappingAction(MappingAction mappingAction)(Code)
Pushs an action mapping onto the stack
Parameters:
  mappingAction -



pushUpdater
public void pushUpdater(Updater updater)(Code)

Pushes an Updater onto the stack.

NoteAny action pushing an Updater onto the stack should take responsibility for popping the updater from the stack at an appropriate time.

Usage: this may be used by actions which require a temporary object to be updated. Pushing an updater onto the stack allow actions downstream to transparently update the temporary proxy.


Parameters:
  updater - Updater, possibly null



putBean
public void putBean(String id, Object bean)(Code)
Puts a bean into storage indexed by an (xml) ID.
Parameters:
  id - the ID string of the xml element associated with the bean
Parameters:
  bean - the Object to store, not null



resolvePolymorphicType
public Class resolvePolymorphicType(ElementMapping mapping)(Code)
Resolves any polymorphism in the element mapping.
Parameters:
  mapping - ElementMapping describing the mapped element null if the type cannot be resolved or if the current descriptor is not polymorphic
since:
   0.8



setBean
public void setBean(Object bean)(Code)



setClassLoader
public void setClassLoader(ClassLoader classLoader)(Code)
Sets the classloader to be used.
Parameters:
  classLoader - the ClassLoader to be used, possibly null



setRootClass
public void setRootClass(Class rootClass)(Code)



setXMLIntrospector
public void setXMLIntrospector(XMLIntrospector xmlIntrospector)(Code)
Sets the XMLIntrospector to be used to create the mappings for the xml.
Parameters:
  xmlIntrospector - XMLIntrospector, not null



Methods inherited from org.apache.commons.betwixt.expression.Context
public Object getBean()(Code)(Java Doc)
public String getClassNameAttribute()(Code)(Java Doc)
public IdStoringStrategy getIdMappingStrategy()(Code)(Java Doc)
public String getInheritedOption(String name)(Code)(Java Doc)
public Log getLog()(Code)(Java Doc)
public boolean getMapIDs()(Code)(Java Doc)
public ObjectStringConverter getObjectStringConverter()(Code)(Java Doc)
public Options getOptions()(Code)(Java Doc)
public ValueSuppressionStrategy getValueSuppressionStrategy()(Code)(Java Doc)
public Object getVariable(String name)(Code)(Java Doc)
public Map getVariables()(Code)(Java Doc)
public Context newContext(Object newBean)(Code)(Java Doc)
public void popOptions()(Code)(Java Doc)
public void pushOptions(Options options)(Code)(Java Doc)
public void setBean(Object bean)(Code)(Java Doc)
public void setClassNameAttribute(String classNameAttribute)(Code)(Java Doc)
public void setLog(Log log)(Code)(Java Doc)
public void setValueSuppressionStrategy(ValueSuppressionStrategy valueSuppressionStrategy)(Code)(Java Doc)
public void setVariable(String name, Object value)(Code)(Java Doc)
public void setVariables(Map variables)(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.