RE: question about cocoon object

2003-02-13 Thread Geoff Howard
Title: RE: question about cocoon object






Maybe I don't understand your question, but this in java refers to the current instance of the class itself. So this refers to the current RequestGenerator object. And this.attribute refers to a method defined somewhere in the class itself or in one of the classes this generator inherits from. You note (partially correctly) that this.contentHandler is inherited from AbstractXMLProducer, but startDocument() is in the contentHandler class, not AbstractXMLProducer. 

Don't know offhand where attribute() is inherited from, but it shouldn't take long to find out - the java docs will tell you where it came from.

Geoff


 -Original Message-

 From: Lionel Crine [mailto:[EMAIL PROTECTED]]

 Sent: Thursday, February 13, 2003 8:23 AM

 To: [EMAIL PROTECTED]

 Subject: question about cocoon object

 

 

 /* I'm reading the code located in the requestgenerator */

 

 

 public void generate()

 throws SAXException {

 Request request = ObjectModelHelper.getRequest(objectModel);

 

  this.contentHandler.startDocument(); === this method 

 comes from 

 AbstractXMLProducer

  /*** Add xmlns ***/

  /*this.contentHandler.startPrefixMapping(,URI);*/

 AttributesImpl attr=new AttributesImpl();

 

 this.attribute(attr,target, 

 request.getRequestURI()); === this 

 method comes from AbstractServerPage

 

 

 

 

 My questions are :

 

 In this.attribute, this reference which object ?

 How can a class (requestgenerator) can use object from an 

 abstract class at 

 the same level ?

 

 

 Maybe my question are silly, but I like knowing what I'm 

 reading and using.

 

 

 Lionel

 

 

 -

 Please check that your question has not already been answered in the

 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 

 To unsubscribe, e-mail: [EMAIL PROTECTED]

 For additional commands, e-mail: [EMAIL PROTECTED]

 

 

 





RE: question about cocoon object

2003-02-13 Thread Lionel Crine
Yes, stardocuments comes from contenthandler.

Another question : where does data method comes from ?
I know that I only have to look at the javadocs, but after long time I 
didn't find where this method comes from.

Also, I'm a little bit surprise about the source of attribute method. 
Where is the link between AbstractServerPage and RequestGenerator ?



At 08:50 13/02/2003 -0500, you wrote:

Maybe I don't understand your question, but this in java refers to the 
current instance of the class itself.  So this refers to the current 
RequestGenerator object.  And this.attribute refers to a method defined 
somewhere in the class itself or in one of the classes this generator 
inherits from.  You note (partially correctly) that this.contentHandler is 
inherited from AbstractXMLProducer, but startDocument() is in the 
contentHandler class, not AbstractXMLProducer.

Don't know offhand where attribute() is inherited from, but it shouldn't 
take long to find out - the java docs will tell you where it came from.

Geoff

 -Original Message-
 From: Lionel Crine [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 13, 2003 8:23 AM
 To: [EMAIL PROTECTED]
 Subject: question about cocoon object


 /* I'm reading the code located in the requestgenerator */


   public void generate()
  throws SAXException {
  Request request = ObjectModelHelper.getRequest(objectModel);

   this.contentHandler.startDocument(); === this method
 comes from
 AbstractXMLProducer
   /*** Add xmlns ***/
   /*this.contentHandler.startPrefixMapping(,URI);*/
  AttributesImpl attr=new AttributesImpl();

  this.attribute(attr,target,
 request.getRequestURI());  === this
 method comes from AbstractServerPage


 

 My questions are :

 In this.attribute, this reference which object ?
 How can a class (requestgenerator) can use object from an
 abstract class at
 the same level ?


 Maybe my question are silly, but I like knowing what I'm
 reading and using.


 Lionel


 -
 Please check that your question  has not already been answered in the
 FAQ before 
posting. 
http://xml.apache.org/cocoon/faq/index.htmlhttp://xml.apache.org/cocoon/faq/index.html 


 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: question about cocoon object

2003-02-13 Thread Lionel Crine
I found my answers!!




At 08:50 13/02/2003 -0500, you wrote:


Maybe I don't understand your question, but this in java refers to the 
current instance of the class itself.  So this refers to the current 
RequestGenerator object.  And this.attribute refers to a method defined 
somewhere in the class itself or in one of the classes this generator 
inherits from.  You note (partially correctly) that this.contentHandler is 
inherited from AbstractXMLProducer, but startDocument() is in the 
contentHandler class, not AbstractXMLProducer.

Don't know offhand where attribute() is inherited from, but it shouldn't 
take long to find out - the java docs will tell you where it came from.

Geoff

 -Original Message-
 From: Lionel Crine [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 13, 2003 8:23 AM
 To: [EMAIL PROTECTED]
 Subject: question about cocoon object


 /* I'm reading the code located in the requestgenerator */


   public void generate()
  throws SAXException {
  Request request = ObjectModelHelper.getRequest(objectModel);

   this.contentHandler.startDocument(); === this method
 comes from
 AbstractXMLProducer
   /*** Add xmlns ***/
   /*this.contentHandler.startPrefixMapping(,URI);*/
  AttributesImpl attr=new AttributesImpl();

  this.attribute(attr,target,
 request.getRequestURI());  === this
 method comes from AbstractServerPage


 

 My questions are :

 In this.attribute, this reference which object ?
 How can a class (requestgenerator) can use object from an
 abstract class at
 the same level ?


 Maybe my question are silly, but I like knowing what I'm
 reading and using.


 Lionel


 -
 Please check that your question  has not already been answered in the
 FAQ before 
posting. 
http://xml.apache.org/cocoon/faq/index.htmlhttp://xml.apache.org/cocoon/faq/index.html 


 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]