(file) Return to Repository.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Repository

   1 mike  1.1 //BEGIN_LICENSE
   2           //
   3           // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
   4           //
   5           // Permission is hereby granted, free of charge, to any person obtaining a
   6           // copy of this software and associated documentation files (the "Software"),
   7           // to deal in the Software without restriction, including without limitation
   8           // the rights to use, copy, modify, merge, publish, distribute, sublicense,
   9           // and/or sell copies of the Software, and to permit persons to whom the
  10           // Software is furnished to do so, subject to the following conditions:
  11           //
  12           // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13           // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14           // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  15           // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16           // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  17           // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  18           // DEALINGS IN THE SOFTWARE.
  19           //
  20           //END_LICENSE
  21           //BEGIN_HISTORY
  22 mike  1.1 //
  23           // Author:
  24           //
  25 mike  1.2 // $Log: Repository.cpp,v $
  26 mike  1.7 // Revision 1.6  2001/02/13 07:00:18  mike
  27           // Added partial createInstance() method to repository.
  28           //
  29 mike  1.6 // Revision 1.5  2001/02/11 05:45:33  mike
  30           // Added case insensitive logic for files in Repository
  31           //
  32 mike  1.5 // Revision 1.4  2001/01/31 08:20:51  mike
  33           // Added dispatcher framework.
  34           // Added enumerateInstanceNames.
  35           //
  36 mike  1.4 // Revision 1.3  2001/01/28 04:11:03  mike
  37           // fixed qualifier resolution
  38           //
  39 mike  1.3 // Revision 1.2  2001/01/25 02:12:05  mike
  40           // Added meta-qualifiers to LoadRepository program.
  41           //
  42 mike  1.2 // Revision 1.1.1.1  2001/01/14 19:53:55  mike
  43           // Pegasus import
  44           //
  45 mike  1.1 //
  46           //END_HISTORY
  47           
  48           #include <cctype>
  49           #include <fstream>
  50           #include <Pegasus/Common/Pair.h>
  51           #include <Pegasus/Common/Destroyer.h>
  52           #include <Pegasus/Common/FileSystem.h>
  53           #include <Pegasus/Common/Exception.h>
  54           #include <Pegasus/Common/XmlReader.h>
  55           #include <Pegasus/Common/XmlWriter.h>
  56           #include <Pegasus/Common/DeclContext.h>
  57 mike  1.6 #include <Pegasus/Common/DeclContext.h>
  58 mike  1.1 #include "Repository.h"
  59 mike  1.6 #include "InstanceIndexFile.h"
  60 mike  1.1 
  61           #define INDENT_XML_FILES
  62           
  63           PEGASUS_NAMESPACE_BEGIN
  64           
  65           ////////////////////////////////////////////////////////////////////////////////
  66           //
  67           // Local functions
  68           //
  69           ////////////////////////////////////////////////////////////////////////////////
  70           
  71           //------------------------------------------------------------------------------
  72           //
  73           // This routine matches files in the classes directory (given by path)
  74           // that match the second and third arguments, which are eight class names
  75           // or asterisks (which are wild cards). All the files in the ./classes
  76           // directory are of the form <className.superClassName>. For classes
  77           // with no superClass, the superClassName is "#". We consider a couple of
  78           // examples. To find all direct subclasses of "MyClass", we invoke it
  79           // as follows:
  80           //
  81 mike  1.1 //	_GlobClassesDir(path, "*", "MyClass");
  82           //
  83           // To find the file which contains the class called "MyClass", we invoke
  84           // it like this.
  85           //
  86           //	_GlobClassesDir(path, "MyClass", "*");
  87           //
  88           // Since base classes are of the form "<ClassName>.#", all baseclasses may
  89           // be found with:
  90           //
  91           //	_GlobClassesDir(path, "*", "#");
  92           //
  93           // Note that the results (the array of filenames which are returned) must
  94           // be processed further to get the actual class names. The name of the
  95           // class is the filename less the extension. Or this:
  96           //
  97           //	String className = fileName.subString(fileName.find(0, '.'));
  98           //
  99           //------------------------------------------------------------------------------
 100           
 101           Array<String> _GlobClassesDir(
 102 mike  1.1     const String& path, 
 103 mike  1.5     const String& className_,
 104               const String& superClassName_)
 105 mike  1.1 {
 106 mike  1.5     String className = className_;
 107               String superClassName = superClassName_;
 108 mike  1.1     Array<String> fileNames;
 109           
 110               if (!FileSystem::getDirectoryContents(path, fileNames))
 111           	throw NoSuchDirectory(path);
 112           
 113               Array<String> result;
 114           
 115               for (Uint32 i = 0; i < fileNames.getSize(); i++)
 116               {
 117           	const String& tmp = fileNames[i];
 118           
 119           	Uint32 dot = tmp.find('.');
 120           
 121           	// Ignore files that do not contain a dot:
 122           
 123           	if (dot == Uint32(-1))
 124           	    continue;
 125           
 126           	String first = tmp.subString(0, dot);
 127           	String second = tmp.subString(dot + 1);
 128           
 129 mike  1.1 	if ((className == "*" || first == className) &&
 130           	    (superClassName == "*" || second == superClassName))
 131           	{
 132           	    result.append(tmp);
 133           	}
 134               }
 135           
 136               return result;
 137           }
 138           
 139           static Boolean _SkipIdentifier(Char16*& p)
 140           {
 141               if (!*p || !(isalpha(*p) || *p == '_'))
 142           	return false;
 143           
 144               for (p++; *p; p++)
 145               {
 146           	if (!(isalnum(*p) || *p == '_'))
 147           	    return true;
 148               }
 149           
 150 mike  1.1     return true;
 151           }
 152           
 153           static void _MakeNameSpacePath(
 154               const String& root,
 155               const String& nameSpace,
 156               String& path)
 157           {
 158               path = root;
 159               path.append('/');
 160           
 161               path.append(nameSpace);
 162           
 163               Char16* p = (Char16*)(path.getData() + root.getLength() + 1);
 164           
 165               while (*p)
 166               {
 167           	// Either we will encounter a slash or an identifier:
 168           
 169           	if (*p == '/')
 170           	{
 171 mike  1.1 	    if (p[1] == '/')
 172           		throw CimException(CimException::INVALID_NAMESPACE);
 173           	    
 174           	    *p++ = '#';
 175           	}
 176           	else if (!_SkipIdentifier(p))
 177           	    throw CimException(CimException::INVALID_NAMESPACE);
 178               }
 179           
 180               // The last element may NOT be a slash (slashes are translated to
 181               // #'s above).
 182           
 183               if (p[-1] == '#')
 184           	throw CimException(CimException::INVALID_NAMESPACE);
 185           }
 186           
 187           void _FindClass(
 188               const String& root, 
 189               const String& nameSpace, 
 190               const String& className,
 191               String& path)
 192 mike  1.1 {
 193               const char CLASSES[] = "/classes/";
 194               _MakeNameSpacePath(root, nameSpace, path);
 195           
 196               if (!FileSystem::isDirectory(path))
 197           	throw CimException(CimException::INVALID_NAMESPACE);
 198           
 199               path.append(CLASSES);
 200           
 201               Array<String> fileNames = _GlobClassesDir(path, className, "*");
 202           
 203               Uint32 size = fileNames.getSize();
 204           
 205               if (size == 0)
 206           	throw CimException(CimException::INVALID_CLASS);
 207           
 208               PEGASUS_ASSERT(size == 1);
 209               path.append(fileNames[0]);
 210           }
 211           
 212           inline Uint32 _min(Uint32 x, Uint32 y)
 213 mike  1.1 {
 214               return x < y ? x : y;
 215           }
 216           
 217           static void _MakeNewClassPath(
 218               const String& root,
 219               const String& nameSpace,
 220               const String& className,
 221               const String& superClassName,
 222               String& path)
 223           {
 224               const char CLASSES[] = "/classes/";
 225               _MakeNameSpacePath(root, nameSpace, path);
 226           
 227               if (!FileSystem::isDirectory(path))
 228           	throw CimException(CimException::INVALID_NAMESPACE);
 229           
 230               path.append(CLASSES);
 231               path.append(className);
 232               path.append('.');
 233           
 234 mike  1.1     if (superClassName.getLength() == 0)
 235           	path.append("#");
 236               else
 237           	path.append(superClassName);
 238           }
 239           
 240           static void _MakeQualfierPath(
 241               const String& root,
 242               const String& nameSpace,
 243               const String& qualifierName,
 244               String& path)
 245           {
 246               const char QUALIFIERS[] = "/qualifiers/";
 247               _MakeNameSpacePath(root, nameSpace, path);
 248           
 249               if (!FileSystem::isDirectory(path))
 250           	throw CimException(CimException::INVALID_NAMESPACE);
 251           
 252               path.append(QUALIFIERS);
 253               path.append(qualifierName);
 254           }
 255 mike  1.1 
 256 mike  1.6 static void _MakeInstanceIndexPath(
 257               const String& root,
 258               const String& nameSpace,
 259               const String& className,
 260               String& path)
 261           {
 262               const char INSTANCES[] = "/instances/";
 263               _MakeNameSpacePath(root, nameSpace, path);
 264           
 265               if (!FileSystem::isDirectory(path))
 266           	throw CimException(CimException::INVALID_NAMESPACE);
 267           
 268               path.append(INSTANCES);
 269               path.append(className);
 270               path.append(".idx");
 271           }
 272           
 273           static void _MakeInstancePath(
 274               const String& root,
 275               const String& nameSpace,
 276               const String& className,
 277 mike  1.6     Uint32 index,
 278               String& path)
 279           {
 280               const char INSTANCES[] = "/instances/";
 281               _MakeNameSpacePath(root, nameSpace, path);
 282           
 283               if (!FileSystem::isDirectory(path))
 284           	throw CimException(CimException::INVALID_NAMESPACE);
 285           
 286               path.append(INSTANCES);
 287               path.append(className);
 288               path.append('.');
 289           
 290               char buffer[32];
 291               sprintf(buffer, "%d", index);
 292               path.append(buffer);
 293           }
 294           
 295 mike  1.1 template<class Object>
 296           void _LoadObject(
 297               const String& path,
 298               Object& object)
 299           {
 300 mike  1.5     // Get the real path of the file:
 301 mike  1.1 
 302 mike  1.5     String realPath;
 303 mike  1.1 
 304 mike  1.5     if (!FileSystem::existsIgnoreCase(path, realPath))
 305 mike  1.1 	throw CannotOpenFile(path);
 306           
 307               // Load file into memory:
 308           
 309               Array<Sint8> data;
 310 mike  1.5     FileSystem::loadFileToMemory(data, realPath);
 311 mike  1.1     data.append('\0');
 312           
 313               XmlParser parser((char*)data.getData());
 314           
 315               XmlReader::getObject(parser, object);
 316           }
 317           
 318           template<class Object>
 319           void _SaveObject(const String& path, Object& object)
 320           {
 321               Array<Sint8> out;
 322               object.toXml(out);
 323               out.append('\0');
 324           
 325               Destroyer<char> destroyer(path.allocateCString());
 326           
 327           #ifdef PEGASUS_OS_TYPE_WINDOWS
 328               std::ofstream os(destroyer.getPointer(), std::ios::binary);
 329           #else
 330               std::ofstream os(destroyer.getPointer());
 331           #endif
 332 mike  1.1 
 333               if (!os)
 334           	throw CannotOpenFile(path);
 335           
 336           #ifdef INDENT_XML_FILES
 337               XmlWriter::indentedPrint(os, out.getData(), 2);
 338           #else
 339               os.write((char*)out.getData(), out.getSize());
 340           #endif
 341           }
 342           
 343           static void _AppendClassNames(
 344               const String& path,
 345               const String& className,
 346               const String& superClassName,
 347               Array<String>& classNames)
 348           {
 349               Array<String> allFiles;
 350           
 351               if (!FileSystem::getDirectoryContents(path, allFiles))
 352           	throw NoSuchDirectory(path);
 353 mike  1.1 
 354               // Append all the direct sublclasses of the class to the output argument:
 355           
 356               Array<String> fileNames = 
 357           	_GlobClassesDir(path, className, superClassName);
 358           
 359               for (Uint32 i = 0, n = fileNames.getSize(); i < n; i++)
 360               {
 361           	String& tmp = fileNames[i];
 362           	Uint32 pos = tmp.find('.');
 363           
 364           	PEGASUS_ASSERT(pos != Uint32(-1));
 365           
 366           	if (pos != Uint32(-1))
 367           	    tmp.remove(pos);
 368           
 369           	classNames.append(tmp);
 370               }
 371           }
 372           
 373           typedef Pair<String,String> Node;
 374 mike  1.1 
 375           static void _AppendSubclassesDeepAux(
 376               const Array<Node>& table,
 377               const String& className,
 378               Array<String>& classNames)
 379           {
 380               for (Uint32 i = 0, n = table.getSize(); i < n; i++)
 381               {
 382           	if (className == table[i].second)
 383           	{
 384           	    classNames.append(table[i].first);
 385           	    _AppendSubclassesDeepAux(table, table[i].first, classNames);
 386           	}
 387               }
 388           }
 389           
 390           static void _AppendSubclassesDeep(
 391               const String& path,
 392               const String& className,
 393               Array<String>& classNames)
 394           {
 395 mike  1.1     Array<String> allFiles;
 396           
 397               if (!FileSystem::getDirectoryContents(path, allFiles))
 398           	throw NoSuchDirectory(path);
 399           
 400               Array<Node> table;
 401               table.reserve(allFiles.getSize());
 402           
 403               for (Uint32 i = 0, n = allFiles.getSize(); i < n; i++)
 404               {
 405           	const String& fileName = allFiles[i];
 406           
 407           	Uint32 dot = fileName.find('.');
 408           
 409           	if (dot == Uint32(-1))
 410           	    continue;
 411           
 412           	String first = fileName.subString(0, dot);
 413           	String second = fileName.subString(dot + 1);
 414           
 415           	if (second == "#")
 416 mike  1.1 	    table.append(Node(first, String()));
 417           	else
 418           	    table.append(Node(first, second));
 419               }
 420           
 421               _AppendSubclassesDeepAux(table, className, classNames);
 422           }
 423           
 424           static Boolean _HasSubclasses(
 425               const String& root,
 426               const String& nameSpace,
 427               const String& className)	
 428           {
 429               const char CLASSES[] = "/classes";
 430               String path;
 431               _MakeNameSpacePath(root, nameSpace, path);
 432               path.append(CLASSES);
 433           
 434               Array<String> fileNames = _GlobClassesDir(path, "*", className);
 435           
 436               return fileNames.getSize() != 0;
 437 mike  1.1 }
 438           
 439           ////////////////////////////////////////////////////////////////////////////////
 440           //
 441           // RepositoryDeclContext
 442           //
 443           ////////////////////////////////////////////////////////////////////////////////
 444           
 445           class RepositoryDeclContext : public DeclContext
 446           {
 447           public:
 448           
 449               RepositoryDeclContext(Repository* repository);
 450           
 451               virtual ~RepositoryDeclContext();
 452           
 453 mike  1.7     virtual CIMQualifierDecl lookupQualifierDecl(
 454 mike  1.1 	const String& nameSpace, 
 455           	const String& qualifierName) const;
 456           
 457 mike  1.7     virtual CIMClass lookupClassDecl(
 458 mike  1.1 	const String& nameSpace, 
 459           	const String& className) const;
 460           
 461           private:
 462           
 463               Repository* _repository;
 464           };
 465           
 466           RepositoryDeclContext::RepositoryDeclContext(Repository* repository) 
 467               : _repository(repository)
 468           {
 469           
 470           }
 471           
 472           RepositoryDeclContext::~RepositoryDeclContext()
 473           {
 474           
 475           }
 476           
 477 mike  1.7 CIMQualifierDecl RepositoryDeclContext::lookupQualifierDecl(
 478 mike  1.1     const String& nameSpace,
 479               const String& qualifierName) const
 480           {
 481               // Ignore the exception since this routine is only supposed report
 482               // whether it can be found:
 483           
 484               try
 485               {
 486           	return _repository->getQualifier(nameSpace, qualifierName);
 487               }
 488               catch (Exception&)
 489               {
 490 mike  1.7 	return CIMQualifierDecl();
 491 mike  1.1     }
 492           }
 493           
 494 mike  1.7 CIMClass RepositoryDeclContext::lookupClassDecl(
 495 mike  1.1     const String& nameSpace,
 496               const String& className) const
 497           {
 498               // Ignore the exception since this routine is only supposed report
 499               // whether it can be found:
 500           
 501               try
 502               {
 503           	return _repository->getClass(nameSpace, className, false, true, true);
 504               }
 505               catch (Exception&)
 506               {
 507 mike  1.7 	return CIMClass();
 508 mike  1.1     }
 509           }
 510           
 511           ////////////////////////////////////////////////////////////////////////////////
 512           //
 513           // Repository
 514           //
 515           ////////////////////////////////////////////////////////////////////////////////
 516           
 517           Repository::Repository(const String& path)
 518           {
 519               const char REPOSITORY[] = "/repository";
 520               _root = path;
 521               _root.append(REPOSITORY);
 522           
 523               if (!FileSystem::isDirectory(_root))
 524               {
 525           	if (!FileSystem::makeDirectory(_root))
 526           	    throw CannotCreateDirectory(_root);
 527               }
 528           
 529 mike  1.1     _context = new RepositoryDeclContext(this);
 530           }
 531           
 532           Repository::~Repository()
 533           {
 534           
 535           }
 536           
 537 mike  1.7 CIMClass Repository::getClass(
 538 mike  1.1     const String& nameSpace,
 539               const String& className,
 540               Boolean localOnly,
 541               Boolean includeQualifiers,
 542               Boolean includeClassOrigin,
 543               const Array<String>& propertyList)
 544           {
 545               // Form the path to the class:
 546           
 547               String path;
 548               _FindClass(_root, nameSpace, className, path);
 549           
 550               // Load the class:
 551           
 552 mike  1.7     CIMClass classDecl;
 553 mike  1.1     _LoadObject(path, classDecl);
 554           
 555 mike  1.7     return CIMClass(classDecl);
 556 mike  1.1 }
 557           
 558 mike  1.7 CIMInstance Repository::getInstance(
 559 mike  1.1     const String& nameSpace,
 560 mike  1.7     const CIMReference& instanceName,
 561 mike  1.1     Boolean localOnly,
 562               Boolean includeQualifiers,
 563               Boolean includeClassOrigin,
 564               const Array<String>& propertyList)
 565           {
 566               throw CimException(CimException::NOT_SUPPORTED);
 567 mike  1.7     return CIMInstance();
 568 mike  1.1 }
 569           
 570           void Repository::deleteClass(
 571               const String& nameSpace,
 572               const String& className)
 573           {
 574               // Get path of class file:
 575           
 576               String path;
 577               _FindClass(_root, nameSpace, className, path);
 578           
 579               // Disallow if the class has subclasses:
 580           
 581               if (_HasSubclasses(_root, nameSpace, className))
 582           	throw CimException(CimException::CLASS_HAS_CHILDREN);
 583           
 584               // ATTN-C: check to see if the class has instances:
 585           
 586               // Remove the class:
 587           
 588               if (!FileSystem::removeFile(path))
 589 mike  1.1 	throw FailedToRemoveFile(path);
 590           }
 591           
 592           void Repository::deleteInstance(
 593               const String& nameSpace,
 594 mike  1.7     const CIMReference& instanceName) 
 595 mike  1.1 { 
 596               throw CimException(CimException::NOT_SUPPORTED);
 597           }
 598           
 599           void Repository::createClass(
 600               const String& nameSpace,
 601 mike  1.7     CIMClass& newClass) 
 602 mike  1.1 {
 603               // Form the path to the class:
 604           
 605               String path;
 606               const String& className = newClass.getClassName();
 607               const String& superClassName = newClass.getSuperClassName();
 608 mike  1.5     _MakeNewClassPath(
 609           	_root, nameSpace, className, superClassName, path);
 610 mike  1.1 
 611 mike  1.5     String realPath;
 612           
 613               if (FileSystem::existsIgnoreCase(path, realPath))
 614 mike  1.1 	throw CimException(CimException::ALREADY_EXISTS);
 615 mike  1.5     else
 616           	realPath = path;
 617 mike  1.1 
 618               // Validate the new class:
 619           
 620               newClass.resolve(_context, nameSpace);
 621           
 622               // Save the class:
 623           
 624 mike  1.5     _SaveObject(realPath, newClass);
 625 mike  1.1 }
 626           
 627           void Repository::createInstance(
 628               const String& nameSpace,
 629 mike  1.7     CIMInstance& newInstance) 
 630 mike  1.6 {
 631               // Form the reference to this instance:
 632           
 633               String instanceName;
 634           
 635           #if 0
 636               // ATTN: fix this:
 637 mike  1.7     CIMReference::referenceToInstanceName(
 638 mike  1.6 	newInstance.makeReference(), instanceName);
 639           #else
 640               instanceName = "MyClass.key1=123456";
 641           #endif
 642           
 643               // Get the instance-name and create an entry
 644           
 645               String indexPath;
 646           
 647               _MakeInstanceIndexPath(
 648           	_root, nameSpace, newInstance.getClassName(), indexPath);
 649           
 650               Uint32 index;
 651           
 652               if (!InstanceIndexFile::insert(indexPath, instanceName, index))
 653           	throw CimException(CimException::FAILED);
 654           
 655               // Save the instance to file:
 656           
 657               String path;
 658           
 659 mike  1.6     _MakeInstancePath(
 660           	_root, nameSpace, newInstance.getClassName(), index, path);
 661           
 662               newInstance.resolve(_context, nameSpace);
 663           
 664               _SaveObject(path, newInstance);
 665 mike  1.1 }
 666           
 667           void Repository::modifyClass(
 668               const String& nameSpace,
 669 mike  1.7     CIMClass& modifiedClass) 
 670 mike  1.1 {
 671               // ATTN: need lots of semantic checking here:
 672           
 673               // Get the old class:
 674           
 675 mike  1.7     CIMClass oldClass = getClass(
 676 mike  1.1 	nameSpace, modifiedClass.getClassName(), false, true, true);
 677           
 678               // Disallow changing the name of the super-class:
 679           
 680               if (modifiedClass.getSuperClassName() != oldClass.getSuperClassName())
 681           	throw CimException(CimException::INVALID_SUPERCLASS);
 682           
 683               // Delete the old class:
 684           
 685               deleteClass(nameSpace, modifiedClass.getClassName());
 686           
 687               // Create the class again:
 688           
 689               createClass(nameSpace, modifiedClass);
 690           }
 691           
 692           void Repository::modifyInstance(
 693               const String& nameSpace,
 694 mike  1.7     const CIMInstance& modifiedInstance) 
 695 mike  1.1 {
 696               throw CimException(CimException::NOT_SUPPORTED);
 697           }
 698           
 699 mike  1.7 Array<CIMClass> Repository::enumerateClasses(
 700 mike  1.1     const String& nameSpace,
 701               const String& className,
 702               Boolean deepInheritance,
 703               Boolean localOnly,
 704               Boolean includeQualifiers,
 705               Boolean includeClassOrigin)
 706           {
 707               Array<String> classNames = 
 708           	enumerateClassNames(nameSpace, className, deepInheritance);
 709           
 710 mike  1.7     Array<CIMClass> result;
 711 mike  1.1 
 712               for (Uint32 i = 0; i < classNames.getSize(); i++)
 713               {
 714           	result.append(getClass(nameSpace, classNames[i], localOnly, 
 715           	    includeQualifiers, includeClassOrigin));
 716               }
 717           
 718               return result;
 719           }
 720           
 721           Array<String> Repository::enumerateClassNames(
 722               const String& nameSpace,
 723               const String& className,
 724               Boolean deepInheritance)
 725           {
 726               // Build the path to the classes directory:
 727           
 728               const char CLASSES[] = "/classes/";
 729               String path;
 730               _MakeNameSpacePath(_root, nameSpace, path);
 731               path.append(CLASSES);
 732 mike  1.1 
 733               if (!FileSystem::isDirectory(path))
 734           	throw CimException(CimException::INVALID_NAMESPACE);
 735           
 736               if (deepInheritance)
 737               {
 738           	if (className == String::EMPTY)
 739           	{
 740           	    Array<String> classNames;
 741           	    _AppendSubclassesDeep(path, String(), classNames);
 742           	    return classNames;
 743           	}
 744           	else
 745           	{
 746           	    Array<String> classNames;
 747           	    _AppendSubclassesDeep(path, className, classNames);
 748           	    return classNames;
 749           	}
 750               }
 751               else
 752               {
 753 mike  1.1 	if (className == String::EMPTY)
 754           	{
 755           	    Array<String> classNames;
 756           	    _AppendClassNames(path, "*", "#", classNames);
 757           	    return classNames;
 758           	}
 759           	else
 760           	{
 761           	    Array<String> classNames;
 762           	    _AppendClassNames(path, "*", className, classNames);
 763           	    return classNames;
 764           	}
 765               }
 766           
 767               // Unreachable:
 768               return Array<String>();
 769           }
 770           
 771 mike  1.7 Array<CIMInstance> Repository::enumerateInstances(
 772 mike  1.1     const String& nameSpace,
 773               const String& className,
 774               Boolean deepInheritance,
 775               Boolean localOnly,
 776               Boolean includeQualifiers,
 777               Boolean includeClassOrigin,
 778               const Array<String>& propertyList)
 779           { 
 780               throw CimException(CimException::NOT_SUPPORTED);
 781 mike  1.7     return Array<CIMInstance>();
 782 mike  1.1 }
 783           
 784 mike  1.7 Array<CIMReference> Repository::enumerateInstanceNames(
 785 mike  1.1     const String& nameSpace,
 786               const String& className) 
 787           { 
 788               throw CimException(CimException::NOT_SUPPORTED);
 789 mike  1.7     return Array<CIMReference>();
 790 mike  1.1 }
 791           
 792 mike  1.7 Array<CIMInstance> Repository::execQuery(
 793 mike  1.1     const String& queryLanguage,
 794               const String& query) 
 795           { 
 796               throw CimException(CimException::NOT_SUPPORTED);
 797 mike  1.7     return Array<CIMInstance>();
 798 mike  1.1 }
 799           
 800 mike  1.7 Array<CIMInstance> Repository::associators(
 801 mike  1.1     const String& nameSpace,
 802 mike  1.7     const CIMReference& objectName,
 803 mike  1.1     const String& assocClass,
 804               const String& resultClass,
 805               const String& role,
 806               const String& resultRole,
 807               Boolean includeQualifiers,
 808               Boolean includeClassOrigin,
 809               const Array<String>& propertyList)
 810           {
 811               throw CimException(CimException::NOT_SUPPORTED);
 812 mike  1.7     return Array<CIMInstance>();
 813 mike  1.1 }
 814           
 815 mike  1.7 Array<CIMReference> Repository::associatorNames(
 816 mike  1.1     const String& nameSpace,
 817 mike  1.7     const CIMReference& objectName,
 818 mike  1.1     const String& assocClass,
 819               const String& resultClass,
 820               const String& role,
 821               const String& resultRole)
 822           { 
 823               throw CimException(CimException::NOT_SUPPORTED);
 824 mike  1.7     return Array<CIMReference>();
 825 mike  1.1 }
 826           
 827 mike  1.7 Array<CIMInstance> Repository::references(
 828 mike  1.1     const String& nameSpace,
 829 mike  1.7     const CIMReference& objectName,
 830 mike  1.1     const String& resultClass,
 831               const String& role,
 832               Boolean includeQualifiers,
 833               Boolean includeClassOrigin,
 834               const Array<String>& propertyList)
 835           {
 836               throw CimException(CimException::NOT_SUPPORTED);
 837 mike  1.7     return Array<CIMInstance>();
 838 mike  1.1 }
 839           
 840 mike  1.7 Array<CIMReference> Repository::referenceNames(
 841 mike  1.1     const String& nameSpace,
 842 mike  1.7     const CIMReference& objectName,
 843 mike  1.1     const String& resultClass,
 844               const String& role)
 845           { 
 846               throw CimException(CimException::NOT_SUPPORTED);
 847 mike  1.7     return Array<CIMReference>();
 848 mike  1.1 }
 849           
 850 mike  1.7 CIMValue Repository::getProperty(
 851 mike  1.1     const String& nameSpace,
 852 mike  1.7     const CIMReference& instanceName,
 853 mike  1.1     const String& propertyName) 
 854           { 
 855               throw CimException(CimException::NOT_SUPPORTED);
 856 mike  1.7     return CIMValue();
 857 mike  1.1 }
 858           
 859           void Repository::setProperty(
 860               const String& nameSpace,
 861 mike  1.7     const CIMReference& instanceName,
 862 mike  1.1     const String& propertyName,
 863 mike  1.7     const CIMValue& newValue)
 864 mike  1.1 { 
 865               throw CimException(CimException::NOT_SUPPORTED);
 866           }
 867           
 868 mike  1.7 CIMQualifierDecl Repository::getQualifier(
 869 mike  1.1     const String& nameSpace,
 870               const String& qualifierName) 
 871           {
 872               // Form the path of the qualifier file:
 873           
 874               String path;
 875               _MakeQualfierPath(_root, nameSpace, qualifierName, path);
 876           
 877               // If it does not exist:
 878           
 879 mike  1.5     String realPath;
 880           
 881               if (!FileSystem::existsIgnoreCase(path, realPath))
 882 mike  1.1 	throw CimException(CimException::NOT_FOUND);
 883           
 884               // Load the qualifier:
 885           
 886 mike  1.7     CIMQualifierDecl qualifierDecl;
 887 mike  1.5     _LoadObject(realPath, qualifierDecl);
 888           
 889               // Return the qualifier:
 890 mike  1.1 
 891 mike  1.7     return CIMQualifierDecl(qualifierDecl);
 892 mike  1.1 }
 893           
 894           void Repository::setQualifier(
 895               const String& nameSpace,
 896 mike  1.7     const CIMQualifierDecl& qualifierDecl) 
 897 mike  1.1 {
 898               // Form the path of the qualifier:
 899           
 900               String path;
 901               _MakeQualfierPath(_root, nameSpace, qualifierDecl.getName(), path);
 902           
 903               // If the qualifier already exists, delete it:
 904           
 905 mike  1.5     String realPath;
 906           
 907               if (FileSystem::existsIgnoreCase(path, realPath))
 908 mike  1.1     {
 909 mike  1.5 	if (!FileSystem::removeFile(realPath))
 910 mike  1.1 	    throw FailedToRemoveDirectory(path);
 911               }
 912 mike  1.5     else
 913           	realPath = path;
 914 mike  1.1 
 915               // Write the qualifier to file:
 916           
 917 mike  1.5     _SaveObject(realPath, qualifierDecl);
 918 mike  1.1 }
 919           
 920           void Repository::deleteQualifier(
 921               const String& nameSpace,
 922               const String& qualifierName) 
 923           {
 924               String path;
 925               _MakeQualfierPath(_root, nameSpace, qualifierName, path);
 926           
 927 mike  1.5     String realPath;
 928           
 929               if (!FileSystem::existsIgnoreCase(path, realPath))
 930 mike  1.1 	throw CimException(CimException::NOT_FOUND);
 931           
 932 mike  1.5     if (!FileSystem::removeFile(realPath))
 933 mike  1.1 	throw FailedToRemoveFile(path);
 934           }
 935           
 936 mike  1.7 Array<CIMQualifierDecl> Repository::enumerateQualifiers(
 937 mike  1.1     const String& nameSpace)
 938           {
 939               // Build the path to the qualifiers directory:
 940           
 941               const char QUALIFIERS[] = "/qualifiers/";
 942               String path;
 943               _MakeNameSpacePath(_root, nameSpace, path);
 944               path.append(QUALIFIERS);
 945           
 946               if (!FileSystem::isDirectory(path))
 947           	throw CimException(CimException::INVALID_NAMESPACE);
 948           
 949               // Get the names of the qualifiers:
 950           
 951               Array<String> qualifierNames;
 952           
 953               if (!FileSystem::getDirectoryContents(path, qualifierNames))
 954           	throw NoSuchDirectory(path);
 955           
 956               // Load each qualifier into the result array:
 957           
 958 mike  1.7     Array<CIMQualifierDecl> result;
 959 mike  1.1 
 960               for (Uint32 i = 0, n = qualifierNames.getSize(); i < n; i++)
 961               {
 962 mike  1.7 	CIMQualifierDecl tmp = getQualifier(nameSpace, qualifierNames[i]);
 963 mike  1.1 	result.append(tmp);
 964               }
 965           
 966               return result;
 967           }
 968           
 969 mike  1.7 CIMValue Repository::invokeMethod(
 970 mike  1.1     const String& nameSpace,
 971 mike  1.7     const CIMReference& instanceName,
 972 mike  1.1     const String& methodName,
 973 mike  1.7     const Array<CIMValue>& inParameters,
 974               Array<CIMValue>& outParameters) 
 975 mike  1.1 {
 976               throw CimException(CimException::NOT_SUPPORTED);
 977 mike  1.7     return CIMValue();
 978 mike  1.1 }
 979           
 980           ////////////////////////////////////////////////////////////////////////////////
 981           //
 982           // New methods
 983           //
 984           ////////////////////////////////////////////////////////////////////////////////
 985           
 986           void Repository::createNameSpace(const String& nameSpace)
 987           {
 988               String path;
 989               _MakeNameSpacePath(_root, nameSpace, path);
 990           
 991               if (FileSystem::exists(path))
 992           	throw AlreadyExists(nameSpace);
 993           
 994               if (!FileSystem::makeDirectory(path))
 995           	throw CannotCreateDirectory(path);
 996           
 997               // Create "./qualifiers" directory:
 998           
 999 mike  1.1     String qualifiersDir = path;
1000               qualifiersDir.append("/qualifiers");
1001           
1002               if (!FileSystem::makeDirectory(qualifiersDir))
1003           	throw CannotCreateDirectory(qualifiersDir);
1004           
1005               // Create "./classes" directory:
1006           
1007               String classesDir = path;
1008               classesDir.append("/classes");
1009           
1010               if (!FileSystem::makeDirectory(classesDir))
1011           	throw CannotCreateDirectory(classesDir);
1012           
1013               // Create "./instances" directory:
1014           
1015               String instancesDir = path;
1016               instancesDir.append("/instances");
1017           
1018               if (!FileSystem::makeDirectory(instancesDir))
1019           	throw CannotCreateDirectory(instancesDir);
1020 mike  1.1 }
1021           
1022           Array<String> Repository::enumerateNameSpaces() const
1023           {
1024               Array<String> result;
1025           
1026               if (!FileSystem::getDirectoryContents(_root, result))
1027           	throw NoSuchDirectory(_root);
1028           
1029               for (Uint32 i = 0, n = result.getSize(); i < n; i++)
1030               {
1031           	const String& tmp = result[i];
1032           
1033           	for (Char16* p = (Char16*)tmp.getData(); *p; p++)
1034           	{
1035           	    if (*p == '#')
1036           		*p = '/';
1037           	}
1038               }
1039           
1040               return result;
1041 mike  1.3 }
1042           
1043           // Recall flavor defaults: TOSUBCLASS | OVERRIDABLE
1044           
1045           void Repository::createMetaQualifiers(const String& nameSpace)
1046           {
1047 mike  1.7     // CIMQualifier CimType : string = null, 
1048               //     CIMScope(property, parameter)
1049 mike  1.3 
1050 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("cimtype", String(),
1051           	CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::PARAMETER));
1052 mike  1.3 
1053 mike  1.7     // CIMQualifier id : sint32 = null, 
1054               //     CIMScope(any), 
1055               //     CIMFlavor(toinstance)
1056 mike  1.3 
1057 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("id", Sint32(0),
1058           	CIMScope::ANY,
1059           	CIMFlavor::TOINSTANCE));
1060 mike  1.3 
1061 mike  1.7     // CIMQualifier OctetString : boolean = false, CIMScope(property)
1062 mike  1.3 
1063 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("octetstring", false,
1064           	CIMScope::PROPERTY));
1065 mike  1.3     
1066 mike  1.7     // CIMQualifier Abstract : boolean = false, 
1067               //     CIMScope(class, association, indication),
1068               //     CIMFlavor(disableoverride, restricted);
1069 mike  1.3 
1070 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("abstract", false, 
1071           	CIMScope::CLASS | CIMScope::ASSOCIATION | CIMScope::INDICATION,
1072           	CIMFlavor::NONE));
1073 mike  1.3 
1074 mike  1.7     // CIMQualifier Aggregate : boolean = false, 
1075               //    CIMScope(reference),
1076               //    CIMFlavor(disableoverride, tosubclass);
1077 mike  1.3 
1078 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("aggregate", false, 
1079           	CIMScope::REFERENCE, CIMFlavor::TOSUBCLASS));
1080 mike  1.3 
1081 mike  1.7     // CIMQualifier Aggregation : boolean = false, 
1082               //     CIMScope(association),
1083               //     CIMFlavor(disableoverride, tosubclass);
1084 mike  1.3 
1085 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("aggregation", false, 
1086           	CIMScope::ASSOCIATION, CIMFlavor::TOSUBCLASS));
1087 mike  1.3 
1088 mike  1.7     // CIMQualifier Alias : string = null, 
1089               //     CIMScope(property, reference, method), 
1090               //     CIMFlavor(translatable);
1091 mike  1.3 
1092 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("alias", String(),
1093           	CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::METHOD,
1094           	CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE));
1095 mike  1.3 
1096 mike  1.7     // CIMQualifier ArrayType : string = "Bag", 
1097               //     CIMScope(property, parameter);
1098 mike  1.3 
1099 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("arraytype", "Bag",
1100           	CIMScope::PROPERTY | CIMScope::PARAMETER));
1101 mike  1.3 
1102 mike  1.7     // CIMQualifier Association : boolean = false, 
1103               //     CIMScope(class, association),
1104               //     CIMFlavor(disableoverride);
1105 mike  1.3 
1106 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("association", false,
1107           	CIMScope::CLASS | CIMScope::ASSOCIATION,
1108           	CIMFlavor::TOSUBCLASS));
1109 mike  1.3 
1110 mike  1.7     // CIMQualifier BitMap : string[], 
1111               //     CIMScope(property, method, parameter);
1112 mike  1.3 
1113 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("bitmap", Array<String>(),
1114           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER));
1115 mike  1.3 
1116 mike  1.7     // CIMQualifier BitValues : string[], 
1117               //     CIMScope(property, method, parameter),
1118               //     CIMFlavor(Translatable);
1119 mike  1.3 
1120 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("bitvalues", Array<String>(),
1121           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER,
1122           	CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE));
1123 mike  1.3 
1124 mike  1.7     // CIMQualifier Counter : boolean = false, 
1125               //     CIMScope(property, method, parameter);
1126 mike  1.3 
1127 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("counter", false,
1128           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER));
1129 mike  1.3 
1130 mike  1.7     // CIMQualifier Delete : boolean = false, 
1131               //     CIMScope(association, reference);
1132 mike  1.3 
1133 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("delete", false,
1134           	CIMScope::ASSOCIATION | CIMScope::REFERENCE));
1135 mike  1.3 
1136 mike  1.7     // CIMQualifier Description : string = null, 
1137               //     CIMScope(any), 
1138               //     CIMFlavor(translatable);
1139 mike  1.3 
1140 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("description", String(),
1141           	CIMScope::ANY, 
1142           	CIMFlavor::TRANSLATABLE));
1143 mike  1.3 
1144 mike  1.7     // CIMQualifier DisplayName : string = null, 
1145               //     CIMScope(any), 
1146               //     CIMFlavor(translatable);
1147 mike  1.3 
1148 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("displayname", String(),
1149           	CIMScope::ANY,
1150           	CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE));
1151 mike  1.3 
1152 mike  1.7     // CIMQualifier Expensive : boolean = false,
1153               //     CIMScope(property, reference, method, class, association);
1154 mike  1.3 
1155 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("expensive", false,
1156           	CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::METHOD | CIMScope::CLASS |
1157           	CIMScope::ASSOCIATION));
1158 mike  1.3 
1159 mike  1.7     // CIMQualifier Gauge : boolean = false, 
1160               //     CIMScope(property, method, parameter);
1161 mike  1.3 
1162 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("gauge", false,
1163           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER));
1164 mike  1.3 
1165 mike  1.7     // CIMQualifier Ifdeleted : boolean = false, 
1166               //     CIMScope(association, reference);
1167 mike  1.3 
1168 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("ifdeleted", false,
1169           	CIMScope::ASSOCIATION | CIMScope::REFERENCE));
1170 mike  1.3 
1171 mike  1.7     // CIMQualifier In : boolean = true, 
1172               //     CIMScope(parameter), 
1173               //     CIMFlavor(disableoverride);
1174 mike  1.3 
1175 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("in", true,
1176           	CIMScope::PARAMETER,
1177           	CIMFlavor::TOSUBCLASS));
1178 mike  1.3 
1179 mike  1.7     // CIMQualifier Indication : boolean = false, 
1180               //     CIMScope(class, indication),
1181               //     CIMFlavor(disableoverride);
1182 mike  1.3 
1183 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("indication", false,
1184           	CIMScope::CLASS | CIMScope::INDICATION,
1185           	CIMFlavor::TOSUBCLASS));
1186 mike  1.3 
1187 mike  1.7     // CIMQualifier Invisible : boolean = false,
1188               //     CIMScope(reference, association, class, property, method);
1189 mike  1.3 
1190 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("invisible", false,
1191           	CIMScope::REFERENCE | CIMScope::ASSOCIATION | CIMScope::CLASS | CIMScope::PROPERTY |
1192           	CIMScope::METHOD));
1193 mike  1.3 
1194 mike  1.7     // CIMQualifier Key : boolean = false, 
1195               //     CIMScope(property, reference),
1196               //     CIMFlavor(disableoverride);
1197 mike  1.3 
1198 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("key", false,
1199           	CIMScope::PROPERTY | CIMScope::REFERENCE,
1200           	CIMFlavor::TOSUBCLASS));
1201 mike  1.3 
1202 mike  1.7     // CIMQualifier Large : boolean = false, 
1203               //     CIMScope(property, class);
1204 mike  1.3 
1205 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("large", false,
1206           	CIMScope::PROPERTY | CIMScope::CLASS));
1207 mike  1.3 
1208 mike  1.7     // CIMQualifier MappingStrings : string[],
1209               //     CIMScope(class, property, association, indication, reference);
1210 mike  1.3 
1211 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("mappingstrings", Array<String>(),
1212           	CIMScope::CLASS | CIMScope::PROPERTY | CIMScope::ASSOCIATION | 
1213           	CIMScope::INDICATION | CIMScope::REFERENCE));
1214 mike  1.3 
1215 mike  1.7     // CIMQualifier Max : uint32 = null, CIMScope(reference);
1216 mike  1.3 
1217 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("max", Sint32(0),
1218           	CIMScope::PROPERTY | CIMScope::REFERENCE));
1219 mike  1.3 
1220 mike  1.7     // CIMQualifier MaxLen : uint32 = null, 
1221               //     CIMScope(property, method, parameter);
1222 mike  1.3 
1223           #if 0
1224 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("maxlen", Uint32(0),
1225           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER));
1226 mike  1.3 #else
1227 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("maxlen", Sint32(0),
1228           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER));
1229 mike  1.3 #endif
1230           
1231 mike  1.7     // CIMQualifier MaxValue : sint64 = null, 
1232               //     CIMScope(property, method, parameter);
1233 mike  1.3     // ATTN: XML schema requires sint32!
1234           
1235 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("maxvalue", Sint32(0),
1236           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER));
1237 mike  1.3     
1238 mike  1.7     // CIMQualifier Min : sint32 = null, CIMScope(reference);
1239 mike  1.3 
1240 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("min", Sint32(0),
1241           	CIMScope::REFERENCE));
1242 mike  1.3 
1243 mike  1.7     // CIMQualifier MinValue : sint64 = null, 
1244               //     CIMScope(property, method, parameter);
1245               // ATTN: CIMType expected by XML spec is sint32!
1246 mike  1.3 
1247 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("minvalue", Sint32(0),
1248           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER));
1249 mike  1.3 
1250 mike  1.7     // CIMQualifier ModelCorrespondence : string[], 
1251               //     CIMScope(property);
1252 mike  1.3 
1253 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("modelcorrespondence", 
1254 mike  1.3 	Array<String>(),
1255 mike  1.7 	CIMScope::PROPERTY));
1256 mike  1.3 
1257 mike  1.7     // CIMQualifier NonLocal : string = null, 
1258               //     CIMScope(reference);
1259 mike  1.3 
1260 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("nonlocal", String(),
1261           	CIMScope::REFERENCE));
1262 mike  1.3 
1263 mike  1.7     // CIMQualifier NullValue : string = null, 
1264               //     CIMScope(property),
1265               //     CIMFlavor(tosubclass, disableoverride);
1266 mike  1.3 
1267 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("nullvalue", String(),
1268           	CIMScope::PROPERTY,
1269           	CIMFlavor::TOSUBCLASS));
1270 mike  1.3 
1271 mike  1.7     // CIMQualifier Out : boolean = false, 
1272               //     CIMScope(parameter), 
1273               //     CIMFlavor(disableoverride);
1274 mike  1.3 
1275 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("out", false,
1276           	CIMScope::PARAMETER,
1277           	CIMFlavor::TOSUBCLASS));
1278 mike  1.3 
1279 mike  1.7     // CIMQualifier Override : string = null, 
1280               //     CIMScope(property, method, reference),
1281               //     CIMFlavor(disableoverride);
1282 mike  1.3 
1283 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("override", String(),
1284           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::REFERENCE,
1285           	CIMFlavor::TOSUBCLASS));
1286 mike  1.3 
1287 mike  1.7     // CIMQualifier Propagated : string = null, 
1288               //     CIMScope(property, reference),
1289               //     CIMFlavor(disableoverride);
1290 mike  1.3 
1291 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("propagated", String(),
1292           	CIMScope::PROPERTY | CIMScope::REFERENCE,
1293           	CIMFlavor::TOSUBCLASS));
1294 mike  1.3 
1295 mike  1.7     // CIMQualifier Provider : string = null, 
1296               //     CIMScope(any);
1297 mike  1.3 
1298 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("provider", String(),
1299           	CIMScope::ANY));
1300 mike  1.3 
1301 mike  1.7     // CIMQualifier Read : boolean = true, CIMScope(property);
1302 mike  1.3 
1303 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("read", true,
1304           	CIMScope::PROPERTY));
1305 mike  1.3 
1306 mike  1.7     // CIMQualifier Required : boolean = false, 
1307               //     CIMScope(property);
1308 mike  1.3 
1309 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("required", false,
1310           	CIMScope::PROPERTY));
1311 mike  1.3 
1312 mike  1.7     // CIMQualifier Revision : string = null,
1313               //     CIMScope(schema, class, association, indication),
1314               //     CIMFlavor(translatable);
1315               // ATTN: No such scope as CIMScope::SCHEMA
1316 mike  1.3 
1317 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("revision", String(),
1318           	CIMScope::CLASS | CIMScope::ASSOCIATION | CIMScope::INDICATION,
1319           	CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE));
1320 mike  1.3 
1321 mike  1.7     // CIMQualifier Schema : string = null, 
1322               //     CIMScope(property, method),
1323               //     CIMFlavor(disableoverride, translatable);
1324 mike  1.3 
1325 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("schema", String(),
1326           	CIMScope::PROPERTY | CIMScope::METHOD,
1327           	CIMFlavor::TOSUBCLASS | CIMFlavor::TRANSLATABLE));
1328 mike  1.3 
1329 mike  1.7     // CIMQualifier Source : string = null, 
1330               //     CIMScope(class, association, indication);
1331 mike  1.3 
1332 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("source", String(),
1333           	CIMScope::CLASS | CIMScope::ASSOCIATION | CIMScope::INDICATION));
1334 mike  1.3 
1335 mike  1.7     // CIMQualifier SourceType : string = null,
1336               //     CIMScope(class, association, indication,reference);
1337 mike  1.3 
1338 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("sourcetype", String(),
1339           	CIMScope::CLASS | CIMScope::ASSOCIATION | CIMScope:: INDICATION |
1340           	CIMScope::REFERENCE));
1341 mike  1.3     
1342 mike  1.7     // CIMQualifier Static : boolean = false,
1343               //     CIMScope(property, method), CIMFlavor(disableoverride);
1344 mike  1.3 
1345 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("static", false,
1346           	CIMScope::PROPERTY | CIMScope::METHOD,
1347           	CIMFlavor::TOSUBCLASS));
1348 mike  1.3 
1349 mike  1.7     // CIMQualifier Syntax : string = null,
1350               //     CIMScope(property, reference, method, parameter);
1351 mike  1.3 
1352 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("syntax", String(),
1353           	CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::METHOD | CIMScope::PARAMETER));
1354 mike  1.3 
1355 mike  1.7     // CIMQualifier SyntaxType : string = null,
1356               //     CIMScope(property, reference, method, parameter);
1357 mike  1.3 
1358 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("syntaxtype", String(),
1359           	CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::METHOD | CIMScope::PARAMETER));
1360 mike  1.3 
1361 mike  1.7     // CIMQualifier Terminal : boolean = false, 
1362               //     CIMScope(class);
1363 mike  1.3 
1364 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("terminal", false,
1365           	CIMScope::CLASS));
1366 mike  1.3 
1367 mike  1.7     // CIMQualifier TriggerType : string = null,
1368               //     CIMScope(class, property, reference, method, association, indication);
1369 mike  1.3 
1370 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("triggertype", String(),
1371           	CIMScope::CLASS | CIMScope::PROPERTY | CIMScope::REFERENCE | CIMScope::METHOD |
1372           	CIMScope::ASSOCIATION | CIMScope::INDICATION));
1373 mike  1.3 
1374 mike  1.7     // CIMQualifier Units : string = null, 
1375               //     CIMScope(property, method, parameter),
1376               //     CIMFlavor(translatable);
1377 mike  1.3 
1378 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("units", String(),
1379           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER,
1380           	CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE));
1381 mike  1.3 
1382 mike  1.7     // CIMQualifier UnknownValues : string[], 
1383               //     CIMScope(property), 
1384               //     CIMFlavor(disableoverride, tosubclass);
1385 mike  1.3 
1386 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("unknownvalues", Array<String>(),
1387           	CIMScope::PROPERTY,
1388           	CIMFlavor::TOSUBCLASS));
1389 mike  1.3 
1390 mike  1.7     // CIMQualifier UnsupportedValues : string[], 
1391               //     CIMScope(property),
1392               //     CIMFlavor(disableoverride, tosubclass);
1393 mike  1.3 
1394 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("unsupportedvalues", Array<String>(),
1395           	CIMScope::PROPERTY,
1396           	CIMFlavor::TOSUBCLASS));
1397 mike  1.3 
1398 mike  1.7     // CIMQualifier ValueMap : string[], 
1399               //     CIMScope(property, method, parameter);
1400 mike  1.3 
1401 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("valuemap", Array<String>(),
1402           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER));
1403 mike  1.3 
1404 mike  1.7     // CIMQualifier Values : string[], 
1405               //     CIMScope(property, method, parameter),
1406               //     CIMFlavor(translatable);
1407 mike  1.3 
1408 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("values", Array<String>(),
1409           	CIMScope::PROPERTY | CIMScope::METHOD | CIMScope::PARAMETER,
1410           	CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE));
1411 mike  1.3 
1412 mike  1.7     // CIMQualifier Version : string = null,
1413               //     CIMScope(schema, class, association, indication), 
1414               //     CIMFlavor(translatable);
1415               // ATTN: No such scope as CIMScope::SCHEMA
1416 mike  1.3 
1417 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("version", String(),
1418           	CIMScope::CLASS | CIMScope::ASSOCIATION | CIMScope::INDICATION,
1419           	CIMFlavor::DEFAULTS | CIMFlavor::TRANSLATABLE));
1420 mike  1.3 
1421 mike  1.7     // CIMQualifier Weak : boolean = false, 
1422               //     CIMScope(reference),
1423               //     CIMFlavor(disableoverride, tosubclass);
1424 mike  1.3 
1425 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("weak", false,
1426           	CIMScope::REFERENCE,
1427           	CIMFlavor::TOSUBCLASS));
1428 mike  1.3 
1429 mike  1.7     // CIMQualifier Write : boolean = false, 
1430               //     CIMScope(property);
1431 mike  1.3 
1432 mike  1.7     setQualifier(nameSpace, CIMQualifierDecl("write", false,
1433           	CIMScope::PROPERTY));
1434 mike  1.1 }
1435           
1436           PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2