Hi, Jim.
We
have some questions about IdAS interfaces. Now in order to get full
information of Entity we need many IdAS calls, such as getAttributes(),
getValues(), getData() etc. And the more actual data (more Attributes with
values present) then more calls need to be done
respectively.
For example to get
the m-card with claims we need get many attributes for claim types, get
their values, simple as well as complex, getting their attributes and so on.
In common case to get the full Entity we need do something like
this:
IEntity entity =
context.getEntity(entityID);
Iterator
itAttributes = entity.getAttributes();
while (itAttributes.hasNext())
{
IAttribute attr = (IAttribute) itAttributes.next();
processAttribute(attr);
public void processAttribute(IAttribute
attr) {
Iterator itValues = attr.getValues();
while (itValues.hasNext())
{
IAttributeValue val = (IAttributeValue)
itValues.next();
if (val.isSimple())
{
Object data = ""
val).getData();
doSomethingWith(data);
}
else {
Iterator itAttr = ((IComplexAttrValue)
val).getAttributes();
while (itAttr.hasNext())
{
processAttribute((IAttribute)itAttr.next());
}
}
}
Is it possible to
reduce number of IdAS calls to get the full Entity data? May be it would
be good to change interfaces so that it will no need in cycles
and big number of separate calls...Probably it is possible to change
IComplexAttrValue and IEntity interfaces, method getAttributes() so that we
could be able to narrow the attribute set and filter them by value to get
only information that we need, and get all of the attributes with values all
in one at a time.
Thanks, Yuriy
Pilipenko.