You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Cezar Andrei (JIRA)" <xm...@xml.apache.org> on 2007/12/20 00:47:43 UTC

[jira] Resolved: (XMLBEANS-219) Generated Method Names are Not Using Customized Class Names in xsdconfig File

     [ https://issues.apache.org/jira/browse/XMLBEANS-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cezar Andrei resolved XMLBEANS-219.
-----------------------------------

    Resolution: Duplicate

Duplicate of XMLBEANS-253

> Generated Method Names are Not Using Customized Class Names in xsdconfig File
> -----------------------------------------------------------------------------
>
>                 Key: XMLBEANS-219
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-219
>             Project: XMLBeans
>          Issue Type: New Feature
>          Components: Compiler
>    Affects Versions: Version 2
>            Reporter: Phong Tran
>
> -----Original Message-----
> From: Radu Preotiuc-Pietro [mailto:radup@bea.com] 
> 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:tran_phong@emc.com] 
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org