Re: [Java SDO, DAS and SCA] alteration to unreleased API

2007-07-20 Thread Amita Vadhavkar

As in tuscany-sdo-impl - SDOHelperImpl.createType(HelperContext,...) returns
null
if the type is already created before, result of is null for all 2nd and
later calls to createType(). Also, there is no getType(HelperContext,...) in
(lib)SDOHelper,
(lib)SDOUtil and (impl)SDOHelperImpl, which can just fetch the type already
existing
in ePackage (without creating it). Can this be provided?
Or otherwise,can createType() be modified to act as createOrGet?

If this is not provided, client code will need to do something like below.

Type root = SDOUtil.createType(hc, getDefaultURI(), DataGraphRoot, false);
if(root == null){
   List lst = SDOUtil.getTypes(hc, uri) ;
   //iterate over the list and match
   //((Type)lst.get(i)).getName() with say DataGraphRoot
   //and if it matches use that type
}

Or otherwise, the client will be forced to use a new instance of
HelperContext each
time.

Am I missing something here?

Regards,
Amita

On 7/20/07, kelvin goodson [EMAIL PROTECTED] wrote:


Thanks, I'd be happiest to leave it until the middle of next week if that
fits with you.
Kelvin.

On 19/07/07, Raymond Feng [EMAIL PROTECTED] wrote:

 Hi, Kelvin.

 When do you plan to make the changes? I can help on the SCA side.

 Thanks,
 Raymond

 - Original Message -
 From: kelvin goodson [EMAIL PROTECTED]
 To: tuscany-dev tuscany-dev@ws.apache.org
 Sent: Thursday, July 19, 2007 6:48 AM
 Subject: [Java SDO, DAS and SCA] alteration to unreleased API


  Headline message for SCA (and perhaps DAS)  -- this is notice of a
 change
  that will require minor updates in order not to break the build
 
  
 
  We have 2 new things in SDO that are of significance to this message
 that
  have come about since the beta1 release.
 
  1) An improved notion of what embodies a scope for types -- the
  HelperContext (previously the story was confused because the
TypeHelper
  was
  used for this purpose at times)
  2) Restructuring of the code so that it is clear what it Tuscany SDO
API
 (
  i.e. Tuscany extensions as opposed to the SDO API itself)
 
  However, the API in the trunk still uses a TypeHelper to be passed
into
  half
  a dozen methods to represent the scope.  It would be an awful shame
not
 to
  fix this,  and it would also look odd to go out with a brand new API
 that
  already has deprecations. I have altered the API in the SDO release
 branch
  [1].
 
  As far as I can tell from poking around in eclipse, SCA makes about
half
 a
  dozen calls into the API,  so it's a small job to fix this up.  Can
  someone
  is SCA please liaise with me to get this done at our mutual
convenience,
  thanks.
 
  Kelvin.
 
  [1]
 

http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diffrev=557615r1=557614r2=557615
 

http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diffrev=557615r1=557614r2=557615
 
 





Re: [Java SDO, DAS and SCA] alteration to unreleased API

2007-07-20 Thread kelvin goodson

I responed to this but switched the thread to SDO Dynamic Metadata creation
APIs

On 20/07/07, Amita Vadhavkar [EMAIL PROTECTED] wrote:


As in tuscany-sdo-impl - SDOHelperImpl.createType(HelperContext,...)
returns
null
if the type is already created before, result of is null for all 2nd and
later calls to createType(). Also, there is no getType(HelperContext,...)
in
(lib)SDOHelper,
(lib)SDOUtil and (impl)SDOHelperImpl, which can just fetch the type
already
existing
in ePackage (without creating it). Can this be provided?
Or otherwise,can createType() be modified to act as createOrGet?

If this is not provided, client code will need to do something like below.

Type root = SDOUtil.createType(hc, getDefaultURI(), DataGraphRoot,
false);
if(root == null){
List lst = SDOUtil.getTypes(hc, uri) ;
//iterate over the list and match
//((Type)lst.get(i)).getName() with say DataGraphRoot
//and if it matches use that type
}

Or otherwise, the client will be forced to use a new instance of
HelperContext each
time.

Am I missing something here?

Regards,
Amita

On 7/20/07, kelvin goodson [EMAIL PROTECTED] wrote:

 Thanks, I'd be happiest to leave it until the middle of next week if
