+++ /dev/null
-/*
- *
- */
-package org.vamsas.client;
-
-import java.util.Hashtable;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.VAMSAS;
-
-/**
- * skeleton abstract class to allow client implementations
- * access to vamsas.client.Vobject registry mechanism.
- */
-public abstract class ClientDocument implements IClientDocument {
- static Log log = LogFactory.getLog(ClientDocument.class);
-
- /**
- * collection of org.vamsas.client.Vobject references
- */
- protected Hashtable vamsasObjects;
- protected IVorbaIdFactory vorbafactory;
-
- protected ClientDocument(Hashtable objects, IVorbaIdFactory factory) {
- vamsasObjects = objects;
- vorbafactory = factory;
- }
-
- /**
- * @see IClientHandle.registerObject(Vobject unregistered)
- */
- protected VorbaId _registerObject(Vobject unregistered) {
- // be ultra safe here because the user may be trying to mix different factories
- if (unregistered.__vorba==null)
- unregistered.__vorba = vorbafactory;
- else
- if (unregistered.__vorba!=vorbafactory) {
- // LATER: decide if this is allowed - it isn't for the moment.
- log.error("Attempt to overwrite info in a registered vorba Vobject (under a different IVorbaIdFactory) ! - Implementation fix needed.");
- return null;
- } else {
- // probably didn't need to call registerObject.
- log.debug("Redundant call to registerObject");
- }
- // TODO: add default provenance.
- // TODO: decide if we need to do call __ensure_instance_ids here
- // TODO: check if __ensure_instance_ids works correctly with new 'visit flag' mechanism
- unregistered.__ensure_instance_ids(); // call cascade method here :
- return unregistered.getVorbaId();
- }
-}