|
From: Joncheng K. <ck...@sy...> - 2004-08-05 19:05:41
|
David Forslund wrote:
> The implementation of query interfaces in PidServer and COAS isn't
> that tied to a specific persistence implemention. It only uses the
> interfaces provided by the DatabaseMgr.
I know, but several issues came up when I tried to reuse the OpenEMed
implementation for some existing database schema. For example, the
making of SearchFilter is schema specific because you have to refer to
the column names. An other example is about traits. Traits are stored in
a seperate table in OpenEMed but are stored as columns of the Identity
table in our case. Thus, the access of traits has to be replaced too.
I'm not saying that we always want general implementations, but there
seems a way to create a persistent access layer based on the conceptual
model of observations and identities/traits and implement this layer
using the database layer of OpenEMed.
> A potentially big advantage of using the model is the inheritance that
> is present in the model but is not reflected in the COAS IDL.
That's right.
Cheers,
Joncheng
>
>
> Dave
>
> ------------Original Message------------
> From: Joncheng Kuo <ck...@sy...>
> To: "David Forslund" <dw...@la...>
> Cc: ope...@li...
> Date: Thu, Aug-5-2004 9:42 AM
> Subject: Re: [OpenEMed-developer] Re: Your contributions
> David Forslund wrote:
>
>> Don't worry too much about it, but people have been asking for a
>> Web Services interface to OpenEMed. One way I have begun
>> accommodating that is to treat the CORBA layer has a translation
>> from simple Java rather than having CORBA embedded too deeply in
>> the code. This way it is fairly easy to expose the Java code to
>> Web Services. The CORBA layer could be translated to Web
>> Services, too, but this is somewhat less efficient.
>
> OpenEMed has a persistent layer (gov.lanl.Database) that is
> indepedent from specific persistent storage. However, the
> implementation of query interfaces in PidServer and COAS is
> somewhat tied into the specific presistent object implementation.
> On the other hand, the non-persistent object returned by
> PersistentObject.toObject() is basically tied into CORBA specific
> data structure (e.g., ObservationDataStruct) or interfaces (e.g.,
> IdentityCore). A better approach will be to create an interface
> (or framework of interfaces) that is based the conceptual model of
> the non-persistent object such as the COAS Information Model
> described in COAS Chapter 2.
>
> Joncheng
>
>>
>> Dave
>>
>>
>> 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
>>>
>>>
>>>
>>>
>>>
|