that
 fits with you.
 Kelvin.

 On 19/07/07, Raymond Feng [EMAIL PROTECTED] wrote:
 
  Hi, Kelvin.
 
  When do you plan to make the changes? I can help on the SCA side.
 
  Thanks,
  Raymond
 
  - Original Message -
  From: kelvin goodson [EMAIL PROTECTED]
  To: tuscany-dev tuscany-dev@ws.apache.org
  Sent: Thursday, July 19, 2007 6:48 AM
  Subject: [Java SDO, DAS and SCA] alteration to unreleased API
 
 
   Headline message for SCA (and perhaps DAS)  -- this is notice of a
  change
   that will require minor updates in order not to break the build
  
   
  
   We have 2 new things in SDO that are of significance to this message
  that
   have come about since the beta1 release.
  
   1) An improved notion of what embodies a scope for types -- the
   HelperContext (previously the story was confused because the
 TypeHelper
   was
   used for this purpose at times)
   2) Restructuring of the code so that it is clear what it Tuscany SDO
 API
  (
   i.e. Tuscany extensions as opposed to the SDO API itself)
  
   However, the API in the trunk still uses a TypeHelper to be passed
 into
   half
   a dozen methods to represent the scope.  It would be an awful shame
 not
  to
   fix this,  and it would also look odd to go out with a brand new API
  that
   already has deprecations. I have altered the API in the SDO release
  branch
   [1].
  
   As far as I can tell from poking around in eclipse, SCA makes about
 half
  a
   dozen calls into the API,  so it's a small job to fix this up.  Can
   someone
   is SCA please liaise with me to get this done at our mutual
 convenience,
   thanks.
  
   Kelvin.
  
   [1]
  
 

http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diffrev=557615r1=557614r2=557615
  
 

http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diffrev=557615r1=557614r2=557615
  
  
 
 




SDO Dynamic Metadata creation APIs (was Re: [Java SDO, DAS and SCA] alteration to unreleased API)

2007-07-20 Thread kelvin goodson

Hi Amita,

the SDOHelper interface and SDOUtil class are there purely to provide
function when the SDO API doesn't provide that function.
You can lookup types using SDO's TypeHelper.getType() methods (TypeHelper is
available from the HelperContext.getTypeHelper() method).

The SDOUtil metadata creation code is included in Tuscany as an alternative
to the SDO API method of creating types by defining a data graph that is
submitted to TypeHelper.define().  This alternative provides a simple
intuitive approach to building types,  but is more limited than the
strategic SDO approach, for example, not being able to build circular
references in the metadata and not knowing when to finalize a type.

Kelvin.

On 20/07/07, Amita Vadhavkar [EMAIL PROTECTED] wrote:


As in tuscany-sdo-impl - SDOHelperImpl.createType(HelperContext,...)
returns
null
if the type is already created before, result of is null for all 2nd and
later calls to createType(). Also, there is no getType(HelperContext,...)
in
(lib)SDOHelper,
(lib)SDOUtil and (impl)SDOHelperImpl, which can just fetch the type
already
existing
in ePackage (without creating it). Can this be provided?
Or otherwise,can createType() be modified to act as createOrGet?

If this is not provided, client code will need to do something like below.

Type root = SDOUtil.createType(hc, getDefaultURI(), DataGraphRoot,
false);
if(root == null){
List lst = SDOUtil.getTypes(hc, uri) ;
//iterate over the list and match
//((Type)lst.get(i)).getName() with say DataGraphRoot
//and if it matches use that type
}

Or otherwise, the client will be forced to use a new instance of
HelperContext each
time.

Am I missing something here?

Regards,
Amita

On 7/20/07, kelvin goodson [EMAIL PROTECTED] wrote:

 Thanks, I'd be happiest to leave it until the middle of next week if
that
 fits with you.
 Kelvin.

 On 19/07/07, Raymond Feng [EMAIL PROTECTED] wrote:
 
  Hi, Kelvin.
 
  When do you plan to make the changes? I can help on the SCA side.
 
  Thanks,
  Raymond
 
  - Original Message -
  From: kelvin goodson [EMAIL PROTECTED]
  To: tuscany-dev tuscany-dev@ws.apache.org
  Sent: Thursday, July 19, 2007 6:48 AM
  Subject: [Java SDO, DAS and SCA] alteration to unreleased API
 
 
   Headline message for SCA (and perhaps DAS)  -- this is notice of a
  change
   that will require minor updates in order not to break the build
  
   
  
   We have 2 new things in SDO that are of significance to this message
  that
   have come about since the beta1 release.
  
   1) An improved notion of what embodies a scope for types -- the
   HelperContext (previously the story was confused because the
 TypeHelper
   was
   used for this purpose at times)
   2) Restructuring of the code so that it is clear what it Tuscany SDO
 API
  (
   i.e. Tuscany extensions as opposed to the SDO API itself)
  
   However, the API in the trunk still uses a TypeHelper to be passed
 into
   half
   a dozen methods to represent the scope.  It would be an awful shame
 not
  to
   fix this,  and it would also look odd to go out with a brand new API
  that
   already has deprecations. I have altered the API in the SDO release
  branch
   [1].
  
   As far as I can tell from poking around in eclipse, SCA makes about
 half
  a
   dozen calls into the API,  so it's a small job to fix this up.  Can
   someone
   is SCA please liaise with me to get this done at our mutual
 convenience,
   thanks.
  
   Kelvin.
  
   [1]
  
 

