You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <tu...@ws.apache.org> on 2006/03/10 20:04:39 UTC

[jira] Created: (TUSCANY-115) Property.isMany() returns false instead of true for global properties

Property.isMany() returns false instead of true for global properties 
----------------------------------------------------------------------

         Key: TUSCANY-115
         URL: http://issues.apache.org/jira/browse/TUSCANY-115
     Project: Tuscany
        Type: Bug
  Components: Java SDO Implementation  
    Reporter: Raymond Feng


I have this global element defined in the XSD:

	<element name="comment1" type="string"/>

        Property c1 = xsdHelper.getGlobalProperty("http://complex", "comment1", true);
        boolean isMany = c1.isMany(); // returns false. According to Frank, it should return true instead


-- 
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


[jira] Updated: (TUSCANY-115) Property.isMany() returns false instead of true for global properties

Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-115?page=all ]

Yang ZHONG updated TUSCANY-115:
-------------------------------

    Attachment: DataObjectXMLStreamReader115.patch

This issue was originally created for DataObjectXMLStreamReader.java.
Since we have a resolution already, it's optional to either commit DataObjectXMLStreamReader.java change right here
or create a new issue to specifically track DataObjectXMLStreamReader.java.

> Property.isMany() returns false instead of true for global properties
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-115
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-115
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-Mx
>            Reporter: Raymond Feng
>             Fix For: Java-Mx
>
>         Attachments: DataObjectXMLStreamReader115.patch, IsMany115.patch, IsManyTestCase.java, open1any.xsd
>
>
> I have this global element defined in the XSD:
> 	<element name="comment1" type="string"/>
>         Property c1 = xsdHelper.getGlobalProperty("http://complex", "comment1", true);
>         boolean isMany = c1.isMany(); // returns false. According to Frank, it should return true instead

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-115) Property.isMany() returns false instead of true for global properties

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-115?page=all ]

Jean-Sebastien Delfino updated TUSCANY-115:
-------------------------------------------

    Fix Version: Mx
        Version: Mx

> Property.isMany() returns false instead of true for global properties
> ---------------------------------------------------------------------
>
>          Key: TUSCANY-115
>          URL: http://issues.apache.org/jira/browse/TUSCANY-115
>      Project: Tuscany
>         Type: Bug

>   Components: Java SDO Implementation
>     Versions: Mx
>     Reporter: Raymond Feng
>      Fix For: Mx

>
> I have this global element defined in the XSD:
> 	<element name="comment1" type="string"/>
>         Property c1 = xsdHelper.getGlobalProperty("http://complex", "comment1", true);
>         boolean isMany = c1.isMany(); // returns false. According to Frank, it should return true instead

-- 
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


[jira] Commented: (TUSCANY-115) Property.isMany() returns false instead of true for global properties

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-115?page=comments#action_12437953 ] 
            
Raymond Feng commented on TUSCANY-115:
--------------------------------------

Yes, the proposal works for me. Thanks.

> Property.isMany() returns false instead of true for global properties
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-115
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-115
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-Mx
>            Reporter: Raymond Feng
>             Fix For: Java-Mx
>
>
> I have this global element defined in the XSD:
> 	<element name="comment1" type="string"/>
>         Property c1 = xsdHelper.getGlobalProperty("http://complex", "comment1", true);
>         boolean isMany = c1.isMany(); // returns false. According to Frank, it should return true instead

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Assigned: (TUSCANY-115) Property.isMany() returns false instead of true for global properties

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-115?page=all ]

Raymond Feng reassigned TUSCANY-115:
------------------------------------

    Assignee: Raymond Feng

> Property.isMany() returns false instead of true for global properties
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-115
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-115
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-Mx
>            Reporter: Raymond Feng
>         Assigned To: Raymond Feng
>             Fix For: Java-Mx
>
>         Attachments: DataObjectXMLStreamReader115.patch, IsMany115.patch, IsManyTestCase.java, open1any.xsd
>
>
> I have this global element defined in the XSD:
> 	<element name="comment1" type="string"/>
>         Property c1 = xsdHelper.getGlobalProperty("http://complex", "comment1", true);
>         boolean isMany = c1.isMany(); // returns false. According to Frank, it should return true instead

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-115) Property.isMany() returns false instead of true for global properties

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-115?page=comments#action_12437860 ] 
            
Frank Budinsky commented on TUSCANY-115:
----------------------------------------

Hi Raymond. Sorry it has taken so long to get to this. I guess I really am overworked :-)

After looking carefully at this issue, I realized that the problem is more subtle. 

