You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by David Adcox <co...@gmail.com> on 2008/03/20 13:22:55 UTC

Alias Name Support in Tuscany SDO

Currently, alias name support is disabled in SDO, intentionally.  The
SDOHelperImpl.addAliasName(Type,String) and
SDOHelperImpl.addAliasName(Property,String) throw an
UnsupportedOperationException when called.  Does this function still
need to be disabled?  When I remove these guards, my test cases seem
to function properly.

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


Re: Alias Name Support in Tuscany SDO

Posted by kelvin goodson <ke...@thegoodsons.org.uk>.
I traced back the origins of the commented out line [1],  and it was
introduced in commented out form (in a different file). That would tend to
suggest that it was there as a reminder of the right thing to do one other
infrastructure was in place,  rather than being commented out  because it
wasn't right.  If uncommenting this  line causes  the right kind of
behaviour and does not introduce other test errors,  then I guess that more
recent changes have made this line of code viable.


[1]
http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java?r1=394728&r2=396004&pathrev=396004


On 20/03/2008, David Adcox <co...@gmail.com> wrote:
>
> Currently, alias name support is disabled in SDO, intentionally.  The
> SDOHelperImpl.addAliasName(Type,String) and
> SDOHelperImpl.addAliasName(Property,String) throw an
> UnsupportedOperationException when called.  Does this function still
> need to be disabled?  When I remove these guards, my test cases seem
> to function properly.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Alias Name Support in Tuscany SDO

Posted by Frank Budinsky <fr...@ca.ibm.com>.
It's not sufficient just to add a new aliasName to the list. You'd also 
need to push the change back down to the EAnnotation, from which the list 
contents is derived:

  public List getAliasNames(EModelElement modelElement) {
    EAnnotation eAnnotation = getAnnotation(modelElement, false);
    List list = null;
    if (eAnnotation != null) {
      String aliasNames = (String)eAnnotation.getDetails().get(
"aliasNames");
      if (aliasNames != null) {
        list = new ArrayList();
        StringTokenizer st = new StringTokenizer(aliasNames, " ");
        while (st.hasMoreTokens()) {
          String t = st.nextToken();
          list.add(t);
        }
      }
    }
    return list;
  }

Frank.




"David Adcox" <co...@gmail.com> 
03/20/2008 08:22 AM
Please respond to
tuscany-dev@ws.apache.org


To
tuscany-dev@ws.apache.org
cc

Subject
Alias Name Support in Tuscany SDO






Currently, alias name support is disabled in SDO, intentionally.  The
SDOHelperImpl.addAliasName(Type,String) and
SDOHelperImpl.addAliasName(Property,String) throw an
UnsupportedOperationException when called.  Does this function still
need to be disabled?  When I remove these guards, my test cases seem
to function properly.

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




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