|
From: Joncheng K. <ck...@sy...> - 2004-08-05 13:19:03
|
David Forslund wrote:
>It sounds like you want the interface to help combine
>some common code that might exist between QueryAccess and ObservationRemote.
>
Yes, most operations implemented in QueryAccessImpl delegate their job
to getObservationsWithPolicy(). This method is basically the same
between QueryAccessImpl and BrowseAccessImpl except for the output
format, although BrowseAccessImpl can be more efficient by not
collecting all sub-observations at once.
> Is that
>correct? One thing to think about, is the ability to use a POJO (Plain Old Java Object) call
>for the case (which seems to be coming up) of using COAS (and PIDS) with Web Services.
>
Sorry, I don't get it.
Joncheng
>
>Thanks,
>
>Dave
>
>
>
>>------------Original Message------------
>>From: Joncheng Kuo <ck...@sy...>
>>To: "David Forslund" <dw...@la...>
>>Cc: ope...@li...
>>Date: Wed, Aug-4-2004 9:29 PM
>>Subject: [OpenEMed-developer] Re: Your contributions
>>
>>David Forslund wrote:
>>
>>
>>
>>>it might be a good idea if you pass by me the structure that you are
>>>
>>>
>>going to submit, so I can make sure that it fits it with the overall
>>design (that might not be that clear).
>>
>>
>>I will. I've been thinking about the design and changes needed for a
>>few
>>days. Here are some thoughts that I'm considering.
>>
>>1. Create an interface called "PersistentObservationAccess" (see the
>>attached file).
>>This interface is neutral to specific database schema. It is basically
>>the replacement for the retrieveObservations() method in
>>QueryAccessImpl. In this way, QueryAccessImpl will be independent from
>>any particular database schema. We can configure the actual class
>>implementing this interface depending on any specific database
>>schema/structure.
>>
>>2. Create a "remote" package under gov.lanl.COAS and implement
>>interfaces related to ObservationRemote such as ObservedSubject,
>>ObservationRemoteIterator, etc. in this package. The BrowseAccessImpl
>>class will be still under gov.lanl.COAS, but it'll use classes
>>implemented in this "remote" package.
>>
>>Besides, I found that the done() method is not adequately implemented.
>>We have to deactivate objects like ObservationDataIterator from their
>>POA or they never get removed. Both COAS and PIDS will need to use this
>>
>>deactivate code.
>>
>>Joncheng
>>
>>
>>
>>>Thanks,
>>>
>>>Dave
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>// PersistentObservationAccess.java
>>
>>/**
>> * ***********************************
>> * Copyright Notice
>> * Copyright (c) 1999, 2000, 2001, 2002 Regents of the University of
>>California. All rights reserved.
>> *
>> * DISCLAIMER
>> * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
>>AND ANY EXPRESS
>> * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
>>WARRANTIES OF
>> * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
>>IN NO EVENT
>> * SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
>>INDIRECT, INCIDENTAL,
>> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
>>LIMITED TO,
>> * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
>>PROFITS; OR
>> * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
>>LIABILITY, WHETHER IN
>> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
>>OTHERWISE) ARISING IN
>> * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
>>POSSIBILITY OF SUCH
>> * DAMAGE.
>> * ************************************
>> */
>>package gov.lanl.COAS;
>>
>>import org.omg.CORBA.Any;
>>import org.omg.DsObservationAccess.*;
>>import org.omg.PersonIdService.QualifiedPersonId;
>>
>>import java.util.ArrayList;
>>
>>/**
>> * This interface specifies the methods for accessing the persistent
>>storage
>> * of observations. It provides an interface that is indepedant from
>>actual
>> * database schema for storing observations.
>> */
>>public interface PersistentObservationAccess
>>{
>> /**
>> * Initialize this observation access object.
>> */
>> public void init(
>> gov.lanl.Database.DatabaseMgr dbMgr,
>> gov.lanl.Database.PersistentObjectFactory persObjFact,
>> gov.lanl.Database.CodeMapper codeMapper,
>> gov.lanl.COAS.PolicyMgr policyMgr);
>>
>> /**
>> * Retrieve one observation with its observation ID.
>> * @param observation_id the observation ID
>> * @return the observation that matches the given observation ID.
>> * @exception InvalidOids if the observation cannot be found.
>> */
>> public PersistentCOAS retrieveObservation(
>> ObservationId observation_id
>> ) throws
>> InvalidOids;
>>
>> /**
>> * Count observations based on the specified policy.
>> *
>> * @param who
>> * @param what
>> * @param when
>> * @param qualifiers
>> * @param policy
>> *
>> * @return the number of observations satisfying the specified
>>policy
>> */
>> public int countObservationsWithPolicy(
>> QualifiedPersonId[] who, String[] what,
>> TimeSpan when, Any[] qualifiers,
>> NameValuePair[] policy
>> ) throws
>> InvalidIds, DuplicateIds, InvalidCodes, DuplicateCodes,
>> InvalidTimeSpan, InvalidQualifiers, DuplicateQualifiers,
>> InvalidPolicies, DuplicatePolicies;
>>
>> /**
>> * Retrieve observations based on the specified policy.
>> *
>> * @param who
>> * @param what
>> * @param when
>> * @param qualifiers
>> * @param policy
>> *
>> * @return a vector of objects implementing the {@link
>>PersistentCOAS}
>> * interface.
>> */
>> public ArrayList retrieveObservationsWithPolicy(
>> QualifiedPersonId[] who, String[] what,
>> TimeSpan when, Any[] qualifiers,
>> NameValuePair[] policy);
>>
>>}
>>
>>
>>
>>
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by OSTG. Have you noticed the changes on
>Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
>one more big change to announce. We are now OSTG- Open Source Technology
>Group. Come see the changes on the new OSTG site. www.ostg.com
>_______________________________________________
>OpenMed-developer mailing list
>Ope...@li...
>https://lists.sourceforge.net/lists/listinfo/openmed-developer
>
>
>
>
>
|