*/
static public boolean equals(ApplicationData p, ClientHandle c) {
if (
- ((c.getClientUrn()==null) || p.getUrn().equals(c.getClientUrn()))
- &&
+ //((c.getClientUrn()==null) || p.getUrn().equals(c.getClientUrn()))
+ //&&
(p.getName().equals(c.getClientName()))
&&
((c.getVersion()==null) || (p.getVersion().equals(c.getVersion())))
*/
public static String uniqueAppDataReference(VamsasDocument dest,String base) {
String urn = new String(base);
+
for (int i=0, j=dest.getApplicationDataCount(); i<j; i++) {
ApplicationData o = dest.getApplicationData()[i];
// ensure new urn is really unique
int v = 1;
- while (o.getUrn().equals(urn)) {
+ // TODO: while (o.getUrn().equals(urn)) {
urn = base+"/"+v++;
- }
+ //}
}
return urn;
}
static Log log = LogFactory.getLog(ProvenanceStuff.class);
/**
+ * @param app TODO
* @param action
* text for action entry
* @return new Provenance entry for ArchiveWriter created docs.
* TODO: Verify and move to SimpleClient class for provenance handling
*/
- public static Entry newProvenanceEntry(String user, String action) {
+ public static Entry newProvenanceEntry(String app, String user, String action) {
log.debug("Adding ProvenanceEntry("+user+","+action+")");
Entry e = new Entry();
+ e.setApp(app);
e.setAction(action);
e.setUser(user);
e.setDate(new org.exolab.castor.types.Date(new Date()));
return list;
}
public static Provenance newProvenance(String user, String action) {
- return newProvenance(ProvenanceStuff.newProvenanceEntry(user, action));
+ return newProvenance(ProvenanceStuff.newProvenanceEntry("vamsasApp:ExampleVamsasClient/alpha", user, action));
+ }
+ public static Provenance newProvenance(String app, String user, String action) {
+ return newProvenance(ProvenanceStuff.newProvenanceEntry(app, user, action));
}
}