[MOBY-dev] JMoby bug or lack of knowledge

"Guillermo Comesaña." gcomesana at cnio.es
Wed Mar 28 15:28:35 UTC 2007


Cheers everybody for the help. However, nothing was useful for me so 
far. Apparently in my code everything is ok, the only calls to set both 
dates (start and end) is as follows:
try {
	if (startLine != null) {
	 aux = buildDate(startLine[3]).getTime();
	 aDate.setValue (sdf.format(aux));
logger.debug("startline iso8601: " + sdf.format (aux));
logger.debug("startLine->aDate.getValue(): "+aDate.getValue());
	 logEv.set_start (aDate);
         }
											if (endLine != null) {
		aux = buildDate(endLine[3]).getTime();
		aDate.setValue(sdf.format (aux));
logger.debug("endline iso8601: " + sdf.format (aux));
logger.debug("endline->aDate.getValue(): "+aDate.getValue());
		logEv.set_end (aDate);
	}
}
catch (MobyException ex) {
	logger.debug (ex.getMessage());
}

where the set_start (MobyDateTime) and set_end (MobyDateTime) are 
methods of LogEvent class/datatype whose implementation is:
(...)
     /** An article name for a member of this object. */
     public static final String ARTICLE_NAME_START = "start";
     protected MobyDateTime start;

     /** An article name for a member of this object. */
     public static final String ARTICLE_NAME_END = "end";
     protected MobyDateTime end;
(...)
/**************************************************************************
      * Set a new value to the member (child) 'start'. It also
      * adds there its registered "article name". <p>
      *
      * @param value to be stored 
*************************************************************************/
     public void set_start (MobyDateTime value) {
	// add a correct article name
	if (value != null)
	    value.setName (ARTICLE_NAME_START);
	start = value;
     }

     public MobyDateTime getMoby_start() {
	return start;
     }

 
/**************************************************************************
      * Set a new value to the member (child) 'end'. It also
      * adds there its registered "article name". <p>
      *
      * @param value to be stored 
*************************************************************************/
     public void set_end (MobyDateTime value) {
	// add a correct article name
	if (value != null)
	    value.setName (ARTICLE_NAME_END);
	end = value;
     }


     public MobyDateTime getMoby_end() {
	return end;
     }

and, finally, the definition of the registered datatype is:
Name:    LogEvent
Auth:    mmb.pcb.ub.es
Desc:    Encapsulates all the log messages launched for a service call
Contact: moby-services at mmb.pcb.ub.es
LSID:    urn:lsid:biomoby.org:objectclass:LogEvent:2007-03-17T20-00-34Z
ID:      null
Parents: Object
Children (only those registered here):
id (HASA) => String
	serviceName (HASA) => String
	ip (HASA) => String
	start (HASA) => DateTime
	end (HASA) => DateTime
	status (HASA) => Integer
	timeCPU (HASA) => Float
	numberCPUs (HASA) => Integer
	inputSize (HASA) => Integer
	outputSize (HASA) => Integer
	isTest (HASA) => Boolean
which is registered in http://moby-dev.inab.org/MOBY/Central

and i have generated the datatypes (again, but it was to be sure in the 
case of the LogEvent datatypes was bad yielded before...)

so, any suggestion to the issue of the two ends in the xml and the 
warning???

cheers again and sorry for this huge and boring mail...

w i l l y

ps: i guess the warning can be debt to this method in class LogEvent:
public org.jdom.Element toXML() {
	org.jdom.Element elem_I_am_sorry_that_this_produces_a_warning = 
super.toXML();
	elem_I_am_sorry_that_this_produces_a_warning.setName (DATA_TYPE_NAME);
  	if (the_id != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent 
(the_id.toXML());
  	if (serviceName != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent 
(serviceName.toXML());
  	if (ip != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent (ip.toXML());
  	if (start != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent 
(start.toXML());
  	if (end != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent 
(end.toXML());
  	if (status != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent 
(status.toXML());
  	if (timeCPU != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent 
(timeCPU.toXML());
  	if (numberCPUs != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent 
(numberCPUs.toXML());
  	if (inputSize != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent 
(inputSize.toXML());
  	if (outputSize != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent 
(outputSize.toXML());
  	if (isTest != null)
  	    elem_I_am_sorry_that_this_produces_a_warning.addContent 
(isTest.toXML());

	return elem_I_am_sorry_that_this_produces_a_warning;
     }

**NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en su caso los ficheros adjuntos, pueden contener información protegida para el uso exclusivo de su destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de transmisión por parte de otra persona que no sea el destinatario. Si usted recibe por error este correo, se ruega comunicarlo al remitente y borrar el mensaje recibido.
**CONFIDENTIALITY NOTICE** This email communication and any attachments may contain confidential and privileged information for the sole use of the designated recipient named above. Distribution, reproduction or any other use of this transmission by any party other than the intended recipient is prohibited. If you are not the intended recipient please contact the sender and delete all copies.




More information about the MOBY-dev mailing list