Bug 249583 - getValueType() not handled correctly for JNDI CP
Summary: getValueType() not handled correctly for JNDI CP
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Higgins (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Tom Doman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-03 05:57 EDT by Rajalakshmi Iyer CLA
Modified: 2016-11-09 16:28 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajalakshmi Iyer CLA 2008-10-03 05:57:23 EDT
I have written the following sample IdAS code to get the OWL data type for
a generalizedTime type attribute 'createTimeStamp' and ran it against the
JNDI CP.

----------------------
java.util.List attrList = new java.util.ArrayList();
attrList.add(new java.net.URI(
"http://www.eclipse.org/higgins/ontologies/2006/higgins/ldap#attr_createTimeStamp"
));

IEntity person = context.getEntity("uid=riyer,o=Higgins", attrList.iterator());
IAttribute property = (IAttribute)person.getAttribute(new java.net.URI(
"http://www.eclipse.org/higgins/ontologies/2006/higgins/ldap#attr_createTimeStamp"
));
Iterator valItr = property.getValues();
while ( valItr.hasNext() ) {
      IAttributeValue propVal = (IAttributeValue)valItr.next();
      if (propVal.isSimple()) {
            ISimpleAttrValue simpleAttrValue = (ISimpleAttrValue) propVal;
            java.net.URI valType = simpleAttrValue.getValueType();
            System.out.println(valType.toString());
      }
}
----------------------

The output data type for the 'createTimeStamp' attribute is
http://www.w3.org/2001/XMLSchema#string. Should it not be the XML dateTime
data type?

Further investigation showed that the getAttribute(URI consumerAttrName) in
JNDIEntity,java has code like -

Object jndiValue = jndiAttrValEnum.next();
if (jndiValue instanceof String) {
      attr.addSimpleValue(ISimpleAttrValue.STRING_TYPE_URI, (String)
jndiValue);
}

Shouldn't the check here be for the data type of the LDAP attribute instead
of the type of value?
Comment 1 Brian Walker CLA 2008-10-29 12:21:53 EDT
re-assigning this as candidate M5 fix. 
Comment 2 Brian Walker CLA 2009-01-29 13:10:10 EST
moving all unfinished tasks from M5 to M6 as candidate tasks. 
Comment 3 Brian Walker CLA 2009-01-29 22:20:36 EST
temporarily moving these Higgins 1.1 candidate items out to 1.1 target milestone as placeholder for time being. Will pull in select items to various Milestone builds as appropriate as we approach 1.1 release.