[ http://issues.apache.org/jira/browse/XMLBEANS-219?page=all ]
Phong Tran updated XMLBEANS-219: -------------------------------- Summary: Generated Method Names are Not Using Customized Class Names in xsdconfig File (was: Generated Method Names are using Customized Class Names in xsdconfig File) Description: -----Original Message----- From: Radu Preotiuc-Pietro [mailto:[EMAIL PROTECTED] Sent: Friday, October 28, 2005 11:46 AM To: user@xmlbeans.apache.org Subject: RE: Generated Method Names are using Customized Class Names in xsdconfig File Hm, that's an interesting idea, never thought of that. Could you log it in JIRA, so we can keep track of it? Radu -----Original Message----- From: tran, phong [mailto:[EMAIL PROTECTED] Sent: Friday, October 21, 2005 2:43 PM To: user@xmlbeans.apache.org Subject: Generated Method Names are using Customized Class Names in xsdconfig File Hi All, I'm just starting to use XmlBeans to generate Java classes from a XML schema. I'm using xsdconfig file to customize the class names for some of our "awkward" element names. It works perfectly as intended, but I notice that names for generated methods do not use new binding class names, but element names (Schema type names) are still used instead. Here is the example: <xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config"> <!--<qname> specifies a Java class name for a Qualified name --> <xb:qname name="EdStorageType" javaname="StorageSystem" /> </xb:config> I changed "EdStorageType" type name to "StorageSystem" class name in the xsdconfig file, but the mapped class names are not used as part of method names generated. Instead the schema type names with the "Type" postfix removed are used . Here some generated methods: ----------------------------- StorageSystem[] getEdStorageArray(); StorageSystem getEdStorageArray(int i); StorageSystem insertNewEdStorage(int i); StorageSystem addNewEdStorage(); Functionally those methods are working properly. However their names are not consistent with the class names (objects) that they are supposed to work with. If I want to add a new StorageSystem object, it's natural and consistent if I call addNewStorageSystem(); Instead of addNewEdStorage(); Why can XBeans use the mapped class names when it generates the method names associated with these classes? Is there a way to configure the XBeans to use the mapped class names as part of the generated method names? Thanks a lot in advance, Phong was: -----Original Message----- From: Radu Preotiuc-Pietro [mailto:[EMAIL PROTECTED] Sent: Friday, October 28, 2005 11:46 AM To: user@xmlbeans.apache.org Subject: RE: Generated Method Names are using Customized Class Names in xsdconfig File Hm, that's an interesting idea, never thought of that. Could you log it in JIRA, so we can keep track of it? Radu -----Original Message----- From: tran, phong [mailto:[EMAIL PROTECTED] Sent: Friday, October 21, 2005 2:43 PM To: user@xmlbeans.apache.org Subject: Generated Method Names are using Customized Class Names in xsdconfig File Hi All, I'm just starting to use XmlBeans to generate Java classes from a XML schema. I'm using xsdconfig file to customize the class names for some of our "awkward" element names. It works perfectly as intended, but I notice that names for generated methods do not use new binding class names, but element names (Schema type names) are still used instead. Here is the example: <xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config"> <!--<qname> specifies a Java class name for a Qualified name --> <xb:qname name="EdStorageType" javaname="StorageSystem" /> </xb:config> I changed "EdStorageType" type name to "StorageSystem" class name in the xsdconfig file, but the mapped class names are not used as part of method names generated. Instead the schema type names with the "Type" postfix removed are used . Here some generated methods: ----------------------------- StorageSystem[] getEdStorageArray(); StorageSystem getEdStorageArray(int i); StorageSystem insertNewEdStorage(int i); StorageSystem addNewEdStorage(); Functionally those methods are working properly. However their names are not consistent with the class names (objects) that they are supposed to work with. If I want to add a new StorageSystem object, it's natural and consistent if I call addNewStorageSystem(); Instead of addNewEdStorage(); Why can XBeans use the mapped class names when it generates the method names associated with these classes? Is there a way to configure the XBeans to use the mapped class names as part of the generated method names? Thanks a lot in advance, Phong > Generated Method Names are Not Using Customized Class Names in xsdconfig File > ----------------------------------------------------------------------------- > > Key: XMLBEANS-219 > URL: http://issues.apache.org/jira/browse/XMLBEANS-219 > Project: XMLBeans > Type: New Feature > Components: Compiler > Versions: Version 2 > Reporter: Phong Tran > > -----Original Message----- > From: Radu Preotiuc-Pietro [mailto:[EMAIL PROTECTED] > Sent: Friday, October 28, 2005 11:46 AM > To: user@xmlbeans.apache.org > Subject: RE: Generated Method Names are using Customized Class Names in > xsdconfig File > Hm, that's an interesting idea, never thought of that. Could you log it > in JIRA, so we can keep track of it? > Radu > -----Original Message----- > From: tran, phong [mailto:[EMAIL PROTECTED] > Sent: Friday, October 21, 2005 2:43 PM > To: user@xmlbeans.apache.org > Subject: Generated Method Names are using Customized Class Names in > xsdconfig File > Hi All, > I'm just starting to use XmlBeans to generate Java classes from a > XML schema. I'm using xsdconfig file to customize the class names for > some of our "awkward" element names. It works perfectly as intended, but > I notice that names for generated methods do not use new binding class > names, but element names (Schema type names) are still used instead. > Here is the > example: > <xb:config > xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config"> > > <!--<qname> specifies a Java class name for a Qualified name --> > <xb:qname name="EdStorageType" javaname="StorageSystem" /> > </xb:config> > I changed "EdStorageType" type name to "StorageSystem" class name in the > xsdconfig file, but the mapped class names are not used as part of > method names generated. Instead the schema type names with the "Type" > postfix removed are used . > Here some generated methods: > ----------------------------- > StorageSystem[] getEdStorageArray(); > StorageSystem getEdStorageArray(int i); > StorageSystem insertNewEdStorage(int i); > StorageSystem addNewEdStorage(); > Functionally those methods are working properly. However their names are > not consistent with the class names (objects) that they are supposed to > work with. If I want to add a new StorageSystem object, it's natural and > consistent if I call > addNewStorageSystem(); > Instead of > addNewEdStorage(); > Why can XBeans use the mapped class names when it generates the method > names associated with these classes? Is there a way to configure the > XBeans to use the mapped class names as part of the generated method > names? > Thanks a lot in advance, > Phong -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]