http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diffrev=557615r1=557614r2=557615
  
 

http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diffrev=557615r1=557614r2=557615
  
  
 
 




[Java SDO, DAS and SCA] alteration to unreleased API

2007-07-19 Thread kelvin goodson

Headline message for SCA (and perhaps DAS)  -- this is notice of a change
that will require minor updates in order not to break the build



We have 2 new things in SDO that are of significance to this message that
have come about since the beta1 release.

1) An improved notion of what embodies a scope for types -- the
HelperContext (previously the story was confused because the TypeHelper was
used for this purpose at times)
2) Restructuring of the code so that it is clear what it Tuscany SDO API (
i.e. Tuscany extensions as opposed to the SDO API itself)

However, the API in the trunk still uses a TypeHelper to be passed into half
a dozen methods to represent the scope.  It would be an awful shame not to
fix this,  and it would also look odd to go out with a brand new API that
already has deprecations. I have altered the API in the SDO release branch
[1].

As far as I can tell from poking around in eclipse, SCA makes about half a
dozen calls into the API,  so it's a small job to fix this up.  Can someone
is SCA please liaise with me to get this done at our mutual convenience,
thanks.

Kelvin.

[1]
http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diffrev=557615r1=557614r2=557615http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diffrev=557615r1=557614r2=557615


Re: [Java SDO, DAS and SCA] alteration to unreleased API

2007-07-19 Thread Raymond Feng

Hi, Kelvin.

When do you plan to make the changes? I can help on the SCA side.

Thanks,
Raymond

- Original Message - 
From: kelvin goodson [EMAIL PROTECTED]

To: tuscany-dev tuscany-dev@ws.apache.org
Sent: Thursday, July 19, 2007 6:48 AM
Subject: [Java SDO, DAS and SCA] alteration to unreleased API



Headline message for SCA (and perhaps DAS)  -- this is notice of a change
that will require minor updates in order not to break the build



We have 2 new things in SDO that are of significance to this message that
have come about since the beta1 release.

1) An improved notion of what embodies a scope for types -- the
HelperContext (previously the story was confused because the TypeHelper 
was

used for this purpose at times)
2) Restructuring of the code so that it is clear what it Tuscany SDO API (
i.e. Tuscany extensions as opposed to the SDO API itself)

However, the API in the trunk still uses a TypeHelper to be passed into 
half

a dozen methods to represent the scope.  It would be an awful shame not to
fix this,  and it would also look odd to go out with a brand new API that
already has deprecations. I have altered the API in the SDO release branch
[1].

As far as I can tell from poking around in eclipse, SCA makes about half a
dozen calls into the API,  so it's a small job to fix this up.  Can 
someone

is SCA please liaise with me to get this done at our mutual convenience,
thanks.

Kelvin.

[1]
http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diffrev=557615r1=557614r2=557615http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diffrev=557615r1=557614r2=557615




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Java SDO, DAS and SCA] alteration to unreleased API

2007-07-19 Thread kelvin goodson

Thanks, I'd be happiest to leave it until the middle of next week if that
fits with you.
Kelvin.

On 19/07/07, Raymond Feng [EMAIL PROTECTED] wrote:


Hi, Kelvin.

When do you plan to make the changes? I can help on the SCA side.

Thanks,
Raymond

- Original Message -
From: kelvin goodson [EMAIL PROTECTED]
To: tuscany-dev tuscany-dev@ws.apache.org
Sent: Thursday, July 19, 2007 6:48 AM
Subject: [Java SDO, DAS and SCA] alteration to unreleased API


 Headline message for SCA (and perhaps DAS)  -- this is notice of a
change
 that will require minor updates in order not to break the build

 

 We have 2 new things in SDO that are of significance to this message
that
 have come about since the beta1 release.

 1) An improved notion of what embodies a scope for types -- the
 HelperContext (previously the story was confused because the TypeHelper
 was
 used for this purpose at times)
 2) Restructuring of the code so that it is clear what it Tuscany SDO API
(
 i.e. Tuscany extensions as opposed to the SDO API itself)

 However, the API in the trunk still uses a TypeHelper to be passed into
 half
 a dozen methods to represent the scope.  It would be an awful shame not
to
 fix this,  and it would also look odd to go out with a brand new API
that
 already has deprecations. I have altered the API in the SDO release
branch
 [1].

 As far as I can tell from poking around in eclipse, SCA makes about half
a
 dozen calls into the API,  so it's a small job to fix this up.  Can
 someone
 is SCA please liaise with me to get this done at our mutual convenience,
 thanks.

 Kelvin.

 [1]

http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diffrev=557615r1=557614r2=557615

http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diffrev=557615r1=557614r2=557615