@openxiot/xiot-core-spec-ts 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/index.d.ts +315 -0
- package/dist/index.js +331 -0
- package/dist/xiot/core/spec/codec/app/ApplicationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/app/ApplicationCodec.js +50 -0
- package/dist/xiot/core/spec/codec/app/authorization/AuthorizationCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/AuthorizationCodec.js +41 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationEventbusImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationEventbusImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationHttpImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationHttpImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationJwtImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationJwtImplCodec.js +14 -0
- package/dist/xiot/core/spec/codec/app/event/EventReceiverCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/EventReceiverCodec.js +41 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverEventbusImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverEventbusImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverHttpImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverHttpImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverKafkaImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverKafkaImplCodec.js +18 -0
- package/dist/xiot/core/spec/codec/definition/ActionDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/ActionDefinitionCodec.js +43 -0
- package/dist/xiot/core/spec/codec/definition/ArgumentDefinitionCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/definition/ArgumentDefinitionCodec.js +48 -0
- package/dist/xiot/core/spec/codec/definition/CategoryDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/CategoryDefinitionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/DescriptionCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/definition/DescriptionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/DeviceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/DeviceDefinitionCodec.js +38 -0
- package/dist/xiot/core/spec/codec/definition/EventDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/EventDefinitionCodec.js +39 -0
- package/dist/xiot/core/spec/codec/definition/FormatDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/FormatDefinitionCodec.js +34 -0
- package/dist/xiot/core/spec/codec/definition/NamespaceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/NamespaceDefinitionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/PropertyDefinitionCodec.d.ts +9 -0
- package/dist/xiot/core/spec/codec/definition/PropertyDefinitionCodec.js +95 -0
- package/dist/xiot/core/spec/codec/definition/ServiceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/ServiceDefinitionCodec.js +71 -0
- package/dist/xiot/core/spec/codec/definition/UnitDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/UnitDefinitionCodec.js +34 -0
- package/dist/xiot/core/spec/codec/definition/ValueListCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/definition/ValueListCodec.js +31 -0
- package/dist/xiot/core/spec/codec/definition/ValueRangeCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/definition/ValueRangeCodec.js +13 -0
- package/dist/xiot/core/spec/codec/definition/type/ActionTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/ActionTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/EventTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/EventTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/GroupTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/GroupTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/PropertyTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/PropertyTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/ServiceTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/ServiceTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/device/DeviceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/device/DeviceCodec.js +51 -0
- package/dist/xiot/core/spec/codec/image/ActionImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/ActionImageCodec.js +25 -0
- package/dist/xiot/core/spec/codec/image/ArgumentImageCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/image/ArgumentImageCodec.js +44 -0
- package/dist/xiot/core/spec/codec/image/DeviceImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/DeviceImageCodec.js +17 -0
- package/dist/xiot/core/spec/codec/image/EventImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/EventImageCodec.js +27 -0
- package/dist/xiot/core/spec/codec/image/PropertyImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/PropertyImageCodec.js +18 -0
- package/dist/xiot/core/spec/codec/image/ServiceImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/ServiceImageCodec.js +42 -0
- package/dist/xiot/core/spec/codec/instance/ActionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ActionCodec.js +49 -0
- package/dist/xiot/core/spec/codec/instance/ArgumentCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ArgumentCodec.js +44 -0
- package/dist/xiot/core/spec/codec/instance/DeviceInstanceCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/instance/DeviceInstanceCodec.js +25 -0
- package/dist/xiot/core/spec/codec/instance/EventCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/EventCodec.js +45 -0
- package/dist/xiot/core/spec/codec/instance/PropertyCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/PropertyCodec.js +98 -0
- package/dist/xiot/core/spec/codec/instance/ServiceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ServiceCodec.js +55 -0
- package/dist/xiot/core/spec/codec/jwt/JwtCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/JwtCodec.js +41 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtEsImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtEsImplCodec.js +26 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtRsaImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtRsaImplCodec.js +26 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtSecretsImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtSecretsImplCodec.js +24 -0
- package/dist/xiot/core/spec/codec/key/AccessKeyCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/key/AccessKeyCodec.js +18 -0
- package/dist/xiot/core/spec/codec/key/DeviceCertCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/key/DeviceCertCodec.js +36 -0
- package/dist/xiot/core/spec/codec/key/DeviceKeyCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/key/DeviceKeyCodec.js +24 -0
- package/dist/xiot/core/spec/codec/lifecycle/app/ApplicationWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/app/ApplicationWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ActionDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ActionDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/DeviceDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/DeviceDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/EventDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/EventDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/FormatDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/FormatDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/PropertyDefinitionWithLifecycleCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/PropertyDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ServiceDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ServiceDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/UnitDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/UnitDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/instance/DeviceInstanceWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/instance/DeviceInstanceWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/product/VersionWithLifecycleCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/lifecycle/product/VersionWithLifecycleCodec.js +42 -0
- package/dist/xiot/core/spec/codec/lifecycle/template/DeviceTemplateWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/template/DeviceTemplateWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/type/DeviceTypeWithLifecycleCodec.d.ts +12 -0
- package/dist/xiot/core/spec/codec/lifecycle/type/DeviceTypeWithLifecycleCodec.js +36 -0
- package/dist/xiot/core/spec/codec/notice/DeviceNoticeCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/notice/DeviceNoticeCodec.js +122 -0
- package/dist/xiot/core/spec/codec/notice/OwnerNoticeCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/notice/OwnerNoticeCodec.js +220 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceAccessKeyChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceAccessKeyChangedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenAddedCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenRemovedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceEventOccurredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceEventOccurredCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertiesChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertiesChangedCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertyChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertyChangedCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootActiveCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootActiveCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootInactiveCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootInactiveCodec.js +16 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceSummaryChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceSummaryChangedCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceAddedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceRemovedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSomewhereChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSomewhereChangedCodec.js +26 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSummaryChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSummaryChangedCodec.js +26 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerEventOccurredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerEventOccurredCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerPropertiesChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerPropertiesChangedCodec.js +21 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleExecutedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleExecutedCodec.js +47 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleTriggeredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleTriggeredCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipDisclaimedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipDisclaimedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipTakenCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipTakenCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/oauth2/Oauth2ConfigurationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/oauth2/Oauth2ConfigurationCodec.js +49 -0
- package/dist/xiot/core/spec/codec/operation/AbstractOperationCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/operation/AbstractOperationCodec.js +27 -0
- package/dist/xiot/core/spec/codec/operation/ActionOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/ActionOperationCodec.js +84 -0
- package/dist/xiot/core/spec/codec/operation/ArgumentOperationCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/operation/ArgumentOperationCodec.js +65 -0
- package/dist/xiot/core/spec/codec/operation/CombinationValueCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/operation/CombinationValueCodec.js +70 -0
- package/dist/xiot/core/spec/codec/operation/EventOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/EventOperationCodec.js +63 -0
- package/dist/xiot/core/spec/codec/operation/PropertyOperationCodec.d.ts +31 -0
- package/dist/xiot/core/spec/codec/operation/PropertyOperationCodec.js +151 -0
- package/dist/xiot/core/spec/codec/operation/RuleOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/RuleOperationCodec.js +43 -0
- package/dist/xiot/core/spec/codec/ownership/DeviceOwnerCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/ownership/DeviceOwnerCodec.js +37 -0
- package/dist/xiot/core/spec/codec/ownership/OwnershipCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/ownership/OwnershipCodec.js +62 -0
- package/dist/xiot/core/spec/codec/product/ProductCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/ProductCodec.js +76 -0
- package/dist/xiot/core/spec/codec/product/ProductVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/ProductVersionCodec.js +69 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceCodec.js +45 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceVersionCodec.js +69 -0
- package/dist/xiot/core/spec/codec/product/resource/ResourceVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ResourceVersionCodec.js +65 -0
- package/dist/xiot/core/spec/codec/rbac/PermissionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/PermissionCodec.js +35 -0
- package/dist/xiot/core/spec/codec/rbac/RoleCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/RoleCodec.js +34 -0
- package/dist/xiot/core/spec/codec/rbac/account/AccountCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/account/AccountCodec.js +38 -0
- package/dist/xiot/core/spec/codec/rbac/organization/MemberCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/organization/MemberCodec.js +34 -0
- package/dist/xiot/core/spec/codec/rbac/organization/OrganizationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/organization/OrganizationCodec.js +33 -0
- package/dist/xiot/core/spec/codec/rule/RuleCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rule/RuleCodec.js +74 -0
- package/dist/xiot/core/spec/codec/shadow/DeviceShadowCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/shadow/DeviceShadowCodec.js +38 -0
- package/dist/xiot/core/spec/codec/shadow/ShadowCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/shadow/ShadowCodec.js +51 -0
- package/dist/xiot/core/spec/codec/somewhere/SomewhereCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/somewhere/SomewhereCodec.js +50 -0
- package/dist/xiot/core/spec/codec/space/SpaceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/space/SpaceCodec.js +45 -0
- package/dist/xiot/core/spec/codec/summary/SummaryCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/summary/SummaryCodec.js +82 -0
- package/dist/xiot/core/spec/codec/template/ActionTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/ActionTemplateCodec.js +55 -0
- package/dist/xiot/core/spec/codec/template/DeviceTemplateCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/template/DeviceTemplateCodec.js +24 -0
- package/dist/xiot/core/spec/codec/template/EventTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/EventTemplateCodec.js +51 -0
- package/dist/xiot/core/spec/codec/template/PropertyTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/PropertyTemplateCodec.js +78 -0
- package/dist/xiot/core/spec/codec/template/ServiceTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/ServiceTemplateCodec.js +67 -0
- package/dist/xiot/core/spec/typedef/app/Application.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/app/Application.js +13 -0
- package/dist/xiot/core/spec/typedef/app/authorization/Authorization.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/Authorization.js +9 -0
- package/dist/xiot/core/spec/typedef/app/authorization/AuthorizationType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/app/authorization/AuthorizationType.js +25 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationEventbusImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationEventbusImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationHttpImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationHttpImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationJwtImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationJwtImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiver.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiver.js +9 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiverType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiverType.js +25 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverEventbusImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverEventbusImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverHttpImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverHttpImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverKafkaImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverKafkaImpl.js +13 -0
- package/dist/xiot/core/spec/typedef/constant/Spec.d.ts +48 -0
- package/dist/xiot/core/spec/typedef/constant/Spec.js +52 -0
- package/dist/xiot/core/spec/typedef/definition/ActionDefinition.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/definition/ActionDefinition.js +21 -0
- package/dist/xiot/core/spec/typedef/definition/ArgumentDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/ArgumentDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/CategoryDefinition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/CategoryDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/DeviceDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/DeviceDefinition.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/EventDefinition.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/EventDefinition.js +17 -0
- package/dist/xiot/core/spec/typedef/definition/FormatDefinition.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/definition/FormatDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/NamespaceDefinition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/NamespaceDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/PropertyDefinition.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/definition/PropertyDefinition.js +71 -0
- package/dist/xiot/core/spec/typedef/definition/ServiceDefinition.d.ts +15 -0
- package/dist/xiot/core/spec/typedef/definition/ServiceDefinition.js +37 -0
- package/dist/xiot/core/spec/typedef/definition/UnitDefinition.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/definition/UnitDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/Access.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/Access.js +87 -0
- package/dist/xiot/core/spec/typedef/definition/property/ConstraintValue.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/definition/property/ConstraintValue.js +2 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueList.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueList.js +21 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueRange.d.ts +18 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueRange.js +103 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataFormat.d.ts +23 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataFormat.js +96 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValue.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValue.js +2 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValueFactory.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValueFactory.js +115 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vbool.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vbool.js +53 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vcombination.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vcombination.js +33 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vfloat.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vfloat.js +67 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vhex.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vhex.js +80 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint16.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint16.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint32.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint32.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint64.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint64.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint8.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint8.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vstring.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vstring.js +36 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vtlv8.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vtlv8.js +39 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint16.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint16.js +71 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint32.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint32.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint8.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint8.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ActionType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ActionType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/DeviceType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/DeviceType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/EventType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/EventType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Extendable.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Extendable.js +18 -0
- package/dist/xiot/core/spec/typedef/definition/urn/FormatType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/FormatType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/GroupType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/GroupType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/PropertyType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/PropertyType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ServiceType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ServiceType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UnitType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UnitType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Urn.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Urn.js +146 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnStyle.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnStyle.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnType.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnType.js +30 -0
- package/dist/xiot/core/spec/typedef/device/Device.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/device/Device.js +9 -0
- package/dist/xiot/core/spec/typedef/error/IotError.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/error/IotError.js +13 -0
- package/dist/xiot/core/spec/typedef/image/ActionImage.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/image/ActionImage.js +76 -0
- package/dist/xiot/core/spec/typedef/image/ArgumentImage.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/image/ArgumentImage.js +30 -0
- package/dist/xiot/core/spec/typedef/image/DeviceImage.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/image/DeviceImage.js +283 -0
- package/dist/xiot/core/spec/typedef/image/EventImage.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/image/EventImage.js +48 -0
- package/dist/xiot/core/spec/typedef/image/PropertyImage.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/image/PropertyImage.js +73 -0
- package/dist/xiot/core/spec/typedef/image/ServiceImage.d.ts +21 -0
- package/dist/xiot/core/spec/typedef/image/ServiceImage.js +172 -0
- package/dist/xiot/core/spec/typedef/instance/Action.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/instance/Action.js +33 -0
- package/dist/xiot/core/spec/typedef/instance/Argument.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/instance/Argument.js +18 -0
- package/dist/xiot/core/spec/typedef/instance/DeviceInstance.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/instance/DeviceInstance.js +17 -0
- package/dist/xiot/core/spec/typedef/instance/Event.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/instance/Event.js +23 -0
- package/dist/xiot/core/spec/typedef/instance/Property.d.ts +56 -0
- package/dist/xiot/core/spec/typedef/instance/Property.js +244 -0
- package/dist/xiot/core/spec/typedef/instance/PropertyValue.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/instance/PropertyValue.js +81 -0
- package/dist/xiot/core/spec/typedef/instance/Service.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/instance/Service.js +48 -0
- package/dist/xiot/core/spec/typedef/jwt/Jwt.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/jwt/Jwt.js +16 -0
- package/dist/xiot/core/spec/typedef/jwt/JwtType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/jwt/JwtType.js +25 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtEsImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtEsImpl.js +15 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtRsaImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtRsaImpl.js +15 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtSecretsImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtSecretsImpl.js +13 -0
- package/dist/xiot/core/spec/typedef/key/AccessKey.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/key/AccessKey.js +10 -0
- package/dist/xiot/core/spec/typedef/key/DeviceCert.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/key/DeviceCert.js +12 -0
- package/dist/xiot/core/spec/typedef/key/DeviceKey.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/key/DeviceKey.js +13 -0
- package/dist/xiot/core/spec/typedef/lifecycle/Lifecycle.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/lifecycle/Lifecycle.js +25 -0
- package/dist/xiot/core/spec/typedef/lifecycle/ObjectWithLifecycle.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/lifecycle/ObjectWithLifecycle.js +10 -0
- package/dist/xiot/core/spec/typedef/notice/Notice.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/Notice.js +9 -0
- package/dist/xiot/core/spec/typedef/notice/NoticeCodec.d.ts +27 -0
- package/dist/xiot/core/spec/typedef/notice/NoticeCodec.js +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNotice.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNotice.js +13 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNoticeType.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNoticeType.js +31 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceAccessKeyChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceAccessKeyChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenAdded.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenAdded.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenRemoved.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenRemoved.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceEventOccurred.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceEventOccurred.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertiesChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertiesChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertyChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertyChanged.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootActive.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootActive.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootInactive.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootInactive.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceSummaryChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceSummaryChanged.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNotice.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNotice.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNoticeType.d.ts +42 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNoticeType.js +59 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceAdded.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceAdded.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSomewhereChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSomewhereChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSummaryChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSummaryChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerEventOccurred.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerEventOccurred.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerPropertiesChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerPropertiesChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleExecuted.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleExecuted.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleTriggered.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleTriggered.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipDisclaimed.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipDisclaimed.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipTaken.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipTaken.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/oauth2/Oauth2Configuration.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/oauth2/Oauth2Configuration.js +19 -0
- package/dist/xiot/core/spec/typedef/operation/AbstractOperation.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/operation/AbstractOperation.js +21 -0
- package/dist/xiot/core/spec/typedef/operation/ActionOperation.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/operation/ActionOperation.js +50 -0
- package/dist/xiot/core/spec/typedef/operation/ArgumentOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/ArgumentOperation.js +52 -0
- package/dist/xiot/core/spec/typedef/operation/EventOperation.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/operation/EventOperation.js +58 -0
- package/dist/xiot/core/spec/typedef/operation/PropertyOperation.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/operation/PropertyOperation.js +53 -0
- package/dist/xiot/core/spec/typedef/operation/RemindOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/RemindOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/RuleOperation.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/operation/RuleOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/SleepOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/SleepOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/value/AnyValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/AnyValue.js +9 -0
- package/dist/xiot/core/spec/typedef/operation/value/AutoscalingValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/AutoscalingValue.js +9 -0
- package/dist/xiot/core/spec/typedef/operation/value/ReverseValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/ReverseValue.js +9 -0
- package/dist/xiot/core/spec/typedef/ownership/DeviceOwner.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/ownership/DeviceOwner.js +10 -0
- package/dist/xiot/core/spec/typedef/ownership/Ownership.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/ownership/Ownership.js +26 -0
- package/dist/xiot/core/spec/typedef/product/Product.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/product/Product.js +25 -0
- package/dist/xiot/core/spec/typedef/product/ProductVersion.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/product/ProductVersion.js +24 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResource.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResource.js +13 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResourceVersion.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResourceVersion.js +12 -0
- package/dist/xiot/core/spec/typedef/product/resource/ResourceVersion.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/product/resource/ResourceVersion.js +30 -0
- package/dist/xiot/core/spec/typedef/rbac/Permission.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/rbac/Permission.js +13 -0
- package/dist/xiot/core/spec/typedef/rbac/Role.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rbac/Role.js +12 -0
- package/dist/xiot/core/spec/typedef/rbac/account/Account.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/rbac/account/Account.js +16 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Member.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Member.js +22 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Organization.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Organization.js +12 -0
- package/dist/xiot/core/spec/typedef/registry/DeviceRegistry.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/registry/DeviceRegistry.js +7 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPoint.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPoint.js +10 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPointType.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPointType.js +24 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointEventbus.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointEventbus.js +12 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointHttp.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointHttp.js +13 -0
- package/dist/xiot/core/spec/typedef/rule/Rule.d.ts +44 -0
- package/dist/xiot/core/spec/typedef/rule/Rule.js +174 -0
- package/dist/xiot/core/spec/typedef/rule/RuleContent.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/RuleContent.js +56 -0
- package/dist/xiot/core/spec/typedef/rule/RuleType.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rule/RuleType.js +11 -0
- package/dist/xiot/core/spec/typedef/rule/condition/AbstractCondition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rule/condition/AbstractCondition.js +12 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ComplexCondition.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ComplexCondition.js +57 -0
- package/dist/xiot/core/spec/typedef/rule/condition/EventCondition.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/condition/EventCondition.js +59 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalCondition.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalCondition.js +43 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalType.js +9 -0
- package/dist/xiot/core/spec/typedef/rule/condition/NowCondition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/condition/NowCondition.js +15 -0
- package/dist/xiot/core/spec/typedef/rule/condition/PropertyCondition.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/condition/PropertyCondition.js +48 -0
- package/dist/xiot/core/spec/typedef/rule/condition/TimeCondition.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/rule/condition/TimeCondition.js +85 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/ComparisonOperator.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/ComparisonOperator.js +32 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/LogicalOperator.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/LogicalOperator.js +22 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Comparator.d.ts +2 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Comparator.js +20 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Compare.d.ts +21 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Compare.js +67 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logic.d.ts +2 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logic.js +16 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logical.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logical.js +15 -0
- package/dist/xiot/core/spec/typedef/rule/cron/CronExp.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/cron/CronExp.js +102 -0
- package/dist/xiot/core/spec/typedef/rule/listener/RuleExecutionListener.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/listener/RuleExecutionListener.js +2 -0
- package/dist/xiot/core/spec/typedef/rule/parser/RuleContentParser.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/rule/parser/RuleContentParser.js +70 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/ConditionParser.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/ConditionParser.js +72 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser0/Parser0.d.ts +28 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser0/Parser0.js +148 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser1/Parser1.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser1/Parser1.js +90 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Parser2.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Parser2.js +289 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/ParserState2.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/ParserState2.js +17 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Token2.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Token2.js +68 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationParser.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationParser.js +331 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationState.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationState.js +23 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Token.d.ts +91 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Token.js +269 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Tokenizer.d.ts +29 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Tokenizer.js +483 -0
- package/dist/xiot/core/spec/typedef/shadow/DeviceShadow.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/shadow/DeviceShadow.js +10 -0
- package/dist/xiot/core/spec/typedef/shadow/Shadow.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/shadow/Shadow.js +13 -0
- package/dist/xiot/core/spec/typedef/somewhere/Somewhere.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/somewhere/Somewhere.js +45 -0
- package/dist/xiot/core/spec/typedef/somewhere/Where.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/somewhere/Where.js +26 -0
- package/dist/xiot/core/spec/typedef/space/Space.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/space/Space.js +20 -0
- package/dist/xiot/core/spec/typedef/status/AbstractStatus.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/status/AbstractStatus.js +23 -0
- package/dist/xiot/core/spec/typedef/status/Status.d.ts +50 -0
- package/dist/xiot/core/spec/typedef/status/Status.js +54 -0
- package/dist/xiot/core/spec/typedef/summary/Summary.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/summary/Summary.js +120 -0
- package/dist/xiot/core/spec/typedef/template/ActionTemplate.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/template/ActionTemplate.js +33 -0
- package/dist/xiot/core/spec/typedef/template/DeviceTemplate.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/template/DeviceTemplate.js +23 -0
- package/dist/xiot/core/spec/typedef/template/EventTemplate.d.ts +15 -0
- package/dist/xiot/core/spec/typedef/template/EventTemplate.js +26 -0
- package/dist/xiot/core/spec/typedef/template/PropertyTemplate.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/template/PropertyTemplate.js +16 -0
- package/dist/xiot/core/spec/typedef/template/ServiceTemplate.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/template/ServiceTemplate.js +46 -0
- package/dist/xiot/core/spec/typedef/utils/Stack.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/utils/Stack.js +35 -0
- package/dist/xiot/core/spec/typedef/utils/StringUtils.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/utils/StringUtils.js +14 -0
- package/dist/xiot/core/spec/typedef/utils/TemplateHelper.d.ts +30 -0
- package/dist/xiot/core/spec/typedef/utils/TemplateHelper.js +285 -0
- package/dist/xiot/core/spec/typedef/version/Version.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/version/Version.js +40 -0
- package/dist/xiot/core/spec/typedef/xid/ActionID.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/xid/ActionID.js +27 -0
- package/dist/xiot/core/spec/typedef/xid/EventID.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/xid/EventID.js +20 -0
- package/dist/xiot/core/spec/typedef/xid/PropertyID.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/xid/PropertyID.js +20 -0
- package/dist/xiot/core/spec/typedef/xid/XID3.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/xid/XID3.js +41 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ActionControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ActionControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/DeviceControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/DeviceControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/EventControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/EventControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/PropertyControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/PropertyControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ServiceControlledCodec.d.ts +2 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ServiceControlledCodec.js +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/ActionControllerCodec.d.ts +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/ActionControllerCodec.js +30 -0
- package/dist/xiot/core/support/codegen/codec/controller/DeviceControllerCodec.d.ts +5 -0
- package/dist/xiot/core/support/codegen/codec/controller/DeviceControllerCodec.js +20 -0
- package/dist/xiot/core/support/codegen/codec/controller/EventControllerCodec.d.ts +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/EventControllerCodec.js +29 -0
- package/dist/xiot/core/support/codegen/codec/controller/PropertyControllerCodec.d.ts +7 -0
- package/dist/xiot/core/support/codegen/codec/controller/PropertyControllerCodec.js +25 -0
- package/dist/xiot/core/support/codegen/codec/controller/ServiceControllerCodec.d.ts +5 -0
- package/dist/xiot/core/support/codegen/codec/controller/ServiceControllerCodec.js +31 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ActionControlled.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ActionControlled.js +25 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/DeviceControlled.d.ts +3 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/DeviceControlled.js +7 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/EventControlled.d.ts +12 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/EventControlled.js +20 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/PropertyControlled.d.ts +18 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/PropertyControlled.js +122 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ServiceControlled.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ServiceControlled.js +10 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ActionController.d.ts +10 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ActionController.js +15 -0
- package/dist/xiot/core/support/codegen/typedef/controller/DeviceController.d.ts +23 -0
- package/dist/xiot/core/support/codegen/typedef/controller/DeviceController.js +86 -0
- package/dist/xiot/core/support/codegen/typedef/controller/EventController.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controller/EventController.js +12 -0
- package/dist/xiot/core/support/codegen/typedef/controller/PropertyController.d.ts +27 -0
- package/dist/xiot/core/support/codegen/typedef/controller/PropertyController.js +144 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ServiceController.d.ts +15 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ServiceController.js +70 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SomewhereController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SomewhereController.js +32 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SummaryController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SummaryController.js +55 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/ActionInvokerWrapper.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/ActionInvokerWrapper.js +27 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/PropertySetterWrapper.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/PropertySetterWrapper.js +27 -0
- package/dist/xiot/core/support/codegen/typedef/result/Result.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/result/Result.js +15 -0
- package/dist/xiot/core/support/codegen/typedef/rule/RuleController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/rule/RuleController.js +14 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/RuleStatus.d.ts +2 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/RuleStatus.js +2 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleExecuted.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleExecuted.js +11 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleReady.d.ts +3 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleReady.js +6 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleTriggered.d.ts +6 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleTriggered.js +10 -0
- package/package.json +62 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Parser1 = void 0;
|
|
4
|
+
const Stack_1 = require("../../../../utils/Stack");
|
|
5
|
+
const Token_1 = require("../../token/Token");
|
|
6
|
+
const Parser0_1 = require("../parser0/Parser0");
|
|
7
|
+
class Parser1 {
|
|
8
|
+
/**
|
|
9
|
+
* 将表达式转为逆波兰表达式
|
|
10
|
+
* @param expression 表达式
|
|
11
|
+
* @return stack 逆波兰表达式
|
|
12
|
+
*/
|
|
13
|
+
static parse(expression) {
|
|
14
|
+
return this.parseTokens(new Parser0_1.Parser0().parse(expression));
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* https://www.fatalerrors.org/index.php/a/prefix-suffix-suffix-expression-inverse-polish-expression.html
|
|
18
|
+
* @param tokens 表达式
|
|
19
|
+
* @return stack 逆波兰表达式
|
|
20
|
+
*/
|
|
21
|
+
static parseTokens(tokens) {
|
|
22
|
+
// 1 初始化2个栈:运算符栈s1和存储中间结果的栈s2
|
|
23
|
+
const s1 = new Stack_1.Stack(), s2 = new Stack_1.Stack();
|
|
24
|
+
while (tokens.length > 0) {
|
|
25
|
+
// 2 从左到右扫描中缀表达式
|
|
26
|
+
const token = tokens.shift();
|
|
27
|
+
if (token === undefined) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
// 3 遇到操作数,压入s2
|
|
31
|
+
if (token.isOperand()) {
|
|
32
|
+
s2.push(token);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
// 4 遇到运算符, 比较其与s1栈顶运算符的优先级
|
|
36
|
+
if (token.isOperator()) {
|
|
37
|
+
while (true) {
|
|
38
|
+
// 4.1 如果s1为空,或栈顶运算符为左括号'(',则直接将此运算符入栈
|
|
39
|
+
if (s1.empty() || s1.peek().type === Token_1.TokenType.LEFT_PARENTHESES) {
|
|
40
|
+
s1.push(token);
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
else if (token.priority() > s1.peek().priority()) {
|
|
44
|
+
s1.push(token);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
// 4.3 否则,将s1栈顶的运算符弹出并压入到s2中,再次转入4.1
|
|
48
|
+
const t = s1.pop();
|
|
49
|
+
if (t !== undefined) {
|
|
50
|
+
s2.push(t);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
// 5 遇到括号
|
|
56
|
+
if (token.isParentheses()) {
|
|
57
|
+
// 5.1 如果是左括号'(',则直接压入s1
|
|
58
|
+
if (token.type === Token_1.TokenType.LEFT_PARENTHESES) {
|
|
59
|
+
s1.push(token);
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
// 5.2 如果是右括号')',则依次弹出s1栈顶的运算符,并压入s2,直到遇到左括号'('为止,此时将这一对括号丢弃
|
|
63
|
+
if (token.type === Token_1.TokenType.RIGHT_PARENTHESES) {
|
|
64
|
+
while (s1.size() > 0) {
|
|
65
|
+
const t = s1.pop();
|
|
66
|
+
if (t === undefined) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (t.type === Token_1.TokenType.LEFT_PARENTHESES) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
s2.push(t);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// 7 将s1剩余的运算符依次弹出并压入s2
|
|
78
|
+
while (s1.size() > 0) {
|
|
79
|
+
const t = s1.pop();
|
|
80
|
+
if (t === undefined) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
s2.push(t);
|
|
84
|
+
}
|
|
85
|
+
// 8 依次弹出s2中的元素,结果的逆序即为中缀表达式对应的后缀表达式
|
|
86
|
+
s2.reverse();
|
|
87
|
+
return s2;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.Parser1 = Parser1;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Stack } from '../../../../utils/Stack';
|
|
2
|
+
import { Token2 } from './Token2';
|
|
3
|
+
import { Token } from '../../token/Token';
|
|
4
|
+
export declare class Parser2 {
|
|
5
|
+
private _stack;
|
|
6
|
+
private _state;
|
|
7
|
+
private _id1;
|
|
8
|
+
private _id2;
|
|
9
|
+
private _value;
|
|
10
|
+
/**
|
|
11
|
+
* 将一阶逆波兰表达式加工成二阶逆波兰表达式
|
|
12
|
+
*
|
|
13
|
+
* @param tokens 一阶逆波兰表达式
|
|
14
|
+
* @return token2 二阶逆波兰表达式
|
|
15
|
+
*/
|
|
16
|
+
parseTokens(tokens: Stack<Token>): Stack<Token2>;
|
|
17
|
+
private parseToken;
|
|
18
|
+
private handleStateInit;
|
|
19
|
+
private handleStateID1;
|
|
20
|
+
private handleStateID2;
|
|
21
|
+
private handleStateP_V;
|
|
22
|
+
private handleStateEX_V;
|
|
23
|
+
private handleStateP_C;
|
|
24
|
+
private handleStateEX_ID;
|
|
25
|
+
private handleStateEX_C;
|
|
26
|
+
private handleStateEVENT_C;
|
|
27
|
+
private handleStateEVENT_V;
|
|
28
|
+
private handleStateL;
|
|
29
|
+
private static getEventId;
|
|
30
|
+
private static getPropertyId;
|
|
31
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Parser2 = void 0;
|
|
4
|
+
const Stack_1 = require("../../../../utils/Stack");
|
|
5
|
+
const Token2_1 = require("./Token2");
|
|
6
|
+
const ParserState2_1 = require("./ParserState2");
|
|
7
|
+
const Token_1 = require("../../token/Token");
|
|
8
|
+
const ComparisonOperator_1 = require("../../../condition/operator/ComparisonOperator");
|
|
9
|
+
const PropertyCondition_1 = require("../../../condition/PropertyCondition");
|
|
10
|
+
const ExternalType_1 = require("../../../condition/ExternalType");
|
|
11
|
+
const NowCondition_1 = require("../../../condition/NowCondition");
|
|
12
|
+
const TimeCondition_1 = require("../../../condition/TimeCondition");
|
|
13
|
+
const ExternalCondition_1 = require("../../../condition/ExternalCondition");
|
|
14
|
+
const EventCondition_1 = require("../../../condition/EventCondition");
|
|
15
|
+
const EventID_1 = require("../../../../xid/EventID");
|
|
16
|
+
const PropertyID_1 = require("../../../../xid/PropertyID");
|
|
17
|
+
class Parser2 {
|
|
18
|
+
constructor() {
|
|
19
|
+
this._stack = new Stack_1.Stack();
|
|
20
|
+
this._state = ParserState2_1.ParserState2.INIT;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 将一阶逆波兰表达式加工成二阶逆波兰表达式
|
|
24
|
+
*
|
|
25
|
+
* @param tokens 一阶逆波兰表达式
|
|
26
|
+
* @return token2 二阶逆波兰表达式
|
|
27
|
+
*/
|
|
28
|
+
parseTokens(tokens) {
|
|
29
|
+
this._stack = new Stack_1.Stack();
|
|
30
|
+
this._state = ParserState2_1.ParserState2.INIT;
|
|
31
|
+
while (tokens.size() > 0) {
|
|
32
|
+
const token = tokens.pop();
|
|
33
|
+
if (token === undefined) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
this.parseToken(token);
|
|
37
|
+
}
|
|
38
|
+
this._stack.reverse();
|
|
39
|
+
return this._stack;
|
|
40
|
+
}
|
|
41
|
+
parseToken(token) {
|
|
42
|
+
switch (this._state) {
|
|
43
|
+
case ParserState2_1.ParserState2.INIT:
|
|
44
|
+
this.handleStateInit(token);
|
|
45
|
+
break;
|
|
46
|
+
case ParserState2_1.ParserState2.ID1:
|
|
47
|
+
this.handleStateID1(token);
|
|
48
|
+
break;
|
|
49
|
+
case ParserState2_1.ParserState2.ID2:
|
|
50
|
+
this.handleStateID2(token);
|
|
51
|
+
break;
|
|
52
|
+
case ParserState2_1.ParserState2.EX_ID:
|
|
53
|
+
this.handleStateEX_ID(token);
|
|
54
|
+
break;
|
|
55
|
+
case ParserState2_1.ParserState2.P_V:
|
|
56
|
+
this.handleStateP_V(token);
|
|
57
|
+
break;
|
|
58
|
+
case ParserState2_1.ParserState2.EX_V:
|
|
59
|
+
this.handleStateEX_V(token);
|
|
60
|
+
break;
|
|
61
|
+
case ParserState2_1.ParserState2.EVENT_V:
|
|
62
|
+
this.handleStateEVENT_V(token);
|
|
63
|
+
break;
|
|
64
|
+
case ParserState2_1.ParserState2.P_C:
|
|
65
|
+
this.handleStateP_C(token);
|
|
66
|
+
break;
|
|
67
|
+
case ParserState2_1.ParserState2.EX_C:
|
|
68
|
+
this.handleStateEX_C(token);
|
|
69
|
+
break;
|
|
70
|
+
case ParserState2_1.ParserState2.EVENT_C:
|
|
71
|
+
this.handleStateEVENT_C(token);
|
|
72
|
+
break;
|
|
73
|
+
case ParserState2_1.ParserState2.L:
|
|
74
|
+
this.handleStateL(token);
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
throw new Error('state undefined: ' + this._state);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
handleStateInit(token) {
|
|
81
|
+
if (token.type === Token_1.TokenType.XID3) {
|
|
82
|
+
this._id1 = token;
|
|
83
|
+
this._state = ParserState2_1.ParserState2.ID1;
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (token.type === Token_1.TokenType.EXID) {
|
|
87
|
+
this._id1 = token;
|
|
88
|
+
this._state = ParserState2_1.ParserState2.EX_ID;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
throw new Error('state is INIT, token expected is ID, but token is ' + token.type + ': ' + token);
|
|
92
|
+
}
|
|
93
|
+
handleStateID1(token) {
|
|
94
|
+
if (token.type === Token_1.TokenType.XID3) {
|
|
95
|
+
this._id2 = token;
|
|
96
|
+
this._state = ParserState2_1.ParserState2.ID2;
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (token.isValue()) {
|
|
100
|
+
this._value = token;
|
|
101
|
+
this._state = ParserState2_1.ParserState2.P_V;
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (token.type === Token_1.TokenType.EVENT_VALUE) {
|
|
105
|
+
this._value = token;
|
|
106
|
+
this._state = ParserState2_1.ParserState2.EVENT_V;
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
throw new Error('state is P1, token expected is ID or Value, but token is ' + token.type + ': ' + token);
|
|
110
|
+
}
|
|
111
|
+
handleStateID2(token) {
|
|
112
|
+
if (token.isComparisonOperator()) {
|
|
113
|
+
const operator = (0, ComparisonOperator_1.getComparisonOperator)(token.toString());
|
|
114
|
+
this._stack.push(Token2_1.Token2.createWithCondition(new PropertyCondition_1.PropertyCondition(Parser2.getPropertyId(this._id1), Parser2.getPropertyId(this._id2), operator)));
|
|
115
|
+
this._state = ParserState2_1.ParserState2.P_C;
|
|
116
|
+
this._id1 = undefined;
|
|
117
|
+
this._id2 = undefined;
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
throw new Error('state is P2, token expected is ComparisonOperator, but token is ' + token.type + ': ' + token);
|
|
121
|
+
}
|
|
122
|
+
handleStateP_V(token) {
|
|
123
|
+
if (this._value === undefined) {
|
|
124
|
+
throw new Error('Parser2: value is undefined');
|
|
125
|
+
}
|
|
126
|
+
if (token.isComparisonOperator()) {
|
|
127
|
+
const operator = (0, ComparisonOperator_1.getComparisonOperator)(token.toString());
|
|
128
|
+
this._stack.push(Token2_1.Token2.createWithCondition(new PropertyCondition_1.PropertyCondition(Parser2.getPropertyId(this._id1), this._value.getValue(), operator)));
|
|
129
|
+
this._state = ParserState2_1.ParserState2.P_C;
|
|
130
|
+
this._id1 = undefined;
|
|
131
|
+
this._value = undefined;
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
throw new Error('state is P_V, token expected is ComparisonOperator, but token is ' + token.type + ': ' + token);
|
|
135
|
+
}
|
|
136
|
+
handleStateEX_V(token) {
|
|
137
|
+
if (this._value === undefined) {
|
|
138
|
+
throw new Error('Parser2: value is undefined');
|
|
139
|
+
}
|
|
140
|
+
if (this._id1 === undefined) {
|
|
141
|
+
throw new Error('Parser2: _id1 is undefined');
|
|
142
|
+
}
|
|
143
|
+
if (token.isComparisonOperator()) {
|
|
144
|
+
const operator = (0, ComparisonOperator_1.getComparisonOperator)(token.toString());
|
|
145
|
+
let condition;
|
|
146
|
+
switch (this._id1.toString()) {
|
|
147
|
+
case ExternalType_1.ExternalType.NOW:
|
|
148
|
+
condition = new NowCondition_1.NowCondition(this._value.getValue().toString());
|
|
149
|
+
break;
|
|
150
|
+
case ExternalType_1.ExternalType.TIME:
|
|
151
|
+
condition = new TimeCondition_1.TimeCondition(this._value.getValue().toString());
|
|
152
|
+
break;
|
|
153
|
+
default:
|
|
154
|
+
condition = new ExternalCondition_1.ExternalCondition(this._id1.toString(), this._value.getValue(), operator);
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
this._stack.push(Token2_1.Token2.createWithCondition(condition));
|
|
158
|
+
this._state = ParserState2_1.ParserState2.EX_C;
|
|
159
|
+
this._id1 = undefined;
|
|
160
|
+
this._value = undefined;
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
throw new Error('state is EX_V, token expected is ComparisonOperator, but token is ' + token.type + ': ' + token);
|
|
164
|
+
}
|
|
165
|
+
handleStateP_C(token) {
|
|
166
|
+
if (token.type === Token_1.TokenType.XID3) {
|
|
167
|
+
this._id1 = token;
|
|
168
|
+
this._state = ParserState2_1.ParserState2.ID1;
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (token.type === Token_1.TokenType.EXID) {
|
|
172
|
+
this._id1 = token;
|
|
173
|
+
this._state = ParserState2_1.ParserState2.EX_ID;
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (token.isLogicalOperator()) {
|
|
177
|
+
this._stack.push(new Token2_1.Token2(Token2_1.Token2Type.LOGICAL_OPERATOR, token.toString()));
|
|
178
|
+
this._state = ParserState2_1.ParserState2.L;
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
throw new Error('state is P_C, token expected is ID or LogicalOperator, but token is ' + token.type + ': ' + token);
|
|
182
|
+
}
|
|
183
|
+
handleStateEX_ID(token) {
|
|
184
|
+
if (token.isValue()) {
|
|
185
|
+
this._value = token;
|
|
186
|
+
this._state = ParserState2_1.ParserState2.EX_V;
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
throw new Error('state is EX_ID, token expected is EX_V, but token is ' + token.type + ': ' + token);
|
|
190
|
+
}
|
|
191
|
+
handleStateEX_C(token) {
|
|
192
|
+
if (token.type === Token_1.TokenType.XID3) {
|
|
193
|
+
this._id1 = token;
|
|
194
|
+
this._state = ParserState2_1.ParserState2.ID1;
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (token.type === Token_1.TokenType.EXID) {
|
|
198
|
+
this._id1 = token;
|
|
199
|
+
this._state = ParserState2_1.ParserState2.EX_ID;
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
if (token.isLogicalOperator()) {
|
|
203
|
+
this._stack.push(new Token2_1.Token2(Token2_1.Token2Type.LOGICAL_OPERATOR, token.toString()));
|
|
204
|
+
this._state = ParserState2_1.ParserState2.L;
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
throw new Error('state is EX_C, token expected is ID or LogicalOperator, but token is ' + token.type + ': ' + token);
|
|
208
|
+
}
|
|
209
|
+
handleStateEVENT_C(token) {
|
|
210
|
+
if (token.type === Token_1.TokenType.XID3) {
|
|
211
|
+
this._id1 = token;
|
|
212
|
+
this._state = ParserState2_1.ParserState2.ID1;
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
if (token.type === Token_1.TokenType.EXID) {
|
|
216
|
+
this._id1 = token;
|
|
217
|
+
this._state = ParserState2_1.ParserState2.EX_ID;
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
if (token.isLogicalOperator()) {
|
|
221
|
+
this._stack.push(new Token2_1.Token2(Token2_1.Token2Type.LOGICAL_OPERATOR, token.toString()));
|
|
222
|
+
this._state = ParserState2_1.ParserState2.L;
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
throw new Error('state is EX_C, token expected is ID or LogicalOperator, but token is ' + token.type + ': ' + token);
|
|
226
|
+
}
|
|
227
|
+
handleStateEVENT_V(token) {
|
|
228
|
+
if (token.type === Token_1.TokenType.OP_EQUAL) {
|
|
229
|
+
const condition = new EventCondition_1.EventCondition(Parser2.getEventId(this._id1));
|
|
230
|
+
if (this._value === undefined) {
|
|
231
|
+
throw new Error('Parser2: value is undefined');
|
|
232
|
+
}
|
|
233
|
+
condition.arguments = this._value.arguments;
|
|
234
|
+
this._stack.push(Token2_1.Token2.createWithCondition(condition));
|
|
235
|
+
this._state = ParserState2_1.ParserState2.EVENT_C;
|
|
236
|
+
this._id1 = undefined;
|
|
237
|
+
this._value = undefined;
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
throw new Error('state is EVENT_V, token expected is \'==\', but token is ' + token.type + ': ' + token);
|
|
241
|
+
}
|
|
242
|
+
handleStateL(token) {
|
|
243
|
+
if (token.isLogicalOperator()) {
|
|
244
|
+
this._stack.push(new Token2_1.Token2(Token2_1.Token2Type.LOGICAL_OPERATOR, token.toString()));
|
|
245
|
+
this._state = ParserState2_1.ParserState2.L;
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
if (token.type === Token_1.TokenType.XID3) {
|
|
249
|
+
this._id1 = token;
|
|
250
|
+
this._state = ParserState2_1.ParserState2.ID1;
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
if (token.type === Token_1.TokenType.EXID) {
|
|
254
|
+
this._id1 = token;
|
|
255
|
+
this._state = ParserState2_1.ParserState2.EX_ID;
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
throw new Error('state is L, token expected is LogicalOperator or ID, but token is ' + token.type + ': ' + token);
|
|
259
|
+
}
|
|
260
|
+
static getEventId(token) {
|
|
261
|
+
if (token === undefined) {
|
|
262
|
+
throw new Error('Parser2: token is undefined');
|
|
263
|
+
}
|
|
264
|
+
const value = token.toString();
|
|
265
|
+
if (token.type !== Token_1.TokenType.XID3) {
|
|
266
|
+
throw new Error('表达式错误,token不是合法的ID: ' + value);
|
|
267
|
+
}
|
|
268
|
+
const eid = new EventID_1.EventID(value);
|
|
269
|
+
if (!eid.valid) {
|
|
270
|
+
throw new Error('表达式错误,EID不合法: ' + value);
|
|
271
|
+
}
|
|
272
|
+
return eid;
|
|
273
|
+
}
|
|
274
|
+
static getPropertyId(token) {
|
|
275
|
+
if (token === undefined) {
|
|
276
|
+
throw new Error('Parser2: token is undefined');
|
|
277
|
+
}
|
|
278
|
+
const value = token.toString();
|
|
279
|
+
if (token.type !== Token_1.TokenType.XID3) {
|
|
280
|
+
throw new Error('表达式错误,token不是合法的ID: ' + value);
|
|
281
|
+
}
|
|
282
|
+
const pid = new PropertyID_1.PropertyID(value);
|
|
283
|
+
if (!pid.valid) {
|
|
284
|
+
throw new Error('表达式错误,PID不合法: ' + value);
|
|
285
|
+
}
|
|
286
|
+
return pid;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
exports.Parser2 = Parser2;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum ParserState2 {
|
|
2
|
+
INIT = 0,// initialize
|
|
3
|
+
ID1 = 1,// property id 1 or event id
|
|
4
|
+
ID2 = 2,// property id 2
|
|
5
|
+
EX_ID = 3,// external Id
|
|
6
|
+
P_V = 4,// property value
|
|
7
|
+
EX_V = 5,// external value
|
|
8
|
+
EVENT_V = 6,// event value
|
|
9
|
+
P_C = 7,// comparison operator for property
|
|
10
|
+
EX_C = 8,// comparison operator for external
|
|
11
|
+
EVENT_C = 9,// comparison operator for event
|
|
12
|
+
L = 10
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParserState2 = void 0;
|
|
4
|
+
var ParserState2;
|
|
5
|
+
(function (ParserState2) {
|
|
6
|
+
ParserState2[ParserState2["INIT"] = 0] = "INIT";
|
|
7
|
+
ParserState2[ParserState2["ID1"] = 1] = "ID1";
|
|
8
|
+
ParserState2[ParserState2["ID2"] = 2] = "ID2";
|
|
9
|
+
ParserState2[ParserState2["EX_ID"] = 3] = "EX_ID";
|
|
10
|
+
ParserState2[ParserState2["P_V"] = 4] = "P_V";
|
|
11
|
+
ParserState2[ParserState2["EX_V"] = 5] = "EX_V";
|
|
12
|
+
ParserState2[ParserState2["EVENT_V"] = 6] = "EVENT_V";
|
|
13
|
+
ParserState2[ParserState2["P_C"] = 7] = "P_C";
|
|
14
|
+
ParserState2[ParserState2["EX_C"] = 8] = "EX_C";
|
|
15
|
+
ParserState2[ParserState2["EVENT_C"] = 9] = "EVENT_C";
|
|
16
|
+
ParserState2[ParserState2["L"] = 10] = "L";
|
|
17
|
+
})(ParserState2 || (exports.ParserState2 = ParserState2 = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AbstractCondition } from '../../../condition/AbstractCondition';
|
|
2
|
+
export declare enum Token2Type {
|
|
3
|
+
PROPERTY_CONDITION = 0,
|
|
4
|
+
EXTERNAL_CONDITION = 1,
|
|
5
|
+
EVENT_CONDITION = 2,
|
|
6
|
+
COMPARISON_OPERATOR = 3,
|
|
7
|
+
LOGICAL_OPERATOR = 4
|
|
8
|
+
}
|
|
9
|
+
export declare class Token2 {
|
|
10
|
+
private _type;
|
|
11
|
+
private _condition;
|
|
12
|
+
private _operator;
|
|
13
|
+
static createWithCondition(condition: AbstractCondition): Token2;
|
|
14
|
+
constructor(type: Token2Type | undefined, operator: string);
|
|
15
|
+
get type(): Token2Type;
|
|
16
|
+
set type(value: Token2Type);
|
|
17
|
+
get condition(): AbstractCondition;
|
|
18
|
+
set condition(value: AbstractCondition);
|
|
19
|
+
get operator(): string;
|
|
20
|
+
set operator(value: string);
|
|
21
|
+
toString(): string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Token2 = exports.Token2Type = void 0;
|
|
4
|
+
const PropertyCondition_1 = require("../../../condition/PropertyCondition");
|
|
5
|
+
const EventCondition_1 = require("../../../condition/EventCondition");
|
|
6
|
+
const ExternalCondition_1 = require("../../../condition/ExternalCondition");
|
|
7
|
+
var Token2Type;
|
|
8
|
+
(function (Token2Type) {
|
|
9
|
+
Token2Type[Token2Type["PROPERTY_CONDITION"] = 0] = "PROPERTY_CONDITION";
|
|
10
|
+
Token2Type[Token2Type["EXTERNAL_CONDITION"] = 1] = "EXTERNAL_CONDITION";
|
|
11
|
+
Token2Type[Token2Type["EVENT_CONDITION"] = 2] = "EVENT_CONDITION";
|
|
12
|
+
Token2Type[Token2Type["COMPARISON_OPERATOR"] = 3] = "COMPARISON_OPERATOR";
|
|
13
|
+
Token2Type[Token2Type["LOGICAL_OPERATOR"] = 4] = "LOGICAL_OPERATOR";
|
|
14
|
+
})(Token2Type || (exports.Token2Type = Token2Type = {}));
|
|
15
|
+
class Token2 {
|
|
16
|
+
static createWithCondition(condition) {
|
|
17
|
+
let typ;
|
|
18
|
+
if (condition instanceof PropertyCondition_1.PropertyCondition) {
|
|
19
|
+
typ = Token2Type.PROPERTY_CONDITION;
|
|
20
|
+
}
|
|
21
|
+
else if (condition instanceof EventCondition_1.EventCondition) {
|
|
22
|
+
typ = Token2Type.EVENT_CONDITION;
|
|
23
|
+
}
|
|
24
|
+
else if (condition instanceof ExternalCondition_1.ExternalCondition) {
|
|
25
|
+
typ = Token2Type.EXTERNAL_CONDITION;
|
|
26
|
+
}
|
|
27
|
+
const token = new Token2(typ, '');
|
|
28
|
+
token.condition = condition;
|
|
29
|
+
return token;
|
|
30
|
+
}
|
|
31
|
+
constructor(type, operator) {
|
|
32
|
+
this._type = type;
|
|
33
|
+
this._operator = operator;
|
|
34
|
+
}
|
|
35
|
+
get type() {
|
|
36
|
+
return this._type;
|
|
37
|
+
}
|
|
38
|
+
set type(value) {
|
|
39
|
+
this._type = value;
|
|
40
|
+
}
|
|
41
|
+
get condition() {
|
|
42
|
+
return this._condition;
|
|
43
|
+
}
|
|
44
|
+
set condition(value) {
|
|
45
|
+
this._condition = value;
|
|
46
|
+
}
|
|
47
|
+
get operator() {
|
|
48
|
+
return this._operator;
|
|
49
|
+
}
|
|
50
|
+
set operator(value) {
|
|
51
|
+
this._operator = value;
|
|
52
|
+
}
|
|
53
|
+
toString() {
|
|
54
|
+
switch (this.type) {
|
|
55
|
+
case Token2Type.PROPERTY_CONDITION:
|
|
56
|
+
case Token2Type.EVENT_CONDITION:
|
|
57
|
+
return this.condition.toString();
|
|
58
|
+
case Token2Type.EXTERNAL_CONDITION:
|
|
59
|
+
return '@' + this.condition.toString();
|
|
60
|
+
case Token2Type.COMPARISON_OPERATOR:
|
|
61
|
+
case Token2Type.LOGICAL_OPERATOR:
|
|
62
|
+
return this.operator;
|
|
63
|
+
default:
|
|
64
|
+
return '?';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.Token2 = Token2;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AbstractOperation } from '../../../operation/AbstractOperation';
|
|
2
|
+
import { Token } from '../token/Token';
|
|
3
|
+
export declare class OperationParser {
|
|
4
|
+
private operations;
|
|
5
|
+
private state;
|
|
6
|
+
private operation;
|
|
7
|
+
private xid;
|
|
8
|
+
private iid;
|
|
9
|
+
parseExpression(expression: string): Array<AbstractOperation>;
|
|
10
|
+
parseTokens(tokens: Array<Token>): Array<AbstractOperation>;
|
|
11
|
+
private parse;
|
|
12
|
+
private handleStateInit;
|
|
13
|
+
private handleStateID_XID3;
|
|
14
|
+
private handleStateID_SLEEP;
|
|
15
|
+
private handleStateID_REMIND;
|
|
16
|
+
private handleStateID_SCENE;
|
|
17
|
+
private handleStateOP_SLEEP;
|
|
18
|
+
private handleStateOP_REMIND;
|
|
19
|
+
private handleStateOP_XID;
|
|
20
|
+
private handleStateProperty_Value;
|
|
21
|
+
private handleStateArgument_Value;
|
|
22
|
+
private handleStateSleep_Value;
|
|
23
|
+
private handleStateRemind_Value;
|
|
24
|
+
private handleStateSEMICOLON;
|
|
25
|
+
private handleStateHASH;
|
|
26
|
+
private handleStateInteger;
|
|
27
|
+
private handleStateASSIGN;
|
|
28
|
+
private handleStateCOMMA;
|
|
29
|
+
private parseXID;
|
|
30
|
+
static toString(operations: Array<AbstractOperation>, pretty?: boolean, tab?: boolean): string;
|
|
31
|
+
}
|