Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Finding and Displaying Duplicates
Topic Summary:
Created On: 17-Apr-2003 06:12
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 17-Apr-2003 06:12
User is offline View Users Profile Print this message


Pelp  

Posts: 11
Joined: 9-Apr-2003

Hi -

does DXL have any built in functions that will find and display all duplicate entries of a attribute?

If it doesn't, then I thought of this approach.

1) Open the module
2) Sort the module's objects in adscending order based on an attribute
3) Compare the first objec to the next. If the objects have duplicate entries in the given attribue, record both object identifiers. If not, move to next object and compare the object after that.
4) Repeat step3 unitl you are done with all the objects in the module.
5) Display the duplicates on the screen

How is the pseudo code? Would I use layout DXL for anypart of this job?

Thanks,
Pelp



-------------------------


Edited: 17-Apr-2003 at 06:19 by Pelp  
Report this to a Moderator Report this to a Moderator
 17-Apr-2003 15:17
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

If you know all the possible values of the attribute (and there aren't too many), then a better approach might be to use skip lists. Create a skip list for each attribute value. Loop through all the objects in the module, look at the attribute and add the object to the appropriate skip list. Then output the skip lists that have more than one entry.


-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 17-Apr-2003 15:24
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

If the attribute can have an unknown value, then I suggest:
Create a new attribute, say "duplicate".
Use a skip list with the attribute value as the key and the object as data.
Loop through the objects.
Do a find on the skip list for the current object's attribute value.
If the find is successful then you have a duplicate, so set the duplicate attribute for the current object and for the one that you found in the skip list.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 21-Apr-2003 19:32
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Use a LayOut to display information about a particular object. Trying to use LayOut to Filter/Unfilter would be a relative disaster since layout is directly assiciated with the current display set, as would using it to be sensitive to the current Sort criteria (that is, making a reference to "next(obj)" and "previous(obj)"). This does not look like a good job for layout.

As for your algorithm consider the attached pseudo-code.

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.