4 package org.vamsas.objects.utils;
5 import java.util.Vector;
7 import org.vamsas.objects.core.*;
9 * Form, accessors and validation for ApplicationData references in
11 * TODO: LATER:extend XML Schema to properly validate against the same forms required by this class
12 * TODO: implement methods for searching appData structure for particular combinations of client and user data
13 * TODO: VAMSAS: URNS for appDatas are supposed to be unique, aren't they ?
15 public class AppDataReference {
16 static public Vector getAppDataReferences(VamsasDocument doc) {
17 if ((doc!=null) && (doc.getApplicationDataCount()>0)) {
18 Vector apdrefs = new Vector();
19 ApplicationData[] appdatas = doc.getApplicationData();
20 for (int q=0; q<appdatas.length; q++) {
21 String refstring=appdatas[q].getDataReference();
23 apdrefs.add(refstring);
24 User users[] = appdatas[q].getUser();
27 for (int u=0; u<users.length; u++)
28 refstring=users[u].getDataReference();
30 apdrefs.add(new String(refstring)); // avoid referencing.