001package jmri.server.json; 002 003import java.util.*; 004 005import jmri.Audio; 006 007/** 008 * Common and utility constants used in the JMRI JSON protocol. 009 * <p> 010 * <strong>Note</strong> any documented use of a constant is not the exclusive 011 * or sole use of the constant. Review the JSON schemas for all uses of any 012 * given constant. 013 * 014 * @author Randall Wood (C) 2013, 2014, 2016, 2018, 2019 015 */ 016public final class JSON { 017 018 /** 019 * JSON protocol version for requesting version 5.x.y protocol. {@value #V5} 020 */ 021 public static final String V5 = "v5"; 022 023 /** 024 * List of supported versions, as used in the HTTP URL paths. 025 * <p> 026 * <strong>Note:</strong> this being a List<String> is not stable API 027 * and is subject to change without notice. 028 */ 029 public static final List<String> VERSIONS = Collections.unmodifiableList(Arrays.asList(V5)); 030 031 /** 032 * JMRI JSON protocol version 5 complete version. See 033 * {@link jmri.server.json} for the version history. Starting with 5.0.0, 034 * this is a semantic version string; prior to that, it is just an X.Y 035 * version string. 036 */ 037 public static final String V5_PROTOCOL_VERSION = "5.4.0"; // NOI18N 038 039 /** 040 * JMRI JSON protocol version. See {@link jmri.server.json} for the version 041 * history. Starting with 5.0.0, this is a semantic version string; prior to 042 * that, it is just an X.Y version string. 043 */ 044 public static final String JSON_PROTOCOL_VERSION = V5_PROTOCOL_VERSION; // NOI18N 045 046 /** 047 * {@value #VERSION} 048 */ 049 public static final String VERSION = "version"; // NOI18N 050 051 /* JSON structure */ 052 /** 053 * {@value #TYPE} 054 */ 055 public static final String TYPE = "type"; // NOI18N 056 /** 057 * {@value #LIST} 058 */ 059 public static final String LIST = "list"; // NOI18N 060 /** 061 * {@value #DATA} 062 */ 063 public static final String DATA = "data"; // NOI18N 064 /** 065 * {@value #PING} 066 */ 067 public static final String PING = "ping"; // NOI18N 068 /** 069 * {@value #PONG} 070 */ 071 public static final String PONG = "pong"; // NOI18N 072 /** 073 * {@value #GOODBYE} 074 */ 075 public static final String GOODBYE = "goodbye"; // NOI18N 076 /** 077 * {@value #NAME} 078 */ 079 public static final String NAME = "name"; // NOI18N 080 081 /* JSON methods */ 082 /** 083 * {@value #METHOD} 084 */ 085 public static final String METHOD = "method"; // NOI18N 086 /** 087 * {@value #DELETE} 088 */ 089 public static final String DELETE = "delete"; // NOI18N 090 /** 091 * {@value #GET} 092 */ 093 public static final String GET = "get"; // NOI18N 094 /** 095 * {@value #POST} 096 */ 097 public static final String POST = "post"; // NOI18N 098 /** 099 * {@value #PUT} 100 */ 101 public static final String PUT = "put"; // NOI18N 102 103 /* JSON common tokens */ 104 /** 105 * {@value #COMMENT} 106 */ 107 public static final String COMMENT = "comment"; // NOI18N 108 /** 109 * {@value #USERNAME} 110 */ 111 public static final String USERNAME = "userName"; // NOI18N 112 /** 113 * {@value #STATE} 114 */ 115 public static final String STATE = "state"; // NOI18N 116 /** 117 * {@value #VALUE} 118 */ 119 public static final String VALUE = "value"; // NOI18N 120 /** 121 * {@value #ID} 122 */ 123 public static final String ID = "id"; // NOI18N 124 /** 125 * {@value #STATUS} 126 */ 127 public static final String STATUS = "status"; // NOI18N 128 /** 129 * Numeric status value 130 * <p> 131 * {@value #STATUS_CODE} 132 */ 133 public static final String STATUS_CODE = "statusCode"; // NOI18N 134 /** 135 * {@value #PROPERTIES} 136 */ 137 public static final String PROPERTIES = "properties"; // NOI18N 138 /** 139 * {@value #DEFAULT} 140 */ 141 public static final String DEFAULT = "default"; // NOI18N 142 /** 143 * {@value #SPEED} 144 */ 145 public static final String SPEED = "speed"; // NOI18N 146 /** 147 * {@value #DIRECTION} 148 */ 149 public static final String DIRECTION = "direction"; // NOI18N 150 151 /* JSON hello and metadata */ 152 /** 153 * {@value #HELLO} 154 */ 155 public static final String HELLO = "hello"; // NOI18N 156 /** 157 * {@value #JMRI} 158 */ 159 public static final String JMRI = "JMRI"; // NOI18N 160 /** 161 * {@value #HEARTBEAT} 162 */ 163 public static final String HEARTBEAT = "heartbeat"; // NOI18N 164 /** 165 * {@value #RAILROAD} 166 */ 167 public static final String RAILROAD = "railroad"; // NOI18N 168 /** 169 * {@value #NODE} 170 * 171 * @since 1.1 172 */ 173 public static final String NODE = "node"; // NOI18N 174 /** 175 * {@value #ACTIVE_PROFILE} 176 * 177 * @since 3.0 178 */ 179 public static final String ACTIVE_PROFILE = "activeProfile"; // NOI18N 180 /** 181 * {@value #FORMER_NODES} 182 * 183 * @since 1.1 184 */ 185 public static final String FORMER_NODES = "formerNodes"; // NOI18N 186 /** 187 * {@value #LOCALE} 188 * 189 * @since 1.1 190 */ 191 public static final String LOCALE = "locale"; // NOI18N 192 193 /* JSON list types */ 194 /** 195 * {@value #ENGINES} 196 */ 197 public static final String ENGINES = "engines"; // NOI18N 198 /** 199 * {@value #METADATA} 200 */ 201 public static final String METADATA = "metadata"; // NOI18N 202 /** 203 * {@value #PANELS} 204 */ 205 public static final String PANELS = "panels"; // NOI18N 206 /** 207 * {@value #ROUTES} 208 */ 209 public static final String ROUTES = "routes"; // NOI18N 210 /** 211 * {@value #NETWORK_SERVICES} 212 */ 213 public static final String NETWORK_SERVICES = "networkServices"; // NOI18N 214 /** 215 * {@value #CONFIG_PROFILES} 216 */ 217 public static final String CONFIG_PROFILES = "configProfiles"; // NOI18N 218 /** 219 * {@value #CONFIG_PROFILE} 220 */ 221 public static final String CONFIG_PROFILE = "configProfile"; // NOI18N 222 /** 223 * {@value #UNIQUE_ID} 224 */ 225 public static final String UNIQUE_ID = "uniqueId"; // NOI18N 226 /** 227 * {@value #IS_ACTIVE_PROFILE} 228 */ 229 public static final String IS_ACTIVE_PROFILE = "isActiveProfile"; // NOI18N 230 /** 231 * {@value #IS_AUTO_START} 232 */ 233 public static final String IS_AUTO_START = "isAutoStart"; // NOI18N 234 /** 235 * {@value #IS_NEXT_PROFILE} 236 */ 237 public static final String IS_NEXT_PROFILE = "isNextProfile"; // NOI18N 238 239 /* JSON data types */ 240 /** 241 * {@value #NETWORK_SERVICE} 242 * 243 * @since 2.0 244 */ 245 public static final String NETWORK_SERVICE = "networkService"; // NOI18N 246 /** 247 * {@value #PANEL} 248 */ 249 public static final String PANEL = "panel"; // NOI18N 250 /** 251 * {@value #PROGRAMMER} 252 */ 253 public static final String PROGRAMMER = "programmer"; // NOI18N 254 /** 255 * {@value #ROUTE} 256 */ 257 public static final String ROUTE = "route"; // NOI18N 258 /** 259 * {@value #THROTTLE} 260 */ 261 public static final String THROTTLE = "throttle"; // NOI18N 262 263 /* JSON operations tokens */ 264 /** 265 * {@value #ICON_NAME} 266 */ 267 public static final String ICON_NAME = "iconName"; // NOI18N 268 /** 269 * {@value #LENGTH} 270 */ 271 public static final String LENGTH = "length"; // NOI18N 272 273 /* JSON panel tokens */ 274 /** 275 * {@value #CONTROL_PANEL} 276 */ 277 public static final String CONTROL_PANEL = "Control Panel"; // NOI18N 278 /** 279 * {@value #LAYOUT_PANEL} 280 */ 281 public static final String LAYOUT_PANEL = "Layout"; // NOI18N 282 /** 283 * {@value #SWITCHBOARD_PANEL} 284 */ 285 public static final String SWITCHBOARD_PANEL = "Switchboard"; // NOI18N 286 /** 287 * {@value #PANEL_PANEL} 288 */ 289 public static final String PANEL_PANEL = "Panel"; // NOI18N 290 /** 291 * {@value #URL} 292 */ 293 public static final String URL = "URL"; // NOI18N 294 /** 295 * {@value #FORMAT} 296 */ 297 public static final String FORMAT = "format"; // NOI18N 298 /** 299 * {@value #JSON} 300 */ 301 public static final String JSON = "json"; // NOI18N 302 /** 303 * {@value #XML} 304 */ 305 public static final String XML = "xml"; // NOI18N 306 307 /* JSON programmer tokens */ 308 /** 309 * {@value #MODE} 310 */ 311 public static final String MODE = "mode"; // NOI18N 312 /** 313 * {@value #NODE_CV} 314 */ 315 public static final String NODE_CV = "CV"; // NOI18N 316 /** 317 * {@value #OP} 318 */ 319 public static final String OP = "mode"; // NOI18N 320 /** 321 * {@value #READ} 322 */ 323 public static final String READ = "read"; // NOI18N 324 /** 325 * {@value #WRITE} 326 */ 327 public static final String WRITE = "write"; // NOI18N 328 329 /* JSON roster and car/engine (operations) tokens */ 330 /** 331 * {@value #COLOR} 332 */ 333 public static final String COLOR = "color"; // NOI18N 334 /** 335 * {@value #LOAD} 336 */ 337 public static final String LOAD = "load"; // NOI18N 338 /** 339 * {@value #MODEL} 340 */ 341 public static final String MODEL = "model"; // NOI18N 342 /** 343 * {@value #HP} 344 */ 345 public static final String HP = "hp"; // NOI18N 346 /** 347 * {@value #ROAD} 348 */ 349 public static final String ROAD = "road"; // NOI18N 350 /** 351 * {@value #NUMBER} 352 */ 353 public static final String NUMBER = "number"; // NOI18N 354 /** 355 * {@value #IS_LONG_ADDRESS} 356 */ 357 public static final String IS_LONG_ADDRESS = "isLongAddress"; // NOI18N 358 /** 359 * {@value #MFG} 360 */ 361 public static final String MFG = "mfg"; // NOI18N 362 /** 363 * {@value #DECODER_MODEL} 364 */ 365 public static final String DECODER_MODEL = "decoderModel"; // NOI18N 366 /** 367 * {@value #DECODER_FAMILY} 368 */ 369 public static final String DECODER_FAMILY = "decoderFamily"; // NOI18N 370 /** 371 * {@value #MAX_SPD_PCT} 372 */ 373 public static final String MAX_SPD_PCT = "maxSpeedPct"; // NOI18N 374 /** 375 * {@value #FUNCTION_KEYS} 376 */ 377 public static final String FUNCTION_KEYS = "functionKeys"; // NOI18N 378 /** 379 * {@value #IMAGE} 380 * 381 * @since 2.0 382 */ 383 public static final String IMAGE = "image"; // NOI18N 384 /** 385 * {@value #ICON} 386 * 387 * @since 2.0 388 */ 389 public static final String ICON = "icon"; // NOI18N 390 /** 391 * {@value #SELECTED_ICON} 392 * 393 * @since 2.0 394 */ 395 public static final String SELECTED_ICON = "selectedIcon"; // NOI18N 396 /** 397 * {@value #LABEL} 398 */ 399 public static final String LABEL = "label"; // NOI18N 400 /** 401 * {@value #LOCKABLE} 402 */ 403 public static final String LOCKABLE = "lockable"; // NOI18N 404 /** 405 * {@value #GROUP} 406 */ 407 public static final String GROUP = "group"; // NOI18N 408 /** 409 * {@value #OWNER} 410 * 411 * @since 1.1 412 */ 413 public static final String OWNER = "owner"; // NOI18N 414 /** 415 * {@value #SHUNTING_FUNCTION} 416 * 417 * @since 2.0 418 */ 419 public static final String SHUNTING_FUNCTION = "shuntingFunction"; // NOI18N 420 421 /* JSON route (operations) tokens */ 422 /** 423 * {@value #TRAIN_DIRECTION} 424 */ 425 public static final String TRAIN_DIRECTION = "trainDirection"; // NOI18N 426 /** 427 * {@value #SEQUENCE} 428 */ 429 public static final String SEQUENCE = "sequenceId"; // NOI18N 430 /** 431 * {@value #ARRIVAL_TIME} 432 * 433 * @since 1.1 434 */ 435 public static final String ARRIVAL_TIME = "arrivalTime"; // NOI18N 436 /** 437 * {@value #EXPECTED_ARRIVAL} 438 */ 439 public static final String EXPECTED_ARRIVAL = "expectedArrivalTime"; // NOI18N 440 /** 441 * {@value #EXPECTED_DEPARTURE} 442 */ 443 public static final String EXPECTED_DEPARTURE = "expectedDepartureTime"; // NOI18N 444 /** 445 * {@value #DEPARTURE_TIME} 446 */ 447 public static final String DEPARTURE_TIME = "departureTime"; // NOI18N 448 /** 449 * {@value #DEPARTURE_LOCATION} 450 */ 451 public static final String DEPARTURE_LOCATION = "trainDepartsName"; // NOI18N 452 /** 453 * {@value #TERMINATES_LOCATION} 454 */ 455 public static final String TERMINATES_LOCATION = "trainTerminatesName"; // NOI18N 456 /** 457 * {@value #DESCRIPTION} 458 */ 459 public static final String DESCRIPTION = "description"; // NOI18N 460 /** 461 * {@value #ROUTE_ID} 462 */ 463 public static final String ROUTE_ID = "routeId"; // NOI18N 464 /** 465 * {@value #HAZARDOUS} 466 * 467 * @since 1.1 468 */ 469 public static final String HAZARDOUS = "hazardous"; // NOI18N 470 /** 471 * {@value #KERNEL} 472 * 473 * @since 1.1 474 */ 475 public static final String KERNEL = "kernel"; // NOI18N 476 /** 477 * {@value #FINAL_DESTINATION} 478 * 479 * @since 1.1 480 */ 481 public static final String FINAL_DESTINATION = "finalDestination"; // NOI18N 482 /** 483 * {@value #REMOVE_COMMENT} 484 * 485 * @since 1.1 486 */ 487 public static final String REMOVE_COMMENT = "removeComment"; // NOI18N 488 /** 489 * {@value #ADD_COMMENT} 490 * 491 * @since 1.1 492 */ 493 public static final String ADD_COMMENT = "addComment"; // NOI18N 494 /** 495 * {@value #IS_LOCAL} 496 * 497 * @since 1.1 498 */ 499 public static final String IS_LOCAL = "isLocal"; 500 /** 501 * {@value #ADD_HELPERS} 502 * 503 * @since 1.1 504 */ 505 public static final String ADD_HELPERS = "addHelpers"; 506 /** 507 * {@value #CHANGE_CABOOSE} 508 * 509 * @since 1.1 510 */ 511 public static final String CHANGE_CABOOSE = "changeCaboose"; 512 /** 513 * {@value #CHANGE_ENGINES} 514 * 515 * @since 1.1 516 */ 517 public static final String CHANGE_ENGINES = "changeEngines"; 518 /** 519 * {@value #REMOVE_HELPERS} 520 * 521 * @since 1.1 522 */ 523 public static final String REMOVE_HELPERS = "removeHelpers"; 524 /** 525 * {@value #OPTIONS} 526 * 527 * @since 1.1 528 */ 529 public static final String OPTIONS = "options"; 530 /** 531 * {@value #ADD} 532 * <p> 533 * As an attribute of a {@link jmri.server.json.roster.JsonRoster#ROSTER}, 534 * this is an entry that has been added to the roster. 535 * 536 * @since 1.1 537 */ 538 public static final String ADD = "add"; 539 /** 540 * {@value #REMOVE} 541 * <p> 542 * In operations, this indicates the dropping or setting out of a car or 543 * engine. 544 * <p> 545 * As an attribute of a {@link jmri.server.json.roster.JsonRoster#ROSTER}, 546 * this is an entry that has been removed from the roster. 547 * 548 * @since 1.1 549 */ 550 public static final String REMOVE = "remove"; 551 /** 552 * {@value #ADD_AND_REMOVE} 553 * 554 * @since 1.1 555 */ 556 public static final String ADD_AND_REMOVE = "addAndRemove"; 557 /** 558 * {@value #TOTAL} 559 * 560 * @since 1.1 561 */ 562 public static final String TOTAL = "total"; 563 /** 564 * {@value #LOADS} 565 * 566 * @since 1.1 567 */ 568 public static final String LOADS = "loads"; 569 /** 570 * {@value #EMPTIES} 571 * 572 * @since 1.1 573 */ 574 public static final String EMPTIES = "empties"; 575 /** 576 * {@value #RETURN_WHEN_EMPTY} 577 * 578 * @since 1.1 579 */ 580 public static final String RETURN_WHEN_EMPTY = "returnWhenEmpty"; 581 /** 582 * {@value #RETURN_WHEN_LOADED} 583 * 584 * @since 5.4.0 585 */ 586 public static final String RETURN_WHEN_LOADED = "returnWhenLoaded"; 587 /** 588 * {@value #DIVISION} 589 * 590 * @since 5.4.0 591 */ 592 public static final String DIVISION = "division"; 593 /** 594 * {@value #UTILITY} 595 * 596 * @since 1.1 597 */ 598 public static final String UTILITY = "utility"; 599 600 /* JSON signalling tokens */ 601 /** 602 * {@value #APPEARANCE} 603 */ 604 public static final String APPEARANCE = "appearance"; // NOI18N 605 /** 606 * {@value #APPEARANCE_NAME} 607 */ 608 public static final String APPEARANCE_NAME = "appearanceName"; // NOI18N 609 /** 610 * {@value #ASPECT} 611 */ 612 public static final String ASPECT = "aspect"; // NOI18N 613 /** 614 * {@value #ASPECT_DARK} 615 */ 616 public static final String ASPECT_DARK = "Dark"; // NOI18N 617 /** 618 * {@value #ASPECT_HELD} 619 */ 620 public static final String ASPECT_HELD = "Held"; // NOI18N 621 /** 622 * {@value #ASPECT_UNKNOWN} 623 */ 624 public static final String ASPECT_UNKNOWN = "Unknown"; // NOI18N 625 /** 626 * {@value #TOKEN_HELD} 627 */ 628 public static final String TOKEN_HELD = "held"; // NOI18N 629 /** 630 * {@value #LIT} 631 */ 632 public static final String LIT = "lit"; // NOI18N 633 634 /* Shared JSON consist, roster, and throttle tokens */ 635 /** 636 * {@value #ADDRESS} 637 */ 638 public static final String ADDRESS = "address"; // NOI18N 639 /** 640 * {@value #FORWARD} 641 */ 642 public static final String FORWARD = "forward"; // NOI18N 643 /** 644 * Prefix for the throttle function keys (F0-F28). 645 * <p> 646 * {@value #F} 647 */ 648 public static final String F = "F"; // NOI18N 649 650 /* JSON Sensor and Turnout Tokens */ 651 /** 652 * {@value #INVERTED} 653 */ 654 public static final String INVERTED = "inverted"; // NOI18N 655 656 /* JSON value types */ 657 /** 658 * {@value #INTEGER} 659 */ 660 public static final String INTEGER = "int"; // NOI18N 661 662 /* JSON network services tokens */ 663 /** 664 * {@value #PORT} 665 */ 666 public static final String PORT = "port"; // NOI18N 667 668 /* JSON consist tokens */ 669 /** 670 * {@value #POSITION} 671 */ 672 public static final String POSITION = "position"; // NOI18N 673 /** 674 * {@value #SIZE_LIMIT} 675 */ 676 public static final String SIZE_LIMIT = "sizeLimit"; // NOI18N 677 678 /* Time constants */ 679 /** 680 * {@value #RATE} 681 */ 682 public static final String RATE = "rate"; // NOI18N 683 684 /* 685 * JSON State (an unsigned integer) 686 */ 687 688 /* Audio commands */ 689 /** 690 * {@value #AUDIO_ICON_IDENTITY} 691 */ 692 public static final String AUDIO_ICON_IDENTITY = "identity"; 693 /** 694 * {@value #AUDIO_COMMAND} 695 */ 696 public static final String AUDIO_COMMAND = "command"; 697 /** 698 * {@value #AUDIO_COMMAND_NONE} 699 */ 700 public static final String AUDIO_COMMAND_NONE = "None"; 701 /** 702 * {@value #AUDIO_COMMAND_PLAY} 703 */ 704 public static final String AUDIO_COMMAND_PLAY = "Play"; 705 /** 706 * {@value #AUDIO_COMMAND_PLAY_NUM_LOOPS} 707 */ 708 public static final String AUDIO_COMMAND_PLAY_NUM_LOOPS = "playNumLoops"; 709 /** 710 * {@value #AUDIO_COMMAND_STOP} 711 */ 712 public static final String AUDIO_COMMAND_STOP = "Stop"; 713 714 /* Common state */ 715 /** 716 * {@value #UNKNOWN} 717 * <p> 718 * Note that this value deliberately differs from 719 * {@link jmri.NamedBean#UNKNOWN} so that JSON clients can treat all known 720 * states as true, and the unknown state as false. 721 */ 722 public static final int UNKNOWN = 0x00; 723 724 /* Light and PowerManager state */ 725 /** 726 * {@value #ON} 727 */ 728 public static final int ON = 0x02; 729 /** 730 * {@value #OFF} 731 */ 732 public static final int OFF = 0x04; 733 734 /* NamedBean state */ 735 /** 736 * {@value #INCONSISTENT} 737 */ 738 public static final int INCONSISTENT = 0x08; 739 740 /* Audio state */ 741 /** 742 * {@value #AUDIO_PLAYING} 743 */ 744 public static final int AUDIO_PLAYING = Audio.STATE_PLAYING; 745 /** 746 * {@value #AUDIO_STOPPED} 747 */ 748 public static final int AUDIO_STOPPED = Audio.STATE_STOPPED; 749 750 /* Route state */ 751 /** 752 * {@value #TOGGLE} 753 */ 754 public static final int TOGGLE = 0x08; 755 756 /* Sensor state */ 757 /** 758 * {@value #ACTIVE} 759 */ 760 public static final int ACTIVE = 0x02; 761 /** 762 * {@value #INACTIVE} 763 */ 764 public static final int INACTIVE = 0x04; 765 766 /* SignalHead state */ 767 /** 768 * {@value #STATE_DARK} 769 */ 770 public static final int STATE_DARK = 0x00; 771 /** 772 * {@value #RED} 773 */ 774 public static final int RED = 0x01; 775 /** 776 * {@value #FLASHRED} 777 */ 778 public static final int FLASHRED = 0x02; 779 /** 780 * {@value #YELLOW} 781 */ 782 public static final int YELLOW = 0x04; 783 /** 784 * {@value #FLASHYELLOW} 785 */ 786 public static final int FLASHYELLOW = 0x08; 787 /** 788 * {@value #GREEN} 789 */ 790 public static final int GREEN = 0x10; 791 /** 792 * {@value #FLASHGREEN} 793 */ 794 public static final int FLASHGREEN = 0x20; 795 /** 796 * {@value #LUNAR} 797 */ 798 public static final int LUNAR = 0x40; 799 /** 800 * {@value #FLASHLUNAR} 801 */ 802 public static final int FLASHLUNAR = 0x80; 803 /** 804 * {@value #STATE_HELD} 805 */ 806 public static final int STATE_HELD = 0x100; 807 808 /* Turnout state */ 809 /** 810 * {@value #CLOSED} 811 */ 812 public static final int CLOSED = 0x02; 813 /** 814 * {@value #THROWN} 815 */ 816 public static final int THROWN = 0x04; 817 818 /* OBlock status */ 819 /** 820 * {@value #ALLOCATED} 821 */ 822 public static final int ALLOCATED = 0x10; 823 /** 824 * {@value #RUNNING} 825 */ 826 public static final int RUNNING = 0x20; 827 /** 828 * {@value #OUT_OF_SERVICE} 829 */ 830 public static final int OUT_OF_SERVICE = 0x30; 831 /** 832 * {@value #TRACK_ERROR} 833 */ 834 public static final int TRACK_ERROR = 0x40; 835 836 /** 837 * {@value #UNIT} 838 * 839 * @since 1.1 840 */ 841 public static final String UNIT = "unit"; // NOI18N 842 843 /* JMRI JSON Client Autoconfiguration support */ 844 /** 845 * {@value #PREFIX} 846 * 847 * @since 2.0 848 */ 849 public static final String PREFIX = "prefix"; // NOI18N 850 /** 851 * {@value #SYSTEM_CONNECTION} 852 * 853 * @since 2.0 854 */ 855 public static final String SYSTEM_CONNECTION = "systemConnection"; // NOI18N 856 /** 857 * {@value #SYSTEM_CONNECTIONS} 858 * 859 * @since 2.0 860 */ 861 public static final String SYSTEM_CONNECTIONS = "systemConnections"; // NOI18N 862 863 /* JSON Schema */ 864 /** 865 * {@value #SCHEMA} 866 * 867 * @since 4.1 868 */ 869 public static final String SCHEMA = "schema"; // NOI18N 870 /** 871 * {@value #SERVER} 872 * 873 * @since 4.1 874 */ 875 public static final String SERVER = "server"; // NOI18N 876 /** 877 * {@value #CLIENT} 878 * 879 * @since 4.1 880 */ 881 public static final String CLIENT = "client"; // NOI18N 882 /** 883 * {@value #FORCE_DELETE} 884 * 885 * @since 5.0.0 886 */ 887 public static final String FORCE_DELETE = "forceDelete"; // NOI18N 888 /** 889 * {@value #CONFLICT} 890 * 891 * @since 5.0.0 892 */ 893 public static final String CONFLICT = "conflict"; // NOI18N 894 /** 895 * {@value #RENAME} 896 * <p> 897 * In a message from a client, carries the new name for the object in the 898 * message; note that some services may bar changing the name of an object, 899 * while other services will change the name based on other values. In a 900 * message from the server, carries the old name for a recently renamed 901 * object in the message. 902 * 903 * @since 5.0.0 904 */ 905 public static final String RENAME = "rename"; // NOI18N 906 /** 907 * {@value #RFID} 908 * 909 * @since 5.0.0 910 */ 911 public static final String RFID = "rfid"; // NOI18N 912 /** 913 * {@value #WHERELASTSEEN} 914 * 915 * @since 5.7.6 916 */ 917 public static final String WHERELASTSEEN = "whereLastSeen"; // NOI18N 918 /** 919 * {@value #WHENLASTSEEN} 920 * 921 * @since 5.7.6 922 */ 923 public static final String WHENLASTSEEN = "whenLastSeen"; // NOI18N 924 /** 925 * {@value #TIME} 926 * 927 * @since 5.0.0 928 */ 929 public static final String TIME = "time"; // NOI18N 930 931 /* ZeroConf support */ 932 /** 933 * {@value #ZEROCONF_SERVICE_TYPE} Not used within the protocol, but used to 934 * support discovery of servers supporting the protocol. 935 */ 936 public static final String ZEROCONF_SERVICE_TYPE = "_jmri-json._tcp.local."; // NOI18N 937 938 /* prevent the constructor from being documented */ 939 private JSON() { 940 throw new UnsupportedOperationException("There is no valid instance of this class"); 941 } 942}