Even though SDO doesn't expose DocumentRoot classes, the underlying EMF implementation requires global properties to be isMany false, because there can only be one root element in a document. Since global elements are defined in the DocumentRoot (the object used to hold actual root element in the document) it needs to be isMany false for things to work. Of course, that would be a silly reason to return the "wrong answer" to SDO clients, but the truth of the matter is that there is no right or wrong answer for SDO clients in this case. As I told you before, isMany = true would seem to be the conservative answer for SDO global properties, but the real "right answer" is that it may be isMany or not, depending on the context. For example, if it's used for open content in an object that only has an xsd:any with maxOccurs = 1, then isMany is false. If the xsd:any has maxOccurs > 1 then isMany should be true. So, the answer from property.isMany() will be wrong in one case or the other. 

In EMF, this problem is handled by providing a special utility method:

FeatureMapUtil.isMany(Ebject object, EStructuralFeature feature);

This method returns whether or not the property isMany in the specific object's context.

So, for SDO, we could do the same kind of thing by adding a utility method in Tuscany:

SDOUtil.isMany(Property property, DataObject context)

Would that work for you?

> Property.isMany() returns false instead of true for global properties
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-115
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-115
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-Mx
>            Reporter: Raymond Feng
>             Fix For: Java-Mx
>
>
> I have this global element defined in the XSD:
> 	<element name="comment1" type="string"/>
>         Property c1 = xsdHelper.getGlobalProperty("http://complex", "comment1", true);
>         boolean isMany = c1.isMany(); // returns false. According to Frank, it should return true instead

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-115) Property.isMany() returns false instead of true for global properties

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-115?page=all ]

Raymond Feng resolved TUSCANY-115.
----------------------------------

    Fix Version/s: Java-M2
                       (was: Java-Mx)
       Resolution: Fixed

Patch from Yang has been applied

> Property.isMany() returns false instead of true for global properties
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-115
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-115
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-Mx
>            Reporter: Raymond Feng
>         Assigned To: Raymond Feng
>             Fix For: Java-M2
>
>         Attachments: DataObjectXMLStreamReader115.patch, IsMany115.patch, IsManyTestCase.java, open1any.xsd
>
>
> I have this global element defined in the XSD:
> 	<element name="comment1" type="string"/>
>         Property c1 = xsdHelper.getGlobalProperty("http://complex", "comment1", true);
>         boolean isMany = c1.isMany(); // returns false. According to Frank, it should return true instead

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-115) Property.isMany() returns false instead of true for global properties

Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-115?page=all ]

Yang ZHONG updated TUSCANY-115:
-------------------------------

    Attachment: IsMany115.patch
                IsManyTestCase.java
                open1any.xsd

The patch is attached, along with test source
    java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/IsManyTestCase.java
and test resource
    java/sdo/impl/src/test/resources/open1any.xsd
to optionally add into svn

> Property.isMany() returns false instead of true for global properties
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-115
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-115
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-Mx
>            Reporter: Raymond Feng
>             Fix For: Java-Mx
>
>         Attachments: IsMany115.patch, IsManyTestCase.java, open1any.xsd
>
>
> I have this global element defined in the XSD:
> 	<element name="comment1" type="string"/>
>         Property c1 = xsdHelper.getGlobalProperty("http://complex", "comment1", true);
>         boolean isMany = c1.isMany(); // returns false. According to Frank, it should return true instead

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-115) Property.isMany() returns false instead of true for global properties

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-115?page=comments#action_12416547 ] 

Raymond Feng commented on TUSCANY-115:
--------------------------------------

Hi, Frank.

Do we expect to have a fix coming soon?

Thanks,
Raymond

> Property.isMany() returns false instead of true for global properties
> ---------------------------------------------------------------------
>
>          Key: TUSCANY-115
>          URL: http://issues.apache.org/jira/browse/TUSCANY-115
>      Project: Tuscany
>         Type: Bug

>   Components: Java SDO Implementation
>     Versions: Java-Mx
>     Reporter: Raymond Feng
>      Fix For: Java-Mx

>
> I have this global element defined in the XSD:
> 	<element name="comment1" type="string"/>
>         Property c1 = xsdHelper.getGlobalProperty("http://complex", "comment1", true);
>         boolean isMany = c1.isMany(); // returns false. According to Frank, it should return true instead

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Closed: (TUSCANY-115) Property.isMany() returns false instead of true for global properties

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-115?page=all ]

Raymond Feng closed TUSCANY-115.
--------------------------------


> Property.isMany() returns false instead of true for global properties
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-115
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-115
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-Mx
>            Reporter: Raymond Feng
>         Assigned To: Raymond Feng
>             Fix For: Java-M2
>
>         Attachments: DataObjectXMLStreamReader115.patch, IsMany115.patch, IsManyTestCase.java, open1any.xsd
>
>
> I have this global element defined in the XSD:
> 	<element name="comment1" type="string"/>
>         Property c1 = xsdHelper.getGlobalProperty("http://complex", "comment1", true);
>         boolean isMany = c1.isMany(); // returns false. According to Frank, it should return true instead

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org