• Classes
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

archive_xmlstore_if.idl

Go to the documentation of this file.
00001 #ifndef _ARCHIVE_XMLSTORE_IF_IDL_
00002 #define _ARCHIVE_XMLSTORE_IF_IDL_
00003 
00004 /*
00005  *    ALMA - Atacama Large Millimiter Array
00006  *    (c) European Southern Observatory, 2002
00007  *    Copyright by ESO (in the framework of the ALMA collaboration),
00008  *    All rights reserved
00009  *
00010  *    This library is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 2.1 of the License, or (at your option) any later version.
00014  *
00015  *    This library is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with this library; if not, write to the Free Software
00022  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
00023  *    MA 02111-1307  USA
00024  */
00025 
00026 #include <xmlentity.idl> 
00027 #include <acscommon.idl>
00028 #include <acscomponent.idl>
00029 
00030 // HSO 2006-09-15: it seems that after a year of freedom from this bug, 
00031 // we must again put the pragma after the includes. Otherwise a unit test in ARCHIVE/Archive failed,
00032 // in which a C++ client accesses a Java component.
00033 #pragma prefix "alma"
00034 
00035 
00036 module xmlstore
00037 {
00042         typedef string URI;
00046         typedef sequence <URI> URISeq;
00051         typedef string UniqueIdentifier;
00052                 
00056         typedef sequence <UniqueIdentifier> UniqueIdentifierSeq;
00057         
00061          typedef xmlentity::XmlEntityStruct IdentifierRange;
00062          
00067         typedef sequence <string> StringSeq;
00068         
00072         exception ArchiveInternalError{};
00073 
00078         enum operationType {STORED_XML, UPDATED_XML, DELETED_XML}; // TODO add schema operations 
00079 
00083         struct XmlStoreNotificationEvent {
00085            string uid;       
00087            operationType operation;
00088         };
00089         
00091         const string CHANNELNAME = "xmlstore";
00097         interface Identifier : ACS::ACSComponent
00098         {
00102                 exception NotAvailable{};
00103 
00107                 exception NotFound{};
00108 
00114                 UniqueIdentifierSeq getUIDs(in short number) 
00115                         raises (NotAvailable);
00116                         
00126                 UniqueIdentifier getIdNamespace() 
00127                         raises (NotAvailable);
00128                         
00129                 IdentifierRange getNewRange()
00130                         raises (NotAvailable);
00131                         
00132                 IdentifierRange getNewRestrictedRange(in long number, in string user)
00133                         raises (NotAvailable);
00134                         
00135                 IdentifierRange getExistingRange(in URI identifier, in string user)
00136                         raises (NotFound);
00137 
00141                 boolean checkUIDsyntax(in URI identifier);
00142         };
00143         
00150         interface Cursor : ACS::OffShoot
00151         {
00156                 struct QueryResult 
00157                 {
00158                         URI identifier;
00159                         string xml;
00160                 };
00161                 
00165                 typedef sequence <QueryResult> QueryResultSeq;
00166                 
00167                 // might need to add some exceptions
00168 
00172                 boolean hasNext()
00173                         raises (ArchiveInternalError);
00174                         
00178                 QueryResult next()
00179                         raises (ArchiveInternalError);
00180                         
00184                 QueryResultSeq nextBlock(in short size)
00185                         raises (ArchiveInternalError);
00186                 
00191                 oneway void close(); 
00192         };
00193 
00203         interface Operational : ACS::OffShoot
00204         {       
00208                 struct StatusStruct
00209                 {
00211                         URI schema;
00213                         string owner;
00215                         string locks;
00217                         boolean deleted;
00222                         boolean dirty;
00224                         boolean hidden;
00225                 };
00233                 exception AlreadyThere{};
00237                 exception NotYetThere{};
00240                 exception IllegalEntity{};
00242                 exception DirtyEntity{};
00246                 exception MalformedURI{};
00248                 exception NotFound{};
00249                 
00254                 exception NotImplemented{};
00255 
00259                 exception TimestampInconsistency{};
00260 
00264                 boolean exists(in URI identifier)
00265                         raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00266                 
00268                 void store(in xmlentity::XmlEntityStruct entity)
00269                         raises (ArchiveInternalError, IllegalEntity);
00270                         
00274                 void update(in xmlentity::XmlEntityStruct entity)
00275                         raises (ArchiveInternalError, IllegalEntity, TimestampInconsistency);
00276                 
00280                 void forceUpdate(in xmlentity::XmlEntityStruct entity)
00281                         raises (ArchiveInternalError, IllegalEntity, TimestampInconsistency);
00282                         
00288                 void updateXML(in URI uid, in string schema, in wstring newChild) raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere); 
00289                 
00293                 xmlentity::XmlEntityStruct retrieve(in URI identifier)
00294                         raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00295                                 
00299                 StringSeq retrieveFragment(in URI identifier, in string id)
00300                         raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00301                         
00303                 xmlentity::XmlEntityStruct updateRetrieve(in URI identifier)
00304                         raises (ArchiveInternalError, NotFound, MalformedURI, DirtyEntity);
00305                         
00307                 xmlentity::XmlEntityStruct retrieveDirty(in URI identifier)
00308                         raises (ArchiveInternalError, NotFound, MalformedURI);
00309                         
00313                 void delete(in URI identifier)
00314                         raises (ArchiveInternalError, NotFound, MalformedURI);
00315                         
00317                 void undelete(in URI identifier)
00318                         raises (ArchiveInternalError, NotFound, MalformedURI);
00319                 
00321                 StatusStruct status(in URI identifier)
00322                         raises (ArchiveInternalError, NotFound, MalformedURI);
00323                 
00333                 Cursor query( in wstring query, in string schema)
00334                 raises (ArchiveInternalError);
00339                 Cursor queryContent( in wstring query, in string schema)
00340                         raises (ArchiveInternalError);
00341                         
00343                 Cursor queryDirty( in wstring query, in string schema)
00344                         raises (ArchiveInternalError);
00345 
00350                 URISeq queryUIDs( in wstring query, in string schema)
00351                         raises (ArchiveInternalError);          
00352 
00354                 URISeq queryUIDsDirty( in wstring query, in string schema)
00355                         raises (ArchiveInternalError);
00356                 
00361                 URISeq queryRecent( in string schemaname, in string timestamp)
00362                         raises (ArchiveInternalError);
00363 
00364 
00408                 typedef sequence <StringSeq> stringSeqSeq;
00409                 stringSeqSeq querySubmissions(in short fieldID, in string searchString,
00410                                 in boolean caseSensitive, in boolean containsQuery, in string PiCoIfilter)
00411                                 raises (ArchiveInternalError, NotImplemented);
00412                         
00413                 
00417                 void addElement(in URI uid, in string schema, in wstring xPath, in wstring xmlElement)
00418                         raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00419         
00423                 void updateElement(in URI uid, in string schema, in wstring xPath, in wstring xmlElement)
00424                         raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00425 
00426                         
00430                 void deleteElement(in URI uid, in string schema, in wstring xPath)
00431                         raises (ArchiveInternalError, IllegalEntity, MalformedURI, NotYetThere);
00432 
00433                 
00438                 void close(in string password)
00439                         raises (ArchiveInternalError);
00440                         
00441         };
00442 
00447         interface Administrative : ACS::OffShoot, ACS::PingableResource
00448         {
00450                 exception NotFound{};
00452                 exception MalformedURI{};
00453 
00457                 // boolean ping();
00458 
00463                 void init(in string password)
00464                         raises (ArchiveInternalError);
00465 
00471                 void reinit(in string password)
00472                         raises (ArchiveInternalError);
00473 
00477                 void remove(in URI identifier, in boolean deep)
00478                         raises (NotFound,MalformedURI,ArchiveInternalError);
00479 
00486                 void cleanTestArea()
00487                         raises (ArchiveInternalError);
00488                 
00492                 string config(in string name);
00493                 
00497                 void close(in string password)
00498                         raises (ArchiveInternalError);
00499         };
00500         
00506         interface ArchiveConnection : ACS::ACSComponent
00507         {
00509                 exception UserDoesNotExistException{};
00511                 exception PermissionException{};
00513                 exception ArchiveException{};
00514                 
00516                 Operational getOperational(in string user) 
00517                         raises (UserDoesNotExistException,ArchiveException,PermissionException);
00518 
00520                 Administrative getAdministrative(in string user) 
00521                         raises (UserDoesNotExistException,ArchiveException,PermissionException);
00522         
00523         };
00524 };
00525 
00526 
00527 #endif /* _ARCHIVE_XMLSTORE_IF_IDL_ */

Generated on Fri Apr 15 2016 15:13:14 for ACS-2016.4 IDL interfaces by  doxygen 1.7.0