You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Frank Budinsky (JIRA)" <tu...@ws.apache.org> on 2006/11/16 23:22:37 UTC
[jira] Created: (TUSCANY-935) SDO path accessors need to support
names that contain "."
SDO path accessors need to support names that contain "."
---------------------------------------------------------
Key: TUSCANY-935
URL: http://issues.apache.org/jira/browse/TUSCANY-935
Project: Tuscany
Issue Type: Bug
Components: Java SDO Implementation
Reporter: Frank Budinsky
This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
Given a property name like "foo.0":
1. first simply check if there is a property with the specified name.
2. if a property with that name isn't found, then find the last "." character in the name.
3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
We'll also need to propose this behavior be clarified in the spec.
--
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-935) SDO path accessors need to support
names that contain "."
Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-935?page=comments#action_12456963 ]
Yang ZHONG commented on TUSCANY-935:
------------------------------------
more.935 has passed all build tests.
> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
> Key: TUSCANY-935
> URL: http://issues.apache.org/jira/browse/TUSCANY-935
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Frank Budinsky
> Attachments: DataObjectUtil.935, dotNames.xsd, DotNameTestCase.java, more.935
>
>
> This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.
--
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-935) SDO path accessors need to support
names that contain "."
Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-935?page=comments#action_12455337 ]
Yang ZHONG commented on TUSCANY-935:
------------------------------------
Thanks to Kelvin.
I'm looking into XPathTestCase.
> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
> Key: TUSCANY-935
> URL: http://issues.apache.org/jira/browse/TUSCANY-935
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Frank Budinsky
> Attachments: DataObjectUtil.935, dotNames.xsd, DotNameTestCase.java
>
>
> This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.
--
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-935) SDO path accessors need to support
names that contain "."
Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-935?page=comments#action_12455275 ]
Kelvin Goodson commented on TUSCANY-935:
----------------------------------------
I have managed to assert that the cross scope type interference exhibited when the test cases are run together is due to the fact that we haven't completed the HelperContext work with respect to generated classes yet. Currently XSDHelperTestCase registers generated classes for the namespace "http://www.example.com/simple" and the new DotNamesTestCase registers dynamic types in this namespace also. I will change the namespace in the test case. I have a test case locally to guard against this situation, which I will add when the HelperContext work for generated classes is done.
> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
> Key: TUSCANY-935
> URL: http://issues.apache.org/jira/browse/TUSCANY-935
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Frank Budinsky
> Attachments: DataObjectUtil.935, dotNames.xsd, DotNameTestCase.java
>
>
> This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.
--
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-935) SDO path accessors need to support
names that contain "."
Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-935?page=comments#action_12450844 ]
Yang ZHONG commented on TUSCANY-935:
------------------------------------
Thanks to Frank for the algorithm.
I'm prototyping it and trying to sync up with other impl.
> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
> Key: TUSCANY-935
> URL: http://issues.apache.org/jira/browse/TUSCANY-935
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Frank Budinsky
>
> This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.
--
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-935) SDO path accessors need to support
names that contain "."
Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-935?page=all ]
Yang ZHONG updated TUSCANY-935:
-------------------------------
Attachment: more.935
More is attached to patch.
> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
> Key: TUSCANY-935
> URL: http://issues.apache.org/jira/browse/TUSCANY-935
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Frank Budinsky
> Attachments: DataObjectUtil.935, dotNames.xsd, DotNameTestCase.java, more.935
>
>
> This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.
--
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-935) SDO path accessors need to support
names that contain "."
Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kelvin Goodson updated TUSCANY-935:
-----------------------------------
Fix Version/s: Java-SDO-M3
> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
> Key: TUSCANY-935
> URL: https://issues.apache.org/jira/browse/TUSCANY-935
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Frank Budinsky
> Fix For: Java-SDO-M3
>
> Attachments: DataObjectUtil.935, dotNames.xsd, DotNameTestCase.java, more.935
>
>
> This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.
--
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
[jira] Updated: (TUSCANY-935) SDO path accessors need to support
names that contain "."
Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-935?page=all ]
Yang ZHONG updated TUSCANY-935:
-------------------------------
Attachment: DataObjectUtil.935
dotNames.xsd
DotNameTestCase.java
Thanks to Frank for having reviewed.
Two new files in addition to DataObjectUtil.935:
java/sdo/impl/src/test/resources/dotNames.xsd
java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/DotNameTestCase.java
> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
> Key: TUSCANY-935
> URL: http://issues.apache.org/jira/browse/TUSCANY-935
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Frank Budinsky
> Attachments: DataObjectUtil.935, dotNames.xsd, DotNameTestCase.java
>
>
> This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.
--
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-935) SDO path accessors need to support
names that contain "."
Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-935?page=comments#action_12455349 ]
Kelvin Goodson commented on TUSCANY-935:
----------------------------------------
As a follow up to my comments about cross scope interference and generated classes, TUSCANY-684 will address this issue. Having made the changes to the DotNames test case so that it uses a unique namespace, this JIRA is now independent of that issue, so this is FYI only.
> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
> Key: TUSCANY-935
> URL: http://issues.apache.org/jira/browse/TUSCANY-935
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Frank Budinsky
> Attachments: DataObjectUtil.935, dotNames.xsd, DotNameTestCase.java
>
>
> This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.
--
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-935) SDO path accessors need to support
names that contain "."
Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-935?page=all ]
Frank Budinsky resolved TUSCANY-935.
------------------------------------
Resolution: Fixed
Committed revision 484770.
> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
> Key: TUSCANY-935
> URL: http://issues.apache.org/jira/browse/TUSCANY-935
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Frank Budinsky
> Attachments: DataObjectUtil.935, dotNames.xsd, DotNameTestCase.java, more.935
>
>
> This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.
--
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-935) SDO path accessors need to support
names that contain "."
Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-935?page=comments#action_12455266 ]
Kelvin Goodson commented on TUSCANY-935:
----------------------------------------
Working from Yang's patch I've deliberately committed a modified test case under a different name "DotNameTest.java" (so that maven wont pick it up) and I'm not yet committing the fix since there are a couple of issues.
One is that with the fix applied XPathTestCase fails in testListIndexing with
junit.framework.AssertionFailedError: bad indexing passed
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertFalse(Assert.java:34)
at org.apache.tuscany.sdo.test.XPathTestCase.testListIndexing(XPathTestCase.java:106)
The other issue is that there seems to be some inter-TestCase type scope interference. I have altered the new test case to use the HelperContext method of getting a type helper in setUp(), but the interference persists even with that change.
In order to be able to explore this issue in eclipse I have added the test case to AllTests.java twice; once at the start of the sequence of tests and once at the end. When run at the start of the sequence the new test case runs perfectly, but when run at the end it fails.
You can see that if you run the new test independently then the quote instance is an instance of DynamicDataObjectImpl, but if you ran the test as it was provided, in a maven build, then there is a failure, and it seems that the quote instance is now an instance of a generated "Quote" class.
Yang, if you could investigate the XPathTestCase failure please, I will tyr to gain some insight into the type interference issue.
> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
> Key: TUSCANY-935
> URL: http://issues.apache.org/jira/browse/TUSCANY-935
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Frank Budinsky
> Attachments: DataObjectUtil.935, dotNames.xsd, DotNameTestCase.java
>
>
> This issue keeps coming up. The "." character is commonly used in industrial schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named "foo" and another property named someting like "foo.0" in the same type. I think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.
--
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