1/* 2 * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkData 19 */ 20 21/** 22 * Provides methods for uniform data type definition and query. 23 * 24 * @namespace uniformTypeDescriptor 25 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 26 * @since 10 27 */ 28/** 29 * Provides methods for uniform data type definition and query. 30 * 31 * @namespace uniformTypeDescriptor 32 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 33 * @atomicservice 34 * @since 11 35 */ 36/** 37 * Provides methods for uniform data type definition and query. 38 * 39 * @namespace uniformTypeDescriptor 40 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 41 * @crossplatform 42 * @atomicservice 43 * @since 14 44 */ 45declare namespace uniformTypeDescriptor { 46 /** 47 * Uniform data type IDs. 48 * 49 * @enum { string } 50 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 51 * @since 10 52 */ 53 /** 54 * Uniform data type IDs. 55 * 56 * @enum { string } 57 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 58 * @atomicservice 59 * @since 11 60 */ 61 /** 62 * Uniform data type IDs. 63 * 64 * @enum { string } 65 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 66 * @crossplatform 67 * @atomicservice 68 * @since 14 69 */ 70 enum UniformDataType { 71 /** 72 * Base data type for physical hierarchy, which identifies the physical representation of the data type. 73 * 74 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 75 * @since 11 76 */ 77 ENTITY = 'general.entity', 78 79 /** 80 * Base data type for logical hierarchy, which identifies the logical content representation of the data type. 81 * 82 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 83 * @since 11 84 */ 85 OBJECT = 'general.object', 86 87 /** 88 * Base data type for mixed object. For example, a PDF file contains both text and special formatting data. 89 * 90 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 91 * @since 11 92 */ 93 COMPOSITE_OBJECT = 'general.composite-object', 94 95 /** 96 * Text data type. 97 * 98 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 99 * @since 10 100 */ 101 /** 102 * Text data type. 103 * 104 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 105 * @atomicservice 106 * @since 11 107 */ 108 /** 109 * Text data type. 110 * 111 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 112 * @crossplatform 113 * @atomicservice 114 * @since 14 115 */ 116 TEXT = 'general.text', 117 118 /** 119 * Plain text data type. 120 * 121 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 122 * @since 10 123 */ 124 /** 125 * Plain text data type. 126 * 127 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 128 * @atomicservice 129 * @since 11 130 */ 131 /** 132 * Plain text data type. 133 * 134 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 135 * @crossplatform 136 * @atomicservice 137 * @since 14 138 */ 139 PLAIN_TEXT = 'general.plain-text', 140 141 /** 142 * HTML data type. 143 * 144 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 145 * @since 10 146 */ 147 /** 148 * HTML data type. 149 * 150 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 151 * @atomicservice 152 * @since 11 153 */ 154 /** 155 * HTML data type. 156 * 157 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 158 * @crossplatform 159 * @atomicservice 160 * @since 14 161 */ 162 HTML = 'general.html', 163 164 /** 165 * Hyperlink data type. 166 * 167 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 168 * @since 10 169 */ 170 /** 171 * Hyperlink data type. 172 * 173 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 174 * @atomicservice 175 * @since 11 176 */ 177 /** 178 * Hyperlink data type. 179 * 180 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 181 * @crossplatform 182 * @atomicservice 183 * @since 14 184 */ 185 HYPERLINK = 'general.hyperlink', 186 187 /** 188 * XML(Extensible Markup Language) data type. 189 * 190 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 191 * @since 11 192 */ 193 XML = 'general.xml', 194 195 /** 196 * Xhtml data type. 197 * 198 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 199 * @since 12 200 */ 201 XHTML = 'general.xhtml', 202 203 /** 204 * Rss data type. 205 * 206 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 207 * @since 12 208 */ 209 RSS = 'general.rss', 210 211 /** 212 * Real synchronized multimedia integration language. 213 * 214 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 215 * @since 12 216 */ 217 SMIL = 'com.real.smil', 218 219 /** 220 * Source code data type. 221 * 222 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 223 * @since 11 224 */ 225 SOURCE_CODE = 'general.source-code', 226 227 /** 228 * Script data type. 229 * 230 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 231 * @since 11 232 */ 233 SCRIPT = 'general.script', 234 235 /** 236 * Shell script data type. 237 * 238 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 239 * @since 11 240 */ 241 SHELL_SCRIPT = 'general.shell-script', 242 243 /** 244 * C-shell script data type. 245 * 246 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 247 * @since 11 248 */ 249 CSH_SCRIPT = 'general.csh-script', 250 251 /** 252 * Perl script data type. 253 * 254 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 255 * @since 11 256 */ 257 PERL_SCRIPT = 'general.perl-script', 258 259 /** 260 * PHP script data type. 261 * 262 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 263 * @since 11 264 */ 265 PHP_SCRIPT = 'general.php-script', 266 267 /** 268 * Python script data type. 269 * 270 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 271 * @since 11 272 */ 273 PYTHON_SCRIPT = 'general.python-script', 274 275 /** 276 * Ruby script data type. 277 * 278 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 279 * @since 11 280 */ 281 RUBY_SCRIPT = 'general.ruby-script', 282 283 /** 284 * TypeScript data type. 285 * 286 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 287 * @since 11 288 */ 289 TYPE_SCRIPT = 'general.type-script', 290 291 /** 292 * JavaScript data type. 293 * 294 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 295 * @since 11 296 */ 297 JAVA_SCRIPT = 'general.java-script', 298 299 /** 300 * Css data type. 301 * 302 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 303 * @since 12 304 */ 305 CSS = 'general.css', 306 307 /** 308 * C header data type. 309 * 310 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 311 * @since 11 312 */ 313 C_HEADER = 'general.c-header', 314 315 /** 316 * C source code data type. 317 * 318 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 319 * @since 11 320 */ 321 C_SOURCE = 'general.c-source', 322 323 /** 324 * C++ header data type. 325 * 326 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 327 * @since 11 328 */ 329 C_PLUS_PLUS_HEADER = 'general.c-plus-plus-header', 330 331 /** 332 * C++ source code data type. 333 * 334 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 335 * @since 11 336 */ 337 C_PLUS_PLUS_SOURCE = 'general.c-plus-plus-source', 338 339 /** 340 * Java source code data type. 341 * 342 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 343 * @since 11 344 */ 345 JAVA_SOURCE = 'general.java-source', 346 347 /** 348 * Tex source code data type. 349 * 350 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 351 * @since 12 352 */ 353 TEX = 'general.tex', 354 355 /** 356 * Markdown format. 357 * 358 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 359 * @since 12 360 */ 361 MARKDOWN = 'general.markdown', 362 363 /** 364 * Asc text data type. 365 * 366 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 367 * @since 12 368 */ 369 ASC_TEXT = 'general.asc-text', 370 371 /** 372 * Rich text data type. 373 * 374 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 375 * @since 12 376 */ 377 RICH_TEXT = 'general.rich-text', 378 379 /** 380 * Delimited values text data type. 381 * 382 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 383 * @since 12 384 */ 385 DELIMITED_VALUES_TEXT = 'general.delimited-values-text', 386 387 /** 388 * Comma separated values text data type. 389 * 390 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 391 * @since 12 392 */ 393 COMMA_SEPARATED_VALUES_TEXT = 'general.comma-separated-values-text', 394 395 /** 396 * Tab separated values text data type. 397 * 398 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 399 * @since 12 400 */ 401 TAB_SEPARATED_VALUES_TEXT = 'general.tab-separated-values-text', 402 403 /** 404 * Ebook data type. 405 * 406 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 407 * @since 11 408 */ 409 EBOOK = 'general.ebook', 410 411 /** 412 * EPUB ebook file format data type. 413 * 414 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 415 * @since 11 416 */ 417 EPUB = 'general.epub', 418 419 /** 420 * AZW ebook file format data type. 421 * 422 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 423 * @since 11 424 */ 425 AZW = 'com.amazon.azw', 426 427 /** 428 * AZW3 ebook file format data type. 429 * 430 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 431 * @since 11 432 */ 433 AZW3 = 'com.amazon.azw3', 434 435 /** 436 * KFX ebook file format data type. 437 * 438 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 439 * @since 11 440 */ 441 KFX = 'com.amazon.kfx', 442 443 /** 444 * MOBI ebook file format data type. 445 * 446 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 447 * @since 11 448 */ 449 MOBI = 'com.amazon.mobi', 450 451 /** 452 * Media data type. 453 * 454 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 455 * @since 11 456 */ 457 MEDIA = 'general.media', 458 459 /** 460 * Image data type. 461 * 462 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 463 * @since 10 464 */ 465 /** 466 * Image data type. 467 * 468 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 469 * @atomicservice 470 * @since 11 471 */ 472 /** 473 * Image data type. 474 * 475 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 476 * @crossplatform 477 * @atomicservice 478 * @since 14 479 */ 480 IMAGE = 'general.image', 481 482 /** 483 * JPEG image format data type. 484 * 485 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 486 * @since 11 487 */ 488 JPEG = 'general.jpeg', 489 490 /** 491 * PNG image format data type. 492 * 493 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 494 * @since 11 495 */ 496 PNG = 'general.png', 497 498 /** 499 * Raw image format data type. 500 * 501 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 502 * @since 11 503 */ 504 RAW_IMAGE = 'general.raw-image', 505 506 /** 507 * TIFF image format data type. 508 * 509 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 510 * @since 11 511 */ 512 TIFF = 'general.tiff', 513 514 /** 515 * Windows bitmap image data type. 516 * 517 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 518 * @since 11 519 */ 520 BMP = 'com.microsoft.bmp', 521 522 /** 523 * Windows icon data type. 524 * 525 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 526 * @since 11 527 */ 528 ICO = 'com.microsoft.ico', 529 530 /** 531 * Adobe Photoshop document data type. 532 * 533 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 534 * @since 11 535 */ 536 PHOTOSHOP_IMAGE = 'com.adobe.photoshop-image', 537 538 /** 539 * Adobe Illustrator document data type. 540 * 541 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 542 * @since 11 543 */ 544 AI_IMAGE = 'com.adobe.illustrator.ai-image', 545 546 /** 547 * Base type for fax images. 548 * 549 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 550 * @since 12 551 */ 552 FAX = 'general.fax', 553 554 /** 555 * J2 jConnect fax file format. 556 * 557 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 558 * @since 12 559 */ 560 JFX_FAX = 'com.j2.jfx-fax', 561 562 /** 563 * The electronic fax document format. 564 * 565 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 566 * @since 12 567 */ 568 EFX_FAX = 'com.js.efx-fax', 569 570 /** 571 * X bitmap image. 572 * 573 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 574 * @since 12 575 */ 576 XBITMAP_IMAGE = 'general.xbitmap-image', 577 578 /** 579 * Gif image format data type. 580 * 581 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 582 * @since 12 583 */ 584 GIF = 'general.gif', 585 586 /** 587 * Tagged Graphics (TGA), a type of image format. 588 * 589 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 590 * @since 12 591 */ 592 TGA_IMAGE = 'com.truevision.tga-image', 593 594 /** 595 * Silicon Graphics image. 596 * 597 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 598 * @since 12 599 */ 600 SGI_IMAGE = 'com.sgi.sgi-image', 601 602 /** 603 * OpenEXR image. 604 * 605 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 606 * @since 12 607 */ 608 OPENEXR_IMAGE = 'com.ilm.openexr-image', 609 610 /** 611 * FlashPix image. 612 * 613 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 614 * @since 12 615 */ 616 FLASHPIX_IMAGE = 'com.kodak.flashpix.image', 617 618 /** 619 * Microsoft Word data type. 620 * 621 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 622 * @since 11 623 */ 624 WORD_DOC = 'com.microsoft.word.doc', 625 626 /** 627 * Microsoft Excel data type. 628 * 629 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 630 * @since 11 631 */ 632 EXCEL = 'com.microsoft.excel.xls', 633 634 /** 635 * Microsoft PowerPoint presentation data type. 636 * 637 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 638 * @since 11 639 */ 640 PPT = 'com.microsoft.powerpoint.ppt', 641 642 /** 643 * Microsoft Word dot data type. 644 * 645 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 646 * @since 12 647 */ 648 WORD_DOT = 'com.microsoft.word.dot', 649 650 /** 651 * Microsoft Powerpoint pps data type. 652 * 653 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 654 * @since 12 655 */ 656 POWERPOINT_PPS = 'com.microsoft.powerpoint.pps', 657 658 /** 659 * Microsoft Powerpoint pot data type. 660 * 661 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 662 * @since 12 663 */ 664 POWERPOINT_POT = 'com.microsoft.powerpoint.pot', 665 666 /** 667 * Microsoft Excel xlt data type. 668 * 669 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 670 * @since 12 671 */ 672 EXCEL_XLT = 'com.microsoft.excel.xlt', 673 674 /** 675 * Microsoft Visio vsd data type. 676 * 677 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 678 * @since 12 679 */ 680 VISIO_VSD = 'com.microsoft.visio.vsd', 681 682 /** 683 * PDF data type. 684 * 685 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 686 * @since 11 687 */ 688 PDF = 'com.adobe.pdf', 689 690 /** 691 * PostScript data type. 692 * 693 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 694 * @since 11 695 */ 696 POSTSCRIPT = 'com.adobe.postscript', 697 698 /** 699 * Encapsulated PostScript data type. 700 * 701 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 702 * @since 11 703 */ 704 ENCAPSULATED_POSTSCRIPT = 'com.adobe.encapsulated-postscript', 705 706 /** 707 * Video data type. 708 * 709 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 710 * @since 10 711 */ 712 /** 713 * Video data type. 714 * 715 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 716 * @atomicservice 717 * @since 11 718 */ 719 /** 720 * Video data type. 721 * 722 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 723 * @crossplatform 724 * @atomicservice 725 * @since 14 726 */ 727 VIDEO = 'general.video', 728 729 /** 730 * AVI video format data type. 731 * 732 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 733 * @since 11 734 */ 735 AVI = 'general.avi', 736 737 /** 738 * MPEG video format data type. 739 * 740 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 741 * @since 11 742 */ 743 MPEG = 'general.mpeg', 744 745 /** 746 * MPEG4 video format data type. 747 * 748 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 749 * @since 11 750 */ 751 MPEG4 = 'general.mpeg-4', 752 753 /** 754 * 3GPP video format data type. 755 * 756 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 757 * @since 11 758 */ 759 VIDEO_3GPP = 'general.3gpp', 760 761 /** 762 * 3GPP2 video format data type. 763 * 764 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 765 * @since 11 766 */ 767 VIDEO_3GPP2 = 'general.3gpp2', 768 769 /** 770 * Ts video format data type. 771 * 772 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 773 * @since 12 774 */ 775 TS = 'general.ts', 776 777 /** 778 * Mpegurl video format data type. 779 * 780 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 781 * @since 12 782 */ 783 MPEGURL_VIDEO = 'general.mpegurl-video', 784 785 /** 786 * Windows WM video format data type. 787 * 788 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 789 * @since 11 790 */ 791 WINDOWS_MEDIA_WM = 'com.microsoft.windows-media-wm', 792 793 /** 794 * Windows WMV video format data type. 795 * 796 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 797 * @since 11 798 */ 799 WINDOWS_MEDIA_WMV = 'com.microsoft.windows-media-wmv', 800 801 /** 802 * Windows WMP video format data type. 803 * 804 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 805 * @since 11 806 */ 807 WINDOWS_MEDIA_WMP = 'com.microsoft.windows-media-wmp', 808 809 /** 810 * Windows WVX video format data type. 811 * 812 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 813 * @since 11 814 */ 815 WINDOWS_MEDIA_WVX = 'com.microsoft.windows-media-wvx', 816 817 /** 818 * Windows WMX video format data type. 819 * 820 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 821 * @since 11 822 */ 823 WINDOWS_MEDIA_WMX = 'com.microsoft.windows-media-wmx', 824 825 /** 826 * RealMedia. 827 * 828 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 829 * @since 12 830 */ 831 REALMEDIA = 'com.real.realmedia', 832 833 /** 834 * Matroska video format data type. 835 * 836 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 837 * @since 12 838 */ 839 MATROSKA_VIDEO = 'org.matroska.mkv', 840 841 /** 842 * Flash data type. 843 * 844 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 845 * @since 12 846 */ 847 FLASH = 'com.adobe.flash', 848 849 /** 850 * Audio data type. 851 * 852 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 853 * @since 10 854 */ 855 /** 856 * Audio data type. 857 * 858 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 859 * @atomicservice 860 * @since 11 861 */ 862 /** 863 * Audio data type. 864 * 865 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 866 * @crossplatform 867 * @atomicservice 868 * @since 14 869 */ 870 AUDIO = 'general.audio', 871 872 /** 873 * AAC audio format data type. 874 * 875 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 876 * @since 11 877 */ 878 AAC = 'general.aac', 879 880 /** 881 * AIFF audio format data type. 882 * 883 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 884 * @since 11 885 */ 886 AIFF = 'general.aiff', 887 888 /** 889 * ALAC audio format data type. 890 * 891 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 892 * @since 11 893 */ 894 ALAC = 'general.alac', 895 896 /** 897 * FLAC audio format data type. 898 * 899 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 900 * @since 11 901 */ 902 FLAC = 'general.flac', 903 904 /** 905 * MP3 audio format data type. 906 * 907 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 908 * @since 11 909 */ 910 MP3 = 'general.mp3', 911 912 /** 913 * OGG audio format data type. 914 * 915 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 916 * @since 11 917 */ 918 OGG = 'general.ogg', 919 920 /** 921 * PCM audio format data type. 922 * 923 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 924 * @since 11 925 */ 926 PCM = 'general.pcm', 927 928 /** 929 * Windows WMA audio format data type. 930 * 931 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 932 * @since 11 933 */ 934 WINDOWS_MEDIA_WMA = 'com.microsoft.windows-media-wma', 935 936 /** 937 * Waveform audio format data type created by Microsoft. 938 * 939 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 940 * @since 11 941 */ 942 WAVEFORM_AUDIO = 'com.microsoft.waveform-audio', 943 944 /** 945 * Windows WAX audio format data type. 946 * 947 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 948 * @since 11 949 */ 950 WINDOWS_MEDIA_WAX = 'com.microsoft.windows-media-wax', 951 952 /** 953 * Au file format. 954 * 955 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 956 * @since 12 957 */ 958 AU_AUDIO = 'general.au-audio', 959 960 /** 961 * Audio Interchange File Format. 962 * 963 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 964 * @since 12 965 */ 966 AIFC_AUDIO = 'general.aifc-audio', 967 968 /** 969 * Mpegurl audio format data type. 970 * 971 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 972 * @since 12 973 */ 974 MPEGURL_AUDIO = 'general.mpegurl-audio', 975 976 /** 977 * Mpeg-4 audio format data type. 978 * 979 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 980 * @since 12 981 */ 982 MPEG_4_AUDIO = 'general.mpeg-4-audio', 983 984 /** 985 * Mp2 audio format data type. 986 * 987 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 988 * @since 12 989 */ 990 MP2 = 'general.mp2', 991 992 /** 993 * Mpeg audio format data type. 994 * 995 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 996 * @since 12 997 */ 998 MPEG_AUDIO = 'general.mpeg-audio', 999 1000 /** 1001 * Ulaw audio format data type. 1002 * 1003 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1004 * @since 12 1005 */ 1006 ULAW_AUDIO = 'general.ulaw-audio', 1007 1008 /** 1009 * Digidesign Sound Designer II audio. 1010 * 1011 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1012 * @since 12 1013 */ 1014 SD2_AUDIO = 'com.digidesign.sd2-audio', 1015 1016 /** 1017 * RealMedia audio. 1018 * 1019 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1020 * @since 12 1021 */ 1022 REALAUDIO = 'com.real.realaudio', 1023 1024 /** 1025 * Matroska audio format data type. 1026 * 1027 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1028 * @since 12 1029 */ 1030 MATROSKA_AUDIO = 'org.matroska.mka', 1031 1032 /** 1033 * File data type. 1034 * 1035 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1036 * @since 10 1037 */ 1038 /** 1039 * File data type. 1040 * 1041 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1042 * @atomicservice 1043 * @since 11 1044 */ 1045 /** 1046 * File data type. 1047 * 1048 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1049 * @crossplatform 1050 * @atomicservice 1051 * @since 14 1052 */ 1053 FILE = 'general.file', 1054 1055 /** 1056 * Directory data type. 1057 * 1058 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1059 * @since 11 1060 */ 1061 DIRECTORY = 'general.directory', 1062 1063 /** 1064 * Folder data type. 1065 * 1066 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1067 * @since 10 1068 */ 1069 /** 1070 * Folder data type. 1071 * 1072 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1073 * @atomicservice 1074 * @since 11 1075 */ 1076 /** 1077 * Folder data type. 1078 * 1079 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1080 * @crossplatform 1081 * @atomicservice 1082 * @since 14 1083 */ 1084 FOLDER = 'general.folder', 1085 1086 /** 1087 * Symlink data type. 1088 * 1089 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1090 * @since 11 1091 */ 1092 SYMLINK = 'general.symlink', 1093 1094 /** 1095 * Archive file data type. 1096 * 1097 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1098 * @since 11 1099 */ 1100 ARCHIVE = 'general.archive', 1101 1102 /** 1103 * Bzip2 archive file data type. 1104 * 1105 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1106 * @since 11 1107 */ 1108 BZ2_ARCHIVE = 'general.bz2-archive', 1109 1110 /** 1111 * Opg archive data type. 1112 * 1113 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1114 * @since 12 1115 */ 1116 OPG = 'general.opg', 1117 1118 /** 1119 * Taz archive data type. 1120 * 1121 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1122 * @since 12 1123 */ 1124 TAZ_ARCHIVE = 'general.taz-archive', 1125 1126 /** 1127 * Web archive data type. 1128 * 1129 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1130 * @since 12 1131 */ 1132 WEB_ARCHIVE = 'general.web-archive', 1133 1134 /** 1135 * Disk image archive file data type. 1136 * 1137 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1138 * @since 11 1139 */ 1140 DISK_IMAGE = 'general.disk-image', 1141 1142 /** 1143 * Iso data type. 1144 * 1145 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1146 * @since 12 1147 */ 1148 ISO = 'general.iso', 1149 1150 /** 1151 * Tar archive data type. 1152 * 1153 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1154 * @since 11 1155 */ 1156 TAR_ARCHIVE = 'general.tar-archive', 1157 1158 /** 1159 * Zip archive data type. 1160 * 1161 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1162 * @since 11 1163 */ 1164 ZIP_ARCHIVE = 'general.zip-archive', 1165 1166 /** 1167 * Java archive data type. 1168 * 1169 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1170 * @since 11 1171 */ 1172 JAVA_ARCHIVE = 'com.sun.java-archive', 1173 1174 /** 1175 * GNU archive data type. 1176 * 1177 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1178 * @since 11 1179 */ 1180 GNU_TAR_ARCHIVE = 'org.gnu.gnu-tar-archive', 1181 1182 /** 1183 * Gzip archive data type. 1184 * 1185 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1186 * @since 11 1187 */ 1188 GNU_ZIP_ARCHIVE = 'org.gnu.gnu-zip-archive', 1189 1190 /** 1191 * Gzip tar archive data type. 1192 * 1193 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1194 * @since 11 1195 */ 1196 GNU_ZIP_TAR_ARCHIVE = 'org.gnu.gnu-zip-tar-archive', 1197 1198 /** 1199 * Office Open XML. 1200 * 1201 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1202 * @since 12 1203 */ 1204 OPENXML = 'org.openxmlformats.openxml', 1205 1206 /** 1207 * Office Open XML Document. 1208 * 1209 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1210 * @since 12 1211 */ 1212 WORDPROCESSINGML_DOCUMENT = 'org.openxmlformats.wordprocessingml.document', 1213 1214 /** 1215 * Office Open XML Workbook. 1216 * 1217 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1218 * @since 12 1219 */ 1220 SPREADSHEETML_SHEET = 'org.openxmlformats.spreadsheetml.sheet', 1221 1222 /** 1223 * Office Open XML Presentation. 1224 * 1225 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1226 * @since 12 1227 */ 1228 PRESENTATIONML_PRESENTATION = 'org.openxmlformats.presentationml.presentation', 1229 1230 /** 1231 * Office Open XML Drawingml visio. 1232 * 1233 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1234 * @since 12 1235 */ 1236 DRAWINGML_VISIO = 'org.openxmlformats.drawingml.visio', 1237 1238 /** 1239 * Office Open XML Drawingml template. 1240 * 1241 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1242 * @since 12 1243 */ 1244 DRAWINGML_TEMPLATE = 'org.openxmlformats.drawingml.template', 1245 1246 /** 1247 * Office Open XML Wordprocessingml template. 1248 * 1249 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1250 * @since 12 1251 */ 1252 WORDPROCESSINGML_TEMPLATE = 'org.openxmlformats.wordprocessingml.template', 1253 1254 /** 1255 * Office Open XML Presentationml template. 1256 * 1257 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1258 * @since 12 1259 */ 1260 PRESENTATIONML_TEMPLATE = 'org.openxmlformats.presentationml.template', 1261 1262 /** 1263 * Office Open XML Presentationml slideshow. 1264 * 1265 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1266 * @since 12 1267 */ 1268 PRESENTATIONML_SLIDESHOW = 'org.openxmlformats.presentationml.slideshow', 1269 1270 /** 1271 * Office Open XML Spreadsheetml template. 1272 * 1273 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1274 * @since 12 1275 */ 1276 SPREADSHEETML_TEMPLATE = 'org.openxmlformats.spreadsheetml.template', 1277 1278 /** 1279 * Open Document Format for Office Applications. 1280 * 1281 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1282 * @since 12 1283 */ 1284 OPENDOCUMENT = 'org.oasis.opendocument', 1285 1286 /** 1287 * OpenDocument Text. 1288 * 1289 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1290 * @since 12 1291 */ 1292 OPENDOCUMENT_TEXT = 'org.oasis.opendocument.text', 1293 1294 /** 1295 * OpenDocument Spreadsheet. 1296 * 1297 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1298 * @since 12 1299 */ 1300 OPENDOCUMENT_SPREADSHEET = 'org.oasis.opendocument.spreadsheet', 1301 1302 /** 1303 * OpenDocument Presentation. 1304 * 1305 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1306 * @since 12 1307 */ 1308 OPENDOCUMENT_PRESENTATION = 'org.oasis.opendocument.presentation', 1309 1310 /** 1311 * OpenDocument Graphics. 1312 * 1313 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1314 * @since 12 1315 */ 1316 OPENDOCUMENT_GRAPHICS = 'org.oasis.opendocument.graphics', 1317 1318 /** 1319 * OpenDocument Formulat. 1320 * 1321 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1322 * @since 12 1323 */ 1324 OPENDOCUMENT_FORMULA = 'org.oasis.opendocument.formula', 1325 1326 /** 1327 * Stuffit archive. 1328 * 1329 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1330 * @since 12 1331 */ 1332 STUFFIT_ARCHIVE = 'com.allume.stuffit-archive', 1333 1334 /** 1335 * Rar archive. 1336 * 1337 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1338 * @since 12 1339 */ 1340 RAR_ARCHIVE = 'com.rarlab.rar-archive', 1341 1342 /** 1343 * 7-zip archive. 1344 * 1345 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1346 * @since 12 1347 */ 1348 SEVEN_ZIP_ARCHIVE = 'org.7-zip.7-zip-archive', 1349 1350 /** 1351 * Calendar data type. 1352 * 1353 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1354 * @since 11 1355 */ 1356 CALENDAR = 'general.calendar', 1357 1358 /** 1359 * VCalendar type, a type of calendar format. 1360 * 1361 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1362 * @since 12 1363 */ 1364 VCS = 'general.vcs', 1365 1366 /** 1367 * ICalendar type, a type of calendar format. 1368 * 1369 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1370 * @since 12 1371 */ 1372 ICS = 'general.ics', 1373 1374 /** 1375 * Contact data type. 1376 * 1377 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1378 * @since 11 1379 */ 1380 CONTACT = 'general.contact', 1381 1382 /** 1383 * Database data type. 1384 * 1385 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1386 * @since 11 1387 */ 1388 DATABASE = 'general.database', 1389 1390 /** 1391 * Message data type. 1392 * 1393 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1394 * @since 11 1395 */ 1396 MESSAGE = 'general.message', 1397 1398 /** 1399 * Base type for executable data. 1400 * 1401 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1402 * @since 12 1403 */ 1404 EXECUTABLE = 'general.executable', 1405 1406 /** 1407 * Microsoft Windows application. 1408 * 1409 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1410 * @since 12 1411 */ 1412 PORTABLE_EXECUTABLE = 'com.microsoft.portable-executable', 1413 1414 /** 1415 * Java class. 1416 * 1417 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1418 * @since 12 1419 */ 1420 SUN_JAVA_CLASS = 'com.sun.java-class', 1421 1422 /** 1423 * A file format data type stand for electronic business card. 1424 * 1425 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1426 * @since 11 1427 */ 1428 VCARD = 'general.vcard', 1429 1430 /** 1431 * Navigation data type. 1432 * 1433 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1434 * @since 11 1435 */ 1436 NAVIGATION = 'general.navigation', 1437 1438 /** 1439 * Location data type. 1440 * 1441 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1442 * @since 11 1443 */ 1444 LOCATION = 'general.location', 1445 1446 /** 1447 * Base type for fonts. 1448 * 1449 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1450 * @since 12 1451 */ 1452 FONT = 'general.font', 1453 1454 /** 1455 * TrueType font. 1456 * 1457 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1458 * @since 12 1459 */ 1460 TRUETYPE_FONT = 'general.truetype-font', 1461 1462 /** 1463 * TrueType collection font. 1464 * 1465 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1466 * @since 12 1467 */ 1468 TRUETYPE_COLLECTION_FONT = 'general.truetype-collection-font', 1469 1470 /** 1471 * OpenType font. 1472 * 1473 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1474 * @since 12 1475 */ 1476 OPENTYPE_FONT = 'general.opentype-font', 1477 1478 /** 1479 * PostScript font. 1480 * 1481 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1482 * @since 12 1483 */ 1484 POSTSCRIPT_FONT = 'com.adobe.postscript-font', 1485 1486 /** 1487 * A Printer Font Binary version of Adobe's Type 1. 1488 * 1489 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1490 * @since 12 1491 */ 1492 POSTSCRIPT_PFB_FONT = 'com.adobe.postscript-pfb-font', 1493 1494 /** 1495 * Adobe Type 1 font. 1496 * 1497 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1498 * @since 12 1499 */ 1500 POSTSCRIPT_PFA_FONT = 'com.adobe.postscript-pfa-font', 1501 1502 /** 1503 * OpenHarmony system defined form data type(the data is provided and bound to OpenHarmony system). 1504 * 1505 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1506 * @since 10 1507 */ 1508 /** 1509 * OpenHarmony system defined form data type(the data is provided and bound to OpenHarmony system). 1510 * 1511 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1512 * @atomicservice 1513 * @since 11 1514 */ 1515 OPENHARMONY_FORM = 'openharmony.form', 1516 1517 /** 1518 * OpenHarmony system defined app item data type(the data is provided and bound to OpenHarmony system). 1519 * 1520 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1521 * @since 10 1522 */ 1523 /** 1524 * OpenHarmony system defined app item data type(the data is provided and bound to OpenHarmony system). 1525 * 1526 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1527 * @atomicservice 1528 * @since 11 1529 */ 1530 OPENHARMONY_APP_ITEM = 'openharmony.app-item', 1531 1532 /** 1533 * OpenHarmony system defined pixel map data type(the data is provided and bound to OpenHarmony system). 1534 * 1535 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1536 * @since 10 1537 */ 1538 /** 1539 * OpenHarmony system defined pixel map data type(the data is provided and bound to OpenHarmony system). 1540 * 1541 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1542 * @atomicservice 1543 * @since 11 1544 */ 1545 /** 1546 * OpenHarmony system defined pixel map data type(the data is provided and bound to OpenHarmony system). 1547 * 1548 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1549 * @crossplatform 1550 * @atomicservice 1551 * @since 14 1552 */ 1553 OPENHARMONY_PIXEL_MAP = 'openharmony.pixel-map', 1554 1555 /** 1556 * OpenHarmony system defined atomic service data type(the data is provided and bound to OpenHarmony system). 1557 * 1558 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1559 * @since 11 1560 */ 1561 OPENHARMONY_ATOMIC_SERVICE = 'openharmony.atomic-service', 1562 1563 /** 1564 * OpenHarmony system defined package, which is a directory presented to the user as a file(the data is provided 1565 * <br>and bound to OpenHarmony system). 1566 * 1567 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1568 * @since 11 1569 */ 1570 OPENHARMONY_PACKAGE = 'openharmony.package', 1571 1572 /** 1573 * OpenHarmony system defined ability package(the data is provided and bound to OpenHarmony system). 1574 * 1575 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1576 * @since 11 1577 */ 1578 OPENHARMONY_HAP = 'openharmony.hap', 1579 1580 /** 1581 * OpenHarmony system AppNotepad data format. 1582 * 1583 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1584 * @since 12 1585 */ 1586 OPENHARMONY_HDOC = 'openharmony.hdoc', 1587 1588 /** 1589 * OpenHarmony system Notes data format. 1590 * 1591 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1592 * @since 12 1593 */ 1594 OPENHARMONY_HINOTE = 'openharmony.hinote', 1595 1596 /** 1597 * OpenHarmony system defined styled string. 1598 * 1599 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1600 * @since 12 1601 */ 1602 OPENHARMONY_STYLED_STRING = 'openharmony.styled-string', 1603 1604 /** 1605 * OpenHarmony system defined Want. 1606 * 1607 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1608 * @since 12 1609 */ 1610 OPENHARMONY_WANT = 'openharmony.want', 1611 1612 /** 1613 * Ofd data type. 1614 * 1615 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1616 * @since 12 1617 */ 1618 OFD = 'general.ofd', 1619 1620 /** 1621 * Cad data type. 1622 * 1623 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1624 * @since 12 1625 */ 1626 CAD = 'general.cad', 1627 1628 /** 1629 * Octet stream data type. 1630 * 1631 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1632 * @since 12 1633 */ 1634 OCTET_STREAM = 'general.octet-stream', 1635 1636 /** 1637 * File uri data type. 1638 * 1639 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1640 * @since 15 1641 */ 1642 FILE_URI = 'general.file-uri', 1643 1644 /** 1645 * Content form data type. 1646 * 1647 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1648 * @since 15 1649 */ 1650 CONTENT_FORM = 'general.content-form' 1651 } 1652 1653 /** 1654 * Class describing the uniform data type defined in the {@code UniformDataType}, which consists of attributes and 1655 * <br>methods describing the uniform data type and its relationships to other uniform data types. 1656 * 1657 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1658 * @since 11 1659 */ 1660 class TypeDescriptor { 1661 /** 1662 * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. 1663 * 1664 * @type { string } 1665 * @readonly 1666 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1667 * @since 11 1668 */ 1669 readonly typeId: string; 1670 1671 /** 1672 * Uniform data type IDs that the uniform data type belongs to. 1673 * 1674 * @type { Array<string> } 1675 * @readonly 1676 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1677 * @since 11 1678 */ 1679 readonly belongingToTypes: Array<string>; 1680 1681 /** 1682 * A textual description for the uniform data type. 1683 * 1684 * @type { string } 1685 * @readonly 1686 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1687 * @since 11 1688 */ 1689 readonly description: string; 1690 1691 /** 1692 * Reference URL for the uniform data type, which describes the detail information of the type. 1693 * 1694 * @type { string } 1695 * @readonly 1696 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1697 * @since 11 1698 */ 1699 readonly referenceURL: string; 1700 1701 /** 1702 * Default icon file path for the uniform data type. 1703 * 1704 * @type { string } 1705 * @readonly 1706 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1707 * @since 11 1708 */ 1709 readonly iconFile: string; 1710 1711 /** 1712 * File name extensions for the uniform data type. 1713 * 1714 * @type { Array<string> } 1715 * @readonly 1716 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1717 * @since 12 1718 */ 1719 readonly filenameExtensions: Array<string>; 1720 1721 /** 1722 * MIMETypes of the uniform data type. 1723 * 1724 * @type { Array<string> } 1725 * @readonly 1726 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1727 * @since 12 1728 */ 1729 readonly mimeTypes: Array<string>; 1730 1731 /** 1732 * Checks whether the uniform data type belongs to the given uniform data type. 1733 * 1734 * @param { string } type - A uniform data type to be compared. 1735 * @returns { boolean } Returns true if the data type belongs to the given data type, else false. 1736 * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; 1737 * <br>2.Incorrect parameters types. 1738 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1739 * @since 11 1740 */ 1741 belongsTo(type: string): boolean; 1742 1743 /** 1744 * Checks whether the uniform data type is the lower level type of the given uniform data type. 1745 * 1746 * @param { string } type - A uniform data type to be compared. 1747 * @returns { boolean } Returns true if the data type is the lower level type of the given data type, else false. 1748 * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; 1749 * <br>2.Incorrect parameters types. 1750 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1751 * @since 11 1752 */ 1753 isLowerLevelType(type: string): boolean; 1754 1755 /** 1756 * Checks whether the uniform data type is the higher level type of the given uniform data type. 1757 * 1758 * @param { string } type - A uniform data type to be compared. 1759 * @returns { boolean } Returns true if the data type is the higher level type of the given data type, else false. 1760 * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; 1761 * <br>2.Incorrect parameters types. 1762 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1763 * @since 11 1764 */ 1765 isHigherLevelType(type: string): boolean; 1766 1767 /** 1768 * Checks whether the uniform type descriptor is equal to the given uniform type descriptor. 1769 * 1770 * @param { TypeDescriptor } typeDescriptor - A uniform type descriptor to be compared. 1771 * @returns { boolean } Returns true if the type descriptor is equal to the given type descriptor, else false. 1772 * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; 1773 * <br>2.Incorrect parameters types. 1774 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1775 * @since 11 1776 */ 1777 equals(typeDescriptor: TypeDescriptor): boolean; 1778 } 1779 1780 /** 1781 * Queries and returns the uniform type descriptor by the given uniform data type ID. 1782 * 1783 * @param { string } typeId - Uniform data type ID. 1784 * @returns { TypeDescriptor } Returns the uniform type descriptor corresponding to the uniform data type ID or null 1785 * <br>if the uniform data type does not exist. 1786 * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; 1787 * <br>2.Incorrect parameters types. 1788 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1789 * @since 11 1790 */ 1791 function getTypeDescriptor(typeId: string): TypeDescriptor; 1792 1793 /** 1794 * Queries and returns the uniform type descriptor by the given filename extension and the uniform data type it belongs to. 1795 * 1796 * @param { string } filenameExtension - Filename extension. 1797 * @param { string } [belongsTo] - A uniform data type ID it belongs to. 1798 * @returns { string } Returns the uniform data type ID corresponding to the given filename extension and the 1799 * <br>uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does not exist. 1800 * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; 1801 * <br>2.Incorrect parameters types. 1802 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1803 * @since 11 1804 */ 1805 function getUniformDataTypeByFilenameExtension(filenameExtension: string, belongsTo?: string): string; 1806 1807 /** 1808 * Queries and returns the uniform type descriptor by the given MIME type and the uniform data type it belongs to. 1809 * 1810 * @param { string } mimeType - MIME type. 1811 * @param { string } [belongsTo] - A uniform data type ID it belongs to. 1812 * @returns { string } Returns the uniform data type ID corresponding to the given MIME type and the uniform data type 1813 * <br>it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does not exist. 1814 * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; 1815 * <br>2.Incorrect parameters types. 1816 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1817 * @since 11 1818 */ 1819 function getUniformDataTypeByMIMEType(mimeType: string, belongsTo?: string): string; 1820 1821 /** 1822 * Queries and returns the uniform type descriptor list by the given filename extension and the uniform data type it belongs to. 1823 * 1824 * @param { string } filenameExtension - Filename extension. 1825 * @param { string } [belongsTo] - A uniform data type ID it belongs to. 1826 * @returns { Array<string> } Returns the uniform data type ID list corresponding to the given filename extension and the 1827 * <br>uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does not exist. 1828 * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; 1829 * <br>2.Incorrect parameters types. 1830 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1831 * @since 13 1832 */ 1833 function getUniformDataTypesByFilenameExtension(filenameExtension: string, belongsTo?: string): Array<string>; 1834 1835 /** 1836 * Queries and returns the uniform type descriptor list by the given MIME type and the uniform data type it belongs to. 1837 * 1838 * @param { string } mimeType - MIME type. 1839 * @param { string } [belongsTo] - A uniform data type ID it belongs to. 1840 * @returns { Array<string> } Returns the uniform data type ID list corresponding to the given MIME type and the uniform data type 1841 * <br>it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does not exist. 1842 * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; 1843 * <br>2.Incorrect parameters types. 1844 * @syscap SystemCapability.DistributedDataManager.UDMF.Core 1845 * @since 13 1846 */ 1847 function getUniformDataTypesByMIMEType(mimeType: string, belongsTo?: string): Array<string>; 1848} 1849 1850export default uniformTypeDescriptor; 1851