From 212dd99f8d8f5f1842f6936b5df94438828da078 Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Sat, 29 Jun 2024 17:30:41 +0800 Subject: [PATCH 01/16] fix serialVersionUID --- NOTICE | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 NOTICE diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000000..a75c75d412 --- /dev/null +++ b/NOTICE @@ -0,0 +1,47 @@ +Bus Framework + + Copyright (c) 2015-2024 miaixz.org and other contributors. + + This product includes software developed by + The Miaixz Team (http://www.miaixz.org/). + + +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +MyBatis + + This product includes software developed by + The Apache Software Foundation (https://www.apache.org/). + + Copyright 2010 The Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +Spring Framework + + All Spring projects are licensed under the terms of the Apache License, Version 2.0 + + Copyright 2002-2024 the original author or authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file From acac366f8f7117afa4a01ea97ae09ab4f648526e Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Sat, 29 Jun 2024 17:31:19 +0800 Subject: [PATCH 02/16] fix serialVersionUID --- .../main/java/org/miaixz/bus/base/entity/BaseEntity.java | 2 +- .../java/org/miaixz/bus/cache/support/PreventObjects.java | 2 +- .../main/java/org/miaixz/bus/core/basics/entity/Entity.java | 2 +- .../main/java/org/miaixz/bus/core/basics/entity/OAuth2.java | 2 +- .../main/java/org/miaixz/bus/core/basics/entity/Result.java | 2 +- .../main/java/org/miaixz/bus/core/beans/StrictBeanDesc.java | 2 +- .../org/miaixz/bus/core/beans/path/AbstractBeanDesc.java | 2 +- .../bus/core/center/map/reference/WeakKeyConcurrentMap.java | 2 +- bus-cron/src/main/java/org/miaixz/bus/cron/Expression.java | 2 +- .../main/java/org/miaixz/bus/gitlab/GitLabApiException.java | 2 +- .../bus/gitlab/hooks/system/AbstractSystemHookEvent.java | 2 +- .../bus/gitlab/hooks/system/GroupMemberSystemHookEvent.java | 2 +- .../bus/gitlab/hooks/system/GroupSystemHookEvent.java | 2 +- .../miaixz/bus/gitlab/hooks/system/KeySystemHookEvent.java | 2 +- .../gitlab/hooks/system/MergeRequestSystemHookEvent.java | 2 +- .../bus/gitlab/hooks/system/ProjectSystemHookEvent.java | 2 +- .../miaixz/bus/gitlab/hooks/system/PushSystemHookEvent.java | 2 +- .../bus/gitlab/hooks/system/TagPushSystemHookEvent.java | 2 +- .../bus/gitlab/hooks/system/TeamMemberSystemHookEvent.java | 2 +- .../miaixz/bus/gitlab/hooks/system/UserSystemHookEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/hooks/web/AbstractEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/hooks/web/BuildEvent.java | 2 +- .../org/miaixz/bus/gitlab/hooks/web/DeploymentEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/hooks/web/EventLabel.java | 2 +- .../bus/gitlab/hooks/web/ExternalStatusCheckEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/hooks/web/IssueEvent.java | 2 +- .../main/java/org/miaixz/bus/gitlab/hooks/web/JobEvent.java | 2 +- .../org/miaixz/bus/gitlab/hooks/web/MergeRequestEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/hooks/web/NoteEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/hooks/web/PipelineEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/hooks/web/PushEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/hooks/web/ReleaseEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/hooks/web/TagPushEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/hooks/web/WikiPageEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/models/AbstractEpic.java | 2 +- .../java/org/miaixz/bus/gitlab/models/AbstractGroup.java | 2 +- .../java/org/miaixz/bus/gitlab/models/AbstractIssue.java | 4 ++-- .../org/miaixz/bus/gitlab/models/AbstractMinimalEpic.java | 2 +- .../java/org/miaixz/bus/gitlab/models/AbstractUser.java | 2 +- .../miaixz/bus/gitlab/models/AcceptMergeRequestParams.java | 2 +- .../java/org/miaixz/bus/gitlab/models/AccessRequest.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/AllowedTo.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Application.java | 2 +- .../org/miaixz/bus/gitlab/models/ApplicationSettings.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ApprovalRule.java | 2 +- .../org/miaixz/bus/gitlab/models/ApprovalRuleParams.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ApprovalState.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/ApprovedBy.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Artifact.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ArtifactsFile.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Assets.java | 6 +++--- .../main/java/org/miaixz/bus/gitlab/models/Assignee.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/AuditEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/models/AuditEventDetail.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Author.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/AwardEmoji.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Badge.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Blame.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Board.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/BoardList.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Branch.java | 2 +- .../org/miaixz/bus/gitlab/models/BranchAccessLevel.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Bridge.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ChangelogPayload.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Changes.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/ChildEpic.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Comment.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Commit.java | 2 +- .../java/org/miaixz/bus/gitlab/models/CommitAction.java | 2 +- .../java/org/miaixz/bus/gitlab/models/CommitPayload.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/CommitRef.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/CommitStats.java | 2 +- .../java/org/miaixz/bus/gitlab/models/CommitStatus.java | 2 +- .../org/miaixz/bus/gitlab/models/CommitStatusFilter.java | 2 +- .../java/org/miaixz/bus/gitlab/models/CompareResults.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Contributor.java | 2 +- .../java/org/miaixz/bus/gitlab/models/CreatedChildEpic.java | 2 +- .../java/org/miaixz/bus/gitlab/models/CustomAttribute.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/DeployKey.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/DeployToken.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Deployable.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Deployment.java | 2 +- .../java/org/miaixz/bus/gitlab/models/DeploymentFilter.java | 2 +- .../java/org/miaixz/bus/gitlab/models/DetailedStatus.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Diff.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/DiffRef.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Discussion.java | 2 +- .../org/miaixz/bus/gitlab/models/DownstreamPipeline.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Duration.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Email.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Environment.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Epic.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/EpicFilter.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/EpicInLink.java | 2 +- .../java/org/miaixz/bus/gitlab/models/EpicIssueLink.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Event.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/EventData.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ExportStatus.java | 2 +- .../org/miaixz/bus/gitlab/models/ExternalStatusCheck.java | 2 +- .../gitlab/models/ExternalStatusCheckProtectedBranch.java | 2 +- .../miaixz/bus/gitlab/models/ExternalStatusCheckResult.java | 2 +- .../miaixz/bus/gitlab/models/ExternalStatusCheckStatus.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/FileUpload.java | 2 +- .../java/org/miaixz/bus/gitlab/models/GitLabCiTemplate.java | 2 +- .../miaixz/bus/gitlab/models/GitLabCiTemplateElement.java | 2 +- .../java/org/miaixz/bus/gitlab/models/GpgSignature.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Group.java | 2 +- .../java/org/miaixz/bus/gitlab/models/GroupAccessToken.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/GroupFilter.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/GroupParams.java | 2 +- .../org/miaixz/bus/gitlab/models/GroupProjectsFilter.java | 2 +- .../java/org/miaixz/bus/gitlab/models/HealthCheckInfo.java | 2 +- .../java/org/miaixz/bus/gitlab/models/HealthCheckItem.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Identity.java | 2 +- .../org/miaixz/bus/gitlab/models/ImpersonationToken.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ImportStatus.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Issue.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/IssueEvent.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/IssueFilter.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/IssueLink.java | 2 +- .../java/org/miaixz/bus/gitlab/models/IssuesStatistics.java | 6 +++--- .../miaixz/bus/gitlab/models/IssuesStatisticsFilter.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Iteration.java | 2 +- .../java/org/miaixz/bus/gitlab/models/IterationFilter.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Job.java | 2 +- .../java/org/miaixz/bus/gitlab/models/JobAttribute.java | 2 +- .../java/org/miaixz/bus/gitlab/models/JobAttributes.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Key.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Label.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/LabelEvent.java | 2 +- .../java/org/miaixz/bus/gitlab/models/LdapGroupLink.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/License.java | 2 +- .../java/org/miaixz/bus/gitlab/models/LicenseTemplate.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Link.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Markdown.java | 2 +- .../java/org/miaixz/bus/gitlab/models/MarkdownRequest.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Member.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Membership.java | 2 +- .../java/org/miaixz/bus/gitlab/models/MergeRequest.java | 2 +- .../java/org/miaixz/bus/gitlab/models/MergeRequestDiff.java | 2 +- .../org/miaixz/bus/gitlab/models/MergeRequestFilter.java | 2 +- .../org/miaixz/bus/gitlab/models/MergeRequestParams.java | 2 +- .../org/miaixz/bus/gitlab/models/MergeRequestVersion.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Metadata.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Milestone.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Namespace.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Note.java | 2 +- .../org/miaixz/bus/gitlab/models/NotificationSettings.java | 4 ++-- .../org/miaixz/bus/gitlab/models/OauthTokenResponse.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Owner.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Package.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/PackageFile.java | 2 +- .../java/org/miaixz/bus/gitlab/models/PackageFilter.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Participant.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Permissions.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Pipeline.java | 2 +- .../java/org/miaixz/bus/gitlab/models/PipelineFilter.java | 2 +- .../java/org/miaixz/bus/gitlab/models/PipelineSchedule.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Position.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Project.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ProjectAccess.java | 2 +- .../org/miaixz/bus/gitlab/models/ProjectAccessToken.java | 2 +- .../miaixz/bus/gitlab/models/ProjectApprovalsConfig.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ProjectFetches.java | 6 +++--- .../java/org/miaixz/bus/gitlab/models/ProjectFilter.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ProjectGroup.java | 2 +- .../org/miaixz/bus/gitlab/models/ProjectGroupsFilter.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/ProjectHook.java | 2 +- .../org/miaixz/bus/gitlab/models/ProjectStatistics.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/ProjectUser.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ProtectedBranch.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ProtectedTag.java | 4 ++-- .../main/java/org/miaixz/bus/gitlab/models/PushRules.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/References.java | 2 +- .../org/miaixz/bus/gitlab/models/RegistryRepository.java | 2 +- .../org/miaixz/bus/gitlab/models/RegistryRepositoryTag.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/RelatedEpic.java | 2 +- .../java/org/miaixz/bus/gitlab/models/RelatedEpicLink.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Release.java | 2 +- .../java/org/miaixz/bus/gitlab/models/ReleaseParams.java | 2 +- .../java/org/miaixz/bus/gitlab/models/RemoteMirror.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Repository.java | 2 +- .../java/org/miaixz/bus/gitlab/models/RepositoryFile.java | 2 +- .../miaixz/bus/gitlab/models/RepositoryFileResponse.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Reviewer.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Runner.java | 2 +- .../java/org/miaixz/bus/gitlab/models/RunnerDetail.java | 2 +- .../java/org/miaixz/bus/gitlab/models/SamlGroupLink.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/SearchBlob.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/SharedGroup.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Snippet.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/SshKey.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/SystemHook.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Tag.java | 2 +- .../org/miaixz/bus/gitlab/models/TaskCompletionStatus.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/TimeStats.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Todo.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Topic.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/TopicParams.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/TreeItem.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Trigger.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/User.java | 2 +- .../main/java/org/miaixz/bus/gitlab/models/Variable.java | 2 +- .../src/main/java/org/miaixz/bus/gitlab/models/Version.java | 2 +- .../java/org/miaixz/bus/gitlab/models/WikiAttachment.java | 4 ++-- .../main/java/org/miaixz/bus/gitlab/models/WikiPage.java | 2 +- .../org/miaixz/bus/gitlab/services/NotificationService.java | 2 +- .../java/org/miaixz/bus/gitlab/services/SlackService.java | 2 +- bus-health/src/main/java/org/miaixz/bus/health/Config.java | 2 +- .../src/main/java/org/miaixz/bus/health/builtin/Java.java | 2 +- .../java/org/miaixz/bus/health/builtin/JavaRuntime.java | 2 +- .../main/java/org/miaixz/bus/health/builtin/JavaSpec.java | 2 +- .../src/main/java/org/miaixz/bus/health/builtin/Jvm.java | 2 +- .../main/java/org/miaixz/bus/health/builtin/JvmRuntime.java | 2 +- .../main/java/org/miaixz/bus/health/builtin/JvmSpec.java | 2 +- .../src/main/java/org/miaixz/bus/image/metric/TagCamel.java | 2 +- .../bus/logger/metric/console/ConsoleColorProvider.java | 2 +- .../miaixz/bus/logger/metric/tinylog/TinyLogProvider.java | 2 +- .../mapper/additional/aggregation/AggregateCondition.java | 2 +- bus-opencv/src/main/java/org/opencv/core/CvException.java | 2 +- bus-pager/src/main/java/org/miaixz/bus/pager/Page.java | 2 +- bus-pager/src/main/java/org/miaixz/bus/pager/Serialize.java | 2 +- .../org/miaixz/bus/shade/screw/metadata/ColumnSchema.java | 2 +- .../org/miaixz/bus/shade/screw/metadata/DatabaseSchema.java | 2 +- .../org/miaixz/bus/shade/screw/metadata/TableSchema.java | 2 +- 225 files changed, 235 insertions(+), 235 deletions(-) diff --git a/bus-base/src/main/java/org/miaixz/bus/base/entity/BaseEntity.java b/bus-base/src/main/java/org/miaixz/bus/base/entity/BaseEntity.java index b062bdfb91..2ecc4f1514 100755 --- a/bus-base/src/main/java/org/miaixz/bus/base/entity/BaseEntity.java +++ b/bus-base/src/main/java/org/miaixz/bus/base/entity/BaseEntity.java @@ -54,7 +54,7 @@ @AllArgsConstructor public class BaseEntity extends Tracer { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 数据状态:-1删除,0无效,1正常 diff --git a/bus-cache/src/main/java/org/miaixz/bus/cache/support/PreventObjects.java b/bus-cache/src/main/java/org/miaixz/bus/cache/support/PreventObjects.java index bf9084e245..8f1c30cc39 100755 --- a/bus-cache/src/main/java/org/miaixz/bus/cache/support/PreventObjects.java +++ b/bus-cache/src/main/java/org/miaixz/bus/cache/support/PreventObjects.java @@ -45,7 +45,7 @@ public static boolean isPrevent(Object object) { private static final class PreventObject implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private static final PreventObject INSTANCE = new PreventObject(); } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/Entity.java b/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/Entity.java index 12db9b6b87..f4aa9c6f68 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/Entity.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/Entity.java @@ -51,7 +51,7 @@ @AllArgsConstructor public class Entity implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 数据主键 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/OAuth2.java b/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/OAuth2.java index c659785ae0..c7311797ef 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/OAuth2.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/OAuth2.java @@ -47,7 +47,7 @@ @AllArgsConstructor public class OAuth2 extends Entity { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 当前用户标识 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/Result.java b/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/Result.java index ce4f9d55b0..f2c8870a61 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/Result.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/basics/entity/Result.java @@ -49,7 +49,7 @@ @AllArgsConstructor public class Result { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 总数据 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/StrictBeanDesc.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/StrictBeanDesc.java index cb73509dbc..b40d82c2a3 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/StrictBeanDesc.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/StrictBeanDesc.java @@ -50,7 +50,7 @@ */ public class StrictBeanDesc extends AbstractBeanDesc { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 构造 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/path/AbstractBeanDesc.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/path/AbstractBeanDesc.java index dd53d33bd3..ee05ad0376 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/path/AbstractBeanDesc.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/path/AbstractBeanDesc.java @@ -46,7 +46,7 @@ */ public abstract class AbstractBeanDesc implements BeanDesc { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * Bean类 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/map/reference/WeakKeyConcurrentMap.java b/bus-core/src/main/java/org/miaixz/bus/core/center/map/reference/WeakKeyConcurrentMap.java index 0d234e9d2d..dea48c47ca 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/map/reference/WeakKeyConcurrentMap.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/map/reference/WeakKeyConcurrentMap.java @@ -46,7 +46,7 @@ */ public class WeakKeyConcurrentMap extends ReferenceConcurrentMap { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 构造 diff --git a/bus-cron/src/main/java/org/miaixz/bus/cron/Expression.java b/bus-cron/src/main/java/org/miaixz/bus/cron/Expression.java index 27470b7824..f78c134da5 100644 --- a/bus-cron/src/main/java/org/miaixz/bus/cron/Expression.java +++ b/bus-cron/src/main/java/org/miaixz/bus/cron/Expression.java @@ -57,7 +57,7 @@ public final class Expression implements Serializable, Cloneable { protected static final Integer NO_SPEC = NO_SPEC_INT; protected static final Map monthMap = new HashMap<>(20); protected static final Map dayMap = new HashMap<>(60); - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; static { monthMap.put("JAN", 0); diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/GitLabApiException.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/GitLabApiException.java index 6aa6057772..3be6dae31c 100755 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/GitLabApiException.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/GitLabApiException.java @@ -42,7 +42,7 @@ * with a GitLab API endpoint. */ public class GitLabApiException extends Exception { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private StatusType statusInfo; private int httpStatus; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/AbstractSystemHookEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/AbstractSystemHookEvent.java index 5ae10e16b1..20eb413c31 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/AbstractSystemHookEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/AbstractSystemHookEvent.java @@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; public abstract class AbstractSystemHookEvent implements SystemHookEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String requestUrl; private String requestQueryString; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/GroupMemberSystemHookEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/GroupMemberSystemHookEvent.java index a23d473bc9..5500f9a9de 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/GroupMemberSystemHookEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/GroupMemberSystemHookEvent.java @@ -32,7 +32,7 @@ import java.util.Date; public class GroupMemberSystemHookEvent extends AbstractSystemHookEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String NEW_GROUP_MEMBER_EVENT = "user_add_to_group"; public static final String GROUP_MEMBER_REMOVED_EVENT = "user_remove_from_group"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/GroupSystemHookEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/GroupSystemHookEvent.java index 95f9db75b0..7fd69c093d 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/GroupSystemHookEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/GroupSystemHookEvent.java @@ -32,7 +32,7 @@ import java.util.Date; public class GroupSystemHookEvent extends AbstractSystemHookEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String GROUP_CREATE_EVENT = "group_create"; public static final String GROUP_DESTROY_EVENT = "group_destroy"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/KeySystemHookEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/KeySystemHookEvent.java index 006c0b31b3..76f5b8c641 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/KeySystemHookEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/KeySystemHookEvent.java @@ -32,7 +32,7 @@ import java.util.Date; public class KeySystemHookEvent extends AbstractSystemHookEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String KEY_CREATE_EVENT = "key_create"; public static final String KEY_DESTROY_EVENT = "key_destroy"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/MergeRequestSystemHookEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/MergeRequestSystemHookEvent.java index 5696db996d..309e549180 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/MergeRequestSystemHookEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/MergeRequestSystemHookEvent.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.hooks.web.MergeRequestEvent; public class MergeRequestSystemHookEvent extends MergeRequestEvent implements SystemHookEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String X_GITLAB_EVENT = "System Hook"; public static final String MERGE_REQUEST_EVENT = "merge_request"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/ProjectSystemHookEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/ProjectSystemHookEvent.java index a84e2d4175..1372289618 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/ProjectSystemHookEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/ProjectSystemHookEvent.java @@ -33,7 +33,7 @@ import java.util.Date; public class ProjectSystemHookEvent extends AbstractSystemHookEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String PROJECT_CREATE_EVENT = "project_create"; public static final String PROJECT_DESTROY_EVENT = "project_destroy"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/PushSystemHookEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/PushSystemHookEvent.java index dee0707b18..aaebd3d844 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/PushSystemHookEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/PushSystemHookEvent.java @@ -31,7 +31,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class PushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String PUSH_EVENT = "push"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/TagPushSystemHookEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/TagPushSystemHookEvent.java index b14cc0c036..dc59b604c3 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/TagPushSystemHookEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/TagPushSystemHookEvent.java @@ -31,7 +31,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class TagPushSystemHookEvent extends AbstractPushEvent implements SystemHookEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String TAG_PUSH_EVENT = "tag_push"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/TeamMemberSystemHookEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/TeamMemberSystemHookEvent.java index fe149e9c70..62f85f3f60 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/TeamMemberSystemHookEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/TeamMemberSystemHookEvent.java @@ -33,7 +33,7 @@ import java.util.Date; public class TeamMemberSystemHookEvent extends AbstractSystemHookEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String NEW_TEAM_MEMBER_EVENT = "user_add_to_team"; public static final String TEAM_MEMBER_REMOVED_EVENT = "user_remove_from_team"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/UserSystemHookEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/UserSystemHookEvent.java index 2da0e6c6a0..c5471b3783 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/UserSystemHookEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/system/UserSystemHookEvent.java @@ -32,7 +32,7 @@ import java.util.Date; public class UserSystemHookEvent extends AbstractSystemHookEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String USER_CREATE_EVENT = "user_create"; public static final String USER_DESTROY_EVENT = "user_destroy"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/AbstractEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/AbstractEvent.java index 3460e1c2da..e5b375e8e0 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/AbstractEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/AbstractEvent.java @@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; public abstract class AbstractEvent implements Event { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String requestUrl; private String requestQueryString; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/BuildEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/BuildEvent.java index 9313c32dc9..7ae8d26036 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/BuildEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/BuildEvent.java @@ -36,7 +36,7 @@ * Job Events is incorrect, this class represents the actual content of the Job Hook event. */ public class BuildEvent extends AbstractEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String JOB_HOOK_X_GITLAB_EVENT = "Job Hook"; public static final String OBJECT_KIND = "build"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/DeploymentEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/DeploymentEvent.java index adaeb082a5..fd813d402b 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/DeploymentEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/DeploymentEvent.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class DeploymentEvent extends AbstractEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String X_GITLAB_EVENT = "Deployment Hook"; public static final String OBJECT_KIND = "deployment"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/EventLabel.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/EventLabel.java index 720c38faf7..a7d15e70fb 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/EventLabel.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/EventLabel.java @@ -36,7 +36,7 @@ import java.util.Date; public class EventLabel implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public enum LabelType { diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/ExternalStatusCheckEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/ExternalStatusCheckEvent.java index d90dcee3f3..4d83854c01 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/ExternalStatusCheckEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/ExternalStatusCheckEvent.java @@ -34,7 +34,7 @@ import java.util.List; public class ExternalStatusCheckEvent implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String objectKind; private String eventType; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/IssueEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/IssueEvent.java index 517fd3b2a9..e346fa0b77 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/IssueEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/IssueEvent.java @@ -33,7 +33,7 @@ import java.util.List; public class IssueEvent extends AbstractEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String X_GITLAB_EVENT = "Issue Hook"; public static final String OBJECT_KIND = "issue"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/JobEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/JobEvent.java index 41bda8401d..95a88f33ca 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/JobEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/JobEvent.java @@ -32,7 +32,7 @@ import java.util.Date; public class JobEvent extends AbstractEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String JOB_HOOK_X_GITLAB_EVENT = "Job Hook"; public static final String OBJECT_KIND = "job"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/MergeRequestEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/MergeRequestEvent.java index 04ffa9bd38..8a2ee24ee9 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/MergeRequestEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/MergeRequestEvent.java @@ -34,7 +34,7 @@ import java.util.List; public class MergeRequestEvent extends AbstractEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String X_GITLAB_EVENT = "Merge Request Hook"; public static final String OBJECT_KIND = "merge_request"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/NoteEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/NoteEvent.java index 2435fcc251..94712d925b 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/NoteEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/NoteEvent.java @@ -36,7 +36,7 @@ import java.util.Date; public class NoteEvent extends AbstractEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String X_GITLAB_EVENT = "Note Hook"; public static final String OBJECT_KIND = "note"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/PipelineEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/PipelineEvent.java index 8cce369bc6..f27d7bbb34 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/PipelineEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/PipelineEvent.java @@ -35,7 +35,7 @@ import java.util.List; public class PipelineEvent extends AbstractEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String X_GITLAB_EVENT = "Pipeline Hook"; public static final String OBJECT_KIND = "pipeline"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/PushEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/PushEvent.java index cdef4b08d2..54f865544c 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/PushEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/PushEvent.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class PushEvent extends AbstractPushEvent implements Event { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String X_GITLAB_EVENT = "Push Hook"; public static final String OBJECT_KIND = "push"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/ReleaseEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/ReleaseEvent.java index ffe78fee20..2efbb3a9d0 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/ReleaseEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/ReleaseEvent.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class ReleaseEvent extends AbstractEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String X_GITLAB_EVENT = "Release Hook"; public static final String OBJECT_KIND = "release"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/TagPushEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/TagPushEvent.java index 5b5358b179..55e5b4f979 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/TagPushEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/TagPushEvent.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class TagPushEvent extends AbstractPushEvent implements Event { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String X_GITLAB_EVENT = "Tag Push Hook"; public static final String OBJECT_KIND = "tag_push"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/WikiPageEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/WikiPageEvent.java index 5704848056..7e8ba584c5 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/WikiPageEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/hooks/web/WikiPageEvent.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class WikiPageEvent extends AbstractEvent { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String X_GITLAB_EVENT = "Wiki Page Hook"; public static final String OBJECT_KIND = "wiki_page"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractEpic.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractEpic.java index 425aa84ada..a7cf5be4e6 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractEpic.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractEpic.java @@ -40,7 +40,7 @@ import java.util.Map; public class AbstractEpic> extends AbstractMinimalEpic implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; @SuppressWarnings("unchecked") public E withDescription(String description) { diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractGroup.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractGroup.java index 3c0223c08f..a75c05175b 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractGroup.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractGroup.java @@ -34,7 +34,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public abstract class AbstractGroup> implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractIssue.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractIssue.java index 547238d0ae..4130c2084e 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractIssue.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractIssue.java @@ -41,10 +41,10 @@ import java.util.List; public abstract class AbstractIssue implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static class TaskCompletionStatus implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer count; private Integer completedCount; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractMinimalEpic.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractMinimalEpic.java index 075b99c9e8..4592af43ef 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractMinimalEpic.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractMinimalEpic.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class AbstractMinimalEpic> implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Long iid; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractUser.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractUser.java index e8cfc5aca0..48f1dff34e 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractUser.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AbstractUser.java @@ -35,7 +35,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public abstract class AbstractUser> implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String avatarUrl; private Date createdAt; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AcceptMergeRequestParams.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AcceptMergeRequestParams.java index 1055c67b52..7e0f354d68 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AcceptMergeRequestParams.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AcceptMergeRequestParams.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class AcceptMergeRequestParams implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String mergeCommitMessage; private Boolean mergeWhenPipelineSucceeds; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AccessRequest.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AccessRequest.java index 1d332e4994..c061ffc705 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AccessRequest.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AccessRequest.java @@ -30,7 +30,7 @@ import java.util.Date; public class AccessRequest extends AbstractUser { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Date requestedAt; private AccessLevel accessLevel; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AllowedTo.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AllowedTo.java index c85675010a..d90c08b5e4 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AllowedTo.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AllowedTo.java @@ -36,7 +36,7 @@ * allowed_to_push, allowed_to_merge, and allowed_to_unprotect values. */ public class AllowedTo implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private AccessLevel accessLevel; private Long userId; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Application.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Application.java index d38a209bd9..66dde86e28 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Application.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Application.java @@ -30,7 +30,7 @@ import java.io.Serializable; public class Application implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String applicationId; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApplicationSettings.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApplicationSettings.java index ae373d6ddf..70a80a3392 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApplicationSettings.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApplicationSettings.java @@ -39,7 +39,7 @@ import java.util.Map; public class ApplicationSettings implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Date createdAt; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalRule.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalRule.java index fbea43af8d..418ae7ded1 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalRule.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalRule.java @@ -33,7 +33,7 @@ import java.util.List; public class ApprovalRule implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalRuleParams.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalRuleParams.java index a5769b733f..90b61c0849 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalRuleParams.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalRuleParams.java @@ -33,7 +33,7 @@ import java.util.List; public class ApprovalRuleParams implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer approvalsRequired; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalState.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalState.java index 3f5b051ad4..6eb4280dc5 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalState.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovalState.java @@ -33,7 +33,7 @@ import java.util.List; public class ApprovalState implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean approvalRulesOverwritten; private List rules; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovedBy.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovedBy.java index b55e33432b..517a38abb4 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovedBy.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ApprovedBy.java @@ -37,7 +37,7 @@ * which can contain a User or Group instance. */ public class ApprovedBy implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private User user; private Group group; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Artifact.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Artifact.java index 9f0572fbf0..c92278d152 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Artifact.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Artifact.java @@ -35,7 +35,7 @@ import java.io.Serializable; public class Artifact implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public enum FileType { ARCHIVE, METADATA, TRACE, JUNIT; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ArtifactsFile.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ArtifactsFile.java index 730678693e..72bb65fb3e 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ArtifactsFile.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ArtifactsFile.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class ArtifactsFile implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String filename; private Long size; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Assets.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Assets.java index 99019c265b..3c863ad909 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Assets.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Assets.java @@ -37,10 +37,10 @@ * This class is part of the Release class model. */ public class Assets implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static class Source implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private ArchiveFormat format; private String url; @@ -68,7 +68,7 @@ public String toString() { } public static class Link implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Assignee.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Assignee.java index fe81247080..c6b4afef03 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Assignee.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Assignee.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class Assignee extends AbstractUser { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; @Override public String toString() { diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AuditEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AuditEvent.java index c46220a56a..ac4e3777c5 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AuditEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AuditEvent.java @@ -33,7 +33,7 @@ import java.util.Date; public class AuditEvent implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Long authorId; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AuditEventDetail.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AuditEventDetail.java index a13a7af632..483dcac511 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AuditEventDetail.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AuditEventDetail.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class AuditEventDetail implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String change; private String from; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Author.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Author.java index 6ea97509d2..7ac16c638b 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Author.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Author.java @@ -28,5 +28,5 @@ package org.miaixz.bus.gitlab.models; public class Author extends AbstractUser { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; } diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AwardEmoji.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AwardEmoji.java index 3226faeee8..55c053df0e 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AwardEmoji.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/AwardEmoji.java @@ -36,7 +36,7 @@ import java.util.Date; public class AwardEmoji implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public enum AwardableType { ISSUE, MERGE_REQUEST, NOTE, SNIPPET; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Badge.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Badge.java index 95af5106b0..78b68d209f 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Badge.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Badge.java @@ -35,7 +35,7 @@ import java.io.Serializable; public class Badge implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public enum BadgeKind { PROJECT, GROUP; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Blame.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Blame.java index ca1a23af2a..f0f9aeab5c 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Blame.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Blame.java @@ -33,7 +33,7 @@ import java.util.List; public class Blame implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Commit commit; private List lines; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Board.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Board.java index b85e54ec63..d01f228cc3 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Board.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Board.java @@ -33,7 +33,7 @@ import java.util.List; public class Board implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/BoardList.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/BoardList.java index ce4a2f5b3a..67460f19dc 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/BoardList.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/BoardList.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class BoardList implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Label label; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Branch.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Branch.java index 39c4f9add2..c29d61872b 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Branch.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Branch.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Branch implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Commit commit; private Boolean developersCanMerge; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/BranchAccessLevel.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/BranchAccessLevel.java index 2a3316ad4c..1acec4bc46 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/BranchAccessLevel.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/BranchAccessLevel.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class BranchAccessLevel implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private AccessLevel accessLevel; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Bridge.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Bridge.java index b31de4ecdb..8001b36144 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Bridge.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Bridge.java @@ -33,7 +33,7 @@ import java.util.Date; public class Bridge implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Commit commit; private boolean allowFailure; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ChangelogPayload.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ChangelogPayload.java index 325187b02b..28a70118cc 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ChangelogPayload.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ChangelogPayload.java @@ -36,7 +36,7 @@ import java.util.Date; public class ChangelogPayload implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String version; private String from; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Changes.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Changes.java index c337497bcf..def16475c9 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Changes.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Changes.java @@ -34,7 +34,7 @@ import java.io.Serializable; public class Changes implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; @JsonInclude(JsonInclude.Include.ALWAYS) @JsonProperty("a_mode") diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ChildEpic.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ChildEpic.java index cb7f874b9d..5e04b15e63 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ChildEpic.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ChildEpic.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class ChildEpic extends AbstractEpic { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public String toString() { return (JacksonJson.toJsonString(this)); diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Comment.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Comment.java index 58062a4a83..584342ace1 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Comment.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Comment.java @@ -34,7 +34,7 @@ import java.util.Date; public class Comment implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Author author; private Date createdAt; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Commit.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Commit.java index 7b5b14e011..6062424945 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Commit.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Commit.java @@ -34,7 +34,7 @@ import java.util.List; public class Commit implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Author author; private Date authoredDate; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitAction.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitAction.java index 2368a9cbb8..ff79c4b6e3 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitAction.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitAction.java @@ -43,7 +43,7 @@ import java.util.Base64; public class CommitAction implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Action action; private String filePath; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitPayload.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitPayload.java index ac972f8637..5cfb79baf2 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitPayload.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitPayload.java @@ -34,7 +34,7 @@ import java.util.List; public class CommitPayload implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String branch; private String commitMessage; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitRef.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitRef.java index 0d27b88ca2..1a65ec5223 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitRef.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitRef.java @@ -35,7 +35,7 @@ import java.io.Serializable; public class CommitRef implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private RefType type; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStats.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStats.java index da6e0c4d25..47a4bb5320 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStats.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStats.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class CommitStats implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer additions; private Integer deletions; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStatus.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStatus.java index 7bb35173e1..802c6be242 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStatus.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStatus.java @@ -33,7 +33,7 @@ import java.util.Date; public class CommitStatus implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean allowFailure; private Author author; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStatusFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStatusFilter.java index a4c4bf7aa4..5533efbb4a 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStatusFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CommitStatusFilter.java @@ -37,7 +37,7 @@ * This class is used to filter commit status when getting lists of them. */ public class CommitStatusFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String ref; private String stage; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CompareResults.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CompareResults.java index dc874280af..3369147838 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CompareResults.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CompareResults.java @@ -33,7 +33,7 @@ import java.util.List; public class CompareResults implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Commit commit; private List commits; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Contributor.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Contributor.java index a8a349bf21..85cfd1808c 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Contributor.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Contributor.java @@ -32,7 +32,7 @@ * See Contributors at GitLab. */ public class Contributor extends AbstractUser { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer commits; private Integer additions; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CreatedChildEpic.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CreatedChildEpic.java index bf9f15863d..103e73a77d 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CreatedChildEpic.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CreatedChildEpic.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class CreatedChildEpic extends AbstractMinimalEpic { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean hasChildren; private Boolean hasIssues; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CustomAttribute.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CustomAttribute.java index 670f606b77..bb78fde2fe 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CustomAttribute.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/CustomAttribute.java @@ -30,7 +30,7 @@ import java.io.Serializable; public class CustomAttribute implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String key; private String value; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeployKey.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeployKey.java index 622a832e9a..4a86e12c37 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeployKey.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeployKey.java @@ -33,7 +33,7 @@ import java.util.Date; public class DeployKey implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String title; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeployToken.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeployToken.java index 55120bab51..6f92bfe9c1 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeployToken.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeployToken.java @@ -35,7 +35,7 @@ import java.util.List; public class DeployToken implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Deployable.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Deployable.java index 6ba8ff9f83..bbbec26e90 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Deployable.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Deployable.java @@ -35,7 +35,7 @@ import java.util.List; public class Deployable implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private DeploymentStatus status; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Deployment.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Deployment.java index bda87cf85a..3b2dc929d3 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Deployment.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Deployment.java @@ -34,7 +34,7 @@ import java.util.Date; public class Deployment implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Long iid; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeploymentFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeploymentFilter.java index a1c13559ca..e1b0b1d172 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeploymentFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DeploymentFilter.java @@ -39,7 +39,7 @@ import java.util.Date; public class DeploymentFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * Return deployments ordered by either one of id, iid, created_at, updated_at or ref fields. Default is id. diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DetailedStatus.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DetailedStatus.java index 02889fcec3..4916b67e2a 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DetailedStatus.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DetailedStatus.java @@ -35,7 +35,7 @@ * This class is part of the Pipeline message. */ public class DetailedStatus implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String icon; private String text; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Diff.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Diff.java index ffe916ceb0..96963e9b23 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Diff.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Diff.java @@ -34,7 +34,7 @@ import java.io.Serializable; public class Diff implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; @JsonInclude(JsonInclude.Include.ALWAYS) @JsonProperty("a_mode") diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DiffRef.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DiffRef.java index 101e116445..58686b9f43 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DiffRef.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DiffRef.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class DiffRef implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String baseSha; private String headSha; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Discussion.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Discussion.java index 8b2bced8df..9395e86c3c 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Discussion.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Discussion.java @@ -33,7 +33,7 @@ import java.util.List; public class Discussion implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String id; private Boolean individualNote; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DownstreamPipeline.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DownstreamPipeline.java index 4dcef1daca..8c960a2bbf 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DownstreamPipeline.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/DownstreamPipeline.java @@ -33,7 +33,7 @@ import java.util.Date; public class DownstreamPipeline implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String sha; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Duration.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Duration.java index 8b7f864cef..78d66607a1 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Duration.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Duration.java @@ -39,7 +39,7 @@ */ public class Duration implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private static final String[] TIME_UNITS = { "mo", "w", "d", "h", "m", "s" diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Email.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Email.java index 6489e595c6..c8c4ede771 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Email.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Email.java @@ -30,7 +30,7 @@ import java.io.Serializable; public class Email implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String email; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Environment.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Environment.java index f5529d2a4f..aaee8c31ec 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Environment.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Environment.java @@ -35,7 +35,7 @@ import java.io.Serializable; public class Environment implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public enum EnvironmentState { AVAILABLE, STOPPED; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Epic.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Epic.java index aaa9d76bf7..a2f56fb246 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Epic.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Epic.java @@ -32,7 +32,7 @@ import java.util.Date; public class Epic extends AbstractEpic { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean startDateIsFixed; private Boolean dueDateIsFixed; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicFilter.java index f3d6ca2a85..a3e6861b83 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicFilter.java @@ -45,7 +45,7 @@ * This class is used to filter Groups when getting lists of epics. */ public class EpicFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long authorId; private String authorUsername; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicInLink.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicInLink.java index 2dcdef5a0f..457e7807f7 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicInLink.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicInLink.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class EpicInLink extends AbstractEpic { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public String toString() { return (JacksonJson.toJsonString(this)); diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicIssueLink.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicIssueLink.java index 43a7f32aff..cb0b357c19 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicIssueLink.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EpicIssueLink.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class EpicIssueLink implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Integer relativePosition; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Event.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Event.java index 979d05b3fc..f040b657c0 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Event.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Event.java @@ -34,7 +34,7 @@ import java.util.Date; public class Event implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String actionName; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EventData.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EventData.java index 76e1e13b9f..c00b1e4cdb 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EventData.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/EventData.java @@ -33,7 +33,7 @@ import java.util.List; public class EventData implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String after; private String before; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExportStatus.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExportStatus.java index 8b0bcb8734..e54bfd3137 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExportStatus.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExportStatus.java @@ -39,7 +39,7 @@ import java.util.Map; public class ExportStatus implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * Enum representing the status of the export. diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheck.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheck.java index a11cb91f38..72aa007dcc 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheck.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheck.java @@ -33,7 +33,7 @@ import java.util.List; public class ExternalStatusCheck implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckProtectedBranch.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckProtectedBranch.java index d15c569922..9003fe41fe 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckProtectedBranch.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckProtectedBranch.java @@ -33,7 +33,7 @@ import java.util.Date; public class ExternalStatusCheckProtectedBranch implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Long projectId; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckResult.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckResult.java index 1692a174fb..35afaba233 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckResult.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckResult.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class ExternalStatusCheckResult implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private MergeRequest mergeRequest; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckStatus.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckStatus.java index 0d9833a62c..8c7a6552f6 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckStatus.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ExternalStatusCheckStatus.java @@ -35,7 +35,7 @@ import java.io.Serializable; public class ExternalStatusCheckStatus implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/FileUpload.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/FileUpload.java index 2eaf0d8103..09dd815e86 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/FileUpload.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/FileUpload.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class FileUpload implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String alt; private String url; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GitLabCiTemplate.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GitLabCiTemplate.java index 5f720a7874..eef10d11bf 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GitLabCiTemplate.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GitLabCiTemplate.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class GitLabCiTemplate implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String name; private String content; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GitLabCiTemplateElement.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GitLabCiTemplateElement.java index ab2d1162b9..7f2403b977 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GitLabCiTemplateElement.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GitLabCiTemplateElement.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class GitLabCiTemplateElement implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String key; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GpgSignature.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GpgSignature.java index 6b14a94f03..51066ccc7f 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GpgSignature.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GpgSignature.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class GpgSignature implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long gpgKeyId; private String gpgKeyPrimaryKeyid; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Group.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Group.java index 08880b3345..4e58098370 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Group.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Group.java @@ -37,7 +37,7 @@ import java.util.List; public class Group extends AbstractGroup { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public class Statistics { private Long storageSize; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupAccessToken.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupAccessToken.java index c9f674dd22..d0e98a9343 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupAccessToken.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupAccessToken.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class GroupAccessToken extends ImpersonationToken { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private AccessLevel accessLevel; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupFilter.java index bacd40fc97..539f55a975 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupFilter.java @@ -39,7 +39,7 @@ * This class is used to filter Groups when getting lists of groups. */ public class GroupFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private List skipGroups; private Boolean allAvailable; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupParams.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupParams.java index 636e8624d1..313bd62637 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupParams.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupParams.java @@ -39,7 +39,7 @@ * the parameters for the call to the GitLab API. */ public class GroupParams implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String name; private String path; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupProjectsFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupProjectsFilter.java index 3cd074c51c..0927154f8c 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupProjectsFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/GroupProjectsFilter.java @@ -37,7 +37,7 @@ * This class is used to filter Projects when getting lists of projects for a specified group. */ public class GroupProjectsFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean archived; private Visibility visibility; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/HealthCheckInfo.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/HealthCheckInfo.java index 6e05b02306..ef53a0c98d 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/HealthCheckInfo.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/HealthCheckInfo.java @@ -40,7 +40,7 @@ import java.io.Serializable; public class HealthCheckInfo implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; @JsonDeserialize(using = HealthCheckItemDeserializer.class) private HealthCheckItem dbCheck; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/HealthCheckItem.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/HealthCheckItem.java index 29a70107ae..f1c259ece6 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/HealthCheckItem.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/HealthCheckItem.java @@ -33,7 +33,7 @@ import java.util.Map; public class HealthCheckItem implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private HealthCheckStatus status; private Map labels; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Identity.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Identity.java index 9f9290b97c..3f5f54be52 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Identity.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Identity.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Identity implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String provider; private String externUid; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ImpersonationToken.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ImpersonationToken.java index cf1f44e6d5..507535c871 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ImpersonationToken.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ImpersonationToken.java @@ -37,7 +37,7 @@ import java.util.List; public class ImpersonationToken implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * Enum to specify the scope of an ImpersonationToken. diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ImportStatus.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ImportStatus.java index 8ca275d530..40068a4d93 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ImportStatus.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ImportStatus.java @@ -36,7 +36,7 @@ import java.util.Date; public class ImportStatus implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * Enum representing the status of the import. diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Issue.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Issue.java index beaa032c3b..0a5ae99514 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Issue.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Issue.java @@ -30,7 +30,7 @@ import org.miaixz.bus.gitlab.support.JacksonJson; public class Issue extends AbstractIssue { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean subscribed; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueEvent.java index cd32805231..eb31c83492 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueEvent.java @@ -35,7 +35,7 @@ import java.io.Serializable; public class IssueEvent implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public Long getId() { return id; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueFilter.java index 899c055c42..8905097630 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueFilter.java @@ -49,7 +49,7 @@ * This class is used to filter issues when getting lists of them. */ public class IssueFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * Return only the milestone having the given iid. diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueLink.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueLink.java index 912610dcb1..83e38bc723 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueLink.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssueLink.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class IssueLink implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Issue sourceIssue; private Issue targetIssue; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssuesStatistics.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssuesStatistics.java index a09118ec66..4120195883 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssuesStatistics.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssuesStatistics.java @@ -33,7 +33,7 @@ import java.io.Serializable; public class IssuesStatistics implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Statistics statistics; @@ -51,7 +51,7 @@ public Counts getCounts() { } public static class Statistics implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Counts counts; @@ -66,7 +66,7 @@ public void setCounts(Counts counts) { public static class Counts implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer all; private Integer closed; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssuesStatisticsFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssuesStatisticsFilter.java index 865803a320..23fe20e1a9 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssuesStatisticsFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IssuesStatisticsFilter.java @@ -41,7 +41,7 @@ * This class is used to filter issues when getting issue statistics. of them. */ public class IssuesStatisticsFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private List labels; private String milestone; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Iteration.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Iteration.java index ad0a73bdb2..5aa06187a8 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Iteration.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Iteration.java @@ -35,7 +35,7 @@ import java.util.Date; public class Iteration implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public enum IterationState { UPCOMMING(1), CURRENT(2), CLOSED(3); diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IterationFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IterationFilter.java index 53bcd7c64f..d21d5f1672 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IterationFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/IterationFilter.java @@ -39,7 +39,7 @@ import java.util.Date; public class IterationFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public enum IterationFilterState { OPENED, UPCOMING, CURRENT, CLOSED, ALL; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Job.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Job.java index 897901de11..3495653f25 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Job.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Job.java @@ -34,7 +34,7 @@ import java.util.List; public class Job implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Commit commit; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/JobAttribute.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/JobAttribute.java index b3aa1c509f..9f822be583 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/JobAttribute.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/JobAttribute.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class JobAttribute implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String key; private String value; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/JobAttributes.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/JobAttributes.java index 54e94e3dee..e295e6dbf2 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/JobAttributes.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/JobAttributes.java @@ -34,7 +34,7 @@ import java.util.List; public class JobAttributes implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; @JsonProperty("job_variables_attributes") private List jobAttributes; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Key.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Key.java index 7848fc8f00..fac6bd692f 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Key.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Key.java @@ -33,7 +33,7 @@ import java.util.Date; public class Key implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Date createdAt; private Long id; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Label.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Label.java index b95bfc4ed4..f2b05242ea 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Label.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Label.java @@ -34,7 +34,7 @@ import java.io.Serializable; public class Label implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LabelEvent.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LabelEvent.java index 81057a8a62..f83305b2a3 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LabelEvent.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LabelEvent.java @@ -35,7 +35,7 @@ import java.io.Serializable; public class LabelEvent implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public Long getId() { return id; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LdapGroupLink.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LdapGroupLink.java index b802451ac6..e240ac2851 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LdapGroupLink.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LdapGroupLink.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class LdapGroupLink implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String cn; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/License.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/License.java index ab86ff5ea2..57df874cd9 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/License.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/License.java @@ -34,7 +34,7 @@ import java.util.Map; public class License implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String plan; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LicenseTemplate.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LicenseTemplate.java index b69798117b..0136fd98a8 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LicenseTemplate.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/LicenseTemplate.java @@ -33,7 +33,7 @@ import java.util.List; public class LicenseTemplate implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String key; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Link.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Link.java index 0ad032f734..3e03c38205 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Link.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Link.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Link implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Markdown.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Markdown.java index 374358e80a..68fdf0add3 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Markdown.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Markdown.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Markdown implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String html; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MarkdownRequest.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MarkdownRequest.java index af8dd4c8d6..b63119e7a4 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MarkdownRequest.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MarkdownRequest.java @@ -30,7 +30,7 @@ import java.io.Serializable; public class MarkdownRequest implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String text; private boolean gfm; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Member.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Member.java index b283d3a871..1d1b7f776e 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Member.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Member.java @@ -32,7 +32,7 @@ import java.util.Date; public class Member extends AbstractUser { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private AccessLevel accessLevel; private Date expiresAt; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Membership.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Membership.java index 6a2abaacda..7c756dbf35 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Membership.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Membership.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Membership implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long sourceId; private String sourceName; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequest.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequest.java index 124796713a..8389034282 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequest.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequest.java @@ -36,7 +36,7 @@ import java.util.List; public class MergeRequest implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean allowCollaboration; private Boolean allowMaintainerToPush; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestDiff.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestDiff.java index f78b74d3e6..b7ca87a17b 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestDiff.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestDiff.java @@ -32,7 +32,7 @@ import java.util.List; public class MergeRequestDiff extends MergeRequestVersion { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private List commits; private List diffs; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestFilter.java index e0e64e811d..2ed54a646c 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestFilter.java @@ -45,7 +45,7 @@ * This class is used to filter merge requests when getting lists of them. */ public class MergeRequestFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long projectId; private Long groupId; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestParams.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestParams.java index d21c6edb16..bcfeeb160a 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestParams.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestParams.java @@ -38,7 +38,7 @@ * This class provides the form parameters for creating and updating merge requests. */ public class MergeRequestParams implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String sourceBranch; private String targetBranch; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestVersion.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestVersion.java index 609175efdc..1a2e779344 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestVersion.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/MergeRequestVersion.java @@ -33,7 +33,7 @@ import java.util.Date; public class MergeRequestVersion implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String headCommitSha; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Metadata.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Metadata.java index 35ce994352..7260f95e65 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Metadata.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Metadata.java @@ -33,7 +33,7 @@ import java.io.Serializable; public class Metadata implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String version; private String revision; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Milestone.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Milestone.java index b13ba8602c..54adc28883 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Milestone.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Milestone.java @@ -34,7 +34,7 @@ import java.util.Date; public class Milestone implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Date createdAt; private String description; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Namespace.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Namespace.java index 356ac92405..ffb00602e3 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Namespace.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Namespace.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Namespace implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Note.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Note.java index d2604649f9..67a58d88f1 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Note.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Note.java @@ -36,7 +36,7 @@ import java.util.Date; public class Note implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; @Override public String toString() { diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/NotificationSettings.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/NotificationSettings.java index 8beee3a8aa..590efc89d1 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/NotificationSettings.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/NotificationSettings.java @@ -35,12 +35,12 @@ import java.io.Serializable; public class NotificationSettings implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Level level; public static class Events implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean newNote; private Boolean newIssue; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/OauthTokenResponse.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/OauthTokenResponse.java index fa153558e2..7cbcaa64a9 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/OauthTokenResponse.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/OauthTokenResponse.java @@ -30,7 +30,7 @@ import java.io.Serializable; public class OauthTokenResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String accessToken; private String tokenType; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Owner.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Owner.java index 633f13c8ee..69ea2d63ae 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Owner.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Owner.java @@ -28,5 +28,5 @@ package org.miaixz.bus.gitlab.models; public class Owner extends AbstractUser { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; } diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Package.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Package.java index 116deb3d8e..857a4bf73a 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Package.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Package.java @@ -33,7 +33,7 @@ import java.util.Date; public class Package implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PackageFile.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PackageFile.java index 1c43a00ea3..4fe43c088c 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PackageFile.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PackageFile.java @@ -33,7 +33,7 @@ import java.util.Date; public class PackageFile implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Long packageId; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PackageFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PackageFilter.java index f4ac8074be..762134456e 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PackageFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PackageFilter.java @@ -38,7 +38,7 @@ * This class is used to filter Projects when getting lists of projects for a specified group. */ public class PackageFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean excludeSubgroups; private PackageOrderBy orderBy; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Participant.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Participant.java index 46c3cf2d09..52dffad676 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Participant.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Participant.java @@ -28,5 +28,5 @@ package org.miaixz.bus.gitlab.models; public class Participant extends AbstractUser { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; } diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Permissions.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Permissions.java index cc39421504..444e924410 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Permissions.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Permissions.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Permissions implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private ProjectAccess projectAccess; private ProjectAccess groupAccess; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Pipeline.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Pipeline.java index d1ccb0273b..55b9704eb5 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Pipeline.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Pipeline.java @@ -33,7 +33,7 @@ import java.util.Date; public class Pipeline implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Long iid; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PipelineFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PipelineFilter.java index 668fde40f2..49f7995073 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PipelineFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PipelineFilter.java @@ -39,7 +39,7 @@ * This class is used to filter Pipelines when getting lists of them. */ public class PipelineFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * {@link Constants.PipelineScope} The scope of pipelines, one of: running, pending, finished, branches, tags diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PipelineSchedule.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PipelineSchedule.java index 043378cb13..a3936e1b1e 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PipelineSchedule.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PipelineSchedule.java @@ -34,7 +34,7 @@ import java.util.List; public class PipelineSchedule implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String description; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Position.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Position.java index e658d18e11..0de3f38e9e 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Position.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Position.java @@ -35,7 +35,7 @@ import java.io.Serializable; public class Position implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static enum PositionType { diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Project.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Project.java index 64bbfdd7b5..b334b54fcd 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Project.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Project.java @@ -43,7 +43,7 @@ import java.util.Map; public class Project implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private List sharedWithGroups; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectAccess.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectAccess.java index 5df2477ec5..652df3c956 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectAccess.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectAccess.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class ProjectAccess implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private AccessLevel accessLevel; private int notificationLevel; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectAccessToken.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectAccessToken.java index 809cf3e068..98fbd2efc1 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectAccessToken.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectAccessToken.java @@ -35,7 +35,7 @@ import java.util.List; public class ProjectAccessToken implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long userId; private List scopes; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectApprovalsConfig.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectApprovalsConfig.java index 06581c20a6..77d6129f6f 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectApprovalsConfig.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectApprovalsConfig.java @@ -33,7 +33,7 @@ import java.io.Serializable; public class ProjectApprovalsConfig implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer approvalsBeforeMerge; private Boolean resetApprovalsOnPush; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectFetches.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectFetches.java index 7edf1b4aa7..181532991e 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectFetches.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectFetches.java @@ -35,11 +35,11 @@ import java.util.List; public class ProjectFetches implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static class DateCount implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer count; @@ -64,7 +64,7 @@ public void setDate(Date date) { } public static class Fetches implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer total; private List days; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectFilter.java index f4a109c555..b3b378f530 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectFilter.java @@ -38,7 +38,7 @@ * This class is used to filter Projects when getting lists of projects for a specified user. */ public class ProjectFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean archived; private Visibility visibility; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectGroup.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectGroup.java index e875d4fa4e..2ecc3bd54a 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectGroup.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectGroup.java @@ -28,5 +28,5 @@ package org.miaixz.bus.gitlab.models; public class ProjectGroup extends AbstractGroup { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; } diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectGroupsFilter.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectGroupsFilter.java index 9cb330b535..eea07817ed 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectGroupsFilter.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectGroupsFilter.java @@ -36,7 +36,7 @@ * This class is used to filter Groups when getting lists of groups for a specified project. */ public class ProjectGroupsFilter implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String search; private AccessLevel sharedMinAccessLevel; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectHook.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectHook.java index 493222e80f..6b427543ab 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectHook.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectHook.java @@ -33,7 +33,7 @@ import java.util.Date; public class ProjectHook implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean buildEvents; private Date createdAt; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectStatistics.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectStatistics.java index aeb62db292..fd681c5a72 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectStatistics.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectStatistics.java @@ -38,7 +38,7 @@ * which is only allowed for GitLab admins. */ public class ProjectStatistics implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; long commitCount; long storageSize; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectUser.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectUser.java index 8bd7420728..357a7b4043 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectUser.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProjectUser.java @@ -28,5 +28,5 @@ package org.miaixz.bus.gitlab.models; public class ProjectUser extends AbstractUser { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; } diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProtectedBranch.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProtectedBranch.java index 20ddbe65b0..dbf6ebc622 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProtectedBranch.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProtectedBranch.java @@ -33,7 +33,7 @@ import java.util.List; public class ProtectedBranch implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProtectedTag.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProtectedTag.java index c0771dfe7c..6d8cf6b536 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProtectedTag.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ProtectedTag.java @@ -33,10 +33,10 @@ import java.util.List; public class ProtectedTag implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static class CreateAccessLevel implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private AccessLevel access_level; private String accessLevelDescription; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PushRules.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PushRules.java index 8f3f6a20fe..3cb582a669 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PushRules.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/PushRules.java @@ -33,7 +33,7 @@ import java.util.Date; public class PushRules implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Long projectId; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/References.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/References.java index f293224c5a..f1f8e19e17 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/References.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/References.java @@ -34,7 +34,7 @@ public class References implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; @JsonProperty("short") private String _short; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RegistryRepository.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RegistryRepository.java index da4d1b08e8..fa7bdf47bf 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RegistryRepository.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RegistryRepository.java @@ -33,7 +33,7 @@ import java.util.Date; public class RegistryRepository implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RegistryRepositoryTag.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RegistryRepositoryTag.java index fb27ce3bb9..f9f34dbf8b 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RegistryRepositoryTag.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RegistryRepositoryTag.java @@ -33,7 +33,7 @@ import java.util.Date; public class RegistryRepositoryTag implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String name; private String path; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RelatedEpic.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RelatedEpic.java index 15e1773709..16cc96710a 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RelatedEpic.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RelatedEpic.java @@ -32,7 +32,7 @@ import java.util.Date; public class RelatedEpic extends AbstractEpic { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Boolean startDateIsFixed; private Boolean dueDateIsFixed; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RelatedEpicLink.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RelatedEpicLink.java index 11972fab71..6163447fe4 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RelatedEpicLink.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RelatedEpicLink.java @@ -33,7 +33,7 @@ import java.util.Date; public class RelatedEpicLink implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private EpicInLink sourceEpic; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Release.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Release.java index 42953af521..9023aeb9d7 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Release.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Release.java @@ -37,7 +37,7 @@ import java.util.Map; public class Release implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String name; private String tagName; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ReleaseParams.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ReleaseParams.java index 78f02d0ac5..094d10bb59 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ReleaseParams.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/ReleaseParams.java @@ -34,7 +34,7 @@ import java.util.List; public class ReleaseParams implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String name; private String tagName; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RemoteMirror.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RemoteMirror.java index b58779250b..639bf74808 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RemoteMirror.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RemoteMirror.java @@ -33,7 +33,7 @@ import java.util.Date; public class RemoteMirror implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Boolean enabled; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Repository.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Repository.java index 1793c2a1fb..a1b9ff0e30 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Repository.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Repository.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Repository implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String description; private String homepage; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RepositoryFile.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RepositoryFile.java index fbc4db1468..8de3e34ee6 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RepositoryFile.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RepositoryFile.java @@ -35,7 +35,7 @@ import java.util.Base64; public class RepositoryFile implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String fileName; // file name only, Ex. class.rb private String filePath; // full path to file. Ex. lib/class.rb diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RepositoryFileResponse.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RepositoryFileResponse.java index 38862f82b5..706fa445ad 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RepositoryFileResponse.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RepositoryFileResponse.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class RepositoryFileResponse implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String filePath; // full path to file. Ex. lib/class.rb private String branch; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Reviewer.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Reviewer.java index 30457f6ae9..8f2997499d 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Reviewer.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Reviewer.java @@ -28,5 +28,5 @@ package org.miaixz.bus.gitlab.models; public class Reviewer extends AbstractUser { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; } diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Runner.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Runner.java index 6164450f3e..faf4299797 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Runner.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Runner.java @@ -35,7 +35,7 @@ import java.io.Serializable; public class Runner implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String description; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RunnerDetail.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RunnerDetail.java index 9a704fe00f..08a903f3c5 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RunnerDetail.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/RunnerDetail.java @@ -36,7 +36,7 @@ import java.util.List; public class RunnerDetail extends Runner { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String architecture; private String platform; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SamlGroupLink.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SamlGroupLink.java index c236cdbf0d..dc072c9a20 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SamlGroupLink.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SamlGroupLink.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class SamlGroupLink implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String name; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SearchBlob.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SearchBlob.java index 72533d6dcf..da0658a217 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SearchBlob.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SearchBlob.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class SearchBlob implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String basename; private String data; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SharedGroup.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SharedGroup.java index ea508d3616..38c9ccdd19 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SharedGroup.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SharedGroup.java @@ -34,7 +34,7 @@ import java.util.Date; public class SharedGroup implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long groupId; private String groupName; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Snippet.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Snippet.java index 5b20455c7a..a77c3813c8 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Snippet.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Snippet.java @@ -54,7 +54,7 @@ import java.util.Date; public class Snippet implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Author author; private Date createdAt; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SshKey.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SshKey.java index 7ea78b07bc..077972283c 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SshKey.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SshKey.java @@ -34,7 +34,7 @@ import java.util.Date; public class SshKey implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String title; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SystemHook.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SystemHook.java index 4debc0467b..c342c8f251 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SystemHook.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/SystemHook.java @@ -33,7 +33,7 @@ import java.util.Date; public class SystemHook implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String url; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Tag.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Tag.java index c89ebfecf1..288abb04c9 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Tag.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Tag.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Tag implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Commit commit; private String message; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TaskCompletionStatus.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TaskCompletionStatus.java index 0a6d7441fc..2e37b3cd17 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TaskCompletionStatus.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TaskCompletionStatus.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class TaskCompletionStatus implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer count; private Integer completedCount; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TimeStats.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TimeStats.java index 0dacae76db..d07f49e463 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TimeStats.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TimeStats.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class TimeStats implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer timeEstimate; private Integer totalTimeSpent; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Todo.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Todo.java index 82103368a3..80b089e204 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Todo.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Todo.java @@ -43,7 +43,7 @@ import java.util.Date; public class Todo implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private Project project; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Topic.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Topic.java index 1faa2ad4b8..6fecd46d7c 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Topic.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Topic.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Topic implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Integer id; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TopicParams.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TopicParams.java index 27f8608c01..6dcb77dfdf 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TopicParams.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TopicParams.java @@ -41,7 +41,7 @@ * Avatar Upload has its own Upload in {@link TopicsApi#updateTopicAvatar(Integer, File)} */ public class TopicParams implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String name; private String title; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TreeItem.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TreeItem.java index c48d61adca..c8337154c9 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TreeItem.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/TreeItem.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class TreeItem implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public enum Type { TREE, BLOB, COMMIT; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Trigger.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Trigger.java index 2a8d9fe3dd..f7d90ffef8 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Trigger.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Trigger.java @@ -31,7 +31,7 @@ import java.util.Date; public class Trigger implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private Long id; private String description; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/User.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/User.java index a6fd23ad75..88169c45af 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/User.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/User.java @@ -33,7 +33,7 @@ import java.util.List; public class User extends AbstractUser { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String bio; private Boolean bot; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Variable.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Variable.java index 491530e56b..3572808b8f 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Variable.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Variable.java @@ -39,7 +39,7 @@ import java.util.Map; public class Variable implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * Create a List of Variable from the provided Map. diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Version.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Version.java index fbec4d9889..70a02e02ab 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Version.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/Version.java @@ -32,7 +32,7 @@ import java.io.Serializable; public class Version implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String version; private String revision; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/WikiAttachment.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/WikiAttachment.java index ee71080ee2..1159e012aa 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/WikiAttachment.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/WikiAttachment.java @@ -32,10 +32,10 @@ import java.io.Serializable; public class WikiAttachment implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static class Link implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String url; private String markdown; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/WikiPage.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/WikiPage.java index 73e34db66a..6d89523a62 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/WikiPage.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/models/WikiPage.java @@ -53,7 +53,7 @@ import java.io.Serializable; public class WikiPage implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String title; private String content; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/services/NotificationService.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/services/NotificationService.java index 4437d780aa..3971758c1e 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/services/NotificationService.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/services/NotificationService.java @@ -51,7 +51,7 @@ public abstract class NotificationService implements Serializable { public static final String TAG_PUSH_CHANNEL_PROP = "tag_push_channel"; public static final String PIPELINE_CHANNEL_PROP = "pipeline_channel"; public static final String WIKI_PAGE_CHANNEL_PROP = "wiki_page_channel"; - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public static final String USERNAME_PROP = "username"; public static final String DESCRIPTION_PROP = "description"; public static final String TITLE_PROP = "title"; diff --git a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/services/SlackService.java b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/services/SlackService.java index 04077b7c29..b4271c6d56 100644 --- a/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/services/SlackService.java +++ b/bus-gitlab/src/main/java/org/miaixz/bus/gitlab/services/SlackService.java @@ -31,7 +31,7 @@ import org.miaixz.bus.gitlab.GitLabApiForm; public class SlackService extends NotificationService { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private String defaultChannel; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/Config.java b/bus-health/src/main/java/org/miaixz/bus/health/Config.java index c91a1c2a06..d024d8092c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/Config.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/Config.java @@ -253,7 +253,7 @@ public static Properties readProperties(String fileName) { */ public static class PropertyException extends RuntimeException { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * @param property The property name diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/Java.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/Java.java index b54c058fe4..2ad7b96215 100755 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/Java.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/Java.java @@ -68,7 +68,7 @@ */ public class Java implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private final String JAVA_VERSION = Platform.get(Keys.JAVA_VERSION, false); private final float JAVA_VERSION_FLOAT = getJavaVersionAsFloat(); diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/JavaRuntime.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/JavaRuntime.java index b8f5a8123f..f1c2e7f885 100755 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/JavaRuntime.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/JavaRuntime.java @@ -68,7 +68,7 @@ */ public class JavaRuntime implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private final String JAVA_RUNTIME_NAME = Platform.get(Keys.JAVA_RUNTIME_NAME, false); private final String JAVA_RUNTIME_VERSION = Platform.get(Keys.JAVA_RUNTIME_VERSION, false); diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/JavaSpec.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/JavaSpec.java index 07a28f5985..b4505535b6 100755 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/JavaSpec.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/JavaSpec.java @@ -67,7 +67,7 @@ */ public class JavaSpec implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 取得当前Java Spec.的名称(取自系统属性:java.specification.name) diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/Jvm.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/Jvm.java index ee1bec2013..e20a289c6d 100755 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/Jvm.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/Jvm.java @@ -67,7 +67,7 @@ */ public class Jvm implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 取得当前JVM impl.的名称(取自系统属性:java.vm.name) diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/JvmRuntime.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/JvmRuntime.java index 97a6b561be..af1feac9cd 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/JvmRuntime.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/JvmRuntime.java @@ -66,7 +66,7 @@ */ public class JvmRuntime implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private final Runtime currentRuntime = Runtime.getRuntime(); diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/JvmSpec.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/JvmSpec.java index 9f85ad87c6..997e2adce8 100755 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/JvmSpec.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/JvmSpec.java @@ -67,7 +67,7 @@ */ public class JvmSpec implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 取得当前JVM spec.的名称(取自系统属性:java.vm.specification.name) diff --git a/bus-image/src/main/java/org/miaixz/bus/image/metric/TagCamel.java b/bus-image/src/main/java/org/miaixz/bus/image/metric/TagCamel.java index 0ff571a393..5df408558f 100755 --- a/bus-image/src/main/java/org/miaixz/bus/image/metric/TagCamel.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/metric/TagCamel.java @@ -127,7 +127,7 @@ public class TagCamel implements Serializable { public static final TagCamel PRLUTsData = new TagCamel("PRLUTsData", TagType.OBJECT); public static final TagCamel MonoChrome = new TagCamel("MonoChrome", TagType.BOOLEAN); protected static final Map tags = Collections.synchronizedMap(new HashMap<>()); - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; private static final AtomicInteger idCounter = new AtomicInteger(Integer.MAX_VALUE); static { diff --git a/bus-logger/src/main/java/org/miaixz/bus/logger/metric/console/ConsoleColorProvider.java b/bus-logger/src/main/java/org/miaixz/bus/logger/metric/console/ConsoleColorProvider.java index 420395006f..87ab0a960f 100644 --- a/bus-logger/src/main/java/org/miaixz/bus/logger/metric/console/ConsoleColorProvider.java +++ b/bus-logger/src/main/java/org/miaixz/bus/logger/metric/console/ConsoleColorProvider.java @@ -44,7 +44,7 @@ */ public class ConsoleColorProvider extends ConsoleProvider { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 控制台打印类名的颜色代码 diff --git a/bus-logger/src/main/java/org/miaixz/bus/logger/metric/tinylog/TinyLogProvider.java b/bus-logger/src/main/java/org/miaixz/bus/logger/metric/tinylog/TinyLogProvider.java index ba39790305..13772de335 100644 --- a/bus-logger/src/main/java/org/miaixz/bus/logger/metric/tinylog/TinyLogProvider.java +++ b/bus-logger/src/main/java/org/miaixz/bus/logger/metric/tinylog/TinyLogProvider.java @@ -46,7 +46,7 @@ */ public class TinyLogProvider extends Provider { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 日志框架实现提供者 diff --git a/bus-mapper/src/main/java/org/miaixz/bus/mapper/additional/aggregation/AggregateCondition.java b/bus-mapper/src/main/java/org/miaixz/bus/mapper/additional/aggregation/AggregateCondition.java index 47d8c791ce..6f6e64da43 100644 --- a/bus-mapper/src/main/java/org/miaixz/bus/mapper/additional/aggregation/AggregateCondition.java +++ b/bus-mapper/src/main/java/org/miaixz/bus/mapper/additional/aggregation/AggregateCondition.java @@ -43,7 +43,7 @@ */ public class AggregateCondition implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 聚合属性 */ diff --git a/bus-opencv/src/main/java/org/opencv/core/CvException.java b/bus-opencv/src/main/java/org/opencv/core/CvException.java index e9241e6886..fe19b2b5df 100644 --- a/bus-opencv/src/main/java/org/opencv/core/CvException.java +++ b/bus-opencv/src/main/java/org/opencv/core/CvException.java @@ -2,7 +2,7 @@ public class CvException extends RuntimeException { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; public CvException(String msg) { super(msg); diff --git a/bus-pager/src/main/java/org/miaixz/bus/pager/Page.java b/bus-pager/src/main/java/org/miaixz/bus/pager/Page.java index 5fcb0cadcb..02f1b4fc70 100644 --- a/bus-pager/src/main/java/org/miaixz/bus/pager/Page.java +++ b/bus-pager/src/main/java/org/miaixz/bus/pager/Page.java @@ -45,7 +45,7 @@ */ public class Page extends ArrayList implements Closeable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 记录当前堆栈,可查找到page在何处创建 diff --git a/bus-pager/src/main/java/org/miaixz/bus/pager/Serialize.java b/bus-pager/src/main/java/org/miaixz/bus/pager/Serialize.java index add9e26b1a..3ad228f1d3 100644 --- a/bus-pager/src/main/java/org/miaixz/bus/pager/Serialize.java +++ b/bus-pager/src/main/java/org/miaixz/bus/pager/Serialize.java @@ -38,7 +38,7 @@ */ public class Serialize implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 总记录数 diff --git a/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/ColumnSchema.java b/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/ColumnSchema.java index fee29da797..1e6e42d590 100644 --- a/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/ColumnSchema.java +++ b/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/ColumnSchema.java @@ -40,7 +40,7 @@ @Setter public class ColumnSchema { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 表中的列的索引(从 1 开始) */ diff --git a/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/DatabaseSchema.java b/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/DatabaseSchema.java index 6e08e46c07..3974fd3afb 100644 --- a/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/DatabaseSchema.java +++ b/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/DatabaseSchema.java @@ -43,7 +43,7 @@ @Setter public class DatabaseSchema implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 数据库名称 */ diff --git a/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/TableSchema.java b/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/TableSchema.java index 88175f7a7f..fced0b0b3e 100644 --- a/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/TableSchema.java +++ b/bus-shade/src/main/java/org/miaixz/bus/shade/screw/metadata/TableSchema.java @@ -43,7 +43,7 @@ @Setter public class TableSchema implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = -1L; /** * 表名 */ From 4d80e9f412913786d8c304f5de7ff01aebe3792b Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Sat, 29 Jun 2024 17:42:27 +0800 Subject: [PATCH 03/16] fix desc --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aedcfa7531..c12b9b7df4 100755 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ Bus (应用/服务总线) 是一个基础框架、服务套件,它基于Java17 ### Gradle ``` -implementation 'org.839128:bus-all:x.x.x' +implementation 'org.miaixz:bus-all:x.x.x' ``` ### Downlad From fbfea041fe9d47c1459f4eaa82c778969c931acf Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Sun, 30 Jun 2024 11:54:52 +0800 Subject: [PATCH 04/16] v8.0.0 --- NOTICE | 2 +- README.md | 56 +++++++++++++++++++++++++++---------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/NOTICE b/NOTICE index a75c75d412..46ea07e0f6 100644 --- a/NOTICE +++ b/NOTICE @@ -3,7 +3,7 @@ Bus Framework Copyright (c) 2015-2024 miaixz.org and other contributors. This product includes software developed by - The Miaixz Team (http://www.miaixz.org/). + The Miaixz Team (https://www.miaixz.org/). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/README.md b/README.md index c12b9b7df4..2e7378b696 100755 --- a/README.md +++ b/README.md @@ -52,35 +52,35 @@ Bus (应用/服务总线) 是一个基础框架、服务套件,它基于Java17 ## 组件信息 -| 完成 | 模块 | 描述信息 | -|-----|---------------|-------------------------------------------------| -| [√] | bus-all | 包含微服务所需的完整模块以及通用组件 | +| 完成 | 模块 | 描述信息 | +|-----|---------------|---------------------------------------------------| +| [√] | bus-all | 包含微服务所需的完整模块以及通用组件 | | [√] | bus-base | 基础功能及base相关,实体(Entity),服务(Service),接口(Controller) | -| [√] | bus-bom | 包含所有组建信息,当然可以通过配置按需加载等 | -| [√] | bus-cache | 缓存服务及工具,支持redis,memcached,,hessian等 | -| [√] | bus-core | 核心功能及工具类,包括常量、线程、类加载器、反射、集合、日期等常用工具 | -| [√] | bus-cron | 定时器及定时任务等功能 | -| [√] | bus-crypto | 加密解密,支持支持AES/DES/REA/MD5等常用加密算法 | -| [√] | bus-extra | 扩展功能及文件操作,FTP/文件/二维码/短信相关支持 | -| [√] | bus-health | 应用服务器健康信息,软件硬件信息采集等 | -| [√] | bus-http | HTTP功能封装,根据业务场景可使用 Httpd/Httpx/Httpz 等方式 | -| [√] | bus-image | 图像/影像应用服务,解析预览等 | -| [√] | bus-limiter | 服务限流/降级/提升热点,根据不同业务设置不同策略 | -| [√] | bus-logger | 日志信息及功能,动态检测日志实现的方式,使日志使用个更加便利灵活简单 | -| [√] | bus-mapper | 数据操作,在 MyBatis 的基础上只做增强不做改变,为简化开发、提高效率 | -| [√] | bus-oauth | 第三方登录,已集成十多家第三方平台(国内外常用的基本都已包含) | -| [√] | bus-pager | 数据分页,mybatis | -| [√] | bus-office | office等相关转换及处理,POI封装实现,使Java操作Excel等文件变得简单 | -| [√] | bus-opencv | 图像识别及分析,提供丰富的图形图像处理算法,跨平台支持等 | -| [√] | bus-proxy | 公共代理,使动态代理变得简单 | -| [√] | bus-sensitive | 敏感数据脱敏,对应用和使用者透明,业务逻辑无感知,通过配置集成 | -| [√] | bus-setting | 设置工具类, 用于支持设置/配置 | -| [√] | bus-shade | Entity,Service,Mapper等相关代码生成工具 | -| [√] | bus-socket | 基础NIO/AIO通讯,Socket封装,支持TCP/UDP服务端 | -| [√] | bus-starter | SpringBoot starter,spring相关配置,启动及相关配置文件信息 | -| [√] | bus-storage | 文件存储组件,,支持阿里云、七牛,提供了工厂模式和注入两种集成方式 | -| [×] | bus-tracer | 轻量级分布式链路跟踪监控,日志及访问流程追踪以及内部调用链追踪 | -| [√] | bus-validate | 参数校验,会默认拦截所有的标记有`@Valid`的方法或类 | +| [√] | bus-bom | 包含所有组建信息,当然可以通过配置按需加载等 | +| [√] | bus-cache | 缓存服务及工具,支持redis,memcached,,hessian等 | +| [√] | bus-core | 核心功能及工具类,包括常量、线程、类加载器、反射、集合、日期等常用工具 | +| [√] | bus-cron | 定时器及定时任务等功能 | +| [√] | bus-crypto | 加密解密,支持支持AES/DES/REA/MD5等常用加密算法 | +| [√] | bus-extra | 扩展功能及文件操作,FTP/文件/二维码/短信相关支持 | +| [√] | bus-health | 应用服务器健康信息,软件硬件信息采集等 | +| [√] | bus-http | HTTP功能封装,根据业务场景可使用 Httpd/Httpx/Httpz 等方式 | +| [√] | bus-image | 图像/影像应用服务,解析预览等 | +| [√] | bus-limiter | 服务限流/降级/提升热点,根据不同业务设置不同策略 | +| [√] | bus-logger | 日志信息及功能,动态检测日志实现的方式,使日志使用个更加便利灵活简单 | +| [√] | bus-mapper | 数据操作,在 MyBatis 的基础上只做增强不做改变,为简化开发、提高效率 | +| [√] | bus-oauth | 第三方登录,已集成十多家第三方平台(国内外常用的基本都已包含) | +| [√] | bus-pager | 数据分页,mybatis等 | +| [√] | bus-office | office等相关转换及处理,POI封装实现,使Java操作Excel等文件变得简单 | +| [√] | bus-opencv | 图像识别及分析,提供丰富的图形图像处理算法,跨平台支持等 | +| [√] | bus-proxy | 公共代理,使动态代理变得简单 | +| [√] | bus-sensitive | 敏感数据脱敏,对应用和使用者透明,业务逻辑无感知,通过配置集成 | +| [√] | bus-setting | 设置工具类, 用于支持设置/配置 | +| [√] | bus-shade | Entity,Service,Mapper等相关代码生成工具 | +| [√] | bus-socket | 基础NIO/AIO通讯,Socket封装,支持TCP/UDP服务端 | +| [√] | bus-starter | SpringBoot starter,spring相关配置,启动及相关配置文件信息 | +| [√] | bus-storage | 文件存储组件,,支持阿里云、七牛,提供了工厂模式和注入两种集成方式 | +| [×] | bus-tracer | 轻量级分布式链路跟踪监控,日志及访问流程追踪以及内部调用链追踪 | +| [√] | bus-validate | 参数校验,会默认拦截所有的标记有`@Valid`的方法或类 | ## 功能概述 From 969f514dd1b7c9d10ef5708e176d0ef71018841a Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Mon, 1 Jul 2024 09:49:10 +0800 Subject: [PATCH 05/16] fix DateBuilder --- .../core/center/date/builder/DateBuilder.java | 210 +++++++++++------- .../bus/core/center/date/culture/en/Week.java | 24 +- .../format/parser/GlobalRegexDateParser.java | 116 ++++++++++ .../date/format/parser/RegexDateParser.java | 120 ++++++---- .../format/parser/RegexListDateParser.java | 104 --------- .../org/miaixz/bus/core/xyz/ThreadKit.java | 35 ++- .../miaixz/bus/office/excel/ExcelWriter.java | 4 +- 7 files changed, 359 insertions(+), 254 deletions(-) create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/GlobalRegexDateParser.java delete mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexListDateParser.java diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/builder/DateBuilder.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/builder/DateBuilder.java index 54de95170e..d1a752b92a 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/builder/DateBuilder.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/builder/DateBuilder.java @@ -77,26 +77,31 @@ public final class DateBuilder { * 秒 */ private int second; + /** + * 毫秒 + */ + private long millisecond; /** * 纳秒 */ - private int ns; + private int nanosecond; /** - * Unix时间戳(秒) + * 时间戳 */ - private long unixsecond; + private long timestamp; /** - * 时区偏移量是否已设置 + * 时区 */ - private boolean zoneOffsetSetted; + private TimeZone zone; /** - * 时区偏移量(分钟) + * 时区偏移量 + * 分钟 */ - private int zoneOffset; + private int offset; /** - * 时区 + * 时区偏移量是否已设置 */ - private TimeZone zone; + private boolean flag; /** * 上午标志 */ @@ -128,7 +133,7 @@ public int getYear() { * 设置年份。 * * @param year 要设置的年份 - * @return 返回DateBuilder实例,支持链式调用 + * @return 返回DateBuilder实例,支持链式调用。 */ public DateBuilder setYear(final int year) { this.year = year; @@ -136,18 +141,18 @@ public DateBuilder setYear(final int year) { } /** - * 获取月份 + * 获取月份,从1开始。 * - * @return 返回设置的月份 + * @return 返回设置的月份,从1开始。 */ public int getMonth() { return month; } /** - * 设置月份 + * 设置月份,从1开始。 * - * @param month 要设置的月份 + * @param month 要设置的月份,从1开始。 * @return this */ public DateBuilder setMonth(final int month) { @@ -165,10 +170,10 @@ public int getWeek() { } /** - * 设置日期构建器的周数 + * 设置日期构建器的周数,ISO8601规范,1代表Monday,2代表Tuesday,以此类推。 * - * @param week 指定的周数,通常用于构建具体的日期对象 - * @return this + * @param week 指定的周数,通常用于构建具体的日期对象,ISO8601规范,1代表Monday,2代表Tuesday,以此类推。 + * @return this。 */ public DateBuilder setWeek(final int week) { this.week = week; @@ -178,7 +183,7 @@ public DateBuilder setWeek(final int week) { /** * 获取当前日期对象中的日部分 * - * @return 返回一个整数,表示当前日期中的日 + * @return 返回一个整数,表示当前日期中的日。 */ public int getDay() { return day; @@ -187,7 +192,7 @@ public int getDay() { /** * 设置日期对象中的日部分 * - * @param day 指定要设置的日,必须为整数 + * @param day 指定要设置的日,必须为整数。 * @return this */ public DateBuilder setDay(final int day) { @@ -198,7 +203,7 @@ public DateBuilder setDay(final int day) { /** * 获取当前日期对象中的小时数 * - * @return 小时数,返回值类型为int + * @return 小时数,返回值类型为int。 */ public int getHour() { return hour; @@ -207,7 +212,7 @@ public int getHour() { /** * 设置日期对象中的小时数 * - * @param hour 要设置的小时数,必须为整数 + * @param hour 要设置的小时数,必须为整数。 * @return this */ public DateBuilder setHour(final int hour) { @@ -218,7 +223,7 @@ public DateBuilder setHour(final int hour) { /** * 获取当前日期构建器中的分钟数 * - * @return 返回设置的分钟数,类型为int + * @return 返回设置的分钟数,类型为int。 */ public int getMinute() { return minute; @@ -227,7 +232,7 @@ public int getMinute() { /** * 设置日期构建器中的分钟数 * - * @param minute 要设置的分钟数,必须为整数 + * @param minute 要设置的分钟数,必须为整数。 * @return this。 */ public DateBuilder setMinute(final int minute) { @@ -260,18 +265,18 @@ public DateBuilder setSecond(final int second) { * * @return 当前对象的纳秒数 */ - public int getNs() { - return ns; + public int getNanosecond() { + return nanosecond; } /** * 设置纳秒数 * - * @param ns 要设置的纳秒数 + * @param nanosecond 要设置的纳秒数 * @return this */ - public DateBuilder setNs(final int ns) { - this.ns = ns; + public DateBuilder setNanosecond(final int nanosecond) { + this.nanosecond = nanosecond; return this; } @@ -280,38 +285,58 @@ public DateBuilder setNs(final int ns) { * * @return 当前对象的Unix时间戳(以秒为单位) */ - public long getUnixsecond() { - return unixsecond; + public long getTimestamp() { + return timestamp; } /** * 设置Unix时间戳(秒) * - * @param unixsecond 要设置的Unix时间戳(以秒为单位) + * @param timestamp 要设置的Unix时间戳(以秒为单位) + * @return this + */ + public DateBuilder setTimestamp(final long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * 获取时间戳(毫秒) + * + * @return 当前对象的时间戳(以毫秒为单位) + */ + public long getMillisecond() { + return millisecond; + } + + /** + * 设置时间戳(毫秒) + * + * @param millisecond 要设置的时间戳(以毫秒为单位) * @return this */ - public DateBuilder setUnixsecond(final long unixsecond) { - this.unixsecond = unixsecond; + public DateBuilder setMillisecond(final long millisecond) { + this.millisecond = millisecond; return this; } /** * 检查时区偏移量是否已设置 * - * @return 如果时区偏移量已设置则返回true,否则返回false + * @return 如果时区偏移量已设置则返回true,否则返回false。 */ - public boolean isZoneOffsetSetted() { - return zoneOffsetSetted; + public boolean isFlag() { + return flag; } /** * 设置时区偏移量是否已设置的状态 * - * @param zoneOffsetSetted 指定时区偏移量是否已设置的状态 + * @param flag 指定时区偏移量是否已设置的状态 * @return this */ - public DateBuilder setZoneOffsetSetted(final boolean zoneOffsetSetted) { - this.zoneOffsetSetted = zoneOffsetSetted; + public DateBuilder setFlag(final boolean flag) { + this.flag = flag; return this; } @@ -320,18 +345,18 @@ public DateBuilder setZoneOffsetSetted(final boolean zoneOffsetSetted) { * * @return 返回设置的时区偏移量 */ - public int getZoneOffset() { - return zoneOffset; + public int getOffset() { + return offset; } /** * 设置时区偏移量 * - * @param zoneOffset 要设置的时区偏移量 + * @param offset 要设置的时区偏移量 * @return this */ - public DateBuilder setZoneOffset(final int zoneOffset) { - this.zoneOffset = zoneOffset; + public DateBuilder setOffset(final int offset) { + this.offset = offset; return this; } @@ -358,7 +383,7 @@ public DateBuilder setZone(final TimeZone zone) { /** * 检查当前是否为上午 * - * @return 如果当前设置为上午则返回true,否则返回false + * @return 如果当前设置为上午则返回true,否则返回false。 */ public boolean isAm() { return am; @@ -378,7 +403,7 @@ public DateBuilder setAm(final boolean am) { /** * 检查当前是否为下午 * - * @return 如果当前设置为下午则返回true,否则返回false + * @return 如果当前设置为下午则返回true,否则返回false。 */ public boolean isPm() { return pm; @@ -408,27 +433,28 @@ public DateBuilder reset() { this.hour = 0; this.minute = 0; this.second = 0; - this.ns = 0; - this.unixsecond = 0; + this.millisecond = 0; + this.nanosecond = 0; + this.timestamp = 0; this.am = false; this.pm = false; - this.zoneOffsetSetted = false; - this.zoneOffset = 0; + this.flag = false; + this.offset = 0; this.zone = null; return this; } /** - * 将当前时间对象转换为{@link Date}类型。此方法根据是否设置了时区偏移量使用不同的转换策略 + * 将当前时间对象转换为{@link Date}类型。此方法根据是否设置了时区偏移量使用不同的转换策略。 *
    *
  • 如果时区偏移量未设置,则将时间转换为 Calendar 对象后获取其 Date 表现形式
  • - *
  • 如果时区偏移量已设置,则直接转换为 OffsetDateTime 对象,进一步转换为 Instant 对象,最后转换为 Date 对象返回
  • + *
  • 如果时区偏移量已设置,则直接转换为 OffsetDateTime 对象,进一步转换为 Instant 对象,最后转换为 Date 对象返回。
  • *
* - * @return Date 表示当前时间的 Date 对象 + * @return the date 表示当前时间的 Date 对象 */ public Date toDate() { - if (!zoneOffsetSetted) { + if (!flag) { // 时区偏移量未设置,使用 Calendar 进行转换 return toCalendar().getTime(); } @@ -438,8 +464,8 @@ public Date toDate() { /** * 将当前对象的日期时间信息转换为{@link Calendar}实例。 - * 如果`unixsecond`不为0,将根据unix时间戳(秒)和纳秒偏移量构造Calendar。 - * 否则,根据提供的时区信息`zone`或`zoneOffset`来设置Calendar的时区。 + * 如果`timestamp`不为0,将根据时间戳(秒)和纳秒偏移量构造Calendar。 + * 否则,根据提供的时区信息`zone`或`offset`来设置Calendar的时区。 * 最后,设置年、月、日、时、分、秒和毫秒信息。 * * @return Calendar 根据当前日期时间信息构建的Calendar实例。 @@ -450,30 +476,36 @@ public Calendar toCalendar() { // 获取一个Calendar实例 final Calendar calendar = Calendar.getInstance(); - // 如果有unix时间戳,则据此设置时间 - if (unixsecond != 0) { - // 设置时间戳对应的毫秒数 - calendar.setTimeInMillis(unixsecond * 1000 + ns / 1_000_000); - return calendar; - } - // 设置时区 if (zone != null) { // 使用指定的时区 calendar.setTimeZone(zone); // 如果设置了时区偏移量 - } else if (zoneOffsetSetted) { + } else if (flag) { // 尝试根据偏移量获取时区ID - final String[] ids = TimeZone.getAvailableIDs(zoneOffset * 60_000); + final String[] ids = TimeZone.getAvailableIDs(offset * 60_000); // 如果没有找到有效的时区ID if (ids.length == 0) { throw new DateException("Can't build Calendar, " + - "because the zoneOffset[{}] can't be converted to an valid TimeZone.", this.zoneOffset); + "because the zoneOffset[{}] can't be converted to an valid TimeZone.", this.offset); } // 设置第一个找到的时区 calendar.setTimeZone(TimeZone.getTimeZone(ids[0])); } + // 如果毫秒数不为0,则直接使用毫秒数设置时间 + if (millisecond != 0) { + calendar.setTimeInMillis(millisecond); + return calendar; + } + + // 如果有unix时间戳,则据此设置时间 + if (timestamp != 0) { + // 设置时间戳对应的毫秒数 + calendar.setTimeInMillis(timestamp * 1000 + nanosecond / 1_000_000); + return calendar; + } + // 设置日期和时间字段 calendar.set(Calendar.YEAR, year); // Calendar的月份从0开始 @@ -483,28 +515,33 @@ public Calendar toCalendar() { calendar.set(Calendar.MINUTE, minute); calendar.set(Calendar.SECOND, second); // 纳秒转换为毫秒 - calendar.set(Calendar.MILLISECOND, ns / 1_000_000); + calendar.set(Calendar.MILLISECOND, nanosecond / 1_000_000); return calendar; } /** * 将当前对象的日期时间信息转换为{@link LocalDateTime}。 * 此方法根据对象中的时间信息(年、月、日、时、分、秒、纳秒)和时区信息(如果存在), - * 创建并返回一个LocalDateTime实例。时区信息可以是Unix时间戳中的秒数(unixsecond), - * 也可以是显式设置的时区偏移量(zoneOffsetSetted),或者使用默认时区(zone != null)。 + * 创建并返回一个LocalDateTime实例。时区信息可以是Unix时间戳中的秒数(timestamp), + * 也可以是显式设置的时区偏移量(flag),或者使用默认时区(zone != null)。 * * @return LocalDateTime 表示当前对象日期时间的LocalDateTime实例。 */ public LocalDateTime toLocalDateTime() { this.prepare(); - // 如果unixsecond大于0,使用unix时间戳创建LocalDateTime - if (unixsecond > 0) { - return LocalDateTime.ofEpochSecond(unixsecond, ns, DEFAULT_OFFSET); + if (millisecond > 0) { + final Instant instant = Instant.ofEpochMilli(millisecond); + return LocalDateTime.ofEpochSecond(instant.getEpochSecond(), instant.getNano(), DEFAULT_OFFSET); + } + + // 如果timestamp大于0,使用unix时间戳创建LocalDateTime + if (timestamp > 0) { + return LocalDateTime.ofEpochSecond(timestamp, nanosecond, DEFAULT_OFFSET); } // 创建LocalDateTime实例,使用年月日时分秒纳秒信息 - final LocalDateTime dateTime = LocalDateTime.of(year, month, day, hour, minute, second, ns); + final LocalDateTime dateTime = LocalDateTime.of(year, month, day, hour, minute, second, nanosecond); int zoneSecond = 0; // 用于存储时区偏移秒数 @@ -514,8 +551,8 @@ public LocalDateTime toLocalDateTime() { } // 如果设置了显式的时区偏移量,计算时区偏移量 - if (zoneOffsetSetted) { - zoneSecond = TimeZone.getDefault().getRawOffset() / 1000 - zoneOffset * 60; + if (flag) { + zoneSecond = TimeZone.getDefault().getRawOffset() / 1000 - offset * 60; } // 如果存在时区偏移,对LocalDateTime进行调整后返回,否则直接返回原始的LocalDateTime实例 @@ -524,30 +561,35 @@ public LocalDateTime toLocalDateTime() { /** * 将当前对象转换为 {@link OffsetDateTime}。 - * 此方法根据 unixsecond、时区偏移量或时区来构建 OffsetDateTime。 - * 如果 unixsecond 大于 0,将使用 unixsecond 和纳秒来创建 UTC 时间。 + * 此方法根据 timestamp、时区偏移量或时区来构建 OffsetDateTime。 + * 如果 timestamp 大于 0,将使用 timestamp 和纳秒来创建 UTC 时间。 * 如果设置了时区偏移量,将使用该偏移量构造 {@link OffsetDateTime}。 * 如果设置了时区,将使用该时区构造 {@link OffsetDateTime}。 * 如果以上信息均未设置,则默认使用 UTC 时间戳 0 创建 OffsetDateTime。 * - * @return OffsetDateTime 表示当前时间的 OffsetDateTime 对象。 + * @return 表示当前时间的 OffsetDateTime 对象 */ public OffsetDateTime toOffsetDateTime() { // 准备工作,可能涉及一些初始化或数据处理 this.prepare(); - if (unixsecond > 0) { + if (millisecond > 0) { + return OffsetDateTime.ofInstant(Instant.ofEpochMilli(millisecond), ZoneKit.ZONE_ID_UTC); + } + + if (timestamp > 0) { // 如果设置了 unix 时间戳,则使用它和纳秒创建 UTC 时间 - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(unixsecond, ns), ZoneKit.ZONE_ID_UTC); + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(timestamp, nanosecond), ZoneKit.ZONE_ID_UTC); } // 创建 LocalDateTime 对象 - final LocalDateTime dateTime = LocalDateTime.of(year, month, day, hour, minute, second, ns); + final LocalDateTime dateTime = LocalDateTime.of(year, month, day, hour, minute, second, nanosecond); // 检查是否设置了时区偏移量 - if (zoneOffsetSetted) { + if (flag) { // 根据偏移量创建 ZoneOffset - final ZoneOffset offset = ZoneOffset.ofHoursMinutes(zoneOffset / 60, zoneOffset % 60); - return dateTime.atOffset(offset); // 使用时区偏移量构造 OffsetDateTime + final ZoneOffset offset = ZoneOffset.ofHoursMinutes(this.offset / 60, this.offset % 60); + // 使用时区偏移量构造 OffsetDateTime + return dateTime.atOffset(offset); } // 检查是否设置了时区 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Week.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Week.java index c7e1fe7160..53a63797ef 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Week.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Week.java @@ -29,6 +29,7 @@ import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.xyz.EnumKit; +import org.miaixz.bus.core.xyz.StringKit; import java.time.DayOfWeek; import java.util.Calendar; @@ -128,6 +129,27 @@ public static Week of(final int code) { */ public static Week of(final String name) throws IllegalArgumentException { if (null != name && name.length() > 1) { + if (StringKit.startWithAny(name, "星期", "周")) { + final char chineseNumber = name.charAt(name.length() - 1); + switch (chineseNumber) { + case '一': + return MONDAY; + case '二': + return TUESDAY; + case '三': + return WEDNESDAY; + case '四': + return THURSDAY; + case '五': + return FRIDAY; + case '六': + return SATURDAY; + case '日': + return SUNDAY; + } + throw new IllegalArgumentException("Invalid week name: " + name); + } + switch (Character.toLowerCase(name.charAt(0))) { case 'm': return MONDAY; // monday @@ -154,7 +176,7 @@ public static Week of(final String name) throws IllegalArgumentException { } } - throw new IllegalArgumentException("Invalid Week name: " + name); + throw new IllegalArgumentException("Invalid week name: " + name); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/GlobalRegexDateParser.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/GlobalRegexDateParser.java new file mode 100644 index 0000000000..7d9b30f385 --- /dev/null +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/GlobalRegexDateParser.java @@ -0,0 +1,116 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.core.center.date.format.parser; + +import java.util.Date; +import java.util.regex.Pattern; + +/** + * 全局正则日期解析器 + * 通过使用预定义或自定义的正则规则,解析日期字符串 + * + * @author Kimi Liu + * @since Java 17+ + */ +public class GlobalRegexDateParser { + + private static final String yearRegex = "(?\\d{2,4})"; + private static final String monthRegex = "(?\\w{3,9})"; + private static final String dayRegex = "(?\\d{1,2})(?:th)?"; + // 周的正则,匹配:Mon, Tue, Wed, Thu, Fri, Sat, Sun,或 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday + // 日期中一般出现在头部,可选 + private static final String weekRegexWithSuff = "(?[mwfts][oeruha][ndieut](\\w{3,6})?\\W+)?"; + // hh:mm:ss.SSSSZ hh:mm:ss.SSSS hh:mm:ss hh:mm + private static final String timeRegexWithPre = "(" + + "\\W+(at\\s)?(?\\d{1,2})" + + ":(?\\d{1,2})" + + "(:(?\\d{1,2}))?" + + "(?:[.,](?\\d{1,9}))?(?z)?" + + "(\\s?(?[ap]m))?" + + ")?"; + // 时区,类似: +08:00 +0800 +08,可选 + private static final String zoneOffsetRegexWithPre = "(\\s?(?[-+]\\d{1,2}:?(?:\\d{2})?))?"; + // 时区名称,类似: CST UTC (CST),可选 + private static final String zoneNameRegexWithPre = "(\\s[(]?(?[a-z ]+)[)]?)?"; + private static final String zoneNameIgnoreRegexWithPre = "(\\s[(]?(?[a-z ]+)[)]?)?"; + + private static final RegexDateParser PARSER; + + static { + // 月开头,类似:May 8 + final String dateRegexMonthFirst = monthRegex + "\\W+" + dayRegex; + // 日开头,类似:02-Jan + final String dateRegexDayFirst = dayRegex + "\\W+" + monthRegex; + // 时区拼接,类似: + // GMT+0100 (GMT Daylight Time) + // +0200 (CEST) + // GMT+0100 + // MST + final String zoneRegex = zoneNameRegexWithPre + zoneOffsetRegexWithPre + zoneNameIgnoreRegexWithPre; + + PARSER = RegexDateParser.of( + // 年开头 + + //【周月日年时】类似:May 8, 2009,时间部分可选,类似:5:57:51,5:57:51 +08:00 + weekRegexWithSuff + dateRegexMonthFirst + "\\W+" + yearRegex + timeRegexWithPre + zoneRegex, + //【周月日时年】类似:Mon Jan 2 15:04:05 MST 2006 + weekRegexWithSuff + dateRegexMonthFirst + timeRegexWithPre + zoneRegex + "\\W+" + yearRegex, + //【周日月年时】类似:Monday, 02-Jan-06 15:04:05 MST + weekRegexWithSuff + dateRegexDayFirst + "\\W+" + yearRegex + timeRegexWithPre + zoneRegex + ); + } + + /** + * 解析日期,此方法线程安全 + * + * @param source 日期字符串 + * @return 日期 + */ + public static Date parse(final CharSequence source) { + return PARSER.parse(source); + } + + /** + * 新增自定义日期正则 + * + * @param regex 日期正则 + */ + synchronized public static void registerRegex(final String regex) { + PARSER.addRegex(regex); + } + + /** + * 新增自定义日期正则 + * + * @param pattern 日期正则 + */ + synchronized public static void registerPattern(final Pattern pattern) { + PARSER.addPattern(pattern); + } + +} \ No newline at end of file diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexDateParser.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexDateParser.java index 868d8efb5c..c70c5b9385 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexDateParser.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexDateParser.java @@ -32,73 +32,118 @@ import org.miaixz.bus.core.center.date.culture.en.Week; import org.miaixz.bus.core.lang.Optional; import org.miaixz.bus.core.lang.exception.DateException; -import org.miaixz.bus.core.xyz.DateKit; +import org.miaixz.bus.core.xyz.CharKit; +import org.miaixz.bus.core.xyz.ListKit; import org.miaixz.bus.core.xyz.PatternKit; import org.miaixz.bus.core.xyz.StringKit; +import java.io.Serializable; +import java.util.ArrayList; import java.util.Date; +import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** - * 正则日期解析器 + * 使用正则列表方式的日期解析器 + * 通过定义若干的日期正则,遍历匹配到给定正则后,按照正则方式解析为日期 * * @author Kimi Liu * @since Java 17+ */ -public class RegexDateParser implements PredicateDateParser { +public class RegexDateParser implements DateParser, Serializable { - private static final int[] NSS = { - 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1 - }; + private static final long serialVersionUID = -1L; - private final Pattern pattern; + private static final int[] NSS = {100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1}; + + + private final List pattern; /** * 构造 * * @param pattern 正则表达式 */ - public RegexDateParser(final Pattern pattern) { + public RegexDateParser(final List pattern) { this.pattern = pattern; } /** - * 根据给定带名称的分组正则创建 + * 根据给定的正则列表 * - * @param regex 正则表达式 + * @param regexes 正则列表,默认忽略大小写 + * @return RegexListDateParser + */ + public static RegexDateParser of(final String... regexes) { + final List patternList = new ArrayList<>(regexes.length); + for (final String regex : regexes) { + patternList.add(Pattern.compile(regex, Pattern.CASE_INSENSITIVE)); + } + return new RegexDateParser(patternList); + } + + /** + * 根据给定的正则列表 + * + * @param patterns 正则列表 + * @return {@link RegexDateParser} + */ + public static RegexDateParser of(final Pattern... patterns) { + return new RegexDateParser(ListKit.of(patterns)); + } + + /** + * 新增自定义日期正则 + * + * @param regex 日期正则 * @return this */ - public static RegexDateParser of(final String regex) { + public RegexDateParser addRegex(final String regex) { // 日期正则忽略大小写 - return of(Pattern.compile(regex, Pattern.CASE_INSENSITIVE)); + return addPattern(Pattern.compile(regex, Pattern.CASE_INSENSITIVE)); } /** - * 根据给定带名称的分组正则创建 + * 新增自定义日期正则 * - * @param pattern 正则表达式 + * @param pattern 日期正则 * @return this */ - public static RegexDateParser of(final Pattern pattern) { - return new RegexDateParser(pattern); + public RegexDateParser addPattern(final Pattern pattern) { + this.pattern.add(pattern); + return this; + } + + @Override + public Date parse(final CharSequence source) throws DateException { + final DateBuilder dateBuilder = DateBuilder.of(); + Matcher matcher; + for (final Pattern pattern : this.pattern) { + matcher = pattern.matcher(source); + if (matcher.matches()) { + parse(matcher, dateBuilder); + return dateBuilder.toDate(); + } + } + + throw new DateException("No valid pattern for date string: [{}]", source); } /** * 解析日期 * * @param matcher 正则匹配器 - * @return 日期 * @throws DateException 日期解析异常 */ - public static Date parse(final Matcher matcher) throws DateException { + private static void parse(final Matcher matcher, final DateBuilder dateBuilder) throws DateException { // 毫秒时间戳 final String millisecond = PatternKit.group(matcher, "millisecond"); if (StringKit.isNotEmpty(millisecond)) { - return DateKit.date(parseLong(millisecond)); + dateBuilder.setMillisecond(parseLong(millisecond)); + return; } - final DateBuilder dateBuilder = DateBuilder.of(); // year Optional.ofNullable(PatternKit.group(matcher, "year")).ifPresent((year) -> dateBuilder.setYear(parseYear(year))); // month @@ -114,10 +159,10 @@ public static Date parse(final Matcher matcher) throws DateException { // second Optional.ofNullable(PatternKit.group(matcher, "second")).ifPresent((second) -> dateBuilder.setSecond(parseNumberLimit(second, 0, 59))); // ns - Optional.ofNullable(PatternKit.group(matcher, "ns")).ifPresent((ns) -> dateBuilder.setNs(parseNano(ns))); + Optional.ofNullable(PatternKit.group(matcher, "ns")).ifPresent((ns) -> dateBuilder.setNanosecond(parseNano(ns))); // am or pm Optional.ofNullable(PatternKit.group(matcher, "m")).ifPresent((m) -> { - if ('p' == m.charAt(0)) { + if (CharKit.equals('p', m.charAt(0), true)) { dateBuilder.setPm(true); } else { dateBuilder.setAm(true); @@ -126,22 +171,25 @@ public static Date parse(final Matcher matcher) throws DateException { // zero zone offset Optional.ofNullable(PatternKit.group(matcher, "zero")).ifPresent((zero) -> { - dateBuilder.setZoneOffsetSetted(true); - dateBuilder.setZoneOffset(0); + dateBuilder.setFlag(true); + dateBuilder.setOffset(0); }); // zone offset Optional.ofNullable(PatternKit.group(matcher, "zoneOffset")).ifPresent((zoneOffset) -> { - dateBuilder.setZoneOffsetSetted(true); - dateBuilder.setZoneOffset(parseZoneOffset(zoneOffset)); + dateBuilder.setFlag(true); + dateBuilder.setOffset(parseZoneOffset(zoneOffset)); + }); + + // zone name + Optional.ofNullable(PatternKit.group(matcher, "zoneName")).ifPresent((zoneOffset) -> { + // 暂时不支持解析 }); // unix时间戳 Optional.ofNullable(PatternKit.group(matcher, "unixsecond")).ifPresent((unixsecond) -> { - dateBuilder.setUnixsecond(parseLong(unixsecond)); + dateBuilder.setTimestamp(parseLong(unixsecond)); }); - - return dateBuilder.toDate(); } private static int parseYear(final String year) { @@ -238,18 +286,4 @@ private static int parseZoneOffset(final String zoneOffset) { return (hour * 60 + minute) * (neg ? -1 : 1); } - @Override - public boolean test(final CharSequence source) { - return PatternKit.isMatch(this.pattern, source); - } - - @Override - public Date parse(final CharSequence source) throws DateException { - final Matcher matcher = this.pattern.matcher(source); - if (!matcher.matches()) { - throw new DateException("Invalid date string: [{}], not match the date regex: [{}].", source, this.pattern.pattern()); - } - return parse(matcher); - } - } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexListDateParser.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexListDateParser.java deleted file mode 100644 index cad0452c5c..0000000000 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexListDateParser.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - ~ ~ - ~ The MIT License (MIT) ~ - ~ ~ - ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ - ~ ~ - ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ - ~ of this software and associated documentation files (the "Software"), to deal ~ - ~ in the Software without restriction, including without limitation the rights ~ - ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ - ~ copies of the Software, and to permit persons to whom the Software is ~ - ~ furnished to do so, subject to the following conditions: ~ - ~ ~ - ~ The above copyright notice and this permission notice shall be included in ~ - ~ all copies or substantial portions of the Software. ~ - ~ ~ - ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ - ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ - ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ - ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ - ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ - ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ - ~ THE SOFTWARE. ~ - ~ ~ - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - */ -package org.miaixz.bus.core.center.date.format.parser; - -import org.miaixz.bus.core.lang.exception.DateException; -import org.miaixz.bus.core.xyz.ListKit; - -import java.io.Serializable; -import java.util.Date; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * 使用正则列表方式的日期解析器 - * 通过定义若干的日期正则,遍历匹配到给定正则后,按照正则方式解析为日期 - * - * @author Kimi Liu - * @since Java 17+ - */ -public class RegexListDateParser implements DateParser, Serializable { - - private static final long serialVersionUID = -1L; - private final List list; - - /** - * 构造 - * - * @param list 正则列表 - */ - public RegexListDateParser(final List list) { - this.list = list; - } - - /** - * 根据给定的正则列表创建 - * - * @param args 正则列表 - * @return this - */ - public static RegexListDateParser of(final Pattern... args) { - return new RegexListDateParser(ListKit.of(args)); - } - - /** - * 新增自定义日期正则 - * - * @param regex 日期正则 - * @return this - */ - public RegexListDateParser addRegex(final String regex) { - // 日期正则忽略大小写 - return addPattern(Pattern.compile(regex, Pattern.CASE_INSENSITIVE)); - } - - /** - * 新增自定义日期正则 - * - * @param pattern 日期正则 - * @return this - */ - public RegexListDateParser addPattern(final Pattern pattern) { - this.list.add(pattern); - return this; - } - - @Override - public Date parse(final CharSequence source) throws DateException { - Matcher matcher; - for (final Pattern pattern : this.list) { - matcher = pattern.matcher(source); - if (matcher.matches()) { - return RegexDateParser.parse(matcher); - } - } - throw new DateException("No valid pattern for date string: [{}]", source); - } - -} diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ThreadKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ThreadKit.java index 6c18b78524..b64a3743f5 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ThreadKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ThreadKit.java @@ -50,7 +50,7 @@ public class ThreadKit { * 4. 任务直接提交给线程而不保持它们 * * - * @return ExecutorService + * @return {@link ExecutorService} */ public static ExecutorService newExecutor() { return ExecutorBuilder.of().useSynchronousQueue().build(); @@ -65,7 +65,7 @@ public static ExecutorService newExecutor() { * 4. 同时只允许一个线程工作,剩余放入队列等待,等待数超过1024报错 * * - * @return ExecutorService + * @return {@link ExecutorService} */ public static ExecutorService newSingleExecutor() { return ExecutorBuilder.of() @@ -84,9 +84,9 @@ public static ExecutorService newSingleExecutor() { * * * @param poolSize 同时执行的线程数大小 - * @return ExecutorService + * @return {@link ThreadPoolExecutor} */ - public static ExecutorService newExecutor(final int poolSize) { + public static ThreadPoolExecutor newExecutor(final int poolSize) { return newExecutor(poolSize, poolSize); } @@ -156,7 +156,7 @@ public static ThreadPoolExecutor newExecutorByBlockingCoefficient(final float bl * @param nThreads 线程池大小 * @param threadNamePrefix 线程名称前缀 * @param isBlocked 是否使用{@link BlockPolicy}策略 - * @return ExecutorService + * @return {@link ExecutorService} */ public static ExecutorService newFixedExecutor(final int nThreads, final String threadNamePrefix, final boolean isBlocked) { return newFixedExecutor(nThreads, 1024, threadNamePrefix, isBlocked); @@ -174,7 +174,7 @@ public static ExecutorService newFixedExecutor(final int nThreads, final String * @param maximumQueueSize 队列大小 * @param threadNamePrefix 线程名称前缀 * @param isBlocked 是否使用{@link BlockPolicy}策略 - * @return ExecutorService + * @return {@link ExecutorService} */ public static ExecutorService newFixedExecutor(final int nThreads, final int maximumQueueSize, final String threadNamePrefix, final boolean isBlocked) { return newFixedExecutor(nThreads, maximumQueueSize, threadNamePrefix, @@ -192,7 +192,7 @@ public static ExecutorService newFixedExecutor(final int nThreads, final int max * @param maximumQueueSize 队列大小 * @param threadNamePrefix 线程名称前缀 * @param handler 拒绝策略 - * @return ExecutorService + * @return {@link ExecutorService} */ public static ExecutorService newFixedExecutor(final int nThreads, final int maximumQueueSize, @@ -236,7 +236,7 @@ public static Runnable execAsync(final Runnable runnable, final boolean isDaemon * * @param 回调对象类型 * @param task {@link Callable} - * @return Future + * @return {@link Future} */ public static Future execAsync(final Callable task) { return GlobalThreadPool.submit(task); @@ -258,7 +258,7 @@ public static Future execAsync(final Runnable runnable) { * 若未完成,则会阻塞 * * @param 回调对象类型 - * @return CompletionService + * @return {@link CompletionService} */ public static CompletionService newCompletionService() { return new ExecutorCompletionService<>(GlobalThreadPool.getExecutor()); @@ -270,7 +270,7 @@ public static CompletionService newCompletionService() { * * @param 回调对象类型 * @param executor 执行器 {@link ExecutorService} - * @return CompletionService + * @return {@link CompletionService} */ public static CompletionService newCompletionService(final ExecutorService executor) { return new ExecutorCompletionService<>(executor); @@ -302,7 +302,7 @@ public static CompletionService newCompletionService(final ExecutorServic * 该示例,也可以用:{@link Phaser} 移相器 进行实现 * * @param taskCount 任务数量 - * @return CountDownLatch + * @return {@link CountDownLatch} */ public static CountDownLatch newCountDownLatch(final int taskCount) { return new CountDownLatch(taskCount); @@ -338,11 +338,10 @@ public static CountDownLatch newCountDownLatch(final int taskCount) { * }, "线程 - " + x).start(); * } * } - *

* 该示例,也可以用:{@link Phaser} 移相器 进行实现 * * @param taskCount 任务数量 - * @return 循环栅栏 + * @return {@link CyclicBarrier} */ public static CyclicBarrier newCyclicBarrier(final int taskCount) { return new CyclicBarrier(taskCount); @@ -350,10 +349,6 @@ public static CyclicBarrier newCyclicBarrier(final int taskCount) { /** * 新建一个Phaser,一个同步辅助类,jdk1.7提供,可以完全替代CountDownLatch; - * - * @param taskCount 任务数量 - * @return Phaser - *

* Pharser: 移相器、相位器,可重用同步屏障; * 功能可以替换:{@link CyclicBarrier}(固定线程)循环栅栏、{@link CountDownLatch}(固定计数)倒数计数、加上分层功能 * 示例1:等6个同学都离开教室,班长才能锁门。 @@ -377,10 +372,12 @@ public static CyclicBarrier newCyclicBarrier(final int taskCount) { * System.out.println("【主线程】所有同学都离开了教室,开始锁教室大门了。"); * } * - *

* 示例2:7个同学,集齐7个龙珠,7个同学一起召唤神龙; * 只需要:phaser.arrive(); --> phaser.arriveAndAwaitAdvance() //等待其他的线程就位 * 该示例,也可以用:{@link CyclicBarrier} 进行实现 + * + * @param taskCount 任务数量 + * @return {@link Phaser} */ public static Phaser newPhaser(final int taskCount) { return new Phaser(taskCount); @@ -622,7 +619,6 @@ public static Thread[] getThreads() { /** * 获取JVM中与当前线程同组的所有线程 * 使用数组二次拷贝方式,防止在线程列表获取过程中线程终止 - * from Voovan * * @param group 线程组 * @return 线程对象数组 @@ -637,7 +633,6 @@ public static Thread[] getThreads(final ThreadGroup group) { /** * 获取进程的主线程 - * from Voovan * * @return 进程的主线程 */ diff --git a/bus-office/src/main/java/org/miaixz/bus/office/excel/ExcelWriter.java b/bus-office/src/main/java/org/miaixz/bus/office/excel/ExcelWriter.java index 61dcecaddf..c25d8b8582 100644 --- a/bus-office/src/main/java/org/miaixz/bus/office/excel/ExcelWriter.java +++ b/bus-office/src/main/java/org/miaixz/bus/office/excel/ExcelWriter.java @@ -95,12 +95,12 @@ public class ExcelWriter extends ExcelBase { private CellEditor cellEditor; /** - * 构造,默认生成xls格式的Excel文件 + * 构造,默认生成xlsx格式的Excel文件 * 此构造不传入写出的Excel文件路径,只能调用{@link #flush(OutputStream)}方法写出到流 * 若写出到文件,还需调用{@link #setDestFile(File)}方法自定义写出的文件,然后调用{@link #flush()}方法写出到文件 */ public ExcelWriter() { - this(false); + this(true); } /** From df609fc95632c7c905b61d0c13263319ca17ab33 Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Tue, 2 Jul 2024 11:48:00 +0800 Subject: [PATCH 06/16] =?UTF-8?q?add=20=E6=96=B0=E5=A2=9E=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=86=9C=E5=8E=86=E6=97=A5=E5=BD=93=E5=A4=A9=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E8=BE=B0=E5=88=97=E8=A1=A8=E3=80=81=E6=97=B6=E8=BE=B0?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=BB=84=E9=81=93=E9=BB=91=E9=81=93=E5=8D=81?= =?UTF-8?q?=E4=BA=8C=E7=A5=9E=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../center/date/culture/cn/JulianDay.java | 10 +++++ .../center/date/culture/lunar/LunarDay.java | 18 ++++++++ .../center/date/culture/lunar/LunarHour.java | 10 +++++ .../center/date/culture/solar/SolarDay.java | 16 ++++--- .../center/date/culture/solar/SolarTime.java | 11 ++++- .../center/date/printer/FastDatePrinter.java | 42 ++++--------------- .../org/miaixz/bus/core/xyz/ThreadKit.java | 8 ++-- .../org/miaixz/bus/office/csv/CsvParser.java | 3 +- 8 files changed, 71 insertions(+), 47 deletions(-) diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/cn/JulianDay.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/cn/JulianDay.java index c400613943..ba79c5722b 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/cn/JulianDay.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/cn/JulianDay.java @@ -197,4 +197,14 @@ public Week getWeek() { return Week.fromIndex((int) (day + 0.5) + 7000001); } + /** + * 儒略日相减 + * + * @param target 儒略日 + * @return 差 + */ + public double subtract(JulianDay target) { + return day - target.getDay(); + } + } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/lunar/LunarDay.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/lunar/LunarDay.java index efad450622..8c0dd328fa 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/lunar/LunarDay.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/lunar/LunarDay.java @@ -43,6 +43,9 @@ import org.miaixz.bus.core.center.date.culture.solar.SolarDay; import org.miaixz.bus.core.center.date.culture.solar.SolarTerms; +import java.util.ArrayList; +import java.util.List; + /** * 农历日 * @@ -360,6 +363,21 @@ public LunarFestival getFestival() { return LunarFestival.fromYmd(month.getYear().getYear(), month.getMonthWithLeap(), day); } + /** + * 当天的时辰列表 + * + * @return 时辰列表 + */ + public List getHours() { + List l = new ArrayList<>(); + int y = month.getYear().getYear(); + int m = month.getMonth(); + l.add(LunarHour.fromYmdHms(y, m, day, 0, 0, 0)); + for (int i = 0; i < 24; i += 2) { + l.add(LunarHour.fromYmdHms(y, m, day, i + 1, 0, 0)); + } + return l; + } @Override public boolean equals(Object o) { diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/lunar/LunarHour.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/lunar/LunarHour.java index db4564f293..dc008e242d 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/lunar/LunarHour.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/lunar/LunarHour.java @@ -33,6 +33,7 @@ import org.miaixz.bus.core.center.date.culture.cn.sixty.HeavenStem; import org.miaixz.bus.core.center.date.culture.cn.sixty.SixtyCycle; import org.miaixz.bus.core.center.date.culture.cn.star.nine.NineStar; +import org.miaixz.bus.core.center.date.culture.cn.star.twelve.TwelveStar; import org.miaixz.bus.core.center.date.culture.solar.SolarDay; import org.miaixz.bus.core.center.date.culture.solar.SolarMonth; import org.miaixz.bus.core.center.date.culture.solar.SolarTerms; @@ -268,6 +269,15 @@ public SixtyCycle getSixtyCycle() { return SixtyCycle.fromName(HeavenStem.fromIndex(heavenStemIndex).getName() + EarthBranch.fromIndex(earthBranchIndex).getName()); } + /** + * 黄道黑道十二神 + * + * @return 黄道黑道十二神 + */ + public TwelveStar getTwelveStar() { + return TwelveStar.fromIndex(getSixtyCycle().getEarthBranch().getIndex() + (8 - getDaySixtyCycle().getEarthBranch().getIndex() % 6) * 2); + } + /** * 九星(时家紫白星歌诀:三元时白最为佳,冬至阳生顺莫差,孟日七宫仲一白,季日四绿发萌芽,每把时辰起甲子,本时星耀照光华,时星移入中宫去,顺飞八方逐细查。夏至阴生逆回首,孟归三碧季加六,仲在九宫时起甲,依然掌中逆轮跨。) * diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/solar/SolarDay.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/solar/SolarDay.java index 9d846eff5f..28b62ee4c0 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/solar/SolarDay.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/solar/SolarDay.java @@ -215,7 +215,13 @@ public SolarTerms getTerm() { * @return 节气第几天 */ public SolarTermDay getTermDay() { - SolarTerms term = SolarTerms.fromIndex(month.getYear().getYear() + 1, 0); + int y = month.getYear().getYear(); + int i = month.getMonth() * 2; + if (i == 24) { + y += 1; + i = 0; + } + SolarTerms term = SolarTerms.fromIndex(y, i); SolarDay day = term.getJulianDay().getSolarDay(); while (isBefore(day)) { term = term.next(-1); @@ -363,7 +369,7 @@ public int getIndexInYear() { * @return 天数 */ public int subtract(SolarDay target) { - return (int) (getJulianDay().getDay() - target.getJulianDay().getDay()); + return (int) (getJulianDay().subtract(target.getJulianDay())); } /** @@ -381,10 +387,10 @@ public JulianDay getJulianDay() { * @return 农历日 */ public LunarDay getLunarDay() { - LunarMonth m = LunarMonth.fromYm(month.getYear().getYear(), month.getMonth()).next(-3); + LunarMonth m = LunarMonth.fromYm(month.getYear().getYear(), month.getMonth()); int days = subtract(m.getFirstJulianDay().getSolarDay()); - while (days >= m.getDayCount()) { - m = m.next(1); + while (days < 0) { + m = m.next(-1); days = subtract(m.getFirstJulianDay().getSolarDay()); } return LunarDay.fromYmd(m.getYear().getYear(), m.getMonthWithLeap(), days + 1); diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/solar/SolarTime.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/solar/SolarTime.java index 4b63fc865d..ea3a3cd981 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/solar/SolarTime.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/solar/SolarTime.java @@ -174,7 +174,14 @@ public boolean isAfter(SolarTime target) { * @return 节气 */ public SolarTerms getTerm() { - SolarTerms term = SolarTerms.fromIndex(day.getMonth().getYear().getYear() + 1, 0); + SolarMonth m = day.getMonth(); + int y = m.getYear().getYear(); + int i = m.getMonth() * 2; + if (i == 24) { + y += 1; + i = 0; + } + SolarTerms term = SolarTerms.fromIndex(y, i); while (isBefore(term.getJulianDay().getSolarTime())) { term = term.next(-1); } @@ -242,7 +249,7 @@ public SolarTime next(int n) { } SolarDay d = day.next(td); - SolarMonth m = day.getMonth(); + SolarMonth m = d.getMonth(); return SolarTime.fromYmdHms(m.getYear().getYear(), m.getMonth(), d.getDay(), th, tm, ts); } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/printer/FastDatePrinter.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/printer/FastDatePrinter.java index fd995b6494..61f15a210d 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/printer/FastDatePrinter.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/printer/FastDatePrinter.java @@ -49,7 +49,8 @@ public class FastDatePrinter extends SimpleDatePrinter implements FormatPrinter { private static final long serialVersionUID = -1L; - private static final int MAX_DIGITS = 10; // log10(Integer.MAX_VALUE) ~= 9.3 + + private static final int MAX_DIGITS = 10; private static final ConcurrentMap C_TIME_ZONE_DISPLAY_CACHE = new SafeConcurrentHashMap<>(7); /** @@ -455,7 +456,6 @@ public B format(final long millis, final B buf) { return applyRules(c, buf); } - // Serializing @Override public B format(final Date date, final B buf) { final Calendar c = Calendar.getInstance(timeZone, locale); @@ -548,9 +548,7 @@ public interface Rule { } /** - *

* Inner class defining a numeric rule. - *

*/ public interface NumberRule extends Rule { /** @@ -564,9 +562,7 @@ public interface NumberRule extends Rule { } /** - *

* Inner class to output a constant single character. - *

*/ private static class CharacterLiteral implements Rule { private final char mValue; @@ -592,9 +588,7 @@ public void appendTo(final Appendable buffer, final Calendar calendar) throws IO } /** - *

* Inner class to output a constant string. - *

*/ private static class StringLiteral implements Rule { private final String mValue; @@ -620,9 +614,7 @@ public void appendTo(final Appendable buffer, final Calendar calendar) throws IO } /** - *

* Inner class to output one of a set of values. - *

*/ private static class TextField implements Rule { private final int mField; @@ -658,9 +650,7 @@ public void appendTo(final Appendable buffer, final Calendar calendar) throws IO } /** - *

* Inner class to output an unpadded number. - *

*/ private static class UnpaddedNumberField implements NumberRule { private final int mField; @@ -697,9 +687,7 @@ public final void appendTo(final Appendable buffer, final int value) throws IOEx } /** - *

* Inner class to output an unpadded month. - *

*/ private static class UnpaddedMonthField implements NumberRule { static final UnpaddedMonthField INSTANCE = new UnpaddedMonthField(); @@ -731,9 +719,7 @@ public final void appendTo(final Appendable buffer, final int value) throws IOEx } /** - *

* Inner class to output a padded number. - *

*/ private static class PaddedNumberField implements NumberRule { private final int mField; @@ -771,9 +757,7 @@ public final void appendTo(final Appendable buffer, final int value) throws IOEx } /** - *

* Inner class to output a two digit number. - *

*/ private static class TwoDigitNumberField implements NumberRule { private final int mField; @@ -808,9 +792,7 @@ public final void appendTo(final Appendable buffer, final int value) throws IOEx } /** - *

* Inner class to output a two digit year. - *

*/ private static class TwoDigitYearField implements NumberRule { static final TwoDigitYearField INSTANCE = new TwoDigitYearField(); @@ -838,9 +820,7 @@ public final void appendTo(final Appendable buffer, final int value) throws IOEx } /** - *

* Inner class to output a two digit month. - *

*/ private static class TwoDigitMonthField implements NumberRule { static final TwoDigitMonthField INSTANCE = new TwoDigitMonthField(); @@ -868,9 +848,7 @@ public final void appendTo(final Appendable buffer, final int value) throws IOEx } /** - *

* Inner class to output the twelve hour field. - *

*/ private static class TwelveHourField implements NumberRule { private final NumberRule mRule; @@ -905,9 +883,7 @@ public void appendTo(final Appendable buffer, final int value) throws IOExceptio } /** - *

* Inner class to output the twenty four hour field. - *

*/ private static class TwentyFourHourField implements NumberRule { private final NumberRule mRule; @@ -969,9 +945,7 @@ public void appendTo(final Appendable buffer, final int value) throws IOExceptio } /** - *

* Inner class to output the numeric day in week. - *

*/ private static class WeekYear implements NumberRule { private final NumberRule mRule; @@ -987,7 +961,11 @@ public int estimateLength() { @Override public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException { - mRule.appendTo(buffer, calendar.getWeekYear()); + int weekYear = calendar.getWeekYear(); + if (mRule instanceof TwoDigitYearField) { + weekYear %= 100; + } + mRule.appendTo(buffer, weekYear); } @Override @@ -997,9 +975,7 @@ public void appendTo(final Appendable buffer, final int value) throws IOExceptio } /** - *

* Inner class to output a time zone name. - *

*/ private static class TimeZoneNameRule implements Rule { private final Locale mLocale; @@ -1042,9 +1018,7 @@ public void appendTo(final Appendable buffer, final Calendar calendar) throws IO } /** - *

* Inner class to output a time zone as a number {@code +/-HHMM} or {@code +/-HH:MM}. - *

*/ private static class TimeZoneNumberRule implements Rule { static final TimeZoneNumberRule INSTANCE_COLON = new TimeZoneNumberRule(true); @@ -1091,9 +1065,7 @@ public void appendTo(final Appendable buffer, final Calendar calendar) throws IO } /** - *

* Inner class to output a time zone as a number {@code +/-HHMM} or {@code +/-HH:MM}. - *

*/ private static class Iso8601_Rule implements Rule { diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ThreadKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ThreadKit.java index b64a3743f5..7e2f9830af 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ThreadKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ThreadKit.java @@ -174,9 +174,9 @@ public static ExecutorService newFixedExecutor(final int nThreads, final String * @param maximumQueueSize 队列大小 * @param threadNamePrefix 线程名称前缀 * @param isBlocked 是否使用{@link BlockPolicy}策略 - * @return {@link ExecutorService} + * @return {@link ThreadPoolExecutor} */ - public static ExecutorService newFixedExecutor(final int nThreads, final int maximumQueueSize, final String threadNamePrefix, final boolean isBlocked) { + public static ThreadPoolExecutor newFixedExecutor(final int nThreads, final int maximumQueueSize, final String threadNamePrefix, final boolean isBlocked) { return newFixedExecutor(nThreads, maximumQueueSize, threadNamePrefix, (isBlocked ? RejectPolicy.BLOCK : RejectPolicy.ABORT).getValue()); } @@ -192,9 +192,9 @@ public static ExecutorService newFixedExecutor(final int nThreads, final int max * @param maximumQueueSize 队列大小 * @param threadNamePrefix 线程名称前缀 * @param handler 拒绝策略 - * @return {@link ExecutorService} + * @return {@link ThreadPoolExecutor} */ - public static ExecutorService newFixedExecutor(final int nThreads, + public static ThreadPoolExecutor newFixedExecutor(final int nThreads, final int maximumQueueSize, final String threadNamePrefix, final RejectedExecutionHandler handler) { diff --git a/bus-office/src/main/java/org/miaixz/bus/office/csv/CsvParser.java b/bus-office/src/main/java/org/miaixz/bus/office/csv/CsvParser.java index bcd4f9f53a..e692e06abe 100644 --- a/bus-office/src/main/java/org/miaixz/bus/office/csv/CsvParser.java +++ b/bus-office/src/main/java/org/miaixz/bus/office/csv/CsvParser.java @@ -276,7 +276,8 @@ private List readLine() throws InternalException { if (preChar < 0 || preChar == Symbol.C_CR || preChar == Symbol.C_LF) { // 判断行首字符为指定注释字符的注释开始,直到遇到换行符 // 行首分两种,1是preChar < 0表示文本开始,2是换行符后紧跟就是下一行的开始 - if (null != this.config.commentCharacter && c == this.config.commentCharacter) { + // 如果注释符出现在包装符内,被认为是普通字符 + if(!inQuotes && null != this.config.commentCharacter && c == this.config.commentCharacter){ inComment = true; } } From b817ac1292f3b318e8ac21cce48597a04ea416c0 Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Mon, 8 Jul 2024 16:57:30 +0800 Subject: [PATCH 07/16] =?UTF-8?q?fix=20BeanKit.copyProperties=E4=B8=ADmapT?= =?UTF-8?q?oMap=E6=97=B6key=E8=A2=AB=E8=BD=AC=E4=B8=BAString=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bus-base/pom.xml | 6 +- bus-cache/pom.xml | 2 +- bus-core/pom.xml | 6 +- .../core/beans/copier/BeanToBeanCopier.java | 5 +- .../core/beans/copier/BeanToMapCopier.java | 5 +- .../bus/core/beans/copier/CopyOptions.java | 19 +- .../core/beans/copier/MapToBeanCopier.java | 6 +- .../bus/core/beans/copier/MapToMapCopier.java | 2 +- .../copier/ValueProviderToBeanCopier.java | 5 +- .../bus/core/center/array/ArrayWrapper.java | 2 +- .../miaixz/bus/core/center/date/Between.java | 11 +- .../bus/core/center/date/Converter.java | 9 +- .../miaixz/bus/core/center/date/DateTime.java | 33 +- .../miaixz/bus/core/center/date/Modifier.java | 3 +- .../miaixz/bus/core/center/date/Resolver.java | 33 + .../core/center/date/builder/DateBuilder.java | 222 +++--- .../center/date/culture/en/Constellation.java | 9 +- .../core/center/date/culture/en/Month.java | 28 +- .../date/format/parser/FastDateParser.java | 5 - .../format/parser/GlobalRegexDateParser.java | 116 ---- .../date/format/parser/ISO8601DateParser.java | 158 ----- .../date/format/parser/NormalDateParser.java | 168 +++-- .../date/format/parser/RFC2822DateParser.java | 99 --- .../date/format/parser/RegexDateParser.java | 205 +++++- .../format/parser/RegisterDateParser.java | 16 +- .../bus/core/convert/ArrayConverter.java | 80 ++- .../bus/core/convert/CalendarConverter.java | 11 +- .../miaixz/bus/core/convert/Converter.java | 9 + .../bus/core/convert/DateConverter.java | 23 +- .../convert/TemporalAccessorConverter.java | 14 +- .../miaixz/bus/core/net/url/UrlBuilder.java | 36 +- .../miaixz/bus/core/net/url/UrlDecoder.java | 4 +- .../org/miaixz/bus/core/net/url/UrlPath.java | 28 +- .../org/miaixz/bus/core/net/url/UrlQuery.java | 103 +-- .../miaixz/bus/core/text/dfa/WordTree.java | 16 +- .../org/miaixz/bus/core/xyz/ArrayKit.java | 110 ++- .../java/org/miaixz/bus/core/xyz/BeanKit.java | 15 +- .../java/org/miaixz/bus/core/xyz/DateKit.java | 66 +- .../org/miaixz/bus/core/xyz/FieldKit.java | 2 +- .../java/org/miaixz/bus/core/xyz/FileKit.java | 31 + .../org/miaixz/bus/core/xyz/IteratorKit.java | 2 +- .../java/org/miaixz/bus/core/xyz/ZoneKit.java | 26 + bus-crypto/pom.xml | 2 +- bus-extra/pom.xml | 6 +- .../org/miaixz/bus/extra/ftp/CommonsFtp.java | 2 +- .../org/miaixz/bus/extra/ftp/FtpConfig.java | 2 + ...nternalMailUtil.java => InternalMail.java} | 6 +- .../java/org/miaixz/bus/extra/mail/Mail.java | 12 +- .../miaixz/bus/extra/mail/MailAccount.java | 2 +- bus-gitlab/pom.xml | 4 +- bus-goalie/pom.xml | 2 +- bus-http/README.md | 4 +- bus-http/pom.xml | 13 +- .../main/java/org/miaixz/bus/http/SoapX.java | 118 ++++ .../miaixz/bus/http/accord/package-info.java | 21 +- .../http/accord/platform/package-info.java | 40 +- .../miaixz/bus/http/bodys/package-info.java | 54 +- .../miaixz/bus/http/cache/package-info.java | 72 +- .../bus/http/metric/anget/package-info.java | 35 + .../bus/http/metric/http/package-info.java | 35 + .../miaixz/bus/http/metric/package-info.java | 35 + .../bus/http/metric/proxy/package-info.java | 35 + .../bus/http/metric/suffix/package-info.java | 35 + .../bus/http/plugin/httpv/package-info.java | 35 + .../bus/http/plugin/httpx/package-info.java | 35 + .../bus/http/plugin/httpz/package-info.java | 35 + .../miaixz/bus/http/plugin/package-info.java | 35 + .../bus/http/plugin/soap/SoapBuilder.java | 642 ++++++++++++++++++ .../bus/http/plugin/soap/package-info.java | 35 + .../miaixz/bus/http/secure/package-info.java | 35 + .../miaixz/bus/http/socket/package-info.java | 35 + bus-image/pom.xml | 2 +- bus-limiter/pom.xml | 2 +- bus-mapper/pom.xml | 6 +- bus-notify/pom.xml | 6 +- .../java/org/miaixz/bus/notify/Builder.java | 3 - .../notify/metric/ctyun/CtyunSmsProvider.java | 3 +- .../notify/metric/emay/EmaySmsProvider.java | 2 +- .../notify/metric/unisms/UniSmsProvider.java | 3 +- .../metric/zhutong/ZhutongSmsProvider.java | 5 +- bus-oauth/pom.xml | 2 +- .../bus/oauth/metric/eleme/ElemeProvider.java | 9 +- .../oauth/metric/feishu/FeishuProvider.java | 7 +- .../bus/oauth/metric/line/LineProvider.java | 4 +- .../metric/linkedin/LinkedinProvider.java | 3 +- .../bus/oauth/metric/okta/OktaProvider.java | 6 +- .../bus/oauth/metric/slack/SlackProvider.java | 8 +- .../stackoverflow/StackOverflowProvider.java | 3 +- .../oauth/metric/twitter/TwitterProvider.java | 3 +- bus-parent/pom.xml | 14 +- bus-pay/pom.xml | 6 +- .../bus/pay/metric/paypal/PaypalProvider.java | 5 +- .../pay/metric/wechat/WechatPayBuilder.java | 5 +- bus-sensitive/pom.xml | 2 +- bus-shade/pom.xml | 2 +- .../java/org/miaixz/bus/socket/Context.java | 15 - .../java/org/miaixz/bus/socket/Status.java | 6 +- .../java/org/miaixz/bus/socket/Worker.java | 34 +- .../miaixz/bus/socket/accord/AioClient.java | 57 +- .../miaixz/bus/socket/accord/AioServer.java | 112 ++- .../miaixz/bus/socket/accord/TcpSession.java | 19 +- .../bus/socket/accord/UdpBootstrap.java | 53 +- .../miaixz/bus/socket/accord/UdpChannel.java | 17 +- .../miaixz/bus/socket/accord/UdpSession.java | 4 +- .../bus/socket/buffer/BufferPagePool.java | 3 + .../miaixz/bus/socket/buffer/WriteBuffer.java | 44 ++ .../channels/AsynchronousChannelGroup.java | 2 +- .../plugin/BufferPageMonitorPlugin.java | 35 +- .../miaixz/bus/socket/plugin/SslPlugin.java | 9 +- bus-spring/pom.xml | 2 +- bus-starter/pom.xml | 10 +- bus-storage/pom.xml | 2 +- bus-tracer/pom.xml | 2 +- bus-validate/pom.xml | 2 +- 114 files changed, 2317 insertions(+), 1393 deletions(-) delete mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/GlobalRegexDateParser.java delete mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/ISO8601DateParser.java delete mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RFC2822DateParser.java rename bus-extra/src/main/java/org/miaixz/bus/extra/mail/{InternalMailUtil.java => InternalMail.java} (97%) create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/SoapX.java rename bus-socket/src/main/java/org/miaixz/bus/socket/buffer/BufferFactory.java => bus-http/src/main/java/org/miaixz/bus/http/accord/package-info.java (82%) rename bus-socket/src/main/java/org/miaixz/bus/socket/GroupIo.java => bus-http/src/main/java/org/miaixz/bus/http/accord/platform/package-info.java (72%) rename bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/PureDateParser.java => bus-http/src/main/java/org/miaixz/bus/http/bodys/package-info.java (54%) rename bus-socket/src/main/java/org/miaixz/bus/socket/metric/handler/GroupMessageHandler.java => bus-http/src/main/java/org/miaixz/bus/http/cache/package-info.java (51%) create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/metric/anget/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/metric/http/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/metric/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/metric/proxy/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/metric/suffix/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/plugin/httpv/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/plugin/httpx/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/plugin/httpz/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/plugin/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/plugin/soap/SoapBuilder.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/plugin/soap/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/secure/package-info.java create mode 100644 bus-http/src/main/java/org/miaixz/bus/http/socket/package-info.java diff --git a/bus-base/pom.xml b/bus-base/pom.xml index f4a425a910..356ecd1855 100755 --- a/bus-base/pom.xml +++ b/bus-base/pom.xml @@ -71,9 +71,9 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 3.3.1 - 3.2.0 + 3.2.0 @@ -101,7 +101,7 @@ jakarta.persistence jakarta.persistence-api - ${persistence.version} + ${jakarta.persistence.version} true diff --git a/bus-cache/pom.xml b/bus-cache/pom.xml index e2aa89f83f..02b62a6e4f 100755 --- a/bus-cache/pom.xml +++ b/bus-cache/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 3.3.1 7.0.0 5.1.3 diff --git a/bus-core/pom.xml b/bus-core/pom.xml index 1f53b071a0..121fae9004 100755 --- a/bus-core/pom.xml +++ b/bus-core/pom.xml @@ -71,8 +71,8 @@ UTF-8 21 21 - 1.18.32 - 3.2.0 + 1.18.34 + 3.2.0 @@ -85,7 +85,7 @@ jakarta.persistence jakarta.persistence-api - ${persistence.version} + ${jakarta.persistence.version} true diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToBeanCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToBeanCopier.java index 7b500da04f..aecc8ccaf8 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToBeanCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToBeanCopier.java @@ -31,6 +31,7 @@ import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.mutable.MutableEntry; import org.miaixz.bus.core.xyz.BeanKit; +import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.core.xyz.TypeKit; import java.lang.reflect.Type; @@ -89,11 +90,11 @@ public T copy() { } // 编辑键值对 - final MutableEntry entry = copyOptions.editField(sFieldName, sValue); + final MutableEntry entry = copyOptions.editField(sFieldName, sValue); if (null == entry) { return; } - sFieldName = entry.getKey(); + sFieldName = StringKit.toStringOrNull(entry.getKey()); // 对key做转换,转换后为null的跳过 if (null == sFieldName) { return; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToMapCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToMapCopier.java index ee82e20ca6..9862222f5e 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToMapCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToMapCopier.java @@ -31,6 +31,7 @@ import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.mutable.MutableEntry; import org.miaixz.bus.core.xyz.BeanKit; +import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.core.xyz.TypeKit; import java.lang.reflect.Type; @@ -86,11 +87,11 @@ public Map copy() { } // 编辑键值对 - final MutableEntry entry = copyOptions.editField(sFieldName, sValue); + final MutableEntry entry = copyOptions.editField(sFieldName, sValue); if (null == entry) { return; } - sFieldName = entry.getKey(); + sFieldName = StringKit.toStringOrNull(entry.getKey()); // 对key做转换,转换后为null的跳过 if (null == sFieldName) { return; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/CopyOptions.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/CopyOptions.java index 81638945c1..1f0f3fd9d3 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/CopyOptions.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/CopyOptions.java @@ -78,7 +78,7 @@ public class CopyOptions implements Serializable { /** * 字段属性名和属性值编辑器,用于自定义属性转换规则(例如驼峰转下划线等),自定义属性值转换规则(例如null转""等) */ - protected UnaryOperator> fieldEditor; + protected UnaryOperator> fieldEditor; /** * 是否支持transient关键字修饰和@Transient注解,如果支持,被修饰的字段或方法对应的字段将被忽略。 */ @@ -269,10 +269,11 @@ public CopyOptions ignoreCase() { * @param fieldMapping 拷贝属性的字段映射,用于不同的属性之前拷贝做对应表用 * @return CopyOptions */ - public CopyOptions setFieldMapping(final Map fieldMapping) { + public CopyOptions setFieldMapping(final Map fieldMapping) { return setFieldEditor(entry -> { - final String key = entry.getKey(); - entry.setKey(fieldMapping.getOrDefault(key, key)); + final Object key = entry.getKey(); + final Object keyMapped = fieldMapping.get(key); + entry.setKey(null == keyMapped ? key : keyMapped); return entry; }); } @@ -286,7 +287,7 @@ public CopyOptions setFieldMapping(final Map fieldMapping) { * @param editor 字段属性编辑器,用于自定义属性转换规则,例如驼峰转下划线等 * @return CopyOptions */ - public CopyOptions setFieldEditor(final UnaryOperator> editor) { + public CopyOptions setFieldEditor(final UnaryOperator> editor) { this.fieldEditor = editor; return this; } @@ -294,12 +295,12 @@ public CopyOptions setFieldEditor(final UnaryOperator editField(final String fieldName, final Object fieldValue) { - final MutableEntry entry = new MutableEntry<>(fieldName, fieldValue); + protected MutableEntry editField(final Object key, final Object value) { + final MutableEntry entry = new MutableEntry<>(key, value); return (null != this.fieldEditor) ? this.fieldEditor.apply(entry) : entry; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToBeanCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToBeanCopier.java index 20ea251873..3cf4b1cc8e 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToBeanCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToBeanCopier.java @@ -90,11 +90,11 @@ public T copy() { } // 编辑键值对 - final MutableEntry entry = copyOptions.editField(sKey.toString(), sValue); + final MutableEntry entry = copyOptions.editField(sKey.toString(), sValue); if (null == entry) { return; } - final String sFieldName = entry.getKey(); + final Object sFieldName = entry.getKey(); // 对key做转换,转换后为null的跳过 if (null == sFieldName) { return; @@ -102,7 +102,7 @@ public T copy() { // 检查目标字段可写性 // 目标字段检查放在键值对编辑之后,因为键可能被编辑修改 - final PropDesc tDesc = this.copyOptions.findPropDesc(targetPropDescMap, sFieldName); + final PropDesc tDesc = this.copyOptions.findPropDesc(targetPropDescMap, sFieldName.toString()); if (null == tDesc || !tDesc.isWritable(this.copyOptions.transientSupport)) { // 字段不可写,跳过之 return; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToMapCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToMapCopier.java index 251ede8e92..34894dc42e 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToMapCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToMapCopier.java @@ -67,7 +67,7 @@ public Map copy() { } // 编辑键值对 - final MutableEntry entry = copyOptions.editField(sKey.toString(), sValue); + final MutableEntry entry = copyOptions.editField(sKey.toString(), sValue); if (null == entry) { return; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/ValueProviderToBeanCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/ValueProviderToBeanCopier.java index d7fa0e55b5..aba4595904 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/ValueProviderToBeanCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/ValueProviderToBeanCopier.java @@ -31,6 +31,7 @@ import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.mutable.MutableEntry; import org.miaixz.bus.core.xyz.BeanKit; +import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.core.xyz.TypeKit; import java.lang.reflect.Type; @@ -88,11 +89,11 @@ public T copy() { // 获取目标字段真实类型 final Type fieldType = TypeKit.getActualType(this.targetType, tDesc.getFieldType()); // 编辑键值对 - final MutableEntry entry = copyOptions.editField(tFieldName, null); + final MutableEntry entry = copyOptions.editField(tFieldName, null); if (null == entry) { return; } - tFieldName = entry.getKey(); + tFieldName = StringKit.toStringOrNull(entry.getKey()); // 对key做转换,转换后为null的跳过 if (null == tFieldName) { return; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/array/ArrayWrapper.java b/bus-core/src/main/java/org/miaixz/bus/core/center/array/ArrayWrapper.java index d2882518b7..55cfbdb9af 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/array/ArrayWrapper.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/array/ArrayWrapper.java @@ -384,7 +384,7 @@ public ArrayWrapper appendArray(final A array) { * @return 新数组 */ public ArrayWrapper insert(final int index, final E element) { - return insertArray(index, ArrayKit.ofArray(element, this.componentType)); + return insertArray(index, ArrayKit.wrapSingle(element, this.componentType)); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/Between.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/Between.java index 74e633d536..fbb17e06d6 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/Between.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/Between.java @@ -30,7 +30,6 @@ import org.miaixz.bus.core.center.date.culture.en.Units; import org.miaixz.bus.core.center.date.format.FormatPeriod; import org.miaixz.bus.core.lang.Assert; -import org.miaixz.bus.core.xyz.DateKit; import java.io.Serializable; import java.time.Duration; @@ -201,8 +200,8 @@ public long between(final Units unit) { * @return 相差月数 */ public long betweenMonth(final boolean isReset) { - final java.util.Calendar beginCal = DateKit.calendar(begin); - final java.util.Calendar endCal = DateKit.calendar(end); + final java.util.Calendar beginCal = Calendar.calendar(begin); + final java.util.Calendar endCal = Calendar.calendar(end); final int betweenYear = endCal.get(java.util.Calendar.YEAR) - beginCal.get(java.util.Calendar.YEAR); final int betweenMonthOfYear = endCal.get(java.util.Calendar.MONTH) - beginCal.get(java.util.Calendar.MONTH); @@ -227,8 +226,8 @@ public long betweenMonth(final boolean isReset) { * @return 相差年数 */ public long betweenYear(final boolean isReset) { - final java.util.Calendar beginCal = DateKit.calendar(begin); - final java.util.Calendar endCal = DateKit.calendar(end); + final java.util.Calendar beginCal = Calendar.calendar(begin); + final java.util.Calendar endCal = Calendar.calendar(end); final int result = endCal.get(java.util.Calendar.YEAR) - beginCal.get(java.util.Calendar.YEAR); if (false == isReset) { @@ -282,7 +281,7 @@ public Date getEnd() { * @return 字符串 */ public String toString(final Units unit, final FormatPeriod.Level level) { - return DateKit.formatBetween(between(unit), level); + return FormatPeriod.of(between(unit), level).format(); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/Converter.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/Converter.java index 530c39908b..6b4a32a873 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/Converter.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/Converter.java @@ -213,6 +213,7 @@ public static TimeUnit toTimeUnit(final ChronoUnit unit) throws IllegalArgumentE /** * {@link Instant}转{@link LocalDateTime},使用UTC时区 + * 此方法自动将一个UTC时间转换为本地时间,如传入00:00,则结果为08:00 * * @param instant {@link Instant} * @return {@link LocalDateTime} @@ -223,9 +224,11 @@ public static LocalDateTime ofUTC(final Instant instant) { /** * {@link Instant}转{@link LocalDateTime} + * instant是一个无时区的时间戳,在转换为本地时间时,需指定这个时间戳所在时区 + * 如果所在时区与当前时区不同,会转换时间 * * @param instant {@link Instant} - * @param zoneId 时区 + * @param zoneId 时区,如果给定的时区与当前时区不同,会转换时间 * @return {@link LocalDateTime} */ public static LocalDateTime of(final Instant instant, final ZoneId zoneId) { @@ -238,9 +241,11 @@ public static LocalDateTime of(final Instant instant, final ZoneId zoneId) { /** * {@link Instant}转{@link LocalDateTime} + * instant是一个无时区的时间戳,在转换为本地时间时,需指定这个时间戳所在时区 + * 如果所在时区与当前时区不同,会转换时间 * * @param instant {@link Instant} - * @param timeZone 时区 + * @param timeZone 时区,如果给定的时区与当前时区不同,会转换时间 * @return {@link LocalDateTime} */ public static LocalDateTime of(final Instant instant, final TimeZone timeZone) { diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/DateTime.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/DateTime.java index a42a05a774..8daeedbc65 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/DateTime.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/DateTime.java @@ -57,6 +57,11 @@ * 包装{@link Date} * 此类继承了{@link Date},并提供扩展方法,如时区等。 * 此类重写了父类的{@code toString()}方法,返回值为"yyyy-MM-dd HH:mm:ss"格式 + * 相对于{@link Date},此类定义了时区,用于标识日期所在时区,默认为当前时区 + *
    + *
  • 当使用默认时区时,与LocalDateTime类似,标识本地时间
  • + *
  • 当使用指定时区时,与ZonedDateTime类似,标识某个地区的时间
  • + *
* * @author Kimi Liu * @since Java 17+ @@ -106,7 +111,7 @@ public DateTime(final TimeZone timeZone) { */ public DateTime(final Date date) { this( - date,// + date, (date instanceof DateTime) ? ((DateTime) date).timeZone : TimeZone.getDefault() ); } @@ -277,19 +282,16 @@ public DateTime(final CharSequence date, final PositionDateParser parser, final } /** - * 设置全局的,是否使用{@link Date}默认的toString()格式 - * 如果为{@code true},则调用toString()时返回"EEE MMM dd HH:mm:ss zzz yyyy"格式, - * 如果为{@code false},则返回"yyyy-MM-dd HH:mm:ss", - * 默认为{@code false} + * 现在的时间 * - * @param customUseJdkToStringStyle 是否使用{@link Date}默认的toString()格式 + * @return 现在的时间 */ - public static void setUseJdkToStringStyle(final boolean customUseJdkToStringStyle) { - useJdkToStringStyle = customUseJdkToStringStyle; + public static DateTime now() { + return new DateTime(); } /** - * 转换时间戳为 DateTime + * 转换时间戳为 DateTime,默认时区 * * @param timeMillis 时间戳,毫秒数 * @return DateTime @@ -312,7 +314,7 @@ public static DateTime of(final Date date) { } /** - * 转换 {@link java.util.Calendar} 为 DateTime + * 转换 {@link java.util.Calendar} 为 DateTime,使用{@link java.util.Calendar}中指定的时区 * * @param calendar {@link java.util.Calendar} * @return DateTime @@ -334,12 +336,15 @@ public static DateTime of(final String date, final String format) { } /** - * 现在的时间 + * 设置全局的,是否使用{@link Date}默认的toString()格式 + * 如果为{@code true},则调用toString()时返回"EEE MMM dd HH:mm:ss zzz yyyy"格式, + * 如果为{@code false},则返回"yyyy-MM-dd HH:mm:ss", + * 默认为{@code false} * - * @return 现在的时间 + * @param customUseJdkToStringStyle 是否使用{@link Date}默认的toString()格式 */ - public static DateTime now() { - return new DateTime(); + public static void setUseJdkToStringStyle(final boolean customUseJdkToStringStyle) { + useJdkToStringStyle = customUseJdkToStringStyle; } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/Modifier.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/Modifier.java index 7b244ea8ed..41285abb9a 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/Modifier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/Modifier.java @@ -29,7 +29,6 @@ import org.miaixz.bus.core.center.date.culture.en.Modify; import org.miaixz.bus.core.xyz.ArrayKit; -import org.miaixz.bus.core.xyz.DateKit; /** * 日期修改器 @@ -89,7 +88,7 @@ public static java.util.Calendar modify(final java.util.Calendar calendar, final public static java.util.Calendar modify(final java.util.Calendar calendar, final int dateField, final Modify modify, final boolean truncateMillisecond) { // AM_PM上下午特殊处理 if (java.util.Calendar.AM_PM == dateField) { - final boolean isAM = DateKit.isAM(calendar); + final boolean isAM = Calendar.isAM(calendar); switch (modify) { case TRUNCATE: calendar.set(java.util.Calendar.HOUR_OF_DAY, isAM ? 0 : 12); diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/Resolver.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/Resolver.java index 246f601a47..ad7d73fded 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/Resolver.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/Resolver.java @@ -30,6 +30,7 @@ import org.miaixz.bus.core.center.date.format.CustomFormat; import org.miaixz.bus.core.center.date.format.FormatBuilder; import org.miaixz.bus.core.center.date.format.parser.PositionDateParser; +import org.miaixz.bus.core.center.date.format.parser.RegisterDateParser; import org.miaixz.bus.core.lang.Fields; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.exception.DateException; @@ -52,6 +53,38 @@ */ public class Resolver extends Converter { + /** + * 将日期字符串转换为{@link DateTime}对象,格式: + *
    + *
  1. yyyy-MM-dd HH:mm:ss
  2. + *
  3. yyyy/MM/dd HH:mm:ss
  4. + *
  5. yyyy.MM.dd HH:mm:ss
  6. + *
  7. yyyy年MM月dd日 HH时mm分ss秒
  8. + *
  9. yyyy-MM-dd
  10. + *
  11. yyyy/MM/dd
  12. + *
  13. yyyy.MM.dd
  14. + *
  15. HH:mm:ss
  16. + *
  17. HH时mm分ss秒
  18. + *
  19. yyyy-MM-dd HH:mm
  20. + *
  21. yyyy-MM-dd HH:mm:ss.SSS
  22. + *
  23. yyyy-MM-dd HH:mm:ss.SSSSSS
  24. + *
  25. yyyyMMddHHmmss
  26. + *
  27. yyyyMMddHHmmssSSS
  28. + *
  29. yyyyMMdd
  30. + *
  31. EEE, dd MMM yyyy HH:mm:ss z
  32. + *
  33. EEE MMM dd HH:mm:ss zzz yyyy
  34. + *
  35. yyyy-MM-dd'T'HH:mm:ss'Z'
  36. + *
  37. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
  38. + *
  39. yyyy-MM-dd'T'HH:mm:ssZ
  40. + *
  41. yyyy-MM-dd'T'HH:mm:ss.SSSZ
  42. + *
+ * + * @param date 日期字符串 + * @return 日期 + */ + public static DateTime parse(final CharSequence date) { + return (DateTime) RegisterDateParser.INSTANCE.parse(date); + } /** * 构建DateTime对象 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/builder/DateBuilder.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/builder/DateBuilder.java index d1a752b92a..994b99ab48 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/builder/DateBuilder.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/builder/DateBuilder.java @@ -27,13 +27,14 @@ */ package org.miaixz.bus.core.center.date.builder; +import org.miaixz.bus.core.center.date.DateTime; import org.miaixz.bus.core.lang.exception.DateException; import org.miaixz.bus.core.xyz.ZoneKit; import java.time.*; import java.util.Calendar; -import java.util.Date; import java.util.TimeZone; +import java.util.concurrent.TimeUnit; /** * DateBuilder类用于构建和操作日期 @@ -77,31 +78,31 @@ public final class DateBuilder { * 秒 */ private int second; - /** - * 毫秒 - */ - private long millisecond; /** * 纳秒 */ private int nanosecond; /** - * 时间戳 + * Unix时间戳(秒) */ - private long timestamp; + private long unixsecond; /** - * 时区 + * 毫秒 */ - private TimeZone zone; + private long millisecond; + /** + * 时区偏移量是否已设置 + */ + private boolean flag; /** * 时区偏移量 * 分钟 */ - private int offset; + private int zoneOffset; /** - * 时区偏移量是否已设置 + * 时区 */ - private boolean flag; + private TimeZone zone; /** * 上午标志 */ @@ -112,18 +113,25 @@ public final class DateBuilder { private boolean pm; /** - * 创建并返回一个DateBuilder实例 + * 创建并返回一个DateBuilder实例。 * - * @return 一个新的DateBuilder实例 + * @return this */ public static DateBuilder of() { return new DateBuilder(); } /** - * 获取年份 + * 构造 + */ + public DateBuilder() { + reset(); + } + + /** + * 获取年份。 * - * @return 返回设置的年份 + * @return 返回设置的年份。 */ public int getYear() { return year; @@ -261,18 +269,18 @@ public DateBuilder setSecond(final int second) { } /** - * 获取纳秒数 + * 获取纳秒数。 * - * @return 当前对象的纳秒数 + * @return 当前对象的纳秒数。 */ public int getNanosecond() { return nanosecond; } /** - * 设置纳秒数 + * 设置纳秒数。 * - * @param nanosecond 要设置的纳秒数 + * @param nanosecond 要设置的纳秒数。 * @return this */ public DateBuilder setNanosecond(final int nanosecond) { @@ -281,38 +289,38 @@ public DateBuilder setNanosecond(final int nanosecond) { } /** - * 获取Unix时间戳(秒) + * 获取Unix时间戳(秒)。 * - * @return 当前对象的Unix时间戳(以秒为单位) + * @return 当前对象的Unix时间戳(以秒为单位)。 */ - public long getTimestamp() { - return timestamp; + public long getUnixsecond() { + return unixsecond; } /** - * 设置Unix时间戳(秒) + * 设置Unix时间戳(秒)。 * - * @param timestamp 要设置的Unix时间戳(以秒为单位) + * @param unixsecond 要设置的Unix时间戳(以秒为单位)。 * @return this */ - public DateBuilder setTimestamp(final long timestamp) { - this.timestamp = timestamp; + public DateBuilder setUnixsecond(final long unixsecond) { + this.unixsecond = unixsecond; return this; } /** - * 获取时间戳(毫秒) + * 获取时间戳(毫秒)。 * - * @return 当前对象的时间戳(以毫秒为单位) + * @return 当前对象的时间戳(以毫秒为单位)。 */ public long getMillisecond() { return millisecond; } /** - * 设置时间戳(毫秒) + * 设置时间戳(毫秒)。 * - * @param millisecond 要设置的时间戳(以毫秒为单位) + * @param millisecond 要设置的时间戳(以毫秒为单位)。 * @return this */ public DateBuilder setMillisecond(final long millisecond) { @@ -321,7 +329,7 @@ public DateBuilder setMillisecond(final long millisecond) { } /** - * 检查时区偏移量是否已设置 + * 检查时区偏移量是否已设置。 * * @return 如果时区偏移量已设置则返回true,否则返回false。 */ @@ -330,9 +338,9 @@ public boolean isFlag() { } /** - * 设置时区偏移量是否已设置的状态 + * 设置时区偏移量是否已设置的状态。 * - * @param flag 指定时区偏移量是否已设置的状态 + * @param flag 指定时区偏移量是否已设置的状态。 * @return this */ public DateBuilder setFlag(final boolean flag) { @@ -341,38 +349,38 @@ public DateBuilder setFlag(final boolean flag) { } /** - * 获取时区偏移量 + * 获取时区偏移量。 * - * @return 返回设置的时区偏移量 + * @return 返回设置的时区偏移量。 */ - public int getOffset() { - return offset; + public int getZoneOffset() { + return zoneOffset; } /** - * 设置时区偏移量 + * 设置时区偏移量。 * - * @param offset 要设置的时区偏移量 + * @param zoneOffset 要设置的时区偏移量。 * @return this */ - public DateBuilder setOffset(final int offset) { - this.offset = offset; + public DateBuilder setZoneOffset(final int zoneOffset) { + this.zoneOffset = zoneOffset; return this; } /** - * 获取时区 + * 获取时区。 * - * @return 返回设置的时区 + * @return 返回设置的时区。 */ public TimeZone getZone() { return zone; } /** - * 设置时区 + * 设置时区。 * - * @param zone 要设置的时区 + * @param zone 要设置的时区。 * @return this */ public DateBuilder setZone(final TimeZone zone) { @@ -381,7 +389,7 @@ public DateBuilder setZone(final TimeZone zone) { } /** - * 检查当前是否为上午 + * 检查当前是否为上午。 * * @return 如果当前设置为上午则返回true,否则返回false。 */ @@ -390,9 +398,9 @@ public boolean isAm() { } /** - * 设置是否为上午的状态 + * 设置是否为上午的状态。 * - * @param am 指定是否为上午的状态 + * @param am 指定是否为上午的状态。 * @return this */ public DateBuilder setAm(final boolean am) { @@ -401,7 +409,7 @@ public DateBuilder setAm(final boolean am) { } /** - * 检查当前是否为下午 + * 检查当前是否为下午。 * * @return 如果当前设置为下午则返回true,否则返回false。 */ @@ -410,15 +418,16 @@ public boolean isPm() { } /** - * 设置是否为下午的状态 + * 设置是否为下午的状态。 * - * @param pm 指定是否为下午的状态 + * @param pm 指定是否为下午的状态。 * @return this */ public DateBuilder setPm(final boolean pm) { this.pm = pm; return this; } + // endregion /** * 重置所有值为默认值 @@ -433,39 +442,51 @@ public DateBuilder reset() { this.hour = 0; this.minute = 0; this.second = 0; - this.millisecond = 0; this.nanosecond = 0; - this.timestamp = 0; + this.unixsecond = 0; + this.millisecond = 0; this.am = false; this.pm = false; this.flag = false; - this.offset = 0; + this.zoneOffset = 0; this.zone = null; return this; } /** - * 将当前时间对象转换为{@link Date}类型。此方法根据是否设置了时区偏移量使用不同的转换策略。 + * 将当前时间对象转换为{@link DateTime}类型。此方法根据是否设置了时区偏移量使用不同的转换策略。 *
    - *
  • 如果时区偏移量未设置,则将时间转换为 Calendar 对象后获取其 Date 表现形式
  • - *
  • 如果时区偏移量已设置,则直接转换为 OffsetDateTime 对象,进一步转换为 Instant 对象,最后转换为 Date 对象返回。
  • + *
  • 如果时区偏移量未设置,则通过{@link Calendar}创建{@link DateTime},无需转换时区。
  • + *
  • 如果时区偏移量已设置,则经过OffsetDateTime转换为本地时区的{@link DateTime}。
  • *
+ * 。 * - * @return the date 表示当前时间的 Date 对象 + * @return DateTime 表示当前时间的 DateTime 对象。 */ - public Date toDate() { + public DateTime toDate() { if (!flag) { - // 时区偏移量未设置,使用 Calendar 进行转换 - return toCalendar().getTime(); + // 时区偏移量未设置,使用 Calendar 进行转换,无需读取时区 + return new DateTime(toCalendar().getTimeInMillis()); } // 时区偏移量已设置,直接转换为 Date 对象返回 - return Date.from(toOffsetDateTime().toInstant()); + return new DateTime(toOffsetDateTime().toInstant().toEpochMilli()); + } + + /** + * 转换为带时区信息的{@link DateTime} + * 此方法用于保留原始时间戳,并且不丢失时区信息 + * + * @return {@link DateTime} + */ + public DateTime toZonedDateTime() { + final Calendar calendar = toCalendar(); + return new DateTime(calendar.getTimeInMillis(), calendar.getTimeZone()); } /** * 将当前对象的日期时间信息转换为{@link Calendar}实例。 - * 如果`timestamp`不为0,将根据时间戳(秒)和纳秒偏移量构造Calendar。 - * 否则,根据提供的时区信息`zone`或`offset`来设置Calendar的时区。 + * 如果`unixsecond`不为0,将根据unix时间戳(秒)和纳秒偏移量构造Calendar。 + * 否则,根据提供的时区信息`zone`或`zoneOffset`来设置Calendar的时区。 * 最后,设置年、月、日、时、分、秒和毫秒信息。 * * @return Calendar 根据当前日期时间信息构建的Calendar实例。 @@ -473,24 +494,17 @@ public Date toDate() { */ public Calendar toCalendar() { this.prepare(); - // 获取一个Calendar实例 - final Calendar calendar = Calendar.getInstance(); + final Calendar calendar = Calendar.getInstance(); // 获取一个Calendar实例 // 设置时区 if (zone != null) { - // 使用指定的时区 - calendar.setTimeZone(zone); - // 如果设置了时区偏移量 - } else if (flag) { - // 尝试根据偏移量获取时区ID - final String[] ids = TimeZone.getAvailableIDs(offset * 60_000); - // 如果没有找到有效的时区ID - if (ids.length == 0) { - throw new DateException("Can't build Calendar, " + - "because the zoneOffset[{}] can't be converted to an valid TimeZone.", this.offset); + calendar.setTimeZone(zone); // 使用指定的时区 + } else if (flag) { // 如果设置了时区偏移量 + final TimeZone timeZone = ZoneKit.getTimeZoneByOffset(zoneOffset, TimeUnit.SECONDS); + if (null == timeZone) { // 如果没有找到有效的时区ID + throw new DateException("Invalid zoneOffset: {}", this.zoneOffset); } - // 设置第一个找到的时区 - calendar.setTimeZone(TimeZone.getTimeZone(ids[0])); + calendar.setTimeZone(timeZone); } // 如果毫秒数不为0,则直接使用毫秒数设置时间 @@ -500,30 +514,27 @@ public Calendar toCalendar() { } // 如果有unix时间戳,则据此设置时间 - if (timestamp != 0) { - // 设置时间戳对应的毫秒数 - calendar.setTimeInMillis(timestamp * 1000 + nanosecond / 1_000_000); + if (unixsecond != 0) { + calendar.setTimeInMillis(unixsecond * 1000 + nanosecond / 1_000_000); // 设置时间戳对应的毫秒数 return calendar; } // 设置日期和时间字段 calendar.set(Calendar.YEAR, year); - // Calendar的月份从0开始 - calendar.set(Calendar.MONTH, month - 1); + calendar.set(Calendar.MONTH, month - 1); // Calendar的月份从0开始 calendar.set(Calendar.DAY_OF_MONTH, day); calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, minute); calendar.set(Calendar.SECOND, second); - // 纳秒转换为毫秒 - calendar.set(Calendar.MILLISECOND, nanosecond / 1_000_000); + calendar.set(Calendar.MILLISECOND, nanosecond / 1_000_000); // 纳秒转换为毫秒 return calendar; } /** * 将当前对象的日期时间信息转换为{@link LocalDateTime}。 * 此方法根据对象中的时间信息(年、月、日、时、分、秒、纳秒)和时区信息(如果存在), - * 创建并返回一个LocalDateTime实例。时区信息可以是Unix时间戳中的秒数(timestamp), - * 也可以是显式设置的时区偏移量(flag),或者使用默认时区(zone != null)。 + * 创建并返回一个LocalDateTime实例。时区信息可以是Unix时间戳中的秒数(unixsecond), + * 也可以是显式设置的时区偏移量(zoneOffsetSetted),或者使用默认时区(zone != null)。 * * @return LocalDateTime 表示当前对象日期时间的LocalDateTime实例。 */ @@ -535,9 +546,9 @@ public LocalDateTime toLocalDateTime() { return LocalDateTime.ofEpochSecond(instant.getEpochSecond(), instant.getNano(), DEFAULT_OFFSET); } - // 如果timestamp大于0,使用unix时间戳创建LocalDateTime - if (timestamp > 0) { - return LocalDateTime.ofEpochSecond(timestamp, nanosecond, DEFAULT_OFFSET); + // 如果unixsecond大于0,使用unix时间戳创建LocalDateTime + if (unixsecond > 0) { + return LocalDateTime.ofEpochSecond(unixsecond, nanosecond, DEFAULT_OFFSET); } // 创建LocalDateTime实例,使用年月日时分秒纳秒信息 @@ -552,7 +563,7 @@ public LocalDateTime toLocalDateTime() { // 如果设置了显式的时区偏移量,计算时区偏移量 if (flag) { - zoneSecond = TimeZone.getDefault().getRawOffset() / 1000 - offset * 60; + zoneSecond = TimeZone.getDefault().getRawOffset() / 1000 - zoneOffset * 60; } // 如果存在时区偏移,对LocalDateTime进行调整后返回,否则直接返回原始的LocalDateTime实例 @@ -561,41 +572,36 @@ public LocalDateTime toLocalDateTime() { /** * 将当前对象转换为 {@link OffsetDateTime}。 - * 此方法根据 timestamp、时区偏移量或时区来构建 OffsetDateTime。 - * 如果 timestamp 大于 0,将使用 timestamp 和纳秒来创建 UTC 时间。 + * 此方法根据 unixsecond、时区偏移量或时区来构建 OffsetDateTime。 + * 如果 unixsecond 大于 0,将使用 unixsecond 和纳秒来创建 UTC 时间。 * 如果设置了时区偏移量,将使用该偏移量构造 {@link OffsetDateTime}。 * 如果设置了时区,将使用该时区构造 {@link OffsetDateTime}。 * 如果以上信息均未设置,则默认使用 UTC 时间戳 0 创建 OffsetDateTime。 * - * @return 表示当前时间的 OffsetDateTime 对象 + * @return OffsetDateTime 表示当前时间的 OffsetDateTime 对象。 */ public OffsetDateTime toOffsetDateTime() { - // 准备工作,可能涉及一些初始化或数据处理 - this.prepare(); + this.prepare(); // 准备工作,可能涉及一些初始化或数据处理 if (millisecond > 0) { return OffsetDateTime.ofInstant(Instant.ofEpochMilli(millisecond), ZoneKit.ZONE_ID_UTC); } - if (timestamp > 0) { + if (unixsecond > 0) { // 如果设置了 unix 时间戳,则使用它和纳秒创建 UTC 时间 - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(timestamp, nanosecond), ZoneKit.ZONE_ID_UTC); + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(unixsecond, nanosecond), ZoneKit.ZONE_ID_UTC); } - // 创建 LocalDateTime 对象 - final LocalDateTime dateTime = LocalDateTime.of(year, month, day, hour, minute, second, nanosecond); + final LocalDateTime dateTime = LocalDateTime.of(year, month, day, hour, minute, second, nanosecond); // 创建 LocalDateTime 对象 // 检查是否设置了时区偏移量 if (flag) { - // 根据偏移量创建 ZoneOffset - final ZoneOffset offset = ZoneOffset.ofHoursMinutes(this.offset / 60, this.offset % 60); - // 使用时区偏移量构造 OffsetDateTime - return dateTime.atOffset(offset); + final ZoneOffset offset = ZoneOffset.ofHoursMinutes(zoneOffset / 60, zoneOffset % 60); // 根据偏移量创建 ZoneOffset + return dateTime.atOffset(offset); // 使用时区偏移量构造 OffsetDateTime } // 检查是否设置了时区 if (zone != null) { - // 使用时区构造 OffsetDateTime - return dateTime.atZone(zone.toZoneId()).toOffsetDateTime(); + return dateTime.atZone(zone.toZoneId()).toOffsetDateTime(); // 使用时区构造 OffsetDateTime } // 默认情况下,使用 UTC 时间戳 0 创建 OffsetDateTime diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Constellation.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Constellation.java index c4f772f876..97e7182175 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Constellation.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Constellation.java @@ -27,12 +27,11 @@ */ package org.miaixz.bus.core.center.date.culture.en; -import org.miaixz.bus.core.xyz.DateKit; +import org.miaixz.bus.core.center.date.Calendar; import org.miaixz.bus.core.xyz.EnumKit; import java.time.LocalDate; import java.time.MonthDay; -import java.util.Calendar; import java.util.Date; /** @@ -174,7 +173,7 @@ public static Constellation get(MonthDay monthDay) { * @return 星座名 */ public static String getName(final Date date) { - return getName(DateKit.calendar(date)); + return getName(Calendar.calendar(date)); } /** @@ -183,11 +182,11 @@ public static String getName(final Date date) { * @param calendar 出生日期 * @return 星座名 */ - public static String getName(final Calendar calendar) { + public static String getName(final java.util.Calendar calendar) { if (null == calendar) { return null; } - return getName(calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)); + return getName(calendar.get(java.util.Calendar.MONTH), calendar.get(java.util.Calendar.DAY_OF_MONTH)); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Month.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Month.java index e794bdb7d9..8ec13bce71 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Month.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Month.java @@ -158,7 +158,7 @@ public static Month of(final int calendarMonthIntValue) { * @throws IllegalArgumentException 如果别名无对应的枚举,抛出此异常 */ public static Month of(final String name) throws IllegalArgumentException { - if (null != name && name.length() > 2) { + if (null != name && name.length() > 1) { switch (Character.toLowerCase(name.charAt(0))) { case 'a': switch (Character.toLowerCase(name.charAt(1))) { @@ -197,6 +197,32 @@ public static Month of(final String name) throws IllegalArgumentException { return NOVEMBER; // november case 'd': return DECEMBER; // december + case '一': + return JANUARY; + case '二': + return FEBRUARY; + case '三': + return MARCH; + case '四': + return APRIL; + case '五': + return MAY; + case '六': + return JUNE; + case '七': + return JULY; + case '八': + return AUGUST; + case '九': + return SEPTEMBER; + case '十': + switch (Character.toLowerCase(name.charAt(1))){ + case '一': + return NOVEMBER; + case '二': + return DECEMBER; + } + return OCTOBER; } } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/FastDateParser.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/FastDateParser.java index 118eed5efd..c803ce8dd9 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/FastDateParser.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/FastDateParser.java @@ -118,10 +118,7 @@ int modify(final FastDateParser parser, final int iValue) { private transient List list; /** - *

* Constructs a new FastDateParser. - *

- *

* Use {@link FormatBuilder#getInstance(String, TimeZone, Locale)} or another variation of the factory methods of {@link FormatBuilder} to get a cached FastDateParser instance. * * @param pattern non-null {@link java.text.SimpleDateFormat} compatible pattern @@ -133,9 +130,7 @@ public FastDateParser(final String pattern, final TimeZone timeZone, final Local } /** - *

* Constructs a new FastDateParser. - *

* * @param pattern non-null {@link java.text.SimpleDateFormat} compatible pattern * @param timeZone non-null time zone to use diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/GlobalRegexDateParser.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/GlobalRegexDateParser.java deleted file mode 100644 index 7d9b30f385..0000000000 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/GlobalRegexDateParser.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - ~ ~ - ~ The MIT License (MIT) ~ - ~ ~ - ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ - ~ ~ - ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ - ~ of this software and associated documentation files (the "Software"), to deal ~ - ~ in the Software without restriction, including without limitation the rights ~ - ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ - ~ copies of the Software, and to permit persons to whom the Software is ~ - ~ furnished to do so, subject to the following conditions: ~ - ~ ~ - ~ The above copyright notice and this permission notice shall be included in ~ - ~ all copies or substantial portions of the Software. ~ - ~ ~ - ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ - ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ - ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ - ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ - ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ - ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ - ~ THE SOFTWARE. ~ - ~ ~ - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - */ -package org.miaixz.bus.core.center.date.format.parser; - -import java.util.Date; -import java.util.regex.Pattern; - -/** - * 全局正则日期解析器 - * 通过使用预定义或自定义的正则规则,解析日期字符串 - * - * @author Kimi Liu - * @since Java 17+ - */ -public class GlobalRegexDateParser { - - private static final String yearRegex = "(?\\d{2,4})"; - private static final String monthRegex = "(?\\w{3,9})"; - private static final String dayRegex = "(?\\d{1,2})(?:th)?"; - // 周的正则,匹配:Mon, Tue, Wed, Thu, Fri, Sat, Sun,或 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday - // 日期中一般出现在头部,可选 - private static final String weekRegexWithSuff = "(?[mwfts][oeruha][ndieut](\\w{3,6})?\\W+)?"; - // hh:mm:ss.SSSSZ hh:mm:ss.SSSS hh:mm:ss hh:mm - private static final String timeRegexWithPre = "(" + - "\\W+(at\\s)?(?\\d{1,2})" + - ":(?\\d{1,2})" + - "(:(?\\d{1,2}))?" + - "(?:[.,](?\\d{1,9}))?(?z)?" + - "(\\s?(?[ap]m))?" + - ")?"; - // 时区,类似: +08:00 +0800 +08,可选 - private static final String zoneOffsetRegexWithPre = "(\\s?(?[-+]\\d{1,2}:?(?:\\d{2})?))?"; - // 时区名称,类似: CST UTC (CST),可选 - private static final String zoneNameRegexWithPre = "(\\s[(]?(?[a-z ]+)[)]?)?"; - private static final String zoneNameIgnoreRegexWithPre = "(\\s[(]?(?[a-z ]+)[)]?)?"; - - private static final RegexDateParser PARSER; - - static { - // 月开头,类似:May 8 - final String dateRegexMonthFirst = monthRegex + "\\W+" + dayRegex; - // 日开头,类似:02-Jan - final String dateRegexDayFirst = dayRegex + "\\W+" + monthRegex; - // 时区拼接,类似: - // GMT+0100 (GMT Daylight Time) - // +0200 (CEST) - // GMT+0100 - // MST - final String zoneRegex = zoneNameRegexWithPre + zoneOffsetRegexWithPre + zoneNameIgnoreRegexWithPre; - - PARSER = RegexDateParser.of( - // 年开头 - - //【周月日年时】类似:May 8, 2009,时间部分可选,类似:5:57:51,5:57:51 +08:00 - weekRegexWithSuff + dateRegexMonthFirst + "\\W+" + yearRegex + timeRegexWithPre + zoneRegex, - //【周月日时年】类似:Mon Jan 2 15:04:05 MST 2006 - weekRegexWithSuff + dateRegexMonthFirst + timeRegexWithPre + zoneRegex + "\\W+" + yearRegex, - //【周日月年时】类似:Monday, 02-Jan-06 15:04:05 MST - weekRegexWithSuff + dateRegexDayFirst + "\\W+" + yearRegex + timeRegexWithPre + zoneRegex - ); - } - - /** - * 解析日期,此方法线程安全 - * - * @param source 日期字符串 - * @return 日期 - */ - public static Date parse(final CharSequence source) { - return PARSER.parse(source); - } - - /** - * 新增自定义日期正则 - * - * @param regex 日期正则 - */ - synchronized public static void registerRegex(final String regex) { - PARSER.addRegex(regex); - } - - /** - * 新增自定义日期正则 - * - * @param pattern 日期正则 - */ - synchronized public static void registerPattern(final Pattern pattern) { - PARSER.addPattern(pattern); - } - -} \ No newline at end of file diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/ISO8601DateParser.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/ISO8601DateParser.java deleted file mode 100644 index fc5dca01a2..0000000000 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/ISO8601DateParser.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - ~ ~ - ~ The MIT License (MIT) ~ - ~ ~ - ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ - ~ ~ - ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ - ~ of this software and associated documentation files (the "Software"), to deal ~ - ~ in the Software without restriction, including without limitation the rights ~ - ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ - ~ copies of the Software, and to permit persons to whom the Software is ~ - ~ furnished to do so, subject to the following conditions: ~ - ~ ~ - ~ The above copyright notice and this permission notice shall be included in ~ - ~ all copies or substantial portions of the Software. ~ - ~ ~ - ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ - ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ - ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ - ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ - ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ - ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ - ~ THE SOFTWARE. ~ - ~ ~ - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - */ -package org.miaixz.bus.core.center.date.format.parser; - -import org.miaixz.bus.core.center.date.DateTime; -import org.miaixz.bus.core.center.date.Formatter; -import org.miaixz.bus.core.lang.Fields; -import org.miaixz.bus.core.lang.Symbol; -import org.miaixz.bus.core.lang.exception.DateException; -import org.miaixz.bus.core.xyz.PatternKit; -import org.miaixz.bus.core.xyz.StringKit; - -import java.io.Serializable; - -/** - * ISO8601日期字符串(JDK的Date对象toString默认格式)解析,支持格式; - *
    - *
  1. yyyy-MM-dd'T'HH:mm:ss'Z'
  2. - *
  3. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
  4. - *
  5. yyyy-MM-dd'T'HH:mm:ssZ
  6. - *
  7. yyyy-MM-dd'T'HH:mm:ss.SSSZ
  8. - *
  9. yyyy-MM-dd'T'HH:mm:ss+0800
  10. - *
  11. yyyy-MM-dd'T'HH:mm:ss+08:00
  12. - *
- * - * @author Kimi Liu - * @since Java 17+ - */ -public class ISO8601DateParser implements PredicateDateParser, Serializable { - - private static final long serialVersionUID = -1L; - - /** - * 单例对象 - */ - public static ISO8601DateParser INSTANCE = new ISO8601DateParser(); - - /** - * 如果日期中的毫秒部分超出3位,会导致秒数增加,因此只保留前三位 - * - * @param date 日期字符串 - * @param before 毫秒部分的前一个字符 - * @param after 毫秒部分的后一个字符 - * @return 规范之后的毫秒部分 - */ - private static String normalizeMillSeconds(final CharSequence date, final CharSequence before, final CharSequence after) { - if (StringKit.isBlank(after)) { - final String millOrNaco = StringKit.subPre(StringKit.subAfter(date, before, true), 3); - return StringKit.subBefore(date, before, true) + before + millOrNaco; - } - final String millOrNaco = StringKit.subPre(StringKit.subBetween(date, before, after), 3); - return StringKit.subBefore(date, before, true) - + before - + millOrNaco + after + StringKit.subAfter(date, after, true); - } - - @Override - public boolean test(final CharSequence date) { - return StringKit.contains(date, 'T'); - } - - @Override - public DateTime parse(CharSequence source) throws DateException { - final int length = source.length(); - if (StringKit.contains(source, 'Z')) { - if (length == Fields.UTC.length() - 4) { - // 格式类似:2018-09-13T05:34:31Z,-4表示减去4个单引号的长度 - return new DateTime(source, Formatter.UTC_FORMAT); - } - - final int patternLength = Fields.UTC_MS.length(); - // 格式类似:2018-09-13T05:34:31.999Z,-4表示减去4个单引号的长度 - // 2018-09-13T05:34:31.1Z - 2018-09-13T05:34:31.000000Z - if (length <= patternLength && length >= patternLength - 6) { - // 毫秒部分1-7位支持 - return new DateTime(source, Formatter.UTC_MS_FORMAT); - } - } else if (StringKit.contains(source, Symbol.C_PLUS)) { - // 去除类似2019-06-01T19:45:43 +08:00加号前的空格 - source = StringKit.replace(source, " +", Symbol.PLUS); - final String zoneOffset = StringKit.subAfter(source, Symbol.C_PLUS, true); - if (StringKit.isBlank(zoneOffset)) { - throw new DateException("Invalid format: [{}]", source); - } - if (!StringKit.contains(zoneOffset, Symbol.C_COLON)) { - // +0800转换为+08:00 - final String pre = StringKit.subBefore(source, Symbol.C_PLUS, true); - source = pre + Symbol.PLUS + zoneOffset.substring(0, 2) + Symbol.COLON + "00"; - } - - if (StringKit.contains(source, Symbol.C_DOT)) { - // 带毫秒,格式类似:2018-09-13T05:34:31.999+08:00 - source = normalizeMillSeconds(source, ".", Symbol.PLUS); - return new DateTime(source, Formatter.ISO8601_MS_WITH_XXX_OFFSET_FORMAT); - } else { - // 格式类似:2018-09-13T05:34:31+08:00 - return new DateTime(source, Formatter.ISO8601_WITH_XXX_OFFSET_FORMAT); - } - } else if (PatternKit.contains("-\\d{2}:?00", source)) { - // 类似 2022-09-14T23:59:00-08:00 或者 2022-09-14T23:59:00-0800 - - // 去除类似2019-06-01T19:45:43 -08:00加号前的空格 - source = StringKit.replace(source, " -", Symbol.MINUS); - if (Symbol.C_COLON != source.charAt(source.length() - 3)) { - source = StringKit.sub(source, 0, source.length() - 2) + ":00"; - } - - if (StringKit.contains(source, Symbol.C_DOT)) { - // 带毫秒,格式类似:2018-09-13T05:34:31.999-08:00 - source = normalizeMillSeconds(source, ".", Symbol.MINUS); - return new DateTime(source, Formatter.ISO8601_MS_WITH_XXX_OFFSET_FORMAT); - } else { - // 格式类似:2018-09-13T05:34:31-08:00 - return new DateTime(source, Formatter.ISO8601_WITH_XXX_OFFSET_FORMAT); - } - } else { - if (length == Fields.ISO8601.length() - 2) { - // 格式类似:2018-09-13T05:34:31 - return new DateTime(source, Formatter.ISO8601_FORMAT); - } else if (length == Fields.ISO8601.length() - 5) { - // 格式类似:2018-09-13T05:34 - return new DateTime(source + ":00", Formatter.ISO8601_FORMAT); - } else if (StringKit.contains(source, Symbol.C_DOT)) { - // 可能为: 2021-03-17T06:31:33.99 - source = normalizeMillSeconds(source, ".", null); - return new DateTime(source, Formatter.ISO8601_MS_FORMAT); - } - } - // 没有更多匹配的时间格式 - throw new DateException("No UTC format fit for date String [{}] !", source); - } - -} diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/NormalDateParser.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/NormalDateParser.java index a86299d60e..908e8614b6 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/NormalDateParser.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/NormalDateParser.java @@ -28,70 +28,144 @@ package org.miaixz.bus.core.center.date.format.parser; import org.miaixz.bus.core.center.date.DateTime; -import org.miaixz.bus.core.center.date.Formatter; -import org.miaixz.bus.core.lang.Symbol; -import org.miaixz.bus.core.lang.exception.DateException; -import org.miaixz.bus.core.xyz.PatternKit; -import org.miaixz.bus.core.xyz.StringKit; -import java.io.Serializable; import java.util.regex.Pattern; /** - * 标准日期字符串解析,支持格式; - *
- *     yyyy-MM-dd HH:mm:ss.SSSSSS
- *     yyyy-MM-dd HH:mm:ss.SSS
- *     yyyy-MM-dd HH:mm:ss
- *     yyyy-MM-dd HH:mm
- *     yyyy-MM-dd
- * 
+ * 全局正则日期解析器 + * 通过使用预定义或自定义的正则规则,解析日期字符串 * * @author Kimi Liu * @since Java 17+ */ -public class NormalDateParser implements PredicateDateParser, Serializable { +public class NormalDateParser implements PredicateDateParser { - private static final long serialVersionUID = -1L; + /** + * 默认实例 + */ + public static NormalDateParser INSTANCE = new NormalDateParser(); - private static final Pattern patternNorm = Pattern.compile("\\d{4}-\\d{1,2}-\\d{1,2}(\\s\\d{1,2}:\\d{1,2}(:\\d{1,2})?(.\\d{1,6})?)?"); + private final RegexDateParser parser; /** - * 单例 + * 构造,初始化默认的解析规则 */ - public static NormalDateParser INSTANCE = new NormalDateParser(); + public NormalDateParser() { + parser = createDefault(); + } @Override - public boolean test(final CharSequence date) { - return PatternKit.isMatch(patternNorm, date); + public boolean test(final CharSequence charSequence) { + // 此类用于托底,当自定义规则无法匹配时,一律使用此规则 + return true; } + /** + * 解析日期,此方法线程安全 + * + * @param source 日期字符串 + * @return 日期 + */ @Override - public DateTime parse(CharSequence source) throws DateException { - final int colonCount = StringKit.count(source, Symbol.C_COLON); - switch (colonCount) { - case 0: - // yyyy-MM-dd - return new DateTime(source, Formatter.NORM_DATE_FORMAT); - case 1: - // yyyy-MM-dd HH:mm - return new DateTime(source, Formatter.NORM_DATETIME_MINUTE_FORMAT); - case 2: - final int indexOfDot = StringKit.indexOf(source, Symbol.C_DOT); - if (indexOfDot > 0) { - final int length1 = source.length(); - // yyyy-MM-dd HH:mm:ss.SSS 或者 yyyy-MM-dd HH:mm:ss.SSSSSS - if (length1 - indexOfDot > 4) { - // 类似yyyy-MM-dd HH:mm:ss.SSSSSS,采取截断操作 - source = StringKit.subPre(source, indexOfDot + 4); - } - return new DateTime(source, Formatter.NORM_DATETIME_MS_FORMAT); - } - // yyyy-MM-dd HH:mm:ss - return new DateTime(source, Formatter.NORM_DATETIME_FORMAT); - } - - throw new DateException("No format fit for date String [{}] !", source); + public DateTime parse(final CharSequence source) { + return (DateTime) parser.parse(source); + } + + /** + * 创建默认的 正则日期解析器 + * + * @return {@link RegexDateParser} + */ + private RegexDateParser createDefault() { + final String yearRegex = "(?\\d{2,4})"; + // 月的正则,匹配:Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, + // 或 January, February, March, April, May, June, July, August, September, October, November, December + final String monthRegex = "(?[jfmaasond][aepucoe][nbrylgptvc]\\w{0,6}|[一二三四五六七八九十]{1,2}月)"; + final String dayRegex = "(?\\d{1,2})(?:th)?"; + // 周的正则,匹配:Mon, Tue, Wed, Thu, Fri, Sat, Sun, + // 或 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday + // 周一般出现在日期头部,可选 + final String weekRegexWithSuff = "((?[mwfts][oeruha][ndieut](\\w{3,6})?|(星期|周)[一二三四五六日])\\W+)?"; + // hh:mm:ss.SSSSZ hh:mm:ss.SSSS hh:mm:ss hh:mm + final String timeRegexWithPre = "(" + + "(\\W+|T)(at\\s)?(?\\d{1,2})" + + "\\W(?\\d{1,2})" + + "(\\W(?\\d{1,2}))?秒?" + + "(?:[.,](?\\d{1,9}))?(?z)?" + + "(\\s?(?[ap]m))?" + + ")?"; + // 月开头,类似:May 8 + final String dateRegexMonthFirst = monthRegex + "\\W+" + dayRegex; + // 日开头,类似:02-Jan + final String dateRegexDayFirst = dayRegex + "\\W+" + monthRegex; + // 时区拼接,类似: + // GMT+0100 (GMT Daylight Time) + // +0200 (CEST) + // GMT+0100 + // MST + final String zoneRegex = "\\s?(?" + // 匹配:GMT MST等 + + "[a-z ]*" + // 匹配:+08:00 +0800 +08 + + "(\\s?[-+]\\d{1,2}:?(?:\\d{2})?)*" + // 匹配:(GMT Daylight Time)等 + + "(\\s?[(]?[a-z ]+[)]?)?" + + ")"; + final String maskRegex = "(\\smsk m=[+-]\\d[.]\\d+)?"; + + return RegexDateParser.of( + //【年月日时】类似:2009-Feb-08,时间部分可选,类似:5:57:51,05:57:51 +08:00 + yearRegex + "\\W" + dateRegexMonthFirst + timeRegexWithPre + zoneRegex + maskRegex, + //【年月日时】类似:2009-02-08或2014年04月08日,时间部分可选,类似:5:57:51,05:57:51 +08:00 + yearRegex + "\\W(?\\d{1,2})(\\W(?\\d{1,2}))?日?" + timeRegexWithPre + zoneRegex + maskRegex, + + //【周月日年时】类似:May 8, 2009,时间部分可选,类似:5:57:51,05:57:51 +08:00 + weekRegexWithSuff + dateRegexMonthFirst + "\\W+" + yearRegex + timeRegexWithPre + zoneRegex + maskRegex, + //【周月日时年】类似:Mon Jan 2 15:04:05 MST 2006 + weekRegexWithSuff + dateRegexMonthFirst + timeRegexWithPre + zoneRegex + "\\W+" + yearRegex + maskRegex, + //【周日月年时】类似:Monday, 02-Jan-06 15:04:05 MST + weekRegexWithSuff + dateRegexDayFirst + "\\W+" + yearRegex + timeRegexWithPre + zoneRegex + maskRegex, + //【日月年时】MM/dd/yyyy, dd/MM/yyyy, 类似:4/12/2014 03:00:51,为避免歧义,只支持4位年 + "(?\\d{1,2}\\W\\d{1,2})\\W(?\\d{4})" + timeRegexWithPre + zoneRegex + maskRegex, + + //纯数字日期时间 + // yyyy + // yyyyMM + // yyyyMMdd + // yyyyMMddhhmmss + // unixtime(10) + // millisecond(13) + // microsecond(16) + // nanosecond(19) + "^(?\\d{4,19})$" + ); + } + + /** + * 当用户传入的月和日无法判定默认位置时,设置默认的日期格式为dd/mm还是mm/dd + * + * @param preferMonthFirst {@code true}默认为mm/dd,否则dd/mm + */ + synchronized public void setPreferMonthFirst(final boolean preferMonthFirst) { + parser.setPreferMonthFirst(preferMonthFirst); + } + + /** + * 新增自定义日期正则 + * + * @param regex 日期正则 + */ + synchronized public void registerRegex(final String regex) { + parser.addRegex(regex); + } + + /** + * 新增自定义日期正则 + * + * @param pattern 日期正则 + */ + synchronized public void registerPattern(final Pattern pattern) { + parser.addPattern(pattern); } -} +} \ No newline at end of file diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RFC2822DateParser.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RFC2822DateParser.java deleted file mode 100644 index f81f396b46..0000000000 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RFC2822DateParser.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - ~ ~ - ~ The MIT License (MIT) ~ - ~ ~ - ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ - ~ ~ - ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ - ~ of this software and associated documentation files (the "Software"), to deal ~ - ~ in the Software without restriction, including without limitation the rights ~ - ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ - ~ copies of the Software, and to permit persons to whom the Software is ~ - ~ furnished to do so, subject to the following conditions: ~ - ~ ~ - ~ The above copyright notice and this permission notice shall be included in ~ - ~ all copies or substantial portions of the Software. ~ - ~ ~ - ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ - ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ - ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ - ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ - ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ - ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ - ~ THE SOFTWARE. ~ - ~ ~ - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - */ -package org.miaixz.bus.core.center.date.format.parser; - -import org.miaixz.bus.core.center.date.DateTime; -import org.miaixz.bus.core.center.date.Formatter; -import org.miaixz.bus.core.center.date.format.FormatBuilder; -import org.miaixz.bus.core.lang.Fields; -import org.miaixz.bus.core.lang.Symbol; -import org.miaixz.bus.core.xyz.StringKit; - -import java.io.Serializable; -import java.util.Locale; - -/** - * RFC2822日期字符串(JDK的Date对象toString默认格式)及HTTP消息日期解析,支持格式类似于; - *
- *   Tue Jun 4 16:25:15 +0800 2019
- *   Thu May 16 17:57:18 GMT+08:00 2019
- *   Wed Aug 01 00:00:00 CST 2012
- *   Thu, 28 Mar 2024 14:33:49 GMT
- * 
- * - * @author Kimi Liu - * @since Java 17+ - */ -public class RFC2822DateParser implements PredicateDateParser, Serializable { - - private static final long serialVersionUID = -1L; - - private static final String KEYWORDS_LOCALE_CHINA = "星期"; - - /** - * java.util.Date EEE MMM zzz 缩写数组 - */ - private static final String[] wtb = { - // 星期 - "sun", "mon", "tue", "wed", "thu", "fri", "sat", - // 月份 - "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec", - // 时间标准 - "gmt", "ut", "utc", "est", "edt", "cst", "cdt", "mst", "mdt", "pst", "pdt" - }; - - /** - * 单例对象 - */ - public static RFC2822DateParser INSTANCE = new RFC2822DateParser(); - - @Override - public boolean test(final CharSequence date) { - return StringKit.containsAnyIgnoreCase(date, wtb); - } - - @Override - public DateTime parse(final CharSequence source) { - if (StringKit.contains(source, Symbol.C_COMMA)) { - if (StringKit.contains(source, KEYWORDS_LOCALE_CHINA)) { - // 例如:星期四, 28 三月 2024 14:33:49 GMT - return new DateTime(source, FormatBuilder.getInstance(Fields.HTTP_DATETIME, Locale.CHINA)); - } - // 例如:Thu, 28 Mar 2024 14:33:49 GMT - return new DateTime(source, Formatter.HTTP_DATETIME_FORMAT); - } - - if (StringKit.contains(source, KEYWORDS_LOCALE_CHINA)) { - // 例如:星期四, 28 三月 2024 14:33:49 GMT - return new DateTime(source, FormatBuilder.getInstance(Fields.JDK_DATETIME, Locale.CHINA)); - } - // 例如:Thu 28 Mar 2024 14:33:49 GMT - return new DateTime(source, Formatter.JDK_DATETIME_FORMAT); - } - -} diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexDateParser.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexDateParser.java index c70c5b9385..3cdd5fb793 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexDateParser.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegexDateParser.java @@ -30,8 +30,10 @@ import org.miaixz.bus.core.center.date.builder.DateBuilder; import org.miaixz.bus.core.center.date.culture.en.Month; import org.miaixz.bus.core.center.date.culture.en.Week; +import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.Optional; import org.miaixz.bus.core.lang.exception.DateException; +import org.miaixz.bus.core.text.dfa.WordTree; import org.miaixz.bus.core.xyz.CharKit; import org.miaixz.bus.core.xyz.ListKit; import org.miaixz.bus.core.xyz.PatternKit; @@ -41,6 +43,7 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -55,25 +58,16 @@ public class RegexDateParser implements DateParser, Serializable { private static final long serialVersionUID = -1L; - private static final int[] NSS = {100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1}; - - - private final List pattern; - /** - * 构造 - * - * @param pattern 正则表达式 - */ - public RegexDateParser(final List pattern) { - this.pattern = pattern; - } + private static final int[] NSS = {100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1}; + private static final Pattern ZONE_OFFSET_PATTERN = Pattern.compile("[-+]\\d{1,2}:?(?:\\d{2})?"); + private static final WordTree ZONE_TREE = WordTree.of(TimeZone.getAvailableIDs()); /** * 根据给定的正则列表 * * @param regexes 正则列表,默认忽略大小写 - * @return RegexListDateParser + * @return this */ public static RegexDateParser of(final String... regexes) { final List patternList = new ArrayList<>(regexes.length); @@ -87,12 +81,33 @@ public static RegexDateParser of(final String... regexes) { * 根据给定的正则列表 * * @param patterns 正则列表 - * @return {@link RegexDateParser} + * @return this */ public static RegexDateParser of(final Pattern... patterns) { return new RegexDateParser(ListKit.of(patterns)); } + private final List patterns; + private boolean preferMonthFirst; + + /** + * 构造 + * + * @param patterns 正则列表 + */ + public RegexDateParser(final List patterns) { + this.patterns = patterns; + } + + /** + * 当用户传入的月和日无法判定默认位置时,设置默认的日期格式为dd/mm还是mm/dd + * + * @param preferMonthFirst {@code true}默认为mm/dd,否则dd/mm + */ + public void setPreferMonthFirst(final boolean preferMonthFirst) { + this.preferMonthFirst = preferMonthFirst; + } + /** * 新增自定义日期正则 * @@ -111,19 +126,31 @@ public RegexDateParser addRegex(final String regex) { * @return this */ public RegexDateParser addPattern(final Pattern pattern) { - this.pattern.add(pattern); + this.patterns.add(pattern); return this; } @Override public Date parse(final CharSequence source) throws DateException { + Assert.notBlank(source, "Date str must be not blank!"); + return parseToBuilder(source).toDate(); + } + + /** + * 解析日期 + * + * @param source 日期字符串 + * @return DateBuilder + * @throws DateException 日期解析异常 + */ + private DateBuilder parseToBuilder(final CharSequence source) throws DateException { final DateBuilder dateBuilder = DateBuilder.of(); Matcher matcher; - for (final Pattern pattern : this.pattern) { + for (final Pattern pattern : this.patterns) { matcher = pattern.matcher(source); if (matcher.matches()) { parse(matcher, dateBuilder); - return dateBuilder.toDate(); + return dateBuilder; } } @@ -136,7 +163,15 @@ public Date parse(final CharSequence source) throws DateException { * @param matcher 正则匹配器 * @throws DateException 日期解析异常 */ - private static void parse(final Matcher matcher, final DateBuilder dateBuilder) throws DateException { + private void parse(final Matcher matcher, final DateBuilder dateBuilder) throws DateException { + + // 纯数字格式 + final String number = PatternKit.group(matcher, "number"); + if (StringKit.isNotEmpty(number)) { + parseNumberDate(number, dateBuilder); + return; + } + // 毫秒时间戳 final String millisecond = PatternKit.group(matcher, "millisecond"); if (StringKit.isNotEmpty(millisecond)) { @@ -146,6 +181,8 @@ private static void parse(final Matcher matcher, final DateBuilder dateBuilder) // year Optional.ofNullable(PatternKit.group(matcher, "year")).ifPresent((year) -> dateBuilder.setYear(parseYear(year))); + // dayOrMonth, dd/mm or mm/dd + Optional.ofNullable(PatternKit.group(matcher, "dayOrMonth")).ifPresent((dayOrMonth) -> parseDayOrMonth(dayOrMonth, dateBuilder, preferMonthFirst)); // month Optional.ofNullable(PatternKit.group(matcher, "month")).ifPresent((month) -> dateBuilder.setMonth(parseMonth(month))); // week @@ -158,8 +195,8 @@ private static void parse(final Matcher matcher, final DateBuilder dateBuilder) Optional.ofNullable(PatternKit.group(matcher, "minute")).ifPresent((minute) -> dateBuilder.setMinute(parseNumberLimit(minute, 0, 59))); // second Optional.ofNullable(PatternKit.group(matcher, "second")).ifPresent((second) -> dateBuilder.setSecond(parseNumberLimit(second, 0, 59))); - // ns - Optional.ofNullable(PatternKit.group(matcher, "ns")).ifPresent((ns) -> dateBuilder.setNanosecond(parseNano(ns))); + // nanoseconds + Optional.ofNullable(PatternKit.group(matcher, "nanosecond")).ifPresent((ns) -> dateBuilder.setNanosecond(parseNano(ns))); // am or pm Optional.ofNullable(PatternKit.group(matcher, "m")).ifPresent((m) -> { if (CharKit.equals('p', m.charAt(0), true)) { @@ -172,26 +209,79 @@ private static void parse(final Matcher matcher, final DateBuilder dateBuilder) // zero zone offset Optional.ofNullable(PatternKit.group(matcher, "zero")).ifPresent((zero) -> { dateBuilder.setFlag(true); - dateBuilder.setOffset(0); + dateBuilder.setZoneOffset(0); + }); + + // zone(包括可时区名称、时区偏移等信息,综合解析) + Optional.ofNullable(PatternKit.group(matcher, "zone")).ifPresent((zoneOffset) -> { + parseZone(zoneOffset, dateBuilder); }); // zone offset Optional.ofNullable(PatternKit.group(matcher, "zoneOffset")).ifPresent((zoneOffset) -> { dateBuilder.setFlag(true); - dateBuilder.setOffset(parseZoneOffset(zoneOffset)); + dateBuilder.setZoneOffset(parseZoneOffset(zoneOffset)); }); - // zone name - Optional.ofNullable(PatternKit.group(matcher, "zoneName")).ifPresent((zoneOffset) -> { - // 暂时不支持解析 - }); - - // unix时间戳 + // unix时间戳,可能有NS Optional.ofNullable(PatternKit.group(matcher, "unixsecond")).ifPresent((unixsecond) -> { - dateBuilder.setTimestamp(parseLong(unixsecond)); + dateBuilder.setUnixsecond(parseLong(unixsecond)); }); } + /** + * 解析纯数字型的日期 + * + * @param number 纯数字 + * @param dateBuilder {@link DateBuilder} + */ + private static void parseNumberDate(final String number, final DateBuilder dateBuilder) { + final int length = number.length(); + switch (length) { + case 4: + // yyyy + dateBuilder.setYear(Integer.parseInt(number)); + break; + case 6: + // yyyyMM + dateBuilder.setYear(parseInt(number, 0, 4)); + dateBuilder.setMonth(parseInt(number, 4, 6)); + break; + case 8: + // yyyyMMdd + dateBuilder.setYear(parseInt(number, 0, 4)); + dateBuilder.setMonth(parseInt(number, 4, 6)); + dateBuilder.setDay(parseInt(number, 6, 8)); + break; + case 14: + dateBuilder.setYear(parseInt(number, 0, 4)); + dateBuilder.setMonth(parseInt(number, 4, 6)); + dateBuilder.setDay(parseInt(number, 6, 8)); + dateBuilder.setHour(parseInt(number, 8, 10)); + dateBuilder.setMinute(parseInt(number, 10, 12)); + dateBuilder.setSecond(parseInt(number, 12, 14)); + break; + case 10: + // unixtime(10) + dateBuilder.setUnixsecond(parseLong(number)); + break; + case 13: + // millisecond(13) + dateBuilder.setMillisecond(parseLong(number)); + break; + case 16: + // microsecond(16) + dateBuilder.setUnixsecond(parseLong(number.substring(0, 10))); + dateBuilder.setNanosecond(parseInt(number, 10, 16)); + break; + case 19: + // nanosecond(19) + dateBuilder.setUnixsecond(parseLong(number.substring(0, 10))); + dateBuilder.setNanosecond(parseInt(number, 10, 19)); + break; + } + } + private static int parseYear(final String year) { final int length = year.length(); switch (length) { @@ -205,6 +295,40 @@ private static int parseYear(final String year) { } } + /** + * 解析日期中的日或月,类似于dd/mm或mm/dd格式 + * + * @param dayOrMonth 日期中的日或月 + * @param dateBuilder {@link DateBuilder} + * @param preferMonthFirst 是否月份在前 + */ + private static void parseDayOrMonth(final String dayOrMonth, final DateBuilder dateBuilder, final boolean preferMonthFirst) { + final char next = dayOrMonth.charAt(1); + final int a; + final int b; + if (next < '0' || next > '9') { + // d/m + a = parseInt(dayOrMonth, 0, 1); + b = parseInt(dayOrMonth, 2, dayOrMonth.length()); + } else { + // dd/mm + a = parseInt(dayOrMonth, 0, 2); + b = parseInt(dayOrMonth, 3, dayOrMonth.length()); + } + + if (a > 31 || b > 31 || a == 0 || b == 0 || (a > 12 && b > 12)) { + throw new DateException("Invalid DayOrMonth : {}", dayOrMonth); + } + + if (b > 12 || (preferMonthFirst && a <= 12)) { + dateBuilder.setMonth(a); + dateBuilder.setDay(b); + } else { + dateBuilder.setMonth(b); + dateBuilder.setDay(a); + } + } + private static int parseMonth(final String month) { try { final int monthInt = Integer.parseInt(month); @@ -253,6 +377,29 @@ private static int parseNano(final String ns) { return NSS[ns.length() - 1] * Integer.parseInt(ns); } + /** + * 解析时区,包括时区偏移和时区名称 + * + * @param zone 时区 + * @param dateBuilder 日期时间对象 + */ + private static void parseZone(final String zone, final DateBuilder dateBuilder) { + // 检查是否直接定义了时区偏移 + final String zoneOffset = PatternKit.getGroup0(ZONE_OFFSET_PATTERN, zone); + if (StringKit.isNotBlank(zoneOffset)) { + dateBuilder.setFlag(true); + dateBuilder.setZoneOffset(parseZoneOffset(zoneOffset)); + return; + } + + // 检查是否定义了时区名称 + final String zoneName = ZONE_TREE.match(zone); + if (StringKit.isNotBlank(zoneName)) { + dateBuilder.setFlag(true); + dateBuilder.setZone(TimeZone.getTimeZone(zoneName)); + } + } + /** * 解析时区偏移,类似于'+08', '+8:00', '+08:00', '+0800' * diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegisterDateParser.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegisterDateParser.java index 4b5c3e51ac..400183f6e6 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegisterDateParser.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/RegisterDateParser.java @@ -55,19 +55,10 @@ public class RegisterDateParser implements DateParser, Serializable { */ public RegisterDateParser() { list = ListKit.of( - // 纯数字形式 - PureDateParser.INSTANCE, // HH:mm:ss 或者 HH:mm 时间格式匹配单独解析 TimeParser.INSTANCE, - // JDK的Date对象toString默认格式,类似于: - // Tue Jun 4 16:25:15 +0800 2019 - // Thu May 16 17:57:18 GMT+08:00 2019 - // Wed Aug 01 00:00:00 CST 2012 - RFC2822DateParser.INSTANCE, - // ISO8601标准时间 - // yyyy-MM-dd'T'HH:mm:ss'Z' - // yyyy-MM-dd'T'HH:mm:ss+0800 - ISO8601DateParser.INSTANCE + // 默认的正则解析器 + NormalDateParser.INSTANCE ); } @@ -88,7 +79,8 @@ public Date parse(final CharSequence source) throws DateException { * @return this */ public RegisterDateParser register(final PredicateDateParser parser) { - this.list.add(parser); + // 用户定义的规则优先 + this.list.add(0, parser); return this; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/convert/ArrayConverter.java b/bus-core/src/main/java/org/miaixz/bus/core/convert/ArrayConverter.java index 077f4fbc53..a8192ccba7 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/convert/ArrayConverter.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/convert/ArrayConverter.java @@ -29,11 +29,7 @@ import org.miaixz.bus.core.codec.binary.Base64; import org.miaixz.bus.core.lang.Symbol; -import org.miaixz.bus.core.text.CharsBacker; -import org.miaixz.bus.core.xyz.ArrayKit; -import org.miaixz.bus.core.xyz.ByteKit; -import org.miaixz.bus.core.xyz.ListKit; -import org.miaixz.bus.core.xyz.SerializeKit; +import org.miaixz.bus.core.xyz.*; import java.io.Serializable; import java.lang.reflect.Array; @@ -49,11 +45,13 @@ */ public class ArrayConverter extends AbstractConverter { + private static final long serialVersionUID = -1L; + /** * 单例 */ public static final ArrayConverter INSTANCE = new ArrayConverter(); - private static final long serialVersionUID = -1L; + /** * 是否忽略元素转换错误 */ @@ -127,7 +125,7 @@ private Object convertArrayToArray(final Class targetComponentType, final Obj * @param value 被转换值 * @return 转换后的数组 */ - private Object convertObjectToArray(final Class targetComponentType, final Object value) { + private Object convertObjectToArray(final Class targetComponentType, Object value) { if (value instanceof CharSequence) { if (targetComponentType == char.class || targetComponentType == Character.class) { return convertArrayToArray(targetComponentType, value.toString().toCharArray()); @@ -135,24 +133,54 @@ private Object convertObjectToArray(final Class targetComponentType, final Ob // 字符串转bytes,首先判断是否为Base64,是则转换,否则按照默认getBytes方法。 if (targetComponentType == byte.class) { - final String text = value.toString(); - if (Base64.isTypeBase64(text)) { + final String str = value.toString(); + if (Base64.isTypeBase64(str)) { return Base64.decode(value.toString()); } - return text.getBytes(); + return str.getBytes(); } // 单纯字符串情况下按照逗号分隔后劈开 - final String[] strings = CharsBacker.splitToArray(value.toString(), Symbol.COMMA); + final String[] strings = StringKit.splitToArray(value.toString(), Symbol.COMMA); return convertArrayToArray(targetComponentType, strings); } + if (value instanceof Iterator) { + value = IteratorKit.asIterable((Iterator) value); + } + + final Object result; + if (value instanceof Iterable) { + result = convertIterableToArray(targetComponentType, (Iterable) value); + } else if (value instanceof Number && byte.class == targetComponentType) { + // 用户可能想序列化指定对象 + result = ByteKit.toBytes((Number) value); + } else if (value instanceof Serializable && byte.class == targetComponentType) { + // 用户可能想序列化指定对象 + result = SerializeKit.serialize(value); + } else { + // everything else: + result = convertToSingleElementArray(targetComponentType, value); + } + + return result; + } + + /** + * 迭代器转数组 + * + * @param targetComponentType 目标单个节点类型 + * @param value 迭代器实现值 + * @return 数组 + */ + private Object convertIterableToArray(final Class targetComponentType, final Iterable value) { final Object result; if (value instanceof List) { // List转数组 final List list = (List) value; - result = Array.newInstance(targetComponentType, list.size()); - for (int i = 0; i < list.size(); i++) { + final int size = list.size(); + result = Array.newInstance(targetComponentType, size); + for (int i = 0; i < size; i++) { Array.set(result, i, convertComponentType(targetComponentType, list.get(i))); } } else if (value instanceof Collection) { @@ -165,31 +193,15 @@ private Object convertObjectToArray(final Class targetComponentType, final Ob Array.set(result, i, convertComponentType(targetComponentType, element)); i++; } - } else if (value instanceof Iterable) { - // 可循环对象转数组,可循环对象无法获取长度,因此先转为List后转为数组 - final List list = ListKit.of((Iterable) value); - result = Array.newInstance(targetComponentType, list.size()); - for (int i = 0; i < list.size(); i++) { - Array.set(result, i, convertComponentType(targetComponentType, list.get(i))); - } - } else if (value instanceof Iterator) { + } else { // 可循环对象转数组,可循环对象无法获取长度,因此先转为List后转为数组 - final List list = ListKit.of((Iterator) value); - result = Array.newInstance(targetComponentType, list.size()); - for (int i = 0; i < list.size(); i++) { + final List list = ListKit.of(value); + final int size = list.size(); + result = Array.newInstance(targetComponentType, size); + for (int i = 0; i < size; i++) { Array.set(result, i, convertComponentType(targetComponentType, list.get(i))); } - } else if (value instanceof Number && byte.class == targetComponentType) { - // 用户可能想序列化指定对象 - result = ByteKit.toBytes((Number) value); - } else if (value instanceof Serializable && byte.class == targetComponentType) { - // 用户可能想序列化指定对象 - result = SerializeKit.serialize(value); - } else { - // everything else: - result = convertToSingleElementArray(targetComponentType, value); } - return result; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/convert/CalendarConverter.java b/bus-core/src/main/java/org/miaixz/bus/core/convert/CalendarConverter.java index 6010f04fb9..2ddfce27e9 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/convert/CalendarConverter.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/convert/CalendarConverter.java @@ -27,7 +27,6 @@ */ package org.miaixz.bus.core.convert; -import org.miaixz.bus.core.xyz.DateKit; import org.miaixz.bus.core.xyz.StringKit; import javax.xml.datatype.XMLGregorianCalendar; @@ -71,21 +70,23 @@ public void setFormat(final String format) { protected Calendar convertInternal(final Class targetClass, final Object value) { // Handle Date if (value instanceof Date) { - return DateKit.calendar((Date) value); + return org.miaixz.bus.core.center.date.Calendar.calendar((Date) value); } // Handle Long if (value instanceof Long) { //此处使用自动拆装箱 - return DateKit.calendar((Long) value); + return org.miaixz.bus.core.center.date.Calendar.calendar((Long) value); } if (value instanceof XMLGregorianCalendar) { - return DateKit.calendar((XMLGregorianCalendar) value); + return org.miaixz.bus.core.center.date.Calendar.calendar((XMLGregorianCalendar) value); } final String valueStr = convertToString(value); - return DateKit.calendar(StringKit.isBlank(format) ? DateKit.parse(valueStr) : DateKit.parse(valueStr, format)); + return org.miaixz.bus.core.center.date.Calendar.calendar(StringKit.isBlank(format) ? + org.miaixz.bus.core.center.date.Calendar.parse(valueStr) : + org.miaixz.bus.core.center.date.Calendar.parse(valueStr, format)); } } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/convert/Converter.java b/bus-core/src/main/java/org/miaixz/bus/core/convert/Converter.java index 3938a15088..d02a979a27 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/convert/Converter.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/convert/Converter.java @@ -66,4 +66,13 @@ default T convert(final Type targetType, final Object value, final T default return (T) ObjectKit.defaultIfNull(convert(targetType, value), defaultValue); } + /** + * 返回原值的转换器,不做转换 + * + * @return this + */ + static Converter identity() { + return (targetType, value) -> value; + } + } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/convert/DateConverter.java b/bus-core/src/main/java/org/miaixz/bus/core/convert/DateConverter.java index d7b59ceb69..f5e8b1904d 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/convert/DateConverter.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/convert/DateConverter.java @@ -28,12 +28,14 @@ package org.miaixz.bus.core.convert; import org.miaixz.bus.core.center.date.DateTime; +import org.miaixz.bus.core.center.date.Resolver; import org.miaixz.bus.core.lang.exception.ConvertException; import org.miaixz.bus.core.xyz.DateKit; import org.miaixz.bus.core.xyz.StringKit; import java.time.temporal.TemporalAccessor; import java.util.Calendar; +import java.util.Date; /** * 日期转换器 @@ -43,11 +45,12 @@ */ public class DateConverter extends AbstractConverter { + private static final long serialVersionUID = -1L; + /** * 单例 */ public static final DateConverter INSTANCE = new DateConverter(); - private static final long serialVersionUID = -1L; /** * 日期格式化 */ @@ -101,11 +104,11 @@ protected java.util.Date convertInternal(final Class targetClass, final Objec } else { // 统一按照字符串处理 final String valueStr = convertToString(value); - final DateTime dateTime = StringKit.isBlank(this.format) // - ? DateKit.parse(valueStr) // - : DateKit.parse(valueStr, this.format); - if (null != dateTime) { - return wrap(targetClass, dateTime); + final Date date = StringKit.isBlank(this.format) // + ? Resolver.parse(valueStr) // + : Resolver.parse(valueStr, this.format); + if (null != date) { + return wrap(targetClass, date); } } @@ -118,12 +121,8 @@ protected java.util.Date convertInternal(final Class targetClass, final Objec * @param date Date * @return 目标类型对象 */ - private java.util.Date wrap(final Class targetClass, final DateTime date) { - // 返回指定类型 - if (java.util.Date.class == targetClass) { - return date.toJdkDate(); - } - if (DateTime.class == targetClass) { + private java.util.Date wrap(final Class targetClass, final Date date) { + if(targetClass == date.getClass()){ return date; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/convert/TemporalAccessorConverter.java b/bus-core/src/main/java/org/miaixz/bus/core/convert/TemporalAccessorConverter.java index 9354cb3d22..c8e36b029b 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/convert/TemporalAccessorConverter.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/convert/TemporalAccessorConverter.java @@ -62,8 +62,10 @@ */ public class TemporalAccessorConverter extends AbstractConverter { - public static final TemporalAccessorConverter INSTANCE = new TemporalAccessorConverter(); private static final long serialVersionUID = -1L; + + public static final TemporalAccessorConverter INSTANCE = new TemporalAccessorConverter(); + /** * 日期格式化 */ @@ -144,7 +146,7 @@ private TemporalAccessor parseFromCharSequence(final Class targetClass, final } final Instant instant; - final ZoneId zoneId; + ZoneId zoneId = null; if (null != this.format) { final DateTimeFormatter formatter = Resolver.ofPattern(this.format); final TemporalAccessor temporalAccessor = parseWithFormat(targetClass, value, formatter); @@ -155,9 +157,11 @@ private TemporalAccessor parseFromCharSequence(final Class targetClass, final instant = formatter.parse(value, Instant::from); zoneId = formatter.getZone(); } else { - final DateTime dateTime = DateKit.parse(value); - instant = Objects.requireNonNull(dateTime).toInstant(); - zoneId = dateTime.getZoneId(); + final Date date = Resolver.parse(value); + instant = Objects.requireNonNull(date).toInstant(); + if (date instanceof DateTime) { + zoneId = ((DateTime) date).getZoneId(); + } } return parseFromInstant(targetClass, instant, zoneId); } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlBuilder.java b/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlBuilder.java index 9a2f75380c..a926d79007 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlBuilder.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlBuilder.java @@ -54,11 +54,6 @@ public final class UrlBuilder implements Builder { private static final long serialVersionUID = -1L; - /** - * 是否需要编码`%` - * 区别对待,如果是,则生成URL时需要重新全部编码,否则跳过所有`%` - */ - private final boolean needEncodePercent; /** * 协议,例如http */ @@ -93,8 +88,6 @@ public final class UrlBuilder implements Builder { */ public UrlBuilder() { this.charset = Charset.UTF_8; - // 编码非空情况下做解码 - this.needEncodePercent = true; } /** @@ -116,8 +109,6 @@ public UrlBuilder(final String scheme, final String host, final int port, final this.path = path; this.query = query; this.setFragment(fragment); - // 编码非空情况下做解码 - this.needEncodePercent = null != charset; } /** @@ -165,9 +156,14 @@ public static UrlBuilder ofHttp(final String httpUrl) { /** * 使用URL字符串构建UrlBuilder,当传入的URL没有协议时,按照http协议对待。 + *
    + *
  • 如果url用户传入的URL没有做编码,则charset设置为{@code null},此时URL不会解码,在build时也不会编码。
  • + *
  • 如果url已经编码,或部分编码,则需要设置charset,此时URL会解码编码后的参数,在build时也会编码。
  • + *
  • 如果url未编码,且存在歧义字符串,则需要设置charset为{@code null},并调用{@link #setCharset(java.nio.charset.Charset)}在build时编码URL。
  • + *
* * @param httpUrl URL字符串 - * @param charset 编码,用于URLEncode和URLDecode + * @param charset 编码,用于URLEncode和URLDecode,如果为{@code null},则不对传入的URL解码 * @return UrlBuilder */ public static UrlBuilder ofHttp(String httpUrl, final java.nio.charset.Charset charset) { @@ -193,11 +189,12 @@ public static UrlBuilder of(final String url) { } /** - * 使用URL字符串构建UrlBuilder - * - * @param url URL字符串 - * @param charset 编码,用于URLEncode和URLDecode - * @return UrlBuilder + * 使用URL字符串构建UrlBuilder,规则如下: + *
    + *
  • 如果url用户传入的URL没有做编码,则charset设置为{@code null},此时URL不会解码,在build时也不会编码。
  • + *
  • 如果url已经编码,或部分编码,则需要设置charset,此时URL会解码编码后的参数,在build时也会编码。
  • + *
  • 如果url未编码,且存在歧义字符串,则需要设置charset为{@code null},并调用{@link #setCharset(java.nio.charset.Charset)}在build时编码URL。
  • + *
*/ public static UrlBuilder of(final String url, final java.nio.charset.Charset charset) { Assert.notBlank(url, "Url must be not blank!"); @@ -208,7 +205,7 @@ public static UrlBuilder of(final String url, final java.nio.charset.Charset cha * 使用URL构建UrlBuilder * * @param url URL - * @param charset 编码,用于URLEncode和URLDecode + * @param charset 编码,用于URLEncode和URLDecode,{@code null}表示不解码 * @return UrlBuilder */ public static UrlBuilder of(final URL url, final java.nio.charset.Charset charset) { @@ -376,7 +373,7 @@ public UrlBuilder setPath(final UrlPath path) { * @return 路径,例如/aa/bb/cc */ public String getPaths() { - return null == this.path ? Symbol.SLASH : this.path.build(charset, this.needEncodePercent); + return null == this.path ? Symbol.SLASH : this.path.build(charset); } /** @@ -449,7 +446,7 @@ public UrlBuilder setQuery(final UrlQuery query) { * @return 查询语句,例如a=1&b=2 */ public String getQuerys() { - return null == this.query ? null : this.query.build(this.charset, this.needEncodePercent); + return null == this.query ? null : this.query.build(this.charset); } /** @@ -500,8 +497,7 @@ public UrlBuilder setFragment(final String fragment) { * @return 标识符,例如#后边的部分 */ public String getFragmentEncoded() { - final char[] safeChars = this.needEncodePercent ? null : new char[]{Symbol.C_PERCENT}; - return RFC3986.FRAGMENT.encode(this.fragment, this.charset, safeChars); + return RFC3986.FRAGMENT.encode(this.fragment, this.charset); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlDecoder.java b/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlDecoder.java index 1f7030d772..88f1aa70ea 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlDecoder.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlDecoder.java @@ -65,7 +65,7 @@ public class UrlDecoder implements Serializable { * * * @param text 包含URL编码后的字符串 - * @param charset 编码 + * @param charset 解码的编码,{@code null}表示不做解码 * @return 解码后的字符串 */ public static String decodeForPath(final String text, final java.nio.charset.Charset charset) { @@ -207,7 +207,7 @@ public static String decode(final String text, final boolean isPlusToSpace) { * * @param text 包含URL编码后的字符串 * @param isPlusToSpace 是否+转换为空格 - * @param charset 编码,{@code null}表示不做编码 + * @param charset 编码,{@code null}表示不做解码 * @return 解码后的字符串 */ public static String decode(final String text, final java.nio.charset.Charset charset, final boolean isPlusToSpace) { diff --git a/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlPath.java b/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlPath.java index a832279ad7..73b47a2dce 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlPath.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlPath.java @@ -171,19 +171,6 @@ public UrlPath parse(CharSequence path, final Charset charset) { return this; } - /** - * 构建path,前面带'/' - *
-     *     path = path-abempty / path-absolute / path-noscheme / path-rootless / path-empty
-     * 
- * - * @param charset encode编码,null表示不做encode - * @return 如果没有任何内容,则返回空字符串"" - */ - public String build(final Charset charset) { - return build(charset, true); - } - /** * 构建path,前面带'/' *
@@ -191,26 +178,19 @@ public String build(final Charset charset) {
      * 
* * @param charset encode编码,null表示不做encode - * @param encodePercent 是否编码`%` * @return 如果没有任何内容,则返回空字符串"" */ - public String build(final Charset charset, final boolean encodePercent) { + public String build(final Charset charset) { if (CollKit.isEmpty(this.segments)) { // 没有节点的path取决于是否末尾追加/,如果不追加返回空串,否则返回/ return withEngTag ? Symbol.SLASH : Normal.EMPTY; } - final char[] safeChars = encodePercent ? null : new char[]{Symbol.C_PERCENT}; final StringBuilder builder = new StringBuilder(); for (final String segment : segments) { - if (builder.length() == 0) { - // 根据https://www.ietf.org/rfc/rfc3986.html#section-3.3定义 - // path的第一部分不允许有":",其余部分允许 - // 在此处的Path部分特指host之后的部分,即不包含第一部分 - builder.append(Symbol.C_SLASH).append(RFC3986.SEGMENT_NZ_NC.encode(segment, charset, safeChars)); - } else { - builder.append(Symbol.C_SLASH).append(RFC3986.SEGMENT.encode(segment, charset, safeChars)); - } + // https://www.ietf.org/rfc/rfc3986.html#section-3.3 + // 此处Path中是允许有`:`的,之前理解有误,应该是相对URI的第一个segment中不允许有`:` + builder.append(Symbol.C_SLASH).append(RFC3986.SEGMENT.encode(segment, charset)); } if (withEngTag) { diff --git a/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlQuery.java b/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlQuery.java index 809d622a76..3377be7f45 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlQuery.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/net/url/UrlQuery.java @@ -83,37 +83,37 @@ public UrlQuery(final Map queryMap, final EncodeMode /** * 构建UrlQuery * - * @param queryStr 初始化的查询字符串 + * @param query 初始化的查询字符串 * @param charset decode用的编码,null表示不做decode * @return UrlQuery */ - public static UrlQuery of(final String queryStr, final Charset charset) { - return of(queryStr, charset, true); + public static UrlQuery of(final String query, final Charset charset) { + return of(query, charset, true); } /** * 构建UrlQuery * - * @param queryStr 初始化的查询字符串 + * @param query 初始化的查询字符串 * @param charset decode用的编码,null表示不做decode * @param autoRemovePath 是否自动去除path部分,{@code true}则自动去除第一个?前的内容 * @return UrlQuery */ - public static UrlQuery of(final String queryStr, final Charset charset, final boolean autoRemovePath) { - return of(queryStr, charset, autoRemovePath, null); + public static UrlQuery of(final String query, final Charset charset, final boolean autoRemovePath) { + return of(query, charset, autoRemovePath, null); } /** * 构建UrlQuery * - * @param queryStr 初始化的查询字符串 + * @param query 初始化的查询字符串 * @param charset decode用的编码,null表示不做decode * @param autoRemovePath 是否自动去除path部分,{@code true}则自动去除第一个?前的内容 * @param encodeMode 编码模式。 * @return UrlQuery */ - public static UrlQuery of(final String queryStr, final Charset charset, final boolean autoRemovePath, final EncodeMode encodeMode) { - return of(encodeMode).parse(queryStr, charset, autoRemovePath); + public static UrlQuery of(final String query, final Charset charset, final boolean autoRemovePath, final EncodeMode encodeMode) { + return of(encodeMode).parse(query, charset, autoRemovePath); } /** @@ -214,39 +214,39 @@ public UrlQuery addAll(final Map queryMap) { /** * 解析URL中的查询字符串 * - * @param queryStr 查询字符串,类似于key1=v1&key2=&key3=v3 + * @param query 查询字符串,类似于key1=v1&key2=&key3=v3 * @param charset decode编码,null表示不做decode * @return this */ - public UrlQuery parse(final String queryStr, final Charset charset) { - return parse(queryStr, charset, true); + public UrlQuery parse(final String query, final Charset charset) { + return parse(query, charset, true); } /** * 解析URL中的查询字符串 * - * @param queryStr 查询字符串,类似于key1=v1&key2=&key3=v3 + * @param query 查询字符串,类似于key1=v1&key2=&key3=v3 * @param charset decode编码,null表示不做decode * @param autoRemovePath 是否自动去除path部分,{@code true}则自动去除第一个?前的内容 * @return this */ - public UrlQuery parse(String queryStr, final Charset charset, final boolean autoRemovePath) { - if (StringKit.isBlank(queryStr)) { + public UrlQuery parse(String query, final Charset charset, final boolean autoRemovePath) { + if (StringKit.isBlank(query)) { return this; } if (autoRemovePath) { // 去掉Path部分 - final int pathEndPos = queryStr.indexOf(Symbol.C_QUESTION_MARK); + final int pathEndPos = query.indexOf(Symbol.C_QUESTION_MARK); if (pathEndPos > -1) { - queryStr = StringKit.subSuf(queryStr, pathEndPos + 1); - if (StringKit.isBlank(queryStr)) { + query = StringKit.subSuf(query, pathEndPos + 1); + if (StringKit.isBlank(query)) { return this; } } } - return doParse(queryStr, charset); + return doParse(query, charset); } /** @@ -271,21 +271,6 @@ public CharSequence get(final CharSequence key) { return this.query.get(key); } - /** - * 构建URL查询字符串,即将key-value键值对转换为{@code key1=v1&key2=v2&key3=v3}形式。 - * 对于{@code null}处理规则如下: - *
    - *
  • 如果key为{@code null},则这个键值对忽略
  • - *
  • 如果value为{@code null},只保留key,如key1对应value为{@code null}生成类似于{@code key1&key2=v2}形式
  • - *
- * - * @param charset encode编码,null表示不做encode编码 - * @return URL查询字符串 - */ - public String build(final Charset charset) { - return build(charset, null != charset); - } - /** * 构建URL查询字符串,即将key-value键值对转换为{@code key1=v1&key2=v2&key3=v3}形式。 * 对于{@code null}处理规则如下: @@ -295,37 +280,19 @@ public String build(final Charset charset) { * * * @param charset encode编码,null表示不做encode编码 - * @param encodePercent 是否编码`%` * @return URL查询字符串 */ - public String build(final Charset charset, final boolean encodePercent) { + public String build(final Charset charset) { switch (this.encodeMode) { case FORM_URL_ENCODED: - return build(ALL, ALL, charset, encodePercent); + return build(ALL, ALL, charset); case STRICT: - return build(RFC3986.QUERY_PARAM_NAME_STRICT, RFC3986.QUERY_PARAM_VALUE_STRICT, charset, encodePercent); + return build(RFC3986.QUERY_PARAM_NAME_STRICT, RFC3986.QUERY_PARAM_VALUE_STRICT, charset); default: - return build(RFC3986.QUERY_PARAM_NAME, RFC3986.QUERY_PARAM_VALUE, charset, encodePercent); + return build(RFC3986.QUERY_PARAM_NAME, RFC3986.QUERY_PARAM_VALUE, charset); } } - /** - * 构建URL查询字符串,即将key-value键值对转换为{@code key1=v1&key2=v2&key3=v3}形式。 - * 对于{@code null}处理规则如下: - *
    - *
  • 如果key为{@code null},则这个键值对忽略
  • - *
  • 如果value为{@code null},只保留key,如key1对应value为{@code null}生成类似于{@code key1&key2=v2}形式
  • - *
- * - * @param keyCoder 键值对中键的编码器 - * @param valueCoder 键值对中值的编码器 - * @param charset encode编码,null表示不做encode编码 - * @return URL查询字符串 - */ - public String build(final PercentCodec keyCoder, final PercentCodec valueCoder, final Charset charset) { - return build(keyCoder, valueCoder, charset, true); - } - /** * 构建URL查询字符串,即将key-value键值对转换为{@code key1=v1&key2=v2&key3=v3}形式。 * 对于{@code null}处理规则如下: @@ -337,16 +304,14 @@ public String build(final PercentCodec keyCoder, final PercentCodec valueCoder, * @param keyCoder 键值对中键的编码器 * @param valueCoder 键值对中值的编码器 * @param charset encode编码,null表示不做encode编码 - * @param encodePercent 是否编码`%` * @return URL查询字符串 */ public String build(final PercentCodec keyCoder, final PercentCodec valueCoder, - final Charset charset, final boolean encodePercent) { + final Charset charset) { if (MapKit.isEmpty(this.query)) { return Normal.EMPTY; } - final char[] safeChars = encodePercent ? null : new char[]{Symbol.C_PERCENT}; final StringBuilder sb = new StringBuilder(); CharSequence name; CharSequence value; @@ -356,10 +321,10 @@ public String build(final PercentCodec keyCoder, final PercentCodec valueCoder, if (sb.length() > 0) { sb.append(Symbol.AND); } - sb.append(keyCoder.encode(name, charset, safeChars)); + sb.append(keyCoder.encode(name, charset)); value = entry.getValue(); if (null != value) { - sb.append(Symbol.EQUAL).append(valueCoder.encode(value, charset, safeChars)); + sb.append("=").append(valueCoder.encode(value, charset)); } } } @@ -381,32 +346,32 @@ public String toString() { * 解析URL中的查询字符串 * 规则见:https://url.spec.whatwg.org/#urlencoded-parsing * - * @param queryStr 查询字符串,类似于key1=v1&key2=&key3=v3 + * @param query 查询字符串,类似于key1=v1&key2=&key3=v3 * @param charset decode编码,null表示不做decode * @return this */ - private UrlQuery doParse(final String queryStr, final Charset charset) { - final int len = queryStr.length(); + private UrlQuery doParse(final String query, final Charset charset) { + final int len = query.length(); String name = null; int pos = 0; // 未处理字符开始位置 int i; // 未处理字符结束位置 char c; // 当前字符 for (i = 0; i < len; i++) { - c = queryStr.charAt(i); + c = query.charAt(i); switch (c) { case Symbol.C_EQUAL://键和值的分界符 if (null == name) { // name可以是"" - name = queryStr.substring(pos, i); + name = query.substring(pos, i); // 开始位置从分节符后开始 pos = i + 1; } // 当=不作为分界符时,按照普通字符对待 break; case Symbol.C_AND: //键值对之间的分界符 - addParam(name, queryStr.substring(pos, i), charset); + addParam(name, query.substring(pos, i), charset); name = null; - if (i + 4 < len && "amp;".equals(queryStr.substring(i + 1, i + 5))) { + if (i + 4 < len && "amp;".equals(query.substring(i + 1, i + 5))) { // "&"转义为"&" i += 4; } @@ -417,7 +382,7 @@ private UrlQuery doParse(final String queryStr, final Charset charset) { } // 处理结尾 - addParam(name, queryStr.substring(pos, i), charset); + addParam(name, query.substring(pos, i), charset); return this; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/text/dfa/WordTree.java b/bus-core/src/main/java/org/miaixz/bus/core/text/dfa/WordTree.java index 27cf866ea6..b4c329aa70 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/text/dfa/WordTree.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/text/dfa/WordTree.java @@ -83,6 +83,20 @@ public WordTree(final int initialCapacity) { super((int) (initialCapacity / Normal.DEFAULT_LOAD_FACTOR) + 1); } + /** + * 通过预定义的关键词构造单词树 + * + * @param words 初始关键词 + * @return this + */ + public static WordTree of(final String... words) { + final WordTree wordTree = new WordTree(words.length); + for (final String word : words) { + wordTree.addWord(word); + } + return wordTree; + } + /** * 设置字符过滤规则,通过定义字符串过滤规则,过滤不需要的字符 * 当accept为false时,此字符不参与匹配 @@ -362,7 +376,7 @@ public List flatten() { private Iterable innerFlatten(Entry entry) { List list = EasyStream.of(entry.getValue().entrySet()).flat(this::innerFlatten).map(v -> entry.getKey() + v).toList(); if (list.isEmpty()) { - return EasyStream.of(entry.getKey().toString()); + return EasyStream.of(StringKit.toStringOrNull(entry.getKey())); } return list; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ArrayKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ArrayKit.java index f98a27320e..82ebc12606 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ArrayKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ArrayKit.java @@ -54,52 +54,40 @@ public class ArrayKit extends PrimitiveArray { /** * 转为数组,如果values为数组,返回,否则返回一个只有values一个元素的数组 - * - * @param 数组类型 - * @param values 元素值 - * @return 数组 - */ - public static A ofArray(final Object values) { - return ofArray(values, null); - } - - /** - * 转为数组,如果values为数组,返回,否则返回一个只有values一个元素的数组 + * 注意:values的元素类型或其本身类型必须和提供的elementType完全一致 * * @param 数组类型 * @param values 元素值 * @param elementType 数组元素类型,{@code null}表示使用values的类型 * @return 数组 */ - public static A ofArray(final Object values, final Class elementType) { + public static A castOrWrapSingle(final Object values, final Class elementType) { if (isArray(values)) { return (A) values; } - // 插入单个元素 - final Object newInstance = Array.newInstance( - null == elementType ? values.getClass() : elementType, 1); - Array.set(newInstance, 0, values); - return (A) newInstance; + return wrapSingle(values, elementType); } /** - * 将集合转为数组 + * 包装单一元素为数组 * - * @param 数组元素类型 - * @param iterator {@link Iterator} - * @param componentType 集合元素类型 + * @param 数组类型 + * @param value 元素值 + * @param elementType 数组元素类型,{@code null}表示使用value的类型 * @return 数组 */ - public static T[] ofArray(final Iterator iterator, final Class componentType) { - if (null == iterator) { - return newArray(componentType, 0); - } - return ListKit.of(iterator).toArray(newArray(componentType, 0)); + public static A wrapSingle(final Object value, final Class elementType) { + // 插入单个元素 + final Object newInstance = Array.newInstance( + null == elementType ? value.getClass() : elementType, 1); + Array.set(newInstance, 0, value); + return (A) newInstance; } + /** - * 将集合转为数组 + * 将集合转为数组,如果集合为{@code null},则返回空的数组(元素个数为0) * * @param 数组元素类型 * @param iterable {@link Iterable} @@ -107,7 +95,26 @@ public static T[] ofArray(final Iterator iterator, final Class compone * @return 数组 */ public static T[] ofArray(final Iterable iterable, final Class componentType) { - return ofArray(IteratorKit.getIter(iterable), componentType); + if (null == iterable) { + return newArray(componentType, 0); + } + + if (iterable instanceof List) { + // List + return ((List) iterable).toArray(newArray(componentType, 0)); + } else if (iterable instanceof Collection) { + // 其它集合 + final int size = ((Collection) iterable).size(); + final T[] result = newArray(componentType, size); + int i = 0; + for (final T element : iterable) { + result[i] = element; + i++; + } + } + + // 自定义Iterable转为List处理 + return ListKit.of(iterable.iterator()).toArray(newArray(componentType, 0)); } /** @@ -609,7 +616,7 @@ public static A append(final A array, final T... newElements) { */ public static T[] setOrAppend(final T[] array, final int index, final T value) { if (isEmpty(array)) { - return ofArray(value, null == array ? null : array.getClass().getComponentType()); + return wrapSingle(value, null == array ? null : array.getClass().getComponentType()); } return ArrayWrapper.of(array).setOrAppend(index, value).getRaw(); } @@ -625,7 +632,7 @@ public static T[] setOrAppend(final T[] array, final int index, final T valu */ public static A setOrAppend(final A array, final int index, final Object value) { if (isEmpty(array)) { - return ofArray(value, null == array ? null : array.getClass().getComponentType()); + return wrapSingle(value, null == array ? null : array.getClass().getComponentType()); } return ArrayWrapper.of(array).setOrAppend(index, value).getRaw(); } @@ -641,7 +648,7 @@ public static A setOrAppend(final A array, final int index, final Object val */ public static A setOrPadding(final A array, final int index, final Object value) { if (index == 0 && isEmpty(array)) { - return ofArray(value, null == array ? null : array.getClass().getComponentType()); + return wrapSingle(value, null == array ? null : array.getClass().getComponentType()); } return ArrayWrapper.of(array).setOrPadding(index, value).getRaw(); } @@ -659,7 +666,7 @@ public static A setOrPadding(final A array, final int index, final Object va */ public static A setOrPadding(final A array, final int index, final E value, final E paddingValue) { if (index == 0 && isEmpty(array)) { - return ofArray(value, null == array ? null : array.getClass().getComponentType()); + return wrapSingle(value, null == array ? null : array.getClass().getComponentType()); } return ArrayWrapper.of(array).setOrPadding(index, value, paddingValue).getRaw(); } @@ -710,16 +717,16 @@ public static T[] addAll(final T[]... arrays) { * * * @param 数组元素类型 - * @param buffer 已有数组 + * @param array 已有数组 * @param index 位置 * @param values 新值 * @return 新数组或原有数组 */ - public static T[] replace(final T[] buffer, final int index, final T... values) { - if (isEmpty(buffer)) { + public static T[] replace(final T[] array, final int index, final T... values) { + if (isEmpty(array)) { return values; } - return ArrayWrapper.of(buffer).replace(index, values).getRaw(); + return ArrayWrapper.of(array).replace(index, values).getRaw(); } /** @@ -739,7 +746,7 @@ public static T[] replace(final T[] buffer, final int index, final T... valu */ public static A replace(final A array, final int index, final A values) { if (isEmpty(array)) { - return ofArray(values, null == array ? null : array.getClass().getComponentType()); + return castOrWrapSingle(values, null == array ? null : array.getClass().getComponentType()); } return ArrayWrapper.of(array).replace(index, values).getRaw(); } @@ -765,15 +772,15 @@ public static T[] insert(final T[] buffer, final int index, final T... newEl * 如果插入位置为负数,从原数组从后向前计数,若大于原数组长度,则空白处用默认值填充 * * @param 数组类型 - * @param 数组元素类型 + * @param 数组元素类型 * @param array 已有数组,可以为原始类型数组 * @param index 插入位置,此位置为对应此位置元素之前的空档 * @param newElements 新元素 * @return 新数组 */ @SafeVarargs - public static A insert(final A array, final int index, final T... newElements) { - return ArrayWrapper.of(array).insert(index, newElements).getRaw(); + public static A insert(final A array, final int index, final E... newElements) { + return ArrayWrapper.of(array).insertArray(index, (A) newElements).getRaw(); } /** @@ -1675,26 +1682,7 @@ public static T[] distinct(final T[] array, final Function uniqueGe * 按照指定规则,将一种类型的数组转换为另一种类型 * * @param array 被转换的数组 - * @param targetComponentType 目标的元素类型 - * @param func 转换规则函数 - * @param 原数组类型 - * @param 目标数组类型 - * @return 转换后的数组 - */ - public static R[] map(final T[] array, final Class targetComponentType, final Function func) { - final int length = length(array); - final R[] result = newArray(targetComponentType, length); - for (int i = 0; i < length; i++) { - result[i] = func.apply(array[i]); - } - return result; - } - - /** - * 按照指定规则,将一种类型的数组转换为另一种类型 - * - * @param array 被转换的数组 - * @param targetComponentType 目标的元素类型 + * @param targetComponentType 标的元素类型,只能为包装类型 * @param func 转换规则函数 * @param 原数组类型 * @param 目标数组类型 @@ -1718,7 +1706,7 @@ public static R[] map(final Object array, final Class targetComponentT * @param 目标数组类型 * @return 列表 */ - public static List map(final T[] array, final Function func) { + public static List mapToList(final T[] array, final Function func) { return Arrays.stream(array).map(func).collect(Collectors.toList()); } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/BeanKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/BeanKit.java index 7953c61cb6..2ceba9dd77 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/BeanKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/BeanKit.java @@ -361,12 +361,12 @@ public static T fillBeanWithMap(final Map map, final T bean, final Cop */ public static Map beanToMap(final Object bean, final String... properties) { int mapSize = 16; - UnaryOperator> editor = null; + UnaryOperator> editor = null; if (ArrayKit.isNotEmpty(properties)) { mapSize = properties.length; final Set propertiesSet = SetKit.of(properties); editor = entry -> { - final String key = entry.getKey(); + final String key = StringKit.toStringOrNull(entry.getKey()); entry.setKey(propertiesSet.contains(key) ? key : null); return entry; }; @@ -400,13 +400,14 @@ public static Map beanToMap(final Object bean, final boolean isT * @param ignoreNullValue 是否忽略值为空的字段 * @return Map */ - public static Map beanToMap(final Object bean, final Map targetMap, final boolean isToUnderlineCase, final boolean ignoreNullValue) { + public static Map beanToMap(final Object bean, final Map targetMap, + final boolean isToUnderlineCase, final boolean ignoreNullValue) { if (null == bean) { return null; } return beanToMap(bean, targetMap, ignoreNullValue, entry -> { - final String key = entry.getKey(); + final String key = StringKit.toStringOrNull(entry.getKey()); entry.setKey(isToUnderlineCase ? StringKit.toUnderlineCase(key) : key); return entry; }); @@ -428,8 +429,10 @@ public static Map beanToMap(final Object bean, final Map beanToMap(final Object bean, final Map targetMap, - final boolean ignoreNullValue, final UnaryOperator> keyEditor) { + public static Map beanToMap(final Object bean, + final Map targetMap, + final boolean ignoreNullValue, + final UnaryOperator> keyEditor) { if (null == bean) { return null; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/DateKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/DateKit.java index 1c5e63f7fe..8af5224197 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/DateKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/DateKit.java @@ -35,13 +35,10 @@ import org.miaixz.bus.core.center.date.format.CustomFormat; import org.miaixz.bus.core.center.date.format.FormatBuilder; import org.miaixz.bus.core.center.date.format.FormatPeriod; -import org.miaixz.bus.core.center.date.format.parser.NormalDateParser; -import org.miaixz.bus.core.center.date.format.parser.RegisterDateParser; import org.miaixz.bus.core.center.date.printer.FormatPrinter; import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.Fields; import org.miaixz.bus.core.lang.Symbol; -import org.miaixz.bus.core.lang.exception.DateException; import org.miaixz.bus.core.text.CharsBacker; import javax.xml.datatype.XMLGregorianCalendar; @@ -741,59 +738,6 @@ public static String formatChineseDate(final Date date, final boolean isUppercas return Calendar.formatChineseDate(Calendar.calendar(date), withTime); } - /** - * 将日期字符串转换为{@link DateTime}对象,格式: - *
    - *
  1. yyyy-MM-dd HH:mm:ss
  2. - *
  3. yyyy/MM/dd HH:mm:ss
  4. - *
  5. yyyy.MM.dd HH:mm:ss
  6. - *
  7. yyyy年MM月dd日 HH时mm分ss秒
  8. - *
  9. yyyy-MM-dd
  10. - *
  11. yyyy/MM/dd
  12. - *
  13. yyyy.MM.dd
  14. - *
  15. HH:mm:ss
  16. - *
  17. HH时mm分ss秒
  18. - *
  19. yyyy-MM-dd HH:mm
  20. - *
  21. yyyy-MM-dd HH:mm:ss.SSS
  22. - *
  23. yyyy-MM-dd HH:mm:ss.SSSSSS
  24. - *
  25. yyyyMMddHHmmss
  26. - *
  27. yyyyMMddHHmmssSSS
  28. - *
  29. yyyyMMdd
  30. - *
  31. EEE, dd MMM yyyy HH:mm:ss z
  32. - *
  33. EEE MMM dd HH:mm:ss zzz yyyy
  34. - *
  35. yyyy-MM-dd'T'HH:mm:ss'Z'
  36. - *
  37. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
  38. - *
  39. yyyy-MM-dd'T'HH:mm:ssZ
  40. - *
  41. yyyy-MM-dd'T'HH:mm:ss.SSSZ
  42. - *
- * - * @param dateCharSequence 日期字符串 - * @return 日期 - */ - public static DateTime parse(final CharSequence dateCharSequence) { - if (StringKit.isBlank(dateCharSequence)) { - return null; - } - String date = dateCharSequence.toString(); - // 去掉两边空格并去掉中文日期中的“日”和“秒”,以规范长度 - date = StringKit.removeAll(date.trim(), '日', '秒'); - - final Date result = RegisterDateParser.INSTANCE.parse(date); - if (null != result) { - return date(result); - } - - //标准日期格式(包括单个数字的日期时间) - date = normalize(date); - - if (NormalDateParser.INSTANCE.test(date)) { - return NormalDateParser.INSTANCE.parse(date); - } - - // 没有更多匹配的时间格式 - throw new DateException("No format fit for date String [{}] !", date); - } - /** * 修改日期为某个时间字段起始时间 * @@ -1678,6 +1622,16 @@ public static double nanosToSeconds(final long duration) { return duration / 1_000_000_000.0; } + /** + * 转换为Calendar对象 + * + * @param date 日期对象 + * @return Calendar对象 + */ + public static java.util.Calendar toCalendar(final Date date) { + return Calendar.calendar(date); + } + /** * Date对象转换为{@link Instant}对象 * diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/FieldKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/FieldKit.java index 3bc9de84d4..bf7a116cef 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/FieldKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/FieldKit.java @@ -283,7 +283,7 @@ public static Object[] getFieldsValue(final Object obj, final Predicate f if (null != obj) { final Field[] fields = getFields(obj instanceof Class ? (Class) obj : obj.getClass(), filter); if (null != fields) { - return ArrayKit.map(fields, Object.class, field -> getFieldValue(obj, field)); + return ArrayKit.mapToArray(fields, field -> getFieldValue(obj, field), Object[]::new); } } return null; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java index 087f6702f9..80b39fabd6 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java @@ -711,6 +711,37 @@ public static void clean(final File directory) throws InternalException { clean(directory.toPath()); } + /** + * 清理空文件夹 + * 此方法用于递归删除空的文件夹,不删除文件 + * 如果传入的文件夹本身就是空的,删除这个文件夹 + * + * @param directory 文件夹 + * @return the true/false + */ + public static boolean cleanEmpty(final File directory) { + if (directory == null || false == directory.exists() || false == directory.isDirectory()) { + return true; + } + + final File[] files = directory.listFiles(); + if (ArrayKit.isEmpty(files)) { + // 空文件夹则删除之 + return directory.delete(); + } + + for (final File childFile : files) { + cleanEmpty(childFile); + } + + // 当前目录清除完毕,需要再次判断当前文件夹,空文件夹则删除之 + final String[] fileNames = directory.list(); + if (ArrayKit.isEmpty(fileNames)) { + return directory.delete(); + } + return true; + } + /** * 创建文件夹,如果存在直接返回此文件夹 * 此方法不对File对象类型做判断,如果File不存在,无法判断其类型 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/IteratorKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/IteratorKit.java index 2abdfa279b..8f1caefa8a 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/IteratorKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/IteratorKit.java @@ -445,7 +445,7 @@ public static Map> toListMap(Map> resultMap, fin * @return HashMap */ public static Map toMap(final Iterable iterable, final Function keyMapper) { - return toMap(iterable, keyMapper, v -> v); + return toMap(iterable, keyMapper, Function.identity()); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ZoneKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ZoneKit.java index 14efa91517..8088ed417a 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ZoneKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ZoneKit.java @@ -29,6 +29,7 @@ import java.time.ZoneId; import java.util.TimeZone; +import java.util.concurrent.TimeUnit; /** * {@link ZoneId}和{@link TimeZone}相关封装 @@ -75,4 +76,29 @@ public static ZoneId toZoneId(final TimeZone timeZone) { return timeZone.toZoneId(); } + /** + * 获取指定偏移量的可用时区,如果有多个时区匹配,使用第一个 + * + * @param rawOffset 偏移量 + * @param timeUnit 偏移量单位 + * @return 时区 + */ + public static TimeZone getTimeZoneByOffset(final int rawOffset, final TimeUnit timeUnit) { + final String id = getAvailableID(rawOffset, timeUnit); + return null == id ? null : TimeZone.getTimeZone(id); + } + + /** + * 获取指定偏移量的可用时区ID,如果有多个时区匹配,使用第一个 + * + * @param rawOffset 偏移量 + * @param timeUnit 偏移量单位 + * @return 时区ID,未找到返回{@code null} + */ + public static String getAvailableID(final int rawOffset, final TimeUnit timeUnit) { + final String[] availableIDs = TimeZone.getAvailableIDs( + (int) ObjectKit.defaultIfNull(timeUnit, TimeUnit.MILLISECONDS).toMillis(rawOffset)); + return ArrayKit.isEmpty(availableIDs) ? null : availableIDs[0]; + } + } diff --git a/bus-crypto/pom.xml b/bus-crypto/pom.xml index c202c94d7a..1af929977a 100755 --- a/bus-crypto/pom.xml +++ b/bus-crypto/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 1.78.1 diff --git a/bus-extra/pom.xml b/bus-extra/pom.xml index 6186f0e8da..064231d940 100644 --- a/bus-extra/pom.xml +++ b/bus-extra/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 2.0.49 2.11.0 2.17.1 @@ -86,7 +86,7 @@ 3.10.0 5.1.1 1.26.2 - 2.1.3 + 2.1.3 3.15.14.RELEASE 2.3.32 3.1.2.RELEASE @@ -217,7 +217,7 @@ jakarta.mail jakarta.mail-api - ${mail.version} + ${jakarta.mail.version} true diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/ftp/CommonsFtp.java b/bus-extra/src/main/java/org/miaixz/bus/extra/ftp/CommonsFtp.java index 99c95a828d..f1a03e1d2f 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/ftp/CommonsFtp.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/ftp/CommonsFtp.java @@ -326,7 +326,7 @@ public String pwd() { @Override public List ls(final String path) { - return ArrayKit.map(lsFiles(path), FTPFile::getName); + return ArrayKit.mapToList(lsFiles(path), FTPFile::getName); } /** diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/ftp/FtpConfig.java b/bus-extra/src/main/java/org/miaixz/bus/extra/ftp/FtpConfig.java index dc17e7c9fa..901506cf5d 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/ftp/FtpConfig.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/ftp/FtpConfig.java @@ -39,7 +39,9 @@ * @since Java 17+ */ public class FtpConfig implements Serializable { + private static final long serialVersionUID = -1L; + private Connector connector; /** * 编码 diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/mail/InternalMailUtil.java b/bus-extra/src/main/java/org/miaixz/bus/extra/mail/InternalMail.java similarity index 97% rename from bus-extra/src/main/java/org/miaixz/bus/extra/mail/InternalMailUtil.java rename to bus-extra/src/main/java/org/miaixz/bus/extra/mail/InternalMail.java index 075ad9f0f2..5b7ca78b88 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/mail/InternalMailUtil.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/mail/InternalMail.java @@ -45,7 +45,7 @@ * @author Kimi Liu * @since Java 17+ */ -public class InternalMailUtil { +public class InternalMail { /** * 将多个字符串邮件地址转为{@link InternetAddress}列表 @@ -58,8 +58,8 @@ public class InternalMailUtil { public static InternetAddress[] parseAddressFromStrs(final String[] addrStrs, final Charset charset) { final List resultList = new ArrayList<>(addrStrs.length); InternetAddress[] addrs; - for (final String addrStr : addrStrs) { - addrs = parseAddress(addrStr, charset); + for (final String text : addrStrs) { + addrs = parseAddress(text, charset); if (ArrayKit.isNotEmpty(addrs)) { Collections.addAll(resultList, addrs); } diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/mail/Mail.java b/bus-extra/src/main/java/org/miaixz/bus/extra/mail/Mail.java index 4088c57000..d68a8ca59d 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/mail/Mail.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/mail/Mail.java @@ -323,7 +323,7 @@ public Mail setAttachments(final DataSource... attachments) { bodyPart.setDataHandler(new DataHandler(attachment)); nameEncoded = attachment.getName(); if (this.mailAccount.isEncodefilename()) { - nameEncoded = InternalMailUtil.encodeText(nameEncoded, charset); + nameEncoded = InternalMail.encodeText(nameEncoded, charset); } // 普通附件文件名 bodyPart.setFileName(nameEncoded); @@ -431,7 +431,7 @@ private MimeMessage buildMsg() throws MessagingException { // 用户未提供发送方,则从Session中自动获取 msg.setFrom(); } else { - msg.setFrom(InternalMailUtil.parseFirstAddress(from, charset)); + msg.setFrom(InternalMail.parseFirstAddress(from, charset)); } // 标题 msg.setSubject(this.title, (null == charset) ? null : charset.name()); @@ -440,18 +440,18 @@ private MimeMessage buildMsg() throws MessagingException { // 内容和附件 msg.setContent(buildContent(charset)); // 收件人 - msg.setRecipients(MimeMessage.RecipientType.TO, InternalMailUtil.parseAddressFromStrs(this.tos, charset)); + msg.setRecipients(MimeMessage.RecipientType.TO, InternalMail.parseAddressFromStrs(this.tos, charset)); // 抄送人 if (ArrayKit.isNotEmpty(this.ccs)) { - msg.setRecipients(MimeMessage.RecipientType.CC, InternalMailUtil.parseAddressFromStrs(this.ccs, charset)); + msg.setRecipients(MimeMessage.RecipientType.CC, InternalMail.parseAddressFromStrs(this.ccs, charset)); } // 密送人 if (ArrayKit.isNotEmpty(this.bccs)) { - msg.setRecipients(MimeMessage.RecipientType.BCC, InternalMailUtil.parseAddressFromStrs(this.bccs, charset)); + msg.setRecipients(MimeMessage.RecipientType.BCC, InternalMail.parseAddressFromStrs(this.bccs, charset)); } // 回复地址(reply-to) if (ArrayKit.isNotEmpty(this.reply)) { - msg.setReplyTo(InternalMailUtil.parseAddressFromStrs(this.reply, charset)); + msg.setReplyTo(InternalMail.parseAddressFromStrs(this.reply, charset)); } return msg; diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/mail/MailAccount.java b/bus-extra/src/main/java/org/miaixz/bus/extra/mail/MailAccount.java index 74f461acc5..b45b6f1da9 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/mail/MailAccount.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/mail/MailAccount.java @@ -627,7 +627,7 @@ public Properties getSmtpProps() { */ public MailAccount defaultIfEmpty() { // 去掉发件人的姓名部分 - final String fromAddress = InternalMailUtil.parseFirstAddress(this.from, this.charset).getAddress(); + final String fromAddress = InternalMail.parseFirstAddress(this.from, this.charset).getAddress(); if (StringKit.isBlank(this.host)) { // 如果SMTP地址为空,默认使用smtp.<发件人邮箱后缀> diff --git a/bus-gitlab/pom.xml b/bus-gitlab/pom.xml index d392603405..7625eb7009 100755 --- a/bus-gitlab/pom.xml +++ b/bus-gitlab/pom.xml @@ -72,7 +72,7 @@ 21 21 3.1.1 - 6.1.0-M2 + 6.1.0 2.17.1 @@ -80,7 +80,7 @@ jakarta.servlet jakarta.servlet-api - ${servlet.version} + ${jakarta.servlet.version} true diff --git a/bus-goalie/pom.xml b/bus-goalie/pom.xml index 80b6d959cd..c7da2aa8e0 100644 --- a/bus-goalie/pom.xml +++ b/bus-goalie/pom.xml @@ -72,7 +72,7 @@ 21 21 3.3.1 - 1.18.32 + 1.18.34 33.2.1-jre diff --git a/bus-http/README.md b/bus-http/README.md index ba8747be11..376ec643a7 100644 --- a/bus-http/README.md +++ b/bus-http/README.md @@ -942,9 +942,9 @@ executeAsync(new StringCallback() { url("http://www.baidu.com/s"). -addParams("wd","微信机器人"). +addParam("wd","微信机器人"). -addParams("tn","baidu"). +addParam("tn","baidu"). build(). diff --git a/bus-http/pom.xml b/bus-http/pom.xml index 61a24ff2d0..36274e51bf 100755 --- a/bus-http/pom.xml +++ b/bus-http/pom.xml @@ -71,8 +71,9 @@ UTF-8 21 21 - 1.18.32 - 6.1.0-M2 + 1.18.34 + 6.1.0 + 2.0.1 @@ -90,7 +91,13 @@ jakarta.servlet jakarta.servlet-api - ${servlet.version} + ${jakarta.servlet.version} + true + + + jakarta.xml.soap + jakarta.xml.soap-api + ${jakarta.xml.soap.version} true diff --git a/bus-http/src/main/java/org/miaixz/bus/http/SoapX.java b/bus-http/src/main/java/org/miaixz/bus/http/SoapX.java new file mode 100644 index 0000000000..147dfce987 --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/SoapX.java @@ -0,0 +1,118 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.http; + +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; +import org.miaixz.bus.core.lang.Charset; +import org.miaixz.bus.core.lang.exception.InternalException; +import org.miaixz.bus.core.net.Protocol; +import org.miaixz.bus.core.xyz.XmlKit; +import org.miaixz.bus.http.plugin.soap.SoapBuilder; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; + +/** + * SOAP相关工具类 + * + * @author Kimi Liu + * @since Java 17+ + */ +public class SoapX { + + /** + * 创建SOAP客户端,默认使用soap1.2版本协议 + * + * @param url WS的URL地址 + * @return {@link SoapBuilder} + */ + public static SoapBuilder create(final String url) { + return SoapBuilder.of(url); + } + + /** + * 创建SOAP客户端 + * + * @param url WS的URL地址 + * @param protocol 协议,见{@link Protocol} + * @return {@link SoapBuilder} + */ + public static SoapBuilder create(final String url, final Protocol protocol) { + return SoapBuilder.of(url, protocol); + } + + /** + * 创建SOAP客户端 + * + * @param url WS的URL地址 + * @param protocol 协议,见{@link Protocol} + * @param namespaceURI 方法上的命名空间URI + * @return {@link SoapBuilder} + */ + public static SoapBuilder create(final String url, final Protocol protocol, final String namespaceURI) { + return SoapBuilder.of(url, protocol, namespaceURI); + } + + /** + * {@link SOAPMessage} 转为字符串 + * + * @param message SOAP消息对象 + * @param pretty 是否格式化 + * @return SOAP XML字符串 + */ + public static String toString(final SOAPMessage message, final boolean pretty) { + return toString(message, pretty, Charset.UTF_8); + } + + /** + * {@link SOAPMessage} 转为字符串 + * + * @param message SOAP消息对象 + * @param pretty 是否格式化 + * @param charset 编码 + * @return SOAP XML字符串 + */ + public static String toString(final SOAPMessage message, final boolean pretty, final java.nio.charset.Charset charset) { + final ByteArrayOutputStream out = new ByteArrayOutputStream(); + try { + message.writeTo(out); + } catch (final SOAPException | IOException e) { + throw new InternalException(e); + } + final String messageToString; + try { + messageToString = out.toString(charset.toString()); + } catch (final UnsupportedEncodingException e) { + throw new InternalException(e); + } + return pretty ? XmlKit.format(messageToString) : messageToString; + } + +} diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/buffer/BufferFactory.java b/bus-http/src/main/java/org/miaixz/bus/http/accord/package-info.java similarity index 82% rename from bus-socket/src/main/java/org/miaixz/bus/socket/buffer/BufferFactory.java rename to bus-http/src/main/java/org/miaixz/bus/http/accord/package-info.java index c9dde6f487..80a380fbea 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/buffer/BufferFactory.java +++ b/bus-http/src/main/java/org/miaixz/bus/http/accord/package-info.java @@ -3,7 +3,7 @@ ~ ~ ~ The MIT License (MIT) ~ ~ ~ - ~ Copyright (c) 2015-2024 miaixz.org sandao and other contributors. ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ ~ ~ ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ ~ of this software and associated documentation files (the "Software"), to deal ~ @@ -25,26 +25,11 @@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */ -package org.miaixz.bus.socket.buffer; - /** - * 内存池工厂 + * 内部实现及规则 * * @author Kimi Liu * @since Java 17+ */ -public interface BufferFactory { - - /** - * 禁用状态的内存池 - */ - BufferFactory DISABLED_BUFFER_FACTORY = () -> new BufferPagePool(0, 1, false); - - /** - * 创建内存池 - * - * @return 生成的内存池对象 - */ - BufferPagePool create(); +package org.miaixz.bus.http.accord; -} diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/GroupIo.java b/bus-http/src/main/java/org/miaixz/bus/http/accord/platform/package-info.java similarity index 72% rename from bus-socket/src/main/java/org/miaixz/bus/socket/GroupIo.java rename to bus-http/src/main/java/org/miaixz/bus/http/accord/platform/package-info.java index 39f5a6acd1..c5c521127e 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/GroupIo.java +++ b/bus-http/src/main/java/org/miaixz/bus/http/accord/platform/package-info.java @@ -3,7 +3,7 @@ ~ ~ ~ The MIT License (MIT) ~ ~ ~ - ~ Copyright (c) 2015-2024 miaixz.org sandao and other contributors. ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ ~ ~ ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ ~ of this software and associated documentation files (the "Software"), to deal ~ @@ -25,45 +25,11 @@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */ -package org.miaixz.bus.socket; - /** - * 群组 + * 客户端平台支持 * * @author Kimi Liu * @since Java 17+ */ -public interface GroupIo { - - /** - * 将Session加入群组group - * - * @param group 群组信息 - * @param session 会话 - */ - void join(String group, Session session); - - /** - * 群发消息 - * - * @param group 群组信息 - * @param data 发送内容 - */ - void write(String group, byte[] data); - - /** - * 将Session从群众group中移除 - * - * @param group 群组信息 - * @param session 会话 - */ - void remove(String group, Session session); - - /** - * Session从所有群组中退出 - * - * @param session 会话 - */ - void remove(Session session); +package org.miaixz.bus.http.accord.platform; -} diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/PureDateParser.java b/bus-http/src/main/java/org/miaixz/bus/http/bodys/package-info.java similarity index 54% rename from bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/PureDateParser.java rename to bus-http/src/main/java/org/miaixz/bus/http/bodys/package-info.java index a84111ab74..4d45fc585d 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/format/parser/PureDateParser.java +++ b/bus-http/src/main/java/org/miaixz/bus/http/bodys/package-info.java @@ -25,61 +25,11 @@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */ -package org.miaixz.bus.core.center.date.format.parser; - -import org.miaixz.bus.core.center.date.DateTime; -import org.miaixz.bus.core.center.date.Formatter; -import org.miaixz.bus.core.lang.Fields; -import org.miaixz.bus.core.lang.exception.DateException; -import org.miaixz.bus.core.xyz.MathKit; - -import java.io.Serializable; - /** - * 纯数字的日期字符串解析,支持格式包括; - *
    - *
  • yyyyMMddHHmmss
  • - *
  • yyyyMMddHHmmssSSS
  • - *
  • yyyyMMdd
  • - *
  • HHmmss
  • - *
  • 毫秒时间戳
  • - *
+ * Body 相关处理 * * @author Kimi Liu * @since Java 17+ */ -public class PureDateParser implements PredicateDateParser, Serializable { - - private static final long serialVersionUID = -1L; - - /** - * 单例 - */ - public static PureDateParser INSTANCE = new PureDateParser(); - - @Override - public boolean test(final CharSequence date) { - return MathKit.isNumber(date); - } - - @Override - public DateTime parse(final CharSequence source) throws DateException { - final int length = source.length(); - // 纯数字形式 - if (length == Fields.PURE_DATETIME.length()) { - return new DateTime(source, Formatter.PURE_DATETIME_FORMAT); - } else if (length == Fields.PURE_DATETIME_MS.length()) { - return new DateTime(source, Formatter.PURE_DATETIME_MS_FORMAT); - } else if (length == Fields.PURE_DATE.length()) { - return new DateTime(source, Formatter.PURE_DATE_FORMAT); - } else if (length == Fields.PURE_TIME.length()) { - return new DateTime(source, Formatter.PURE_TIME_FORMAT); - } else if (length >= 11 && length <= 13) { - // 时间戳 - return new DateTime(MathKit.parseLong(String.valueOf(source))); - } - - throw new DateException("No pure format fit for date String [{}] !", source); - } +package org.miaixz.bus.http.bodys; -} diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/metric/handler/GroupMessageHandler.java b/bus-http/src/main/java/org/miaixz/bus/http/cache/package-info.java similarity index 51% rename from bus-socket/src/main/java/org/miaixz/bus/socket/metric/handler/GroupMessageHandler.java rename to bus-http/src/main/java/org/miaixz/bus/http/cache/package-info.java index d88ea808a9..fc61619b5b 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/metric/handler/GroupMessageHandler.java +++ b/bus-http/src/main/java/org/miaixz/bus/http/cache/package-info.java @@ -3,7 +3,7 @@ ~ ~ ~ The MIT License (MIT) ~ ~ ~ - ~ Copyright (c) 2015-2024 miaixz.org sandao and other contributors. ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ ~ ~ ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ ~ of this software and associated documentation files (the "Software"), to deal ~ @@ -25,77 +25,11 @@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */ -package org.miaixz.bus.socket.metric.handler; - -import org.miaixz.bus.socket.GroupIo; -import org.miaixz.bus.socket.Handler; -import org.miaixz.bus.socket.Session; - -import java.io.IOException; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; - /** - * 抽象群组消息处理 + * 请求缓存支持 * * @author Kimi Liu * @since Java 17+ */ -abstract class GroupMessageHandler implements Handler, GroupIo { - - private Map sessionGroup = new ConcurrentHashMap<>(); - - /** - * 将Session加入群组group - * - * @param group 群组 - * @param session 会话 - */ - @Override - public final synchronized void join(String group, Session session) { - GroupUnit groupUnit = sessionGroup.get(group); - if (groupUnit == null) { - groupUnit = new GroupUnit(); - sessionGroup.put(group, groupUnit); - } - groupUnit.groupList.add(session); - } - - @Override - public final synchronized void remove(String group, Session session) { - GroupUnit groupUnit = sessionGroup.get(group); - if (groupUnit == null) { - return; - } - groupUnit.groupList.remove(session); - if (groupUnit.groupList.isEmpty()) { - sessionGroup.remove(group); - } - } - - @Override - public final void remove(Session session) { - for (String group : sessionGroup.keySet()) { - remove(group, session); - } - } - - @Override - public void write(String group, byte[] data) { - GroupUnit groupUnit = sessionGroup.get(group); - for (Session session : groupUnit.groupList) { - try { - session.writeBuffer().write(data); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - private class GroupUnit { - Set groupList = new HashSet<>(); - } +package org.miaixz.bus.http.cache; -} diff --git a/bus-http/src/main/java/org/miaixz/bus/http/metric/anget/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/metric/anget/package-info.java new file mode 100644 index 0000000000..8955a63224 --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/metric/anget/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * Anget 相关及设备信息 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.metric.anget; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/metric/http/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/metric/http/package-info.java new file mode 100644 index 0000000000..a72b591de9 --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/metric/http/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * Http 内部逻辑 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.metric.http; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/metric/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/metric/package-info.java new file mode 100644 index 0000000000..ee3183f4fc --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/metric/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * 内部标准及逻辑 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.metric; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/metric/proxy/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/metric/proxy/package-info.java new file mode 100644 index 0000000000..ab5bf9b90e --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/metric/proxy/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * 代理选择器 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.metric.proxy; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/metric/suffix/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/metric/suffix/package-info.java new file mode 100644 index 0000000000..f03ef442ec --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/metric/suffix/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * 公共后缀数据库 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.metric.suffix; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/plugin/httpv/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/plugin/httpv/package-info.java new file mode 100644 index 0000000000..1f823c932d --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/plugin/httpv/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * Httpv 实现 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.plugin.httpv; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/plugin/httpx/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/plugin/httpx/package-info.java new file mode 100644 index 0000000000..4e75a78e9d --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/plugin/httpx/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * Httpx 实现 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.plugin.httpx; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/plugin/httpz/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/plugin/httpz/package-info.java new file mode 100644 index 0000000000..38929d7ed7 --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/plugin/httpz/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * Httpz 实现 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.plugin.httpz; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/plugin/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/plugin/package-info.java new file mode 100644 index 0000000000..c7adbbd986 --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/plugin/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * Http 扩展及插件 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.plugin; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/plugin/soap/SoapBuilder.java b/bus-http/src/main/java/org/miaixz/bus/http/plugin/soap/SoapBuilder.java new file mode 100644 index 0000000000..553196beaa --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/plugin/soap/SoapBuilder.java @@ -0,0 +1,642 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.http.plugin.soap; + +import jakarta.xml.soap.*; +import org.miaixz.bus.core.lang.Charset; +import org.miaixz.bus.core.lang.MediaType; +import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.exception.InternalException; +import org.miaixz.bus.core.net.HTTP; +import org.miaixz.bus.core.net.Protocol; +import org.miaixz.bus.core.xyz.*; +import org.miaixz.bus.http.Httpz; +import org.miaixz.bus.http.Response; +import org.miaixz.bus.http.SoapX; + +import javax.xml.XMLConstants; +import javax.xml.namespace.QName; +import java.io.IOException; +import java.io.OutputStream; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +/** + * SOAP 支持 + * 此对象用于构建一个SOAP消息,并通过HTTP接口发出消息内容。 + * SOAP消息本质上是一个XML文本,可以通过调用{@link #getString(boolean)} 方法获取消息体 + * + * @author Kimi Liu + * @since Java 17+ + */ +public class SoapBuilder { + + /** + * Soap协议 + * soap1.1 : text/xml + * soap1.2 : application/soap+xml + */ + private final Protocol protocol; + /** + * 应用于方法上的命名空间URI + */ + private final String namespaceURI; + /** + * 存储头信息 + */ + private final Map headers = new HashMap<>(); + /** + * 请求的URL地址 + */ + private String url; + /** + * SOAP消息 + */ + private SOAPMessage message; + /** + * 消息工厂,用于创建消息 + */ + private MessageFactory factory; + /** + * 消息方法节点 + */ + private SOAPBodyElement methodEle; + /** + * 默认字符编码 + */ + private java.nio.charset.Charset charset = Charset.UTF_8; + + /** + * 构造,默认使用soap1.2版本协议 + * + * @param url WS的URL地址 + */ + public SoapBuilder(final String url) { + this(url, Protocol.SOAP_1_2); + } + + /** + * 构造 + * + * @param url WS的URL地址 + * @param protocol 协议版本,见{@link Protocol} + */ + public SoapBuilder(final String url, final Protocol protocol) { + this(url, protocol, null); + } + + /** + * 构造 + * + * @param url WS的URL地址 + * @param protocol 协议版本,见{@link Protocol} + * @param namespaceURI 方法上的命名空间URI + */ + public SoapBuilder(final String url, final Protocol protocol, final String namespaceURI) { + this.url = url; + this.namespaceURI = namespaceURI; + this.protocol = protocol; + init(protocol); + } + + + /** + * 创建SOAP客户端,默认使用soap1.2版本协议 + * + * @param url WS的URL地址 + * @return this + */ + public static SoapBuilder of(final String url) { + return new SoapBuilder(url); + } + + /** + * 创建SOAP客户端 + * + * @param url WS的URL地址 + * @param protocol 协议,见{@link Protocol} + * @return this + */ + public static SoapBuilder of(final String url, final Protocol protocol) { + return new SoapBuilder(url, protocol); + } + + /** + * 创建SOAP客户端 + * + * @param url WS的URL地址 + * @param protocol 协议,见{@link Protocol} + * @param namespaceURI 方法上的命名空间URI + * @return this + */ + public static SoapBuilder of(final String url, final Protocol protocol, final String namespaceURI) { + return new SoapBuilder(url, protocol, namespaceURI); + } + + /** + * 设置方法参数 + * + * @param ele 方法节点 + * @param name 参数名 + * @param value 参数值 + * @param prefix 命名空间前缀, {@code null}表示不使用前缀 + * @return {@link SOAPElement}子节点 + */ + private static SOAPElement setParam(final SOAPElement ele, final String name, final Object value, final String prefix) { + final SOAPElement childEle; + try { + if (StringKit.isNotBlank(prefix)) { + childEle = ele.addChildElement(name, prefix); + } else { + childEle = ele.addChildElement(name); + } + } catch (final SOAPException e) { + throw new InternalException(e); + } + + if (null != value) { + if (value instanceof SOAPElement) { + // 单个子节点 + try { + ele.addChildElement((SOAPElement) value); + } catch (final SOAPException e) { + throw new InternalException(e); + } + } else if (value instanceof Map) { + // 多个字节点 + Entry entry; + for (final Object obj : ((Map) value).entrySet()) { + entry = (Entry) obj; + setParam(childEle, StringKit.toStringOrNull(entry.getKey()), entry.getValue(), prefix); + } + } else { + // 单个值 + childEle.setValue(value.toString()); + } + } + + return childEle; + } + + /** + * 初始化 + * + * @param protocol 协议版本枚举,见{@link Protocol} + * @return this + */ + public SoapBuilder init(final Protocol protocol) { + // 创建消息工厂 + try { + this.factory = MessageFactory.newInstance(protocol.name); + // 根据消息工厂创建SoapMessage + this.message = factory.createMessage(); + } catch (final SOAPException e) { + throw new InternalException(e); + } + + return this; + } + + /** + * 重置SOAP客户端,用于客户端复用 + * 重置后需调用serMethod方法重新指定请求方法,并调用setParam方法重新定义参数 + * + * @return this + */ + public SoapBuilder reset() { + try { + this.message = factory.createMessage(); + } catch (final SOAPException e) { + throw new InternalException(e); + } + this.methodEle = null; + + return this; + } + + /** + * 设置编码 + * + * @param charset 编码 + * @return this + */ + public SoapBuilder charset(final java.nio.charset.Charset charset) { + if (null != charset) { + this.charset = charset; + try { + this.message.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, charset.name()); + this.message.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true"); + } catch (final SOAPException e) { + // ignore + } + } + + return this; + } + + /** + * 设置Webservice请求地址 + * + * @param url Webservice请求地址 + * @return this + */ + public SoapBuilder setUrl(final String url) { + this.url = url; + return this; + } + + /** + * 设置一个header + * 如果覆盖模式,则替换之前的值,否则加入到值列表中 + * + * @param name Header名 + * @param value Header值 + * @param isOverride 是否覆盖已有值 + * @return this + */ + public SoapBuilder header(final String name, final String value, final boolean isOverride) { + if (null != name && null != value) { + final String values = headers.get(name.trim()); + if (isOverride || StringKit.isEmpty(values)) { + headers.put(name.trim(), values); + } + } + return this; + } + + /** + * 获取headers + * + * @return Header Map + */ + public Map headers() { + this.headers.put(HTTP.CONTENT_TYPE, getXmlContentType()); + return Collections.unmodifiableMap(headers); + } + + /** + * 清除所有头信息,包括全局头信息 + * + * @return this + */ + public SoapBuilder clearHeaders() { + this.headers.clear(); + return this; + } + + /** + * 增加SOAP头信息,方法返回{@link SOAPHeaderElement}可以设置具体属性和子节点 + * + * @param name 头信息标签名 + * @param actorURI 中间的消息接收者 + * @param roleUri Role的URI + * @param mustUnderstand 标题项对于要对其进行处理的接收者来说是强制的还是可选的 + * @param relay relay属性 + * @return {@link SOAPHeaderElement} + */ + public SOAPHeaderElement addSOAPHeader(final QName name, final String actorURI, final String roleUri, final Boolean mustUnderstand, final Boolean relay) { + final SOAPHeaderElement ele = addSOAPHeader(name); + try { + if (StringKit.isNotBlank(roleUri)) { + ele.setRole(roleUri); + } + if (null != relay) { + ele.setRelay(relay); + } + } catch (final SOAPException e) { + throw new InternalException(e); + } + + if (StringKit.isNotBlank(actorURI)) { + ele.setActor(actorURI); + } + if (null != mustUnderstand) { + ele.setMustUnderstand(mustUnderstand); + } + + return ele; + } + + /** + * 增加SOAP头信息,方法返回{@link SOAPHeaderElement}可以设置具体属性和子节点 + * + * @param localName 头节点名称 + * @return {@link SOAPHeaderElement} + */ + public SOAPHeaderElement addSOAPHeader(final String localName) { + return addSOAPHeader(new QName(localName)); + } + + /** + * 增加SOAP头信息,方法返回{@link SOAPHeaderElement}可以设置具体属性和子节点 + * + * @param localName 头节点名称 + * @param value 头节点的值 + * @return {@link SOAPHeaderElement} + */ + public SOAPHeaderElement addSOAPHeader(final String localName, final String value) { + final SOAPHeaderElement soapHeaderElement = addSOAPHeader(localName); + soapHeaderElement.setTextContent(value); + return soapHeaderElement; + } + + /** + * 增加SOAP头信息,方法返回{@link SOAPHeaderElement}可以设置具体属性和子节点 + * + * @param name 头节点名称 + * @return {@link SOAPHeaderElement} + */ + public SOAPHeaderElement addSOAPHeader(final QName name) { + final SOAPHeaderElement ele; + try { + ele = this.message.getSOAPHeader().addHeaderElement(name); + } catch (final SOAPException e) { + throw new InternalException(e); + } + return ele; + } + + /** + * 设置请求方法 + * + * @param name 方法名及其命名空间 + * @param params 参数 + * @param useMethodPrefix 是否使用方法的命名空间前缀 + * @return this + */ + public SoapBuilder setMethod(final Name name, final Map params, final boolean useMethodPrefix) { + return setMethod(new QName(name.getURI(), name.getLocalName(), name.getPrefix()), params, useMethodPrefix); + } + + /** + * 设置请求方法 + * + * @param name 方法名及其命名空间 + * @param params 参数 + * @param useMethodPrefix 是否使用方法的命名空间前缀 + * @return this + */ + public SoapBuilder setMethod(final QName name, final Map params, final boolean useMethodPrefix) { + setMethod(name); + final String prefix = useMethodPrefix ? name.getPrefix() : null; + final SOAPBodyElement methodEle = this.methodEle; + for (final Entry entry : MapKit.wrap(params)) { + setParam(methodEle, entry.getKey(), entry.getValue(), prefix); + } + + return this; + } + + /** + * 设置请求方法 + * 方法名自动识别前缀,前缀和方法名使用“:”分隔 + * 当识别到前缀后,自动添加xmlns属性,关联到默认的namespaceURI + * + * @param methodName 方法名 + * @return this + */ + public SoapBuilder setMethod(final String methodName) { + return setMethod(methodName, ObjectKit.defaultIfNull(this.namespaceURI, XMLConstants.NULL_NS_URI)); + } + + /** + * 设置请求方法 + * 方法名自动识别前缀,前缀和方法名使用“:”分隔 + * 当识别到前缀后,自动添加xmlns属性,关联到传入的namespaceURI + * + * @param methodName 方法名(可有前缀也可无) + * @param namespaceURI 命名空间URI + * @return this + */ + public SoapBuilder setMethod(final String methodName, final String namespaceURI) { + final List methodNameList = StringKit.split(methodName, Symbol.COLON); + final QName qName; + if (2 == methodNameList.size()) { + qName = new QName(namespaceURI, methodNameList.get(1), methodNameList.get(0)); + } else { + qName = new QName(namespaceURI, methodName); + } + return setMethod(qName); + } + + /** + * 设置请求方法 + * + * @param name 方法名及其命名空间 + * @return this + */ + public SoapBuilder setMethod(final QName name) { + try { + this.methodEle = this.message.getSOAPBody().addBodyElement(name); + } catch (final SOAPException e) { + throw new InternalException(e); + } + + return this; + } + + /** + * 设置方法参数,使用方法的前缀 + * + * @param name 参数名 + * @param value 参数值,可以是字符串或Map或{@link SOAPElement} + * @return this + */ + public SoapBuilder setParam(final String name, final Object value) { + return setParam(name, value, true); + } + + /** + * 设置方法参数 + * + * @param name 参数名 + * @param value 参数值,可以是字符串或Map或{@link SOAPElement} + * @param useMethodPrefix 是否使用方法的命名空间前缀 + * @return this + */ + public SoapBuilder setParam(final String name, final Object value, final boolean useMethodPrefix) { + setParam(this.methodEle, name, value, useMethodPrefix ? this.methodEle.getPrefix() : null); + return this; + } + + /** + * 批量设置参数,使用方法的前缀 + * + * @param params 参数列表 + * @return this + */ + public SoapBuilder setParams(final Map params) { + return setParams(params, true); + } + + /** + * 批量设置参数 + * + * @param params 参数列表 + * @param useMethodPrefix 是否使用方法的命名空间前缀 + * @return this + */ + public SoapBuilder setParams(final Map params, final boolean useMethodPrefix) { + for (final Entry entry : MapKit.wrap(params)) { + setParam(entry.getKey(), entry.getValue(), useMethodPrefix); + } + return this; + } + + /** + * 获取方法节点 + * 用于创建子节点等操作 + * + * @return {@link SOAPBodyElement} + */ + public SOAPBodyElement getMethodEle() { + return this.methodEle; + } + + /** + * 获取SOAP消息对象 {@link SOAPMessage} + * + * @return {@link SOAPMessage} + */ + public SOAPMessage getMessage() { + return this.message; + } + + /** + * 获取SOAP请求消息 + * + * @param pretty 是否格式化 + * @return 消息字符串 + */ + public String getString(final boolean pretty) { + return SoapX.toString(this.message, pretty, this.charset); + } + + /** + * 将SOAP消息的XML内容输出到流 + * + * @param out 输出流 + * @return this + */ + public SoapBuilder write(final OutputStream out) { + try { + this.message.writeTo(out); + } catch (final SOAPException | IOException e) { + throw new InternalException(e); + } + return this; + } + + /** + * 执行Webservice请求,即发送SOAP内容 + * + * @return 返回结果 + */ + public SOAPMessage sendForMessage() { + final Response res = sendForResponse(); + final MimeHeaders headers = new MimeHeaders(); + for (final Entry> entry : res.headers().toMultimap().entrySet()) { + if (StringKit.isNotEmpty(entry.getKey())) { + headers.setHeader(entry.getKey(), CollKit.get(entry.getValue(), 0)); + } + } + try { + return this.factory.createMessage(headers, res.body().byteStream()); + } catch (final IOException | SOAPException e) { + throw new InternalException(e); + } finally { + IoKit.closeQuietly(res); + } + } + + /** + * 执行Webservice请求,即发送SOAP内容 + * + * @return 返回结果 + */ + public String send() { + return send(false); + } + + /** + * 执行Webservice请求,即发送SOAP内容 + * + * @param pretty 是否格式化 + * @return 返回结果 + */ + public String send(final boolean pretty) { + final String body; + try { + body = sendForResponse().body().string(); + } catch (IOException e) { + throw new RuntimeException(e); + } + return pretty ? XmlKit.format(body) : body; + } + + /** + * 发送请求,获取异步响应 + * + * @return 响应对象 + */ + public Response sendForResponse() { + try { + return Httpz.post().url(this.url) + .addHeader(this.headers) + .addParam(getString(false)) + .build() + .execute(); + } catch (Exception e) { + throw new InternalException(e); + } + } + + /** + * 获取请求的Content-Type,附加编码信息 + * XML消息体的Content-Type + * soap1.1 : text/xml + * soap1.2 : application/soap+xml + * soap1.1与soap1.2区别: https://www.cnblogs.com/qlqwjy/p/7577147.html + * + * @return 请求的Content-Type + */ + private String getXmlContentType() { + switch (this.protocol) { + case SOAP_1_1: + return MediaType.TEXT_XML.concat(";charset=" + this.charset.toString()); + case SOAP_1_2: + return MediaType.APPLICATION_SOAP_XML.concat(";charset=" + this.charset.toString()); + default: + throw new InternalException("Unsupported protocol: {}", this.protocol); + } + } + +} diff --git a/bus-http/src/main/java/org/miaixz/bus/http/plugin/soap/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/plugin/soap/package-info.java new file mode 100644 index 0000000000..f0e6830b98 --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/plugin/soap/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * SOAP 实现 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.plugin.soap; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/secure/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/secure/package-info.java new file mode 100644 index 0000000000..5b86f0ac89 --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/secure/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * HTTP 安全 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.secure; + diff --git a/bus-http/src/main/java/org/miaixz/bus/http/socket/package-info.java b/bus-http/src/main/java/org/miaixz/bus/http/socket/package-info.java new file mode 100644 index 0000000000..95ff0d7bec --- /dev/null +++ b/bus-http/src/main/java/org/miaixz/bus/http/socket/package-info.java @@ -0,0 +1,35 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +/** + * web socket支持 + * + * @author Kimi Liu + * @since Java 17+ + */ +package org.miaixz.bus.http.socket; + diff --git a/bus-image/pom.xml b/bus-image/pom.xml index 1663a7f95f..af7d298546 100755 --- a/bus-image/pom.xml +++ b/bus-image/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 diff --git a/bus-limiter/pom.xml b/bus-limiter/pom.xml index 73795150d0..618c52a079 100755 --- a/bus-limiter/pom.xml +++ b/bus-limiter/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 1.8.7 1.12.23 diff --git a/bus-mapper/pom.xml b/bus-mapper/pom.xml index d2ef804860..ffaf68b8fe 100755 --- a/bus-mapper/pom.xml +++ b/bus-mapper/pom.xml @@ -71,10 +71,10 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 3.5.16 3.0.3 - 3.2.0 + 3.2.0 @@ -104,7 +104,7 @@ jakarta.persistence jakarta.persistence-api - ${persistence.version} + ${jakarta.persistence.version} true diff --git a/bus-notify/pom.xml b/bus-notify/pom.xml index 27fda0d29c..f4a70eeb67 100755 --- a/bus-notify/pom.xml +++ b/bus-notify/pom.xml @@ -71,8 +71,8 @@ UTF-8 21 21 - 1.18.32 - 2.1.3 + 1.18.34 + 2.1.3 @@ -105,7 +105,7 @@ jakarta.mail jakarta.mail-api - ${mail.version} + ${jakarta.mail.version} true diff --git a/bus-notify/src/main/java/org/miaixz/bus/notify/Builder.java b/bus-notify/src/main/java/org/miaixz/bus/notify/Builder.java index 39e95ec329..90e411d8da 100755 --- a/bus-notify/src/main/java/org/miaixz/bus/notify/Builder.java +++ b/bus-notify/src/main/java/org/miaixz/bus/notify/Builder.java @@ -41,9 +41,6 @@ @Setter public class Builder { - private static final String CONTENT_TYPE_FORM = "application/x-www-form-urlencoded;charset=UTF-8"; - private static final String CONTENT_TYPE_JSON = "application/json; charset=utf-8"; - /** * 缓存类型 */ diff --git a/bus-notify/src/main/java/org/miaixz/bus/notify/metric/ctyun/CtyunSmsProvider.java b/bus-notify/src/main/java/org/miaixz/bus/notify/metric/ctyun/CtyunSmsProvider.java index cb38d31a1a..53e2f1f7c5 100644 --- a/bus-notify/src/main/java/org/miaixz/bus/notify/metric/ctyun/CtyunSmsProvider.java +++ b/bus-notify/src/main/java/org/miaixz/bus/notify/metric/ctyun/CtyunSmsProvider.java @@ -31,6 +31,7 @@ import org.miaixz.bus.core.center.date.Formatter; import org.miaixz.bus.core.codec.binary.Base64; import org.miaixz.bus.core.lang.MediaType; +import org.miaixz.bus.core.net.HTTP; import org.miaixz.bus.core.xyz.DateKit; import org.miaixz.bus.extra.json.JsonKit; import org.miaixz.bus.http.Httpx; @@ -80,7 +81,7 @@ private static Map signHeader(String body, String key, String se // 构造签名 String signature = Base64.encode(org.miaixz.bus.crypto.Builder.hmacSha256(signatureStr.getBytes(StandardCharsets.UTF_8)).digest(kDate)); String signHeader = String.format("%s Headers=ctyun-eop-request-id;eop-date Signature=%s", key, signature); - map.put("Content-Type", MediaType.APPLICATION_JSON); + map.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON); map.put("ctyun-eop-request-id", uuid); map.put("Eop-date", signatureTime); map.put("Eop-Authorization", signHeader); diff --git a/bus-notify/src/main/java/org/miaixz/bus/notify/metric/emay/EmaySmsProvider.java b/bus-notify/src/main/java/org/miaixz/bus/notify/metric/emay/EmaySmsProvider.java index f703a81f02..1ed104c716 100644 --- a/bus-notify/src/main/java/org/miaixz/bus/notify/metric/emay/EmaySmsProvider.java +++ b/bus-notify/src/main/java/org/miaixz/bus/notify/metric/emay/EmaySmsProvider.java @@ -62,7 +62,7 @@ public EmaySmsProvider(Context context) { public Message send(EmayMaterial entity) { Map bodys = getParamsMap(context.getAppKey(), context.getAppSecret(), entity.getReceive(), entity.getContent()); Map headers = MapKit.newHashMap(1, true); - headers.put("Content-Type", MediaType.APPLICATION_FORM_URLENCODED); + headers.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); String response = Httpx.post(this.getUrl(entity), bodys, headers); String errcode = JsonKit.getValue(response, "errcode"); diff --git a/bus-notify/src/main/java/org/miaixz/bus/notify/metric/unisms/UniSmsProvider.java b/bus-notify/src/main/java/org/miaixz/bus/notify/metric/unisms/UniSmsProvider.java index e92c00c1e9..7385e6e22c 100644 --- a/bus-notify/src/main/java/org/miaixz/bus/notify/metric/unisms/UniSmsProvider.java +++ b/bus-notify/src/main/java/org/miaixz/bus/notify/metric/unisms/UniSmsProvider.java @@ -31,6 +31,7 @@ import org.miaixz.bus.core.lang.Algorithm; import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.exception.ValidateException; +import org.miaixz.bus.core.net.HTTP; import org.miaixz.bus.core.xyz.MapKit; import org.miaixz.bus.crypto.Builder; import org.miaixz.bus.extra.json.JsonKit; @@ -77,7 +78,7 @@ public Message send(UniMaterial entity) { public Message request(final UniMaterial entity, final String action, final Map bodys) { Map headers = new HashMap<>(); headers.put("User-Agent", "uni-java-sdk" + "/" + "0.0.4"); - headers.put("Content-Type", MediaType.APPLICATION_JSON); + headers.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON); headers.put("Accept", MediaType.APPLICATION_JSON); String url; if (entity.isSimple()) { diff --git a/bus-notify/src/main/java/org/miaixz/bus/notify/metric/zhutong/ZhutongSmsProvider.java b/bus-notify/src/main/java/org/miaixz/bus/notify/metric/zhutong/ZhutongSmsProvider.java index 9ecceb9dd2..d4d1dfd066 100644 --- a/bus-notify/src/main/java/org/miaixz/bus/notify/metric/zhutong/ZhutongSmsProvider.java +++ b/bus-notify/src/main/java/org/miaixz/bus/notify/metric/zhutong/ZhutongSmsProvider.java @@ -32,6 +32,7 @@ import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.exception.InternalException; import org.miaixz.bus.core.lang.exception.ValidateException; +import org.miaixz.bus.core.net.HTTP; import org.miaixz.bus.core.xyz.ArrayKit; import org.miaixz.bus.core.xyz.MapKit; import org.miaixz.bus.core.xyz.StringKit; @@ -119,7 +120,7 @@ protected Message sendForCustom(ZhutongMaterial entity) { bodys.put("content", entity.getContent()); Map headers = MapKit.newHashMap(1, true); - headers.put("Content-Type", MediaType.APPLICATION_JSON); + headers.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON); String response = Httpx.post(url, bodys, headers); @@ -179,7 +180,7 @@ protected Message sendForTemplate(ZhutongMaterial entity) { bodys.put("records", JsonKit.toJsonString(records)); Map headers = MapKit.newHashMap(1, true); - headers.put("Content-Type", MediaType.APPLICATION_JSON); + headers.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON); String response = Httpx.post(url, bodys, headers); boolean succeed = Objects.equals(JsonKit.getValue(response, "code"), 0); diff --git a/bus-oauth/pom.xml b/bus-oauth/pom.xml index ba07916ab5..967d935a94 100755 --- a/bus-oauth/pom.xml +++ b/bus-oauth/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 1.78.1 2.0.49 4.39.42.ALL diff --git a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/eleme/ElemeProvider.java b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/eleme/ElemeProvider.java index 8822c7a2b7..76404e0572 100644 --- a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/eleme/ElemeProvider.java +++ b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/eleme/ElemeProvider.java @@ -60,9 +60,6 @@ */ public class ElemeProvider extends AbstractProvider { - private static final String CONTENT_TYPE_FORM = "application/x-www-form-urlencoded;charset=UTF-8"; - private static final String CONTENT_TYPE_JSON = "application/json; charset=utf-8"; - public ElemeProvider(Context context) { super(context, Registry.ELEME); } @@ -103,7 +100,7 @@ protected AccToken getAccessToken(Callback callback) { form.put("code", callback.getCode()); form.put("grant_type", "authorization_code"); - Map header = this.buildHeader(CONTENT_TYPE_FORM, this.getRequestId(), true); + Map header = this.buildHeader(MediaType.APPLICATION_FORM_URLENCODED, this.getRequestId(), true); String response = Httpx.post(complex.accessToken(), form, header); JSONObject object = JSONObject.parseObject(response); @@ -124,7 +121,7 @@ public Message refresh(AccToken oldToken) { form.put("refresh_token", oldToken.getRefreshToken()); form.put("grant_type", "refresh_token"); - Map header = this.buildHeader(CONTENT_TYPE_FORM, this.getRequestId(), true); + Map header = this.buildHeader(MediaType.APPLICATION_FORM_URLENCODED, this.getRequestId(), true); String response = Httpx.post(complex.refresh(), form, header); JSONObject object = JSONObject.parseObject(response); @@ -167,7 +164,7 @@ protected Material getUserInfo(AccToken accToken) { paramsMap.put("params", parameters); paramsMap.put("signature", signature); - Map header = this.buildHeader(CONTENT_TYPE_JSON, requestId, false); + Map header = this.buildHeader(MediaType.APPLICATION_JSON, requestId, false); String response = Httpx.post(complex.userInfo(), JSONObject.toJSONString(paramsMap), header, MediaType.APPLICATION_JSON); JSONObject object = JSONObject.parseObject(response); diff --git a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/feishu/FeishuProvider.java b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/feishu/FeishuProvider.java index 8302081078..3258010ead 100644 --- a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/feishu/FeishuProvider.java +++ b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/feishu/FeishuProvider.java @@ -34,6 +34,7 @@ import org.miaixz.bus.core.lang.Gender; import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.exception.AuthorizedException; +import org.miaixz.bus.core.net.HTTP; import org.miaixz.bus.core.net.url.UrlEncoder; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.http.Httpx; @@ -85,7 +86,7 @@ private String getAppAccessToken() { requestObject.put("app_secret", context.getAppSecret()); Map header = new HashMap<>(); - header.put("Content-Type", "application/json"); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON); String response = Httpx.post(url, requestObject.toJSONString(), header, MediaType.APPLICATION_JSON); JSONObject jsonObject = JSON.parseObject(response); @@ -110,7 +111,7 @@ protected AccToken getAccessToken(Callback callback) { protected Material getUserInfo(AccToken accToken) { String accessToken = accToken.getAccessToken(); Map header = new HashMap<>(); - header.put("Content-Type", "application/json"); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON); header.put("Authorization", "Bearer " + accessToken); String response = Httpx.get(complex.userInfo(), null, header); JSONObject object = JSON.parseObject(response); @@ -144,7 +145,7 @@ public Message refresh(AccToken accToken) { private AccToken getToken(JSONObject param, String url) { Map header = new HashMap<>(); - header.put("Content-Type", "application/json"); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON); String response = Httpx.post(url, param.toJSONString(), header, MediaType.APPLICATION_JSON); JSONObject jsonObject = JSON.parseObject(response); this.checkResponse(jsonObject); diff --git a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/line/LineProvider.java b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/line/LineProvider.java index 3462fb0342..f60b34c8c6 100644 --- a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/line/LineProvider.java +++ b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/line/LineProvider.java @@ -31,7 +31,9 @@ import org.miaixz.bus.cache.metric.ExtendCache; import org.miaixz.bus.core.basics.entity.Message; import org.miaixz.bus.core.lang.Gender; +import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.net.HTTP; import org.miaixz.bus.http.Httpx; import org.miaixz.bus.oauth.Builder; import org.miaixz.bus.oauth.Context; @@ -84,7 +86,7 @@ protected AccToken getAccessToken(Callback callback) { @Override protected Material getUserInfo(AccToken accToken) { Map header = new HashMap<>(); - header.put("Content-Type", "application/x-www-form-urlencoded"); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); header.put("Authorization", "Bearer ".concat(accToken.getAccessToken())); String userInfo = Httpx.get(complex.userInfo(), null, header); diff --git a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/linkedin/LinkedinProvider.java b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/linkedin/LinkedinProvider.java index ad475597ff..62fdbc745d 100644 --- a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/linkedin/LinkedinProvider.java +++ b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/linkedin/LinkedinProvider.java @@ -32,6 +32,7 @@ import com.alibaba.fastjson.JSONPath; import org.miaixz.bus.cache.metric.ExtendCache; import org.miaixz.bus.core.lang.Gender; +import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.exception.AuthorizedException; import org.miaixz.bus.core.net.HTTP; @@ -205,7 +206,7 @@ private void checkResponse(JSONObject object) { private AccToken getToken(String accessTokenUrl) { Map header = new HashMap(); header.put("Host", "www.linkedin.com"); - header.put(HTTP.CONTENT_TYPE, "application/x-www-form-urlencoded"); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); String response = Httpx.post(accessTokenUrl, null, header); JSONObject accessTokenObject = JSONObject.parseObject(response); diff --git a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/okta/OktaProvider.java b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/okta/OktaProvider.java index aa50d0ef6d..16e9616904 100644 --- a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/okta/OktaProvider.java +++ b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/okta/OktaProvider.java @@ -32,8 +32,10 @@ import org.miaixz.bus.core.basics.entity.Message; import org.miaixz.bus.core.codec.binary.Base64; import org.miaixz.bus.core.lang.Gender; +import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.exception.AuthorizedException; +import org.miaixz.bus.core.net.HTTP; import org.miaixz.bus.core.xyz.ObjectKit; import org.miaixz.bus.http.Httpx; import org.miaixz.bus.oauth.Builder; @@ -72,8 +74,8 @@ protected AccToken getAccessToken(Callback callback) { private AccToken getAuthToken(String tokenUrl) { Map header = new HashMap(); - header.put("accept", "application/json"); - header.put("content-type", "application/x-www-form-urlencoded"); + header.put("accept", MediaType.APPLICATION_JSON); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); header.put("Authorization", "Basic " + Base64.encode(context.getAppKey().concat(Symbol.COLON).concat(context.getAppSecret()))); String response = Httpx.post(tokenUrl, null, header); diff --git a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/slack/SlackProvider.java b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/slack/SlackProvider.java index e06c0b1ae9..2b8490a095 100644 --- a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/slack/SlackProvider.java +++ b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/slack/SlackProvider.java @@ -32,8 +32,10 @@ import org.miaixz.bus.cache.metric.ExtendCache; import org.miaixz.bus.core.basics.entity.Message; import org.miaixz.bus.core.lang.Gender; +import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.exception.AuthorizedException; +import org.miaixz.bus.core.net.HTTP; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.http.Httpx; import org.miaixz.bus.oauth.Builder; @@ -67,7 +69,7 @@ public SlackProvider(Context context, ExtendCache cache) { @Override protected AccToken getAccessToken(Callback callback) { Map header = new HashMap<>(); - header.put("Content-Type", "application/x-www-form-urlencoded"); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); String response = Httpx.get(accessTokenUrl(callback.getCode()), null, header); JSONObject accessTokenObject = JSONObject.parseObject(response); this.checkResponse(accessTokenObject); @@ -82,7 +84,7 @@ protected AccToken getAccessToken(Callback callback) { @Override protected Material getUserInfo(AccToken accToken) { Map header = new HashMap<>(); - header.put("Content-Type", "application/x-www-form-urlencoded"); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); header.put("Authorization", "Bearer ".concat(accToken.getAccessToken())); String userInfo = Httpx.get(userInfoUrl(accToken), null, header); JSONObject object = JSONObject.parseObject(userInfo); @@ -105,7 +107,7 @@ protected Material getUserInfo(AccToken accToken) { @Override public Message revoke(AccToken accToken) { Map header = new HashMap<>(); - header.put("Content-Type", "application/x-www-form-urlencoded"); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); header.put("Authorization", "Bearer ".concat(accToken.getAccessToken())); String userInfo = Httpx.get(complex.revoke(), null, header); JSONObject object = JSONObject.parseObject(userInfo); diff --git a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/stackoverflow/StackOverflowProvider.java b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/stackoverflow/StackOverflowProvider.java index e3f4e09e01..7122c4f3e1 100644 --- a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/stackoverflow/StackOverflowProvider.java +++ b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/stackoverflow/StackOverflowProvider.java @@ -31,6 +31,7 @@ import org.miaixz.bus.cache.metric.ExtendCache; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Gender; +import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.exception.AuthorizedException; import org.miaixz.bus.core.net.HTTP; @@ -70,7 +71,7 @@ protected AccToken getAccessToken(Callback callback) { UrlDecoder.decodeMap(accessTokenUrl, Charset.DEFAULT_UTF_8).forEach(form::put); Map header = new HashMap<>(); - header.put(HTTP.CONTENT_TYPE, "application/x-www-form-urlencoded"); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); String response = Httpx.post(accessTokenUrl, form, header); JSONObject accessTokenObject = JSONObject.parseObject(response); diff --git a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/twitter/TwitterProvider.java b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/twitter/TwitterProvider.java index f077ee17ca..76ab4a1e17 100644 --- a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/twitter/TwitterProvider.java +++ b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/twitter/TwitterProvider.java @@ -32,6 +32,7 @@ import org.miaixz.bus.core.codec.binary.Base64; import org.miaixz.bus.core.lang.Algorithm; import org.miaixz.bus.core.lang.Charset; +import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.net.HTTP; import org.miaixz.bus.core.net.url.UrlEncoder; @@ -163,7 +164,7 @@ protected AccToken getAccessToken(Callback callback) { Map header = new HashMap<>(); header.put("Authorization", buildHeader(headerMap)); - header.put(HTTP.CONTENT_TYPE, "application/x-www-form-urlencoded"); + header.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); Map form = new HashMap<>(3); form.put("oauth_verifier", callback.getOauth_verifier()); diff --git a/bus-parent/pom.xml b/bus-parent/pom.xml index 5090dbe80c..1908a1eef2 100755 --- a/bus-parent/pom.xml +++ b/bus-parent/pom.xml @@ -77,10 +77,10 @@ UTF-8 21 21 - 1.18.32 - 3.2.0 - 2.1.3 - 6.1.0-M2 + 1.18.34 + 3.2.0 + 2.1.3 + 6.1.0 1.3.2 3.6.0.Final 1.5.6 @@ -293,17 +293,17 @@ jakarta.persistence jakarta.persistence-api - ${persistence.version} + ${jakarta.persistence.version} jakarta.mail jakarta.mail-api - ${mail.version} + ${jakarta.mail.version} jakarta.servlet jakarta.servlet-api - ${servlet.version} + ${jakarta.servlet.version} commons-logging diff --git a/bus-pay/pom.xml b/bus-pay/pom.xml index 1c73cc8c44..33763acab3 100644 --- a/bus-pay/pom.xml +++ b/bus-pay/pom.xml @@ -71,8 +71,8 @@ UTF-8 21 21 - 1.18.32 - 6.1.0-M2 + 1.18.34 + 6.1.0 1.78.1 4.39.42.ALL @@ -102,7 +102,7 @@ jakarta.servlet jakarta.servlet-api - ${servlet.version} + ${jakarta.servlet.version} true diff --git a/bus-pay/src/main/java/org/miaixz/bus/pay/metric/paypal/PaypalProvider.java b/bus-pay/src/main/java/org/miaixz/bus/pay/metric/paypal/PaypalProvider.java index 2c58f3a583..775877a01c 100644 --- a/bus-pay/src/main/java/org/miaixz/bus/pay/metric/paypal/PaypalProvider.java +++ b/bus-pay/src/main/java/org/miaixz/bus/pay/metric/paypal/PaypalProvider.java @@ -30,6 +30,7 @@ import org.miaixz.bus.cache.metric.ExtendCache; import org.miaixz.bus.core.codec.binary.Base64; import org.miaixz.bus.core.lang.MediaType; +import org.miaixz.bus.core.net.HTTP; import org.miaixz.bus.core.xyz.DateKit; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.pay.Complex; @@ -78,7 +79,7 @@ public static Map getBaseHeaders(AccessToken accessToken, String throw new RuntimeException("accessToken is null"); } Map headers = new HashMap<>(3); - headers.put("Content-Type", MediaType.APPLICATION_JSON); + headers.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON); headers.put("Authorization", accessToken.getTokenType().concat(" ").concat(accessToken.getAccessToken())); if (StringKit.isNotEmpty(payPalRequestId)) { headers.put("PayPal-Request-Id", payPalRequestId); @@ -119,7 +120,7 @@ public String getUrl(Complex complex) { public Message getToken() { Map headers = new HashMap<>(3); headers.put("Accept", MediaType.APPLICATION_JSON); - headers.put("Content-Type", MediaType.APPLICATION_FORM_URLENCODED); + headers.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); headers.put("Authorization", "Basic ".concat(Base64.encode((this.context.getAppKey().concat(":").concat(this.context.getAppSecret())).getBytes(StandardCharsets.UTF_8)))); Map params = new HashMap<>(1); params.put("grant_type", "client_credentials"); diff --git a/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java b/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java index 36f4ca2fdc..82b6d8d127 100644 --- a/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java +++ b/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java @@ -31,6 +31,7 @@ import org.miaixz.bus.core.lang.Algorithm; import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.net.HTTP; import org.miaixz.bus.core.xyz.DateKit; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.extra.json.JsonKit; @@ -88,7 +89,7 @@ public static Map getBaseHeaders(String authorization) { public static Map getHeaders(String authorization, String serialNumber) { Map headers = getBaseHeaders(authorization); - headers.put("Content-Type", MediaType.APPLICATION_JSON); + headers.put(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON); if (StringKit.isNotEmpty(serialNumber)) { headers.put("Wechatpay-Serial", serialNumber); } @@ -97,7 +98,7 @@ public static Map getHeaders(String authorization, String serial public static Map getUploadHeaders(String authorization, String serialNumber) { Map headers = getBaseHeaders(authorization); - headers.put("Content-Type", "multipart/form-data;boundary=\"boundary\""); + headers.put(HTTP.CONTENT_TYPE, "multipart/form-data;boundary=\"boundary\""); if (StringKit.isNotEmpty(serialNumber)) { headers.put("Wechatpay-Serial", serialNumber); } diff --git a/bus-sensitive/pom.xml b/bus-sensitive/pom.xml index fb74d19c18..a9612254e7 100755 --- a/bus-sensitive/pom.xml +++ b/bus-sensitive/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 2.0.49 diff --git a/bus-shade/pom.xml b/bus-shade/pom.xml index 2fc329bf23..824ca13da5 100755 --- a/bus-shade/pom.xml +++ b/bus-shade/pom.xml @@ -74,7 +74,7 @@ 3.3.1 1.26.2 2.3.32 - 1.18.32 + 1.18.34 5.1.0 8.4.0 diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/Context.java b/bus-socket/src/main/java/org/miaixz/bus/socket/Context.java index 52dff8dd1c..d0ff2fb71f 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/Context.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/Context.java @@ -28,7 +28,6 @@ package org.miaixz.bus.socket; import org.miaixz.bus.core.lang.Normal; -import org.miaixz.bus.socket.buffer.BufferFactory; import java.net.SocketOption; import java.util.HashMap; @@ -91,11 +90,6 @@ public final class Context { */ private int threadNum = 1; - /** - * 内存池工厂 - */ - private BufferFactory bufferFactory = BufferFactory.DISABLED_BUFFER_FACTORY; - /** * 获取默认内存块大小 * @@ -206,14 +200,6 @@ public void setThreadNum(int threadNum) { this.threadNum = threadNum; } - public BufferFactory getBufferFactory() { - return bufferFactory; - } - - public void setBufferFactory(BufferFactory bufferFactory) { - this.bufferFactory = bufferFactory; - } - public int getBacklog() { return backlog; } @@ -236,7 +222,6 @@ public String toString() { ", protocol=" + message + ", socketOptions=" + socketOptions + ", threadNum=" + threadNum + - ", bufferFactory=" + bufferFactory + '}'; } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/Status.java b/bus-socket/src/main/java/org/miaixz/bus/socket/Status.java index f72179e9b7..8438c1d28e 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/Status.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/Status.java @@ -91,5 +91,9 @@ public enum Status { /** * 服务端接受连接异常 */ - ACCEPT_EXCEPTION + ACCEPT_EXCEPTION, + /** + * 内部异常 + */ + INTERNAL_EXCEPTION } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/Worker.java b/bus-socket/src/main/java/org/miaixz/bus/socket/Worker.java index 429d43a78e..d134f6e3bb 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/Worker.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/Worker.java @@ -31,6 +31,7 @@ import org.miaixz.bus.core.lang.exception.InternalException; import org.miaixz.bus.socket.accord.UdpChannel; import org.miaixz.bus.socket.accord.UdpSession; +import org.miaixz.bus.socket.buffer.BufferPage; import org.miaixz.bus.socket.buffer.BufferPagePool; import org.miaixz.bus.socket.buffer.VirtualBuffer; @@ -61,9 +62,13 @@ public final class Worker implements Runnable { */ private final Selector selector; /** - * 内存池 + * write 内存池 */ - private final BufferPagePool bufferPool; + private BufferPagePool writeBufferPool = null; + /** + * read 内存池 + */ + private BufferPage readBufferPage = null; /** * 请求队列 */ @@ -76,23 +81,26 @@ public final class Worker implements Runnable { private final ExecutorService executorService; private VirtualBuffer standbyBuffer; - public Worker(BufferPagePool bufferPool, int threadNum) throws IOException { - this.bufferPool = bufferPool; + public Worker(BufferPagePool writeBufferPool, int threadNum) throws IOException { + this(writeBufferPool.allocateBufferPage(), writeBufferPool, threadNum); + } + + public Worker(BufferPage readBufferPage, BufferPagePool writeBufferPool, int threadNum) throws IOException { + this.readBufferPage = readBufferPage; + this.writeBufferPool = writeBufferPool; this.selector = Selector.open(); try { this.requestQueue.put(SELECTOR_CHANNEL); } catch (InterruptedException e) { throw new RuntimeException(e); } - // 启动worker线程组 - executorService = new ThreadPoolExecutor(threadNum, threadNum, - 0L, TimeUnit.MILLISECONDS, - new LinkedBlockingQueue<>(), new ThreadFactory() { + //启动worker线程组 + executorService = new ThreadPoolExecutor(threadNum, threadNum, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), new ThreadFactory() { int i = 0; @Override public Thread newThread(Runnable r) { - return new Thread(r, "Socket:udp-" + Worker.this.hashCode() + "-" + (++i)); + return new Thread(r, "smart-socket:udp-" + Worker.this.hashCode() + "-" + (++i)); } }); for (int i = 0; i < threadNum; i++) { @@ -167,7 +175,7 @@ public boolean doRead(UdpChannel channel) throws IOException { Context context = channel.context; while (count-- > 0) { if (standbyBuffer == null) { - standbyBuffer = channel.getBufferPage().allocate(context.getReadBufferSize()); + standbyBuffer = readBufferPage.allocate(context.getReadBufferSize()); } ByteBuffer buffer = standbyBuffer.buffer(); SocketAddress remote = channel.getChannel().receive(buffer); @@ -176,11 +184,11 @@ public boolean doRead(UdpChannel channel) throws IOException { return true; } VirtualBuffer readyBuffer = standbyBuffer; - standbyBuffer = channel.getBufferPage().allocate(context.getReadBufferSize()); + standbyBuffer = readBufferPage.allocate(context.getReadBufferSize()); buffer.flip(); Runnable runnable = () -> { - // 解码 - UdpSession session = new UdpSession(channel, remote, bufferPool.allocateBufferPage()); + //解码 + UdpSession session = new UdpSession(channel, remote, writeBufferPool.allocateBufferPage()); try { Monitor monitor = context.getMonitor(); if (monitor != null) { diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioClient.java b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioClient.java index 088eb4a610..66d2cb8fa9 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioClient.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioClient.java @@ -32,9 +32,7 @@ import org.miaixz.bus.socket.Handler; import org.miaixz.bus.socket.Message; import org.miaixz.bus.socket.Session; -import org.miaixz.bus.socket.buffer.BufferFactory; import org.miaixz.bus.socket.buffer.BufferPagePool; -import org.miaixz.bus.socket.buffer.VirtualBufferFactory; import java.io.IOException; import java.net.InetSocketAddress; @@ -76,10 +74,6 @@ public final class AioClient { * @see TcpSession */ private TcpSession session; - /** - * ByteBuffer内存池 - */ - private BufferPagePool innerBufferPool = null; /** * IO事件处理线程组 * 作为客户端,该AsynchronousChannelGroup只需保证2个长度的线程池大小即可满足通信读写所需。 @@ -93,13 +87,15 @@ public final class AioClient { * 连接超时时间 */ private int connectTimeout; + /** - * 内存池 + * write 内存池 */ - private BufferPagePool bufferPool = null; - - private VirtualBufferFactory readBufferFactory = bufferPage -> bufferPage.allocate(context.getReadBufferSize()); - + private BufferPagePool writeBufferPool = null; + /** + * read 内存池 + */ + private BufferPagePool readBufferPool = null; /** * 当前构造方法设置了启动Aio客户端的必要参数,基本实现开箱即用。 * @@ -147,9 +143,11 @@ public
void start(AsynchronousChannelGroup asynchronousChannelGroup, A attac } }, connectTimeout, TimeUnit.MILLISECONDS); } - if (bufferPool == null) { - bufferPool = context.getBufferFactory().create(); - this.innerBufferPool = bufferPool; + if (writeBufferPool == null) { + this.writeBufferPool = BufferPagePool.DEFAULT_BUFFER_PAGE_POOL; + } + if (readBufferPool == null) { + this.readBufferPool = BufferPagePool.DEFAULT_BUFFER_PAGE_POOL; } //set socket options if (context.getSocketOptions() != null) { @@ -173,7 +171,7 @@ public void completed(Void result, AsynchronousSocketChannel socketChannel) { throw new RuntimeException("Monitor refuse channel"); } //连接成功则构造Session对象 - session = new TcpSession(connectedChannel, context, bufferPool.allocateBufferPage(), bufferPage -> readBufferFactory.newBuffer(bufferPage)); + session = new TcpSession(connectedChannel, context, writeBufferPool.allocateBufferPage(), () -> readBufferPool.allocateBufferPage().allocate(context.getReadBufferSize())); handler.completed(session, attachment); } catch (Exception e) { failed(e, socketChannel); @@ -279,11 +277,6 @@ private synchronized void shutdown0(boolean flag) { asynchronousChannelGroup.shutdown(); asynchronousChannelGroup = null; } - if (innerBufferPool != null) { - innerBufferPool.release(); - innerBufferPool = null; - bufferPool = null; - } } /** @@ -340,23 +333,12 @@ public AioClient bindLocal(String local, int port) { * @return 当前客户端实例 */ public AioClient setBufferPagePool(BufferPagePool bufferPool) { - this.bufferPool = bufferPool; - this.context.setBufferFactory(BufferFactory.DISABLED_BUFFER_FACTORY); - return this; + return setBufferPagePool(bufferPool, bufferPool); } - /** - * 设置内存池的构造工厂。 - * 通过工厂形式生成的内存池会强绑定到当前AioClient对象, - * 在AioClient执行shutdown时会释放内存池。 - * 在启用内存池的情况下会有更好的性能表现 - * - * @param bufferFactory 内存池工厂 - * @return 当前客户端实例 - */ - public AioClient setBufferFactory(BufferFactory bufferFactory) { - this.context.setBufferFactory(bufferFactory); - this.bufferPool = null; + public AioClient setBufferPagePool(BufferPagePool readBufferPool, BufferPagePool writeBufferPool) { + this.writeBufferPool = writeBufferPool; + this.readBufferPool = readBufferPool; return this; } @@ -384,9 +366,4 @@ public AioClient connectTimeout(int timeout) { return this; } - public final AioClient setReadBufferFactory(VirtualBufferFactory readBufferFactory) { - this.readBufferFactory = readBufferFactory; - return this; - } - } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioServer.java b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioServer.java index 0869170027..8c76d6a950 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioServer.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioServer.java @@ -32,7 +32,8 @@ import org.miaixz.bus.socket.Handler; import org.miaixz.bus.socket.Message; import org.miaixz.bus.socket.Status; -import org.miaixz.bus.socket.buffer.*; +import org.miaixz.bus.socket.buffer.BufferPagePool; +import org.miaixz.bus.socket.buffer.VirtualBuffer; import org.miaixz.bus.socket.metric.channels.AsynchronousChannelProvider; import java.io.IOException; @@ -45,7 +46,7 @@ import java.nio.channels.CompletionHandler; import java.security.InvalidParameterException; import java.util.Map; -import java.util.function.Function; +import java.util.function.Supplier; /** * AIO服务端 @@ -64,10 +65,6 @@ public final class AioServer { * 调用AioClient的各setXX()方法,都是为了设置config的各配置项 */ private final Context context = new Context(); - /** - * 内存池 - */ - private BufferPagePool innerBufferPool = null; /** * 异步服务器套接字通道 */ @@ -79,16 +76,15 @@ public final class AioServer { /** * 是否开启低内存模式 */ - private boolean lowMemory; + private boolean lowMemory = true; /** - * 内存池 + * write 内存池 */ - private BufferPagePool bufferPool = null; + private BufferPagePool writeBufferPool = null; /** - * 虚拟缓冲区工厂 + * read 内存池 */ - private VirtualBufferFactory readBufferFactory = bufferPage -> bufferPage.allocate(context.getReadBufferSize()); - + private BufferPagePool readBufferPool = null; /** * 设置服务端启动必要参数配置 * @@ -120,10 +116,6 @@ public AioServer(String host, int port, Message message, Handler handl * @throws IOException IO异常 */ public void start() throws IOException { - if (bufferPool == null) { - this.bufferPool = context.getBufferFactory().create(); - this.innerBufferPool = bufferPool; - } asynchronousChannelGroup = new AsynchronousChannelProvider(lowMemory).openAsynchronousChannelGroup(context.getThreadNum(), r -> new Thread(r, "Socket:Thread-" + (threadSeqNumber++))); start(asynchronousChannelGroup); } @@ -135,9 +127,11 @@ public void start() throws IOException { */ public void start(AsynchronousChannelGroup asynchronousChannelGroup) throws IOException { try { - if (bufferPool == null) { - this.bufferPool = context.getBufferFactory().create(); - this.innerBufferPool = bufferPool; + if (writeBufferPool == null) { + this.writeBufferPool = BufferPagePool.DEFAULT_BUFFER_PAGE_POOL; + } + if (readBufferPool == null) { + this.readBufferPool = BufferPagePool.DEFAULT_BUFFER_PAGE_POOL; } this.serverSocketChannel = AsynchronousServerSocketChannel.open(asynchronousChannelGroup); @@ -162,7 +156,7 @@ public void start(AsynchronousChannelGroup asynchronousChannelGroup) throws IOEx } private void startAcceptThread() { - Function function = bufferPage -> readBufferFactory.newBuffer(bufferPage); + Supplier readBufferSupplier = () -> readBufferPool.allocateBufferPage().allocate(context.getReadBufferSize()); serverSocketChannel.accept(null, new CompletionHandler() { @Override public void completed(AsynchronousSocketChannel channel, Void attachment) { @@ -173,7 +167,7 @@ public void completed(AsynchronousSocketChannel channel, Void attachment) { failed(throwable, attachment); serverSocketChannel.accept(attachment, this); } finally { - createSession(channel, function); + createSession(channel, readBufferSupplier); } } @@ -188,10 +182,10 @@ public void failed(Throwable exc, Void attachment) { * 为每个新建立的连接创建Session对象 * * @param channel 当前已建立连接通道 - * @param function + * @param readBufferSupplier */ - private void createSession(AsynchronousSocketChannel channel, Function function) { - // 连接成功则构造Session对象 + private void createSession(AsynchronousSocketChannel channel, Supplier readBufferSupplier) { + //连接成功则构造AIOSession对象 TcpSession session = null; AsynchronousSocketChannel acceptChannel = channel; try { @@ -200,18 +194,18 @@ private void createSession(AsynchronousSocketChannel channel, Function 配置项类型 - * @return 当前AioServer对象 + * @return this */ public AioServer setOption(SocketOption socketOption, V value) { context.setOption(socketOption, value); @@ -269,7 +260,7 @@ public AioServer setOption(SocketOption socketOption, V value) { * 设置服务工作线程数,设置数值必须大于等于2 * * @param threadNum 线程数 - * @return 当前AioServer对象 + * @return this */ public AioServer setThreadNum(int threadNum) { if (threadNum <= 1) { @@ -284,11 +275,11 @@ public AioServer setThreadNum(int threadNum) { * * @param bufferSize 单个内存块大小 * @param bufferCapacity 内存块数量上限 - * @return 当前AioServer对象 + * @return this */ public AioServer setWriteBuffer(int bufferSize, int bufferCapacity) { - context.setWriteBufferSize(bufferSize); - context.setWriteBufferCapacity(bufferCapacity); + this.context.setWriteBufferSize(bufferSize); + this.context.setWriteBufferCapacity(bufferCapacity); return this; } @@ -296,50 +287,47 @@ public AioServer setWriteBuffer(int bufferSize, int bufferCapacity) { * 设置 backlog 大小 * * @param backlog backlog大小 - * @return 当前AioServer对象 + * @return this */ - public AioServer setBacklog(int backlog) { - context.setBacklog(backlog); + public final AioServer setBacklog(int backlog) { + this.context.setBacklog(backlog); return this; } /** - * 设置内存池 - * 通过该方法设置的内存池,在AioServer执行shutdown时不会触发内存池的释放。 - * 该方法适用于多个AioServer、AioClient共享内存池的场景。 - * 在启用内存池的情况下会有更好的性能表现 + * 设置读写内存池。 + * 该方法适用于多个AioQuickServer、AioQuickClient共享内存池的场景, + * 以获得更好的性能表现 * * @param bufferPool 内存池对象 - * @return 当前AioServer对象 + * @return this */ public AioServer setBufferPagePool(BufferPagePool bufferPool) { - this.bufferPool = bufferPool; - this.context.setBufferFactory(BufferFactory.DISABLED_BUFFER_FACTORY); - return this; + return setBufferPagePool(bufferPool, bufferPool); } /** - * 设置内存池的构造工厂 - * 通过工厂形式生成的内存池会强绑定到当前AioServer对象, - * 在AioServer执行shutdown时会释放内存池。 - * 在启用内存池的情况下会有更好的性能表现 + * 设置读写内存池。 + * 该方法适用于多个AioQuickServer、AioQuickClient共享内存池的场景, + * 以获得更好的性能表现 * - * @param bufferFactory 内存池工厂 - * @return 当前AioServer对象 + * @param readBufferPool 读内存池对象 + * @param writeBufferPool 写内存池对象 + * @return this */ - public AioServer setBufferFactory(BufferFactory bufferFactory) { - this.context.setBufferFactory(bufferFactory); - this.bufferPool = null; - return this; - } - - public AioServer setReadBufferFactory(VirtualBufferFactory readBufferFactory) { - this.readBufferFactory = readBufferFactory; + public AioServer setBufferPagePool(BufferPagePool readBufferPool, BufferPagePool writeBufferPool) { + this.writeBufferPool = writeBufferPool; + this.readBufferPool = readBufferPool; return this; } - public AioServer setLowMemory(boolean lowMemory) { - this.lowMemory = lowMemory; + /** + * 禁用低代码模式 + * + * @return this + */ + public AioServer disableLowMemory() { + this.lowMemory = false; return this; } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/TcpSession.java b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/TcpSession.java index 5c8ff7a61e..9f2a986742 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/TcpSession.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/TcpSession.java @@ -42,7 +42,7 @@ import java.nio.channels.AsynchronousSocketChannel; import java.nio.channels.CompletionHandler; import java.util.concurrent.TimeUnit; -import java.util.function.Function; +import java.util.function.Supplier; /** * AIO传输层会话 @@ -77,10 +77,6 @@ public final class TcpSession extends Session { * 输出流 */ private final WriteBuffer byteBuf; - /** - * 缓冲页 - */ - private final BufferPage bufferPage; /** * 服务上下文 */ @@ -88,7 +84,7 @@ public final class TcpSession extends Session { /** * 缓冲函数 */ - private final Function function; + private final Supplier readBufferSupplier; /** * 读缓冲 * 大小取决于AioClient/AioServer设置的setReadBufferSize @@ -106,19 +102,18 @@ public final class TcpSession extends Session { /** * @param channel Socket通道 */ - TcpSession(AsynchronousSocketChannel channel, Context context, BufferPage bufferPage, Function function) { + public TcpSession(AsynchronousSocketChannel channel, Context context, BufferPage writeBufferPage, Supplier readBufferSupplier) { this.channel = channel; this.context = context; - this.bufferPage = bufferPage; - this.function = function; - byteBuf = new WriteBuffer(bufferPage, this::continueWrite, this.context.getWriteBufferSize(), this.context.getWriteBufferCapacity()); - // 触发状态机 + this.readBufferSupplier = readBufferSupplier; + byteBuf = new WriteBuffer(writeBufferPage, this::continueWrite, this.context.getWriteBufferSize(), this.context.getWriteBufferCapacity()); + //触发状态机 this.context.getProcessor().stateEvent(this, Status.NEW_SESSION, null); doRead(); } void doRead() { - this.readBuffer = function.apply(bufferPage); + this.readBuffer = readBufferSupplier.get(); this.readBuffer.buffer().flip(); signalRead(); } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpBootstrap.java b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpBootstrap.java index 93be01d2de..5a4aadb967 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpBootstrap.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpBootstrap.java @@ -31,7 +31,6 @@ import org.miaixz.bus.socket.Handler; import org.miaixz.bus.socket.Message; import org.miaixz.bus.socket.Worker; -import org.miaixz.bus.socket.buffer.BufferFactory; import org.miaixz.bus.socket.buffer.BufferPagePool; import java.io.IOException; @@ -50,14 +49,6 @@ public class UdpBootstrap { * 服务上下文 */ private final Context context = new Context(); - /** - * 内存池 - */ - private BufferPagePool bufferPool; - /** - * 缓冲页池 - */ - private BufferPagePool innerBufferPool = null; /** * 工作者 */ @@ -66,6 +57,14 @@ public class UdpBootstrap { * 内部工作者 */ private boolean innerWorker = false; + /** + * write 内存池 + */ + private BufferPagePool writeBufferPool = null; + /** + * read 内存池 + */ + private BufferPagePool readBufferPool = null; /** * 构造 @@ -118,14 +117,18 @@ public UdpChannel open(int port) throws IOException { */ public UdpChannel open(String host, int port) throws IOException { // 初始化内存池 - if (bufferPool == null) { - this.bufferPool = context.getBufferFactory().create(); - this.innerBufferPool = bufferPool; + //初始化内存池 + if (writeBufferPool == null) { + this.writeBufferPool = BufferPagePool.DEFAULT_BUFFER_PAGE_POOL; } + if (readBufferPool == null) { + this.readBufferPool = BufferPagePool.DEFAULT_BUFFER_PAGE_POOL; + } + // 初始化工作线程 if (worker == null) { innerWorker = true; - worker = new Worker(bufferPool, context.getThreadNum()); + worker = new Worker(readBufferPool.allocateBufferPage(), writeBufferPool, this.context.getThreadNum()); } @@ -135,7 +138,7 @@ public UdpChannel open(String host, int port) throws IOException { InetSocketAddress inetSocketAddress = host == null ? new InetSocketAddress(port) : new InetSocketAddress(host, port); channel.socket().bind(inetSocketAddress); } - return new UdpChannel(channel, worker, context, bufferPool.allocateBufferPage()); + return new UdpChannel(channel, worker, this.context, writeBufferPool.allocateBufferPage()); } private synchronized void initWorker() { @@ -148,9 +151,6 @@ public void shutdown() { if (innerWorker) { worker.shutdown(); } - if (innerBufferPool != null) { - innerBufferPool.release(); - } } /** @@ -183,23 +183,8 @@ public final UdpBootstrap setThreadNum(int num) { * @return 当前AioServer对象 */ public final UdpBootstrap setBufferPagePool(BufferPagePool bufferPool) { - this.bufferPool = bufferPool; - this.context.setBufferFactory(BufferFactory.DISABLED_BUFFER_FACTORY); - return this; - } - - /** - * 设置内存池的构造工厂 - * 通过工厂形式生成的内存池会强绑定到当前UdpBootstrap对象, - * 在UdpBootstrap执行shutdown时会释放内存池。 - * 在启用内存池的情况下会有更好的性能表现 - * - * @param bufferFactory 内存池工厂 - * @return 当前AioServer对象 - */ - public final UdpBootstrap setBufferFactory(BufferFactory bufferFactory) { - this.context.setBufferFactory(bufferFactory); - this.bufferPool = null; + this.readBufferPool = bufferPool; + this.writeBufferPool = bufferPool; return this; } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpChannel.java b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpChannel.java index bc5eba5f63..852cb99182 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpChannel.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpChannel.java @@ -59,7 +59,7 @@ public final class UdpChannel { /** * 缓冲页 */ - private final BufferPage bufferPage; + private final BufferPage writeBufferPage; /** * 真实的UDP通道 */ @@ -81,14 +81,14 @@ public final class UdpChannel { */ private ResponseUnit failResponseUnit; - UdpChannel(final DatagramChannel channel, Context context, BufferPage bufferPage) { + UdpChannel(final DatagramChannel channel, Context context, BufferPage writeBufferPage) { this.channel = channel; - this.bufferPage = bufferPage; + this.writeBufferPage = writeBufferPage; this.context = context; } - UdpChannel(final DatagramChannel channel, Worker worker, Context context, BufferPage bufferPage) { - this(channel, context, bufferPage); + UdpChannel(final DatagramChannel channel, Worker worker, Context context, BufferPage writeBufferPage) { + this(channel, context, writeBufferPage); responseTasks = new ConcurrentLinkedQueue<>(); this.worker = worker; worker.addRegister(selector -> { @@ -169,7 +169,7 @@ private boolean send(VirtualBuffer virtualBuffer, UdpSession session) { * 建立与远程服务的连接会话,通过Session可进行数据传输 */ public Session connect(SocketAddress remote) { - return new UdpSession(this, remote, bufferPage); + return new UdpSession(this, remote, writeBufferPage); } public Session connect(String host, int port) { @@ -204,11 +204,6 @@ public void close() { } } - public BufferPage getBufferPage() { - return bufferPage; - } - - public DatagramChannel getChannel() { return channel; } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpSession.java b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpSession.java index 6074ffd9c2..fc63f9ceb6 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpSession.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/UdpSession.java @@ -49,10 +49,10 @@ public final class UdpSession extends Session { private final WriteBuffer byteBuf; - public UdpSession(final UdpChannel udpChannel, final SocketAddress remote, BufferPage bufferPage) { + public UdpSession(final UdpChannel udpChannel, final SocketAddress remote, BufferPage writeBufferPage) { this.udpChannel = udpChannel; this.remote = remote; - this.byteBuf = new WriteBuffer(bufferPage, buffer -> udpChannel.write(buffer, UdpSession.this), udpChannel.context.getWriteBufferSize(), 1); + this.byteBuf = new WriteBuffer(writeBufferPage, buffer -> udpChannel.write(buffer, this), udpChannel.context.getWriteBufferSize(), 1); udpChannel.context.getProcessor().stateEvent(this, Status.NEW_SESSION, null); } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/buffer/BufferPagePool.java b/bus-socket/src/main/java/org/miaixz/bus/socket/buffer/BufferPagePool.java index cd332209db..a0f5886b6b 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/buffer/BufferPagePool.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/buffer/BufferPagePool.java @@ -48,6 +48,9 @@ public final class BufferPagePool { thread.setDaemon(true); return thread; }); + + public static final BufferPagePool DEFAULT_BUFFER_PAGE_POOL = new BufferPagePool(0, 1, false); + /** * 内存页游标 */ diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/buffer/WriteBuffer.java b/bus-socket/src/main/java/org/miaixz/bus/socket/buffer/WriteBuffer.java index 45015f35e4..55ca110104 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/buffer/WriteBuffer.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/buffer/WriteBuffer.java @@ -251,6 +251,50 @@ public synchronized void write(byte[] bytes, int offset, int len, Consumer consumer) throws IOException { + write(bytes, 0, bytes.length, consumer); + } + + public synchronized void transferFrom(ByteBuffer byteBuffer, Consumer consumer) throws IOException { + if (!byteBuffer.hasRemaining()) { + throw new IllegalStateException("none remaining byteBuffer"); + } + if (writeInBuf != null && writeInBuf.buffer().position() > 0) { + flushWriteBuffer(true); + } + if (completionConsumer != null) { + throw new WritePendingException(); + } + if (writeInBuf != null && writeInBuf.buffer().position() > 0) { + throw new IllegalStateException(); + } + this.completionConsumer = consumer; + VirtualBuffer wrap = VirtualBuffer.wrap(byteBuffer); + if (count == 0 && semaphore.tryAcquire()) { + writeConsumer.accept(wrap); + return; + } + try { + while (count == items.length) { + this.wait(); + // 防止因close诱发内存泄露 + if (closed) { + return; + } + } + + items[putIndex] = wrap; + if (++putIndex == items.length) { + putIndex = 0; + } + count++; + } catch (InterruptedException e1) { + throw new RuntimeException(e1); + } finally { + flush(); + } + } + /** * 初始化8字节的缓存数值 */ diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/metric/channels/AsynchronousChannelGroup.java b/bus-socket/src/main/java/org/miaixz/bus/socket/metric/channels/AsynchronousChannelGroup.java index a743b2084d..d6000c7111 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/metric/channels/AsynchronousChannelGroup.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/metric/channels/AsynchronousChannelGroup.java @@ -131,7 +131,7 @@ protected AsynchronousChannelGroup(AsynchronousChannelProvider provider, Executo * @param opt 移除的事件 */ public static void removeOps(SelectionKey selectionKey, int opt) { - if ((selectionKey.interestOps() & opt) != 0) { + if (selectionKey.isValid() && (selectionKey.interestOps() & opt) != 0) { selectionKey.interestOps(selectionKey.interestOps() & ~opt); } } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/plugin/BufferPageMonitorPlugin.java b/bus-socket/src/main/java/org/miaixz/bus/socket/plugin/BufferPageMonitorPlugin.java index b3bd8d524e..6375f92194 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/plugin/BufferPageMonitorPlugin.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/plugin/BufferPageMonitorPlugin.java @@ -60,6 +60,17 @@ public BufferPageMonitorPlugin(AioServer server, int seconds) { init(); } + private static void dumpBufferPool(BufferPagePool writeBufferPool) throws NoSuchFieldException, IllegalAccessException { + Field field = BufferPagePool.class.getDeclaredField("bufferPages"); + field.setAccessible(true); + BufferPage[] pages = (BufferPage[]) field.get(writeBufferPool); + String logger = ""; + for (BufferPage page : pages) { + logger += "\r\n" + page.toString(); + } + Logger.info(logger); + } + private void init() { future = HashedWheelTimer.DEFAULT_TIMER.scheduleWithFixedDelay(() -> { { @@ -69,22 +80,26 @@ private void init() { return; } try { - Field bufferPoolField = AioServer.class.getDeclaredField("bufferPool"); + Field bufferPoolField = AioServer.class.getDeclaredField("writeBufferPool"); bufferPoolField.setAccessible(true); - BufferPagePool pagePool = (BufferPagePool) bufferPoolField.get(server); - if (pagePool == null) { + BufferPagePool writeBufferPool = (BufferPagePool) bufferPoolField.get(server); + if (writeBufferPool == null) { Logger.error("server maybe has not started!"); shutdown(); return; } - Field field = BufferPagePool.class.getDeclaredField("bufferPages"); - field.setAccessible(true); - BufferPage[] pages = (BufferPage[]) field.get(pagePool); - String logger = ""; - for (BufferPage page : pages) { - logger += "\r\n" + page.toString(); + Field readBufferPoolField = AioServer.class.getDeclaredField("readBufferPool"); + readBufferPoolField.setAccessible(true); + BufferPagePool readBufferPool = (BufferPagePool) readBufferPoolField.get(server); + + if (readBufferPool != null && readBufferPool != writeBufferPool) { + Logger.info("dump writeBuffer"); + dumpBufferPool(writeBufferPool); + Logger.info("dump readBuffer"); + dumpBufferPool(readBufferPool); + } else { + dumpBufferPool(writeBufferPool); } - Logger.info(logger); } catch (Exception e) { Logger.error("", e); } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/plugin/SslPlugin.java b/bus-socket/src/main/java/org/miaixz/bus/socket/plugin/SslPlugin.java index f9012c690f..952482bed7 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/plugin/SslPlugin.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/plugin/SslPlugin.java @@ -27,7 +27,6 @@ */ package org.miaixz.bus.socket.plugin; -import org.miaixz.bus.socket.buffer.BufferFactory; import org.miaixz.bus.socket.buffer.BufferPagePool; import org.miaixz.bus.socket.secure.ssl.ClientAuth; import org.miaixz.bus.socket.secure.ssl.SslAsynchronousSocketChannel; @@ -52,11 +51,11 @@ public final class SslPlugin extends AbstractPlugin { private final BufferPagePool bufferPagePool; public SslPlugin(SSLContextFactory factory, Consumer consumer) throws Exception { - this(factory, consumer, BufferFactory.DISABLED_BUFFER_FACTORY.create()); + this(factory, consumer, BufferPagePool.DEFAULT_BUFFER_PAGE_POOL); } public SslPlugin(SSLContextFactory factory) throws Exception { - this(factory, sslEngine -> sslEngine.setUseClientMode(false), BufferFactory.DISABLED_BUFFER_FACTORY.create()); + this(factory, sslEngine -> sslEngine.setUseClientMode(false), BufferPagePool.DEFAULT_BUFFER_PAGE_POOL); } public SslPlugin(SSLContextFactory factory, Consumer consumer, BufferPagePool bufferPagePool) throws Exception { @@ -65,7 +64,7 @@ public SslPlugin(SSLContextFactory factory, Consumer consumer, Buffer } public SslPlugin(ClientSSLContextFactory factory) throws Exception { - this(factory, BufferFactory.DISABLED_BUFFER_FACTORY.create()); + this(factory, BufferPagePool.DEFAULT_BUFFER_PAGE_POOL); } public SslPlugin(ClientSSLContextFactory factory, BufferPagePool bufferPagePool) throws Exception { @@ -73,7 +72,7 @@ public SslPlugin(ClientSSLContextFactory factory, BufferPagePool bufferPagePool) } public SslPlugin(ServerSSLContextFactory factory, ClientAuth clientAuth) throws Exception { - this(factory, clientAuth, BufferFactory.DISABLED_BUFFER_FACTORY.create()); + this(factory, clientAuth, BufferPagePool.DEFAULT_BUFFER_PAGE_POOL); } public SslPlugin(ServerSSLContextFactory factory, ClientAuth clientAuth, BufferPagePool bufferPagePool) throws Exception { diff --git a/bus-spring/pom.xml b/bus-spring/pom.xml index 811e25c61f..5a2d2ab5ce 100755 --- a/bus-spring/pom.xml +++ b/bus-spring/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 3.3.1 diff --git a/bus-starter/pom.xml b/bus-starter/pom.xml index 764d80dfc7..526afbaa4b 100755 --- a/bus-starter/pom.xml +++ b/bus-starter/pom.xml @@ -72,9 +72,9 @@ 21 21 3.3.1 - 1.18.32 - 3.2.0 - 6.1.0-M2 + 1.18.34 + 3.2.0 + 6.1.0 1.9.22 4.5.8 7.0.0 @@ -220,13 +220,13 @@ jakarta.persistence jakarta.persistence-api - ${persistence.version} + ${jakarta.persistence.version} true jakarta.servlet jakarta.servlet-api - ${servlet.version} + ${jakarta.servlet.version} true diff --git a/bus-storage/pom.xml b/bus-storage/pom.xml index 815ccfc07b..a2406c8a17 100755 --- a/bus-storage/pom.xml +++ b/bus-storage/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 3.17.4 0.10.314 3.24.3 diff --git a/bus-tracer/pom.xml b/bus-tracer/pom.xml index 4a25aadcd7..7546b95b6f 100755 --- a/bus-tracer/pom.xml +++ b/bus-tracer/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 diff --git a/bus-validate/pom.xml b/bus-validate/pom.xml index 5f6e1853d4..d3e5aec82e 100755 --- a/bus-validate/pom.xml +++ b/bus-validate/pom.xml @@ -71,7 +71,7 @@ UTF-8 21 21 - 1.18.32 + 1.18.34 From 73e7d13371ae5e5062d5719104066d94e4ff6fc1 Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Mon, 8 Jul 2024 20:55:17 +0800 Subject: [PATCH 08/16] update jackson version --- bus-extra/pom.xml | 2 +- bus-gitlab/pom.xml | 2 +- bus-parent/pom.xml | 4 ++-- bus-storage/pom.xml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bus-extra/pom.xml b/bus-extra/pom.xml index 064231d940..d0359e4ce0 100644 --- a/bus-extra/pom.xml +++ b/bus-extra/pom.xml @@ -74,7 +74,7 @@ 1.18.34 2.0.49 2.11.0 - 2.17.1 + 2.17.2 1.1.8 2.5.1 2.0.3.RELEASE diff --git a/bus-gitlab/pom.xml b/bus-gitlab/pom.xml index 7625eb7009..b3c3c6c7f0 100755 --- a/bus-gitlab/pom.xml +++ b/bus-gitlab/pom.xml @@ -73,7 +73,7 @@ 21 3.1.1 6.1.0 - 2.17.1 + 2.17.2 diff --git a/bus-parent/pom.xml b/bus-parent/pom.xml index 1908a1eef2..d299c42696 100755 --- a/bus-parent/pom.xml +++ b/bus-parent/pom.xml @@ -92,7 +92,7 @@ 1.78.1 2.0.49 2.11.0 - 2.17.1 + 2.17.2 1.1.8 2.5.1 2.0.3.RELEASE @@ -115,7 +115,7 @@ 4.0.66 8.4.0 3.1.1 - 2.17.1 + 2.17.2 5.14.0 1.8.7 1.12.23 diff --git a/bus-storage/pom.xml b/bus-storage/pom.xml index a2406c8a17..41f2973d7b 100755 --- a/bus-storage/pom.xml +++ b/bus-storage/pom.xml @@ -80,7 +80,7 @@ 7.15.1 5.6.213 4.2.3 - 2.17.1 + 2.17.2 4.12.0 From 8ee2fddeb67b3f69f2812cc138858eb6aeae59a4 Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Fri, 12 Jul 2024 18:22:22 +0800 Subject: [PATCH 09/16] update jackson version --- bus-parent/pom.xml | 60 +++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/bus-parent/pom.xml b/bus-parent/pom.xml index d299c42696..7b828fe586 100755 --- a/bus-parent/pom.xml +++ b/bus-parent/pom.xml @@ -39,13 +39,13 @@ ${project.artifactId} Bus parent https://github.com/839128/bus + 2015 org.springframework.boot spring-boot-dependencies 3.3.1 - 2015 @@ -139,7 +139,7 @@ 7.15.1 5.6.213 4.2.3 - 8.0.5 + 8.0.5 3.3.1 @@ -148,142 +148,142 @@ org.miaixz bus-all - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-base - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-cache - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-core - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-cron - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-crypto - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-extra - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-gitlab - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-goalie - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-health - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-http - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-image - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-limiter - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-logger - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-mapper - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-oauth - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-office - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-opencv - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-pager - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-proxy - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-sensitive - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-setting - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-socket - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-starter - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-storage - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-tracer - ${bus.version} + ${miaixz.bus.version} org.miaixz bus-validate - ${bus.version} + ${miaixz.bus.version} org.miaixz lancia - ${bus.version} + ${miaixz.bus.version} org.projectlombok From 286ca36856ececeaa0fbcbee8c2176ad51c950a6 Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Mon, 15 Jul 2024 12:01:44 +0800 Subject: [PATCH 10/16] =?UTF-8?q?update:=201.=20=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E4=BA=86getYear()=E3=80=81getMonth()=E3=80=81getDay()=E7=9A=84?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=B1=BB=E5=9E=8B=EF=BC=8C=E9=9D=9E=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7=E6=9B=B4=E6=96=B0=EF=BC=9B=202.=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=90=89=E7=A5=9E=E5=AE=9C=E8=B6=8B=E3=80=81=E5=87=B6?= =?UTF-8?q?=E7=A5=9E=E5=AE=9C=E5=BF=8C=EF=BC=9B=203.=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=AF=8F=E6=97=A5=E5=AE=9C=E5=BF=8C=E3=80=81=E6=97=B6=E8=BE=B0?= =?UTF-8?q?=E5=AE=9C=E5=BF=8C=EF=BC=9B=20fix:=20=E5=86=9C=E5=8E=86?= =?UTF-8?q?=E6=97=A5=E8=8E=B7=E5=8F=96=E6=97=B6=E8=BE=B0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=81=87=E9=97=B0=E6=9C=88=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/miaixz/bus/cache/Complex.java | 6 +- .../java/org/miaixz/bus/cache/Manage.java | 4 +- .../bus/cache/magic/MultiCacheReader.java | 4 +- .../bus/cache/magic/SingleCacheReader.java | 4 +- .../main/java/org/miaixz/bus/core/Binder.java | 14 +- .../{BeanInfoCache.java => BeanCache.java} | 2 +- .../org/miaixz/bus/core/beans/DynaBean.java | 1 + ...{NullWrapperBean.java => NullWrapper.java} | 4 +- .../core/beans/copier/BeanToBeanCopier.java | 2 +- .../core/beans/copier/BeanToMapCopier.java | 2 +- .../bus/core/beans/copier/CopyOptions.java | 2 +- .../core/beans/copier/MapToBeanCopier.java | 2 +- .../copier/ValueProviderToBeanCopier.java | 2 +- .../copier/provider/BeanValueProvider.java | 4 +- .../{path => desc}/AbstractBeanDesc.java | 38 +- .../bus/core/beans/{ => desc}/BeanDesc.java | 33 +- .../bus/core/beans/desc/BeanDescFactory.java | 85 ++ .../bus/core/beans/{ => desc}/PropDesc.java | 26 +- .../bus/core/beans/desc/RecordBeanDesc.java | 80 ++ .../bus/core/beans/desc/SimpleBeanDesc.java | 119 ++ .../core/beans/{ => desc}/StrictBeanDesc.java | 24 +- .../bus/core/center/CollectionStream.java | 2 +- .../bus/core/center/CollectionValidator.java | 323 +++++ .../bus/core/center/array/ArrayValidator.java | 1271 +++++++++++++++++ .../bus/core/center/array/PrimitiveArray.java | 510 +------ .../miaixz/bus/core/center/date/Calendar.java | 4 +- .../bus/core/center/date/culture/Holiday.java | 4 +- .../bus/core/center/date/culture/cn/God.java | 115 ++ .../core/center/date/culture/cn/Taboo.java | 166 +++ .../date/culture/cn/birth/DecadeFortune.java | 2 +- .../date/culture/cn/birth/EightChar.java | 8 +- .../center/date/culture/cn/birth/Fortune.java | 2 +- .../impl/China95ChildLimitProvider.java | 7 +- .../impl/DefaultChildLimitProvider.java | 7 +- .../date/culture/cn/sixty/HeavenStem.java | 15 +- .../center/date/culture/lunar/LunarDay.java | 102 +- .../date/culture/lunar/LunarFestival.java | 11 +- .../center/date/culture/lunar/LunarHour.java | 75 +- .../center/date/culture/lunar/LunarMonth.java | 19 +- .../center/date/culture/lunar/LunarWeek.java | 32 +- .../center/date/culture/lunar/LunarYear.java | 2 +- .../center/date/culture/package-info.java | 5 +- .../center/date/culture/solar/SolarDay.java | 68 +- .../date/culture/solar/SolarFestival.java | 6 +- .../date/culture/solar/SolarHalfYear.java | 21 +- .../center/date/culture/solar/SolarMonth.java | 29 +- .../date/culture/solar/SolarQuarter.java | 19 +- .../center/date/culture/solar/SolarTime.java | 59 +- .../center/date/culture/solar/SolarWeek.java | 36 +- .../core/center/date/format/FormatPeriod.java | 2 +- .../date/format/parser/RegexDateParser.java | 2 +- .../{LambdaInfo.java => LambdaX.java} | 4 +- .../core/center/function/PredicateUOX.java | 43 + .../center/iterator/IteratorValidator.java | 373 +++++ .../bus/core/center/map/Dictionary.java | 6 +- .../miaixz/bus/core/center/map/MapGets.java | 2 +- .../map/MapValidator.java} | 51 +- .../core/center/object/ObjectValidator.java | 317 ++++ .../bus/core/center/regex/RegexValidator.java | 111 ++ .../bus/core/center/set/SetValidator.java | 43 + .../java/org/miaixz/bus/core/codec/Luhn.java | 8 +- .../miaixz/bus/core/codec/PercentCodec.java | 2 +- .../bus/core/compare/ExplorerCompare.java | 8 +- .../bus/core/convert/ArrayConverter.java | 6 +- .../bus/core/convert/BeanConverter.java | 2 +- .../bus/core/convert/CompositeConverter.java | 5 + .../org/miaixz/bus/core/convert/Convert.java | 13 + .../miaixz/bus/core/instance/Instance.java | 2 +- .../bus/core/instance/InstanceFactory.java | 2 +- .../miaixz/bus/core/instance/Instances.java | 2 +- .../bus/core/io/compress/ZipWriter.java | 2 +- .../org/miaixz/bus/core/io/file/FileName.java | 22 +- .../org/miaixz/bus/core/lang/Validator.java | 2 +- .../bus/core/{ => lang}/annotation/Alias.java | 4 +- .../bus/core/{ => lang}/annotation/Async.java | 2 +- .../core/{ => lang}/annotation/Binding.java | 2 +- .../core/{ => lang}/annotation/Copyable.java | 2 +- .../core/{ => lang}/annotation/GuardedBy.java | 2 +- .../core/{ => lang}/annotation/Ignore.java | 2 +- .../core/{ => lang}/annotation/Immutable.java | 2 +- .../core/{ => lang}/annotation/Inject.java | 2 +- .../bus/core/{ => lang}/annotation/Label.java | 2 +- .../bus/core/{ => lang}/annotation/Lazy.java | 2 +- .../core/{ => lang}/annotation/Metadata.java | 2 +- .../bus/core/{ => lang}/annotation/Named.java | 2 +- .../{ => lang}/annotation/NotThreadSafe.java | 2 +- .../bus/core/{ => lang}/annotation/Order.java | 2 +- .../core/{ => lang}/annotation/Qualifier.java | 2 +- .../bus/core/{ => lang}/annotation/SPI.java | 2 +- .../core/{ => lang}/annotation/Scheduled.java | 2 +- .../bus/core/{ => lang}/annotation/Scope.java | 2 +- .../core/{ => lang}/annotation/Singleton.java | 2 +- .../{ => lang}/annotation/ThreadSafe.java | 2 +- .../bus/core/{ => lang}/annotation/Trace.java | 2 +- .../core/{ => lang}/annotation/Values.java | 2 +- .../core/{ => lang}/annotation/env/Dev.java | 2 +- .../core/{ => lang}/annotation/env/Prod.java | 2 +- .../annotation/env/package-info.java | 2 +- .../{ => lang}/annotation/package-info.java | 2 +- .../annotation/resolve/AnnotatedElements.java | 10 +- .../annotation/resolve/AnnotationMapping.java | 4 +- .../resolve/AnnotationMappingProxy.java | 2 +- .../annotation/resolve/AnnotationProxy.java | 4 +- .../resolve/GenericAnnotationMapping.java | 2 +- .../RepeatableAnnotationCollector.java | 2 +- .../resolve/ResolvedAnnotationMapping.java | 6 +- .../elements/CombinationAnnotatedElement.java | 2 +- .../HierarchicalAnnotatedElements.java | 2 +- .../elements/MetaAnnotatedElement.java | 8 +- .../RepeatableMetaAnnotatedElement.java | 6 +- .../resolve/elements/package-info.java | 2 +- .../annotation/resolve/package-info.java | 2 +- .../lang/exception/IllegalPathException.java | 127 ++ .../bus/core/lang/reflect/ClassScanner.java | 2 +- .../bus/core/lang/reflect/JdkProxy.java | 154 ++ .../lang/reflect/method/MethodMatcher.java | 9 +- .../org/miaixz/bus/core/net/url/UrlPath.java | 13 +- .../org/miaixz/bus/core/net/url/UrlQuery.java | 2 +- .../org/miaixz/bus/core/text/CharsBacker.java | 343 +++-- ...ringValidator.java => CharsValidator.java} | 159 ++- .../miaixz/bus/core/text/StringJoiner.java | 4 +- .../miaixz/bus/core/text/StringSplitter.java | 3 +- .../miaixz/bus/core/text/StringTrimer.java | 2 +- .../text/placeholder/PlaceholderParser.java | 8 +- .../template/NamedStringTemplate.java | 21 +- .../core/text/replacer/CharRangeReplacer.java | 6 +- .../core/text/replacer/SearchReplacer.java | 6 +- .../text/replacer/StringRangeReplacer.java | 6 +- .../java/org/miaixz/bus/core/xyz/AnnoKit.java | 10 +- .../org/miaixz/bus/core/xyz/ArrayKit.java | 705 --------- .../java/org/miaixz/bus/core/xyz/BeanKit.java | 49 +- .../org/miaixz/bus/core/xyz/ClassKit.java | 6 +- .../java/org/miaixz/bus/core/xyz/CollKit.java | 281 +--- .../org/miaixz/bus/core/xyz/EscapeKit.java | 2 +- .../org/miaixz/bus/core/xyz/FieldKit.java | 2 +- .../java/org/miaixz/bus/core/xyz/FileKit.java | 2 +- .../org/miaixz/bus/core/xyz/IteratorKit.java | 326 +---- .../org/miaixz/bus/core/xyz/LambdaKit.java | 18 +- .../java/org/miaixz/bus/core/xyz/MapKit.java | 33 - .../org/miaixz/bus/core/xyz/MethodKit.java | 24 +- .../org/miaixz/bus/core/xyz/ObjectKit.java | 238 +-- .../org/miaixz/bus/core/xyz/PatternKit.java | 131 +- .../org/miaixz/bus/core/xyz/ResourceKit.java | 2 +- .../org/miaixz/bus/core/xyz/StringKit.java | 77 - .../java/org/miaixz/bus/core/xyz/UrlKit.java | 10 +- .../java/org/miaixz/bus/core/xyz/XmlKit.java | 4 +- .../metric/BouncyCastleServiceProvider.java | 10 + bus-extra/pom.xml | 2 +- .../bus/extra/image/gif/GifDecoder.java | 7 +- .../provider/analysis/AnalysisProvider.java | 2 +- .../extra/nlp/provider/ansj/AnsjProvider.java | 2 +- .../nlp/provider/hanlp/HanLPProvider.java | 2 +- .../nlp/provider/jcseg/JcsegProvider.java | 2 +- .../nlp/provider/jieba/JiebaProvider.java | 2 +- .../nlp/provider/mynlp/MynlpProvider.java | 2 +- .../extra/nlp/provider/word/WordProvider.java | 2 +- .../provider/beetl/BeetlProvider.java | 3 + .../freemarker/FreemarkerProvider.java | 3 + .../provider/thymeleaf/ThymeleafProvider.java | 3 + .../java/org/miaixz/bus/health/Builder.java | 2 +- .../java/org/miaixz/bus/health/Config.java | 2 +- .../java/org/miaixz/bus/health/Executor.java | 2 +- .../java/org/miaixz/bus/health/Formats.java | 2 +- .../java/org/miaixz/bus/health/IdGroup.java | 2 +- .../java/org/miaixz/bus/health/Memoizer.java | 2 +- .../java/org/miaixz/bus/health/Parsing.java | 14 +- .../health/builtin/hardware/Baseboard.java | 2 +- .../builtin/hardware/CentralProcessor.java | 4 +- .../builtin/hardware/ComputerSystem.java | 2 +- .../bus/health/builtin/hardware/Display.java | 2 +- .../bus/health/builtin/hardware/Firmware.java | 2 +- .../health/builtin/hardware/GlobalMemory.java | 2 +- .../health/builtin/hardware/GraphicsCard.java | 2 +- .../health/builtin/hardware/HWDiskStore.java | 2 +- .../health/builtin/hardware/HWPartition.java | 2 +- .../hardware/HardwareAbstractionLayer.java | 2 +- .../builtin/hardware/LogicalVolumeGroup.java | 2 +- .../health/builtin/hardware/NetworkIF.java | 2 +- .../builtin/hardware/PhysicalMemory.java | 2 +- .../health/builtin/hardware/PowerSource.java | 2 +- .../bus/health/builtin/hardware/Sensors.java | 2 +- .../health/builtin/hardware/SoundCard.java | 2 +- .../health/builtin/hardware/UsbDevice.java | 2 +- .../builtin/hardware/VirtualMemory.java | 2 +- .../hardware/common/AbstractBaseboard.java | 2 +- .../common/AbstractCentralProcessor.java | 2 +- .../common/AbstractComputerSystem.java | 2 +- .../hardware/common/AbstractDisplay.java | 2 +- .../hardware/common/AbstractFirmware.java | 2 +- .../hardware/common/AbstractGlobalMemory.java | 2 +- .../hardware/common/AbstractGraphicsCard.java | 2 +- .../hardware/common/AbstractHWDiskStore.java | 2 +- .../AbstractHardwareAbstractionLayer.java | 2 +- .../hardware/common/AbstractNetworkIF.java | 2 +- .../hardware/common/AbstractPowerSource.java | 2 +- .../hardware/common/AbstractSensors.java | 2 +- .../hardware/common/AbstractSoundCard.java | 2 +- .../hardware/common/AbstractUsbDevice.java | 2 +- .../common/AbstractVirtualMemory.java | 2 +- .../health/builtin/software/FileSystem.java | 2 +- .../software/InternetProtocolStats.java | 4 +- .../builtin/software/NetworkParams.java | 2 +- .../builtin/software/OSDesktopWindow.java | 2 +- .../health/builtin/software/OSFileStore.java | 2 +- .../health/builtin/software/OSProcess.java | 2 +- .../health/builtin/software/OSService.java | 2 +- .../health/builtin/software/OSSession.java | 2 +- .../builtin/software/OperatingSystem.java | 4 +- .../software/common/AbstractFileSystem.java | 2 +- .../common/AbstractNetworkParams.java | 2 +- .../software/common/AbstractOSFileStore.java | 2 +- .../software/common/AbstractOSProcess.java | 2 +- .../software/common/AbstractOSThread.java | 2 +- .../org/miaixz/bus/health/linux/DevPath.java | 2 +- .../org/miaixz/bus/health/linux/ProcPath.java | 2 +- .../org/miaixz/bus/health/linux/SysPath.java | 2 +- .../bus/health/linux/driver/Devicetree.java | 2 +- .../bus/health/linux/driver/Dmidecode.java | 2 +- .../miaixz/bus/health/linux/driver/Lshal.java | 2 +- .../miaixz/bus/health/linux/driver/Lshw.java | 2 +- .../miaixz/bus/health/linux/driver/Sysfs.java | 2 +- .../miaixz/bus/health/linux/driver/Who.java | 2 +- .../bus/health/linux/driver/proc/Auxv.java | 2 +- .../bus/health/linux/driver/proc/CpuInfo.java | 2 +- .../bus/health/linux/driver/proc/CpuStat.java | 2 +- .../health/linux/driver/proc/DiskStats.java | 2 +- .../health/linux/driver/proc/ProcessStat.java | 2 +- .../bus/health/linux/driver/proc/UpTime.java | 2 +- .../health/linux/hardware/LinuxBaseboard.java | 2 +- .../linux/hardware/LinuxCentralProcessor.java | 2 +- .../linux/hardware/LinuxComputerSystem.java | 2 +- .../health/linux/hardware/LinuxFirmware.java | 2 +- .../linux/hardware/LinuxGlobalMemory.java | 2 +- .../linux/hardware/LinuxGraphicsCard.java | 2 +- .../linux/hardware/LinuxHWDiskStore.java | 2 +- .../LinuxHardwareAbstractionLayer.java | 2 +- .../health/linux/hardware/LinuxNetworkIF.java | 2 +- .../linux/hardware/LinuxPowerSource.java | 2 +- .../health/linux/hardware/LinuxSensors.java | 2 +- .../health/linux/hardware/LinuxSoundCard.java | 2 +- .../health/linux/hardware/LinuxUsbDevice.java | 2 +- .../linux/hardware/LinuxVirtualMemory.java | 2 +- .../linux/software/LinuxFileSystem.java | 2 +- .../software/LinuxInternetProtocolStats.java | 2 +- .../linux/software/LinuxNetworkParams.java | 2 +- .../linux/software/LinuxOSFileStore.java | 2 +- .../health/linux/software/LinuxOSProcess.java | 2 +- .../health/linux/software/LinuxOSThread.java | 2 +- .../linux/software/LinuxOperatingSystem.java | 2 +- .../java/org/miaixz/bus/health/mac/CFKit.java | 2 +- .../org/miaixz/bus/health/mac/SmcKit.java | 2 +- .../org/miaixz/bus/health/mac/SysctlKit.java | 2 +- .../bus/health/mac/driver/ThreadInfo.java | 4 +- .../org/miaixz/bus/health/mac/driver/Who.java | 2 +- .../bus/health/mac/driver/WindowInfo.java | 2 +- .../bus/health/mac/driver/disk/Fsstat.java | 2 +- .../bus/health/mac/driver/net/NetStat.java | 4 +- .../bus/health/mac/hardware/MacBaseboard.java | 2 +- .../mac/hardware/MacCentralProcessor.java | 2 +- .../mac/hardware/MacComputerSystem.java | 2 +- .../bus/health/mac/hardware/MacDisplay.java | 2 +- .../bus/health/mac/hardware/MacFirmware.java | 2 +- .../health/mac/hardware/MacGlobalMemory.java | 2 +- .../health/mac/hardware/MacGraphicsCard.java | 2 +- .../health/mac/hardware/MacHWDiskStore.java | 2 +- .../hardware/MacHardwareAbstractionLayer.java | 2 +- .../bus/health/mac/hardware/MacNetworkIF.java | 2 +- .../health/mac/hardware/MacPowerSource.java | 2 +- .../bus/health/mac/hardware/MacSensors.java | 2 +- .../bus/health/mac/hardware/MacSoundCard.java | 2 +- .../bus/health/mac/hardware/MacUsbDevice.java | 2 +- .../health/mac/hardware/MacVirtualMemory.java | 2 +- .../health/mac/software/MacFileSystem.java | 2 +- .../software/MacInternetProtocolStats.java | 2 +- .../health/mac/software/MacNetworkParams.java | 2 +- .../health/mac/software/MacOSFileStore.java | 2 +- .../bus/health/mac/software/MacOSProcess.java | 2 +- .../bus/health/mac/software/MacOSThread.java | 2 +- .../mac/software/MacOperatingSystem.java | 2 +- .../bus/health/unix/driver/NetStat.java | 2 +- .../miaixz/bus/health/unix/driver/Who.java | 2 +- .../miaixz/bus/health/unix/driver/Xrandr.java | 2 +- .../bus/health/unix/driver/Xwininfo.java | 2 +- .../health/unix/hardware/BsdNetworkIF.java | 2 +- .../health/unix/hardware/UnixBaseboard.java | 2 +- .../bus/health/unix/hardware/UnixDisplay.java | 2 +- .../health/unix/platform/aix/driver/Ls.java | 2 +- .../unix/platform/aix/driver/Lscfg.java | 2 +- .../health/unix/platform/aix/driver/Lspv.java | 2 +- .../unix/platform/aix/driver/Lssrad.java | 2 +- .../unix/platform/aix/driver/PsInfo.java | 2 +- .../unix/platform/aix/driver/Uptime.java | 2 +- .../health/unix/platform/aix/driver/Who.java | 2 +- .../aix/driver/perfstat/PerfstatConfig.java | 2 +- .../aix/driver/perfstat/PerfstatCpu.java | 2 +- .../aix/driver/perfstat/PerfstatDisk.java | 2 +- .../aix/driver/perfstat/PerfstatMemory.java | 2 +- .../driver/perfstat/PerfstatNetInterface.java | 2 +- .../aix/driver/perfstat/PerfstatProcess.java | 2 +- .../aix/driver/perfstat/PerfstatProtocol.java | 2 +- .../platform/aix/hardware/AixBaseboard.java | 2 +- .../aix/hardware/AixCentralProcessor.java | 2 +- .../aix/hardware/AixComputerSystem.java | 2 +- .../platform/aix/hardware/AixFirmware.java | 2 +- .../aix/hardware/AixGlobalMemory.java | 2 +- .../aix/hardware/AixGraphicsCard.java | 2 +- .../platform/aix/hardware/AixHWDiskStore.java | 2 +- .../hardware/AixHardwareAbstractionLayer.java | 2 +- .../platform/aix/hardware/AixNetworkIF.java | 2 +- .../platform/aix/hardware/AixPowerSource.java | 2 +- .../platform/aix/hardware/AixSensors.java | 2 +- .../platform/aix/hardware/AixSoundCard.java | 2 +- .../platform/aix/hardware/AixUsbDevice.java | 2 +- .../aix/hardware/AixVirtualMemory.java | 2 +- .../platform/aix/software/AixFileSystem.java | 2 +- .../software/AixInternetProtocolStats.java | 2 +- .../aix/software/AixNetworkParams.java | 2 +- .../platform/aix/software/AixOSFileStore.java | 2 +- .../platform/aix/software/AixOSProcess.java | 2 +- .../platform/aix/software/AixOSThread.java | 2 +- .../aix/software/AixOperatingSystem.java | 2 +- .../unix/platform/freebsd/BsdSysctlKit.java | 2 +- .../unix/platform/freebsd/ProcstatKit.java | 2 +- .../unix/platform/freebsd/driver/Who.java | 2 +- .../freebsd/driver/disk/GeomDiskList.java | 2 +- .../freebsd/driver/disk/GeomPartList.java | 2 +- .../platform/freebsd/driver/disk/Mount.java | 2 +- .../hardware/FreeBsdCentralProcessor.java | 2 +- .../hardware/FreeBsdComputerSystem.java | 2 +- .../freebsd/hardware/FreeBsdFirmware.java | 2 +- .../freebsd/hardware/FreeBsdGlobalMemory.java | 2 +- .../freebsd/hardware/FreeBsdGraphicsCard.java | 2 +- .../freebsd/hardware/FreeBsdHWDiskStore.java | 2 +- .../FreeBsdHardwareAbstractionLayer.java | 2 +- .../freebsd/hardware/FreeBsdPowerSource.java | 2 +- .../freebsd/hardware/FreeBsdSensors.java | 2 +- .../freebsd/hardware/FreeBsdSoundCard.java | 2 +- .../freebsd/hardware/FreeBsdUsbDevice.java | 2 +- .../hardware/FreeBsdVirtualMemory.java | 2 +- .../freebsd/software/FreeBsdFileSystem.java | 2 +- .../FreeBsdInternetProtocolStats.java | 2 +- .../software/FreeBsdNetworkParams.java | 2 +- .../freebsd/software/FreeBsdOSFileStore.java | 2 +- .../freebsd/software/FreeBsdOSProcess.java | 2 +- .../freebsd/software/FreeBsdOSThread.java | 2 +- .../software/FreeBsdOperatingSystem.java | 2 +- .../unix/platform/openbsd/FstatKit.java | 2 +- .../platform/openbsd/OpenBsdSysctlKit.java | 2 +- .../openbsd/driver/disk/Disklabel.java | 2 +- .../hardware/OpenBsdCentralProcessor.java | 2 +- .../hardware/OpenBsdComputerSystem.java | 2 +- .../openbsd/hardware/OpenBsdFirmware.java | 2 +- .../openbsd/hardware/OpenBsdGlobalMemory.java | 2 +- .../openbsd/hardware/OpenBsdGraphicsCard.java | 2 +- .../openbsd/hardware/OpenBsdHWDiskStore.java | 2 +- .../OpenBsdHardwareAbstractionLayer.java | 2 +- .../openbsd/hardware/OpenBsdPowerSource.java | 2 +- .../openbsd/hardware/OpenBsdSensors.java | 2 +- .../openbsd/hardware/OpenBsdSoundCard.java | 2 +- .../openbsd/hardware/OpenBsdUsbDevice.java | 2 +- .../hardware/OpenBsdVirtualMemory.java | 2 +- .../openbsd/software/OpenBsdFileSystem.java | 2 +- .../OpenBsdInternetProtocolStats.java | 2 +- .../software/OpenBsdNetworkParams.java | 2 +- .../openbsd/software/OpenBsdOSFileStore.java | 2 +- .../openbsd/software/OpenBsdOSProcess.java | 2 +- .../openbsd/software/OpenBsdOSThread.java | 2 +- .../software/OpenBsdOperatingSystem.java | 2 +- .../unix/platform/solaris/KstatKit.java | 4 +- .../unix/platform/solaris/driver/PsInfo.java | 2 +- .../unix/platform/solaris/driver/Who.java | 2 +- .../platform/solaris/driver/disk/Iostat.java | 2 +- .../platform/solaris/driver/disk/Lshal.java | 2 +- .../platform/solaris/driver/disk/Prtvtoc.java | 2 +- .../solaris/driver/kstat/SystemPages.java | 2 +- .../hardware/SolarisCentralProcessor.java | 2 +- .../hardware/SolarisComputerSystem.java | 2 +- .../solaris/hardware/SolarisFirmware.java | 2 +- .../solaris/hardware/SolarisGlobalMemory.java | 2 +- .../solaris/hardware/SolarisGraphicsCard.java | 2 +- .../solaris/hardware/SolarisHWDiskStore.java | 2 +- .../SolarisHardwareAbstractionLayer.java | 2 +- .../solaris/hardware/SolarisNetworkIF.java | 2 +- .../solaris/hardware/SolarisPowerSource.java | 2 +- .../solaris/hardware/SolarisSensors.java | 2 +- .../solaris/hardware/SolarisSoundCard.java | 2 +- .../solaris/hardware/SolarisUsbDevice.java | 2 +- .../hardware/SolarisVirtualMemory.java | 2 +- .../solaris/software/SolarisFileSystem.java | 2 +- .../SolarisInternetProtocolStats.java | 2 +- .../software/SolarisNetworkParams.java | 2 +- .../solaris/software/SolarisOSFileStore.java | 2 +- .../solaris/software/SolarisOSProcess.java | 2 +- .../solaris/software/SolarisOSThread.java | 2 +- .../software/SolarisOperatingSystem.java | 2 +- .../bus/health/windows/PerfCounterQuery.java | 2 +- .../windows/PerfCounterQueryHandler.java | 2 +- .../windows/PerfCounterWildcardQuery.java | 2 +- .../bus/health/windows/PerfDataKit.java | 4 +- .../org/miaixz/bus/health/windows/WmiKit.java | 2 +- .../bus/health/windows/WmiQueryHandler.java | 2 +- .../bus/health/windows/driver/DeviceTree.java | 2 +- .../health/windows/driver/EnumWindows.java | 2 +- .../driver/LogicalProcessorInformation.java | 2 +- .../windows/driver/perfmon/LoadAverage.java | 2 +- .../driver/perfmon/MemoryInformation.java | 2 +- .../windows/driver/perfmon/PagingFile.java | 2 +- .../windows/driver/perfmon/PerfmonConsts.java | 2 +- .../driver/perfmon/PerfmonDisabled.java | 2 +- .../windows/driver/perfmon/PhysicalDisk.java | 2 +- .../driver/perfmon/ProcessInformation.java | 2 +- .../driver/perfmon/ProcessorInformation.java | 2 +- .../driver/perfmon/SystemInformation.java | 2 +- .../driver/perfmon/ThreadInformation.java | 2 +- .../registry/HkeyPerformanceDataKit.java | 2 +- .../windows/driver/registry/HkeyUserData.java | 2 +- .../driver/registry/NetSessionData.java | 2 +- .../registry/ProcessPerformanceData.java | 4 +- .../driver/registry/ProcessWtsData.java | 4 +- .../driver/registry/SessionWtsData.java | 2 +- .../registry/ThreadPerformanceData.java | 4 +- .../wmi/MSAcpiThermalZoneTemperature.java | 2 +- .../windows/driver/wmi/MSFTStorage.java | 2 +- .../windows/driver/wmi/OhmHardware.java | 2 +- .../health/windows/driver/wmi/OhmSensor.java | 2 +- .../windows/driver/wmi/Win32BaseBoard.java | 2 +- .../health/windows/driver/wmi/Win32Bios.java | 2 +- .../driver/wmi/Win32ComputerSystem.java | 2 +- .../wmi/Win32ComputerSystemProduct.java | 2 +- .../windows/driver/wmi/Win32DiskDrive.java | 2 +- .../wmi/Win32DiskDriveToDiskPartition.java | 2 +- .../driver/wmi/Win32DiskPartition.java | 2 +- .../health/windows/driver/wmi/Win32Fan.java | 2 +- .../windows/driver/wmi/Win32LogicalDisk.java | 2 +- .../wmi/Win32LogicalDiskToPartition.java | 2 +- .../driver/wmi/Win32OperatingSystem.java | 2 +- .../driver/wmi/Win32PhysicalMemory.java | 2 +- .../windows/driver/wmi/Win32Process.java | 2 +- .../driver/wmi/Win32ProcessCached.java | 4 +- .../windows/driver/wmi/Win32Processor.java | 2 +- .../driver/wmi/Win32VideoController.java | 2 +- .../windows/hardware/WindowsBaseboard.java | 2 +- .../hardware/WindowsCentralProcessor.java | 2 +- .../hardware/WindowsComputerSystem.java | 2 +- .../windows/hardware/WindowsDisplay.java | 2 +- .../windows/hardware/WindowsFirmware.java | 2 +- .../windows/hardware/WindowsGlobalMemory.java | 2 +- .../windows/hardware/WindowsGraphicsCard.java | 2 +- .../windows/hardware/WindowsHWDiskStore.java | 2 +- .../WindowsHardwareAbstractionLayer.java | 2 +- .../windows/hardware/WindowsNetworkIF.java | 2 +- .../windows/hardware/WindowsPowerSource.java | 2 +- .../windows/hardware/WindowsSensors.java | 2 +- .../windows/hardware/WindowsSoundCard.java | 2 +- .../windows/hardware/WindowsUsbDevice.java | 2 +- .../hardware/WindowsVirtualMemory.java | 2 +- .../windows/software/WindowsFileSystem.java | 2 +- .../WindowsInternetProtocolStats.java | 2 +- .../software/WindowsNetworkParams.java | 2 +- .../windows/software/WindowsOSFileStore.java | 2 +- .../windows/software/WindowsOSProcess.java | 2 +- .../windows/software/WindowsOSThread.java | 2 +- .../software/WindowsOperatingSystem.java | 2 +- .../java/org/miaixz/bus/limiter/Builder.java | 11 +- .../builder/resolve/DefaultEntityResolve.java | 2 +- bus-oauth/pom.xml | 2 +- .../oauth/metric/amazon/AmazonProvider.java | 7 +- .../oauth/metric/twitter/TwitterProvider.java | 5 +- bus-office/pom.xml | 4 +- .../org/miaixz/bus/office/excel/RowKit.java | 4 +- .../cell/setters/EscapeStrCellSetter.java | 2 +- bus-parent/pom.xml | 6 +- .../main/java/org/miaixz/bus/pay/Builder.java | 4 +- .../pay/metric/wechat/WechatPayBuilder.java | 8 +- bus-sensitive/pom.xml | 2 +- .../bus/setting/magic/AbstractSetting.java | 6 +- .../miaixz/bus/setting/magic/GroupedMap.java | 22 +- .../org/miaixz/bus/setting/magic/Profile.java | 2 +- .../bus/setting/metric/props/Props.java | 11 +- .../bus/setting/metric/toml/TomlWriter.java | 2 +- .../bus/starter/jdbc/AspectjJdbcProxy.java | 4 +- .../bus/starter/jdbc/DataSourceHolder.java | 4 +- .../starter/mapper/MapperConfiguration.java | 4 +- 483 files changed, 4762 insertions(+), 3333 deletions(-) rename bus-core/src/main/java/org/miaixz/bus/core/beans/{BeanInfoCache.java => BeanCache.java} (99%) rename bus-core/src/main/java/org/miaixz/bus/core/beans/{NullWrapperBean.java => NullWrapper.java} (96%) rename bus-core/src/main/java/org/miaixz/bus/core/beans/{path => desc}/AbstractBeanDesc.java (78%) rename bus-core/src/main/java/org/miaixz/bus/core/beans/{ => desc}/BeanDesc.java (78%) create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/beans/desc/BeanDescFactory.java rename bus-core/src/main/java/org/miaixz/bus/core/beans/{ => desc}/PropDesc.java (95%) create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/beans/desc/RecordBeanDesc.java create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/beans/desc/SimpleBeanDesc.java rename bus-core/src/main/java/org/miaixz/bus/core/beans/{ => desc}/StrictBeanDesc.java (93%) create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/CollectionValidator.java create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/array/ArrayValidator.java create mode 100755 bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/cn/God.java create mode 100755 bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/cn/Taboo.java rename bus-core/src/main/java/org/miaixz/bus/core/center/function/{LambdaInfo.java => LambdaX.java} (98%) create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/function/PredicateUOX.java create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/iterator/IteratorValidator.java rename bus-core/src/main/java/org/miaixz/bus/core/{beans/BeanDescCache.java => center/map/MapValidator.java} (64%) create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/object/ObjectValidator.java create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/regex/RegexValidator.java create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/center/set/SetValidator.java rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Alias.java (96%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Async.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Binding.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Copyable.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/GuardedBy.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Ignore.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Immutable.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Inject.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Label.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Lazy.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Metadata.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Named.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/NotThreadSafe.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Order.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Qualifier.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/SPI.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Scheduled.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Scope.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Singleton.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/ThreadSafe.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Trace.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/Values.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/env/Dev.java (97%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/env/Prod.java (97%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/env/package-info.java (97%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/package-info.java (97%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/AnnotatedElements.java (99%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/AnnotationMapping.java (97%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/AnnotationMappingProxy.java (99%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/AnnotationProxy.java (97%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/GenericAnnotationMapping.java (99%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/RepeatableAnnotationCollector.java (99%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/ResolvedAnnotationMapping.java (99%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/elements/CombinationAnnotatedElement.java (99%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/elements/HierarchicalAnnotatedElements.java (99%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/elements/MetaAnnotatedElement.java (97%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/elements/RepeatableMetaAnnotatedElement.java (98%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/elements/package-info.java (97%) rename bus-core/src/main/java/org/miaixz/bus/core/{ => lang}/annotation/resolve/package-info.java (97%) create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/lang/exception/IllegalPathException.java create mode 100644 bus-core/src/main/java/org/miaixz/bus/core/lang/reflect/JdkProxy.java rename bus-core/src/main/java/org/miaixz/bus/core/text/{StringValidator.java => CharsValidator.java} (68%) diff --git a/bus-cache/src/main/java/org/miaixz/bus/cache/Complex.java b/bus-cache/src/main/java/org/miaixz/bus/cache/Complex.java index 616416df80..340bbe8b62 100755 --- a/bus-cache/src/main/java/org/miaixz/bus/cache/Complex.java +++ b/bus-cache/src/main/java/org/miaixz/bus/cache/Complex.java @@ -35,9 +35,9 @@ import org.miaixz.bus.cache.support.CacheInfoContainer; import org.miaixz.bus.cache.support.KeyGenerator; import org.miaixz.bus.cache.support.SpelCalculator; -import org.miaixz.bus.core.annotation.Inject; -import org.miaixz.bus.core.annotation.Named; -import org.miaixz.bus.core.annotation.Singleton; +import org.miaixz.bus.core.lang.annotation.Inject; +import org.miaixz.bus.core.lang.annotation.Named; +import org.miaixz.bus.core.lang.annotation.Singleton; import org.miaixz.bus.logger.Logger; import org.miaixz.bus.proxy.invoker.ProxyChain; diff --git a/bus-cache/src/main/java/org/miaixz/bus/cache/Manage.java b/bus-cache/src/main/java/org/miaixz/bus/cache/Manage.java index 5c54409435..5af8ec3ea8 100755 --- a/bus-cache/src/main/java/org/miaixz/bus/cache/Manage.java +++ b/bus-cache/src/main/java/org/miaixz/bus/cache/Manage.java @@ -29,8 +29,8 @@ import org.miaixz.bus.cache.magic.CacheKeys; import org.miaixz.bus.cache.magic.CachePair; -import org.miaixz.bus.core.annotation.Inject; -import org.miaixz.bus.core.annotation.Singleton; +import org.miaixz.bus.core.lang.annotation.Inject; +import org.miaixz.bus.core.lang.annotation.Singleton; import org.miaixz.bus.core.lang.exception.InternalException; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.logger.Logger; diff --git a/bus-cache/src/main/java/org/miaixz/bus/cache/magic/MultiCacheReader.java b/bus-cache/src/main/java/org/miaixz/bus/cache/magic/MultiCacheReader.java index 8082d0a28e..e66ed706c0 100755 --- a/bus-cache/src/main/java/org/miaixz/bus/cache/magic/MultiCacheReader.java +++ b/bus-cache/src/main/java/org/miaixz/bus/cache/magic/MultiCacheReader.java @@ -31,8 +31,8 @@ import org.miaixz.bus.cache.Hitting; import org.miaixz.bus.cache.Manage; import org.miaixz.bus.cache.support.*; -import org.miaixz.bus.core.annotation.Inject; -import org.miaixz.bus.core.annotation.Singleton; +import org.miaixz.bus.core.lang.annotation.Inject; +import org.miaixz.bus.core.lang.annotation.Singleton; import org.miaixz.bus.logger.Logger; import org.miaixz.bus.proxy.invoker.ProxyChain; diff --git a/bus-cache/src/main/java/org/miaixz/bus/cache/magic/SingleCacheReader.java b/bus-cache/src/main/java/org/miaixz/bus/cache/magic/SingleCacheReader.java index 1492e6d630..353a0a6a22 100755 --- a/bus-cache/src/main/java/org/miaixz/bus/cache/magic/SingleCacheReader.java +++ b/bus-cache/src/main/java/org/miaixz/bus/cache/magic/SingleCacheReader.java @@ -33,8 +33,8 @@ import org.miaixz.bus.cache.support.KeyGenerator; import org.miaixz.bus.cache.support.PatternGenerator; import org.miaixz.bus.cache.support.PreventObjects; -import org.miaixz.bus.core.annotation.Inject; -import org.miaixz.bus.core.annotation.Singleton; +import org.miaixz.bus.core.lang.annotation.Inject; +import org.miaixz.bus.core.lang.annotation.Singleton; import org.miaixz.bus.logger.Logger; import org.miaixz.bus.proxy.invoker.ProxyChain; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/Binder.java b/bus-core/src/main/java/org/miaixz/bus/core/Binder.java index e6588e0f19..8b39038b6f 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/Binder.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/Binder.java @@ -28,14 +28,16 @@ package org.miaixz.bus.core; import lombok.RequiredArgsConstructor; -import org.miaixz.bus.core.annotation.Ignore; -import org.miaixz.bus.core.annotation.Values; import org.miaixz.bus.core.convert.Convert; import org.miaixz.bus.core.io.resource.PropertySource; import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Ignore; +import org.miaixz.bus.core.lang.annotation.Values; import org.miaixz.bus.core.lang.exception.InternalException; +import org.miaixz.bus.core.lang.reflect.JdkProxy; import org.miaixz.bus.core.xyz.FieldKit; +import org.miaixz.bus.core.xyz.StringKit; import java.lang.reflect.Field; import java.util.*; @@ -163,7 +165,7 @@ public T bind(Class clazz, String prefix) { throw new InternalException(e); } - Class actualClass = null;// ClassKit.getCglibActualClass(clazz); + Class actualClass = JdkProxy.getCglibActualClass(clazz); boolean b = (null == prefix || Symbol.DOT.equals(prefix)) && actualClass.isAnnotationPresent(Values.class); if (b) { prefix = actualClass.getAnnotation(Values.class).value(); @@ -180,12 +182,12 @@ public T bind(Class clazz, String prefix) { * @return the object */ public T bind(T object, String prefix) { - /* if (!StringKit.hasText(prefix) || Symbol.DOT.equals(prefix)) { + if (!StringKit.hasText(prefix) || Symbol.DOT.equals(prefix)) { prefix = null; } - for (Field field : ClassKit.getDeclaredFields(object.getClass())) { + for (Field field : FieldKit.getFields(object.getClass())) { bindField(object, field, prefix); - }*/ + } return object; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/BeanInfoCache.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/BeanCache.java similarity index 99% rename from bus-core/src/main/java/org/miaixz/bus/core/beans/BeanInfoCache.java rename to bus-core/src/main/java/org/miaixz/bus/core/beans/BeanCache.java index 0ccdeaf0db..ef25599d11 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/BeanInfoCache.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/BeanCache.java @@ -41,7 +41,7 @@ * @author Kimi Liu * @since Java 17+ */ -public enum BeanInfoCache { +public enum BeanCache { /** * 单例 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/DynaBean.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/DynaBean.java index beb121ef6f..365fd8be4b 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/DynaBean.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/DynaBean.java @@ -27,6 +27,7 @@ */ package org.miaixz.bus.core.beans; +import org.miaixz.bus.core.beans.desc.PropDesc; import org.miaixz.bus.core.convert.Convert; import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.exception.BeanException; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/NullWrapperBean.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/NullWrapper.java similarity index 96% rename from bus-core/src/main/java/org/miaixz/bus/core/beans/NullWrapperBean.java rename to bus-core/src/main/java/org/miaixz/bus/core/beans/NullWrapper.java index baf7384b10..6a99caa3bc 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/NullWrapperBean.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/NullWrapper.java @@ -34,14 +34,14 @@ * @author Kimi Liu * @since Java 17+ */ -public class NullWrapperBean { +public class NullWrapper { private final Class clazz; /** * @param clazz null的类型 */ - public NullWrapperBean(final Class clazz) { + public NullWrapper(final Class clazz) { this.clazz = clazz; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToBeanCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToBeanCopier.java index aecc8ccaf8..92d4661607 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToBeanCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToBeanCopier.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.core.beans.copier; -import org.miaixz.bus.core.beans.PropDesc; +import org.miaixz.bus.core.beans.desc.PropDesc; import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.mutable.MutableEntry; import org.miaixz.bus.core.xyz.BeanKit; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToMapCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToMapCopier.java index 9862222f5e..58836f995c 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToMapCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/BeanToMapCopier.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.core.beans.copier; -import org.miaixz.bus.core.beans.PropDesc; +import org.miaixz.bus.core.beans.desc.PropDesc; import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.mutable.MutableEntry; import org.miaixz.bus.core.xyz.BeanKit; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/CopyOptions.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/CopyOptions.java index 1f0f3fd9d3..f4c9b8dc7b 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/CopyOptions.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/CopyOptions.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.core.beans.copier; -import org.miaixz.bus.core.beans.PropDesc; +import org.miaixz.bus.core.beans.desc.PropDesc; import org.miaixz.bus.core.center.function.FunctionX; import org.miaixz.bus.core.convert.Convert; import org.miaixz.bus.core.convert.Converter; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToBeanCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToBeanCopier.java index 3cf4b1cc8e..f6d9ac028d 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToBeanCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/MapToBeanCopier.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.core.beans.copier; -import org.miaixz.bus.core.beans.PropDesc; +import org.miaixz.bus.core.beans.desc.PropDesc; import org.miaixz.bus.core.center.map.CaseInsensitiveMap; import org.miaixz.bus.core.center.map.MapWrapper; import org.miaixz.bus.core.lang.Assert; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/ValueProviderToBeanCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/ValueProviderToBeanCopier.java index aba4595904..757fdb5caf 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/ValueProviderToBeanCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/ValueProviderToBeanCopier.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.core.beans.copier; -import org.miaixz.bus.core.beans.PropDesc; +import org.miaixz.bus.core.beans.desc.PropDesc; import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.mutable.MutableEntry; import org.miaixz.bus.core.xyz.BeanKit; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/provider/BeanValueProvider.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/provider/BeanValueProvider.java index 9ca13a3e05..5f5ea29987 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/provider/BeanValueProvider.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/copier/provider/BeanValueProvider.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.core.beans.copier.provider; -import org.miaixz.bus.core.beans.BeanDesc; -import org.miaixz.bus.core.beans.PropDesc; import org.miaixz.bus.core.beans.copier.ValueProvider; +import org.miaixz.bus.core.beans.desc.BeanDesc; +import org.miaixz.bus.core.beans.desc.PropDesc; import org.miaixz.bus.core.convert.Convert; import org.miaixz.bus.core.xyz.BeanKit; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/path/AbstractBeanDesc.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/AbstractBeanDesc.java similarity index 78% rename from bus-core/src/main/java/org/miaixz/bus/core/beans/path/AbstractBeanDesc.java rename to bus-core/src/main/java/org/miaixz/bus/core/beans/desc/AbstractBeanDesc.java index ee05ad0376..54f772bfb3 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/path/AbstractBeanDesc.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/AbstractBeanDesc.java @@ -25,16 +25,12 @@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */ -package org.miaixz.bus.core.beans.path; +package org.miaixz.bus.core.beans.desc; -import org.miaixz.bus.core.beans.BeanDesc; -import org.miaixz.bus.core.beans.PropDesc; import org.miaixz.bus.core.center.map.CaseInsensitiveMap; import org.miaixz.bus.core.lang.Assert; import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map; @@ -99,16 +95,6 @@ public Map getPropMap(final boolean ignoreCase) { return ignoreCase ? new CaseInsensitiveMap<>(1, this.propMap) : this.propMap; } - @Override - public Collection getProps() { - return this.propMap.values(); - } - - @Override - public PropDesc getProp(final String fieldName) { - return this.propMap.get(fieldName); - } - /** * 获得字段名对应的字段对象,如果不存在返回null * @@ -120,26 +106,4 @@ public Field getField(final String fieldName) { return null == desc ? null : desc.getField(); } - /** - * 获取Getter方法,如果不存在返回null - * - * @param fieldName 字段名 - * @return Getter方法 - */ - public Method getGetter(final String fieldName) { - final PropDesc desc = this.propMap.get(fieldName); - return null == desc ? null : desc.getGetter(); - } - - /** - * 获取Setter方法,如果不存在返回null - * - * @param fieldName 字段名 - * @return Setter方法 - */ - public Method getSetter(final String fieldName) { - final PropDesc desc = this.propMap.get(fieldName); - return null == desc ? null : desc.getSetter(); - } - } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/BeanDesc.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/BeanDesc.java similarity index 78% rename from bus-core/src/main/java/org/miaixz/bus/core/beans/BeanDesc.java rename to bus-core/src/main/java/org/miaixz/bus/core/beans/desc/BeanDesc.java index b66cd37aa1..8116a8ce33 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/BeanDesc.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/BeanDesc.java @@ -25,9 +25,10 @@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */ -package org.miaixz.bus.core.beans; +package org.miaixz.bus.core.beans.desc; import java.io.Serializable; +import java.lang.reflect.Method; import java.util.Collection; import java.util.Map; @@ -60,7 +61,9 @@ public interface BeanDesc extends Serializable { * * @return {@link PropDesc} 列表 */ - Collection getProps(); + default Collection getProps() { + return getPropMap(false).values(); + } /** * 获取属性,如果不存在返回null @@ -68,6 +71,30 @@ public interface BeanDesc extends Serializable { * @param fieldName 字段名 * @return {@link PropDesc} */ - PropDesc getProp(final String fieldName); + default PropDesc getProp(final String fieldName) { + return getPropMap(false).get(fieldName); + } + + /** + * 获取Getter方法,如果不存在返回null + * + * @param fieldName 字段名 + * @return Getter方法 + */ + default Method getGetter(final String fieldName) { + final PropDesc desc = getProp(fieldName); + return null == desc ? null : desc.getGetter(); + } + + /** + * 获取Setter方法,如果不存在返回null + * + * @param fieldName 字段名 + * @return Setter方法 + */ + default Method getSetter(final String fieldName) { + final PropDesc desc = getProp(fieldName); + return null == desc ? null : desc.getSetter(); + } } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/BeanDescFactory.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/BeanDescFactory.java new file mode 100644 index 0000000000..3e1ca3fe6d --- /dev/null +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/BeanDescFactory.java @@ -0,0 +1,85 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.core.beans.desc; + +import org.miaixz.bus.core.center.map.reference.WeakConcurrentMap; +import org.miaixz.bus.core.lang.reflect.JdkProxy; +import org.miaixz.bus.core.xyz.ArrayKit; +import org.miaixz.bus.core.xyz.FieldKit; +import org.miaixz.bus.core.xyz.RecordKit; + +/** + * Bean描述信息工厂类 + * 通过不同的类和策略,生成对应的{@link BeanDesc},策略包括: + *
    + *
  • 当类为Record时,生成{@link RecordBeanDesc}
  • + *
  • 当类为普通Bean时,生成{@link StrictBeanDesc}
  • + *
+ * + * @author Kimi Liu + * @since Java 17+ + */ +public class BeanDescFactory { + + private static final WeakConcurrentMap, BeanDesc> Cache = new WeakConcurrentMap<>(); + + /** + * 获取{@link BeanDesc} Bean描述信息,使用Weak缓存 + * + * @param clazz Bean类 + * @return {@link BeanDesc} + */ + public static BeanDesc getBeanDesc(final Class clazz) { + return Cache.computeIfAbsent(clazz, (key) -> getBeanDescWithoutCache(clazz)); + } + + /** + * 获取{@link BeanDesc} Bean描述信息,不使用缓存 + * + * @param clazz Bean类 + * @return {@link BeanDesc} + */ + public static BeanDesc getBeanDescWithoutCache(final Class clazz) { + if (RecordKit.isRecord(clazz)) { + return new RecordBeanDesc(clazz); + } else if (JdkProxy.isProxyClass(clazz) || ArrayKit.isEmpty(FieldKit.getFields(clazz))) { + // 代理类和空字段的Bean不支持属性获取,直接使用方法方式 + return new SimpleBeanDesc(clazz); + } else { + return new StrictBeanDesc(clazz); + } + } + + /** + * 清空全局的Bean属性缓存 + */ + public static void clearCache() { + Cache.clear(); + } + +} diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/PropDesc.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/PropDesc.java similarity index 95% rename from bus-core/src/main/java/org/miaixz/bus/core/beans/PropDesc.java rename to bus-core/src/main/java/org/miaixz/bus/core/beans/desc/PropDesc.java index 577ff504ae..87681c34e1 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/PropDesc.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/PropDesc.java @@ -25,11 +25,11 @@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */ -package org.miaixz.bus.core.beans; +package org.miaixz.bus.core.beans.desc; -import org.miaixz.bus.core.annotation.Ignore; import org.miaixz.bus.core.convert.Convert; import org.miaixz.bus.core.lang.EnumMap; +import org.miaixz.bus.core.lang.annotation.Ignore; import org.miaixz.bus.core.lang.exception.BeanException; import org.miaixz.bus.core.xyz.*; @@ -49,7 +49,11 @@ public class PropDesc { /** * 字段 */ - final Field field; + private Field field; + /** + * 字段名 + */ + private String fieldName; /** * Getter方法 */ @@ -68,7 +72,20 @@ public class PropDesc { * @param setter set方法 */ public PropDesc(final Field field, final Method getter, final Method setter) { + this(FieldKit.getFieldName(field), getter, setter); this.field = field; + } + + /** + * 构造 + * Getter和Setter方法设置为默认可访问 + * + * @param fieldName 字段名 + * @param getter get方法 + * @param setter set方法 + */ + public PropDesc(final String fieldName, final Method getter, final Method setter) { + this.fieldName = fieldName; this.getter = ReflectKit.setAccessible(getter); this.setter = ReflectKit.setAccessible(setter); } @@ -79,7 +96,7 @@ public PropDesc(final Field field, final Method getter, final Method setter) { * @return 字段名 */ public String getFieldName() { - return FieldKit.getFieldName(this.field); + return this.fieldName; } /** @@ -315,6 +332,7 @@ public PropDesc setValue(final Object bean, Object value, final boolean ignoreNu public String toString() { return "PropDesc{" + "field=" + field + + ", fieldName=" + fieldName + ", getter=" + getter + ", setter=" + setter + '}'; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/RecordBeanDesc.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/RecordBeanDesc.java new file mode 100644 index 0000000000..9659223c5c --- /dev/null +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/RecordBeanDesc.java @@ -0,0 +1,80 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.core.beans.desc; + +import org.miaixz.bus.core.xyz.FieldKit; +import org.miaixz.bus.core.xyz.MethodKit; +import org.miaixz.bus.core.xyz.ModifierKit; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.Map; + +/** + * Bean描述 + * 包括Record自定义字段及对应方法,getter方法与字段名同名,不支持setter + * + * @author Kimi Liu + * @since Java 17+ + */ +public class RecordBeanDesc extends AbstractBeanDesc { + + private static final long serialVersionUID = -1L; + + /** + * 构造 + * + * @param beanClass Bean类 + */ + public RecordBeanDesc(final Class beanClass) { + super(beanClass); + initForRecord(); + } + + /** + * 针对Record类的反射初始化 + */ + private void initForRecord() { + final Class beanClass = this.beanClass; + final Map propMap = this.propMap; + + final Method[] getters = MethodKit.getPublicMethods(beanClass, method -> 0 == method.getParameterCount()); + // 排除静态属性和对象子类 + final Field[] fields = FieldKit.getFields(beanClass, field -> !ModifierKit.isStatic(field) && !FieldKit.isOuterClassField(field)); + for (final Field field : fields) { + for (final Method getter : getters) { + if (field.getName().equals(getter.getName())) { + // record对象,getter方法与字段同名 + final PropDesc prop = new PropDesc(field, getter, null); + propMap.putIfAbsent(prop.getFieldName(), prop); + } + } + } + } + +} diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/SimpleBeanDesc.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/SimpleBeanDesc.java new file mode 100644 index 0000000000..2770b9f9fa --- /dev/null +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/SimpleBeanDesc.java @@ -0,0 +1,119 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.core.beans.desc; + +import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.xyz.BooleanKit; +import org.miaixz.bus.core.xyz.MethodKit; +import org.miaixz.bus.core.xyz.StringKit; + +import java.beans.Introspector; +import java.lang.reflect.Method; +import java.util.Map; + +/** + * 简单的Bean描述,只查找getter和setter方法,规则如下: + *
    + *
  • 不匹配字段,只查找getXXX、isXXX、setXXX方法。
  • + *
  • 如果同时存在getXXX和isXXX,返回值为Boolean或boolean,isXXX优先。
  • + *
  • 如果同时存在setXXX的多个重载方法,最小子类优先,如setXXX(List)优先于setXXX(Collection)
  • + *
+ * + * @author Kimi Liu + * @since Java 17+ + */ +public class SimpleBeanDesc extends AbstractBeanDesc { + + private static final long serialVersionUID = -1L; + + /** + * 构造 + * + * @param beanClass Bean类 + */ + public SimpleBeanDesc(final Class beanClass) { + super(beanClass); + init(); + } + + /** + * 普通Bean初始化,查找和加载getter和setter + */ + private void init() { + final Map propMap = this.propMap; + + final Method[] gettersAndSetters = MethodKit.getPublicMethods(this.beanClass, MethodKit::isGetterOrSetterIgnoreCase); + boolean isSetter; + int nameIndex; + String methodName; + String fieldName; + for (final Method method : gettersAndSetters) { + methodName = method.getName(); + switch (methodName.charAt(0)) { + case 's': + isSetter = true; + nameIndex = 3; + break; + case 'g': + isSetter = false; + nameIndex = 3; + break; + case 'i': + isSetter = false; + nameIndex = 2; + break; + default: + continue; + } + + fieldName = Introspector.decapitalize(StringKit.toStringOrNull(methodName.substring(nameIndex))); + PropDesc propDesc = propMap.get(fieldName); + if (null == propDesc) { + propDesc = new PropDesc(fieldName, isSetter ? null : method, isSetter ? method : null); + propMap.put(fieldName, propDesc); + } else { + if (isSetter) { + if (null == propDesc.setter || + propDesc.setter.getParameterTypes()[0].isAssignableFrom(method.getParameterTypes()[0])) { + // 如果存在多个重载的setter方法,选择参数类型最匹配的 + propDesc.setter = method; + } + } else { + if (null == propDesc.getter || + (BooleanKit.isBoolean(propDesc.getter.getReturnType()) && + BooleanKit.isBoolean(method.getReturnType()) && + methodName.startsWith(Normal.IS))) { + // 如果返回值为Boolean或boolean,isXXX优先于getXXX + propDesc.getter = method; + } + } + } + } + } + +} diff --git a/bus-core/src/main/java/org/miaixz/bus/core/beans/StrictBeanDesc.java b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/StrictBeanDesc.java similarity index 93% rename from bus-core/src/main/java/org/miaixz/bus/core/beans/StrictBeanDesc.java rename to bus-core/src/main/java/org/miaixz/bus/core/beans/desc/StrictBeanDesc.java index b40d82c2a3..fd8c0be4d0 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/beans/StrictBeanDesc.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/beans/desc/StrictBeanDesc.java @@ -25,9 +25,9 @@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */ -package org.miaixz.bus.core.beans; +package org.miaixz.bus.core.beans.desc; -import org.miaixz.bus.core.beans.path.AbstractBeanDesc; +import org.miaixz.bus.core.text.CharsBacker; import org.miaixz.bus.core.xyz.*; import java.lang.reflect.Field; @@ -35,15 +35,15 @@ import java.util.Map; /** - * 严格的Bean信息描述做为BeanInfo替代方案,此对象持有JavaBean中的setters和getters等相关信息描述 - * 查找Getter和Setter方法时会: + * 严格的Bean信息描述做为BeanInfo替代方案,此对象持有JavaBean中的setters和getters等相关信息描述, + * 在获取Bean属性的时候,要求字段必须存在并严格匹配。查找Getter和Setter方法时会: * - *
- * 1. 忽略字段和方法名的大小写
- * 2. Getter查找getXXX、isXXX、getIsXXX
- * 3. Setter查找setXXX、setIsXXX
- * 4. Setter忽略参数值与字段值不匹配的情况,因此有多个参数类型的重载时,会调用首次匹配的
- * 
+ *
    + *
  1. 忽略字段和方法名的大小写
  2. + *
  3. Getter查找getXXX、isXXX、getIsXXX
  4. + *
  5. Setter查找setXXX、setIsXXX
  6. + *
  7. Setter忽略参数值与字段值不匹配的情况,因此有多个参数类型的重载时,会调用首次匹配的
  8. + *
* * @author Kimi Liu * @since Java 17+ @@ -265,12 +265,12 @@ private Method[] findGetterAndSetter(final String fieldName, final Class fiel methodName = method.getName(); if (0 == method.getParameterCount()) { // 无参数,可能为Getter方法 - if (StringKit.equals(methodName, StringKit.genGetter(fieldName), ignoreCase) && + if (StringKit.equals(methodName, CharsBacker.genGetter(fieldName), ignoreCase) && method.getReturnType().isAssignableFrom(fieldType)) { // getter的返回类型必须为字段类型或字段的父类 getter = method; } - } else if (StringKit.equals(methodName, StringKit.genSetter(fieldName), ignoreCase) && + } else if (StringKit.equals(methodName, CharsBacker.genSetter(fieldName), ignoreCase) && fieldType.isAssignableFrom(method.getParameterTypes()[0])) { // setter方法的参数必须为字段类型或字段的子类 setter = method; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/CollectionStream.java b/bus-core/src/main/java/org/miaixz/bus/core/center/CollectionStream.java index d54866d46a..8b83f8b661 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/CollectionStream.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/CollectionStream.java @@ -42,7 +42,7 @@ * @author Kimi Liu * @since Java 17+ */ -public class CollectionStream { +public class CollectionStream extends CollectionValidator { /** * 将collection转化为类型不变的map diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/CollectionValidator.java b/bus-core/src/main/java/org/miaixz/bus/core/center/CollectionValidator.java new file mode 100644 index 0000000000..7560b0949b --- /dev/null +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/CollectionValidator.java @@ -0,0 +1,323 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.core.center; + +import org.miaixz.bus.core.center.array.ArrayValidator; +import org.miaixz.bus.core.xyz.IteratorKit; +import org.miaixz.bus.core.xyz.MapKit; +import org.miaixz.bus.core.xyz.ObjectKit; + +import java.util.*; +import java.util.function.Function; +import java.util.function.Supplier; + +/** + * Collection检查工具类,提供字对象的blank和empty等检查 + *
    + *
  • empty定义:{@code null} or 空字对象:{@code ""}
  • + *
  • blank定义:{@code null} or 空字对象:{@code ""} or 空格、全角空格、制表符、换行符,等不可见字符
  • + *
+ * + * @author Kimi Liu + * @since Java 17+ + */ +public class CollectionValidator { + + /** + * 集合是否为空 + * + * @param collection 集合 + * @return 是否为空 + */ + public static boolean isEmpty(final Collection collection) { + return collection == null || collection.isEmpty(); + } + + /** + * Iterable是否为空 + * + * @param iterable Iterable对象 + * @return 是否为空 + * @see IteratorKit#isEmpty(Iterable) + */ + public static boolean isEmpty(final Iterable iterable) { + return IteratorKit.isEmpty(iterable); + } + + /** + * Iterator是否为空 + * + * @param iterator Iterator对象 + * @return 是否为空 + * @see IteratorKit#isEmpty(Iterator) + */ + public static boolean isEmpty(final Iterator iterator) { + return IteratorKit.isEmpty(iterator); + } + + /** + * Enumeration是否为空 + * + * @param enumeration {@link Enumeration} + * @return 是否为空 + */ + public static boolean isEmpty(final Enumeration enumeration) { + return null == enumeration || !enumeration.hasMoreElements(); + } + + /** + * Map是否为空 + * + * @param map 集合 + * @return 是否为空 + * @see MapKit#isEmpty(Map) + */ + public static boolean isEmpty(final Map map) { + return MapKit.isEmpty(map); + } + + /** + * 如果给定集合为空,返回默认集合 + * + * @param 集合类型 + * @param 集合元素类型 + * @param collection 集合 + * @param defaultCollection 默认数组 + * @return 非空(empty)的原集合或默认集合 + */ + public static , E> T defaultIfEmpty(final T collection, final T defaultCollection) { + return isEmpty(collection) ? defaultCollection : collection; + } + + /** + * 如果给定集合为空,返回默认集合 + * + * @param 集合类型 + * @param 集合元素类型 + * @param collection 集合 + * @param handler 非空的处理函数 + * @param defaultSupplier 默认值懒加载函数 + * @return 非空(empty)的原集合或默认集合 + */ + public static , E> T defaultIfEmpty(final T collection, final Function handler, final Supplier defaultSupplier) { + return isEmpty(collection) ? defaultSupplier.get() : handler.apply(collection); + } + + /** + * 如果提供的集合为{@code null},返回一个不可变的默认空集合,否则返回原集合 + * 空集合使用{@link Collections#emptySet()} + * + * @param 集合元素类型 + * @param set 提供的集合,可能为null + * @return 原集合,若为null返回空集合 + */ + public static Set emptyIfNull(final Set set) { + return ObjectKit.defaultIfNull(set, Collections.emptySet()); + } + + /** + * 如果提供的集合为{@code null},返回一个不可变的默认空集合,否则返回原集合 + * 空集合使用{@link Collections#emptyList()} + * + * @param 集合元素类型 + * @param list 提供的集合,可能为null + * @return 原集合,若为null返回空集合 + */ + public static List emptyIfNull(final List list) { + return ObjectKit.defaultIfNull(list, Collections.emptyList()); + } + + /** + * 集合是否为非空 + * + * @param collection 集合 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final Collection collection) { + return !isEmpty(collection); + } + + /** + * Iterable是否为空 + * + * @param iterable Iterable对象 + * @return 是否为空 + * @see IteratorKit#isNotEmpty(Iterable) + */ + public static boolean isNotEmpty(final Iterable iterable) { + return IteratorKit.isNotEmpty(iterable); + } + + /** + * Iterator是否为空 + * + * @param iterator Iterator对象 + * @return 是否为空 + * @see IteratorKit#isNotEmpty(Iterator) + */ + public static boolean isNotEmpty(final Iterator iterator) { + return IteratorKit.isNotEmpty(iterator); + } + + /** + * Enumeration是否为空 + * + * @param enumeration {@link Enumeration} + * @return 是否为空 + */ + public static boolean isNotEmpty(final Enumeration enumeration) { + return null != enumeration && enumeration.hasMoreElements(); + } + + /** + * 是否包含{@code null}元素 + *
    + *
  • 集合为{@code null},返回{@code true}
  • + *
  • 集合为空集合,即元素个数为0,返回{@code false}
  • + *
  • 集合中元素为"",返回{@code false}
  • + *
+ * + * @param iterable 被检查的Iterable对象,如果为{@code null} 返回true + * @return 是否包含{@code null}元素 + * @see IteratorKit#hasNull(Iterator) + */ + public static boolean hasNull(final Iterable iterable) { + return IteratorKit.hasNull(IteratorKit.getIter(iterable)); + } + + /** + * Map是否为非空 + * + * @param map 集合 + * @return 是否为非空 + * @see MapKit#isNotEmpty(Map) + */ + public static boolean isNotEmpty(final Map map) { + return MapKit.isNotEmpty(map); + } + + /** + * 判断subCollection是否为collection的子集合,不考虑顺序,只考虑元素数量。 + *
    + *
  • 如果两个集合为同一集合或,则返回true
  • + *
  • 如果两个集合元素都相同,则返回true(无论顺序相同与否)
  • + *
+ * + * @param subCollection 第一个Iterable对象,即子集合。 + * @param collection 第二个Iterable对象,可以为任何实现了Iterable接口的集合。 + * @return 如果subCollection是collection的子集合,则返回true;否则返回false。 + */ + public static boolean isSub(final Collection subCollection, final Collection collection) { + if (size(subCollection) > size(collection)) { + return false; + } + return IteratorKit.isSub(subCollection, collection); + } + + /** + * 判断两个{@link Collection} 是否元素和顺序相同,返回{@code true}的条件是: + *
    + *
  • 两个{@link Collection}必须长度相同
  • + *
  • 两个{@link Collection}元素相同index的对象必须equals,满足{@link Objects#equals(Object, Object)}
  • + *
+ * + * @param list1 列表1 + * @param list2 列表2 + * @return 是否相同 + */ + public static boolean isEqualList(final Collection list1, final Collection list2) { + return equals(list1, list2, false); + } + + /** + * 判断两个{@link Iterable}中的元素是否相同,可选是否判断顺序 + * 当满足下列情况时返回{@code true}: + *
    + *
  • 两个{@link Iterable}都为{@code null};
  • + *
  • 两个{@link Iterable}满足{@code coll1 == coll2};
  • + *
  • 如果忽略顺序,则计算两个集合中元素和数量是否相同
  • + *
  • 如果不忽略顺序,两个{@link Iterable}所有具有相同下标的元素皆满足{@link Objects#equals(Object, Object)};
  • + *
+ * + * @param coll1 集合1 + * @param coll2 集合2 + * @param ignoreOrder 是否忽略顺序 + * @return 是否相同 + */ + public static boolean equals(final Collection coll1, final Collection coll2, final boolean ignoreOrder) { + if (size(coll1) != size(coll2)) { + return false; + } + + return IteratorKit.equals(coll1, coll2, ignoreOrder); + } + + /** + * 获取Collection或者iterator的大小,此方法可以处理的对象类型如下: + *
    + *
  • Collection - the collection size
  • + *
  • Map - the map size
  • + *
  • Array - the array size
  • + *
  • Iterator - the number of elements remaining in the iterator
  • + *
  • Enumeration - the number of elements remaining in the enumeration
  • + *
+ * + * @param object 可以为空的对象 + * @return 如果object为空则返回0 + * @throws IllegalArgumentException 参数object不是Collection或者iterator + */ + public static int size(final Object object) { + if (object == null) { + return 0; + } + + // 优先判断使用频率较高的类型 + if (object instanceof Collection) { + return ((Collection) object).size(); + } else if (object instanceof Map) { + return ((Map) object).size(); + } else if (object instanceof Iterable) { + return IteratorKit.size((Iterable) object); + } else if (object instanceof Iterator) { + return IteratorKit.size((Iterator) object); + } else if (object instanceof Enumeration) { + int total = 0; + final Enumeration it = (Enumeration) object; + while (it.hasMoreElements()) { + total++; + it.nextElement(); + } + return total; + } else if (ArrayValidator.isArray(object)) { + return ArrayValidator.length(object); + } else { + throw new IllegalArgumentException("Unsupported object type: " + object.getClass().getName()); + } + } + +} diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/array/ArrayValidator.java b/bus-core/src/main/java/org/miaixz/bus/core/center/array/ArrayValidator.java new file mode 100644 index 0000000000..534b59e929 --- /dev/null +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/array/ArrayValidator.java @@ -0,0 +1,1271 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.core.center.array; + +import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.xyz.ArrayKit; +import org.miaixz.bus.core.xyz.ObjectKit; +import org.miaixz.bus.core.xyz.StringKit; + +import java.lang.reflect.Array; +import java.util.Arrays; +import java.util.Comparator; +import java.util.Objects; +import java.util.function.Predicate; + +/** + * Array检查工具类,提供字对象的blank和empty等检查 + *
    + *
  • empty定义:{@code null} or 空字对象:{@code ""}
  • + *
  • blank定义:{@code null} or 空字对象:{@code ""} or 空格、全角空格、制表符、换行符,等不可见字符
  • + *
+ * + * @author Kimi Liu + * @since Java 17+ + */ +public class ArrayValidator { + + /** + * 数组是否为空 + * + * @param array 数组 + * @return 是否为空 + */ + public static boolean isEmpty(final long[] array) { + return array == null || array.length == 0; + } + + /** + * 数组是否为空 + * + * @param array 数组 + * @return 是否为空 + */ + public static boolean isEmpty(final int[] array) { + return array == null || array.length == 0; + } + + /** + * 数组是否为空 + * + * @param array 数组 + * @return 是否为空 + */ + public static boolean isEmpty(final short[] array) { + return array == null || array.length == 0; + } + + /** + * 数组是否为空 + * + * @param array 数组 + * @return 是否为空 + */ + public static boolean isEmpty(final char[] array) { + return array == null || array.length == 0; + } + + /** + * 数组是否为空 + * + * @param array 数组 + * @return 是否为空 + */ + public static boolean isEmpty(final byte[] array) { + return array == null || array.length == 0; + } + + /** + * 数组是否为空 + * + * @param array 数组 + * @return 是否为空 + */ + public static boolean isEmpty(final double[] array) { + return array == null || array.length == 0; + } + + /** + * 数组是否为空 + * + * @param array 数组 + * @return 是否为空 + */ + public static boolean isEmpty(final float[] array) { + return array == null || array.length == 0; + } + + /** + * 数组是否为空 + * + * @param array 数组 + * @return 是否为空 + */ + public static boolean isEmpty(final boolean[] array) { + return array == null || array.length == 0; + } + + /** + * 数组是否为非空 + * + * @param array 数组 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final long[] array) { + return !isEmpty(array); + } + + /** + * 数组是否为非空 + * + * @param array 数组 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final int[] array) { + return !isEmpty(array); + } + + /** + * 数组是否为非空 + * + * @param array 数组 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final short[] array) { + return !isEmpty(array); + } + + /** + * 数组是否为非空 + * + * @param array 数组 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final char[] array) { + return !isEmpty(array); + } + + /** + * 数组是否为非空 + * + * @param array 数组 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final byte[] array) { + return !isEmpty(array); + } + + /** + * 数组是否为非空 + * + * @param array 数组 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final double[] array) { + return !isEmpty(array); + } + + /** + * 数组是否为非空 + * + * @param array 数组 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final float[] array) { + return !isEmpty(array); + } + + /** + * 数组是否为非空 + * + * @param array 数组 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final boolean[] array) { + return !isEmpty(array); + } + + /** + * 对象是否为数组对象 + * + * @param obj 对象 + * @return 是否为数组对象,如果为{@code null} 返回false + */ + public static boolean isArray(final Object obj) { + return null != obj && obj.getClass().isArray(); + } + + /** + *

指定字符串数组中,是否包含空字符串。

+ *

如果指定的字符串数组的长度为 0,或者其中的任意一个元素是空字符串,则返回 true。

+ *
    + *
  • {@code hasBlank() // true}
  • + *
  • {@code hasBlank("", null, " ") // true}
  • + *
  • {@code hasBlank("123", " ") // true}
  • + *
  • {@code hasBlank("123", "abc") // false}
  • + *
+ * + *

注意:该方法与 {@link #isAllBlank(CharSequence...)} 的区别在于:

+ *
    + *
  • hasBlank(CharSequence...) 等价于 {@code isBlank(...) || isBlank(...) || ...}
  • + *
  • {@link #isAllBlank(CharSequence...)} 等价于 {@code isBlank(...) && isBlank(...) && ...}
  • + *
+ * + * @param args 字符串列表 + * @return 是否包含空字符串 + */ + public static boolean hasBlank(final CharSequence... args) { + if (isEmpty(args)) { + return true; + } + + for (final CharSequence text : args) { + if (StringKit.isBlank(text)) { + return true; + } + } + return false; + } + + /** + * 是否存都不为{@code null}或空对象或空白符的对象,通过{@link #hasBlank(CharSequence...)} 判断元素 + * + * @param args 被检查的对象,一个或者多个 + * @return 是否都不为空 + */ + public static boolean isAllNotBlank(final CharSequence... args) { + return !hasBlank(args); + } + + /** + *

指定字符串数组中的元素,是否全部为空字符串。

+ *

如果指定的字符串数组的长度为 0,或者所有元素都是空字符串,则返回 true。

+ *
    + *
  • {@code isAllBlank() // true}
  • + *
  • {@code isAllBlank("", null, " ") // true}
  • + *
  • {@code isAllBlank("123", " ") // false}
  • + *
  • {@code isAllBlank("123", "abc") // false}
  • + *
+ * + *

注意:该方法与 {@link #hasBlank(CharSequence...)} 的区别在于:

+ *
    + *
  • {@link #hasBlank(CharSequence...)} 等价于 {@code isBlank(...) || isBlank(...) || ...}
  • + *
  • isAllBlank(CharSequence...) 等价于 {@code isBlank(...) && isBlank(...) && ...}
  • + *
+ * + * @param args 字符串列表 + * @return 所有字符串是否为空白 + */ + public static boolean isAllBlank(final CharSequence... args) { + if (isEmpty(args)) { + return true; + } + + for (final CharSequence text : args) { + if (StringKit.isNotBlank(text)) { + return false; + } + } + return true; + } + + /** + * 数组是否为空 + * + * @param 数组元素类型 + * @param array 数组 + * @return 是否为空 + */ + public static boolean isEmpty(final T[] array) { + return array == null || array.length == 0; + } + + /** + * 如果给定数组为空,返回默认数组 + * + * @param 数组元素类型 + * @param array 数组 + * @param defaultArray 默认数组 + * @return 非空(empty)的原数组或默认数组 + */ + public static T[] defaultIfEmpty(final T[] array, final T[] defaultArray) { + return isEmpty(array) ? defaultArray : array; + } + + /** + * 数组是否为空 + * 此方法会匹配单一对象,如果此对象为{@code null}则返回true + * 如果此对象为非数组,理解为此对象为数组的第一个元素,则返回false + * 如果此对象为数组对象,数组长度大于0的情况下返回false,否则返回true + * + * @param array 数组 + * @return 是否为空 + */ + public static boolean isEmpty(final Object array) { + if (array != null) { + if (isArray(array)) { + return 0 == Array.getLength(array); + } + return false; + } + return true; + } + + /** + * 数组是否为非空 + * + * @param 数组元素类型 + * @param array 数组 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final T[] array) { + return !isEmpty(array); + } + + /** + * 数组是否为非空 + * 此方法会匹配单一对象,如果此对象为{@code null}则返回false + * 如果此对象为非数组,理解为此对象为数组的第一个元素,则返回true + * 如果此对象为数组对象,数组长度大于0的情况下返回true,否则返回false + * + * @param array 数组 + * @return 是否为非空 + */ + public static boolean isNotEmpty(final Object array) { + return !isEmpty(array); + } + + + /** + * 检查数组是否有序,升序或者降序,使用指定比较器比较 + *

若传入空数组或空比较器,则返回{@code false};元素全部相等,返回 {@code true}

+ * + * @param 数组元素类型 + * @param array 数组 + * @param comparator 比较器,需要自己处理null值比较 + * @return 数组是否有序 + */ + public static boolean isSorted(final T[] array, final Comparator comparator) { + if (isEmpty(array) || null == comparator) { + return false; + } + + final int size = array.length - 1; + final int cmp = comparator.compare(array[0], array[size]); + if (cmp < 0) { + return isSortedASC(array, comparator); + } else if (cmp > 0) { + return isSortedDESC(array, comparator); + } + for (int i = 0; i < size; i++) { + if (comparator.compare(array[i], array[i + 1]) != 0) { + return false; + } + } + return true; + } + + /** + * 检查数组是否有序,升序或者降序 + *

若传入空数组,则返回{@code false};元素全部相等,返回 {@code true}

+ * + * @param 数组元素类型,该类型需要实现Comparable接口 + * @param array 数组 + * @return 数组是否有序 + * @throws NullPointerException 如果数组元素含有null值 + */ + public static > boolean isSorted(final T[] array) { + if (isEmpty(array)) { + return false; + } + final int size = array.length - 1; + final int cmp = array[0].compareTo(array[size]); + if (cmp < 0) { + return isSortedASC(array); + } else if (cmp > 0) { + return isSortedDESC(array); + } + for (int i = 0; i < size; i++) { + if (array[i].compareTo(array[i + 1]) != 0) { + return false; + } + } + return true; + } + + /** + * 检查数组是否升序,即{@code array[i] <= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否升序 + */ + public static boolean isSortedASC(final byte[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] > array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否降序,即{@code array[i] >= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否降序 + */ + public static boolean isSortedDESC(final byte[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] < array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否升序,即{@code array[i] <= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否升序 + */ + public static boolean isSortedASC(final short[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] > array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否降序,即{@code array[i] >= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否降序 + */ + public static boolean isSortedDESC(final short[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] < array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否升序,即{@code array[i] <= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否升序 + */ + public static boolean isSortedASC(final char[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] > array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否降序,即{@code array[i] >= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否降序 + */ + public static boolean isSortedDESC(final char[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] < array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否升序,即{@code array[i] <= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否升序 + */ + public static boolean isSortedASC(final int[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] > array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否降序,即{@code array[i] >= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否降序 + */ + public static boolean isSortedDESC(final int[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] < array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否升序,即{@code array[i] <= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否升序 + */ + public static boolean isSortedASC(final long[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] > array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否降序,即{@code array[i] >= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否降序 + */ + public static boolean isSortedDESC(final long[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] < array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否升序,即{@code array[i] <= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否升序 + */ + public static boolean isSortedASC(final double[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] > array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否降序,即{@code array[i] >= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否降序 + */ + public static boolean isSortedDESC(final double[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] < array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否升序,即{@code array[i] <= array[i+1]} + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否升序 + */ + public static boolean isSortedASC(final float[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] > array[i + 1]) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否降序,即array[i] >= array[i+1] + * 若传入空数组,则返回{@code false} + * + * @param array 数组 + * @return 数组是否降序 + */ + public static boolean isSortedDESC(final float[] array) { + if (isEmpty(array)) { + return false; + } + + for (int i = 0; i < array.length - 1; i++) { + if (array[i] < array[i + 1]) { + return false; + } + } + return true; + } + + /** + * 检查数组是否升序,即 {@code array[i].compareTo(array[i + 1]) <= 0} + *

若传入空数组,则返回{@code false}

+ * + * @param 数组元素类型,该类型需要实现Comparable接口 + * @param array 数组 + * @return 数组是否升序 + * @throws NullPointerException 如果数组元素含有null值 + */ + public static > boolean isSortedASC(final T[] array) { + if (isEmpty(array)) { + return false; + } + + final int size = array.length - 1; + for (int i = 0; i < size; i++) { + if (array[i].compareTo(array[i + 1]) > 0) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否降序,即 {@code array[i].compareTo(array[i + 1]) >= 0} + *

若传入空数组,则返回{@code false}

+ * + * @param 数组元素类型,该类型需要实现Comparable接口 + * @param array 数组 + * @return 数组是否降序 + * @throws NullPointerException 如果数组元素含有null值 + */ + public static > boolean isSortedDESC(final T[] array) { + if (isEmpty(array)) { + return false; + } + + final int size = array.length - 1; + for (int i = 0; i < size; i++) { + if (array[i].compareTo(array[i + 1]) < 0) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否升序,使用指定的比较器比较,即 {@code compare.compare(array[i], array[i + 1]) <= 0} + *

若传入空数组或空比较器,则返回{@code false}

+ * + * @param 数组元素类型 + * @param array 数组 + * @param comparator 比较器,需要自己处理null值比较 + * @return 数组是否升序 + */ + public static boolean isSortedASC(final T[] array, final Comparator comparator) { + if (isEmpty(array) || null == comparator) { + return false; + } + + final int size = array.length - 1; + for (int i = 0; i < size; i++) { + if (comparator.compare(array[i], array[i + 1]) > 0) { + return false; + } + } + + return true; + } + + /** + * 检查数组是否降序,使用指定的比较器比较,即 {@code compare.compare(array[i], array[i + 1]) >= 0} + *

若传入空数组或空比较器,则返回{@code false}

+ * + * @param 数组元素类型 + * @param array 数组 + * @param comparator 比较器,需要自己处理null值比较 + * @return 数组是否降序 + */ + public static boolean isSortedDESC(final T[] array, final Comparator comparator) { + if (isEmpty(array) || null == comparator) { + return false; + } + + final int size = array.length - 1; + for (int i = 0; i < size; i++) { + if (comparator.compare(array[i], array[i + 1]) < 0) { + return false; + } + } + + return true; + } + + /** + * 是否所有元素都为{@code null}或空对象,通过{@link ObjectKit#isEmpty(Object)} 判断元素 + * 如果提供的数组本身为空,则返回{@code true} + * + * @param 元素类型 + * @param args 被检查的对象,一个或者多个 + * @return 是否都为空 + */ + public static boolean isAllEmpty(final T[] args) { + for (final T obj : args) { + if (!ObjectKit.isEmpty(obj)) { + return false; + } + } + return true; + } + + /** + * 是否局部匹配,相当于对比以下子串是否相等 + *
+     *     array1[offset1, subArray.length]
+     *                  ||
+     *               subArray
+     * 
+ * + * @param array 数组 + * @param offset 开始位置 + * @param subArray 子数组 + * @return 是否局部匹配 + */ + public static boolean isSubEquals(final byte[] array, final int offset, final byte... subArray) { + if (array == subArray) { + return true; + } + if (array.length < subArray.length) { + return false; + } + return regionMatches(array, offset, subArray, 0, subArray.length); + } + + /** + * 是否是数组的子数组 + * + * @param array 数组 + * @param subArray 子数组 + * @param 数组元素类型 + * @return 是否是数组的子数组 + */ + public static boolean isSub(final T[] array, final T[] subArray) { + return indexOfSub(array, subArray) > Normal.__1; + } + + /** + * 查找子数组的位置 + * + * @param array 数组 + * @param beginInclude 查找开始的位置(包含) + * @param subArray 子数组 + * @param 数组元素类型 + * @return 子数组的开始位置,即子数字第一个元素在数组中的位置 + */ + public static int indexOfSub(final T[] array, final int beginInclude, final T[] subArray) { + if (isEmpty(array) || isEmpty(subArray) || subArray.length > array.length) { + return Normal.__1; + } + final int firstIndex = indexOf(array, subArray[0], beginInclude); + if (firstIndex < 0 || firstIndex + subArray.length > array.length) { + return Normal.__1; + } + + for (int i = 0; i < subArray.length; i++) { + if (!ObjectKit.equals(array[i + firstIndex], subArray[i])) { + return indexOfSub(array, firstIndex + 1, subArray); + } + } + + return firstIndex; + } + + /** + * 是否所有元素都为{@code null}或空对象,通过{@link ObjectKit#isEmpty(Object)} 判断元素 + *

如果提供的数组本身为空,则返回{@code true}

+ *

限制条件:args的每个item不能是数组、不能是集合

+ * + * @param 元素类型 + * @param args 被检查的对象,一个或者多个 + * @return 是否都为空 + * @throws IllegalArgumentException 如果提供的args的item存在数组或集合,抛出异常 + */ + @SafeVarargs + public static boolean isAllEmptyVarargs(final T... args) { + return isAllEmpty(args); + } + + /** + * 是否所有元素都不为{@code null}或空对象,通过{@link ObjectKit#isEmpty(Object)} 判断元素 + *

如果提供的数组本身为空,则返回{@code true}

+ * + * @param args 被检查的对象,一个或者多个 + * @return 是否都不为空 + */ + public static boolean isAllNotEmpty(final Object... args) { + return !hasEmpty(args); + } + + /** + * 是否包含{@code null}元素 + *

如果数组为null,则返回{@code true},如果数组为空,则返回{@code false}

+ * + * @param 数组元素类型 + * @param array 被检查的数组 + * @return 是否包含 {@code null} 元素 + */ + public static boolean hasNull(final T... array) { + if (isNotEmpty(array)) { + for (final T element : array) { + if (ObjectKit.isNull(element)) { + return true; + } + } + } + return array == null; + } + + + /** + * 是否存在{@code null}或空对象,通过{@link ObjectKit#isEmpty(Object)} 判断元素 + *

如果提供的数组本身为空,则返回{@code false}

+ * + * @param 元素类型 + * @param args 被检查对象 + * @return 是否存在 {@code null} 或空对象 + */ + public static boolean hasEmpty(final T[] args) { + if (isNotEmpty(args)) { + for (final T element : args) { + if (ObjectKit.isEmpty(element)) { + return true; + } + } + } + return false; + } + + /** + * 是否存在{@code null}或空对象,通过{@link ObjectKit#isEmpty(Object)} 判断元素 + *

如果提供的数组本身为空,则返回{@code false}

+ *

限制条件:args的每个item不能是数组、不能是集合

+ * + * @param 元素类型 + * @param args 被检查对象 + * @return 是否存在 {@code null} 或空对象 + * @throws IllegalArgumentException 如果提供的args的item存在数组或集合,抛出异常 + */ + @SafeVarargs + public static boolean hasEmptyVarargs(final T... args) { + return hasEmpty(args); + } + + /** + * 所有字段是否全为null + *

如果数组为{@code null}或者空,则返回 {@code true}

+ * + * @param 数组元素类型 + * @param array 被检查的数组 + * @return 所有字段是否全为null + */ + public static boolean isAllNull(final T... array) { + return null == firstNonNull(array); + } + + /** + * 是否所有元素都不为 {@code null} + *

如果提供的数组为null,则返回{@code false},如果提供的数组为空,则返回{@code true}

+ * + * @param 数组元素类型 + * @param array 被检查的数组 + * @return 是否所有元素都不为 {@code null} + */ + public static boolean isAllNotNull(final T... array) { + return !hasNull(array); + } + + /** + * 是否包含非{@code null}元素 + *

如果数组是{@code null}或者空,返回{@code false},否则当数组中有非{@code null}元素时返回{@code true}

+ * + * @param 数组元素类型 + * @param array 被检查的数组 + * @return 是否包含非 {@code null} 元素 + */ + public static boolean hasNonNull(final T... array) { + return null != firstNonNull(array); + } + + /** + * 计算{@code null}或空元素对象的个数,通过{@link ObjectKit#isEmpty(Object)} 判断元素 + * + * @param args 被检查的对象,一个或者多个 + * @return {@code null}或空元素对象的个数 + */ + public static int emptyCount(final Object... args) { + int count = 0; + if (isNotEmpty(args)) { + for (final Object element : args) { + if (ObjectKit.isEmpty(element)) { + count++; + } + } + } + return count; + } + + /** + * 返回数组中第一个非空元素 + * + * @param 数组元素类型 + * @param array 数组 + * @return 第一个非空元素,如果 不存在非空元素 或 数组为空,返回{@code null} + */ + public static T firstNonNull(final T... array) { + if (isEmpty(array)) { + return null; + } + return firstMatch(ObjectKit::isNotNull, array); + } + + /** + * 返回数组中第一个匹配规则的值 + * + * @param 数组元素类型 + * @param matcher 匹配接口,实现此接口自定义匹配规则 + * @param array 数组 + * @return 第一个匹配元素,如果 不存在匹配元素 或 数组为空,返回 {@code null} + */ + public static T firstMatch(final Predicate matcher, final T... array) { + final int index = matchIndex(matcher, array); + if (index == Normal.__1) { + return null; + } + + return array[index]; + } + + + /** + * 返回数组中第一个匹配规则的值的位置 + * + * @param 数组元素类型 + * @param matcher 匹配接口,实现此接口自定义匹配规则 + * @param array 数组 + * @return 第一个匹配元素的位置,{@link Normal#__1}表示未匹配到 + */ + public static int matchIndex(final Predicate matcher, final T... array) { + return matchIndex(0, matcher, array); + } + + /** + * 返回数组中第一个匹配规则的值的位置 + * + * @param 数组元素类型 + * @param matcher 匹配接口,实现此接口自定义匹配规则 + * @param beginIndexInclude 检索开始的位置,不能为负数 + * @param array 数组 + * @return 第一个匹配元素的位置,{@link Normal#__1}表示未匹配到 + */ + public static int matchIndex(final int beginIndexInclude, final Predicate matcher, final E... array) { + if (isEmpty(array)) { + return Normal.__1; + } + final ArrayWrapper arrayWrapper = ArrayWrapper.of(array); + return arrayWrapper.matchIndex(beginIndexInclude, matcher); + } + + /** + * 返回数组中指定元素所在位置,未找到返回{@link Normal#__1} + * + * @param 数组类型 + * @param array 数组 + * @param value 被检查的元素 + * @param beginIndexInclude 检索开始的位置 + * @return 数组中指定元素所在位置,未找到返回{@link Normal#__1} + */ + public static int indexOf(final T[] array, final Object value, final int beginIndexInclude) { + return ArrayWrapper.of(array).indexOf(value, beginIndexInclude); + } + + /** + * 返回数组中指定元素所在位置,未找到返回{@link Normal#__1} + * + * @param 数组类型 + * @param array 数组 + * @param value 被检查的元素 + * @return 数组中指定元素所在位置,未找到返回{@link Normal#__1} + */ + public static int indexOf(final T[] array, final Object value) { + return ArrayWrapper.of(array).indexOf(value); + } + + + /** + * 返回数组中指定元素所在位置,忽略大小写,未找到返回{@link Normal#__1} + * + * @param array 数组 + * @param value 被检查的元素 + * @return 数组中指定元素所在位置,未找到返回{@link Normal#__1} + */ + public static int indexOfIgnoreCase(final CharSequence[] array, final CharSequence value) { + if (isNotEmpty(array)) { + for (int i = 0; i < array.length; i++) { + if (StringKit.equalsIgnoreCase(array[i], value)) { + return i; + } + } + } + return Normal.__1; + } + + /** + * 返回数组中指定元素最后的所在位置,未找到返回{@link Normal#__1} + * + * @param 数组类型 + * @param array 数组 + * @param value 被检查的元素 + * @return 数组中指定元素最后的所在位置,未找到返回{@link Normal#__1} + */ + public static int lastIndexOf(final T[] array, final Object value) { + if (isEmpty(array)) { + return Normal.__1; + } + return lastIndexOf(array, value, array.length - 1); + } + + /** + * 返回数组中指定元素最后的所在位置,未找到返回{@link Normal#__1} + * + * @param 数组类型 + * @param array 数组 + * @param value 被检查的元素 + * @param endInclude 从后向前查找时的起始位置,一般为{@code array.length - 1} + * @return 数组中指定元素最后的所在位置,未找到返回{@link Normal#__1} + */ + public static int lastIndexOf(final T[] array, final Object value, final int endInclude) { + if (isNotEmpty(array)) { + for (int i = endInclude; i >= 0; i--) { + if (ObjectKit.equals(value, array[i])) { + return i; + } + } + } + return Normal.__1; + } + + /** + * 查找子数组的位置 + * + * @param array 数组 + * @param subArray 子数组 + * @param 数组元素类型 + * @return 子数组的开始位置,即子数字第一个元素在数组中的位置 + */ + public static int indexOfSub(final T[] array, final T[] subArray) { + return indexOfSub(array, 0, subArray); + } + + /** + * 是否局部匹配,相当于对比以下子串是否相等 + *
+     *     array1[offset1 : offset1 + length]
+     *                  ||
+     *     array2[offset2 : offset2 + length]
+     * 
+ * + * @param array1 第一个数组 + * @param offset1 第一个数组开始位置 + * @param array2 第二个数组 + * @param offset2 第二个数组开始位置 + * @param length 检查长度 + * @return 是否局部匹配 + */ + public static boolean regionMatches(final byte[] array1, final int offset1, + final byte[] array2, final int offset2, final int length) { + if (array1.length < offset1 + length) { + throw new IndexOutOfBoundsException("[byte1] length must be >= [offset1 + length]"); + } + if (array2.length < offset2 + length) { + throw new IndexOutOfBoundsException("[byte2] length must be >= [offset2 + length]"); + } + + for (int i = 0; i < length; i++) { + if (array1[i + offset1] != array2[i + offset2]) { + return false; + } + } + return true; + } + + + /** + * 数组或集合转String + * + * @param obj 集合或数组对象 + * @return 数组字符串,与集合转字符串格式相同 + */ + public static String toString(final Object obj) { + if (Objects.isNull(obj)) { + return null; + } + if (obj instanceof long[]) { + return Arrays.toString((long[]) obj); + } else if (obj instanceof int[]) { + return Arrays.toString((int[]) obj); + } else if (obj instanceof short[]) { + return Arrays.toString((short[]) obj); + } else if (obj instanceof char[]) { + return Arrays.toString((char[]) obj); + } else if (obj instanceof byte[]) { + return Arrays.toString((byte[]) obj); + } else if (obj instanceof boolean[]) { + return Arrays.toString((boolean[]) obj); + } else if (obj instanceof float[]) { + return Arrays.toString((float[]) obj); + } else if (obj instanceof double[]) { + return Arrays.toString((double[]) obj); + } else if (ArrayKit.isArray(obj)) { + // 对象数组 + try { + return Arrays.deepToString((Object[]) obj); + } catch (final Exception ignore) { + //ignore + } + } + + return obj.toString(); + } + + /** + * 获取数组长度 + * 如果参数为{@code null},返回0 + * + *
+     * ArrayKit.length(null)            = 0
+     * ArrayKit.length([])              = 0
+     * ArrayKit.length([null])          = 1
+     * ArrayKit.length([true, false])   = 2
+     * ArrayKit.length([1, 2, 3])       = 3
+     * ArrayKit.length(["a", "b", "c"]) = 3
+     * 
+ * + * @param array 数组对象 + * @return 数组长度 + * @throws IllegalArgumentException 如果参数不为数组,抛出此异常 + * @see Array#getLength(Object) + */ + public static int length(final Object array) throws IllegalArgumentException { + if (null == array) { + return 0; + } + return Array.getLength(array); + } + +} diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/array/PrimitiveArray.java b/bus-core/src/main/java/org/miaixz/bus/core/center/array/PrimitiveArray.java index 98b224e4bb..4b47b0acc5 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/array/PrimitiveArray.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/array/PrimitiveArray.java @@ -43,167 +43,7 @@ * @author Kimi Liu * @since Java 17+ */ -public class PrimitiveArray { - - /** - * 数组是否为空 - * - * @param array 数组 - * @return 是否为空 - */ - public static boolean isEmpty(final long[] array) { - return array == null || array.length == 0; - } - - /** - * 数组是否为空 - * - * @param array 数组 - * @return 是否为空 - */ - public static boolean isEmpty(final int[] array) { - return array == null || array.length == 0; - } - - /** - * 数组是否为空 - * - * @param array 数组 - * @return 是否为空 - */ - public static boolean isEmpty(final short[] array) { - return array == null || array.length == 0; - } - - /** - * 数组是否为空 - * - * @param array 数组 - * @return 是否为空 - */ - public static boolean isEmpty(final char[] array) { - return array == null || array.length == 0; - } - - /** - * 数组是否为空 - * - * @param array 数组 - * @return 是否为空 - */ - public static boolean isEmpty(final byte[] array) { - return array == null || array.length == 0; - } - - /** - * 数组是否为空 - * - * @param array 数组 - * @return 是否为空 - */ - public static boolean isEmpty(final double[] array) { - return array == null || array.length == 0; - } - - /** - * 数组是否为空 - * - * @param array 数组 - * @return 是否为空 - */ - public static boolean isEmpty(final float[] array) { - return array == null || array.length == 0; - } - - /** - * 数组是否为空 - * - * @param array 数组 - * @return 是否为空 - */ - public static boolean isEmpty(final boolean[] array) { - return array == null || array.length == 0; - } - - /** - * 数组是否为非空 - * - * @param array 数组 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final long[] array) { - return !isEmpty(array); - } - - /** - * 数组是否为非空 - * - * @param array 数组 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final int[] array) { - return !isEmpty(array); - } - - /** - * 数组是否为非空 - * - * @param array 数组 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final short[] array) { - return !isEmpty(array); - } - - /** - * 数组是否为非空 - * - * @param array 数组 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final char[] array) { - return !isEmpty(array); - } - - /** - * 数组是否为非空 - * - * @param array 数组 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final byte[] array) { - return !isEmpty(array); - } - - /** - * 数组是否为非空 - * - * @param array 数组 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final double[] array) { - return !isEmpty(array); - } - - /** - * 数组是否为非空 - * - * @param array 数组 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final float[] array) { - return !isEmpty(array); - } - - /** - * 数组是否为非空 - * - * @param array 数组 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final boolean[] array) { - return !isEmpty(array); - } +public class PrimitiveArray extends ArrayValidator { /** * 生成一个新的重新设置大小的数组 @@ -2669,299 +2509,6 @@ public static short[] swap(final short[] array, final int index1, final int inde return array; } - /** - * 检查数组是否升序,即{@code array[i] <= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否升序 - */ - public static boolean isSortedASC(final byte[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] > array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否降序,即{@code array[i] >= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否降序 - */ - public static boolean isSortedDESC(final byte[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] < array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否升序,即{@code array[i] <= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否升序 - */ - public static boolean isSortedASC(final short[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] > array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否降序,即{@code array[i] >= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否降序 - */ - public static boolean isSortedDESC(final short[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] < array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否升序,即{@code array[i] <= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否升序 - */ - public static boolean isSortedASC(final char[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] > array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否降序,即{@code array[i] >= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否降序 - */ - public static boolean isSortedDESC(final char[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] < array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否升序,即{@code array[i] <= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否升序 - */ - public static boolean isSortedASC(final int[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] > array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否降序,即{@code array[i] >= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否降序 - */ - public static boolean isSortedDESC(final int[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] < array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否升序,即{@code array[i] <= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否升序 - */ - public static boolean isSortedASC(final long[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] > array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否降序,即{@code array[i] >= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否降序 - */ - public static boolean isSortedDESC(final long[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] < array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否升序,即{@code array[i] <= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否升序 - */ - public static boolean isSortedASC(final double[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] > array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否降序,即{@code array[i] >= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否降序 - */ - public static boolean isSortedDESC(final double[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] < array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否升序,即{@code array[i] <= array[i+1]} - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否升序 - */ - public static boolean isSortedASC(final float[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] > array[i + 1]) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否降序,即array[i] >= array[i+1] - * 若传入空数组,则返回{@code false} - * - * @param array 数组 - * @return 数组是否降序 - */ - public static boolean isSortedDESC(final float[] array) { - if (isEmpty(array)) { - return false; - } - - for (int i = 0; i < array.length - 1; i++) { - if (array[i] < array[i + 1]) { - return false; - } - } - return true; - } - /** * array数组是否以prefix开头 *
* *
-     * trim(null)          = null
-     * trim("")            = ""
-     * trim("     ")       = ""
-     * trim("abc")         = "abc"
-     * trim("    abc    ") = "abc"
+     * trim(null)                         = null
+     * trim("")                 = ""
+     * trim("     ")            = ""
+     * trim("abc")              = "abc"
+     * trim("    abc    ")      = "abc"
      * 
* * @param text 要处理的字符串 @@ -223,11 +305,11 @@ public static String trim(final CharSequence text) { * 除去字符串头尾部的空白,如果字符串是{@code null},返回{@code ""}。 * *
-     * trimToEmpty(null)          = ""
-     * trimToEmpty("")            = ""
-     * trimToEmpty("     ")       = ""
-     * trimToEmpty("abc")         = "abc"
-     * trimToEmpty("    abc    ") = "abc"
+     * trimToEmpty(null)                  = ""
+     * trimToEmpty("")                    = ""
+     * trimToEmpty("     ")               = ""
+     * trimToEmpty("abc")                 = "abc"
+     * trimToEmpty("    abc    ")         = "abc"
      * 
* * @param text 字符串 @@ -241,11 +323,11 @@ public static String trimToEmpty(final CharSequence text) { * 除去字符串头尾部的空白,如果字符串是{@code null}或者"",返回{@code null}。 * *
-     * trimToNull(null)          = null
-     * trimToNull("")            = null
-     * trimToNull("     ")       = null
-     * trimToNull("abc")         = "abc"
-     * trimToEmpty("    abc    ") = "abc"
+     * trimToNull(null)                   = null
+     * trimToNull("")                     = null
+     * trimToNull("     ")                = null
+     * trimToNull("abc")                  = "abc"
+     * trimToEmpty("    abc    ")         = "abc"
      * 
* * @param text 字符串 @@ -263,7 +345,7 @@ public static String trimToNull(final CharSequence text) { * 注意,和{@link String#trim()}不同,此方法使用{@link CharKit#isBlankChar(char)} 来判定空白, 因而可以除去英文字符集之外的其它空白,如中文空格。 * *
-     * trimPrefix(null)         = null
+     * trimPrefix(null)                   = null
      * trimPrefix("")           = ""
      * trimPrefix("abc")        = "abc"
      * trimPrefix("  abc")      = "abc"
@@ -285,12 +367,12 @@ public static String trimPrefix(final CharSequence text) {
      * 注意,和{@link String#trim()}不同,此方法使用{@link CharKit#isBlankChar(char)} 来判定空白, 因而可以除去英文字符集之外的其它空白,如中文空格。
      *
      * 
-     * trimSuffix(null)       = null
-     * trimSuffix("")         = ""
-     * trimSuffix("abc")      = "abc"
-     * trimSuffix("  abc")    = "  abc"
-     * trimSuffix("abc  ")    = "abc"
-     * trimSuffix(" abc ")    = " abc"
+     * trimSuffix(null)                  = null
+     * trimSuffix("")          = ""
+     * trimSuffix("abc")       = "abc"
+     * trimSuffix("  abc")     = "  abc"
+     * trimSuffix("abc  ")     = "abc"
+     * trimSuffix(" abc ")     = " abc"
      * 
* * @param text 要处理的字符串 @@ -975,7 +1057,7 @@ public static int ordinalIndexOf(final CharSequence text, final CharSequence arg public static String removeAll(final CharSequence text, final CharSequence args) { // args如果为空, 也不用继续后面的逻辑 if (isEmpty(text) || isEmpty(args)) { - return toString(text); + return toStringOrNull(text); } return text.toString().replace(args, Normal.EMPTY); } @@ -989,7 +1071,7 @@ public static String removeAll(final CharSequence text, final CharSequence args) * @return 移除后的字符串 */ public static String removeAny(final CharSequence text, final CharSequence... args) { - String result = toString(text); + String result = toStringOrNull(text); if (isNotEmpty(text)) { for (final CharSequence remove : args) { result = removeAll(result, remove); @@ -1006,8 +1088,8 @@ public static String removeAny(final CharSequence text, final CharSequence... ar * @return 去除后的字符 */ public static String removeAll(final CharSequence text, final char... chars) { - if (null == text || ArrayKit.isEmpty(chars)) { - return toString(text); + if (StringKit.isEmpty(text) || ArrayKit.isEmpty(chars)) { + return toStringOrNull(text); } return filter(text, (c) -> !ArrayKit.contains(chars, c)); } @@ -1094,7 +1176,7 @@ public static String removePrefixIgnoreCase(final CharSequence text, final CharS */ public static String removePrefix(final CharSequence text, final CharSequence prefix, final boolean ignoreCase) { if (isEmpty(text) || isEmpty(prefix)) { - return toString(text); + return toStringOrNull(text); } final String text2 = text.toString(); @@ -1113,7 +1195,7 @@ public static String removePrefix(final CharSequence text, final CharSequence pr */ public static String removeSuffix(final CharSequence text, final CharSequence suffix) { if (isEmpty(text) || isEmpty(suffix)) { - return toString(text); + return toStringOrNull(text); } final String text2 = text.toString(); @@ -1143,7 +1225,7 @@ public static String removeSufAndLowerFirst(final CharSequence text, final CharS */ public static String removeSuffixIgnoreCase(final CharSequence text, final CharSequence suffix) { if (isEmpty(text) || isEmpty(suffix)) { - return toString(text); + return toStringOrNull(text); } final String text2 = text.toString(); @@ -1189,7 +1271,7 @@ public static String strip(final CharSequence text, final CharSequence prefixOrS */ public static String strip(final CharSequence text, final CharSequence prefix, final CharSequence suffix) { if (isEmpty(text)) { - return toString(text); + return toStringOrNull(text); } int from = 0; @@ -1227,7 +1309,7 @@ public static String stripIgnoreCase(final CharSequence text, final CharSequence */ public static String stripIgnoreCase(final CharSequence text, final CharSequence prefix, final CharSequence suffix) { if (isEmpty(text)) { - return toString(text); + return toStringOrNull(text); } int from = 0; int to = text.length(); @@ -1307,7 +1389,7 @@ public static String[] cut(final CharSequence text, final int partLength) { */ public static String sub(final CharSequence text, int fromIndexInclude, int toIndexExclude) { if (isEmpty(text)) { - return toString(text); + return toStringOrNull(text); } final int len = text.length(); @@ -1352,7 +1434,7 @@ public static String sub(final CharSequence text, int fromIndexInclude, int toIn */ public static String subByCodePoint(final CharSequence text, final int fromIndex, final int toIndex) { if (isEmpty(text)) { - return toString(text); + return toStringOrNull(text); } if (fromIndex < 0 || fromIndex > toIndex) { @@ -1392,7 +1474,7 @@ public static String subPreGbk(final CharSequence text, final int len, final Cha */ public static String subPreGbk(final CharSequence text, int len, final boolean halfUp) { if (isEmpty(text)) { - return toString(text); + return toStringOrNull(text); } int counterOfDoubleByte = 0; @@ -2089,7 +2171,7 @@ public static String wrap(final CharSequence text, final CharSequence prefixAndS * @return 包装后的字符串 */ public static String wrap(final CharSequence text, final CharSequence prefix, final CharSequence suffix) { - return emptyIfNull(prefix).concat(emptyIfNull(text)).concat(emptyIfNull(suffix)); + return toStringOrEmpty(prefix).concat(toStringOrEmpty(text)).concat(toStringOrEmpty(suffix)); } /** @@ -2101,7 +2183,7 @@ public static String wrap(final CharSequence text, final CharSequence prefix, fi * @return 包装后的字符串 */ public static String wrap(final CharSequence text, final char prefix, final char suffix) { - return prefix + emptyIfNull(text) + suffix; + return prefix + toStringOrEmpty(text) + suffix; } /** @@ -2216,7 +2298,7 @@ public static String unWrap(final CharSequence text, final String prefix, final */ public static String unWrap(final CharSequence text, final char prefix, final char suffix) { if (isEmpty(text)) { - return toString(text); + return toStringOrNull(text); } if (text.charAt(0) == prefix && text.charAt(text.length() - 1) == suffix) { return sub(text, 1, text.length() - 1); @@ -2547,7 +2629,7 @@ public static String center(final CharSequence text, final int size) { */ public static String center(CharSequence text, final int size, final char padChar) { if (text == null || size <= 0) { - return toString(text); + return toStringOrNull(text); } final int strLen = text.length(); final int pads = size - strLen; @@ -2581,7 +2663,7 @@ public static String center(CharSequence text, final int size, final char padCha */ public static String center(CharSequence text, final int size, CharSequence padStr) { if (text == null || size <= 0) { - return toString(text); + return toStringOrNull(text); } if (isEmpty(padStr)) { padStr = Symbol.SPACE; @@ -2741,7 +2823,7 @@ public static int compareIgnoreCase(final CharSequence text1, final CharSequence * @return 排序值。负数:version1 < version2,正数:version1 > version2, 0:version1 == version2 */ public static int compareVersion(final CharSequence version1, final CharSequence version2) { - return VersionCompare.INSTANCE.compare(toString(version1), toString(version2)); + return VersionCompare.INSTANCE.compare(toStringOrNull(version1), toStringOrNull(version2)); } /** @@ -2781,7 +2863,7 @@ public static String appendIfMissingIgnoreCase(final CharSequence text, final Ch */ public static String appendIfMissing(final CharSequence text, final CharSequence suffix, final boolean ignoreCase, final CharSequence... testSuffixes) { if (text == null || isEmpty(suffix) || endWith(text, suffix, ignoreCase)) { - return toString(text); + return toStringOrNull(text); } if (ArrayKit.isNotEmpty(testSuffixes)) { for (final CharSequence testSuffix : testSuffixes) { @@ -2830,7 +2912,7 @@ public static String prependIfMissingIgnoreCase(final CharSequence text, final C */ public static String prependIfMissing(final CharSequence text, final CharSequence prefix, final boolean ignoreCase, final CharSequence... prefixes) { if (text == null || isEmpty(prefix) || startWith(text, prefix, ignoreCase)) { - return toString(text); + return toStringOrNull(text); } if (ArrayKit.isNotEmpty(prefixes)) { for (final CharSequence s : prefixes) { @@ -2853,11 +2935,11 @@ public static String prependIfMissing(final CharSequence text, final CharSequenc */ public static String replaceFirst(final CharSequence text, final CharSequence searchStr, final CharSequence replacedStr, final boolean ignoreCase) { if (isEmpty(text)) { - return toString(text); + return toStringOrNull(text); } final int startInclude = indexOf(text, searchStr, 0, ignoreCase); if (Normal.__1 == startInclude) { - return toString(text); + return toStringOrNull(text); } return replaceByCodePoint(text, startInclude, startInclude + searchStr.length(), replacedStr); } @@ -2873,11 +2955,11 @@ public static String replaceFirst(final CharSequence text, final CharSequence se */ public static String replaceLast(final CharSequence text, final CharSequence searchStr, final CharSequence replacedStr, final boolean ignoreCase) { if (isEmpty(text)) { - return toString(text); + return toStringOrNull(text); } final int lastIndex = lastIndexOf(text, searchStr, text.length(), ignoreCase); if (Normal.__1 == lastIndex) { - return toString(text); + return toStringOrNull(text); } return replace(text, lastIndex, searchStr, replacedStr, ignoreCase); } @@ -2932,7 +3014,7 @@ public static String replace(final CharSequence text, final CharSequence searchS */ public static String replace(final CharSequence text, final int fromIndex, final CharSequence searchStr, final CharSequence replacement, final boolean ignoreCase) { if (isEmpty(text) || isEmpty(searchStr)) { - return toString(text); + return toStringOrNull(text); } return new SearchReplacer(fromIndex, searchStr, replacement, ignoreCase).apply(text); } @@ -3030,7 +3112,7 @@ public static String hide(final CharSequence text, final int startInclude, final */ public static String replaceChars(final CharSequence text, final String chars, final CharSequence replacedStr) { if (isEmpty(text) || isEmpty(chars)) { - return toString(text); + return toStringOrNull(text); } return replaceChars(text, chars.toCharArray(), replacedStr); } @@ -3045,7 +3127,7 @@ public static String replaceChars(final CharSequence text, final String chars, f */ public static String replaceChars(final CharSequence text, final char[] chars, final CharSequence replacedStr) { if (isEmpty(text) || ArrayKit.isEmpty(chars)) { - return toString(text); + return toStringOrNull(text); } final Set set = new HashSet<>(chars.length); @@ -3067,10 +3149,10 @@ public static String replaceChars(final CharSequence text, final char[] chars, f * * @param text 字符串 * @param index 位置,-1表示最后一个字符 - * @param replaceFunc 替换逻辑,给定原字符,返回新字符 + * @param operator 替换逻辑,给定原字符,返回新字符 * @return 替换后的字符串 */ - public static String replaceAt(final CharSequence text, int index, final Function replaceFunc) { + public static String replaceAt(final CharSequence text, int index, final UnaryOperator operator) { if (text == null) { return null; } @@ -3088,16 +3170,16 @@ public static String replaceAt(final CharSequence text, int index, final Functio // 检查转换前后是否有编码,无变化则不转换,返回原字符串 final char c = string.charAt(index); - final Character newC = replaceFunc.apply(c); + final Character newC = operator.apply(c); if (c == newC) { // 无变化,返回原字符串 return string; } // 此处不复用传入的CharSequence,防止修改原对象 - final StringBuilder builder = new StringBuilder(text); - builder.setCharAt(index, replaceFunc.apply(c)); - return builder.toString(); + final char[] chars = string.toCharArray(); + chars[index] = newC; + return new String(chars); } /** @@ -3193,11 +3275,11 @@ public static String limitByteLength(final CharSequence text, final java.nio.cha final int factor, final boolean appendDots) { //字符数*速算因子<=最大字节数 if (text == null || text.length() * factor <= maxBytesLength) { - return toString(text); + return toStringOrNull(text); } final byte[] sba = ByteKit.toBytes(text, charset); if (sba.length <= maxBytesLength) { - return toString(text); + return toStringOrNull(text); } //限制字节数 final int limitBytes; @@ -3268,102 +3350,51 @@ public static String upperFirstAndAddPre(final CharSequence text, final String p } return preString + upperFirst(text); } - /** - * 大写对应下标字母 - * - *
例如: text = name,index = 1, return nAme
+ * 大写首字母 + * 例如:text = name, return Name * - * @param text 字符串 - * @param index 下标,支持负数,-1表示最后一个字符 + * @param text 字符串 * @return 字符串 */ - public static String upperAt(final CharSequence text, int index) { - if (null == text) { - return null; - } - - // 支持负数 - final int length = text.length(); - if (index < 0) { - index += length; - } - - final String string = text.toString(); - if (index < 0 || index >= length) { - return string; - } - - final char c = text.charAt(index); - if (!Character.isLowerCase(c)) { - // 非小写不转换,某些字符非小写也非大写,一并略过 - return string; - } - - // 此处不复用传入的CharSequence,防止修改原对象 - final StringBuilder builder = new StringBuilder(text); - builder.setCharAt(index, Character.toUpperCase(c)); - - return builder.toString(); + public static String upperFirst(final CharSequence text) { + return upperAt(text, 0); } /** - * 小写对应下标字母 - * 例如: text = NAME,index = 1, return NaME + * 大写对应下标字母 + * + *
例如: text = name,index = 1, return nAme
* * @param text 字符串 * @param index 下标,支持负数,-1表示最后一个字符 * @return 字符串 */ - public static String lowerAt(final CharSequence text, int index) { - if (text == null) { - return null; - } - - // 支持负数 - final int length = text.length(); - if (index < 0) { - index += length; - } - - final String string = text.toString(); - if (index < 0 || index >= length) { - return string; - } - - final char c = text.charAt(index); - if (!Character.isUpperCase(c)) { - // 非大写不转换,某些字符非小写也非大写,一并略过 - return string; - } - - // 此处不复用传入的CharSequence,防止修改原对象 - final StringBuilder builder = new StringBuilder(text); - builder.setCharAt(index, Character.toLowerCase(c)); - - return builder.toString(); + public static String upperAt(final CharSequence text, final int index) { + return replaceAt(text, index, Character::toUpperCase); } /** - * 大写首字母 - * 例如:text = name, return Name + * 小写首字母 + * 例如:text = Name, return name * * @param text 字符串 * @return 字符串 */ - public static String upperFirst(final CharSequence text) { - return upperAt(text, 0); + public static String lowerFirst(final CharSequence text) { + return lowerAt(text, 0); } /** - * 小写首字母 - * 例如:text = Name, return name + * 小写对应下标字母 + * 例如: text = NAME,index = 1, return NaME * - * @param text 字符串 + * @param text 字符串 + * @param index 下标,支持负数,-1表示最后一个字符 * @return 字符串 */ - public static String lowerFirst(final CharSequence text) { - return lowerAt(text, 0); + public static String lowerAt(final CharSequence text, final int index) { + return replaceAt(text, index, Character::toLowerCase); } /** @@ -3375,7 +3406,7 @@ public static String lowerFirst(final CharSequence text) { */ public static String filter(final CharSequence text, final Predicate predicate) { if (text == null || predicate == null) { - return toString(text); + return toStringOrNull(text); } final int len = text.length(); @@ -3570,7 +3601,7 @@ public static String genGetter(final CharSequence fieldName) { public static String concat(final boolean isNullToEmpty, final CharSequence... args) { final StringBuilder sb = new StringBuilder(); for (final CharSequence text : args) { - sb.append(isNullToEmpty ? emptyIfNull(text) : text); + sb.append(isNullToEmpty ? toStringOrEmpty(text) : text); } return sb.toString(); } @@ -3673,7 +3704,7 @@ public static boolean isNumeric(final CharSequence text) { */ public static String move(final CharSequence text, final int startInclude, final int endExclude, int moveLength) { if (isEmpty(text)) { - return toString(text); + return toStringOrNull(text); } final int len = text.length(); if (Math.abs(moveLength) > len) { @@ -3694,7 +3725,7 @@ public static String move(final CharSequence text, final int startInclude, final .append(text.subSequence(startAfterMove, startInclude)) .append(text.subSequence(endExclude, text.length())); } else { - return toString(text); + return toStringOrNull(text); } return strBuilder.toString(); } @@ -4121,4 +4152,18 @@ public static Function trimFunc(final boolean isTrim) { return isTrim ? StringKit::trim : Function.identity(); } + /** + * 将字符串转换为字符数组 + * + * @param text 字符串 + * @param isCodePoint 是否为Unicode码点(即支持emoji等多char字符) + * @return 字符数组 + */ + public static int[] toChars(final CharSequence text, final boolean isCodePoint) { + if (null == text) { + return null; + } + return (isCodePoint ? text.codePoints() : text.chars()).toArray(); + } + } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/text/StringValidator.java b/bus-core/src/main/java/org/miaixz/bus/core/text/CharsValidator.java similarity index 68% rename from bus-core/src/main/java/org/miaixz/bus/core/text/StringValidator.java rename to bus-core/src/main/java/org/miaixz/bus/core/text/CharsValidator.java index 9411fee048..39c016b166 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/text/StringValidator.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/text/CharsValidator.java @@ -44,22 +44,20 @@ * @author Kimi Liu * @since Java 17+ */ -public class StringValidator { +public class CharsValidator { /** - *

字符串是否为空白,空白的定义如下:

+ * 字符串是否为空白,空白的定义如下 *
    *
  1. {@code null}
  2. *
  3. 空字符串:{@code ""}
  4. *
  5. 空格、全角空格、制表符、换行符,等不可见字符
  6. *
- * - *

例:

*
    - *
  • {@code StringKit.isBlank(null) // true}
  • - *
  • {@code StringKit.isBlank("") // true}
  • - *
  • {@code StringKit.isBlank(" \t\n") // true}
  • - *
  • {@code StringKit.isBlank("abc") // false}
  • + *
  • {@code isBlank(null) // true}
  • + *
  • {@code isBlank("") // true}
  • + *
  • {@code isBlank(" \t\n") // true}
  • + *
  • {@code isBlank("abc") // false}
  • *
* *

注意:该方法与 {@link #isEmpty(CharSequence)} 的区别是: @@ -100,13 +98,11 @@ public static boolean isBlank(final CharSequence text) { *

  • 不为空字符串:{@code ""}
  • *
  • 不为空格、全角空格、制表符、换行符,等不可见字符
  • * - * - *

    例:

    *
      - *
    • {@code StringKit.isNotBlank(null) // false}
    • - *
    • {@code StringKit.isNotBlank("") // false}
    • - *
    • {@code StringKit.isNotBlank(" \t\n") // false}
    • - *
    • {@code StringKit.isNotBlank("abc") // true}
    • + *
    • {@code isNotBlank(null) // false}
    • + *
    • {@code isNotBlank("") // false}
    • + *
    • {@code isNotBlank(" \t\n") // false}
    • + *
    • {@code isNotBlank("abc") // true}
    • *
    * *

    注意:该方法与 {@link #isNotEmpty(CharSequence)} 的区别是: @@ -136,18 +132,16 @@ public static boolean isNotBlank(final CharSequence text) { } /** - *

    字符串是否为空,空的定义如下:

    + * 字符串是否为空,空的定义如下 *
      *
    1. {@code null}
    2. *
    3. 空字符串:{@code ""}
    4. *
    - * - *

    例:

    *
      - *
    • {@code StringKit.isEmpty(null) // true}
    • - *
    • {@code StringKit.isEmpty("") // true}
    • - *
    • {@code StringKit.isEmpty(" \t\n") // false}
    • - *
    • {@code StringKit.isEmpty("abc") // false}
    • + *
    • {@code isEmpty(null) // true}
    • + *
    • {@code isEmpty("") // true}
    • + *
    • {@code isEmpty(" \t\n") // false}
    • + *
    • {@code isEmpty("abc") // false}
    • *
    * *

    注意:该方法与 {@link #isBlank(CharSequence)} 的区别是:该方法不校验空白字符。

    @@ -166,18 +160,16 @@ public static boolean isEmpty(final CharSequence text) { } /** - *

    字符串是否为非空白,非空白的定义如下:

    + * 字符串是否为非空白,非空白的定义如下 *
      *
    1. 不为 {@code null}
    2. *
    3. 不为空字符串:{@code ""}
    4. *
    - * - *

    例:

    *
      - *
    • {@code StringKit.isNotEmpty(null) // false}
    • - *
    • {@code StringKit.isNotEmpty("") // false}
    • - *
    • {@code StringKit.isNotEmpty(" \t\n") // true}
    • - *
    • {@code StringKit.isNotEmpty("abc") // true}
    • + *
    • {@code isNotEmpty(null) // false}
    • + *
    • {@code isNotEmpty("") // false}
    • + *
    • {@code isNotEmpty(" \t\n") // true}
    • + *
    • {@code isNotEmpty("abc") // true}
    • *
    * *

    注意:该方法与 {@link #isNotBlank(CharSequence)} 的区别是:该方法不校验空白字符。

    @@ -192,17 +184,70 @@ public static boolean isNotEmpty(final CharSequence text) { } /** - *

    是否包含空字符串。

    - *

    如果指定的字符串数组的长度为 0,或者其中的任意一个元素是空字符串,则返回 true。

    + * 指定字符串数组中,是否包含空字符串。 + * 如果指定的字符串数组的长度为 0,或者其中的任意一个元素是空字符串,则返回 true。 + *
      + *
    • {@code hasBlank() // true}
    • + *
    • {@code hasBlank("", null, " ") // true}
    • + *
    • {@code hasBlank("123", " ") // true}
    • + *
    • {@code hasBlank("123", "abc") // false}
    • + *
    * + *

    注意:该方法与 {@link #isAllBlank(CharSequence...)} 的区别在于:

    + *
      + *
    • hasBlank(CharSequence...) 等价于 {@code isBlank(...) || isBlank(...) || ...}
    • + *
    • {@link #isAllBlank(CharSequence...)} 等价于 {@code isBlank(...) && isBlank(...) && ...}
    • + *
    * - *

    例:

    + * @param strs 字符串列表 + * @return 是否包含空字符串 + */ + public static boolean hasBlank(final CharSequence... strs) { + return ArrayKit.hasBlank(strs); + } + + /** + * 是否存都不为{@code null}或空对象或空白符的对象,通过{@link #hasBlank(CharSequence...)} 判断元素 + * + * @param args 被检查的对象,一个或者多个 + * @return 是否都不为空 + */ + public static boolean isAllNotBlank(final CharSequence... args) { + return ArrayKit.isAllNotBlank(args); + } + + /** + * 指定字符串数组中的元素,是否全部为空字符串。 + * 如果指定的字符串数组的长度为 0,或者所有元素都是空字符串,则返回 true。 + *
      + *
    • {@code isAllBlank() // true}
    • + *
    • {@code isAllBlank("", null, " ") // true}
    • + *
    • {@code isAllBlank("123", " ") // false}
    • + *
    • {@code isAllBlank("123", "abc") // false}
    • + *
    + * + *

    注意:该方法与 {@link #hasBlank(CharSequence...)} 的区别在于:

    + *
      + *
    • {@link #hasBlank(CharSequence...)} 等价于 {@code isBlank(...) || isBlank(...) || ...}
    • + *
    • isAllBlank(CharSequence...) 等价于 {@code isBlank(...) && isBlank(...) && ...}
    • + *
    + * + * @param strs 字符串列表 + * @return 所有字符串是否为空白 + */ + public static boolean isAllBlank(final CharSequence... strs) { + return ArrayKit.isAllBlank(strs); + } + + /** + * 是否包含空字符串。 + * 如果指定的字符串数组的长度为 0,或者其中的任意一个元素是空字符串,则返回 true。 *
      - *
    • {@code StringKit.hasEmpty() // true}
    • - *
    • {@code StringKit.hasEmpty("", null) // true}
    • - *
    • {@code StringKit.hasEmpty("123", "") // true}
    • - *
    • {@code StringKit.hasEmpty("123", "abc") // false}
    • - *
    • {@code StringKit.hasEmpty(" ", "\t", "\n") // false}
    • + *
    • {@code hasEmpty() // true}
    • + *
    • {@code hasEmpty("", null) // true}
    • + *
    • {@code hasEmpty("123", "") // true}
    • + *
    • {@code hasEmpty("123", "abc") // false}
    • + *
    • {@code hasEmpty(" ", "\t", "\n") // false}
    • *
    * *

    注意:该方法与 {@link #isAllEmpty(CharSequence...)} 的区别在于:

    @@ -228,8 +273,8 @@ public static boolean hasEmpty(final CharSequence... args) { } /** - *

    是否包含空字符串。

    - *

    如果指定的字符串数组的长度为 0,或者其中的任意一个元素是空字符串,则返回 true。

    + * 是否包含空字符串。 + * 如果指定的字符串数组的长度为 0,或者其中的任意一个元素是空字符串,则返回 true。 * * @param args 字符串列表 * @return 是否包含空字符串 @@ -248,17 +293,14 @@ public static boolean hasEmpty(final Iterable args) { } /** - *

    指定字符串数组中的元素,是否全部为空字符串。

    - *

    如果指定的字符串数组的长度为 0,或者所有元素都是空字符串,则返回 true。

    - * - * - *

    例:

    + * 指定字符串数组中的元素,是否全部为空字符串。 + * 如果指定的字符串数组的长度为 0,或者所有元素都是空字符串,则返回 true。 *
      - *
    • {@code StringKit.isAllEmpty() // true}
    • - *
    • {@code StringKit.isAllEmpty("", null) // true}
    • - *
    • {@code StringKit.isAllEmpty("123", "") // false}
    • - *
    • {@code StringKit.isAllEmpty("123", "abc") // false}
    • - *
    • {@code StringKit.isAllEmpty(" ", "\t", "\n") // false}
    • + *
    • {@code isAllEmpty() // true}
    • + *
    • {@code isAllEmpty("", null) // true}
    • + *
    • {@code isAllEmpty("123", "") // false}
    • + *
    • {@code isAllEmpty("123", "abc") // false}
    • + *
    • {@code isAllEmpty(" ", "\t", "\n") // false}
    • *
    * *

    注意:该方法与 {@link #hasEmpty(CharSequence...)} 的区别在于:

    @@ -283,8 +325,8 @@ public static boolean isAllEmpty(final CharSequence... args) { } /** - *

    指定字符串数组中的元素,是否全部为空字符串。

    - *

    如果指定的字符串数组的长度为 0,或者所有元素都是空字符串,则返回 true。

    + * 指定字符串数组中的元素,是否全部为空字符串。 + * 如果指定的字符串数组的长度为 0,或者所有元素都是空字符串,则返回 true。 * * @param args 字符串列表 * @return 所有字符串是否为空白 @@ -302,17 +344,14 @@ public static boolean isAllEmpty(final Iterable args) { } /** - *

    指定字符串数组中的元素,是否都不为空字符串。

    - *

    如果指定的字符串数组的长度不为 0,或者所有元素都不是空字符串,则返回 true。

    - * - * - *

    例:

    + * 指定字符串数组中的元素,是否都不为空字符串。 + * 如果指定的字符串数组的长度不为 0,或者所有元素都不是空字符串,则返回 true。 *
      - *
    • {@code StringKit.isAllNotEmpty() // false}
    • - *
    • {@code StringKit.isAllNotEmpty("", null) // false}
    • - *
    • {@code StringKit.isAllNotEmpty("123", "") // false}
    • - *
    • {@code StringKit.isAllNotEmpty("123", "abc") // true}
    • - *
    • {@code StringKit.isAllNotEmpty(" ", "\t", "\n") // true}
    • + *
    • {@code isAllNotEmpty() // false}
    • + *
    • {@code isAllNotEmpty("", null) // false}
    • + *
    • {@code isAllNotEmpty("123", "") // false}
    • + *
    • {@code isAllNotEmpty("123", "abc") // true}
    • + *
    • {@code isAllNotEmpty(" ", "\t", "\n") // true}
    • *
    * *

    注意:该方法与 {@link #isAllEmpty(CharSequence...)} 的区别在于:

    diff --git a/bus-core/src/main/java/org/miaixz/bus/core/text/StringJoiner.java b/bus-core/src/main/java/org/miaixz/bus/core/text/StringJoiner.java index 1db24955ed..dcf452dd38 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/text/StringJoiner.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/text/StringJoiner.java @@ -28,11 +28,11 @@ package org.miaixz.bus.core.text; import org.miaixz.bus.core.center.iterator.ArrayIterator; +import org.miaixz.bus.core.convert.Convert; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.exception.InternalException; import org.miaixz.bus.core.xyz.ArrayKit; import org.miaixz.bus.core.xyz.IteratorKit; -import org.miaixz.bus.core.xyz.ObjectKit; import org.miaixz.bus.core.xyz.StringKit; import java.io.IOException; @@ -258,7 +258,7 @@ public StringJoiner append(final Object obj) { final Map.Entry entry = (Map.Entry) obj; append(entry.getKey()).append(entry.getValue()); } else { - append(ObjectKit.toString(obj)); + append(Convert.toString(obj)); } return this; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/text/StringSplitter.java b/bus-core/src/main/java/org/miaixz/bus/core/text/StringSplitter.java index 43979bfae5..93a3792c34 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/text/StringSplitter.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/text/StringSplitter.java @@ -30,6 +30,7 @@ import org.miaixz.bus.core.center.iterator.ComputeIterator; import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.text.finder.TextFinder; +import org.miaixz.bus.core.xyz.ObjectKit; import org.miaixz.bus.core.xyz.StringKit; import java.io.Serializable; @@ -167,7 +168,7 @@ public List toList(final Function mapping) { final List result = new ArrayList<>(); while (this.hasNext()) { final T apply = mapping.apply(this.next()); - if (ignoreEmpty && StringKit.isEmptyIfString(apply)) { + if (ignoreEmpty && ObjectKit.isEmptyIfString(apply)) { // 对于mapping之后依旧是String的情况,ignoreEmpty依旧有效 continue; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/text/StringTrimer.java b/bus-core/src/main/java/org/miaixz/bus/core/text/StringTrimer.java index fa7a30fec4..f206402df8 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/text/StringTrimer.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/text/StringTrimer.java @@ -73,7 +73,7 @@ public StringTrimer(final TrimMode mode, final Predicate predicate) { @Override public String apply(final CharSequence text) { if (StringKit.isEmpty(text)) { - return StringKit.toString(text); + return StringKit.toStringOrNull(text); } final int length = text.length(); diff --git a/bus-core/src/main/java/org/miaixz/bus/core/text/placeholder/PlaceholderParser.java b/bus-core/src/main/java/org/miaixz/bus/core/text/placeholder/PlaceholderParser.java index ea163bdc71..44ed16bfc5 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/text/placeholder/PlaceholderParser.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/text/placeholder/PlaceholderParser.java @@ -31,7 +31,7 @@ import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.exception.InternalException; -import org.miaixz.bus.core.text.StringValidator; +import org.miaixz.bus.core.text.CharsValidator; import java.util.Objects; import java.util.function.UnaryOperator; @@ -97,8 +97,8 @@ public PlaceholderParser( */ public PlaceholderParser( final UnaryOperator processor, final String prefix, final String suffix, final char escape) { - Assert.isFalse(StringValidator.isEmpty(prefix), "开始符号不能为空"); - Assert.isFalse(StringValidator.isEmpty(suffix), "结束符号不能为空"); + Assert.isFalse(CharsValidator.isEmpty(prefix), "开始符号不能为空"); + Assert.isFalse(CharsValidator.isEmpty(suffix), "结束符号不能为空"); this.processor = Objects.requireNonNull(processor); this.open = prefix; this.openLength = prefix.length(); @@ -115,7 +115,7 @@ public PlaceholderParser( */ @Override public String apply(final String text) { - if (StringValidator.isEmpty(text)) { + if (CharsValidator.isEmpty(text)) { return Normal.EMPTY; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/text/placeholder/template/NamedStringTemplate.java b/bus-core/src/main/java/org/miaixz/bus/core/text/placeholder/template/NamedStringTemplate.java index 4db9818a0f..c285dab942 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/text/placeholder/template/NamedStringTemplate.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/text/placeholder/template/NamedStringTemplate.java @@ -27,8 +27,7 @@ */ package org.miaixz.bus.core.text.placeholder.template; -import org.miaixz.bus.core.beans.StrictBeanDesc; -import org.miaixz.bus.core.convert.Convert; +import org.miaixz.bus.core.beans.desc.BeanDesc; import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.exception.InternalException; @@ -36,7 +35,6 @@ import org.miaixz.bus.core.text.placeholder.segment.*; import org.miaixz.bus.core.xyz.*; -import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.*; import java.util.function.*; @@ -349,7 +347,7 @@ public String format(final Object beanOrMap) { if (beanOrMap instanceof Map) { return format((Map) beanOrMap); } else if (BeanKit.isReadableBean(beanOrMap.getClass())) { - final StrictBeanDesc beanDesc = BeanKit.getBeanDesc(beanOrMap.getClass()); + final BeanDesc beanDesc = BeanKit.getBeanDesc(beanOrMap.getClass()); return format(fieldName -> { final Method getterMethod = beanDesc.getGetter(fieldName); if (getterMethod == null) { @@ -358,7 +356,7 @@ public String format(final Object beanOrMap) { return LambdaKit.buildGetter(getterMethod).apply(beanOrMap); }); } - return format(fieldName -> BeanKit.getFieldValue(beanOrMap, fieldName)); + return format(fieldName -> BeanKit.getProperty(beanOrMap, fieldName)); } /** @@ -545,17 +543,8 @@ public T matches(final String text, final Supplier beanOrMapSupplier) { if (obj instanceof Map) { final Map map = (Map) obj; matchesByKey(text, map::put); - } else if (BeanKit.isReadableBean(obj.getClass())) { - final StrictBeanDesc beanDesc = BeanKit.getBeanDesc(obj.getClass()); - matchesByKey(text, (key, value) -> { - final Field field = beanDesc.getField(key); - final Method setterMethod = beanDesc.getSetter(key); - if (field == null || setterMethod == null) { - return; - } - final Object convert = Convert.convert(field.getType(), value); - LambdaKit.buildSetter(setterMethod).accept(obj, convert); - }); + } else if (BeanKit.isWritableBean(obj.getClass())) { + matchesByKey(text, (key, value) -> BeanKit.setProperty(obj, key, value)); } return obj; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/CharRangeReplacer.java b/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/CharRangeReplacer.java index c3899aa609..9654cf3ec5 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/CharRangeReplacer.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/CharRangeReplacer.java @@ -63,11 +63,11 @@ public CharRangeReplacer(final int beginInclude, final int endExclude, final cha @Override public String apply(final CharSequence text) { if (StringKit.isEmpty(text)) { - return StringKit.toString(text); + return StringKit.toStringOrNull(text); } - final String originalStr = StringKit.toString(text); - final int[] chars = (isCodePoint ? originalStr.codePoints() : originalStr.chars()).toArray(); + final String originalStr = text.toString(); + final int[] chars = StringKit.toChars(originalStr, this.isCodePoint); final int strLength = chars.length; final int beginInclude = this.beginInclude; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/SearchReplacer.java b/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/SearchReplacer.java index ec72ea49a8..a8ede9be37 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/SearchReplacer.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/SearchReplacer.java @@ -60,19 +60,19 @@ public SearchReplacer(final int fromIndex, final CharSequence searchText, final this.fromIndex = Math.max(fromIndex, 0); this.searchText = Assert.notEmpty(searchText, "'searchStr' must be not empty!"); this.searchTextLength = searchText.length(); - this.replacement = StringKit.emptyIfNull(replacement); + this.replacement = StringKit.toStringOrEmpty(replacement); this.ignoreCase = ignoreCase; } @Override public String apply(final CharSequence text) { if (StringKit.isEmpty(text)) { - return StringKit.toString(text); + return StringKit.toStringOrNull(text); } final int strLength = text.length(); if (strLength < this.searchTextLength) { - return StringKit.toString(text); + return StringKit.toStringOrNull(text); } final int fromIndex = this.fromIndex; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/StringRangeReplacer.java b/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/StringRangeReplacer.java index ca20901a1a..b9c37628e6 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/StringRangeReplacer.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/text/replacer/StringRangeReplacer.java @@ -63,11 +63,11 @@ public StringRangeReplacer(final int beginInclude, final int endExclude, final C @Override public String apply(final CharSequence text) { if (StringKit.isEmpty(text)) { - return StringKit.toString(text); + return StringKit.toStringOrNull(text); } - final String originalStr = StringKit.toString(text); - final int[] chars = (isCodePoint ? originalStr.codePoints() : originalStr.chars()).toArray(); + final String originalStr = text.toString(); + final int[] chars = StringKit.toChars(originalStr, this.isCodePoint); final int strLength = chars.length; final int beginInclude = this.beginInclude; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/AnnoKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/AnnoKit.java index 91e8149dcc..44a91b7554 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/AnnoKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/AnnoKit.java @@ -27,14 +27,14 @@ */ package org.miaixz.bus.core.xyz; -import org.miaixz.bus.core.annotation.resolve.AnnotationMappingProxy; -import org.miaixz.bus.core.annotation.resolve.AnnotationProxy; -import org.miaixz.bus.core.annotation.resolve.elements.CombinationAnnotatedElement; import org.miaixz.bus.core.center.function.FunctionX; -import org.miaixz.bus.core.center.function.LambdaInfo; +import org.miaixz.bus.core.center.function.LambdaX; import org.miaixz.bus.core.center.map.reference.WeakConcurrentMap; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.resolve.AnnotationMappingProxy; +import org.miaixz.bus.core.lang.annotation.resolve.AnnotationProxy; +import org.miaixz.bus.core.lang.annotation.resolve.elements.CombinationAnnotatedElement; import org.miaixz.bus.core.lang.exception.InternalException; import org.miaixz.bus.core.text.CharsBacker; @@ -209,7 +209,7 @@ public static R getAnnotationValue(final AnnotatedElem if (propertyName == null) { return null; } else { - final LambdaInfo lambda = LambdaKit.resolve(propertyName); + final LambdaX lambda = LambdaKit.resolve(propertyName); final String instantiatedMethodType = lambda.getLambda().getInstantiatedMethodType(); final Class annotationClass = ClassKit.loadClass(StringKit.sub(instantiatedMethodType, 2, StringKit.indexOf(instantiatedMethodType, Symbol.C_SEMICOLON))); return getAnnotationValue(annotationEle, annotationClass, lambda.getLambda().getImplMethodName()); diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ArrayKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ArrayKit.java index 82ebc12606..21a82e4e5c 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ArrayKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ArrayKit.java @@ -117,356 +117,6 @@ public static T[] ofArray(final Iterable iterable, final Class compone return ListKit.of(iterable.iterator()).toArray(newArray(componentType, 0)); } - /** - *

    指定字符串数组中,是否包含空字符串。

    - *

    如果指定的字符串数组的长度为 0,或者其中的任意一个元素是空字符串,则返回 true。

    - *
      - *
    • {@code hasBlank() // true}
    • - *
    • {@code hasBlank("", null, " ") // true}
    • - *
    • {@code hasBlank("123", " ") // true}
    • - *
    • {@code hasBlank("123", "abc") // false}
    • - *
    - * - *

    注意:该方法与 {@link #isAllBlank(CharSequence...)} 的区别在于:

    - *
      - *
    • hasBlank(CharSequence...) 等价于 {@code isBlank(...) || isBlank(...) || ...}
    • - *
    • {@link #isAllBlank(CharSequence...)} 等价于 {@code isBlank(...) && isBlank(...) && ...}
    • - *
    - * - * @param args 字符串列表 - * @return 是否包含空字符串 - */ - public static boolean hasBlank(final CharSequence... args) { - if (ArrayKit.isEmpty(args)) { - return true; - } - - for (final CharSequence text : args) { - if (StringKit.isBlank(text)) { - return true; - } - } - return false; - } - - /** - * 是否存都不为{@code null}或空对象或空白符的对象,通过{@link #hasBlank(CharSequence...)} 判断元素 - * - * @param args 被检查的对象,一个或者多个 - * @return 是否都不为空 - */ - public static boolean isAllNotBlank(final CharSequence... args) { - return !hasBlank(args); - } - - /** - *

    指定字符串数组中的元素,是否全部为空字符串。

    - *

    如果指定的字符串数组的长度为 0,或者所有元素都是空字符串,则返回 true。

    - *
      - *
    • {@code isAllBlank() // true}
    • - *
    • {@code isAllBlank("", null, " ") // true}
    • - *
    • {@code isAllBlank("123", " ") // false}
    • - *
    • {@code isAllBlank("123", "abc") // false}
    • - *
    - * - *

    注意:该方法与 {@link #hasBlank(CharSequence...)} 的区别在于:

    - *
      - *
    • {@link #hasBlank(CharSequence...)} 等价于 {@code isBlank(...) || isBlank(...) || ...}
    • - *
    • isAllBlank(CharSequence...) 等价于 {@code isBlank(...) && isBlank(...) && ...}
    • - *
    - * - * @param args 字符串列表 - * @return 所有字符串是否为空白 - */ - public static boolean isAllBlank(final CharSequence... args) { - if (ArrayKit.isEmpty(args)) { - return true; - } - - for (final CharSequence text : args) { - if (StringKit.isNotBlank(text)) { - return false; - } - } - return true; - } - - /** - * 数组是否为空 - * - * @param 数组元素类型 - * @param array 数组 - * @return 是否为空 - */ - public static boolean isEmpty(final T[] array) { - return array == null || array.length == 0; - } - - /** - * 如果给定数组为空,返回默认数组 - * - * @param 数组元素类型 - * @param array 数组 - * @param defaultArray 默认数组 - * @return 非空(empty)的原数组或默认数组 - */ - public static T[] defaultIfEmpty(final T[] array, final T[] defaultArray) { - return isEmpty(array) ? defaultArray : array; - } - - /** - * 数组是否为空 - * 此方法会匹配单一对象,如果此对象为{@code null}则返回true - * 如果此对象为非数组,理解为此对象为数组的第一个元素,则返回false - * 如果此对象为数组对象,数组长度大于0的情况下返回false,否则返回true - * - * @param array 数组 - * @return 是否为空 - */ - public static boolean isEmpty(final Object array) { - if (array != null) { - if (isArray(array)) { - return 0 == Array.getLength(array); - } - return false; - } - return true; - } - - /** - * 数组是否为非空 - * - * @param 数组元素类型 - * @param array 数组 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final T[] array) { - return !isEmpty(array); - } - - /** - * 数组是否为非空 - * 此方法会匹配单一对象,如果此对象为{@code null}则返回false - * 如果此对象为非数组,理解为此对象为数组的第一个元素,则返回true - * 如果此对象为数组对象,数组长度大于0的情况下返回true,否则返回false - * - * @param array 数组 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final Object array) { - return !isEmpty(array); - } - - /** - * 计算{@code null}或空元素对象的个数,通过{@link ObjectKit#isEmpty(Object)} 判断元素 - * - * @param args 被检查的对象,一个或者多个 - * @return {@code null}或空元素对象的个数 - */ - public static int emptyCount(final Object... args) { - int count = 0; - if (isNotEmpty(args)) { - for (final Object element : args) { - if (ObjectKit.isEmpty(element)) { - count++; - } - } - } - return count; - } - - /** - * 是否存在{@code null}或空对象,通过{@link ObjectKit#isEmpty(Object)} 判断元素 - *

    如果提供的数组本身为空,则返回{@code false}

    - * - * @param 元素类型 - * @param args 被检查对象 - * @return 是否存在 {@code null} 或空对象 - */ - public static boolean hasEmpty(final T[] args) { - if (isNotEmpty(args)) { - for (final T element : args) { - if (ObjectKit.isEmpty(element)) { - return true; - } - } - } - return false; - } - - /** - * 是否存在{@code null}或空对象,通过{@link ObjectKit#isEmpty(Object)} 判断元素 - *

    如果提供的数组本身为空,则返回{@code false}

    - *

    限制条件:args的每个item不能是数组、不能是集合

    - * - * @param 元素类型 - * @param args 被检查对象 - * @return 是否存在 {@code null} 或空对象 - * @throws IllegalArgumentException 如果提供的args的item存在数组或集合,抛出异常 - */ - @SafeVarargs - public static boolean hasEmptyVarargs(final T... args) { - return hasEmpty(args); - } - - /** - * 是否所有元素都为{@code null}或空对象,通过{@link ObjectKit#isEmpty(Object)} 判断元素 - * 如果提供的数组本身为空,则返回{@code true} - * - * @param 元素类型 - * @param args 被检查的对象,一个或者多个 - * @return 是否都为空 - */ - public static boolean isAllEmpty(final T[] args) { - for (final T obj : args) { - if (!ObjectKit.isEmpty(obj)) { - return false; - } - } - return true; - } - - /** - * 是否所有元素都为{@code null}或空对象,通过{@link ObjectKit#isEmpty(Object)} 判断元素 - *

    如果提供的数组本身为空,则返回{@code true}

    - *

    限制条件:args的每个item不能是数组、不能是集合

    - * - * @param 元素类型 - * @param args 被检查的对象,一个或者多个 - * @return 是否都为空 - * @throws IllegalArgumentException 如果提供的args的item存在数组或集合,抛出异常 - */ - @SafeVarargs - public static boolean isAllEmptyVarargs(final T... args) { - return isAllEmpty(args); - } - - /** - * 是否所有元素都不为{@code null}或空对象,通过{@link ObjectKit#isEmpty(Object)} 判断元素 - *

    如果提供的数组本身为空,则返回{@code true}

    - * - * @param args 被检查的对象,一个或者多个 - * @return 是否都不为空 - */ - public static boolean isAllNotEmpty(final Object... args) { - return !hasEmpty(args); - } - - /** - * 是否包含{@code null}元素 - *

    如果数组为null,则返回{@code true},如果数组为空,则返回{@code false}

    - * - * @param 数组元素类型 - * @param array 被检查的数组 - * @return 是否包含 {@code null} 元素 - */ - public static boolean hasNull(final T... array) { - if (isNotEmpty(array)) { - for (final T element : array) { - if (ObjectKit.isNull(element)) { - return true; - } - } - } - return array == null; - } - - /** - * 所有字段是否全为null - *

    如果数组为{@code null}或者空,则返回 {@code true}

    - * - * @param 数组元素类型 - * @param array 被检查的数组 - * @return 所有字段是否全为null - */ - public static boolean isAllNull(final T... array) { - return null == firstNonNull(array); - } - - /** - * 是否所有元素都不为 {@code null} - *

    如果提供的数组为null,则返回{@code false},如果提供的数组为空,则返回{@code true}

    - * - * @param 数组元素类型 - * @param array 被检查的数组 - * @return 是否所有元素都不为 {@code null} - */ - public static boolean isAllNotNull(final T... array) { - return !hasNull(array); - } - - /** - * 是否包含非{@code null}元素 - *

    如果数组是{@code null}或者空,返回{@code false},否则当数组中有非{@code null}元素时返回{@code true}

    - * - * @param 数组元素类型 - * @param array 被检查的数组 - * @return 是否包含非 {@code null} 元素 - */ - public static boolean hasNonNull(final T... array) { - return null != firstNonNull(array); - } - - /** - * 返回数组中第一个非空元素 - * - * @param 数组元素类型 - * @param array 数组 - * @return 第一个非空元素,如果 不存在非空元素 或 数组为空,返回{@code null} - */ - public static T firstNonNull(final T... array) { - if (isEmpty(array)) { - return null; - } - return firstMatch(ObjectKit::isNotNull, array); - } - - /** - * 返回数组中第一个匹配规则的值 - * - * @param 数组元素类型 - * @param matcher 匹配接口,实现此接口自定义匹配规则 - * @param array 数组 - * @return 第一个匹配元素,如果 不存在匹配元素 或 数组为空,返回 {@code null} - */ - public static T firstMatch(final Predicate matcher, final T... array) { - final int index = matchIndex(matcher, array); - if (index == Normal.__1) { - return null; - } - - return array[index]; - } - - /** - * 返回数组中第一个匹配规则的值的位置 - * - * @param 数组元素类型 - * @param matcher 匹配接口,实现此接口自定义匹配规则 - * @param array 数组 - * @return 第一个匹配元素的位置,{@link Normal#__1}表示未匹配到 - */ - public static int matchIndex(final Predicate matcher, final T... array) { - return matchIndex(0, matcher, array); - } - - /** - * 返回数组中第一个匹配规则的值的位置 - * - * @param 数组元素类型 - * @param matcher 匹配接口,实现此接口自定义匹配规则 - * @param beginIndexInclude 检索开始的位置,不能为负数 - * @param array 数组 - * @return 第一个匹配元素的位置,{@link Normal#__1}表示未匹配到 - */ - public static int matchIndex(final int beginIndexInclude, final Predicate matcher, final E... array) { - if (isEmpty(array)) { - return Normal.__1; - } - final ArrayWrapper arrayWrapper = ArrayWrapper.of(array); - return arrayWrapper.matchIndex(beginIndexInclude, matcher); - } - /** * 新建一个空数组 * @@ -1066,84 +716,6 @@ public static Map zip(final K[] keys, final V[] values) { return zip(keys, values, false); } - /** - * 返回数组中指定元素所在位置,未找到返回{@link Normal#__1} - * - * @param 数组类型 - * @param array 数组 - * @param value 被检查的元素 - * @param beginIndexInclude 检索开始的位置 - * @return 数组中指定元素所在位置,未找到返回{@link Normal#__1} - */ - public static int indexOf(final T[] array, final Object value, final int beginIndexInclude) { - return ArrayWrapper.of(array).indexOf(value, beginIndexInclude); - } - - /** - * 返回数组中指定元素所在位置,未找到返回{@link Normal#__1} - * - * @param 数组类型 - * @param array 数组 - * @param value 被检查的元素 - * @return 数组中指定元素所在位置,未找到返回{@link Normal#__1} - */ - public static int indexOf(final T[] array, final Object value) { - return ArrayWrapper.of(array).indexOf(value); - } - - /** - * 返回数组中指定元素所在位置,忽略大小写,未找到返回{@link Normal#__1} - * - * @param array 数组 - * @param value 被检查的元素 - * @return 数组中指定元素所在位置,未找到返回{@link Normal#__1} - */ - public static int indexOfIgnoreCase(final CharSequence[] array, final CharSequence value) { - if (isNotEmpty(array)) { - for (int i = 0; i < array.length; i++) { - if (StringKit.equalsIgnoreCase(array[i], value)) { - return i; - } - } - } - return Normal.__1; - } - - /** - * 返回数组中指定元素最后的所在位置,未找到返回{@link Normal#__1} - * - * @param 数组类型 - * @param array 数组 - * @param value 被检查的元素 - * @return 数组中指定元素最后的所在位置,未找到返回{@link Normal#__1} - */ - public static int lastIndexOf(final T[] array, final Object value) { - if (isEmpty(array)) { - return Normal.__1; - } - return lastIndexOf(array, value, array.length - 1); - } - - /** - * 返回数组中指定元素最后的所在位置,未找到返回{@link Normal#__1} - * - * @param 数组类型 - * @param array 数组 - * @param value 被检查的元素 - * @param endInclude 从后向前查找时的起始位置,一般为{@code array.length - 1} - * @return 数组中指定元素最后的所在位置,未找到返回{@link Normal#__1} - */ - public static int lastIndexOf(final T[] array, final Object value, final int endInclude) { - if (isNotEmpty(array)) { - for (int i = endInclude; i >= 0; i--) { - if (ObjectKit.equals(value, array[i])) { - return i; - } - } - } - return Normal.__1; - } - /** * 数组中是否包含指定元素 * @@ -1242,16 +814,6 @@ public static Object[] wrap(final Object obj) { throw new InternalException(StringKit.format("[{}] is not Array!", obj.getClass())); } - /** - * 对象是否为数组对象 - * - * @param obj 对象 - * @return 是否为数组对象,如果为{@code null} 返回false - */ - public static boolean isArray(final Object obj) { - return null != obj && obj.getClass().isArray(); - } - /** * 获取数组对象中指定index的值,支持负数,例如-1表示倒数第一个值 * 如果数组下标越界,返回null @@ -1305,69 +867,6 @@ public static T[] getAny(final Object array, final int... indexes) { return result; } - /** - * 数组或集合转String - * - * @param obj 集合或数组对象 - * @return 数组字符串,与集合转字符串格式相同 - */ - public static String toString(final Object obj) { - if (Objects.isNull(obj)) { - return null; - } - if (obj instanceof long[]) { - return Arrays.toString((long[]) obj); - } else if (obj instanceof int[]) { - return Arrays.toString((int[]) obj); - } else if (obj instanceof short[]) { - return Arrays.toString((short[]) obj); - } else if (obj instanceof char[]) { - return Arrays.toString((char[]) obj); - } else if (obj instanceof byte[]) { - return Arrays.toString((byte[]) obj); - } else if (obj instanceof boolean[]) { - return Arrays.toString((boolean[]) obj); - } else if (obj instanceof float[]) { - return Arrays.toString((float[]) obj); - } else if (obj instanceof double[]) { - return Arrays.toString((double[]) obj); - } else if (ArrayKit.isArray(obj)) { - // 对象数组 - try { - return Arrays.deepToString((Object[]) obj); - } catch (final Exception ignore) { - //ignore - } - } - - return obj.toString(); - } - - /** - * 获取数组长度 - * 如果参数为{@code null},返回0 - * - *
    -     * ArrayKit.length(null)            = 0
    -     * ArrayKit.length([])              = 0
    -     * ArrayKit.length([null])          = 1
    -     * ArrayKit.length([true, false])   = 2
    -     * ArrayKit.length([1, 2, 3])       = 3
    -     * ArrayKit.length(["a", "b", "c"]) = 3
    -     * 
    - * - * @param array 数组对象 - * @return 数组长度 - * @throws IllegalArgumentException 如果参数不为数组,抛出此异常 - * @see Array#getLength(Object) - */ - public static int length(final Object array) throws IllegalArgumentException { - if (null == array) { - return 0; - } - return Array.getLength(array); - } - /** * 以 conjunction 为分隔符将数组转换为字符串 * @@ -1840,57 +1339,6 @@ public static
    A sub(final A array, return ArrayWrapper.of(array).getSub(beginInclude, endExclude, step); } - /** - * 是否是数组的子数组 - * - * @param array 数组 - * @param subArray 子数组 - * @param 数组元素类型 - * @return 是否是数组的子数组 - */ - public static boolean isSub(final T[] array, final T[] subArray) { - return indexOfSub(array, subArray) > Normal.__1; - } - - /** - * 查找子数组的位置 - * - * @param array 数组 - * @param subArray 子数组 - * @param 数组元素类型 - * @return 子数组的开始位置,即子数字第一个元素在数组中的位置 - */ - public static int indexOfSub(final T[] array, final T[] subArray) { - return indexOfSub(array, 0, subArray); - } - - /** - * 查找子数组的位置 - * - * @param array 数组 - * @param beginInclude 查找开始的位置(包含) - * @param subArray 子数组 - * @param 数组元素类型 - * @return 子数组的开始位置,即子数字第一个元素在数组中的位置 - */ - public static int indexOfSub(final T[] array, final int beginInclude, final T[] subArray) { - if (isEmpty(array) || isEmpty(subArray) || subArray.length > array.length) { - return Normal.__1; - } - final int firstIndex = indexOf(array, subArray[0], beginInclude); - if (firstIndex < 0 || firstIndex + subArray.length > array.length) { - return Normal.__1; - } - - for (int i = 0; i < subArray.length; i++) { - if (!ObjectKit.equals(array[i + firstIndex], subArray[i])) { - return indexOfSub(array, firstIndex + 1, subArray); - } - } - - return firstIndex; - } - /** * 查找最后一个子数组的开始位置 * @@ -1934,159 +1382,6 @@ public static int lastIndexOfSub(final T[] array, final int endInclude, fina return firstIndex; } - /** - * 检查数组是否有序,升序或者降序,使用指定比较器比较 - *

    若传入空数组或空比较器,则返回{@code false};元素全部相等,返回 {@code true}

    - * - * @param 数组元素类型 - * @param array 数组 - * @param comparator 比较器,需要自己处理null值比较 - * @return 数组是否有序 - */ - public static boolean isSorted(final T[] array, final Comparator comparator) { - if (isEmpty(array) || null == comparator) { - return false; - } - - final int size = array.length - 1; - final int cmp = comparator.compare(array[0], array[size]); - if (cmp < 0) { - return isSortedASC(array, comparator); - } else if (cmp > 0) { - return isSortedDESC(array, comparator); - } - for (int i = 0; i < size; i++) { - if (comparator.compare(array[i], array[i + 1]) != 0) { - return false; - } - } - return true; - } - - /** - * 检查数组是否有序,升序或者降序 - *

    若传入空数组,则返回{@code false};元素全部相等,返回 {@code true}

    - * - * @param 数组元素类型,该类型需要实现Comparable接口 - * @param array 数组 - * @return 数组是否有序 - * @throws NullPointerException 如果数组元素含有null值 - */ - public static > boolean isSorted(final T[] array) { - if (isEmpty(array)) { - return false; - } - final int size = array.length - 1; - final int cmp = array[0].compareTo(array[size]); - if (cmp < 0) { - return isSortedASC(array); - } else if (cmp > 0) { - return isSortedDESC(array); - } - for (int i = 0; i < size; i++) { - if (array[i].compareTo(array[i + 1]) != 0) { - return false; - } - } - return true; - } - - /** - * 检查数组是否升序,即 {@code array[i].compareTo(array[i + 1]) <= 0} - *

    若传入空数组,则返回{@code false}

    - * - * @param 数组元素类型,该类型需要实现Comparable接口 - * @param array 数组 - * @return 数组是否升序 - * @throws NullPointerException 如果数组元素含有null值 - */ - public static > boolean isSortedASC(final T[] array) { - if (isEmpty(array)) { - return false; - } - - final int size = array.length - 1; - for (int i = 0; i < size; i++) { - if (array[i].compareTo(array[i + 1]) > 0) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否降序,即 {@code array[i].compareTo(array[i + 1]) >= 0} - *

    若传入空数组,则返回{@code false}

    - * - * @param 数组元素类型,该类型需要实现Comparable接口 - * @param array 数组 - * @return 数组是否降序 - * @throws NullPointerException 如果数组元素含有null值 - */ - public static > boolean isSortedDESC(final T[] array) { - if (isEmpty(array)) { - return false; - } - - final int size = array.length - 1; - for (int i = 0; i < size; i++) { - if (array[i].compareTo(array[i + 1]) < 0) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否升序,使用指定的比较器比较,即 {@code compare.compare(array[i], array[i + 1]) <= 0} - *

    若传入空数组或空比较器,则返回{@code false}

    - * - * @param 数组元素类型 - * @param array 数组 - * @param comparator 比较器,需要自己处理null值比较 - * @return 数组是否升序 - */ - public static boolean isSortedASC(final T[] array, final Comparator comparator) { - if (isEmpty(array) || null == comparator) { - return false; - } - - final int size = array.length - 1; - for (int i = 0; i < size; i++) { - if (comparator.compare(array[i], array[i + 1]) > 0) { - return false; - } - } - - return true; - } - - /** - * 检查数组是否降序,使用指定的比较器比较,即 {@code compare.compare(array[i], array[i + 1]) >= 0} - *

    若传入空数组或空比较器,则返回{@code false}

    - * - * @param 数组元素类型 - * @param array 数组 - * @param comparator 比较器,需要自己处理null值比较 - * @return 数组是否降序 - */ - public static boolean isSortedDESC(final T[] array, final Comparator comparator) { - if (isEmpty(array) || null == comparator) { - return false; - } - - final int size = array.length - 1; - for (int i = 0; i < size; i++) { - if (comparator.compare(array[i], array[i + 1]) < 0) { - return false; - } - } - - return true; - } - /** * 判断数组中是否有相同元素 *

    若传入空数组,则返回{@code false}

    diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/BeanKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/BeanKit.java index 2ceba9dd77..faf971efe2 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/BeanKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/BeanKit.java @@ -27,10 +27,14 @@ */ package org.miaixz.bus.core.xyz; -import org.miaixz.bus.core.beans.*; +import org.miaixz.bus.core.beans.BeanCache; +import org.miaixz.bus.core.beans.DynaBean; import org.miaixz.bus.core.beans.copier.BeanCopier; import org.miaixz.bus.core.beans.copier.CopyOptions; import org.miaixz.bus.core.beans.copier.ValueProvider; +import org.miaixz.bus.core.beans.desc.BeanDesc; +import org.miaixz.bus.core.beans.desc.BeanDescFactory; +import org.miaixz.bus.core.beans.desc.PropDesc; import org.miaixz.bus.core.beans.path.BeanPath; import org.miaixz.bus.core.center.map.CaseInsensitiveMap; import org.miaixz.bus.core.center.map.Dictionary; @@ -82,13 +86,13 @@ public static PropertyEditor findEditor(final Class type) { } /** - * 获取{@link StrictBeanDesc} Bean描述信息 + * 获取{@link BeanDesc} Bean描述信息 * * @param clazz Bean类 - * @return {@link StrictBeanDesc} + * @return {@link BeanDesc} */ - public static StrictBeanDesc getBeanDesc(final Class clazz) { - return BeanDescCache.INSTANCE.getBeanDesc(clazz, () -> new StrictBeanDesc(clazz)); + public static BeanDesc getBeanDesc(final Class clazz) { + return BeanDescFactory.getBeanDesc(clazz); } /** @@ -122,7 +126,7 @@ public static PropertyDescriptor[] getPropertyDescriptors(final Class clazz) } /** - * 获得字段名和字段描述Map,获得的结果会缓存在 {@link BeanInfoCache}中 + * 获得字段名和字段描述Map,获得的结果会缓存在 {@link BeanCache}中 * * @param clazz Bean类 * @param ignoreCase 是否忽略大小写 @@ -130,7 +134,7 @@ public static PropertyDescriptor[] getPropertyDescriptors(final Class clazz) * @throws BeanException 获取属性异常 */ public static Map getPropertyDescriptorMap(final Class clazz, final boolean ignoreCase) throws BeanException { - return BeanInfoCache.INSTANCE.getPropertyDescriptorMap(clazz, ignoreCase, () -> internalGetPropertyDescriptorMap(clazz, ignoreCase)); + return BeanCache.INSTANCE.getPropertyDescriptorMap(clazz, ignoreCase, () -> internalGetPropertyDescriptorMap(clazz, ignoreCase)); } /** @@ -218,35 +222,6 @@ public static Object getFieldValue(final Object bean, final String fieldNameOrIn } } - /** - * 设置字段值,通过反射设置字段值,并不调用setXXX方法 - * 对象同样支持Map类型,fieldNameOrIndex即为key,支持: - *
      - *
    • Map
    • - *
    • List
    • - *
    • Bean
    • - *
    - * - * @param bean Bean - * @param fieldNameOrIndex 字段名或序号,序号支持负数 - * @param value 值 - * @return beans,当为数组时,返回一个新的数组 - */ - public static Object setFieldValue(final Object bean, final String fieldNameOrIndex, final Object value) { - if (bean instanceof Map) { - ((Map) bean).put(fieldNameOrIndex, value); - } else if (bean instanceof List) { - ListKit.setOrPadding((List) bean, Convert.toInt(fieldNameOrIndex), value); - } else if (ArrayKit.isArray(bean)) { - // 追加产生新数组,此处返回新数组 - return ArrayKit.setOrPadding(bean, Convert.toInt(fieldNameOrIndex), value); - } else { - // 普通Bean对象 - FieldKit.setFieldValue(bean, fieldNameOrIndex, value); - } - return bean; - } - /** * 获取Bean中的属性值 * @@ -820,7 +795,7 @@ public static boolean hasNullField(final Object bean, final String... ignoreFiel public static boolean hasEmptyField(final Object bean, final String... ignoreFieldNames) { return checkBean(bean, field -> (!ArrayKit.contains(ignoreFieldNames, field.getName())) - && StringKit.isEmptyIfString(FieldKit.getFieldValue(bean, field)) + && ObjectKit.isEmptyIfString(FieldKit.getFieldValue(bean, field)) ); } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ClassKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ClassKit.java index f5c4545e18..0668d3dce0 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ClassKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ClassKit.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.core.xyz; -import org.miaixz.bus.core.beans.NullWrapperBean; +import org.miaixz.bus.core.beans.NullWrapper; import org.miaixz.bus.core.center.stream.EasyStream; import org.miaixz.bus.core.convert.BasicType; import org.miaixz.bus.core.lang.Assert; @@ -195,9 +195,9 @@ public static Class[] getClasses(final Object... objects) { Object obj; for (int i = 0; i < objects.length; i++) { obj = objects[i]; - if (obj instanceof NullWrapperBean) { + if (obj instanceof NullWrapper) { // 自定义null值的参数类型 - classes[i] = ((NullWrapperBean) obj).getWrappedClass(); + classes[i] = ((NullWrapper) obj).getWrappedClass(); } else if (null == obj) { classes[i] = Object.class; } else { diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/CollKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/CollKit.java index d75bd200d3..66422433a4 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/CollKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/CollKit.java @@ -53,7 +53,10 @@ import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import java.util.function.*; +import java.util.function.BiConsumer; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.function.UnaryOperator; import java.util.stream.Collectors; /** @@ -65,179 +68,6 @@ */ public class CollKit extends CollectionStream { - /** - * 集合是否为空 - * - * @param collection 集合 - * @return 是否为空 - */ - public static boolean isEmpty(final Collection collection) { - return collection == null || collection.isEmpty(); - } - - /** - * Iterable是否为空 - * - * @param iterable Iterable对象 - * @return 是否为空 - * @see IteratorKit#isEmpty(Iterable) - */ - public static boolean isEmpty(final Iterable iterable) { - return IteratorKit.isEmpty(iterable); - } - - /** - * Iterator是否为空 - * - * @param iterator Iterator对象 - * @return 是否为空 - * @see IteratorKit#isEmpty(Iterator) - */ - public static boolean isEmpty(final Iterator iterator) { - return IteratorKit.isEmpty(iterator); - } - - /** - * Enumeration是否为空 - * - * @param enumeration {@link Enumeration} - * @return 是否为空 - */ - public static boolean isEmpty(final Enumeration enumeration) { - return null == enumeration || !enumeration.hasMoreElements(); - } - - /** - * Map是否为空 - * - * @param map 集合 - * @return 是否为空 - * @see MapKit#isEmpty(Map) - */ - public static boolean isEmpty(final Map map) { - return MapKit.isEmpty(map); - } - - /** - * 如果给定集合为空,返回默认集合 - * - * @param 集合类型 - * @param 集合元素类型 - * @param collection 集合 - * @param defaultCollection 默认数组 - * @return 非空(empty)的原集合或默认集合 - */ - public static , E> T defaultIfEmpty(final T collection, final T defaultCollection) { - return isEmpty(collection) ? defaultCollection : collection; - } - - /** - * 如果给定集合为空,返回默认集合 - * - * @param 集合类型 - * @param 集合元素类型 - * @param collection 集合 - * @param handler 非空的处理函数 - * @param defaultSupplier 默认值懒加载函数 - * @return 非空(empty)的原集合或默认集合 - */ - public static , E> T defaultIfEmpty(final T collection, final Function handler, final Supplier defaultSupplier) { - return isEmpty(collection) ? defaultSupplier.get() : handler.apply(collection); - } - - /** - * 如果提供的集合为{@code null},返回一个不可变的默认空集合,否则返回原集合 - * 空集合使用{@link Collections#emptySet()} - * - * @param 集合元素类型 - * @param set 提供的集合,可能为null - * @return 原集合,若为null返回空集合 - */ - public static Set emptyIfNull(final Set set) { - return ObjectKit.defaultIfNull(set, Collections.emptySet()); - } - - /** - * 如果提供的集合为{@code null},返回一个不可变的默认空集合,否则返回原集合 - * 空集合使用{@link Collections#emptyList()} - * - * @param 集合元素类型 - * @param list 提供的集合,可能为null - * @return 原集合,若为null返回空集合 - */ - public static List emptyIfNull(final List list) { - return ObjectKit.defaultIfNull(list, Collections.emptyList()); - } - - /** - * 集合是否为非空 - * - * @param collection 集合 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final Collection collection) { - return !isEmpty(collection); - } - - /** - * Iterable是否为空 - * - * @param iterable Iterable对象 - * @return 是否为空 - * @see IteratorKit#isNotEmpty(Iterable) - */ - public static boolean isNotEmpty(final Iterable iterable) { - return IteratorKit.isNotEmpty(iterable); - } - - /** - * Iterator是否为空 - * - * @param iterator Iterator对象 - * @return 是否为空 - * @see IteratorKit#isNotEmpty(Iterator) - */ - public static boolean isNotEmpty(final Iterator iterator) { - return IteratorKit.isNotEmpty(iterator); - } - - /** - * Enumeration是否为空 - * - * @param enumeration {@link Enumeration} - * @return 是否为空 - */ - public static boolean isNotEmpty(final Enumeration enumeration) { - return null != enumeration && enumeration.hasMoreElements(); - } - - /** - * 是否包含{@code null}元素 - *
      - *
    • 集合为{@code null},返回{@code true}
    • - *
    • 集合为空集合,即元素个数为0,返回{@code false}
    • - *
    • 集合中元素为"",返回{@code false}
    • - *
    - * - * @param iterable 被检查的Iterable对象,如果为{@code null} 返回true - * @return 是否包含{@code null}元素 - * @see IteratorKit#hasNull(Iterator) - */ - public static boolean hasNull(final Iterable iterable) { - return IteratorKit.hasNull(IteratorKit.getIter(iterable)); - } - - /** - * Map是否为非空 - * - * @param map 集合 - * @return 是否为非空 - * @see MapKit#isNotEmpty(Map) - */ - public static boolean isNotEmpty(final Map map) { - return MapKit.isNotEmpty(map); - } - /** * 去重集合 * @@ -1957,7 +1787,7 @@ public static List> group(final Collection collection, Hash32 * @return 分组列表 */ public static List> groupByField(final Collection collection, final String fieldName) { - return groupByFunc(collection, t -> BeanKit.getFieldValue(t, fieldName)); + return groupByFunc(collection, t -> BeanKit.getProperty(t, fieldName)); } /** @@ -2161,105 +1991,6 @@ public static void setValueByMap(final Iterable iterable, final Map iterable.forEach(x -> Optional.ofNullable(map.get(keyGenerate.apply(x))).ifPresent(y -> biConsumer.accept(x, y))); } - /** - * 获取Collection或者iterator的大小,此方法可以处理的对象类型如下: - *
      - *
    • Collection - the collection size
    • - *
    • Map - the map size
    • - *
    • Array - the array size
    • - *
    • Iterator - the number of elements remaining in the iterator
    • - *
    • Enumeration - the number of elements remaining in the enumeration
    • - *
    - * - * @param object 可以为空的对象 - * @return 如果object为空则返回0 - * @throws IllegalArgumentException 参数object不是Collection或者iterator - */ - public static int size(final Object object) { - if (object == null) { - return 0; - } - - // 优先判断使用频率较高的类型 - if (object instanceof Collection) { - return ((Collection) object).size(); - } else if (object instanceof Map) { - return ((Map) object).size(); - } else if (object instanceof Iterable) { - return IteratorKit.size((Iterable) object); - } else if (object instanceof Iterator) { - return IteratorKit.size((Iterator) object); - } else if (object instanceof Enumeration) { - int total = 0; - final Enumeration it = (Enumeration) object; - while (it.hasMoreElements()) { - total++; - it.nextElement(); - } - return total; - } else if (ArrayKit.isArray(object)) { - return ArrayKit.length(object); - } else { - throw new IllegalArgumentException("Unsupported object type: " + object.getClass().getName()); - } - } - - /** - * 判断subCollection是否为collection的子集合,不考虑顺序,只考虑元素数量。 - *
      - *
    • 如果两个集合为同一集合或,则返回true
    • - *
    • 如果两个集合元素都相同,则返回true(无论顺序相同与否)
    • - *
    - * - * @param subCollection 第一个Iterable对象,即子集合。 - * @param collection 第二个Iterable对象,可以为任何实现了Iterable接口的集合。 - * @return 如果subCollection是collection的子集合,则返回true;否则返回false。 - */ - public static boolean isSub(final Collection subCollection, final Collection collection) { - if (size(subCollection) > size(collection)) { - return false; - } - return IteratorKit.isSub(subCollection, collection); - } - - /** - * 判断两个{@link Collection} 是否元素和顺序相同,返回{@code true}的条件是: - *
      - *
    • 两个{@link Collection}必须长度相同
    • - *
    • 两个{@link Collection}元素相同index的对象必须equals,满足{@link Objects#equals(Object, Object)}
    • - *
    - * - * @param list1 列表1 - * @param list2 列表2 - * @return 是否相同 - */ - public static boolean isEqualList(final Collection list1, final Collection list2) { - return equals(list1, list2, false); - } - - /** - * 判断两个{@link Iterable}中的元素是否相同,可选是否判断顺序 - * 当满足下列情况时返回{@code true}: - *
      - *
    • 两个{@link Iterable}都为{@code null};
    • - *
    • 两个{@link Iterable}满足{@code coll1 == coll2};
    • - *
    • 如果忽略顺序,则计算两个集合中元素和数量是否相同
    • - *
    • 如果不忽略顺序,两个{@link Iterable}所有具有相同下标的元素皆满足{@link Objects#equals(Object, Object)};
    • - *
    - * - * @param coll1 集合1 - * @param coll2 集合2 - * @param ignoreOrder 是否忽略顺序 - * @return 是否相同 - */ - public static boolean equals(final Collection coll1, final Collection coll2, final boolean ignoreOrder) { - if (size(coll1) != size(coll2)) { - return false; - } - - return IteratorKit.equals(coll1, coll2, ignoreOrder); - } - /** * 一个对象不为空且不存在于该集合中时,加入到该集合中 *
    @@ -2375,7 +2106,7 @@ public static  List flat(final Collection collection, final boolean ski
          */
         public static int ringNextIntByObject(final Object object, final AtomicInteger atomicInteger) {
             Assert.notNull(object);
    -        final int modulo = CollKit.size(object);
    +        final int modulo = size(object);
             return ringNextInt(modulo, atomicInteger);
         }
     
    diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/EscapeKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/EscapeKit.java
    index eb46f59ec3..f266811571 100644
    --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/EscapeKit.java
    +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/EscapeKit.java
    @@ -140,7 +140,7 @@ public static String escapeAll(final CharSequence content) {
          */
         public static String escape(final CharSequence content, final Predicate filter) {
             if (StringKit.isEmpty(content)) {
    -            return StringKit.toString(content);
    +            return StringKit.toStringOrNull(content);
             }
     
             final StringBuilder tmp = new StringBuilder(content.length() * 6);
    diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/FieldKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/FieldKit.java
    index bf7a116cef..c0be4907d1 100644
    --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/FieldKit.java
    +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/FieldKit.java
    @@ -27,10 +27,10 @@
      */
     package org.miaixz.bus.core.xyz;
     
    -import org.miaixz.bus.core.annotation.Alias;
     import org.miaixz.bus.core.center.map.reference.WeakConcurrentMap;
     import org.miaixz.bus.core.convert.Convert;
     import org.miaixz.bus.core.lang.Assert;
    +import org.miaixz.bus.core.lang.annotation.Alias;
     import org.miaixz.bus.core.lang.exception.InternalException;
     import org.miaixz.bus.core.lang.reflect.field.FieldReflect;
     
    diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java
    index 80b39fabd6..5744bf8713 100644
    --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java
    +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java
    @@ -63,7 +63,7 @@ public class FileKit extends PathResolve {
         /**
          * 绝对路径判断正则
          */
    -    private static final Pattern PATTERN_PATH_ABSOLUTE = Pattern.compile("^[a-zA-Z]:([/\\\\].*)?");
    +    private static final Pattern PATTERN_PATH_ABSOLUTE = Pattern.compile("^[a-zA-Z]:([/\\\\].*)?", Pattern.DOTALL);
     
         /**
          * 是否为Windows环境
    diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/IteratorKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/IteratorKit.java
    index 8f1caefa8a..102f1b4b36 100644
    --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/IteratorKit.java
    +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/IteratorKit.java
    @@ -28,7 +28,7 @@
     package org.miaixz.bus.core.xyz;
     
     import org.miaixz.bus.core.center.iterator.*;
    -import org.miaixz.bus.core.lang.Assert;
    +import org.miaixz.bus.core.convert.Convert;
     import org.miaixz.bus.core.text.StringJoiner;
     import org.w3c.dom.Node;
     import org.w3c.dom.NodeList;
    @@ -45,7 +45,7 @@
      * @author Kimi Liu
      * @since Java 17+
      */
    -public class IteratorKit {
    +public class IteratorKit extends IteratorValidator {
     
         /**
          * 获取{@link Iterator}
    @@ -58,145 +58,6 @@ public static  Iterator getIter(final Iterable iterable) {
             return null == iterable ? null : iterable.iterator();
         }
     
    -    /**
    -     * Iterable是否为空
    -     *
    -     * @param iterable Iterable对象
    -     * @return 是否为空
    -     */
    -    public static boolean isEmpty(final Iterable iterable) {
    -        return null == iterable || isEmpty(iterable.iterator());
    -    }
    -
    -    /**
    -     * Iterator是否为空
    -     *
    -     * @param iterator Iterator对象
    -     * @return 是否为空
    -     */
    -    public static boolean isEmpty(final Iterator iterator) {
    -        return null == iterator || !iterator.hasNext();
    -    }
    -
    -    /**
    -     * Iterable是否为空
    -     *
    -     * @param iterable Iterable对象
    -     * @return 是否为空
    -     */
    -    public static boolean isNotEmpty(final Iterable iterable) {
    -        return null != iterable && isNotEmpty(iterable.iterator());
    -    }
    -
    -    /**
    -     * Iterator是否为空
    -     *
    -     * @param iterator Iterator对象
    -     * @return 是否为空
    -     */
    -    public static boolean isNotEmpty(final Iterator iterator) {
    -        return null != iterator && iterator.hasNext();
    -    }
    -
    -    /**
    -     * 是否包含{@code null}元素
    -     * 
      - *
    • Iterator为{@code null},返回{@code true}
    • - *
    • Iterator为空集合,即元素个数为0,返回{@code false}
    • - *
    • Iterator中元素为"",返回{@code false}
    • - *
    - * - * @param iter 被检查的{@link Iterator}对象,如果为{@code null} 返回true - * @return 是否包含{@code null}元素 - */ - public static boolean hasNull(final Iterator iter) { - if (null == iter) { - return true; - } - while (iter.hasNext()) { - if (null == iter.next()) { - return true; - } - } - - return false; - } - - /** - * 是否全部元素为null - * - * @param iter iterator 被检查的{@link Iterable}对象,如果为{@code null} 返回true - * @return 是否全部元素为null - */ - public static boolean isAllNull(final Iterable iter) { - return isAllNull(null == iter ? null : iter.iterator()); - } - - /** - * 是否全部元素为null - * - * @param iter iterator 被检查的{@link Iterator}对象,如果为{@code null} 返回true - * @return 是否全部元素为null - */ - public static boolean isAllNull(final Iterator iter) { - return null == getFirstNoneNull(iter); - } - - /** - * 指定字符串集合中,是否包含空字符串。 - * - * @param args 字符串列表 - * @return 批量判断字符串是否全部为空白 - */ - public static boolean hasBlank(final Iterable args) { - if (CollKit.isEmpty(args)) { - return true; - } - for (final CharSequence text : args) { - if (StringKit.isBlank(text)) { - return true; - } - } - return false; - } - - /** - * @param args 字符串列表 - * @return 批量判断字符串是否全部为空白 - */ - public static boolean isAllBlank(final Iterable args) { - if (CollKit.isNotEmpty(args)) { - for (final CharSequence text : args) { - if (StringKit.isNotBlank(text)) { - return false; - } - } - } - return true; - } - - /** - * 根据集合返回一个元素计数的 {@link Map} - * 所谓元素计数就是假如这个集合中某个元素出现了n次,那将这个元素做为key,n做为value - * 例如:[a,b,c,c,c] 得到: - * a: 1 - * b: 1 - * c: 3 - * - * @param 集合元素类型 - * @param iter {@link Iterator},如果为null返回一个空的Map - * @return {@link Map} - */ - public static Map countMap(final Iterator iter) { - final Map countMap = new HashMap<>(); - if (null != iter) { - while (iter.hasNext()) { - countMap.merge(iter.next(), 1, Integer::sum); - } - } - return countMap; - } - /** * 字段值与列表值对应的Map,常用于元素对象中有唯一ID时需要按照这个ID查找对象的情况 * 例如:车牌号 = 车 @@ -486,73 +347,6 @@ public static Iterable asIterable(final Iterator iter) { return () -> iter; } - /** - * 遍历{@link Iterator},获取指定index位置的元素 - * - * @param iterator {@link Iterator} - * @param index 位置 - * @param 元素类型 - * @return 元素,找不到元素返回{@code null} - * @throws IndexOutOfBoundsException index < 0时报错 - */ - public static E get(final Iterator iterator, int index) throws IndexOutOfBoundsException { - if (null == iterator) { - return null; - } - Assert.isTrue(index >= 0, "[index] must be >= 0"); - while (iterator.hasNext()) { - index--; - if (-1 == index) { - return iterator.next(); - } - iterator.next(); - } - return null; - } - - /** - * 获取集合的第一个元素 - * - * @param 集合元素类型 - * @param iterator {@link Iterator} - * @return 第一个元素 - */ - public static T getFirst(final Iterator iterator) { - return get(iterator, 0); - } - - /** - * 获取集合的第一个非空元素 - * - * @param 集合元素类型 - * @param iterator {@link Iterator} - * @return 第一个非空元素,null表示未找到 - */ - public static T getFirstNoneNull(final Iterator iterator) { - return getFirst(iterator, Objects::nonNull); - } - - /** - * 返回{@link Iterator}中第一个匹配规则的值 - * - * @param 数组元素类型 - * @param iterator {@link Iterator} - * @param predicate 匹配接口,实现此接口自定义匹配规则 - * @return 匹配元素,如果不存在匹配元素或{@link Iterator}为空,返回 {@code null} - */ - public static T getFirst(final Iterator iterator, final Predicate predicate) { - Assert.notNull(predicate, "Matcher must be not null !"); - if (null != iterator) { - while (iterator.hasNext()) { - final T next = iterator.next(); - if (predicate.test(next)) { - return next; - } - } - } - return null; - } - /** * 获得{@link Iterable}对象的元素类型(通过第一个非空元素判断) * 注意,此方法至少会调用多次next方法 @@ -718,120 +512,6 @@ public static int size(final Iterator iterator) { return size; } - /** - * 判断subIter是否为iter的子集合,不考虑顺序,只考虑元素数量。 - *
      - *
    • 如果两个集合为同一集合或,则返回true
    • - *
    • 如果两个集合元素都相同,则返回true(无论顺序相同与否)
    • - *
    - * - * @param subIter 第一个Iterable对象,即子集合。 - * @param iter 第二个Iterable对象,可以为任何实现了Iterable接口的集合。 - * @return 如果subIter是iter的子集合,则返回true;否则返回false。 - */ - public static boolean isSub(final Iterable subIter, final Iterable iter) { - // 如果两个Iterable对象引用相同,则肯定是一个的子集合 - if (subIter == iter) { - return true; - } - // 如果有任何一个Iterable对象为null,则不是子集合关系 - if (subIter == null || iter == null) { - return false; - } - - // 使用Map记录每个Iterable中每个元素出现的次数 - final Map countMap1 = countMap(subIter.iterator()); - final Map countMap2 = countMap(iter.iterator()); - - // 遍历第一个Iterable中的每个元素 - for (final Object obj : subIter) { - // 比较第一个Iterable中元素的出现次数和第二个Iterable中元素的出现次数 - // 如果第一个Iterable中元素的出现次数大于第二个Iterable中元素的出现次数,则不是子集合关系 - if (MathKit.nullToZero(countMap1.get(obj)) > MathKit.nullToZero(countMap2.get(obj))) { - return false; - } - } - // 如果所有元素的出现次数比较都满足子集合关系,则返回true - return true; - } - - /** - * 判断两个{@link Iterable}中的元素与其顺序是否相同 - * 当满足下列情况时返回{@code true}: - *
      - *
    • 两个{@link Iterable}都为{@code null};
    • - *
    • 两个{@link Iterable}满足{@code iterable1 == iterable2};
    • - *
    • 两个{@link Iterable}所有具有相同下标的元素皆满足{@link Objects#equals(Object, Object)};
    • - *
    - * 此方法来自Apache-Commons-Collections4。 - * - * @param iterable1 列表1 - * @param iterable2 列表2 - * @return 是否相同 - */ - public static boolean isEqualList(final Iterable iterable1, final Iterable iterable2) { - return equals(iterable1, iterable2, false); - } - - /** - * 判断两个{@link Iterable}中的元素是否相同,可选是否判断顺序 - * 当满足下列情况时返回{@code true}: - *
      - *
    • 两个{@link Iterable}都为{@code null};
    • - *
    • 两个{@link Iterable}满足{@code iterable1 == iterable2};
    • - *
    • 如果忽略顺序,则计算两个集合中元素和数量是否相同
    • - *
    • 如果不忽略顺序,两个{@link Iterable}所有具有相同下标的元素皆满足{@link Objects#equals(Object, Object)};
    • - *
    - * - * @param iterable1 集合1 - * @param iterable2 集合2 - * @param ignoreOrder 是否忽略顺序 - * @return 是否相同 - */ - public static boolean equals(final Iterable iterable1, final Iterable iterable2, final boolean ignoreOrder) { - // 如果两个Iterable对象引用相同,则肯定相等 - if (iterable1 == iterable2) { - return true; - } - // 如果有任何一个Iterable对象为null,则不是子集合关系 - if (iterable1 == null || iterable2 == null) { - return false; - } - - if (ignoreOrder) { - final Map countMap1 = countMap(iterable1.iterator()); - final Map countMap2 = countMap(iterable2.iterator()); - - if (countMap1.size() != countMap2.size()) { - // 如果两个Iterable中元素种类不同,则肯定不等 - return false; - } - - for (final Object obj : iterable1) { - // 比较第一个Iterable中元素的出现次数和第二个Iterable中元素的出现次数 - if (MathKit.nullToZero(countMap1.get(obj)) != MathKit.nullToZero(countMap2.get(obj))) { - return false; - } - } - // 如果所有元素的出现次数比较都满足子集合关系,则返回true - return true; - } else { - final Iterator iter1 = iterable1.iterator(); - final Iterator iter2 = iterable2.iterator(); - Object obj1; - Object obj2; - while (iter1.hasNext() && iter2.hasNext()) { - obj1 = iter1.next(); - obj2 = iter2.next(); - if (!Objects.equals(obj1, obj2)) { - return false; - } - } - // 当两个Iterable长度不一致时返回false - return !(iter1.hasNext() || iter2.hasNext()); - } - } - /** * 清空指定{@link Iterator},此方法遍历后调用{@link Iterator#remove()}移除每个元素 * @@ -873,7 +553,7 @@ public static void forEach(final Iterator iterator, final Consumer String toString(final Iterator iterator) { - return toString(iterator, ObjectKit::toString); + return toString(iterator, Convert::toStringOrNull); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/LambdaKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/LambdaKit.java index f51aa8d28b..fed2b371d7 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/LambdaKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/LambdaKit.java @@ -28,7 +28,7 @@ package org.miaixz.bus.core.xyz; import org.miaixz.bus.core.center.function.LambdaFactory; -import org.miaixz.bus.core.center.function.LambdaInfo; +import org.miaixz.bus.core.center.function.LambdaX; import org.miaixz.bus.core.center.map.reference.WeakConcurrentMap; import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.Optional; @@ -49,7 +49,7 @@ */ public class LambdaKit { - private static final WeakConcurrentMap CACHE = new WeakConcurrentMap<>(); + private static final WeakConcurrentMap CACHE = new WeakConcurrentMap<>(); /** * 通过对象的方法或类的静态方法引用,获取lambda实现类 @@ -86,11 +86,11 @@ public class LambdaKit { * @return lambda实现类 */ public static Class getRealClass(final T func) { - final LambdaInfo lambdaInfo = resolve(func); - return (Class) Optional.of(lambdaInfo) - .map(LambdaInfo::getInstantiatedMethodParameterTypes) + final LambdaX lambdaX = resolve(func); + return (Class) Optional.of(lambdaX) + .map(LambdaX::getInstantiatedMethodParameterTypes) .filter(types -> types.length != 0).map(types -> types[types.length - 1]) - .orElseGet(lambdaInfo::getClazz); + .orElseGet(lambdaX::getClazz); } /** @@ -101,7 +101,7 @@ public static Class getRealClass(final T func) { * @param lambda的类型 * @return 返回解析后的结果 */ - public static LambdaInfo resolve(final T func) { + public static LambdaX resolve(final T func) { return CACHE.computeIfAbsent(func, (key) -> { final SerializedLambda serializedLambda = _resolve(func); final String methodName = serializedLambda.getImplMethodName(); @@ -109,7 +109,7 @@ public static LambdaInfo resolve(final T func) { if ("".equals(methodName)) { for (final Constructor constructor : implClass.getDeclaredConstructors()) { if (ReflectKit.getDesc(constructor, false).equals(serializedLambda.getImplMethodSignature())) { - return new LambdaInfo(constructor, serializedLambda); + return new LambdaX(constructor, serializedLambda); } } } else { @@ -117,7 +117,7 @@ public static LambdaInfo resolve(final T func) { for (final Method method : methods) { if (method.getName().equals(methodName) && ReflectKit.getDesc(method, false).equals(serializedLambda.getImplMethodSignature())) { - return new LambdaInfo(method, serializedLambda); + return new LambdaX(method, serializedLambda); } } } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/MapKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/MapKit.java index a843727f91..8a5fe9bd97 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/MapKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/MapKit.java @@ -48,39 +48,6 @@ */ public class MapKit extends MapGets { - /** - * Map是否为空 - * - * @param map 集合 - * @return 是否为空 - */ - public static boolean isEmpty(final Map map) { - return null == map || map.isEmpty(); - } - - /** - * Map是否为非空 - * - * @param map 集合 - * @return 是否为非空 - */ - public static boolean isNotEmpty(final Map map) { - return !isEmpty(map); - } - - /** - * 如果提供的集合为{@code null},返回一个不可变的默认空集合,否则返回原集合 - * 空集合使用{@link Collections#emptyMap()} - * - * @param 键类型 - * @param 值类型 - * @param set 提供的集合,可能为null - * @return 原集合,若为null返回空集合 - */ - public static Map emptyIfNull(final Map set) { - return (null == set) ? Collections.emptyMap() : set; - } - /** * 如果给定Map为空,返回默认Map * diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/MethodKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/MethodKit.java index 23b92a9987..ffff7ea210 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/MethodKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/MethodKit.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.core.xyz; -import org.miaixz.bus.core.beans.NullWrapperBean; +import org.miaixz.bus.core.beans.NullWrapper; import org.miaixz.bus.core.center.map.reference.WeakConcurrentMap; import org.miaixz.bus.core.convert.Convert; import org.miaixz.bus.core.instance.Instances; @@ -483,14 +483,14 @@ public static boolean isSetter(final Method method, final boolean ignoreCase) { String name = method.getName(); // 跳过set这类特殊方法 - if ("set".equals(name)) { + if (name.length() < 4) { return false; } if (ignoreCase) { name = name.toLowerCase(); } - return name.startsWith("set"); + return name.startsWith(Normal.SET); } /** @@ -512,14 +512,18 @@ public static boolean isGetter(final Method method, final boolean ignoreCase) { } // 参数个数必须为0或1 - final int parameterCount = method.getParameterCount(); - if (0 != parameterCount) { + if (0 != method.getParameterCount()) { + return false; + } + + // 必须有返回值 + if (Void.class == method.getReturnType()) { return false; } String name = method.getName(); // 跳过getClass、get、is这类特殊方法 - if ("getClass".equals(name) || "get".equals(name) || "is".equals(name)) { + if (name.length() < 3 || "getClass".equals(name) || Normal.GET.equals(name)) { return false; } @@ -527,11 +531,11 @@ public static boolean isGetter(final Method method, final boolean ignoreCase) { name = name.toLowerCase(); } - if (name.startsWith("is")) { + if (name.startsWith(Normal.IS)) { // 判断返回值是否为Boolean return BooleanKit.isBoolean(method.getReturnType()); } - return name.startsWith("get"); + return name.startsWith(Normal.GET); } /** @@ -601,7 +605,7 @@ public static T invoke(final Object obj, final Method method, final Object.. * @param args 参数列表 * @return 执行结果 * @throws InternalException IllegalAccessException包装 - * @see NullWrapperBean + * @see NullWrapper */ public static T invoke(final Object obj, final String methodName, final Object... args) throws InternalException { Assert.notNull(obj, "Object to get method must be not null!"); @@ -767,7 +771,7 @@ public static Object[] actualArgs(final Method method, final Object[] args) { if (i >= args.length || null == args[i]) { // 越界或者空值 actualArgs[i] = ClassKit.getDefaultValue(parameterTypes[i]); - } else if (args[i] instanceof NullWrapperBean) { + } else if (args[i] instanceof NullWrapper) { //如果是通过NullWrapperBean传递的null参数,直接赋值null actualArgs[i] = null; } else if (!parameterTypes[i].isAssignableFrom(args[i].getClass())) { diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ObjectKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ObjectKit.java index aff5277836..c0dad07a01 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ObjectKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ObjectKit.java @@ -27,18 +27,14 @@ */ package org.miaixz.bus.core.xyz; -import org.miaixz.bus.core.convert.Convert; -import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.center.object.ObjectValidator; import org.miaixz.bus.core.lang.exception.InternalException; -import org.miaixz.bus.core.text.CharsBacker; import java.io.Serializable; import java.lang.reflect.Array; -import java.math.BigDecimal; import java.util.*; import java.util.function.Consumer; import java.util.function.Function; -import java.util.function.Supplier; /** * 对象工具类,包括判空、克隆、序列化等操作 @@ -47,41 +43,7 @@ * @author Kimi Liu * @since Java 17+ */ -public class ObjectKit { - - /** - * 比较两个对象是否相等,满足下述任意条件即返回{@code true}: - *
      - *
    • 若两对象皆为{@link BigDecimal},且满足{@code 0 == obj1.compareTo(obj2)}
    • - *
    • 若两对象都为数组,调用Arrays.equals完成判断
    • - *
    • {@code obj1 == null && obj2 == null}
    • - *
    • {@code obj1.equals(obj2)}
    • - *
    - * - * @param obj1 对象1 - * @param obj2 对象2 - * @return 是否相等 - */ - public static boolean equals(final Object obj1, final Object obj2) { - if (obj1 instanceof Number && obj2 instanceof Number) { - return MathKit.equals((Number) obj1, (Number) obj2); - } else if (ArrayKit.isArray(obj1) && ArrayKit.isArray(obj2)) { - return ArrayKit.equals(obj1, obj2); - } - return Objects.equals(obj1, obj2); - } - - /** - * 比较两个对象是否不相等 - * - * @param obj1 对象1 - * @param obj2 对象2 - * @return 是否不等 - * @see #equals(Object, Object) - */ - public static boolean notEquals(final Object obj1, final Object obj2) { - return !equals(obj1, obj2); - } +public class ObjectKit extends ObjectValidator { /** * 计算对象长度,支持类型包括: @@ -201,132 +163,6 @@ public static boolean contains(final Object obj, final Object element) { return false; } - /** - * 检查对象是否为{@code null} - * - * @param obj 对象 - * @return 是否为null - */ - public static boolean isNull(final Object obj) { - return null == obj; - } - - /** - * 检查对象是否不为{@code null} - * - * @param obj 对象 - * @return 是否不为null - */ - public static boolean isNotNull(final Object obj) { - return null != obj; - } - - /** - * 判断指定对象是否为空,支持类型包括: - *
      - *
    • {@code null}:默认返回{@code true};
    • - *
    • 数组:等同于{@link ArrayKit#isEmpty(Object)};
    • - *
    • {@link CharSequence}:等同于{@link CharsBacker#isEmpty(CharSequence)};
    • - *
    • {@link Collection}:等同于{@link CollKit#isEmpty(Collection)};
    • - *
    • {@link Map}:等同于{@link MapKit#isEmpty(Map)};
    • - *
    • - * {@link Iterator}或{@link Iterable}:等同于{@link IteratorKit#isEmpty(Iterator)}、 - * {@link IteratorKit#isEmpty(Iterable)}; - *
    • - *
    - * - * @param obj 被判断的对象 - * @return 是否为空,如果类型不支持,返回false - * @see StringKit#isEmpty(CharSequence) - * @see MapKit#isEmpty(Map) - * @see IteratorKit#isEmpty(Iterable) - * @see IteratorKit#isEmpty(Iterator) - * @see ArrayKit#isEmpty(Object) - */ - public static boolean isEmpty(final Object obj) { - if (null == obj) { - return true; - } - - if (obj instanceof CharSequence) { - return StringKit.isEmpty((CharSequence) obj); - } else if (obj instanceof Collection) { - return CollKit.isEmpty((Collection) obj); - } else if (obj instanceof Map) { - return MapKit.isEmpty((Map) obj); - } else if (obj instanceof Iterable) { - return IteratorKit.isEmpty((Iterable) obj); - } else if (obj instanceof Iterator) { - return IteratorKit.isEmpty((Iterator) obj); - } else if (ArrayKit.isArray(obj)) { - return ArrayKit.isEmpty(obj); - } - - return false; - } - - /** - * 判断指定对象是否为非空 - * - * @param obj 被判断的对象 - * @return 是否不为空,如果类型不支持,返回true - * @see #isEmpty(Object) - */ - public static boolean isNotEmpty(final Object obj) { - return !isEmpty(obj); - } - - /** - * 如果给定对象为{@code null}返回默认值 - *
    {@code
    -     * ObjectKit.defaultIfNull(null, null);      // = null
    -     * ObjectKit.defaultIfNull(null, "");        // = ""
    -     * ObjectKit.defaultIfNull(null, "zz");      // = "zz"
    -     * ObjectKit.defaultIfNull("abc", *);        // = "abc"
    -     * ObjectKit.defaultIfNull(Boolean.TRUE, *); // = Boolean.TRUE
    -     * }
    - * - * @param 对象类型 - * @param object 被检查对象,可能为{@code null} - * @param defaultValue 被检查对象为{@code null}返回的默认值,可以为{@code null} - * @return 被检查对象不为 {@code null} 返回原值,否则返回默认值 - */ - public static T defaultIfNull(final T object, final T defaultValue) { - return isNull(object) ? defaultValue : object; - } - - /** - * 如果给定对象不为{@code null} 返回原值, 否则返回 {@link Supplier#get()} 提供的默认值 - * - * @param 被检查对象类型 - * @param source 被检查对象,可能为{@code null} - * @param defaultSupplier 为空时的默认值提供者 - * @return 被检查对象不为 {@code null} 返回原值,否则返回 {@link Supplier#get()} 提供的默认值 - */ - public static T defaultIfNull(final T source, final Supplier defaultSupplier) { - if (isNotNull(source)) { - return source; - } - return defaultSupplier.get(); - } - - /** - * 如果给定对象不为{@code null} 返回自定义handler处理后的结果,否则返回 {@link Supplier#get()} 提供的默认值 - * - * @param 返回值类型 - * @param 被检查对象类型 - * @param source 被检查对象,可能为{@code null} - * @param handler 非空时自定义的处理方法 - * @param defaultSupplier 为空时的默认值提供者 - * @return 被检查对象不为 {@code null} 返回处理后的结果,否则返回 {@link Supplier#get()} 提供的默认值 - */ - public static R defaultIfNull(final T source, final Function handler, final Supplier defaultSupplier) { - if (isNotNull(source)) { - return handler.apply(source); - } - return defaultSupplier.get(); - } - /** * 如果指定的对象不为 {@code null},则应用提供的映射函数并返回结果,否则返回 {@code null}。 * @@ -353,21 +189,6 @@ public static void accept(final T source, final Consumer consumer) { } } - /** - * 如果给定对象不为{@code null} 返回自定义handler处理后的结果,否则返回默认值 - * - * @param 返回值类型 - * @param 被检查对象类型 - * @param source 被检查对象,可能为{@code null} - * @param handler 非空时自定义的处理方法 - * @param defaultValue 为空时的默认返回值 - * @return 被检查对象不为 {@code null} 返回处理后的结果,否则返回默认值 - */ - public static R defaultIfNull( - final T source, final Function handler, final R defaultValue) { - return isNull(source) ? defaultValue : handler.apply(source); - } - /** * 克隆对象 *
      @@ -439,39 +260,6 @@ public static T cloneByStream(final T obj) { return SerializeKit.clone(obj); } - /** - * 是否为基本类型,包括包装类型和原始类型 - * - * @param object 被检查对象,{@code null}返回{@code false} - * @return 是否为基本类型 - * @see ClassKit#isBasicType(Class) - */ - public static boolean isBasicType(final Object object) { - if (null == object) { - return false; - } - return ClassKit.isBasicType(object.getClass()); - } - - /** - * 是否为有效的数字,主要用于检查浮点数是否为有意义的数值 - * 若对象不为{@link Number}类型,则直接返回{@code true},否则: - *
        - *
      • 若对象类型为{@link Double},则检查{@link Double#isInfinite()}或{@link Double#isNaN()};
      • - *
      • 若对象类型为{@link Float},则检查{@link Float#isInfinite()}或{@link Float#isNaN()};
      • - *
      - * - * @param obj 被检查对象 - * @return 检查结果,非数字类型和{@code null}将返回{@code true} - * @see MathKit#isValidNumber(Number) - */ - public static boolean isValidIfNumber(final Object obj) { - if (obj instanceof Number) { - return MathKit.isValidNumber((Number) obj); - } - return true; - } - /** * 获得给定类的第一个泛型参数 * @@ -494,28 +282,6 @@ public static Class getTypeArgument(final Object obj, final int index) { return ClassKit.getTypeArgument(obj.getClass(), index); } - /** - * 将对象转为字符串 - *
        - *
      • 若对象为{@code null},则返回“null”;
      • - *
      • 若对象为{@link Map},则返回{@code Map.toString()};
      • - *
      • 若对象为其他类型,则调用{@link Convert#toString(Object)}进行转换;
      • - *
      - * - * @param obj Bean对象 - * @return 转换后的字符串 - * @see Convert#toString(Object) - */ - public static String toString(final Object obj) { - if (null == obj) { - return Normal.NULL; - } - if (obj instanceof Map) { - return obj.toString(); - } - return Convert.toString(obj); - } - /** * 确定给定的对象是否相等,如果两个对象都是{@code null}, * 则返回{@code true};如果只有一个对象是{@code null}, diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/PatternKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/PatternKit.java index 45d1010f1e..8549b0f86c 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/PatternKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/PatternKit.java @@ -29,6 +29,7 @@ import org.miaixz.bus.core.center.function.FunctionX; import org.miaixz.bus.core.center.regex.Pattern; +import org.miaixz.bus.core.center.regex.RegexValidator; import org.miaixz.bus.core.compare.LengthCompare; import org.miaixz.bus.core.convert.Convert; import org.miaixz.bus.core.lang.Assert; @@ -50,7 +51,7 @@ * @author Kimi Liu * @since Java 17+ */ -public class PatternKit { +public class PatternKit extends RegexValidator { /** * 正则中需要被转义的关键字 @@ -379,8 +380,8 @@ public static String extractMultiAndDelPre(final String regex, final Mutable - * PatternKit.replaceAll("中文1234", "(\\d+)", "($1)")) - * + * replaceAll("中文1234", "(\\d+)", "($1)")) * 结果:中文(1234) *
    * @@ -851,12 +783,15 @@ public static String replaceAll(final CharSequence content, final String regex, * @param replacementTemplate 替换的文本模板,可以使用$1类似的变量提取正则匹配出的内容 * @return 处理后的文本 */ - public static String replaceAll(final CharSequence content, final java.util.regex.Pattern pattern, final String replacementTemplate) { + public static String replaceAll(final CharSequence content, final java.util.regex.Pattern pattern, String replacementTemplate) { if (StringKit.isEmpty(content)) { - return StringKit.toString(content); + return StringKit.toStringOrNull(content); } - // replacementTemplate字段不能为null,否则无法抉择如何处理结果 + // replacementTemplate字段为null时按照去除匹配对待 + if (null == replacementTemplate) { + replacementTemplate = Normal.EMPTY; + } Assert.notNull(replacementTemplate, "ReplacementTemplate must be not null !"); final Matcher matcher = pattern.matcher(content); @@ -869,7 +804,7 @@ public static String replaceAll(final CharSequence content, final java.util.rege String replacement = replacementTemplate; for (final String var : varNums) { final int group = Integer.parseInt(var); - replacement = replacement.replace(Symbol.DOLLAR + var, matcher.group(group)); + replacement = replacement.replace("$" + var, matcher.group(group)); } matcher.appendReplacement(sb, escape(replacement)); result = matcher.find(); @@ -877,7 +812,9 @@ public static String replaceAll(final CharSequence content, final java.util.rege matcher.appendTail(sb); return sb.toString(); } - return StringKit.toString(content); + + // 无匹配结果,返回原字符串 + return StringKit.toStringOrNull(content); } /** @@ -910,9 +847,13 @@ public static String replaceAll(final CharSequence text, final String regex, fin * @param replaceFun 决定如何替换的函数,可能被多次调用(当有多个匹配时) * @return 替换后的字符串 */ - public static String replaceAll(final CharSequence text, final java.util.regex.Pattern pattern, final FunctionX replaceFun) { - if (StringKit.isEmpty(text)) { - return StringKit.toString(text); + public static String replaceAll(final CharSequence text, final java.util.regex.Pattern pattern, FunctionX replaceFun) { + if (null == pattern || StringKit.isEmpty(text)) { + return StringKit.toStringOrNull(text); + } + + if (null == replaceFun) { + replaceFun = Matcher::group; } final Matcher matcher = pattern.matcher(text); @@ -947,7 +888,7 @@ public static String escape(final char c) { */ public static String escape(final CharSequence content) { if (StringKit.isBlank(content)) { - return StringKit.toString(content); + return StringKit.toStringOrNull(content); } final StringBuilder builder = new StringBuilder(); diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ResourceKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ResourceKit.java index 09e63f9c5c..3028006257 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ResourceKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ResourceKit.java @@ -227,7 +227,7 @@ public static EnumerationIterator getResourceUrlIter(final String resource, * @return {@link URL} */ public static URL getResourceUrl(String resource, final Class baseClass) { - resource = StringKit.emptyIfNull(resource); + resource = StringKit.toStringOrEmpty(resource); return (null != baseClass) ? baseClass.getResource(resource) : ClassKit.getClassLoader().getResource(resource); } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/StringKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/StringKit.java index ebc89ab1bf..cceab0e295 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/StringKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/StringKit.java @@ -49,62 +49,6 @@ */ public class StringKit extends CharsBacker { - /** - * 如果对象是字符串是否为空白,空白的定义如下: - *
      - *
    1. {@code null}
    2. - *
    3. 空字符串:{@code ""}
    4. - *
    5. 空格、全角空格、制表符、换行符,等不可见字符
    6. - *
    - *
      - *
    • {@code StringKit.isBlankIfString(null) // true}
    • - *
    • {@code StringKit.isBlankIfString("") // true}
    • - *
    • {@code StringKit.isBlankIfString(" \t\n") // true}
    • - *
    • {@code StringKit.isBlankIfString("abc") // false}
    • - *
    - * 注意:该方法与 {@link #isEmptyIfString(Object)} 的区别是: - * 该方法会校验空白字符,且性能相对于 {@link #isEmptyIfString(Object)} 略慢。 - * - * @param obj 对象 - * @return 如果为字符串是否为空串 - * @see StringKit#isBlank(CharSequence) - */ - public static boolean isBlankIfString(final Object obj) { - if (null == obj) { - return true; - } else if (obj instanceof CharSequence) { - return isBlank((CharSequence) obj); - } - return false; - } - - /** - * 如果对象是字符串是否为空串,空的定义如下: - *
      - *
    1. {@code null}
    2. - *
    3. 空字符串:{@code ""}
    4. - *
    - *
      - *
    • {@code StringKit.isEmptyIfString(null) // true}
    • - *
    • {@code StringKit.isEmptyIfString("") // true}
    • - *
    • {@code StringKit.isEmptyIfString(" \t\n") // false}
    • - *
    • {@code StringKit.isEmptyIfString("abc") // false}
    • - *
    - * - *

    注意:该方法与 {@link #isBlankIfString(Object)} 的区别是:该方法不校验空白字符。

    - * - * @param obj 对象 - * @return 如果为字符串是否为空串 - */ - public static boolean isEmptyIfString(final Object obj) { - if (null == obj) { - return true; - } else if (obj instanceof CharSequence) { - return 0 == ((CharSequence) obj).length(); - } - return false; - } - /** * 给定字符串数组全部做去首尾空格 * @@ -226,27 +170,6 @@ public static String toString(final ByteBuffer data, java.nio.charset.Charset ch return charset.decode(data).toString(); } - /** - * 调用对象的toString方法,{@code null}会返回{@code null} - * - * @param obj 对象 - * @return 字符串 or {@code null} - */ - public static String toStringOrNull(final Object obj) { - return null == obj ? null : obj.toString(); - } - - /** - * 调用对象的toString方法,{@code null}会返回空字符串 "" - * - * @param obj 对象 - * @return {@link String } - */ - public static String toStringOrEmpty(final Object obj) { - // obj为空时, 返回 null 或 "null" 都不适用部分场景, 此处返回 "" 空字符串 - return null == obj ? Normal.EMPTY : obj.toString(); - } - /** * JDK8中,通过{@code String(char[] value, boolean share)}这个内部构造创建String对象。 * 此函数通过传入char[],实现zero-copy的String创建,效率很高。但是要求传入的char[]不可以在其他地方修改。 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/UrlKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/UrlKit.java index 369b89a319..c946e80609 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/UrlKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/UrlKit.java @@ -498,7 +498,7 @@ public static String normalize(final String url, final boolean isEncodePath, fin if (isEncodePath) { path = RFC3986.PATH.encode(path, Charset.UTF_8); } - return protocol + domain + StringKit.emptyIfNull(path) + StringKit.emptyIfNull(params); + return protocol + domain + StringKit.toStringOrEmpty(path) + StringKit.toStringOrEmpty(params); } /** @@ -808,9 +808,11 @@ public static Map> decodeQueryList(final String paramsStr, final Map> params = new LinkedHashMap<>(); queryMap.forEach((key, value) -> { - final List values = params.computeIfAbsent(StringKit.toString(key), k -> new ArrayList<>(1)); - // 一般是一个参数 - values.add(StringKit.toString(value)); + if(null != key && null != value){ + final List values = params.computeIfAbsent(key.toString(), k -> new ArrayList<>(1)); + // 一般是一个参数 + values.add(StringKit.toStringOrNull(value)); + } }); return params; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/XmlKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/XmlKit.java index 29ae27dcda..7086e97135 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/XmlKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/XmlKit.java @@ -153,7 +153,7 @@ public static Document readXml(final InputSource source, final boolean namespace */ public static Document parseXml(final String xmlStr) { if (StringKit.isBlank(xmlStr)) { - throw new IllegalArgumentException("XML content string is empty !"); + throw new IllegalArgumentException("XML content string is blank !"); } return readXml(StringKit.getReader(cleanInvalid(xmlStr))); } @@ -929,7 +929,7 @@ private static void appendIterator(final Document doc, final Node node, final It * @return 增加的子节点,即Text节点 */ private static Node appendText(final Document doc, final Node node, final CharSequence text) { - return node.appendChild(doc.createTextNode(StringKit.toString(text))); + return node.appendChild(doc.createTextNode(StringKit.toStringOrEmpty(text))); } } diff --git a/bus-crypto/src/main/java/org/miaixz/bus/crypto/metric/BouncyCastleServiceProvider.java b/bus-crypto/src/main/java/org/miaixz/bus/crypto/metric/BouncyCastleServiceProvider.java index 9635883001..06e97e336c 100644 --- a/bus-crypto/src/main/java/org/miaixz/bus/crypto/metric/BouncyCastleServiceProvider.java +++ b/bus-crypto/src/main/java/org/miaixz/bus/crypto/metric/BouncyCastleServiceProvider.java @@ -27,6 +27,8 @@ */ package org.miaixz.bus.crypto.metric; +import org.miaixz.bus.core.lang.Assert; + import java.security.Security; /** @@ -37,6 +39,14 @@ */ public class BouncyCastleServiceProvider implements BouncyCastleProvider { + /** + * 构造 + */ + public BouncyCastleServiceProvider() { + // SPI方式加载时检查BC库是否引入 + Assert.notNull(BouncyCastleProvider.class); + } + @Override public java.security.Provider create() { java.security.Provider provider = Security.getProvider(org.bouncycastle.jce.provider.BouncyCastleProvider.PROVIDER_NAME); diff --git a/bus-extra/pom.xml b/bus-extra/pom.xml index d0359e4ce0..10c390fde9 100644 --- a/bus-extra/pom.xml +++ b/bus-extra/pom.xml @@ -72,7 +72,7 @@ 21 21 1.18.34 - 2.0.49 + 2.0.51 2.11.0 2.17.2 1.1.8 diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/image/gif/GifDecoder.java b/bus-extra/src/main/java/org/miaixz/bus/extra/image/gif/GifDecoder.java index 9350945d93..d86e9c2f67 100755 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/image/gif/GifDecoder.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/image/gif/GifDecoder.java @@ -792,9 +792,10 @@ static class GifFrame { public BufferedImage image; public int delay; - public GifFrame(BufferedImage im, int del) { - image = im; - delay = del; + public GifFrame(BufferedImage image, int delay) { + this.image = image; + this.delay = delay; } } + } diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/analysis/AnalysisProvider.java b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/analysis/AnalysisProvider.java index 60b5a24adb..54258a210c 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/analysis/AnalysisProvider.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/analysis/AnalysisProvider.java @@ -60,7 +60,7 @@ public AnalysisProvider(final Analyzer analyzer) { public NLPResult parse(final CharSequence text) { final TokenStream stream; try { - stream = analyzer.tokenStream("text", StringKit.toString(text)); + stream = analyzer.tokenStream("text", StringKit.toStringOrEmpty(text)); stream.reset(); } catch (final IOException e) { throw new InternalException(e); diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/ansj/AnsjProvider.java b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/ansj/AnsjProvider.java index 475cc000aa..9fd213e69a 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/ansj/AnsjProvider.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/ansj/AnsjProvider.java @@ -62,7 +62,7 @@ public AnsjProvider(final Analysis analysis) { @Override public NLPResult parse(final CharSequence text) { - return new AnsjResult(analysis.parseStr(StringKit.toString(text))); + return new AnsjResult(analysis.parseStr(StringKit.toStringOrEmpty(text))); } } diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/hanlp/HanLPProvider.java b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/hanlp/HanLPProvider.java index 1a9ea594d0..8e3ae3684c 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/hanlp/HanLPProvider.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/hanlp/HanLPProvider.java @@ -63,7 +63,7 @@ public HanLPProvider(final Segment seg) { @Override public NLPResult parse(final CharSequence text) { - return new HanLPResult(this.seg.seg(StringKit.toString(text))); + return new HanLPResult(this.seg.seg(StringKit.toStringOrEmpty(text))); } } diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/jcseg/JcsegProvider.java b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/jcseg/JcsegProvider.java index 4a0972bc12..da3b87e4af 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/jcseg/JcsegProvider.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/jcseg/JcsegProvider.java @@ -76,7 +76,7 @@ public NLPResult parse(final CharSequence text) { // 依据给定的ADictionary和SegmenterConfig来创建ISegment final ISegment segment = ISegment.COMPLEX.factory.create(config, dic); try { - segment.reset(new StringReader(StringKit.toString(text))); + segment.reset(new StringReader(StringKit.toStringOrEmpty(text))); } catch (final IOException e) { throw new InternalException(e); } diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/jieba/JiebaProvider.java b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/jieba/JiebaProvider.java index 9b303ca921..eca020f50d 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/jieba/JiebaProvider.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/jieba/JiebaProvider.java @@ -65,7 +65,7 @@ public JiebaProvider(final SegMode mode) { @Override public NLPResult parse(final CharSequence text) { - return new JiebaResult(jiebaSegmenter.process(StringKit.toString(text), mode)); + return new JiebaResult(jiebaSegmenter.process(StringKit.toStringOrEmpty(text), mode)); } } diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/mynlp/MynlpProvider.java b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/mynlp/MynlpProvider.java index 4ffdec9b61..3b244a4545 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/mynlp/MynlpProvider.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/mynlp/MynlpProvider.java @@ -67,7 +67,7 @@ public MynlpProvider(final Lexer lexer) { @Override public NLPResult parse(final CharSequence text) { - final Sentence sentence = this.lexer.scan(StringKit.toString(text)); + final Sentence sentence = this.lexer.scan(StringKit.toStringOrEmpty(text)); return new MynlpResult(sentence); } diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/word/WordProvider.java b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/word/WordProvider.java index a52e697205..45d2ae09f6 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/word/WordProvider.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/nlp/provider/word/WordProvider.java @@ -73,7 +73,7 @@ public WordProvider(final Segmentation segmentation) { @Override public NLPResult parse(final CharSequence text) { - return new WordResult(this.segmentation.seg(StringKit.toString(text))); + return new WordResult(this.segmentation.seg(StringKit.toStringOrEmpty(text))); } } diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/beetl/BeetlProvider.java b/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/beetl/BeetlProvider.java index 43ef272e3c..bcdec4c20c 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/beetl/BeetlProvider.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/beetl/BeetlProvider.java @@ -31,6 +31,7 @@ import org.beetl.core.GroupTemplate; import org.beetl.core.ResourceLoader; import org.beetl.core.resource.*; +import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.exception.InternalException; import org.miaixz.bus.extra.template.Template; import org.miaixz.bus.extra.template.TemplateConfig; @@ -52,6 +53,8 @@ public class BeetlProvider implements TemplateProvider { * 默认构造 */ public BeetlProvider() { + // SPI方式加载时检查库是否引入 + Assert.notNull(GroupTemplate.class); } /** diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/freemarker/FreemarkerProvider.java b/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/freemarker/FreemarkerProvider.java index f4ea1f66a5..8fe2b1c0cf 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/freemarker/FreemarkerProvider.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/freemarker/FreemarkerProvider.java @@ -30,6 +30,7 @@ import freemarker.cache.ClassTemplateLoader; import freemarker.cache.FileTemplateLoader; import freemarker.template.Configuration; +import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.lang.exception.InternalException; import org.miaixz.bus.core.xyz.ClassKit; import org.miaixz.bus.core.xyz.FileKit; @@ -54,6 +55,8 @@ public class FreemarkerProvider implements TemplateProvider { * 默认构造 */ public FreemarkerProvider() { + // SPI方式加载时检查库是否引入 + Assert.notNull(Configuration.class); } /** diff --git a/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/thymeleaf/ThymeleafProvider.java b/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/thymeleaf/ThymeleafProvider.java index 88861ba2b6..dd5b638632 100644 --- a/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/thymeleaf/ThymeleafProvider.java +++ b/bus-extra/src/main/java/org/miaixz/bus/extra/template/provider/thymeleaf/ThymeleafProvider.java @@ -27,6 +27,7 @@ */ package org.miaixz.bus.extra.template.provider.thymeleaf; +import org.miaixz.bus.core.lang.Assert; import org.miaixz.bus.core.xyz.FileKit; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.extra.template.Template; @@ -51,6 +52,8 @@ public class ThymeleafProvider implements TemplateProvider { * 默认构造 */ public ThymeleafProvider() { + // SPI方式加载时检查库是否引入 + Assert.notNull(org.thymeleaf.TemplateEngine.class); } /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/Builder.java b/bus-health/src/main/java/org/miaixz/bus/health/Builder.java index d2534ca25f..db1dd127b4 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/Builder.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/Builder.java @@ -32,7 +32,7 @@ import com.sun.jna.NativeLong; import com.sun.jna.Pointer; import com.sun.jna.platform.unix.LibCAPI; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.convert.Convert; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/Config.java b/bus-health/src/main/java/org/miaixz/bus/health/Config.java index d024d8092c..1b12ad648e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/Config.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/Config.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health; -import org.miaixz.bus.core.annotation.NotThreadSafe; +import org.miaixz.bus.core.lang.annotation.NotThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.setting.metric.props.Props; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/Executor.java b/bus-health/src/main/java/org/miaixz/bus/health/Executor.java index 5249158696..ebba8aee42 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/Executor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/Executor.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health; import com.sun.jna.Platform; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.logger.Logger; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/Formats.java b/bus-health/src/main/java/org/miaixz/bus/health/Formats.java index f1638322cd..0541ecda78 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/Formats.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/Formats.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import java.math.BigInteger; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/IdGroup.java b/bus-health/src/main/java/org/miaixz/bus/health/IdGroup.java index 98fe7d7713..515dbefc7c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/IdGroup.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/IdGroup.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health; import com.sun.jna.Platform; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/Memoizer.java b/bus-health/src/main/java/org/miaixz/bus/health/Memoizer.java index c8493b44fb..dec8bd8b6e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/Memoizer.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/Memoizer.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/Parsing.java b/bus-health/src/main/java/org/miaixz/bus/health/Parsing.java index b8ccd8a165..3d83a6235b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/Parsing.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/Parsing.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; @@ -247,12 +247,12 @@ public static byte[] longToByteArray(long value, int valueSize, int length) { /** * Convert a string to an integer representation. * - * @param str A human readable ASCII string + * @param text A human readable ASCII string * @param size Number of characters to convert to the long. May not exceed 8. * @return An integer representing the string where each character is treated as a byte */ - public static long strToLong(String str, int size) { - return byteArrayToLong(str.getBytes(Charset.US_ASCII), size); + public static long strToLong(String text, int size) { + return byteArrayToLong(text.getBytes(Charset.US_ASCII), size); } /** @@ -976,12 +976,12 @@ public static long parseLspciMemorySize(String line) { * example, 0 1 4-7 parses to a list containing 0, 1, 4, 5, 6, and 7. Also support comma separated entries like 0, * 2-5, 7-8, 9 to a list containing 0, 2, 3, 4, 5, 7, 8, 9. * - * @param str A string containing space-delimited integers or ranges of integers with a hyphen + * @param text A string containing space-delimited integers or ranges of integers with a hyphen * @return A list of integers representing the provided range(s). */ - public static List parseHyphenatedIntList(String str) { + public static List parseHyphenatedIntList(String text) { List result = new ArrayList<>(); - String[] csvTokens = str.split(Symbol.COMMA); + String[] csvTokens = text.split(Symbol.COMMA); for (String csvToken : csvTokens) { csvToken = csvToken.trim(); for (String s : Regex.SPACES.split(csvToken)) { diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Baseboard.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Baseboard.java index 6dba0dee32..cb1beda018 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Baseboard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Baseboard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; /** * The Baseboard represents the system board, also called motherboard, logic board, etc. diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/CentralProcessor.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/CentralProcessor.java index 6d1ce4d3f4..9fc3f2f6a8 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/CentralProcessor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/CentralProcessor.java @@ -27,10 +27,10 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Config; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/ComputerSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/ComputerSystem.java index d88abdf9bc..8bd3d9f3e0 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/ComputerSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/ComputerSystem.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; /** * The ComputerSystem represents the physical hardware, of a computer system/product and includes BIOS/firmware and a diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Display.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Display.java index 88110d4799..bab5a1fc51 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Display.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Display.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; /** * Display refers to the information regarding a video source and monitor identified by the EDID standard. diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Firmware.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Firmware.java index 2c5ef5522f..981da6b169 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Firmware.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Firmware.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; /** * The Firmware represents the low level BIOS or equivalent. diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/GlobalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/GlobalMemory.java index 1a36906dfe..392d80ed70 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/GlobalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/GlobalMemory.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import java.util.List; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/GraphicsCard.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/GraphicsCard.java index 22b24f2243..ad0518905f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/GraphicsCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/GraphicsCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; /** * GraphicsCard interface. diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HWDiskStore.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HWDiskStore.java index 5cc1d23651..a003e3d2d5 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HWDiskStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HWDiskStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import java.util.List; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HWPartition.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HWPartition.java index ba54ad2f19..68195d49bb 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HWPartition.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HWPartition.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.Formats; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HardwareAbstractionLayer.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HardwareAbstractionLayer.java index f96ccd80eb..65625d6c75 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HardwareAbstractionLayer.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/HardwareAbstractionLayer.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import java.util.Collections; import java.util.List; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/LogicalVolumeGroup.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/LogicalVolumeGroup.java index 6550f6b44d..93b50a2d3c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/LogicalVolumeGroup.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/LogicalVolumeGroup.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import java.util.Map; import java.util.Set; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/NetworkIF.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/NetworkIF.java index 96698cdced..db64b85f7c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/NetworkIF.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/NetworkIF.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import java.net.NetworkInterface; import java.util.Arrays; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/PhysicalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/PhysicalMemory.java index 208812defd..611153c382 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/PhysicalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/PhysicalMemory.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.Formats; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/PowerSource.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/PowerSource.java index 4d45f8bba6..ad56fd9c33 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/PowerSource.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/PowerSource.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import java.time.LocalDate; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Sensors.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Sensors.java index 76ae5ac06c..8584325270 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Sensors.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/Sensors.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * Sensors include hardware sensors to monitor temperature, fan speed, and other information. diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/SoundCard.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/SoundCard.java index fe3edd2e98..40b59217e6 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/SoundCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/SoundCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; /** * SoundCard interface. diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/UsbDevice.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/UsbDevice.java index b48518d148..8b3fe2ca9b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/UsbDevice.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/UsbDevice.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import java.util.List; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/VirtualMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/VirtualMemory.java index 16911ef859..fb1ccc3f69 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/VirtualMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/VirtualMemory.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * The VirtuallMemory class tracks information about the use of a computer's virtual memory (swap file) which diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractBaseboard.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractBaseboard.java index 698af3a945..374b4002ca 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractBaseboard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractBaseboard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.Baseboard; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractCentralProcessor.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractCentralProcessor.java index 6472ab0866..eaa3dd8b8b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractCentralProcessor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractCentralProcessor.java @@ -28,8 +28,8 @@ package org.miaixz.bus.health.builtin.hardware.common; import com.sun.jna.Platform; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractComputerSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractComputerSystem.java index decbb780a0..369628a0a0 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractComputerSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractComputerSystem.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.hardware.Baseboard; import org.miaixz.bus.health.builtin.hardware.ComputerSystem; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractDisplay.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractDisplay.java index f0cd013e70..00226d1e2c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractDisplay.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractDisplay.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.builtin.hardware.Display; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractFirmware.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractFirmware.java index eb4f8acedd..360b04da0f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractFirmware.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractFirmware.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.Firmware; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractGlobalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractGlobalMemory.java index 456db65ade..18930ed0a7 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractGlobalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractGlobalMemory.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Formats; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractGraphicsCard.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractGraphicsCard.java index 62f1a6be86..500edbc747 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractGraphicsCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractGraphicsCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.GraphicsCard; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractHWDiskStore.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractHWDiskStore.java index a23303afb8..4431319dd2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractHWDiskStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractHWDiskStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Formats; import org.miaixz.bus.health.builtin.hardware.HWDiskStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractHardwareAbstractionLayer.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractHardwareAbstractionLayer.java index 2d9fe0e2cc..3e7861e76c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractHardwareAbstractionLayer.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractHardwareAbstractionLayer.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.hardware.*; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractNetworkIF.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractNetworkIF.java index 2fc0f1ff49..a4fac67122 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractNetworkIF.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractNetworkIF.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Config; import org.miaixz.bus.health.Formats; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractPowerSource.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractPowerSource.java index 5847cd5e60..3642c929b8 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractPowerSource.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractPowerSource.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Platform; import org.miaixz.bus.health.builtin.hardware.PowerSource; import org.miaixz.bus.health.linux.hardware.LinuxPowerSource; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractSensors.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractSensors.java index 577f8b8efc..63cd9fb8ca 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractSensors.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractSensors.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.hardware.Sensors; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractSoundCard.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractSoundCard.java index 696747affe..80ab1fe6c2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractSoundCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractSoundCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.SoundCard; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractUsbDevice.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractUsbDevice.java index f04b0b8cc5..c95a3ebb8d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractUsbDevice.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractUsbDevice.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.UsbDevice; import java.util.Collections; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractVirtualMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractVirtualMemory.java index 29401afde9..06cea42324 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractVirtualMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/hardware/common/AbstractVirtualMemory.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.hardware.common; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Formats; import org.miaixz.bus.health.builtin.hardware.VirtualMemory; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/FileSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/FileSystem.java index a0f8248ec9..79574725f9 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/FileSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/FileSystem.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import java.util.List; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/InternetProtocolStats.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/InternetProtocolStats.java index cb466a8555..cf0066db57 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/InternetProtocolStats.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/InternetProtocolStats.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.builtin.software; -import org.miaixz.bus.core.annotation.Immutable; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import java.net.InetAddress; import java.net.UnknownHostException; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/NetworkParams.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/NetworkParams.java index a4d54cc3a0..42234f2aae 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/NetworkParams.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/NetworkParams.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * NetworkParams presents network parameters of running OS, such as DNS, host name etc. diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSDesktopWindow.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSDesktopWindow.java index cfe436557d..04e7bf5200 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSDesktopWindow.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSDesktopWindow.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.builtin.software; import com.sun.jna.platform.win32.WinDef.HWND; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import java.awt.*; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSFileStore.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSFileStore.java index f123f1a022..9efd13df20 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSFileStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSFileStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * A FileStore represents a storage pool, device, partition, volume, concrete file system or other implementation diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSProcess.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSProcess.java index e20325850a..5c52f2f611 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSProcess.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSProcess.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Config; import org.miaixz.bus.health.windows.driver.wmi.Win32ProcessCached; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSService.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSService.java index 8c7b901fe2..6e3a0e529f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSService.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSService.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.software; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; /** * Operating system services are responsible for the management of platform resources, including the processor, memory, diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSSession.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSSession.java index 3502d9c993..3743969324 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSSession.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OSSession.java @@ -27,10 +27,10 @@ */ package org.miaixz.bus.health.builtin.software; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Fields; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; import java.time.Instant; import java.time.LocalDateTime; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OperatingSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OperatingSystem.java index c2aafd6f88..244e9c8c73 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OperatingSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/OperatingSystem.java @@ -27,10 +27,10 @@ */ package org.miaixz.bus.health.builtin.software; -import org.miaixz.bus.core.annotation.Immutable; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.IdGroup; import org.miaixz.bus.health.unix.driver.Who; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractFileSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractFileSystem.java index e5fb66366d..0f96add229 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractFileSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractFileSystem.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.builtin.software.common; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Config; import org.miaixz.bus.health.builtin.software.FileSystem; import org.miaixz.bus.health.builtin.software.OSFileStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractNetworkParams.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractNetworkParams.java index a186f5534d..2ba62d439b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractNetworkParams.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractNetworkParams.java @@ -27,10 +27,10 @@ */ package org.miaixz.bus.health.builtin.software.common; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.builtin.software.NetworkParams; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSFileStore.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSFileStore.java index 5abfbb2364..c074a0c153 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSFileStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSFileStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.software.common; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSFileStore; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSProcess.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSProcess.java index b257621588..f7ea34bdc7 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSProcess.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSProcess.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.software.common; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.software.OSProcess; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSThread.java b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSThread.java index 515e7552e6..bb26b4d02f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSThread.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/builtin/software/common/AbstractOSThread.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.builtin.software.common; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.software.OSThread; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/DevPath.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/DevPath.java index f0912a3153..9111d68747 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/DevPath.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/DevPath.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Config; import java.io.File; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/ProcPath.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/ProcPath.java index a1d9d4e226..2836c8684c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/ProcPath.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/ProcPath.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Config; import java.io.File; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/SysPath.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/SysPath.java index e0053aa5b7..d4f5a20ae6 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/SysPath.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/SysPath.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Config; import java.io.File; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Devicetree.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Devicetree.java index 829b982d47..8913a0afee 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Devicetree.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Devicetree.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.linux.SysPath; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Dmidecode.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Dmidecode.java index 44330badc6..a30f7b1b45 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Dmidecode.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Dmidecode.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.linux.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.IdGroup; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Lshal.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Lshal.java index 42066f3ced..ed18606962 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Lshal.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Lshal.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.linux.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Lshw.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Lshw.java index 611a82d489..23b993529d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Lshw.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Lshw.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.linux.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.IdGroup; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Sysfs.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Sysfs.java index 2fda1edc9b..55dd99febe 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Sysfs.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Sysfs.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.linux.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Who.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Who.java index bd8f77746d..3b504e0350 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Who.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/Who.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.linux.driver; import com.sun.jna.Native; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.software.OSSession; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/Auxv.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/Auxv.java index 7e8dc6e680..cd7b53818c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/Auxv.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/Auxv.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.linux.driver.proc; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.linux.ProcPath; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/CpuInfo.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/CpuInfo.java index 2e5a262fb5..f82024beaa 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/CpuInfo.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/CpuInfo.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.linux.driver.proc; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/CpuStat.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/CpuStat.java index 07980b28d6..e0fc7b7fa3 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/CpuStat.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/CpuStat.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux.driver.proc; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.hardware.CentralProcessor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/DiskStats.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/DiskStats.java index eff6879be0..dee9d6ba9f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/DiskStats.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/DiskStats.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux.driver.proc; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.linux.ProcPath; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/ProcessStat.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/ProcessStat.java index 1e1c20425c..b61d7c3dce 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/ProcessStat.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/ProcessStat.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.linux.driver.proc; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/UpTime.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/UpTime.java index f828c8d17b..d9ce34e755 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/UpTime.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/driver/proc/UpTime.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux.driver.proc; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.linux.ProcPath; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxBaseboard.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxBaseboard.java index e0474553a5..597f1311b2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxBaseboard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxBaseboard.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.hardware.common.AbstractBaseboard; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxCentralProcessor.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxCentralProcessor.java index b39d3cf201..db47ca27bf 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxCentralProcessor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxCentralProcessor.java @@ -32,10 +32,10 @@ import com.sun.jna.platform.linux.Udev.UdevDevice; import com.sun.jna.platform.linux.Udev.UdevEnumerate; import com.sun.jna.platform.linux.Udev.UdevListEntry; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.core.xyz.ObjectKit; import org.miaixz.bus.core.xyz.StringKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxComputerSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxComputerSystem.java index 548f2eaa95..5af8d52567 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxComputerSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxComputerSystem.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.hardware.Baseboard; import org.miaixz.bus.health.builtin.hardware.Firmware; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxFirmware.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxFirmware.java index 265b672b6f..d8007d7dc2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxFirmware.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxFirmware.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.linux.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxGlobalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxGlobalMemory.java index 7630e8e2c2..0e6a83873b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxGlobalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxGlobalMemory.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxGraphicsCard.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxGraphicsCard.java index d7b1e967c6..0479715262 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxGraphicsCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxGraphicsCard.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.linux.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxHWDiskStore.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxHWDiskStore.java index cfc5d0493d..2712cfda08 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxHWDiskStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxHWDiskStore.java @@ -32,10 +32,10 @@ import com.sun.jna.platform.linux.Udev.UdevDevice; import com.sun.jna.platform.linux.Udev.UdevEnumerate; import com.sun.jna.platform.linux.Udev.UdevListEntry; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.hardware.HWDiskStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxHardwareAbstractionLayer.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxHardwareAbstractionLayer.java index db2155320c..ce0f02ede5 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxHardwareAbstractionLayer.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxHardwareAbstractionLayer.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.linux.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.*; import org.miaixz.bus.health.builtin.hardware.common.AbstractHardwareAbstractionLayer; import org.miaixz.bus.health.unix.hardware.UnixDisplay; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxNetworkIF.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxNetworkIF.java index dbd9f5aa9a..22e5349dd7 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxNetworkIF.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxNetworkIF.java @@ -30,9 +30,9 @@ import com.sun.jna.platform.linux.Udev; import com.sun.jna.platform.linux.Udev.UdevContext; import com.sun.jna.platform.linux.Udev.UdevDevice; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.builtin.hardware.NetworkIF; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxPowerSource.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxPowerSource.java index e48d3b8ecf..0c4f0b6f0c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxPowerSource.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxPowerSource.java @@ -32,9 +32,9 @@ import com.sun.jna.platform.linux.Udev.UdevDevice; import com.sun.jna.platform.linux.Udev.UdevEnumerate; import com.sun.jna.platform.linux.Udev.UdevListEntry; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.hardware.PowerSource; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxSensors.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxSensors.java index cbc0e1a1f5..73a6e5ef33 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxSensors.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxSensors.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxSoundCard.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxSoundCard.java index 686689d8f6..9c904d7f27 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxSoundCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxSoundCard.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.linux.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.builtin.hardware.SoundCard; import org.miaixz.bus.health.builtin.hardware.common.AbstractHardwareAbstractionLayer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxUsbDevice.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxUsbDevice.java index 7b1bf4f74d..beea28acdc 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxUsbDevice.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxUsbDevice.java @@ -31,9 +31,9 @@ import com.sun.jna.platform.linux.Udev.UdevDevice; import com.sun.jna.platform.linux.Udev.UdevEnumerate; import com.sun.jna.platform.linux.Udev.UdevListEntry; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.UsbDevice; import org.miaixz.bus.health.builtin.hardware.common.AbstractUsbDevice; import org.miaixz.bus.health.linux.software.LinuxOperatingSystem; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxVirtualMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxVirtualMemory.java index 99687a8bdf..4ff4ae695a 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxVirtualMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/hardware/LinuxVirtualMemory.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.Builder; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxFileSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxFileSystem.java index 78ab4aa39d..3cbf2c0c41 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxFileSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxFileSystem.java @@ -29,10 +29,10 @@ import com.sun.jna.Native; import com.sun.jna.platform.linux.LibC; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Config; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxInternetProtocolStats.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxInternetProtocolStats.java index f262688b0a..3b2c70744f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxInternetProtocolStats.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxInternetProtocolStats.java @@ -27,10 +27,10 @@ */ package org.miaixz.bus.health.linux.software; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.xyz.ByteKit; import org.miaixz.bus.health.Builder; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxNetworkParams.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxNetworkParams.java index cc46dd1ac7..394aaa68f5 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxNetworkParams.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxNetworkParams.java @@ -30,9 +30,9 @@ import com.sun.jna.Native; import com.sun.jna.platform.linux.LibC; import com.sun.jna.platform.unix.LibCAPI; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.jna.ByRef; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSFileStore.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSFileStore.java index e2bfac607e..03e48792ba 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSFileStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSFileStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.linux.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSFileStore; import org.miaixz.bus.health.builtin.software.common.AbstractOSFileStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSProcess.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSProcess.java index c11d2a42d3..947e5f40b4 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSProcess.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSProcess.java @@ -28,10 +28,10 @@ package org.miaixz.bus.health.linux.software; import com.sun.jna.platform.unix.Resource; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.*; import org.miaixz.bus.health.builtin.software.OSThread; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSThread.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSThread.java index 74cfe8560e..8082c5cebb 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSThread.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOSThread.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.linux.software; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.software.OSProcess; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOperatingSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOperatingSystem.java index e5b70d2cd4..320cd3102d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOperatingSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/linux/software/LinuxOperatingSystem.java @@ -30,10 +30,10 @@ import com.sun.jna.Native; import com.sun.jna.platform.linux.LibC; import com.sun.jna.platform.linux.Udev; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.Builder; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/CFKit.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/CFKit.java index 6c9ca38f1e..7bc8a0291f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/CFKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/CFKit.java @@ -29,8 +29,8 @@ import com.sun.jna.Pointer; import com.sun.jna.platform.mac.CoreFoundation.CFStringRef; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * CF String retrieving diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/SmcKit.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/SmcKit.java index c8474184ec..9c7d487466 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/SmcKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/SmcKit.java @@ -31,7 +31,7 @@ import com.sun.jna.platform.mac.IOKit.IOConnect; import com.sun.jna.platform.mac.IOKit.IOService; import com.sun.jna.platform.mac.IOKitUtil; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.jna.ByRef.CloseableNativeLongByReference; import org.miaixz.bus.health.builtin.jna.ByRef.CloseablePointerByReference; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/SysctlKit.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/SysctlKit.java index ab69cdd659..8d364bf89d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/SysctlKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/SysctlKit.java @@ -31,7 +31,7 @@ import com.sun.jna.Native; import com.sun.jna.Structure; import com.sun.jna.platform.unix.LibCAPI.size_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.jna.ByRef.CloseableSizeTByReference; import org.miaixz.bus.health.mac.jna.SystemB; import org.miaixz.bus.logger.Logger; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/ThreadInfo.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/ThreadInfo.java index c56445b6a4..b6a13d530a 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/ThreadInfo.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/ThreadInfo.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.mac.driver; -import org.miaixz.bus.core.annotation.Immutable; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.software.OSProcess; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/Who.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/Who.java index 611c88cf01..32311a0fa2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/Who.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/Who.java @@ -28,8 +28,8 @@ package org.miaixz.bus.health.mac.driver; import com.sun.jna.Native; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Charset; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.builtin.software.OSSession; import org.miaixz.bus.health.mac.jna.SystemB; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/WindowInfo.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/WindowInfo.java index 62e79fb26e..57724691e3 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/WindowInfo.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/WindowInfo.java @@ -29,8 +29,8 @@ import com.sun.jna.Pointer; import com.sun.jna.platform.mac.CoreFoundation.*; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Formats; import org.miaixz.bus.health.builtin.software.OSDesktopWindow; import org.miaixz.bus.health.mac.CFKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/disk/Fsstat.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/disk/Fsstat.java index 7d197ed727..0c916b9db2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/disk/Fsstat.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/disk/Fsstat.java @@ -30,9 +30,9 @@ import com.sun.jna.Native; import com.sun.jna.platform.mac.SystemB; import com.sun.jna.platform.mac.SystemB.Statfs; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import java.util.HashMap; import java.util.Map; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/net/NetStat.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/net/NetStat.java index 9e965a763a..33f6532c42 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/net/NetStat.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/driver/net/NetStat.java @@ -33,8 +33,8 @@ import com.sun.jna.platform.mac.SystemB.IFmsgHdr; import com.sun.jna.platform.mac.SystemB.IFmsgHdr2; import com.sun.jna.platform.unix.LibCAPI.size_t; -import org.miaixz.bus.core.annotation.Immutable; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.jna.ByRef.CloseableSizeTByReference; import org.miaixz.bus.logger.Logger; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacBaseboard.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacBaseboard.java index b92815a928..774eceedc1 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacBaseboard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacBaseboard.java @@ -30,9 +30,9 @@ import com.sun.jna.Native; import com.sun.jna.platform.mac.IOKit.IORegistryEntry; import com.sun.jna.platform.mac.IOKitUtil; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacCentralProcessor.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacCentralProcessor.java index 62998840ef..634853d84f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacCentralProcessor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacCentralProcessor.java @@ -32,10 +32,10 @@ import com.sun.jna.platform.mac.IOKit.IORegistryEntry; import com.sun.jna.platform.mac.IOKitUtil; import com.sun.jna.platform.mac.SystemB; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacComputerSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacComputerSystem.java index b5b1da86c1..cbc993d17e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacComputerSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacComputerSystem.java @@ -30,9 +30,9 @@ import com.sun.jna.Native; import com.sun.jna.platform.mac.IOKit.IORegistryEntry; import com.sun.jna.platform.mac.IOKitUtil; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacDisplay.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacDisplay.java index bc817bb09c..a8d21ec42f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacDisplay.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacDisplay.java @@ -34,7 +34,7 @@ import com.sun.jna.platform.mac.IOKit.IOIterator; import com.sun.jna.platform.mac.IOKit.IORegistryEntry; import com.sun.jna.platform.mac.IOKitUtil; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.Display; import org.miaixz.bus.health.builtin.hardware.common.AbstractDisplay; import org.miaixz.bus.logger.Logger; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacFirmware.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacFirmware.java index 0fb093366e..cd2879bda4 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacFirmware.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacFirmware.java @@ -31,9 +31,9 @@ import com.sun.jna.platform.mac.IOKit.IOIterator; import com.sun.jna.platform.mac.IOKit.IORegistryEntry; import com.sun.jna.platform.mac.IOKitUtil; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacGlobalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacGlobalMemory.java index 0a4439e1bc..aa95ba46cc 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacGlobalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacGlobalMemory.java @@ -29,9 +29,9 @@ import com.sun.jna.Native; import com.sun.jna.platform.mac.SystemB; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacGraphicsCard.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacGraphicsCard.java index 1dcbf8a6ff..7c5cecf551 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacGraphicsCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacGraphicsCard.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.mac.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.hardware.GraphicsCard; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacHWDiskStore.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacHWDiskStore.java index 1458b0add5..e88ec48c19 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacHWDiskStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacHWDiskStore.java @@ -37,8 +37,8 @@ import com.sun.jna.platform.mac.IOKit.IOIterator; import com.sun.jna.platform.mac.IOKit.IORegistryEntry; import com.sun.jna.platform.mac.IOKitUtil; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.HWDiskStore; import org.miaixz.bus.health.builtin.hardware.HWPartition; import org.miaixz.bus.health.builtin.hardware.common.AbstractHWDiskStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacHardwareAbstractionLayer.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacHardwareAbstractionLayer.java index 7e8f11af1b..40d246f34a 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacHardwareAbstractionLayer.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacHardwareAbstractionLayer.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.mac.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.*; import org.miaixz.bus.health.builtin.hardware.common.AbstractHardwareAbstractionLayer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacNetworkIF.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacNetworkIF.java index 4ee9eecbbb..de8c703a4d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacNetworkIF.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacNetworkIF.java @@ -30,7 +30,7 @@ import com.sun.jna.Pointer; import com.sun.jna.platform.mac.CoreFoundation.CFArrayRef; import com.sun.jna.platform.mac.CoreFoundation.CFStringRef; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.NetworkIF; import org.miaixz.bus.health.builtin.hardware.common.AbstractNetworkIF; import org.miaixz.bus.health.mac.driver.net.NetStat; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacPowerSource.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacPowerSource.java index 3ccbf2e381..a3a8891a8f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacPowerSource.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacPowerSource.java @@ -33,8 +33,8 @@ import com.sun.jna.platform.mac.IOKit; import com.sun.jna.platform.mac.IOKit.IORegistryEntry; import com.sun.jna.platform.mac.IOKitUtil; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.PowerSource; import org.miaixz.bus.health.builtin.hardware.common.AbstractPowerSource; import org.miaixz.bus.health.mac.CFKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacSensors.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacSensors.java index cb1cd6422d..bafa84dcd4 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacSensors.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacSensors.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.mac.hardware; import com.sun.jna.platform.mac.IOKit.IOConnect; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.common.AbstractSensors; import org.miaixz.bus.health.mac.SmcKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacSoundCard.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacSoundCard.java index 12cd9bc295..839958a446 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacSoundCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacSoundCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.mac.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.hardware.SoundCard; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacUsbDevice.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacUsbDevice.java index f5b77cfa70..57a245ee8f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacUsbDevice.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacUsbDevice.java @@ -35,9 +35,9 @@ import com.sun.jna.platform.mac.IOKit.IOIterator; import com.sun.jna.platform.mac.IOKit.IORegistryEntry; import com.sun.jna.platform.mac.IOKitUtil; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.UsbDevice; import org.miaixz.bus.health.builtin.hardware.common.AbstractUsbDevice; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacVirtualMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacVirtualMemory.java index ed356a648a..c66532290e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacVirtualMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/hardware/MacVirtualMemory.java @@ -29,7 +29,7 @@ import com.sun.jna.Native; import com.sun.jna.platform.mac.SystemB; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacFileSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacFileSystem.java index 64d1973365..0a6fbfd8cb 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacFileSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacFileSystem.java @@ -41,10 +41,10 @@ import com.sun.jna.platform.mac.IOKitUtil; import com.sun.jna.platform.mac.SystemB; import com.sun.jna.platform.mac.SystemB.Statfs; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Config; import org.miaixz.bus.health.builtin.software.OSFileStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacInternetProtocolStats.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacInternetProtocolStats.java index 93484d5cbd..bc2a2b7f02 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacInternetProtocolStats.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacInternetProtocolStats.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.mac.software; import com.sun.jna.Memory; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacNetworkParams.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacNetworkParams.java index 095ade31f7..633f8608ba 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacNetworkParams.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacNetworkParams.java @@ -29,10 +29,10 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.LibCAPI; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.builtin.jna.ByRef; import org.miaixz.bus.health.builtin.software.common.AbstractNetworkParams; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSFileStore.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSFileStore.java index d4a337af84..17c566a38c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSFileStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSFileStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.mac.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSFileStore; import org.miaixz.bus.health.builtin.software.common.AbstractOSFileStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSProcess.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSProcess.java index b9b3dd929e..c6ab283d2a 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSProcess.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSProcess.java @@ -37,10 +37,10 @@ import com.sun.jna.platform.mac.SystemB.Passwd; import com.sun.jna.platform.unix.LibCAPI.size_t; import com.sun.jna.platform.unix.Resource; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Config; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSThread.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSThread.java index 57b7ae08b6..d476992d82 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSThread.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOSThread.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.mac.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSProcess; import org.miaixz.bus.health.builtin.software.common.AbstractOSThread; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOperatingSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOperatingSystem.java index 965c769c30..b2568b82de 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOperatingSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/mac/software/MacOperatingSystem.java @@ -28,9 +28,9 @@ package org.miaixz.bus.health.mac.software; import com.sun.jna.platform.mac.SystemB; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Config; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/NetStat.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/NetStat.java index bf719ad54b..614439d763 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/NetStat.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/NetStat.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.unix.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Who.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Who.java index 9fe40faced..781423dc87 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Who.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Who.java @@ -28,9 +28,9 @@ package org.miaixz.bus.health.unix.driver; import com.sun.jna.Platform; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.builtin.software.OSSession; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Xrandr.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Xrandr.java index 01ad4207cb..51dcca602d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Xrandr.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Xrandr.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.xyz.ByteKit; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Xwininfo.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Xwininfo.java index feb10082aa..5ab75cd6d5 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Xwininfo.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/driver/Xwininfo.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.unix.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/BsdNetworkIF.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/BsdNetworkIF.java index 6ddda0b98b..3cd0323f7e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/BsdNetworkIF.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/BsdNetworkIF.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.unix.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.hardware.NetworkIF; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/UnixBaseboard.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/UnixBaseboard.java index 71f631313f..903c7b83fc 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/UnixBaseboard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/UnixBaseboard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.common.AbstractBaseboard; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/UnixDisplay.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/UnixDisplay.java index 25bb479d0e..56bcb15a88 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/UnixDisplay.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/hardware/UnixDisplay.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.Display; import org.miaixz.bus.health.builtin.hardware.common.AbstractDisplay; import org.miaixz.bus.health.unix.driver.Xrandr; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Ls.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Ls.java index dead8a4c09..0a50e914b6 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Ls.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Ls.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.unix.platform.aix.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lscfg.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lscfg.java index 5efaedaef5..5ec9f06c3d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lscfg.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lscfg.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.unix.platform.aix.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lspv.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lspv.java index dd7de56dba..949e44bdee 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lspv.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lspv.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.unix.platform.aix.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lssrad.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lssrad.java index ad7666a6a4..801806541e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lssrad.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Lssrad.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.unix.platform.aix.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/PsInfo.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/PsInfo.java index e536246446..4417054ca8 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/PsInfo.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/PsInfo.java @@ -31,8 +31,8 @@ import com.sun.jna.NativeLong; import com.sun.jna.platform.unix.LibCAPI.size_t; import com.sun.jna.platform.unix.LibCAPI.ssize_t; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.Builder; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Uptime.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Uptime.java index 1f65a6383b..f82db8c4ae 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Uptime.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Uptime.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.aix.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Who.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Who.java index 17653017f9..e1382e44e9 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Who.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/Who.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.unix.platform.aix.driver; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import java.time.LocalDateTime; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatConfig.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatConfig.java index 96e260b540..3143c39354 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatConfig.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatConfig.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.unix.aix.Perfstat; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_partition_config_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * Utility to query partition config diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatCpu.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatCpu.java index 83569ab5b0..27f842c2fb 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatCpu.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatCpu.java @@ -31,7 +31,7 @@ import com.sun.jna.platform.unix.aix.Perfstat.perfstat_cpu_t; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_cpu_total_t; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_id_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * Utility to query performance stats for cpu diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatDisk.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatDisk.java index ad6a3b4c39..cb3ea2df0b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatDisk.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatDisk.java @@ -30,7 +30,7 @@ import com.sun.jna.platform.unix.aix.Perfstat; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_disk_t; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_id_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * Utility to query performance stats for disk_stats diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatMemory.java index d114f66a45..9f4f718da4 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatMemory.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.unix.aix.Perfstat; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_memory_total_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * Utility to query performance stats for memory diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatNetInterface.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatNetInterface.java index a0b40117bf..3818e20d0a 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatNetInterface.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatNetInterface.java @@ -30,7 +30,7 @@ import com.sun.jna.platform.unix.aix.Perfstat; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_id_t; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_netinterface_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * Utility to query performance stats for network interfaces diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatProcess.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatProcess.java index 2e736806ac..02694a043b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatProcess.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatProcess.java @@ -30,7 +30,7 @@ import com.sun.jna.platform.unix.aix.Perfstat; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_id_t; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_process_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import java.util.Arrays; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatProtocol.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatProtocol.java index 800d34610a..10a79948b6 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatProtocol.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/driver/perfstat/PerfstatProtocol.java @@ -30,7 +30,7 @@ import com.sun.jna.platform.unix.aix.Perfstat; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_id_t; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_protocol_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * Utility to query performance stats for network interfaces diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixBaseboard.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixBaseboard.java index 719a920c77..6d6f883527 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixBaseboard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixBaseboard.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.health.unix.platform.aix.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.builtin.hardware.common.AbstractBaseboard; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixCentralProcessor.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixCentralProcessor.java index 3d4d3fc4a4..2d25efbf65 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixCentralProcessor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixCentralProcessor.java @@ -31,8 +31,8 @@ import com.sun.jna.platform.unix.aix.Perfstat.perfstat_cpu_t; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_cpu_total_t; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_partition_config_t; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.health.Builder; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixComputerSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixComputerSystem.java index 01ef16f6db..e305d8a5e7 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixComputerSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixComputerSystem.java @@ -27,10 +27,10 @@ */ package org.miaixz.bus.health.unix.platform.aix.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixFirmware.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixFirmware.java index eeb2b8ec77..1b4b51fcec 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixFirmware.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixFirmware.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.aix.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.common.AbstractFirmware; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixGlobalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixGlobalMemory.java index ffc56b5446..7d0c584e1b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixGlobalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixGlobalMemory.java @@ -28,8 +28,8 @@ package org.miaixz.bus.health.unix.platform.aix.hardware; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_memory_total_t; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.hardware.PhysicalMemory; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixGraphicsCard.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixGraphicsCard.java index 2326fd33b3..45773a36ff 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixGraphicsCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixGraphicsCard.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.unix.platform.aix.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.hardware.GraphicsCard; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixHWDiskStore.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixHWDiskStore.java index b0c96055cf..e9f5aed583 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixHWDiskStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixHWDiskStore.java @@ -29,8 +29,8 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_disk_t; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.builtin.hardware.HWDiskStore; import org.miaixz.bus.health.builtin.hardware.HWPartition; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixHardwareAbstractionLayer.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixHardwareAbstractionLayer.java index db342aa43f..1a998c29f3 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixHardwareAbstractionLayer.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixHardwareAbstractionLayer.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.aix.hardware; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_disk_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.hardware.*; import org.miaixz.bus.health.builtin.hardware.common.AbstractHardwareAbstractionLayer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixNetworkIF.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixNetworkIF.java index d0242363a6..4c46878d30 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixNetworkIF.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixNetworkIF.java @@ -29,7 +29,7 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_netinterface_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.hardware.NetworkIF; import org.miaixz.bus.health.builtin.hardware.common.AbstractNetworkIF; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixPowerSource.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixPowerSource.java index c0a17b771e..82b0cca39c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixPowerSource.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixPowerSource.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.aix.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.PowerSource; import org.miaixz.bus.health.builtin.hardware.common.AbstractPowerSource; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixSensors.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixSensors.java index 95f772da03..74e71c3f2f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixSensors.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixSensors.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.aix.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.common.AbstractSensors; import java.util.List; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixSoundCard.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixSoundCard.java index 608295402c..11c907716c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixSoundCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixSoundCard.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.unix.platform.aix.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.SoundCard; import org.miaixz.bus.health.builtin.hardware.common.AbstractSoundCard; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixUsbDevice.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixUsbDevice.java index 1390a3424f..8a6c7da18e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixUsbDevice.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixUsbDevice.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.unix.platform.aix.hardware; -import org.miaixz.bus.core.annotation.Immutable; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.UsbDevice; import org.miaixz.bus.health.builtin.hardware.common.AbstractUsbDevice; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixVirtualMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixVirtualMemory.java index 1b263ca3ee..be8a68f184 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixVirtualMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/hardware/AixVirtualMemory.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.aix.hardware; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_memory_total_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.common.AbstractVirtualMemory; import java.util.function.Supplier; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixFileSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixFileSystem.java index dfe448b16f..d0d1893072 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixFileSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixFileSystem.java @@ -27,9 +27,9 @@ */ package org.miaixz.bus.health.unix.platform.aix.software; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Config; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixInternetProtocolStats.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixInternetProtocolStats.java index 6ad2a525eb..05e6a018f9 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixInternetProtocolStats.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixInternetProtocolStats.java @@ -29,7 +29,7 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_protocol_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.software.InternetProtocolStats; import org.miaixz.bus.health.builtin.software.common.AbstractInternetProtocolStats; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixNetworkParams.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixNetworkParams.java index 6bf247630f..50cae617d7 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixNetworkParams.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixNetworkParams.java @@ -29,9 +29,9 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.LibCAPI; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.builtin.software.common.AbstractNetworkParams; import org.miaixz.bus.health.unix.jna.AixLibc; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSFileStore.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSFileStore.java index f27ad6d308..328ad981d7 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSFileStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSFileStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.aix.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSFileStore; import org.miaixz.bus.health.builtin.software.common.AbstractOSFileStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSProcess.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSProcess.java index 51f0d96a4d..19bba9c242 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSProcess.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSProcess.java @@ -30,7 +30,7 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.Resource; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_process_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSThread.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSThread.java index d34a97ba13..ed18f060f9 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSThread.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOSThread.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.aix.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSProcess; import org.miaixz.bus.health.builtin.software.common.AbstractOSThread; import org.miaixz.bus.health.unix.jna.AixLibc; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOperatingSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOperatingSystem.java index 321ee687ba..3ba71a77f1 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOperatingSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/aix/software/AixOperatingSystem.java @@ -30,9 +30,9 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_partition_config_t; import com.sun.jna.platform.unix.aix.Perfstat.perfstat_process_t; -import org.miaixz.bus.core.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/BsdSysctlKit.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/BsdSysctlKit.java index 4db9575674..5c89e6e4da 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/BsdSysctlKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/BsdSysctlKit.java @@ -31,7 +31,7 @@ import com.sun.jna.Native; import com.sun.jna.Structure; import com.sun.jna.platform.unix.LibCAPI.size_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.jna.ByRef; import org.miaixz.bus.health.unix.jna.FreeBsdLibc; import org.miaixz.bus.logger.Logger; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/ProcstatKit.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/ProcstatKit.java index ac081a8598..5aba15878d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/ProcstatKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/ProcstatKit.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/Who.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/Who.java index d630dc9721..2e6bc99a8f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/Who.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/Who.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.freebsd.driver; import com.sun.jna.Native; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.builtin.software.OSSession; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/GeomDiskList.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/GeomDiskList.java index 9384f45862..3dd1178742 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/GeomDiskList.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/GeomDiskList.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.driver.disk; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/GeomPartList.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/GeomPartList.java index eebaa4a357..09daa72eea 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/GeomPartList.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/GeomPartList.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.driver.disk; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/Mount.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/Mount.java index 85a2755890..3deeb59f71 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/Mount.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/driver/disk/Mount.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.driver.disk; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import java.util.HashMap; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdCentralProcessor.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdCentralProcessor.java index 84aadb424c..0d496cf08f 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdCentralProcessor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdCentralProcessor.java @@ -30,7 +30,7 @@ import com.sun.jna.Memory; import com.sun.jna.Native; import com.sun.jna.platform.unix.LibCAPI.size_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdComputerSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdComputerSystem.java index 9f1c1b8662..135783323e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdComputerSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdComputerSystem.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.core.xyz.StringKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdFirmware.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdFirmware.java index 5a134a7661..2c0ea86f8e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdFirmware.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdFirmware.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.core.xyz.StringKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdGlobalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdGlobalMemory.java index d4ca1c1dda..2baaab722a 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdGlobalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdGlobalMemory.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdGraphicsCard.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdGraphicsCard.java index 44233ec58c..1c4025726b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdGraphicsCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdGraphicsCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdHWDiskStore.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdHWDiskStore.java index 16cf81e098..00fba93af2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdHWDiskStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdHWDiskStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Triplet; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdHardwareAbstractionLayer.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdHardwareAbstractionLayer.java index 22298f0dc1..e6107412b1 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdHardwareAbstractionLayer.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdHardwareAbstractionLayer.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.*; import org.miaixz.bus.health.builtin.hardware.common.AbstractHardwareAbstractionLayer; import org.miaixz.bus.health.unix.hardware.BsdNetworkIF; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdPowerSource.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdPowerSource.java index 74b1794df4..1db8f00f8c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdPowerSource.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdPowerSource.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdSensors.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdSensors.java index a0abcbc167..f554faedd6 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdSensors.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdSensors.java @@ -29,7 +29,7 @@ import com.sun.jna.Memory; import com.sun.jna.platform.unix.LibCAPI.size_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.common.AbstractSensors; import org.miaixz.bus.health.builtin.jna.ByRef; import org.miaixz.bus.health.unix.jna.FreeBsdLibc; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdSoundCard.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdSoundCard.java index 4f6a342154..354b70e93d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdSoundCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdSoundCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdUsbDevice.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdUsbDevice.java index cc19257bd8..699dc6777c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdUsbDevice.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdUsbDevice.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdVirtualMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdVirtualMemory.java index bc84430475..9c4f322bbf 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdVirtualMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/hardware/FreeBsdVirtualMemory.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdFileSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdFileSystem.java index d8a72594b5..dac0b114f4 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdFileSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdFileSystem.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdInternetProtocolStats.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdInternetProtocolStats.java index 80d439d757..81bd47fa30 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdInternetProtocolStats.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdInternetProtocolStats.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.freebsd.software; import com.sun.jna.Memory; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdNetworkParams.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdNetworkParams.java index 495b1048f1..da761d1216 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdNetworkParams.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdNetworkParams.java @@ -29,7 +29,7 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.LibCAPI; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.builtin.jna.ByRef; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSFileStore.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSFileStore.java index 3ef7bde7f0..fc50afccd9 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSFileStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSFileStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSFileStore; import org.miaixz.bus.health.builtin.software.common.AbstractOSFileStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSProcess.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSProcess.java index fb100edc07..5ca092c172 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSProcess.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSProcess.java @@ -31,7 +31,7 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.LibCAPI.size_t; import com.sun.jna.platform.unix.Resource; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Builder; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSThread.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSThread.java index 5ecd90d7d5..02611ea159 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSThread.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOSThread.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.freebsd.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOperatingSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOperatingSystem.java index 1f4f16bd4a..d6baa7d270 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOperatingSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/freebsd/software/FreeBsdOperatingSystem.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.freebsd.software; import com.sun.jna.ptr.NativeLongByReference; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.tuple.Pair; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/FstatKit.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/FstatKit.java index e711902e42..552b18ce01 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/FstatKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/FstatKit.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/OpenBsdSysctlKit.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/OpenBsdSysctlKit.java index 751c1dec94..3bcddb10ce 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/OpenBsdSysctlKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/OpenBsdSysctlKit.java @@ -31,7 +31,7 @@ import com.sun.jna.Native; import com.sun.jna.Structure; import com.sun.jna.platform.unix.LibCAPI.size_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.jna.ByRef; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/driver/disk/Disklabel.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/driver/disk/Disklabel.java index d578ec54b6..39b04d1827 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/driver/disk/Disklabel.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/driver/disk/Disklabel.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.driver.disk; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdCentralProcessor.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdCentralProcessor.java index 7e46fd9ee3..53193bd72e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdCentralProcessor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdCentralProcessor.java @@ -29,7 +29,7 @@ import com.sun.jna.Memory; import com.sun.jna.Native; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdComputerSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdComputerSystem.java index a517da3662..8bc35d550c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdComputerSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdComputerSystem.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.hardware.Baseboard; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdFirmware.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdFirmware.java index 067543de74..1417d96148 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdFirmware.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdFirmware.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.core.xyz.StringKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdGlobalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdGlobalMemory.java index 10e0a20699..80d9384999 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdGlobalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdGlobalMemory.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.openbsd.hardware; import com.sun.jna.Memory; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdGraphicsCard.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdGraphicsCard.java index 59fa0fa4ec..62de8a4597 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdGraphicsCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdGraphicsCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.builtin.hardware.GraphicsCard; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdHWDiskStore.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdHWDiskStore.java index 4e2f0df2c3..bee5f8852b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdHWDiskStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdHWDiskStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdHardwareAbstractionLayer.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdHardwareAbstractionLayer.java index 87ea92e0ff..eecc8adfa0 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdHardwareAbstractionLayer.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdHardwareAbstractionLayer.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.*; import org.miaixz.bus.health.builtin.hardware.common.AbstractHardwareAbstractionLayer; import org.miaixz.bus.health.unix.hardware.BsdNetworkIF; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdPowerSource.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdPowerSource.java index 0b217bbb6f..4ef72af84b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdPowerSource.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdPowerSource.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdSensors.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdSensors.java index 717878c61d..c1b7b6f3f0 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdSensors.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdSensors.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdSoundCard.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdSoundCard.java index 76483a67c9..de464532b1 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdSoundCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdSoundCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdUsbDevice.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdUsbDevice.java index b606ab71c5..8456eeb967 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdUsbDevice.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdUsbDevice.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdVirtualMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdVirtualMemory.java index 94726b5317..663e4396f0 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdVirtualMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/hardware/OpenBsdVirtualMemory.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdFileSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdFileSystem.java index 19de0ce81e..676b201d0e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdFileSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdFileSystem.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.Builder; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdInternetProtocolStats.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdInternetProtocolStats.java index bf78dee759..0b3d47af82 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdInternetProtocolStats.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdInternetProtocolStats.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.InternetProtocolStats; import org.miaixz.bus.health.builtin.software.common.AbstractInternetProtocolStats; import org.miaixz.bus.health.unix.driver.NetStat; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdNetworkParams.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdNetworkParams.java index aa775bb844..1005233fe3 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdNetworkParams.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdNetworkParams.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.builtin.software.common.AbstractNetworkParams; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSFileStore.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSFileStore.java index c958883d39..27e48a216e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSFileStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSFileStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSFileStore; import org.miaixz.bus.health.builtin.software.common.AbstractOSFileStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSProcess.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSProcess.java index aed9479667..7ec636057c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSProcess.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSProcess.java @@ -32,7 +32,7 @@ import com.sun.jna.Pointer; import com.sun.jna.platform.unix.LibCAPI.size_t; import com.sun.jna.platform.unix.Resource; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSThread.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSThread.java index d0e07be706..7b2bf615ba 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSThread.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOSThread.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOperatingSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOperatingSystem.java index 60162dd8a0..25526c6683 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOperatingSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/openbsd/software/OpenBsdOperatingSystem.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.openbsd.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.tuple.Pair; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/KstatKit.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/KstatKit.java index ee4b56efd6..8547bb9417 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/KstatKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/KstatKit.java @@ -38,8 +38,8 @@ import com.sun.jna.platform.unix.solaris.LibKstat.Kstat; import com.sun.jna.platform.unix.solaris.LibKstat.KstatCtl; import com.sun.jna.platform.unix.solaris.LibKstat.KstatNamed; -import org.miaixz.bus.core.annotation.GuardedBy; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.GuardedBy; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/PsInfo.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/PsInfo.java index 8723b5a2c2..c454b14a55 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/PsInfo.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/PsInfo.java @@ -32,7 +32,7 @@ import com.sun.jna.Pointer; import com.sun.jna.platform.unix.LibCAPI.size_t; import com.sun.jna.platform.unix.LibCAPI.ssize_t; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Tuple; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/Who.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/Who.java index ca23e7c941..be27ff69cf 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/Who.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/Who.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.solaris.driver; import com.sun.jna.Native; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.builtin.software.OSSession; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Iostat.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Iostat.java index 1d49a69c38..428b45cd65 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Iostat.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Iostat.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.driver.disk; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Lshal.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Lshal.java index 9998bf5421..32e0a437fa 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Lshal.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Lshal.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.driver.disk; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Prtvtoc.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Prtvtoc.java index ad5e31d686..f81b8bb2ef 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Prtvtoc.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/disk/Prtvtoc.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.driver.disk; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/kstat/SystemPages.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/kstat/SystemPages.java index b76dcf42a0..5b19cd5824 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/kstat/SystemPages.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/driver/kstat/SystemPages.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.solaris.driver.kstat; import com.sun.jna.platform.unix.solaris.LibKstat.Kstat; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.unix.platform.solaris.KstatKit; import org.miaixz.bus.health.unix.platform.solaris.KstatKit.KstatChain; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisCentralProcessor.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisCentralProcessor.java index 5679a6d5bf..64bd4b1579 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisCentralProcessor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisCentralProcessor.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.solaris.hardware; import com.sun.jna.platform.unix.solaris.LibKstat.Kstat; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisComputerSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisComputerSystem.java index c22ef20b42..c5f81c383c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisComputerSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisComputerSystem.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisFirmware.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisFirmware.java index fa3f3e2b6f..5a956e2182 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisFirmware.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisFirmware.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.common.AbstractFirmware; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisGlobalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisGlobalMemory.java index 9b6e6b5713..a77dab0c98 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisGlobalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisGlobalMemory.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisGraphicsCard.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisGraphicsCard.java index 0e048e9fdd..ffa6d00a2a 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisGraphicsCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisGraphicsCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisHWDiskStore.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisHWDiskStore.java index a22645a7ab..a73cd73b99 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisHWDiskStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisHWDiskStore.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.unix.solaris.LibKstat.Kstat; import com.sun.jna.platform.unix.solaris.LibKstat.KstatIO; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.tuple.Tuple; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisHardwareAbstractionLayer.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisHardwareAbstractionLayer.java index 8ad59b5d7f..aa1f4e2426 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisHardwareAbstractionLayer.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisHardwareAbstractionLayer.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.*; import org.miaixz.bus.health.builtin.hardware.common.AbstractHardwareAbstractionLayer; import org.miaixz.bus.health.unix.hardware.UnixDisplay; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisNetworkIF.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisNetworkIF.java index 49163fad21..cc594e4e86 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisNetworkIF.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisNetworkIF.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.solaris.hardware; import com.sun.jna.platform.unix.solaris.LibKstat.Kstat; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.NetworkIF; import org.miaixz.bus.health.builtin.hardware.common.AbstractNetworkIF; import org.miaixz.bus.health.unix.platform.solaris.KstatKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisPowerSource.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisPowerSource.java index b34841238b..0635f2946c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisPowerSource.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisPowerSource.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.solaris.hardware; import com.sun.jna.platform.unix.solaris.LibKstat.Kstat; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.builtin.hardware.PowerSource; import org.miaixz.bus.health.builtin.hardware.common.AbstractPowerSource; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisSensors.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisSensors.java index 2b0c6e5cb1..c6f270f1de 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisSensors.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisSensors.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisSoundCard.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisSoundCard.java index 798c828012..3dc9387139 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisSoundCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisSoundCard.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisUsbDevice.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisUsbDevice.java index bd07add94f..9fb6843027 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisUsbDevice.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisUsbDevice.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.hardware; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisVirtualMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisVirtualMemory.java index adc96aa4c1..c21924d32d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisVirtualMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/hardware/SolarisVirtualMemory.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisFileSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisFileSystem.java index 8beb36b738..8e2a554188 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisFileSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisFileSystem.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.solaris.software; import com.sun.jna.platform.unix.solaris.LibKstat.Kstat; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Pair; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisInternetProtocolStats.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisInternetProtocolStats.java index 00b2fa2963..96a2cb4862 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisInternetProtocolStats.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisInternetProtocolStats.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisNetworkParams.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisNetworkParams.java index e7264b7a4e..3cbff37074 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisNetworkParams.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisNetworkParams.java @@ -29,7 +29,7 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.LibCAPI; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Executor; import org.miaixz.bus.health.builtin.software.common.AbstractNetworkParams; import org.miaixz.bus.health.unix.jna.SolarisLibc; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSFileStore.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSFileStore.java index 41f889c509..34823cf5ec 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSFileStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSFileStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.unix.platform.solaris.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSFileStore; import org.miaixz.bus.health.builtin.software.common.AbstractOSFileStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSProcess.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSProcess.java index 42d569e7a6..b5be7aa8d5 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSProcess.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSProcess.java @@ -29,7 +29,7 @@ import com.sun.jna.Native; import com.sun.jna.platform.unix.Resource; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSThread.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSThread.java index c68be70de1..126f13ff6d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSThread.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOSThread.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.unix.platform.solaris.software; import com.sun.jna.Pointer; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOperatingSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOperatingSystem.java index e64e7bf5cf..fd7859d30d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOperatingSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/unix/platform/solaris/software/SolarisOperatingSystem.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.unix.solaris.Kstat2; import com.sun.jna.platform.unix.solaris.LibKstat.Kstat; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterQuery.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterQuery.java index d64cceea6b..165d8a66c1 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterQuery.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterQuery.java @@ -34,7 +34,7 @@ import com.sun.jna.platform.win32.PdhUtil.PdhException; import com.sun.jna.platform.win32.VersionHelpers; import com.sun.jna.platform.win32.Win32Exception; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.logger.Logger; import java.util.*; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterQueryHandler.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterQueryHandler.java index e274cc97a7..7dcf158a04 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterQueryHandler.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterQueryHandler.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows; -import org.miaixz.bus.core.annotation.NotThreadSafe; +import org.miaixz.bus.core.lang.annotation.NotThreadSafe; import org.miaixz.bus.health.Formats; import org.miaixz.bus.health.builtin.jna.ByRef; import org.miaixz.bus.health.windows.PerfDataKit.PerfCounter; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterWildcardQuery.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterWildcardQuery.java index f6323ac65b..e2e13b9f7e 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterWildcardQuery.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfCounterWildcardQuery.java @@ -33,7 +33,7 @@ import com.sun.jna.platform.win32.PdhUtil; import com.sun.jna.platform.win32.PdhUtil.PdhEnumObjectItems; import com.sun.jna.platform.win32.PdhUtil.PdhException; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Builder; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfDataKit.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfDataKit.java index 78c486846e..e85f8a57ed 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfDataKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/PerfDataKit.java @@ -35,8 +35,8 @@ import com.sun.jna.platform.win32.WinDef.DWORDByReference; import com.sun.jna.platform.win32.WinError; import com.sun.jna.platform.win32.WinNT.HANDLEByReference; -import org.miaixz.bus.core.annotation.Immutable; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Builder; import org.miaixz.bus.health.Formats; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/WmiKit.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/WmiKit.java index 766c2fbd9f..4e2de64c02 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/WmiKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/WmiKit.java @@ -31,7 +31,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; import com.sun.jna.platform.win32.Variant; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Builder; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/WmiQueryHandler.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/WmiQueryHandler.java index ec4f0e8571..c8bf24b52c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/WmiQueryHandler.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/WmiQueryHandler.java @@ -34,7 +34,7 @@ import com.sun.jna.platform.win32.Ole32; import com.sun.jna.platform.win32.WinError; import com.sun.jna.platform.win32.WinNT; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Config; import org.miaixz.bus.logger.Logger; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/DeviceTree.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/DeviceTree.java index 289af3287e..61d65ef161 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/DeviceTree.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/DeviceTree.java @@ -32,7 +32,7 @@ import com.sun.jna.platform.win32.Guid.GUID; import com.sun.jna.platform.win32.WinNT.HANDLE; import com.sun.jna.ptr.IntByReference; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.health.builtin.jna.ByRef; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/EnumWindows.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/EnumWindows.java index a3bf2e1637..f2c4576ad2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/EnumWindows.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/EnumWindows.java @@ -33,7 +33,7 @@ import com.sun.jna.platform.win32.User32; import com.sun.jna.platform.win32.WinDef.DWORD; import com.sun.jna.platform.win32.WinDef.HWND; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.jna.ByRef; import org.miaixz.bus.health.builtin.software.OSDesktopWindow; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/LogicalProcessorInformation.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/LogicalProcessorInformation.java index e2df7732c6..223e913920 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/LogicalProcessorInformation.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/LogicalProcessorInformation.java @@ -32,7 +32,7 @@ import com.sun.jna.platform.win32.VersionHelpers; import com.sun.jna.platform.win32.WinNT; import com.sun.jna.platform.win32.WinNT.*; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.builtin.hardware.CentralProcessor; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/LoadAverage.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/LoadAverage.java index b29974ab04..4ddabaaac9 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/LoadAverage.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/LoadAverage.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.driver.perfmon; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import java.util.Arrays; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/MemoryInformation.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/MemoryInformation.java index ee4c9f9d8e..46df37b661 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/MemoryInformation.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/MemoryInformation.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.driver.perfmon; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.PerfCounterQuery; import java.util.Collections; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PagingFile.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PagingFile.java index 501515ec14..4991c8b8cb 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PagingFile.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PagingFile.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.driver.perfmon; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.PerfCounterQuery; import java.util.Collections; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PerfmonConsts.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PerfmonConsts.java index 8daaeb1ace..9ba1841df6 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PerfmonConsts.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PerfmonConsts.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.driver.perfmon; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; /** * Constants used in Perfmon driver classes diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PerfmonDisabled.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PerfmonDisabled.java index 7a05a6c26f..ed419af7a5 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PerfmonDisabled.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PerfmonDisabled.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.Advapi32Util; import com.sun.jna.platform.win32.WinReg; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.health.Config; import org.miaixz.bus.logger.Logger; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PhysicalDisk.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PhysicalDisk.java index a3dcf06728..38daf2e9cf 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PhysicalDisk.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/PhysicalDisk.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.driver.perfmon; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.windows.PerfCounterQuery; import org.miaixz.bus.health.windows.PerfCounterWildcardQuery; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ProcessInformation.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ProcessInformation.java index d2447f2e5d..6d561a5d29 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ProcessInformation.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ProcessInformation.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.driver.perfmon; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.windows.PerfCounterQuery; import org.miaixz.bus.health.windows.PerfCounterWildcardQuery; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ProcessorInformation.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ProcessorInformation.java index cc72d26d48..c74e4df0ce 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ProcessorInformation.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ProcessorInformation.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.windows.driver.perfmon; import com.sun.jna.platform.win32.VersionHelpers; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.windows.PerfCounterQuery; import org.miaixz.bus.health.windows.PerfCounterWildcardQuery; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/SystemInformation.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/SystemInformation.java index de59fa4f99..e091bbe3b3 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/SystemInformation.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/SystemInformation.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.driver.perfmon; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.PerfCounterQuery; import java.util.Collections; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ThreadInformation.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ThreadInformation.java index c90974151d..8736065a39 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ThreadInformation.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/perfmon/ThreadInformation.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.driver.perfmon; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.windows.PerfCounterQuery; import org.miaixz.bus.health.windows.PerfCounterWildcardQuery; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/HkeyPerformanceDataKit.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/HkeyPerformanceDataKit.java index 8e8f000b1c..1c1ad28019 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/HkeyPerformanceDataKit.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/HkeyPerformanceDataKit.java @@ -31,7 +31,7 @@ import com.sun.jna.platform.win32.*; import com.sun.jna.platform.win32.WinBase.FILETIME; import com.sun.jna.platform.win32.WinPerf.*; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.builtin.jna.ByRef; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/HkeyUserData.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/HkeyUserData.java index a6a5172514..7c8d705020 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/HkeyUserData.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/HkeyUserData.java @@ -34,7 +34,7 @@ import com.sun.jna.platform.win32.WinNT; import com.sun.jna.platform.win32.WinReg; import com.sun.jna.platform.win32.WinReg.HKEY; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSSession; import org.miaixz.bus.logger.Logger; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/NetSessionData.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/NetSessionData.java index 3a7d8978a0..10cf7d35ea 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/NetSessionData.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/NetSessionData.java @@ -30,7 +30,7 @@ import com.sun.jna.Pointer; import com.sun.jna.platform.win32.Netapi32; import com.sun.jna.platform.win32.Netapi32.SESSION_INFO_10; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.jna.ByRef; import org.miaixz.bus.health.builtin.software.OSSession; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ProcessPerformanceData.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ProcessPerformanceData.java index 0068b69f2e..c46148c5f2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ProcessPerformanceData.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ProcessPerformanceData.java @@ -28,8 +28,8 @@ package org.miaixz.bus.health.windows.driver.registry; import com.sun.jna.platform.win32.WinBase; -import org.miaixz.bus.core.annotation.Immutable; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.Config; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ProcessWtsData.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ProcessWtsData.java index f673035a2a..36b5f4d20d 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ProcessWtsData.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ProcessWtsData.java @@ -33,8 +33,8 @@ import com.sun.jna.platform.win32.VersionHelpers; import com.sun.jna.platform.win32.Wtsapi32; import com.sun.jna.platform.win32.Wtsapi32.WTS_PROCESS_INFO_EX; -import org.miaixz.bus.core.annotation.Immutable; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.builtin.jna.ByRef; import org.miaixz.bus.health.windows.WmiKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/SessionWtsData.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/SessionWtsData.java index 9865196098..f0a29d1fb8 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/SessionWtsData.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/SessionWtsData.java @@ -32,7 +32,7 @@ import com.sun.jna.platform.win32.Wtsapi32.WTSINFO; import com.sun.jna.platform.win32.Wtsapi32.WTS_CLIENT_ADDRESS; import com.sun.jna.platform.win32.Wtsapi32.WTS_SESSION_INFO; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.jna.ByRef; import org.miaixz.bus.health.builtin.software.OSSession; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ThreadPerformanceData.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ThreadPerformanceData.java index 336731fc96..3813a811e2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ThreadPerformanceData.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/registry/ThreadPerformanceData.java @@ -28,8 +28,8 @@ package org.miaixz.bus.health.windows.driver.registry; import com.sun.jna.platform.win32.WinBase.FILETIME; -import org.miaixz.bus.core.annotation.Immutable; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.core.xyz.StringKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/MSAcpiThermalZoneTemperature.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/MSAcpiThermalZoneTemperature.java index 3088aeec91..eb107e7824 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/MSAcpiThermalZoneTemperature.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/MSAcpiThermalZoneTemperature.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/MSFTStorage.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/MSFTStorage.java index f492f8587f..66b272a963 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/MSFTStorage.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/MSFTStorage.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/OhmHardware.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/OhmHardware.java index 6ab37a1787..1a6189deb0 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/OhmHardware.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/OhmHardware.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiKit; import org.miaixz.bus.health.windows.WmiQueryHandler; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/OhmSensor.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/OhmSensor.java index b927348f55..1831e028fc 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/OhmSensor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/OhmSensor.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiKit; import org.miaixz.bus.health.windows.WmiQueryHandler; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32BaseBoard.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32BaseBoard.java index bf899cc1c0..1a62ab4bf1 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32BaseBoard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32BaseBoard.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Bios.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Bios.java index 666676eef3..0f1b879d66 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Bios.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Bios.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ComputerSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ComputerSystem.java index 1ba0c37efa..3905baf3e2 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ComputerSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ComputerSystem.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ComputerSystemProduct.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ComputerSystemProduct.java index b2901217e0..5a86047201 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ComputerSystemProduct.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ComputerSystemProduct.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskDrive.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskDrive.java index f2db87f8fd..b140f3713b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskDrive.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskDrive.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskDriveToDiskPartition.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskDriveToDiskPartition.java index a33ce4e187..62bb80f814 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskDriveToDiskPartition.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskDriveToDiskPartition.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskPartition.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskPartition.java index 4f7f073e38..8c3df6c4a7 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskPartition.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32DiskPartition.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Fan.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Fan.java index d99f231b40..b161522f58 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Fan.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Fan.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32LogicalDisk.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32LogicalDisk.java index 3d165ad280..99a2834eed 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32LogicalDisk.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32LogicalDisk.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32LogicalDiskToPartition.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32LogicalDiskToPartition.java index 19b46cd17f..af3c2c8c70 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32LogicalDiskToPartition.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32LogicalDiskToPartition.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; /** diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32OperatingSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32OperatingSystem.java index 5b82a55e00..93667888b5 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32OperatingSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32OperatingSystem.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32PhysicalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32PhysicalMemory.java index b9c32a5ce2..ba544b7661 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32PhysicalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32PhysicalMemory.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Process.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Process.java index 4195e023f8..5e36d31f19 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Process.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Process.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Collection; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ProcessCached.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ProcessCached.java index bef126bcc0..2c05ac9bbf 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ProcessCached.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32ProcessCached.java @@ -28,8 +28,8 @@ package org.miaixz.bus.health.windows.driver.wmi; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.GuardedBy; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.GuardedBy; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Processor.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Processor.java index 7f2cf7aced..2d505b32c6 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Processor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32Processor.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32VideoController.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32VideoController.java index 956b8aa7fc..4d6c65addb 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32VideoController.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/driver/wmi/Win32VideoController.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.windows.WmiQueryHandler; import java.util.Objects; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsBaseboard.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsBaseboard.java index 7903307803..e8dd794a3c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsBaseboard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsBaseboard.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.windows.hardware; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.core.xyz.StringKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsCentralProcessor.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsCentralProcessor.java index c0575d8a01..c2c5634347 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsCentralProcessor.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsCentralProcessor.java @@ -33,7 +33,7 @@ import com.sun.jna.platform.win32.VersionHelpers; import com.sun.jna.platform.win32.Win32Exception; import com.sun.jna.platform.win32.WinReg; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsComputerSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsComputerSystem.java index d63d240efc..468b157718 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsComputerSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsComputerSystem.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.windows.hardware; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.xyz.StringKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsDisplay.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsDisplay.java index dd836d887c..dd166eb289 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsDisplay.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsDisplay.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.windows.hardware; import com.sun.jna.platform.win32.*; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.health.builtin.hardware.Display; import org.miaixz.bus.health.builtin.hardware.common.AbstractDisplay; import org.miaixz.bus.health.builtin.jna.ByRef; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsFirmware.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsFirmware.java index 118cbbedf7..7807727bd8 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsFirmware.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsFirmware.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.windows.hardware; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Tuple; import org.miaixz.bus.core.xyz.StringKit; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsGlobalMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsGlobalMemory.java index ad2cd3a55d..beeb2755a0 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsGlobalMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsGlobalMemory.java @@ -31,7 +31,7 @@ import com.sun.jna.platform.win32.Kernel32; import com.sun.jna.platform.win32.Psapi; import com.sun.jna.platform.win32.VersionHelpers; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.Memoizer; import org.miaixz.bus.health.builtin.hardware.PhysicalMemory; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsGraphicsCard.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsGraphicsCard.java index b9c992235e..6d5b9270a9 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsGraphicsCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsGraphicsCard.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.*; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.tuple.Triplet; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsHWDiskStore.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsHWDiskStore.java index c0bf86848b..e7b1d1fad8 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsHWDiskStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsHWDiskStore.java @@ -30,7 +30,7 @@ import com.sun.jna.platform.win32.COM.COMException; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; import com.sun.jna.platform.win32.Kernel32; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsHardwareAbstractionLayer.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsHardwareAbstractionLayer.java index f0cf8329d6..6944370bb3 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsHardwareAbstractionLayer.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsHardwareAbstractionLayer.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.hardware; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.*; import org.miaixz.bus.health.builtin.hardware.common.AbstractHardwareAbstractionLayer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsNetworkIF.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsNetworkIF.java index 0b224ce23e..cfa0619a57 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsNetworkIF.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsNetworkIF.java @@ -30,7 +30,7 @@ import com.sun.jna.Native; import com.sun.jna.platform.win32.IPHlpAPI; import com.sun.jna.platform.win32.VersionHelpers; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.hardware.NetworkIF; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsPowerSource.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsPowerSource.java index bc20638920..a7716aff81 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsPowerSource.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsPowerSource.java @@ -32,7 +32,7 @@ import com.sun.jna.Platform; import com.sun.jna.platform.win32.*; import com.sun.jna.win32.W32APITypeMapper; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.health.builtin.hardware.PowerSource; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsSensors.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsSensors.java index 256dee1074..6c19582799 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsSensors.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsSensors.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.COM.COMException; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.hardware.common.AbstractSensors; import org.miaixz.bus.health.windows.WmiKit; import org.miaixz.bus.health.windows.WmiQueryHandler; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsSoundCard.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsSoundCard.java index 451a2ac341..941d62cd64 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsSoundCard.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsSoundCard.java @@ -31,7 +31,7 @@ import com.sun.jna.platform.win32.Win32Exception; import com.sun.jna.platform.win32.WinError; import com.sun.jna.platform.win32.WinReg; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.builtin.hardware.SoundCard; import org.miaixz.bus.health.builtin.hardware.common.AbstractSoundCard; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsUsbDevice.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsUsbDevice.java index 2ce15b95cd..5e1bc78f62 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsUsbDevice.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsUsbDevice.java @@ -28,7 +28,7 @@ package org.miaixz.bus.health.windows.hardware; import com.sun.jna.platform.win32.Guid.GUID; -import org.miaixz.bus.core.annotation.Immutable; +import org.miaixz.bus.core.lang.annotation.Immutable; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.tuple.Triplet; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsVirtualMemory.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsVirtualMemory.java index f72920687f..bccfc4a4f6 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsVirtualMemory.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/hardware/WindowsVirtualMemory.java @@ -29,7 +29,7 @@ import com.sun.jna.platform.win32.Kernel32; import com.sun.jna.platform.win32.Psapi; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Triplet; import org.miaixz.bus.health.Memoizer; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsFileSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsFileSystem.java index 32675dad84..a5a948502b 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsFileSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsFileSystem.java @@ -32,7 +32,7 @@ import com.sun.jna.platform.win32.Kernel32; import com.sun.jna.platform.win32.WinBase; import com.sun.jna.platform.win32.WinNT; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.health.Parsing; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsInternetProtocolStats.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsInternetProtocolStats.java index 23706d0181..56695dfc2c 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsInternetProtocolStats.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsInternetProtocolStats.java @@ -31,7 +31,7 @@ import com.sun.jna.platform.win32.IPHlpAPI; import com.sun.jna.platform.win32.VersionHelpers; import com.sun.jna.platform.win32.WinError; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.Parsing; import org.miaixz.bus.health.builtin.jna.ByRef; import org.miaixz.bus.health.builtin.jna.Struct; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsNetworkParams.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsNetworkParams.java index fb4739e85e..7ba473b8e4 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsNetworkParams.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsNetworkParams.java @@ -32,7 +32,7 @@ import com.sun.jna.platform.win32.*; import com.sun.jna.platform.win32.IPHlpAPI.FIXED_INFO; import com.sun.jna.platform.win32.IPHlpAPI.IP_ADDR_STRING; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.center.regex.Pattern; import org.miaixz.bus.core.lang.Charset; import org.miaixz.bus.core.lang.Normal; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSFileStore.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSFileStore.java index db3934a09b..90f1436766 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSFileStore.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSFileStore.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSFileStore; import org.miaixz.bus.health.builtin.software.common.AbstractOSFileStore; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSProcess.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSProcess.java index 7e8c408f09..29092f14ad 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSProcess.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSProcess.java @@ -33,7 +33,7 @@ import com.sun.jna.platform.win32.Advapi32Util.Account; import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult; import com.sun.jna.platform.win32.WinNT.HANDLE; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.tuple.Pair; import org.miaixz.bus.core.lang.tuple.Triplet; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSThread.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSThread.java index 6ad8c592da..eb747143a4 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSThread.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOSThread.java @@ -27,7 +27,7 @@ */ package org.miaixz.bus.health.windows.software; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.health.builtin.software.OSProcess; import org.miaixz.bus.health.builtin.software.common.AbstractOSThread; import org.miaixz.bus.health.windows.driver.registry.ThreadPerformanceData; diff --git a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOperatingSystem.java b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOperatingSystem.java index 3ec264dac3..296a6736b9 100644 --- a/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOperatingSystem.java +++ b/bus-health/src/main/java/org/miaixz/bus/health/windows/software/WindowsOperatingSystem.java @@ -35,7 +35,7 @@ import com.sun.jna.platform.win32.WinDef.DWORD; import com.sun.jna.platform.win32.WinNT.HANDLE; import com.sun.jna.platform.win32.WinNT.LUID; -import org.miaixz.bus.core.annotation.ThreadSafe; +import org.miaixz.bus.core.lang.annotation.ThreadSafe; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.tuple.Pair; diff --git a/bus-limiter/src/main/java/org/miaixz/bus/limiter/Builder.java b/bus-limiter/src/main/java/org/miaixz/bus/limiter/Builder.java index ca57421296..9c222c14ba 100644 --- a/bus-limiter/src/main/java/org/miaixz/bus/limiter/Builder.java +++ b/bus-limiter/src/main/java/org/miaixz/bus/limiter/Builder.java @@ -28,6 +28,7 @@ package org.miaixz.bus.limiter; import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.lang.reflect.JdkProxy; import java.lang.reflect.Method; import java.util.Map; @@ -45,21 +46,13 @@ public class Builder { private static final Object LOCK = new Object(); public static Class getUserClass(Class clazz) { - if (isCglibProxyClass(clazz)) { + if (JdkProxy.isCglibProxyClass(clazz)) { Class superclass = clazz.getSuperclass(); return getUserClass(superclass); } return clazz; } - public static boolean isCglibProxyClass(Class clazz) { - return (clazz != null && isCglibProxyClassName(clazz.getName())); - } - - private static boolean isCglibProxyClassName(String className) { - return (className != null && className.contains("$$")); - } - /** * 解析并解析方法名,然后缓存到map中 * diff --git a/bus-mapper/src/main/java/org/miaixz/bus/mapper/builder/resolve/DefaultEntityResolve.java b/bus-mapper/src/main/java/org/miaixz/bus/mapper/builder/resolve/DefaultEntityResolve.java index e28029714e..32989b5804 100644 --- a/bus-mapper/src/main/java/org/miaixz/bus/mapper/builder/resolve/DefaultEntityResolve.java +++ b/bus-mapper/src/main/java/org/miaixz/bus/mapper/builder/resolve/DefaultEntityResolve.java @@ -30,7 +30,7 @@ import jakarta.persistence.*; import org.apache.ibatis.type.JdbcType; import org.apache.ibatis.type.UnknownTypeHandler; -import org.miaixz.bus.core.annotation.Order; +import org.miaixz.bus.core.lang.annotation.Order; import org.miaixz.bus.core.lang.EnumMap; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; diff --git a/bus-oauth/pom.xml b/bus-oauth/pom.xml index 967d935a94..2c4f324a30 100755 --- a/bus-oauth/pom.xml +++ b/bus-oauth/pom.xml @@ -73,7 +73,7 @@ 21 1.18.34 1.78.1 - 2.0.49 + 2.0.51 4.39.42.ALL diff --git a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/amazon/AmazonProvider.java b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/amazon/AmazonProvider.java index ac2568085f..e719a06f1a 100644 --- a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/amazon/AmazonProvider.java +++ b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/amazon/AmazonProvider.java @@ -31,6 +31,7 @@ import org.miaixz.bus.cache.metric.ExtendCache; import org.miaixz.bus.core.basics.entity.Message; import org.miaixz.bus.core.codec.binary.Base64; +import org.miaixz.bus.core.lang.Algorithm; import org.miaixz.bus.core.lang.Gender; import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.Symbol; @@ -90,11 +91,11 @@ public static String newStringUsAscii(byte[] bytes) { return new String(bytes, StandardCharsets.US_ASCII); } - public static byte[] digest(String str) { + public static byte[] digest(String text) { MessageDigest messageDigest; try { - messageDigest = MessageDigest.getInstance("SHA-256"); - messageDigest.update(str.getBytes(StandardCharsets.UTF_8)); + messageDigest = MessageDigest.getInstance(Algorithm.SHA256.getValue()); + messageDigest.update(text.getBytes(StandardCharsets.UTF_8)); return messageDigest.digest(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); diff --git a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/twitter/TwitterProvider.java b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/twitter/TwitterProvider.java index 76ab4a1e17..a1b6e6adc2 100644 --- a/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/twitter/TwitterProvider.java +++ b/bus-oauth/src/main/java/org/miaixz/bus/oauth/metric/twitter/TwitterProvider.java @@ -99,8 +99,9 @@ public static String generateNonce(int len) { */ public static String sign(Map params, String method, String baseUrl, String apiSecret, String tokenSecret) { TreeMap map = new TreeMap<>(params); - String str = Builder.parseMapToString(map, true); - String baseStr = method.toUpperCase() + Symbol.AND + UrlEncoder.encodeAll(baseUrl) + Symbol.AND + UrlEncoder.encodeAll(str); + + String text = Builder.parseMapToString(map, true); + String baseStr = method.toUpperCase() + Symbol.AND + UrlEncoder.encodeAll(baseUrl) + Symbol.AND + UrlEncoder.encodeAll(text); String signKey = apiSecret + Symbol.AND + (StringKit.isEmpty(tokenSecret) ? "" : tokenSecret); byte[] signature = Builder.sign(signKey.getBytes(Charset.UTF_8), baseStr.getBytes(Charset.UTF_8), Algorithm.HMACSHA1.getValue()); diff --git a/bus-office/pom.xml b/bus-office/pom.xml index 3d83c73a7b..3fa8f08259 100755 --- a/bus-office/pom.xml +++ b/bus-office/pom.xml @@ -71,8 +71,8 @@ UTF-8 21 21 - 5.2.5 - 2.2.13 + 5.3.0 + 2.3.1 diff --git a/bus-office/src/main/java/org/miaixz/bus/office/excel/RowKit.java b/bus-office/src/main/java/org/miaixz/bus/office/excel/RowKit.java index 2e88807035..43c73a7ca0 100644 --- a/bus-office/src/main/java/org/miaixz/bus/office/excel/RowKit.java +++ b/bus-office/src/main/java/org/miaixz/bus/office/excel/RowKit.java @@ -33,7 +33,7 @@ import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeUtil; import org.miaixz.bus.core.xyz.ListKit; -import org.miaixz.bus.core.xyz.StringKit; +import org.miaixz.bus.core.xyz.ObjectKit; import org.miaixz.bus.office.excel.cell.CellEditor; import org.miaixz.bus.office.excel.cell.CellKit; import org.miaixz.bus.office.excel.style.StyleSet; @@ -100,7 +100,7 @@ public static List readRow(final Row row, final int startCellNumInclude, boolean isAllNull = true; for (int i = startCellNumInclude; i < size; i++) { cellValue = CellKit.getCellValue(CellKit.getCell(row, i), cellEditor); - isAllNull &= StringKit.isEmptyIfString(cellValue); + isAllNull &= ObjectKit.isEmptyIfString(cellValue); cellValues.add(cellValue); } diff --git a/bus-office/src/main/java/org/miaixz/bus/office/excel/cell/setters/EscapeStrCellSetter.java b/bus-office/src/main/java/org/miaixz/bus/office/excel/cell/setters/EscapeStrCellSetter.java index 1284da4d9b..b80e4bf7fb 100644 --- a/bus-office/src/main/java/org/miaixz/bus/office/excel/cell/setters/EscapeStrCellSetter.java +++ b/bus-office/src/main/java/org/miaixz/bus/office/excel/cell/setters/EscapeStrCellSetter.java @@ -50,7 +50,7 @@ public class EscapeStrCellSetter extends CharSequenceCellSetter { * @param value 值 */ public EscapeStrCellSetter(final CharSequence value) { - super(escape(StringKit.toString(value))); + super(escape(StringKit.toStringOrNull(value))); } /** diff --git a/bus-parent/pom.xml b/bus-parent/pom.xml index 7b828fe586..0fd283693d 100755 --- a/bus-parent/pom.xml +++ b/bus-parent/pom.xml @@ -90,7 +90,7 @@ 2.2 1.9.22 1.78.1 - 2.0.49 + 2.0.51 2.11.0 2.17.2 1.1.8 @@ -121,8 +121,8 @@ 1.12.23 3.5.16 3.0.3 - 5.2.5 - 2.2.13 + 5.3.0 + 2.3.1 4.9 5.1.0 1.2.23 diff --git a/bus-pay/src/main/java/org/miaixz/bus/pay/Builder.java b/bus-pay/src/main/java/org/miaixz/bus/pay/Builder.java index 0cf3883c9d..f862afaf2e 100644 --- a/bus-pay/src/main/java/org/miaixz/bus/pay/Builder.java +++ b/bus-pay/src/main/java/org/miaixz/bus/pay/Builder.java @@ -379,8 +379,8 @@ public static String buildSignMessage(ArrayList signMessage) { return null; } StringBuilder sbf = new StringBuilder(); - for (String str : signMessage) { - sbf.append(str).append("\n"); + for (String text : signMessage) { + sbf.append(text).append("\n"); } return sbf.toString(); } diff --git a/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java b/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java index 82b6d8d127..ba38ce7307 100644 --- a/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java +++ b/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java @@ -362,16 +362,16 @@ public static String bizPayUrl(String partnerKey, String appId, String mchId, St /** * 替换url中的参数 * - * @param str 原始字符串 + * @param text 原始字符串 * @param regex 表达式 * @param args 替换字符串 * @return {String} */ - public static String replace(String str, String regex, String... args) { + public static String replace(String text, String regex, String... args) { for (String arg : args) { - str = str.replaceFirst(regex, arg); + text = text.replaceFirst(regex, arg); } - return str; + return text; } /** diff --git a/bus-sensitive/pom.xml b/bus-sensitive/pom.xml index a9612254e7..e308555f56 100755 --- a/bus-sensitive/pom.xml +++ b/bus-sensitive/pom.xml @@ -72,7 +72,7 @@ 21 21 1.18.34 - 2.0.49 + 2.0.51 diff --git a/bus-setting/src/main/java/org/miaixz/bus/setting/magic/AbstractSetting.java b/bus-setting/src/main/java/org/miaixz/bus/setting/magic/AbstractSetting.java index 566a48ceca..c6a007529d 100644 --- a/bus-setting/src/main/java/org/miaixz/bus/setting/magic/AbstractSetting.java +++ b/bus-setting/src/main/java/org/miaixz/bus/setting/magic/AbstractSetting.java @@ -30,7 +30,7 @@ import org.miaixz.bus.core.beans.copier.CopyOptions; import org.miaixz.bus.core.beans.copier.ValueProvider; import org.miaixz.bus.core.center.function.FunctionX; -import org.miaixz.bus.core.center.function.LambdaInfo; +import org.miaixz.bus.core.center.function.LambdaX; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.lang.getter.GroupedTypeGetter; @@ -74,8 +74,8 @@ public Object getObject(final CharSequence key, final Object defaultValue) { * @return 获取表达式对应属性和返回的对象 */ public T get(final FunctionX func) { - final LambdaInfo lambdaInfo = LambdaKit.resolve(func); - return get(lambdaInfo.getFieldName(), lambdaInfo.getReturnType()); + final LambdaX lambdaX = LambdaKit.resolve(func); + return get(lambdaX.getFieldName(), lambdaX.getReturnType()); } /** diff --git a/bus-setting/src/main/java/org/miaixz/bus/setting/magic/GroupedMap.java b/bus-setting/src/main/java/org/miaixz/bus/setting/magic/GroupedMap.java index ef86ca910f..4a7bedc758 100644 --- a/bus-setting/src/main/java/org/miaixz/bus/setting/magic/GroupedMap.java +++ b/bus-setting/src/main/java/org/miaixz/bus/setting/magic/GroupedMap.java @@ -62,9 +62,9 @@ public class GroupedMap extends LinkedHashMap map = this.get(StringKit.emptyIfNull(group)); + final LinkedHashMap map = this.get(StringKit.toStringOrEmpty(group)); if (MapKit.isNotEmpty(map)) { - return map.get(StringKit.toString(key)); + return map.get(StringKit.toStringOrNull(key)); } } finally { readLock.unlock(); @@ -112,7 +112,7 @@ public int size() { * @return 此key之前存在的值,如果没有返回null */ public String put(String group, final String key, final String value) { - group = StringKit.emptyIfNull(group).trim(); + group = StringKit.toStringOrEmpty(group).trim(); writeLock.lock(); try { final LinkedHashMap valueMap = this.computeIfAbsent(group, k -> new LinkedHashMap<>()); @@ -145,7 +145,7 @@ public GroupedMap putAll(final String group, final Map valueMap = this.get(group); @@ -165,7 +165,7 @@ public String remove(String group, final String key) { * @return 是否为空 */ public boolean isEmpty(String group) { - group = StringKit.emptyIfNull(group).trim(); + group = StringKit.toStringOrEmpty(group).trim(); readLock.lock(); try { final LinkedHashMap valueMap = this.get(group); @@ -196,7 +196,7 @@ public boolean isEmpty() { * @return 是否包含key */ public boolean containsKey(String group, final String key) { - group = StringKit.emptyIfNull(group).trim(); + group = StringKit.toStringOrEmpty(group).trim(); readLock.lock(); try { final LinkedHashMap valueMap = this.get(group); @@ -217,7 +217,7 @@ public boolean containsKey(String group, final String key) { * @return 是否包含值 */ public boolean containsValue(String group, final String value) { - group = StringKit.emptyIfNull(group).trim(); + group = StringKit.toStringOrEmpty(group).trim(); readLock.lock(); try { final LinkedHashMap valueMap = this.get(group); @@ -237,7 +237,7 @@ public boolean containsValue(String group, final String value) { * @return this */ public GroupedMap clear(String group) { - group = StringKit.emptyIfNull(group).trim(); + group = StringKit.toStringOrEmpty(group).trim(); writeLock.lock(); try { final LinkedHashMap valueMap = this.get(group); @@ -267,7 +267,7 @@ public Set keySet() { * @return 键Set */ public Set keySet(String group) { - group = StringKit.emptyIfNull(group).trim(); + group = StringKit.toStringOrEmpty(group).trim(); readLock.lock(); try { final LinkedHashMap valueMap = this.get(group); @@ -287,7 +287,7 @@ public Set keySet(String group) { * @return 值 */ public Collection values(String group) { - group = StringKit.emptyIfNull(group).trim(); + group = StringKit.toStringOrEmpty(group).trim(); readLock.lock(); try { final LinkedHashMap valueMap = this.get(group); @@ -317,7 +317,7 @@ public Set>> entrySet( * @return 键值对 */ public Set> entrySet(String group) { - group = StringKit.emptyIfNull(group).trim(); + group = StringKit.toStringOrEmpty(group).trim(); readLock.lock(); try { final LinkedHashMap valueMap = this.get(group); diff --git a/bus-setting/src/main/java/org/miaixz/bus/setting/magic/Profile.java b/bus-setting/src/main/java/org/miaixz/bus/setting/magic/Profile.java index e1f5cadd2d..353b83ad45 100644 --- a/bus-setting/src/main/java/org/miaixz/bus/setting/magic/Profile.java +++ b/bus-setting/src/main/java/org/miaixz/bus/setting/magic/Profile.java @@ -171,7 +171,7 @@ public Profile clear() { */ private String fixNameForProfile(final String name) { Assert.notBlank(name, "Setting name must be not blank !"); - final String actralProfile = StringKit.emptyIfNull(this.profile); + final String actralProfile = StringKit.toStringOrEmpty(this.profile); if (!name.contains(Symbol.DOT)) { return StringKit.format("{}/{}.setting", actralProfile, name); } diff --git a/bus-setting/src/main/java/org/miaixz/bus/setting/metric/props/Props.java b/bus-setting/src/main/java/org/miaixz/bus/setting/metric/props/Props.java index 46e3a7f6f1..3566102528 100644 --- a/bus-setting/src/main/java/org/miaixz/bus/setting/metric/props/Props.java +++ b/bus-setting/src/main/java/org/miaixz/bus/setting/metric/props/Props.java @@ -28,7 +28,7 @@ package org.miaixz.bus.setting.metric.props; import org.miaixz.bus.core.center.function.FunctionX; -import org.miaixz.bus.core.center.function.LambdaInfo; +import org.miaixz.bus.core.center.function.LambdaX; import org.miaixz.bus.core.center.function.SupplierX; import org.miaixz.bus.core.center.map.concurrent.SafeConcurrentHashMap; import org.miaixz.bus.core.io.file.FileName; @@ -322,7 +322,8 @@ public void onModify(final WatchEvent event, final WatchKey key) { @Override public Object getObject(final CharSequence key, final Object defaultValue) { - return ObjectKit.defaultIfNull(getProperty(StringKit.toString(key)), defaultValue); + Assert.notNull(key, "Key must be not null!"); + return ObjectKit.defaultIfNull(getProperty(key.toString()), defaultValue); } /** @@ -334,8 +335,8 @@ public Object getObject(final CharSequence key, final Object defaultValue) { * @return 获取表达式对应属性和返回的对象 */ public T get(final FunctionX func) { - final LambdaInfo lambdaInfo = LambdaKit.resolve(func); - return get(lambdaInfo.getFieldName(), lambdaInfo.getReturnType()); + final LambdaX lambdaX = LambdaKit.resolve(func); + return get(lambdaX.getFieldName(), lambdaX.getReturnType()); } /** @@ -477,7 +478,7 @@ public T toBean(final T bean) { * @return Bean对象 */ public T toBean(final T bean, String prefix) { - prefix = StringKit.emptyIfNull(StringKit.addSuffixIfNot(prefix, Symbol.DOT)); + prefix = StringKit.toStringOrEmpty(StringKit.addSuffixIfNot(prefix, Symbol.DOT)); String key; for (final java.util.Map.Entry entry : this.entrySet()) { diff --git a/bus-setting/src/main/java/org/miaixz/bus/setting/metric/toml/TomlWriter.java b/bus-setting/src/main/java/org/miaixz/bus/setting/metric/toml/TomlWriter.java index cbd93cd26b..a7e1dd49c7 100644 --- a/bus-setting/src/main/java/org/miaixz/bus/setting/metric/toml/TomlWriter.java +++ b/bus-setting/src/main/java/org/miaixz/bus/setting/metric/toml/TomlWriter.java @@ -251,7 +251,7 @@ private void writeTableContent(final Map table, final boolean si indent(); writeKey(name); write(" = "); - writeString(StringKit.emptyIfNull(ArrayKit.toString(array))); + writeString(StringKit.toStringOrEmpty(ArrayKit.toString(array))); } } else if (value instanceof Map) {// table if (simpleValues) { diff --git a/bus-starter/src/main/java/org/miaixz/bus/starter/jdbc/AspectjJdbcProxy.java b/bus-starter/src/main/java/org/miaixz/bus/starter/jdbc/AspectjJdbcProxy.java index ebbf0f36c1..0116f0cb0a 100644 --- a/bus-starter/src/main/java/org/miaixz/bus/starter/jdbc/AspectjJdbcProxy.java +++ b/bus-starter/src/main/java/org/miaixz/bus/starter/jdbc/AspectjJdbcProxy.java @@ -32,7 +32,7 @@ import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; -import org.miaixz.bus.core.xyz.StringKit; +import org.miaixz.bus.core.xyz.ObjectKit; import org.miaixz.bus.logger.Logger; import org.springframework.core.annotation.Order; @@ -70,7 +70,7 @@ public Object around(ProceedingJoinPoint point) throws Throwable { Method method = ((MethodSignature) point.getSignature()).getMethod(); // 获取方法的@DataSource注解 DataSource dataSource = method.getAnnotation(DataSource.class); - if (!StringKit.isEmptyIfString(dataSource.value())) { + if (!ObjectKit.isEmptyIfString(dataSource.value())) { // 获取类级别的@DataSource注解 dataSource = method.getDeclaringClass().getAnnotation(DataSource.class); } diff --git a/bus-starter/src/main/java/org/miaixz/bus/starter/jdbc/DataSourceHolder.java b/bus-starter/src/main/java/org/miaixz/bus/starter/jdbc/DataSourceHolder.java index f1c728ada7..53e72a7c11 100644 --- a/bus-starter/src/main/java/org/miaixz/bus/starter/jdbc/DataSourceHolder.java +++ b/bus-starter/src/main/java/org/miaixz/bus/starter/jdbc/DataSourceHolder.java @@ -32,7 +32,7 @@ import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; -import org.miaixz.bus.core.xyz.StringKit; +import org.miaixz.bus.core.xyz.ObjectKit; import org.miaixz.bus.logger.Logger; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; @@ -100,7 +100,7 @@ public Object around(ProceedingJoinPoint point) throws Throwable { Method method = ((MethodSignature) point.getSignature()).getMethod(); // 获取方法的@DataSource注解 DataSource dataSource = method.getAnnotation(DataSource.class); - if (!StringKit.isEmptyIfString(dataSource.value())) { + if (!ObjectKit.isEmptyIfString(dataSource.value())) { // 获取类级别的@DataSource注解 dataSource = method.getDeclaringClass().getAnnotation(DataSource.class); } diff --git a/bus-starter/src/main/java/org/miaixz/bus/starter/mapper/MapperConfiguration.java b/bus-starter/src/main/java/org/miaixz/bus/starter/mapper/MapperConfiguration.java index c0aeda3cfa..8aa375a2b5 100644 --- a/bus-starter/src/main/java/org/miaixz/bus/starter/mapper/MapperConfiguration.java +++ b/bus-starter/src/main/java/org/miaixz/bus/starter/mapper/MapperConfiguration.java @@ -125,13 +125,13 @@ public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Excepti } else { factory.setPlugins(MybatisPluginBuilder.build(environment)); } - if (StringKit.isEmptyIfString(this.properties.getTypeAliasesPackage())) { + if (ObjectKit.isEmptyIfString(this.properties.getTypeAliasesPackage())) { factory.setTypeAliasesPackage(this.properties.getTypeAliasesPackage()); } if (this.properties.getTypeAliasesSuperType() != null) { factory.setTypeAliasesSuperType(this.properties.getTypeAliasesSuperType()); } - if (StringKit.isEmptyIfString(this.properties.getTypeHandlersPackage())) { + if (ObjectKit.isEmptyIfString(this.properties.getTypeHandlersPackage())) { factory.setTypeHandlersPackage(this.properties.getTypeHandlersPackage()); } if (!ObjectKit.isEmpty(this.properties.resolveMapperLocations())) { From e0040f2a10691496eedeaad9028da6b5b42ab11f Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Mon, 15 Jul 2024 12:21:52 +0800 Subject: [PATCH 11/16] =?UTF-8?q?fix:=20=E6=8F=90=E5=8D=87=20SSL=20?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=A8=B3=E5=AE=9A=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/miaixz/bus/image/plugin/StoreSCU.java | 8 ++-- .../bus/logger/metric/jdk/JdkFactory.java | 2 +- .../pay/metric/wechat/WechatPayBuilder.java | 15 +++---- .../miaixz/bus/socket/accord/AioClient.java | 24 +++++++++++- .../ssl/SslAsynchronousSocketChannel.java | 39 ++++++++++++------- .../bus/socket/secure/ssl/SslService.java | 7 +++- 6 files changed, 65 insertions(+), 30 deletions(-) diff --git a/bus-image/src/main/java/org/miaixz/bus/image/plugin/StoreSCU.java b/bus-image/src/main/java/org/miaixz/bus/image/plugin/StoreSCU.java index f6aa1149ce..c4491beae1 100755 --- a/bus-image/src/main/java/org/miaixz/bus/image/plugin/StoreSCU.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/plugin/StoreSCU.java @@ -418,15 +418,15 @@ private void onCStoreRSP(Attributes cmd, File f) { case Status.DataSetDoesNotMatchSOPClassWarning: totalSize += f.length(); ps = Builder.WARNING; - System.err.println(MessageFormat.format("WARNING: Received C-STORE-RSP with Status {0}H for {1}", + Logger.error(MessageFormat.format("WARNING: Received C-STORE-RSP with Status {0}H for {1}", Tag.shortToHexString(status), f)); - System.err.println(cmd); + Logger.error(cmd.toString()); break; default: ps = Builder.FAILED; - System.err.println(MessageFormat.format("ERROR: Received C-STORE-RSP with Status {0}H for {1}", + Logger.error(MessageFormat.format("ERROR: Received C-STORE-RSP with Status {0}H for {1}", Tag.shortToHexString(status), f)); - System.err.println(cmd); + Logger.error(cmd.toString()); } Builder.notify(state.getProgress(), cmd, ps, filesScanned); } diff --git a/bus-logger/src/main/java/org/miaixz/bus/logger/metric/jdk/JdkFactory.java b/bus-logger/src/main/java/org/miaixz/bus/logger/metric/jdk/JdkFactory.java index 3cc4056fd6..29721197d5 100644 --- a/bus-logger/src/main/java/org/miaixz/bus/logger/metric/jdk/JdkFactory.java +++ b/bus-logger/src/main/java/org/miaixz/bus/logger/metric/jdk/JdkFactory.java @@ -69,7 +69,7 @@ private void readConfig() { // 避免循环引用,Log初始化的时候不使用相关工具类 final InputStream in = ResourceKit.getStreamSafe("logging.properties"); if (null == in) { - System.err.println("[WARN] Can not find [logging.properties], use [%JRE_HOME%/lib/logging.properties] as default!"); + Console.error("[WARN] Can not find [logging.properties], use [%JRE_HOME%/lib/logging.properties] as default!"); return; } diff --git a/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java b/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java index ba38ce7307..cba08d4320 100644 --- a/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java +++ b/bus-pay/src/main/java/org/miaixz/bus/pay/metric/wechat/WechatPayBuilder.java @@ -35,6 +35,7 @@ import org.miaixz.bus.core.xyz.DateKit; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.extra.json.JsonKit; +import org.miaixz.bus.logger.Logger; import org.miaixz.bus.pay.Builder; import org.miaixz.bus.pay.magic.Message; @@ -652,11 +653,11 @@ public static boolean verifySignature(Message response, String certPath) throws String signature = response.getHeader("Wechatpay-Signature"); String signatureType = response.getHeader("Wechatpay-Signature-Type"); String body = response.getBody(); - System.out.println("timestamp:" + timestamp); - System.out.println("nonceStr:" + nonceStr); - System.out.println("signature:" + signature); - System.out.println("signatureType:" + signatureType); - System.out.println("body:" + body); + Logger.info("timestamp:" + timestamp); + Logger.info("nonceStr:" + nonceStr); + Logger.info("signature:" + signature); + Logger.info("signatureType:" + signatureType); + Logger.info("body:" + body); return verifySignature(signatureType, signature, body, nonceStr, timestamp, Builder.getCertFileInputStream(certPath)); } @@ -811,8 +812,8 @@ public static Map getKeys() throws Exception { map.put("publicKey", publicKey); map.put("privateKey", privateKey); - System.out.println("公钥\r\n" + publicKey); - System.out.println("私钥\r\n" + privateKey); + Logger.info("公钥\r\n" + publicKey); + Logger.info("私钥\r\n" + privateKey); return map; } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioClient.java b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioClient.java index 66d2cb8fa9..aab40c4d61 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioClient.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/accord/AioClient.java @@ -33,6 +33,7 @@ import org.miaixz.bus.socket.Message; import org.miaixz.bus.socket.Session; import org.miaixz.bus.socket.buffer.BufferPagePool; +import org.miaixz.bus.socket.metric.channels.AsynchronousChannelProvider; import java.io.IOException; import java.net.InetSocketAddress; @@ -96,6 +97,11 @@ public final class AioClient { * read 内存池 */ private BufferPagePool readBufferPool = null; + /** + * 是否开启低内存模式 + */ + private boolean lowMemory = true; + /** * 当前构造方法设置了启动Aio客户端的必要参数,基本实现开箱即用。 * @@ -120,7 +126,9 @@ public AioClient(String host, int port, Message message, Handler handl * @throws IOException */ public void start(A attachment, CompletionHandler handler) throws IOException { - this.asynchronousChannelGroup = AsynchronousChannelGroup.withFixedThreadPool(2, Thread::new); + this.asynchronousChannelGroup = + new AsynchronousChannelProvider(lowMemory).openAsynchronousChannelGroup(2, + Thread::new); start(asynchronousChannelGroup, attachment, handler); } @@ -243,7 +251,9 @@ public TcpSession getSession() { * @see AioClient#start(AsynchronousChannelGroup) */ public Session start() throws IOException { - this.asynchronousChannelGroup = AsynchronousChannelGroup.withFixedThreadPool(2, Thread::new); + this.asynchronousChannelGroup = + new AsynchronousChannelProvider(lowMemory).openAsynchronousChannelGroup(2, + Thread::new); return start(asynchronousChannelGroup); } @@ -366,4 +376,14 @@ public AioClient connectTimeout(int timeout) { return this; } + /** + * 禁用低代码模式 + * + * @return + */ + public AioClient disableLowMemory() { + this.lowMemory = false; + return this; + } + } diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/secure/ssl/SslAsynchronousSocketChannel.java b/bus-socket/src/main/java/org/miaixz/bus/socket/secure/ssl/SslAsynchronousSocketChannel.java index d7d10f570b..ccf285e3f9 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/secure/ssl/SslAsynchronousSocketChannel.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/secure/ssl/SslAsynchronousSocketChannel.java @@ -27,8 +27,10 @@ */ package org.miaixz.bus.socket.secure.ssl; +import org.miaixz.bus.logger.Logger; import org.miaixz.bus.socket.buffer.BufferPage; import org.miaixz.bus.socket.buffer.VirtualBuffer; +import org.miaixz.bus.socket.metric.channels.AsynchronousChannelProvider; import org.miaixz.bus.socket.metric.channels.AsynchronousSocketChannelProxy; import org.miaixz.bus.socket.metric.handler.FutureCompletionHandler; @@ -67,6 +69,7 @@ public class SslAsynchronousSocketChannel extends AsynchronousSocketChannelProxy * 自适应的输出长度 */ private int adaptiveWriteSize = -1; + private boolean closed = false; public SslAsynchronousSocketChannel(AsynchronousSocketChannel asynchronousSocketChannel, SslService sslService, BufferPage bufferPage) { super(asynchronousSocketChannel); @@ -111,7 +114,12 @@ public void read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment, @Override public void completed(Integer result, A attachment) { - if (result < 0) { + if (result == AsynchronousChannelProvider.READ_MONITOR_SIGNAL) { + return; + } else if (result == AsynchronousChannelProvider.READABLE_SIGNAL) { + asynchronousSocketChannel.read(netBuffer, timeout, unit, attachment, this); + return; + } else if (result == -1) { handler.completed(result, attachment); return; } @@ -128,7 +136,7 @@ public void completed(Integer result, A attachment) { SSLEngineResult.Status status = doUnWrap(netBuffer, appBuffer); appBuffer.flip(); - // 解包成功 + // 存在doUnWrap为ok,但appBuffer无数据的情况 if (appBuffer.hasRemaining()) { if (status != SSLEngineResult.Status.OK) { throw new IllegalStateException(); @@ -138,10 +146,10 @@ public void completed(Integer result, A attachment) { return; } if (index >= 16) { - System.err.println("maybe trigger bug here..."); + Logger.error("maybe trigger bug here..."); } - if (status == SSLEngineResult.Status.OK && index < 16) { - System.err.println("Possible exception on appBuffer."); + if (status == SSLEngineResult.Status.OK && index < 16 && netBuffer.hasRemaining()) { + Logger.error("Possible exception on appBuffer."); index++; completed(result, attachment); } else { @@ -201,29 +209,29 @@ private SSLEngineResult.Status doUnWrap(ByteBuffer netBuffer, ByteBuffer appBuff switch (result.getStatus()) { case BUFFER_OVERFLOW: if (sslService.isDebug()) { - System.out.println("BUFFER_OVERFLOW error,net:" + netBuffer + " app:" + appBuffer); + Logger.info("BUFFER_OVERFLOW error,net:" + netBuffer + " app:" + appBuffer); } break; case BUFFER_UNDERFLOW: if (netBuffer.limit() == netBuffer.capacity() && !netBuffer.hasRemaining()) { if (sslService.isDebug()) { - System.err.println("BUFFER_UNDERFLOW error"); + Logger.error("BUFFER_UNDERFLOW error"); } } else { if (sslService.isDebug()) { - System.out.println("BUFFER_UNDERFLOW,continue read:" + netBuffer); + Logger.error("BUFFER_UNDERFLOW,continue read:" + netBuffer); } } return result.getStatus(); case CLOSED: if (sslService.isDebug()) { - System.out.println("doUnWrap Result:" + result.getStatus()); + Logger.info("doUnWrap Result:" + result.getStatus()); } closed = true; break; default: if (sslService.isDebug()) { - System.out.println("doUnWrap Result:" + result.getStatus()); + Logger.info("doUnWrap Result:" + result.getStatus()); } } result = sslEngine.unwrap(netBuffer, appBuffer); @@ -259,13 +267,13 @@ public void write(ByteBuffer src, long timeout, TimeUnit unit, A attachment, return; } if (src.position() - pos == 0) { - System.err.println("write error:" + src + " netWrite:" + netWriteBuffer.buffer()); + Logger.error("write error:" + src + " netWrite:" + netWriteBuffer.buffer()); } asynchronousSocketChannel.write(netWriteBuffer.buffer(), timeout, unit, attachment, new CompletionHandler<>() { @Override public void completed(Integer result, A attachment) { if (result == -1) { - System.err.println("aaaaaaaaaaa"); + Logger.error("aaaaaaaaaaa"); } if (netWriteBuffer.buffer().hasRemaining()) { asynchronousSocketChannel.write(netWriteBuffer.buffer(), timeout, unit, attachment, this); @@ -317,14 +325,14 @@ private void doWrap(ByteBuffer writeBuffer) throws SSLException { break; case BUFFER_UNDERFLOW: if (sslService.isDebug()) { - System.err.println("doWrap BUFFER_UNDERFLOW"); + Logger.error("doWrap BUFFER_UNDERFLOW"); } break; case CLOSED: throw new SSLException("SSLEngine has " + result.getStatus()); default: if (sslService.isDebug()) { - System.out.println("doWrap Result:" + result.getStatus()); + Logger.error("doWrap Result:" + result.getStatus()); } } result = sslEngine.wrap(writeBuffer, netBuffer); @@ -346,6 +354,9 @@ public void write(ByteBuffer[] srcs, int offset, int length, long timeout, T @Override public void close() throws IOException { + if (closed) { + return; + } netWriteBuffer.clean(); netReadBuffer.clean(); appReadBuffer.clean(); diff --git a/bus-socket/src/main/java/org/miaixz/bus/socket/secure/ssl/SslService.java b/bus-socket/src/main/java/org/miaixz/bus/socket/secure/ssl/SslService.java index 16ae2cbc2d..9bba3dbd0d 100644 --- a/bus-socket/src/main/java/org/miaixz/bus/socket/secure/ssl/SslService.java +++ b/bus-socket/src/main/java/org/miaixz/bus/socket/secure/ssl/SslService.java @@ -29,6 +29,7 @@ import org.miaixz.bus.logger.Logger; import org.miaixz.bus.socket.buffer.BufferPage; +import org.miaixz.bus.socket.metric.channels.AsynchronousChannelProvider; import javax.net.ssl.*; import java.io.IOException; @@ -231,8 +232,10 @@ public void completed(Integer result, HandshakeModel attachment) { failed(new IOException("eof"), attachment); return; } - synchronized (attachment) { - doHandshake(attachment); + if (result != AsynchronousChannelProvider.READ_MONITOR_SIGNAL) { + synchronized (attachment) { + doHandshake(attachment); + } } } From f79cf8af26fd21b28b7e634b82815700cd9585da Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Thu, 18 Jul 2024 09:39:31 +0800 Subject: [PATCH 12/16] =?UTF-8?q?update:=201.=20=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E4=BA=86getYear()=E3=80=81getMonth()=E3=80=81getDay()=E7=9A=84?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=B1=BB=E5=9E=8B=EF=BC=8C=E9=9D=9E=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7=E6=9B=B4=E6=96=B0=EF=BC=9B=202.=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=90=89=E7=A5=9E=E5=AE=9C=E8=B6=8B=E3=80=81=E5=87=B6?= =?UTF-8?q?=E7=A5=9E=E5=AE=9C=E5=BF=8C=EF=BC=9B=203.=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=AF=8F=E6=97=A5=E5=AE=9C=E5=BF=8C=E3=80=81=E6=97=B6=E8=BE=B0?= =?UTF-8?q?=E5=AE=9C=E5=BF=8C=EF=BC=9B=20fix:=20=E5=86=9C=E5=8E=86?= =?UTF-8?q?=E6=97=A5=E8=8E=B7=E5=8F=96=E6=97=B6=E8=BE=B0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=81=87=E9=97=B0=E6=9C=88=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../center/date/culture/en/Constellation.java | 2 +- .../bus/core/center/map/IntHashMap.java | 210 +++++---- .../bus/core/codec/binary/Crockford.java | 2 +- .../miaixz/bus/core/io/CharsetDetector.java | 2 +- .../bus/core/io/CircularByteBuffer.java | 4 +- .../bus/core/io/compress/ZipWriter.java | 2 +- .../bus/core/io/copier/ChannelCopier.java | 2 +- .../miaixz/bus/core/io/copier/IoCopier.java | 4 +- .../core/io/copier/ReaderWriterCopier.java | 2 +- .../bus/core/io/copier/StreamCopier.java | 2 +- .../bus/core/io/stream/ReaderInputStream.java | 4 +- .../bus/core/io/stream/StreamReader.java | 2 +- .../bus/core/io/stream/SyncInputStream.java | 2 +- .../core/io/stream/WriterOutputStream.java | 4 +- .../org/miaixz/bus/core/lang/MediaType.java | 446 +++++++++++++----- .../java/org/miaixz/bus/core/lang/Normal.java | 58 ++- ...ption.java => AlreadyExistsException.java} | 20 +- .../miaixz/bus/core/math/NumberValidator.java | 39 ++ .../core/net/tls/TrustAnyTrustManager.java | 107 ++++- .../org/miaixz/bus/core/xyz/ColorKit.java | 23 + .../java/org/miaixz/bus/core/xyz/FileKit.java | 26 +- .../java/org/miaixz/bus/core/xyz/IoKit.java | 225 ++++++--- .../bus/crypto/builtin/digest/Digester.java | 22 +- .../bus/crypto/builtin/digest/mac/Mac.java | 4 +- .../bus/crypto/builtin/symmetric/Crypto.java | 4 +- .../org/miaixz/bus/crypto/center/Mac.java | 16 +- .../org/miaixz/bus/crypto/center/Sign.java | 14 +- .../org/miaixz/bus/office/csv/CsvParser.java | 2 +- .../java/org/miaixz/bus/setting/Loader.java | 2 +- .../setting/metric/ini/IniSectionService.java | 3 +- .../bus/setting/metric/ini/IniSetting.java | 3 +- .../org/miaixz/bus/shade/safety/Builder.java | 3 +- 32 files changed, 893 insertions(+), 368 deletions(-) rename bus-image/src/main/java/org/miaixz/bus/image/galaxy/Capacity.java => bus-core/src/main/java/org/miaixz/bus/core/center/map/IntHashMap.java (73%) mode change 100755 => 100644 rename bus-core/src/main/java/org/miaixz/bus/core/lang/exception/{ExistsException.java => AlreadyExistsException.java} (81%) diff --git a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Constellation.java b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Constellation.java index 97e7182175..0d09b49aa4 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Constellation.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/date/culture/en/Constellation.java @@ -225,7 +225,7 @@ public static String[] get(String fieldName) { * @return 对应的名称 */ public String getName(final int code) { - return this.name; + return ENUMS[code].name; } /** diff --git a/bus-image/src/main/java/org/miaixz/bus/image/galaxy/Capacity.java b/bus-core/src/main/java/org/miaixz/bus/core/center/map/IntHashMap.java old mode 100755 new mode 100644 similarity index 73% rename from bus-image/src/main/java/org/miaixz/bus/image/galaxy/Capacity.java rename to bus-core/src/main/java/org/miaixz/bus/core/center/map/IntHashMap.java index 4abb8d441c..775e1e6ffc --- a/bus-image/src/main/java/org/miaixz/bus/image/galaxy/Capacity.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/center/map/IntHashMap.java @@ -25,37 +25,54 @@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */ -package org.miaixz.bus.image.galaxy; +package org.miaixz.bus.core.center.map; -import org.miaixz.bus.logger.Logger; - -import java.net.InetAddress; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.Serializable; import java.util.Arrays; /** + * + * 基于哈希表的{@code IntMap}接口实现。这个实现提供了所有可选的map操作,并允许{@code null}值。 + * {@link IntHashMap} 类大致相当于{@link java.util.HashMap},除了它使用{@code int}作为它的键。 + * 这个类不保证映射的顺序;特别是,它不能保证顺序在一段时间内保持不变。 + * + * @param 值类型 * @author Kimi Liu * @since Java 17+ */ -public class Capacity implements Cloneable, java.io.Serializable { +public class IntHashMap implements Cloneable, Serializable { + + private static final long serialVersionUID = -1L; - static final boolean DISABLED = isFalse(Capacity.class.getName()); private static final int DEFAULT_CAPACITY = 32; private static final int MINIMUM_CAPACITY = 4; private static final int MAXIMUM_CAPACITY = 1 << 30; + private static final byte FREE = 0; private static final byte FULL = 1; private static final byte REMOVED = -1; + private transient int[] keys; private transient Object[] values; private transient byte[] states; private transient int free; private transient int size; - public Capacity() { + /** + * 构造 + */ + public IntHashMap() { init(DEFAULT_CAPACITY); } - public Capacity(int expectedMaxSize) { + /** + * 构造 + * + * @param expectedMaxSize HashMap 的初始容量 + */ + public IntHashMap(int expectedMaxSize) { if (expectedMaxSize < 0) throw new IllegalArgumentException( "expectedMaxSize is negative: " + expectedMaxSize); @@ -63,55 +80,29 @@ public Capacity(int expectedMaxSize) { init(capacity(expectedMaxSize)); } - private static boolean isFalse(String name) { - try { - String s = System.getProperty(name); - return ((null != s) && s.equalsIgnoreCase("false")); - } catch (IllegalArgumentException | NullPointerException e) { - } - return false; - } - - public static String hostNameOf(InetAddress inetAddress) { - if (DISABLED) - return inetAddress.getHostAddress(); - - String hostAddress = inetAddress.getHostAddress(); - Logger.debug("rDNS {} -> ...", hostAddress); - long start = System.nanoTime(); - String hostName = inetAddress.getHostName(); - long end = System.nanoTime(); - Logger.debug("rDNS {} -> {} in {} ms", hostAddress, hostName, (end - start) / 1000); - return hostName; - } - - private int capacity(int expectedMaxSize) { - int minCapacity = expectedMaxSize << 1; - if (minCapacity > MAXIMUM_CAPACITY) - return MAXIMUM_CAPACITY; - - int capacity = MINIMUM_CAPACITY; - while (capacity < minCapacity) - capacity <<= 1; - - return capacity; - } - - private void init(int initCapacity) { - keys = new int[initCapacity]; - values = new Object[initCapacity]; - states = new byte[initCapacity]; - free = initCapacity >>> 1; - } - + /** + * @return 返回此映射中的键值映射的数量 + */ public int size() { return size; } + /** + * @return + */ public boolean isEmpty() { return size == 0; } + /** + * 返回此映射映射到指定键的值。 + * 如果映射不包含此键的映射,则返回{@code null}。 + * 返回值{@code null}并不一定表示映射中不包含该键的映射;也有可能映射显式地将键映射到{@code null}。 + * {@code containsKey}操作可以用来区分这两种情况。 + * + * @param key 要返回其关联值的键 + * @return 此映射映射到指定键的值 + */ public V get(int key) { byte[] states = this.states; int[] keys = this.keys; @@ -125,6 +116,11 @@ public V get(int key) { return null; } + /** + * 如果此映射包含指定键的映射,则返回{@code true}。 + * + * @param key 判断此 Map 中是否存在的键 + */ public boolean containsKey(int key) { byte[] states = this.states; int[] keys = this.keys; @@ -138,6 +134,14 @@ public boolean containsKey(int key) { return false; } + /** + * 将指定值与此映射中的指定键关联。如果此映射之前包含此键的映射,则旧值将被替换。 + * + * @param key 与指定值关联的键 + * @param value 与指定键关联的值 + * @return 与指定键关联的先前值,或如果键没有映射则返回 {@code null}。 + * 返回 {@code null} 还可以指示 HashMap 先前将 {@code null} 与指定键关联。 + */ public V put(int key, V value) { byte[] states = this.states; int[] keys = this.keys; @@ -166,40 +170,21 @@ public void trimToSize() { resize(capacity(size)); } + /** + * 将此映射的内容重新哈希到具有更大容量的新 {@code HashMap} 实例中。 + * 当此映射中的键数超出其容量和加载因子时,会自动调用此方法 + */ public void rehash() { resize(keys.length); } - private void resize(int newLength) { - if (newLength > MAXIMUM_CAPACITY) - throw new IllegalStateException("Capacity exhausted."); - - int[] oldKeys = keys; - Object[] oldValues = values; - byte[] oldStates = states; - int[] newKeys = new int[newLength]; - Object[] newValues = new Object[newLength]; - byte[] newStates = new byte[newLength]; - int mask = newLength - 1; - - for (int j = 0; j < oldKeys.length; j++) { - if (oldStates[j] > 0) { - int key = oldKeys[j]; - int i = key & mask; - while (newStates[i] != FREE) - i = (i + 1) & mask; - newStates[i] = FULL; - newKeys[i] = key; - newValues[i] = oldValues[j]; - oldValues[j] = null; - } - } - keys = newKeys; - values = newValues; - states = newStates; - free = (newLength >>> 1) - size; - } - + /** + * 如果存在,则从此映射中删除此键的映射 + * + * @param key 要从映射中删除其映射的键。 + * @return 与指定键关联的上一个值,如果键没有映射,则返回 {@code null}。 + * 返回 {@code null} 还可以指示映射先前将 {@code null} 与指定键关联。 + */ public V remove(int key) { byte[] states = this.states; int[] keys = this.keys; @@ -221,6 +206,9 @@ public V remove(int key) { return null; } + /** + * 从此映射中删除所有映射 + */ public void clear() { Arrays.fill(values, null); Arrays.fill(states, FREE); @@ -230,7 +218,7 @@ public void clear() { public Object clone() { try { - Capacity m = (Capacity) super.clone(); + IntHashMap m = (IntHashMap) super.clone(); m.states = states.clone(); m.keys = keys.clone(); m.values = values.clone(); @@ -242,12 +230,61 @@ public Object clone() { public boolean accept(Visitor visitor) { for (int i = 0; i < states.length; i++) - if (states[i] > FREE) + if (states[i] > FREE) // states[i] == FULL if (!visitor.visit(keys[i], (V) values[i])) return false; return true; } + private void init(int initCapacity) { + keys = new int[initCapacity]; + values = new Object[initCapacity]; + states = new byte[initCapacity]; + free = initCapacity >>> 1; + } + + private int capacity(int expectedMaxSize) { + int minCapacity = expectedMaxSize << 1; + if (minCapacity > MAXIMUM_CAPACITY) + return MAXIMUM_CAPACITY; + + int capacity = MINIMUM_CAPACITY; + while (capacity < minCapacity) + capacity <<= 1; + + return capacity; + } + + private void resize(int newLength) { + if (newLength > MAXIMUM_CAPACITY) + throw new IllegalStateException("Capacity exhausted."); + + int[] oldKeys = keys; + Object[] oldValues = values; + byte[] oldStates = states; + int[] newKeys = new int[newLength]; + Object[] newValues = new Object[newLength]; + byte[] newStates = new byte[newLength]; + int mask = newLength - 1; + + for (int j = 0; j < oldKeys.length; j++) { + if (oldStates[j] > 0) { + int key = oldKeys[j]; + int i = key & mask; + while (newStates[i] != FREE) + i = (i + 1) & mask; + newStates[i] = FULL; + newKeys[i] = key; + newValues[i] = oldValues[j]; + oldValues[j] = null; + } + } + keys = newKeys; + values = newValues; + states = newStates; + free = (newLength >>> 1) - size; + } + private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { s.defaultWriteObject(); @@ -264,11 +301,10 @@ private void writeObject(java.io.ObjectOutputStream s) } } - private void readObject(java.io.ObjectInputStream s) - throws java.io.IOException, ClassNotFoundException { - s.defaultReadObject(); + private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { + in.defaultReadObject(); - int count = s.readInt(); + int count = in.readInt(); init(capacity(count)); size = count; free -= count; @@ -279,13 +315,13 @@ private void readObject(java.io.ObjectInputStream s) int mask = keys.length - 1; while (count-- > 0) { - int key = s.readInt(); + int key = in.readInt(); int i = key & mask; while (states[i] != FREE) i = (i + 1) & mask; states[i] = FULL; keys[i] = key; - values[i] = s.readObject(); + values[i] = in.readObject(); } } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/codec/binary/Crockford.java b/bus-core/src/main/java/org/miaixz/bus/core/codec/binary/Crockford.java index 8d43318ea3..8b9c79fe4f 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/codec/binary/Crockford.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/codec/binary/Crockford.java @@ -394,7 +394,7 @@ int available() { // package protected for access from I/O streams */ private void resizeBuffer() { if (buffer == null) { - buffer = new byte[Normal.DEFAULT_BUFFER_SIZE]; + buffer = new byte[Normal._8192]; pos = 0; } else { final byte[] b = new byte[buffer.length * DEFAULT_BUFFER_RESIZE_FACTOR]; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/io/CharsetDetector.java b/bus-core/src/main/java/org/miaixz/bus/core/io/CharsetDetector.java index 6123bf90be..de62c7292b 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/io/CharsetDetector.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/io/CharsetDetector.java @@ -90,7 +90,7 @@ public static Charset detect(final File file, final Charset... charsets) { * @return 编码 */ public static Charset detect(final InputStream in, final Charset... charsets) { - return detect(Normal.DEFAULT_BUFFER_SIZE, in, charsets); + return detect(Normal._8192, in, charsets); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/io/CircularByteBuffer.java b/bus-core/src/main/java/org/miaixz/bus/core/io/CircularByteBuffer.java index 612d5d34e3..0e4e1b392b 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/io/CircularByteBuffer.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/io/CircularByteBuffer.java @@ -45,10 +45,10 @@ public class CircularByteBuffer { private int currentNumberOfBytes; /** - * 默认缓冲大小的构造({@link Normal#DEFAULT_BUFFER_SIZE}) + * 默认缓冲大小的构造({@link Normal#_8192}) */ public CircularByteBuffer() { - this(Normal.DEFAULT_BUFFER_SIZE); + this(Normal._8192); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/io/compress/ZipWriter.java b/bus-core/src/main/java/org/miaixz/bus/core/io/compress/ZipWriter.java index e8e062ba54..2ed40d151b 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/io/compress/ZipWriter.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/io/compress/ZipWriter.java @@ -50,7 +50,7 @@ public class ZipWriter implements Closeable { /** * 自定义缓存大小 */ - private int bufferSize = Normal.DEFAULT_BUFFER_SIZE; + private int bufferSize = Normal._8192; /** * 构造 diff --git a/bus-core/src/main/java/org/miaixz/bus/core/io/copier/ChannelCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/io/copier/ChannelCopier.java index 4fa77b6dcd..d2bc9b32df 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/io/copier/ChannelCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/io/copier/ChannelCopier.java @@ -50,7 +50,7 @@ public class ChannelCopier extends IoCopier { /** * 构造 * - * @param bufferSize 缓存大小,< 0 表示默认{@link Normal#DEFAULT_BUFFER_SIZE} + * @param bufferSize 缓存大小,< 0 表示默认{@link Normal#_8192} * @param count 拷贝总数,-1表示无限制 * @param progress 进度条 */ public IoCopier(final int bufferSize, final long count, final StreamProgress progress) { - this.bufferSize = bufferSize > 0 ? bufferSize : Normal.DEFAULT_BUFFER_SIZE; + this.bufferSize = bufferSize > 0 ? bufferSize : Normal._8192; this.count = count <= 0 ? Long.MAX_VALUE : count; this.progress = progress; } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/io/copier/ReaderWriterCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/io/copier/ReaderWriterCopier.java index f6282406c0..e9817b4cf5 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/io/copier/ReaderWriterCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/io/copier/ReaderWriterCopier.java @@ -46,7 +46,7 @@ public class ReaderWriterCopier extends IoCopier { * 构造 */ public ReaderWriterCopier() { - this(Normal.DEFAULT_BUFFER_SIZE); + this(Normal._8192); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/io/copier/StreamCopier.java b/bus-core/src/main/java/org/miaixz/bus/core/io/copier/StreamCopier.java index 6858a5dbbc..6aece39094 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/io/copier/StreamCopier.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/io/copier/StreamCopier.java @@ -48,7 +48,7 @@ public class StreamCopier extends IoCopier { * 构造 */ public StreamCopier() { - this(Normal.DEFAULT_BUFFER_SIZE); + this(Normal._8192); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/io/stream/ReaderInputStream.java b/bus-core/src/main/java/org/miaixz/bus/core/io/stream/ReaderInputStream.java index d675d75f96..902576078b 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/io/stream/ReaderInputStream.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/io/stream/ReaderInputStream.java @@ -66,7 +66,7 @@ public class ReaderInputStream extends InputStream { * @param charset 字符集,用于创建CharsetEncoder */ public ReaderInputStream(final Reader reader, final java.nio.charset.Charset charset) { - this(reader, charset, Normal.DEFAULT_BUFFER_SIZE); + this(reader, charset, Normal._8192); } /** @@ -87,7 +87,7 @@ public ReaderInputStream(final Reader reader, final java.nio.charset.Charset cha * @param encoder 用于编码的CharsetEncoder */ public ReaderInputStream(final Reader reader, final CharsetEncoder encoder) { - this(reader, encoder, Normal.DEFAULT_BUFFER_SIZE); + this(reader, encoder, Normal._8192); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/io/stream/StreamReader.java b/bus-core/src/main/java/org/miaixz/bus/core/io/stream/StreamReader.java index 96b71e7fcf..866f1c9967 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/io/stream/StreamReader.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/io/stream/StreamReader.java @@ -129,7 +129,7 @@ public FastByteArrayOutputStream read(final int limit) throws InternalException out = new FastByteArrayOutputStream(); } try { - IoKit.copy(in, out, Normal.DEFAULT_BUFFER_SIZE, limit, (StreamProgress) null); + IoKit.copy(in, out, Normal._8192, limit, (StreamProgress) null); } finally { if (closeAfterRead) { IoKit.close(in); diff --git a/bus-core/src/main/java/org/miaixz/bus/core/io/stream/SyncInputStream.java b/bus-core/src/main/java/org/miaixz/bus/core/io/stream/SyncInputStream.java index b307925666..eed2a1c434 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/io/stream/SyncInputStream.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/io/stream/SyncInputStream.java @@ -122,7 +122,7 @@ public byte[] readBytes() { public long copyTo(final OutputStream out, final StreamProgress streamProgress) { long copyLength = -1; try { - copyLength = IoKit.copy(this.in, out, Normal.DEFAULT_BUFFER_SIZE, this.length, streamProgress); + copyLength = IoKit.copy(this.in, out, Normal._8192, this.length, streamProgress); } catch (final InternalException e) { if (!(isIgnoreEOFError && isEOFException(e.getCause()))) { throw e; diff --git a/bus-core/src/main/java/org/miaixz/bus/core/io/stream/WriterOutputStream.java b/bus-core/src/main/java/org/miaixz/bus/core/io/stream/WriterOutputStream.java index efb2f44aa6..8dd4fd3eab 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/io/stream/WriterOutputStream.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/io/stream/WriterOutputStream.java @@ -61,7 +61,7 @@ public class WriterOutputStream extends OutputStream { * @param charset 字符集,用于编码字节数据 */ public WriterOutputStream(final Writer writer, final java.nio.charset.Charset charset) { - this(writer, charset, Normal.DEFAULT_BUFFER_SIZE, false); + this(writer, charset, Normal._8192, false); } /** @@ -83,7 +83,7 @@ public WriterOutputStream(final Writer writer, final java.nio.charset.Charset ch * @param decoder 字符集解码器,用于将字节数据解码为字符数据 */ public WriterOutputStream(final Writer writer, final CharsetDecoder decoder) { - this(writer, decoder, Normal.DEFAULT_BUFFER_SIZE, false); + this(writer, decoder, Normal._8192, false); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/lang/MediaType.java b/bus-core/src/main/java/org/miaixz/bus/core/lang/MediaType.java index 7fe1d5d9d3..a35e341e0b 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/lang/MediaType.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/lang/MediaType.java @@ -52,279 +52,459 @@ public class MediaType { public static final String CHARSET_PARAMETER = "charset"; /** - * The value of a type or subtype wildcard {@value #MEDIA_TYPE_WILDCARD}. + * The value of a type or subtype {@value #MEDIA_TYPE_WILDCARD}. */ public static final String MEDIA_TYPE_WILDCARD = Symbol.STAR; /** - * A {@code String} constant representing wildcard {@value #WILDCARD} media type . + * A {@code String} constant representing {@value #WILDCARD} media type . */ public static final String WILDCARD = "*/*"; /** - * A {@link MediaType} constant representing wildcard {@value #WILDCARD} media type. + * A {@link MediaType} constant representing {@value #WILDCARD} media type. */ public static final MediaType WILDCARD_TYPE = new MediaType(); /** - * "application/xml" + * A {@code String} constant representing {@value #APPLICATION_XML} media type. */ public static final String APPLICATION_XML = "application/xml"; - public static final MediaType APPLICATION_XML_TYPE = new MediaType("application", "xml"); - /** - * "application/x-protobuf" + * A {@link MediaType} constant representing {@value #APPLICATION_XML} media type. */ - public static final String APPLICATION_PROTOBUF = "application/x-protobuf"; - public static final MediaType APPLICATION_PROTOBUF_TYPE = new MediaType("application", "x-protobuf"); + public static final MediaType APPLICATION_XML_TYPE = new MediaType("application", "xml"); /** - * "application/atom+xml" + * A {@code String} constant representing {@value #APPLICATION_ATOM_XML} media type. */ public static final String APPLICATION_ATOM_XML = "application/atom+xml"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_ATOM_XML} media type. + */ public static final MediaType APPLICATION_ATOM_XML_TYPE = new MediaType("application", "atom+xml"); /** - * "application/xhtml+xml" + * A {@code String} constant representing {@value #APPLICATION_XHTML_XML} media type. */ public static final String APPLICATION_XHTML_XML = "application/xhtml+xml"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_XHTML_XML} media type. + */ public static final MediaType APPLICATION_XHTML_XML_TYPE = new MediaType("application", "xhtml+xml"); /** - * "application/svg+xml" + * A {@code String} constant representing {@value #APPLICATION_SVG_XML} media type. */ public static final String APPLICATION_SVG_XML = "application/svg+xml"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_SVG_XML} media type. + */ public static final MediaType APPLICATION_SVG_XML_TYPE = new MediaType("application", "svg+xml"); /** - * "application/json" + * A {@code String} constant representing {@value #APPLICATION_JSON} media type. */ public static final String APPLICATION_JSON = "application/json"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_JSON} media type. + */ public static final MediaType APPLICATION_JSON_TYPE = new MediaType("application", "json"); /** - * "application/x-www-form-urlencoded" + * A {@code String} constant representing {@value #APPLICATION_FORM_URLENCODED} media type. */ public static final String APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_FORM_URLENCODED} media type. + */ public static final MediaType APPLICATION_FORM_URLENCODED_TYPE = new MediaType("application", "x-www-form-urlencoded"); + /** - * "application/octet-stream" + * A {@code String} constant representing {@value #MULTIPART_FORM_DATA} media type. + */ + public static final String MULTIPART_FORM_DATA = "multipart/form-data"; + /** + * A {@link MediaType} constant representing {@value #MULTIPART_FORM_DATA} media type. + */ + public static final MediaType MULTIPART_FORM_DATA_TYPE = new MediaType("multipart", "form-data"); + + /** + * A {@code String} constant representing {@value #APPLICATION_OCTET_STREAM} media type. */ public static final String APPLICATION_OCTET_STREAM = "application/octet-stream"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_OCTET_STREAM} media type. + */ public static final MediaType APPLICATION_OCTET_STREAM_TYPE = new MediaType("application", "octet-stream"); /** - * "text/plain" + * A {@code String} constant representing {@value #TEXT_PLAIN} media type. */ public static final String TEXT_PLAIN = "text/plain"; + /** + * A {@link MediaType} constant representing {@value #TEXT_PLAIN} media type. + */ public static final MediaType TEXT_PLAIN_TYPE = new MediaType("text", "plain"); /** - * "text/xml" + * A {@code String} constant representing {@value #TEXT_XML} media type. */ public static final String TEXT_XML = "text/xml"; + /** + * A {@link MediaType} constant representing {@value #TEXT_XML} media type. + */ public static final MediaType TEXT_XML_TYPE = new MediaType("text", "xml"); /** - * "text/html" + * A {@code String} constant representing {@value #TEXT_HTML} media type. */ public static final String TEXT_HTML = "text/html"; + /** + * A {@link MediaType} constant representing {@value #TEXT_HTML} media type. + */ public static final MediaType TEXT_HTML_TYPE = new MediaType("text", "html"); /** - * "application/dicom" + * A {@code String} constant representing {@value #SERVER_SENT_EVENTS} media type. */ - public static final String APPLICATION_DICOM = "application/dicom"; - public static final MediaType APPLICATION_DICOM_TYPE = new MediaType("application", "dicom"); + public static final String SERVER_SENT_EVENTS = "text/event-stream"; + /** + * A {@link MediaType} constant representing {@value #SERVER_SENT_EVENTS} media type. + */ + public static final MediaType SERVER_SENT_EVENTS_TYPE = new MediaType("text", "event-stream"); /** - * "application/dicom+xml" + * {@link String} representation of {@value #APPLICATION_JSON_PATCH_JSON} media type. */ - public static final String APPLICATION_DICOM_XML = "application/dicom+xml"; - public static final MediaType APPLICATION_DICOM_XML_TYPE = new MediaType("application", "dicom+xml"); + public static final String APPLICATION_JSON_PATCH_JSON = "application/json-patch+json"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_JSON_PATCH_JSON} media type. + */ + public static final MediaType APPLICATION_JSON_PATCH_JSON_TYPE = new MediaType("application", "json-patch+json"); /** - * "application/dicom+json" + * A {@code String} constant representing {@value #APPLICATION_SOAP_XML} media type. */ - public static final String APPLICATION_DICOM_JSON = "application/dicom+json"; - public static final MediaType APPLICATION_DICOM_JSON_TYPE = new MediaType("application", "dicom+json"); + public static final String APPLICATION_SOAP_XML = "application/soap+xml"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_SOAP_XML} media type. + */ + public static final MediaType APPLICATION_SOAP_XML_TYPE = new MediaType("application", "soap+xml"); + + /** + * A {@code String} constant representing {@value #APPLICATION_DICOM} media type. + */ + public final static String APPLICATION_DICOM = "application/dicom"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_DICOM} media type. + */ + public final static MediaType APPLICATION_DICOM_TYPE = new MediaType("application", "dicom"); + + /** + * A {@code String} constant representing {@value #APPLICATION_DICOM_XML} media type. + */ + public final static String APPLICATION_DICOM_XML = "application/dicom+xml"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_DICOM_XML} media type. + */ + public final static MediaType APPLICATION_DICOM_XML_TYPE = new MediaType("application", "dicom+xml"); + + /** + * A {@code String} constant representing {@value #APPLICATION_DICOM_JSON} media type. + */ + public final static String APPLICATION_DICOM_JSON = "application/dicom+json"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_DICOM_JSON} media type. + */ + public final static MediaType APPLICATION_DICOM_JSON_TYPE = new MediaType("application", "dicom+json"); /** - * "image/*" + * A {@code String} constant representing {@value #IMAGE_WILDCARD} media type. + */ + public final static String IMAGE_WILDCARD = "image/*"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_WILDCARD} media type. */ - public static final String IMAGE_WILDCARD = "image/*"; - public static final MediaType IMAGE_WILDCARD_TYPE = new MediaType("image", Symbol.STAR); + public final static MediaType IMAGE_WILDCARD_TYPE = new MediaType("image", "*"); /** - * "image/gif" + * A {@code String} constant representing {@value #IMAGE_GIF} media type. + */ + public final static String IMAGE_GIF = "image/gif"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_GIF} media type. + */ + public final static MediaType IMAGE_GIF_TYPE = new MediaType("image", "gif"); + + /** + * A {@code String} constant representing {@value #IMAGE_PNG} media type. + */ + public final static String IMAGE_PNG = "image/png"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_PNG} media type. */ - public static final String IMAGE_GIF = "image/gif"; - public static final MediaType IMAGE_GIF_TYPE = new MediaType("image", "gif"); + public final static MediaType IMAGE_PNG_TYPE = new MediaType("image", "png"); /** - * "image/png" + * A {@code String} constant representing {@value #IMAGE_JPEG} media type. + */ + public final static String IMAGE_JPEG = "image/jpeg"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_JPEG} media type. */ - public static final String IMAGE_PNG = "image/png"; - public static final MediaType IMAGE_PNG_TYPE = new MediaType("image", "png"); + public final static MediaType IMAGE_JPEG_TYPE = new MediaType("image", "jpeg"); /** - * "image/bmp" + * A {@code String} constant representing {@value #IMAGE_JLS} media type. + */ + public final static String IMAGE_JLS = "image/jls"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_JLS} media type. */ - public static final String IMAGE_BMP = "image/bmp"; - public static final MediaType IMAGE_BMP_TYPE = new MediaType("image", "bmp"); + public final static MediaType IMAGE_JLS_TYPE = new MediaType("image", "jls"); /** - * "image/jpeg" + * A {@code String} constant representing {@value #IMAGE_JP2} media type. */ - public static final String IMAGE_JPEG = "image/jpeg"; - public static final MediaType IMAGE_JPEG_TYPE = new MediaType("image", "jpeg"); + public final static String IMAGE_JP2 = "image/jp2"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_JP2} media type. + */ + public final static MediaType IMAGE_JP2_TYPE = new MediaType("image", "jp2"); /** - * "image/x-jls" + * A {@code String} constant representing {@value #IMAGE_J2C} media type. + */ + public final static String IMAGE_J2C = "image/j2c"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_J2C} media type. */ - public static final String IMAGE_X_JLS = "image/x-jls"; - public static final MediaType IMAGE_X_JLS_TYPE = new MediaType("image", "x-jls"); + public final static MediaType IMAGE_J2C_TYPE = new MediaType("image", "j2c"); /** - * "image/jp2" + * A {@code String} constant representing {@value #IMAGE_JPX} media type. */ - public static final String IMAGE_JP2 = "image/jp2"; - public static final MediaType IMAGE_JP2_TYPE = new MediaType("image", "jp2"); + public final static String IMAGE_JPX = "image/jpx"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_JPX} media type. + */ + public final static MediaType IMAGE_JPX_TYPE = new MediaType("image", "jpx"); /** - * "image/jpx" + * A {@code String} constant representing {@value #IMAGE_JPH} media type. */ - public static final String IMAGE_JPX = "image/jpx"; - public static final MediaType IMAGE_JPX_TYPE = new MediaType("image", "jpx"); + public final static String IMAGE_JPH = "image/jph"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_JPH} media type. + */ + public final static MediaType IMAGE_JPH_TYPE = new MediaType("image", "jph"); /** - * "image/dicom+rle" + * A {@code String} constant representing {@value #IMAGE_JPHC} media type. + */ + public final static String IMAGE_JPHC = "image/jphc"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_JPHC} media type. */ - public static final String IMAGE_X_DICOM_RLE = "image/x-dicom+rle"; - public static final MediaType IMAGE_X_DICOM_RLE_TYPE = new MediaType("image", "x-dicom+rle"); + public final static MediaType IMAGE_JPHC_TYPE = new MediaType("image", "jphc"); /** - * "video/*" + * A {@code String} constant representing {@value #IMAGE_DICOM_RLE} media type. + */ + public final static String IMAGE_DICOM_RLE = "image/dicom-rle"; + /** + * A {@link MediaType} constant representing {@value #IMAGE_DICOM_RLE} media type. */ - public static final String VIDEO_WILDCARD = "video/*"; - public static final MediaType VIDEO_WILDCARD_TYPE = new MediaType("video", Symbol.STAR); + public final static MediaType IMAGE_DICOM_RLE_TYPE = new MediaType("image", "dicom-rle"); /** - * "video/mpeg" + * A {@code String} constant representing {@value #VIDEO_WILDCARD} media type. + */ + public final static String VIDEO_WILDCARD = "video/*"; + /** + * A {@link MediaType} constant representing {@value #VIDEO_WILDCARD} media type. */ - public static final String VIDEO_MPEG = "video/mpeg"; - public static final MediaType VIDEO_MPEG_TYPE = new MediaType("video", "mpeg"); + public final static MediaType VIDEO_WILDCARD_TYPE = new MediaType("video", "*"); /** - * "video/mp4" + * A {@code String} constant representing {@value #VIDEO_MPEG} media type. */ - public static final String VIDEO_MP4 = "video/mp4"; - public static final MediaType VIDEO_MP4_TYPE = new MediaType("video", "mp4"); + public final static String VIDEO_MPEG = "video/mpeg"; + /** + * A {@link MediaType} constant representing {@value #VIDEO_MPEG} media type. + */ + public final static MediaType VIDEO_MPEG_TYPE = new MediaType("video", "mpeg"); /** - * "application/pdf" + * A {@code String} constant representing {@value #VIDEO_MP4} media type. */ - public static final String APPLICATION_PDF = "application/pdf"; - public static final MediaType APPLICATION_PDF_TYPE = new MediaType("application", "pdf"); + public final static String VIDEO_MP4 = "video/mp4"; + /** + * A {@link MediaType} constant representing {@value #VIDEO_MP4} media type. + */ + public final static MediaType VIDEO_MP4_TYPE = new MediaType("video", "mp4"); /** - * "text/rtf" + * A {@code String} constant representing {@value #VIDEO_QUICKTIME} media type. */ - public static final String TEXT_RTF = "text/rtf"; - public static final MediaType TEXT_RTF_TYPE = new MediaType("text", "rtf"); + public final static String VIDEO_QUICKTIME = "video/quicktime"; + /** + * A {@link MediaType} constant representing {@value #VIDEO_QUICKTIME} media type. + */ + public final static MediaType VIDEO_QUICKTIME_TYPE = new MediaType("video", "quicktime"); /** - * "text/csv" + * A {@code String} constant representing {@value #APPLICATION_PDF} media type. + */ + public final static String APPLICATION_PDF = "application/pdf"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_PDF} media type. */ - public static final String TEXT_CSV = "text/csv"; - public static final MediaType TEXT_CSV_TYPE = new MediaType("text", "csv"); + public final static MediaType APPLICATION_PDF_TYPE = new MediaType("application", "pdf"); /** - * "text/csv;charset=utf-8" + * A {@code String} constant representing {@value #TEXT_RTF} media type. */ - public static final String TEXT_CSV_UTF8 = "text/csv;charset=utf-8"; - public static final MediaType TEXT_CSV_UTF8_TYPE = new MediaType("text", "csv", Charset.DEFAULT_UTF_8); + public final static String TEXT_RTF = "text/rtf"; + /** + * A {@link MediaType} constant representing {@value #TEXT_RTF} media type. + */ + public final static MediaType TEXT_RTF_TYPE = new MediaType("text", "rtf"); /** - * "application/zip" + * A {@code String} constant representing {@value #TEXT_CSV} media type. + */ + public final static String TEXT_CSV = "text/csv"; + /** + * A {@link MediaType} constant representing {@value #TEXT_CSV} media type. */ - public static final String APPLICATION_ZIP = "application/zip"; - public static final MediaType APPLICATION_ZIP_TYPE = new MediaType("application", "zip"); + public final static MediaType TEXT_CSV_TYPE = new MediaType("text", "csv"); /** - * "application/x-zip-compressed" + * A {@code String} constant representing {@value #TEXT_CSV_UTF8} media type. + */ + public final static String TEXT_CSV_UTF8 = "text/csv;charset=utf-8"; + /** + * A {@link MediaType} constant representing {@value #TEXT_CSV_UTF8} media type. */ - public static final String APPLICATION_ZIP_COMPRESSED = "application/x-zip-compressed"; - public static final MediaType APPLICATION_ZIP_COMPRESSED_TYPE = new MediaType("application", "x-zip-compressed"); + public final static MediaType TEXT_CSV_UTF8_TYPE = new MediaType("text", "csv", "utf-8"); /** - * "multipart/form-data" + * A {@code String} constant representing {@value #APPLICATION_ZIP} media type. */ - public static final String MULTIPART_FORM_DATA = "multipart/form-data"; - public static final MediaType MULTIPART_FORM_DATA_TYPE = new MediaType("multipart", "form-data"); + public final static String APPLICATION_ZIP = "application/zip"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_ZIP} media type. + */ + public final static MediaType APPLICATION_ZIP_TYPE = new MediaType("application", "zip"); /** - * "multipart/mixed" + * A {@code String} constant representing {@value #MULTIPART_RELATED} media type. */ - public static final String MULTIPART_MIXED = "multipart/mixed"; - public static final MediaType MULTIPART_MIXED_TYPE = new MediaType("multipart", "mixed"); + public final static String MULTIPART_RELATED = "multipart/related"; + /** + * A {@link MediaType} constant representing {@value #MULTIPART_RELATED} media type. + */ + public final static MediaType MULTIPART_RELATED_TYPE = new MediaType("multipart", "related"); /** - * "multipart/alternative" + * A {@code String} constant representing {@value #MULTIPART_RELATED_APPLICATION_DICOM} media type. */ - public static final String MULTIPART_ALTERNATIVE = "multipart/alternative"; - public static final MediaType MULTIPART_ALTERNATIVE_TYPE = new MediaType("multipart", "alternative"); + public final static String MULTIPART_RELATED_APPLICATION_DICOM = "multipart/related;type=\"application/dicom\""; + /** + * A {@link MediaType} constant representing {@value #MULTIPART_RELATED_APPLICATION_DICOM} media type. + */ + public final static MediaType MULTIPART_RELATED_APPLICATION_DICOM_TYPE = new MediaType("multipart", "related", Collections.singletonMap("type", APPLICATION_DICOM)); /** - * "multipart/digest" + * A {@code String} constant representing {@value #MULTIPART_RELATED_APPLICATION_DICOM_XML} media type. */ - public static final String MULTIPART_DIGEST = "multipart/digest"; - public static final MediaType MULTIPART_DIGEST_TYPE = new MediaType("multipart", "digest"); + public final static String MULTIPART_RELATED_APPLICATION_DICOM_XML = "multipart/related;type=\"application/dicom+xml\""; + /** + * A {@link MediaType} constant representing {@value #MULTIPART_RELATED_APPLICATION_DICOM_XML} media type. + */ + public final static MediaType MULTIPART_RELATED_APPLICATION_DICOM_XML_TYPE = new MediaType("multipart", "related", Collections.singletonMap("type", APPLICATION_DICOM_XML)); /** - * "multipart/related" + * A {@code String} constant representing {@value #MODEL_STL} media type. + */ + public final static String MODEL_STL = "model/stl"; + /** + * A {@link MediaType} constant representing {@value #MODEL_STL} media type. */ - public static final String MULTIPART_parallel = "multipart/parallel"; - public static final MediaType MULTIPART_PARALLEL_TYPE = new MediaType("multipart", "parallel"); + public final static MediaType MODEL_STL_TYPE = new MediaType("model", "stl"); /** - * "multipart/related" + * A {@code String} constant representing {@value #MODEL_X_STL_BINARY} media type. */ - public static final String MULTIPART_RELATED = "multipart/related"; - public static final MediaType MULTIPART_RELATED_TYPE = new MediaType("multipart", "related"); + public final static String MODEL_X_STL_BINARY = "model/x.stl-binary"; + /** + * A {@link MediaType} constant representing {@value #MODEL_X_STL_BINARY} media type. + */ + public final static MediaType MODEL_X_STL_BINARY_TYPE = new MediaType("model", "x.stl-binary"); /** - * "multipart/related;type=application/dicom" + * A {@code String} constant representing {@value #APPLICATION_SLA} media type. + */ + public final static String APPLICATION_SLA = "application/sla"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_SLA} media type. */ - public static final String MULTIPART_RELATED_APPLICATION_DICOM = "multipart/related;type=\"application/dicom\""; - public static final MediaType MULTIPART_RELATED_APPLICATION_DICOM_TYPE = - new MediaType("multipart", "related", Collections.singletonMap("type", APPLICATION_DICOM)); + public final static MediaType APPLICATION_SLA_TYPE = new MediaType("application", "sla"); /** - * "multipart/related;type=\"application/dicom+xml\"" + * A {@code String} constant representing {@value #MODEL_OBJ} media type. + */ + public final static String MODEL_OBJ = "model/obj"; + /** + * A {@link MediaType} constant representing {@value #MODEL_OBJ} media type. */ - public static final String MULTIPART_RELATED_APPLICATION_DICOM_XML = "multipart/related;type=\"application/dicom+xml\""; - public static final MediaType MULTIPART_RELATED_APPLICATION_DICOM_XML_TYPE = - new MediaType("multipart", "related", Collections.singletonMap("type", APPLICATION_DICOM_XML)); + public final static MediaType MODEL_OBJ_TYPE = new MediaType("model", "obj"); /** - * "text/event-stream;type=\"application/event-stream\"" + * A {@code String} constant representing {@value #MODEL_MTL} media type. */ - public static final String SERVER_SENT_EVENTS = "text/event-stream"; - public static final MediaType SERVER_SENT_EVENTS_TYPE = new MediaType("text", "event-stream"); + public final static String MODEL_MTL = "model/mtl"; + /** + * A {@link MediaType} constant representing {@value #MODEL_MTL} media type. + */ + public final static MediaType MODEL_MTL_TYPE = new MediaType("model", "mtl"); /** - * "application/json-patch+json;type=\"application/json-patch+json\"" + * A {@code String} constant representing {@value #APPLICATION_VND_GENOZIP} media type. */ - public static final String APPLICATION_JSON_PATCH_JSON = "application/json-patch+json"; - public static final MediaType APPLICATION_JSON_PATCH_JSON_TYPE = new MediaType("application", "json-patch+json"); + public final static String APPLICATION_VND_GENOZIP = "application/vnd.genozip"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_VND_GENOZIP} media type. + */ + public final static MediaType APPLICATION_VND_GENOZIP_TYPE = new MediaType("application", "vnd.genozip"); /** - * "application/soap+xml;type=\"application/soap+xml\"" + * A {@code String} constant representing {@value #APPLICATION_X_BZIP2} media type. */ - public static final String APPLICATION_SOAP_XML = "application/soap+xml"; - public static final MediaType APPLICATION_SOAP_XML_TYPE = new MediaType("application", "soap+xml"); + public final static String APPLICATION_X_BZIP2 = "application/x-bzip2"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_X_BZIP2} media type. + */ + public final static MediaType APPLICATION_X_BZIP2_TYPE = new MediaType("application", "x-bzip2"); + /** + * A {@code String} constant representing {@value #APPLICATION_PRS_VCFBZIP} media type. + */ + public final static String APPLICATION_PRS_VCFBZIP = "application/prs.vcfbzip"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_PRS_VCFBZIP} media type. + */ + public final static MediaType APPLICATION_PRS_VCFBZIP_TYPE = new MediaType("application", "prs.vcfbzip"); + /** + * A {@code String} constant representing {@value #APPLICATION_PRS_VCFBZIP2} media type. + */ + public final static String APPLICATION_PRS_VCFBZIP2 = "application/prs.vcfbzip2"; + /** + * A {@link MediaType} constant representing {@value #APPLICATION_PRS_VCFBZIP2} media type. + */ + public final static MediaType APPLICATION_PRS_VCFBZIP2_TYPE = new MediaType("application", "prs.vcfbzip2"); public static final String TOKEN = "([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)"; public static final String QUOTED = "\"([^\"]*)\""; @@ -522,4 +702,38 @@ public boolean isCompatible(MediaType mediaType) { && this.subtype.equalsIgnoreCase(mediaType.subtype))); } + public static boolean isSTLType(MediaType mediaType) { + return equalsIgnoreParameters(mediaType, MODEL_STL_TYPE) + || equalsIgnoreParameters(mediaType, MODEL_X_STL_BINARY_TYPE) + || equalsIgnoreParameters(mediaType, APPLICATION_SLA_TYPE); + } + + public static boolean isSTLType(String type) { + return MODEL_STL.equalsIgnoreCase(type) + || MODEL_X_STL_BINARY.equalsIgnoreCase(type) + || APPLICATION_SLA.equalsIgnoreCase(type); + } + + public static boolean equalsIgnoreParameters(MediaType type1, MediaType type2) { + return type1.getType().equalsIgnoreCase(type2.getType()) + && type1.getSubtype().equalsIgnoreCase(type2.getSubtype()); + } + + public static MediaType getMultiPartRelatedType(MediaType mediaType) { + if (!MULTIPART_RELATED_TYPE.isCompatible(mediaType)) + return null; + + String type = mediaType.getParameters().get("type"); + if (type == null) + return MediaType.WILDCARD_TYPE; + + MediaType partType = MediaType.valueOf(type); + if (mediaType.getParameters().size() > 1) { + Map params = new HashMap<>(mediaType.getParameters()); + params.remove("type"); + partType = new MediaType(partType.getType(), partType.getSubtype(), params); + } + return partType; + } + } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/lang/Normal.java b/bus-core/src/main/java/org/miaixz/bus/core/lang/Normal.java index 638fa4b7ce..274fc50477 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/lang/Normal.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/lang/Normal.java @@ -30,6 +30,7 @@ import org.miaixz.bus.core.io.file.FileName; import java.net.URL; +import java.util.Date; /** * 默认常量 @@ -43,44 +44,70 @@ public class Normal { * The number 1024 * 1.二进制计数的基本计量单位 * 2.广大程序员的共同节日 + * 3.由于特殊性置顶 */ - public static final int _1024 = 1024; + public static final int _1024 = 2 << 10; + + /** + * The number 32768 + */ + public static final int _32768 = 2 << 14; + + /** + * The number 16384 + */ + public static final int _16384 = 2 << 13; + + /** + * The number 8192 + */ + public static final int _8192 = 2 << 12; + + /** + * The number 2048 + */ + public static final int _2048 = 2 << 11; + /** * The number 512 */ - public static final int _512 = 512; + public static final int _512 = 2 << 9; /** * The number 256 */ - public static final int _256 = 256; + public static final int _256 = 2 << 8; /** * The number 128 */ - public static final int _128 = 128; + public static final int _128 = 2 << 7; /** * The number 64 */ - public static final int _64 = 64; + public static final int _64 = 2 << 6; /** * The number 32 */ - public static final int _32 = 32; + public static final int _32 = 2 << 5; + /** * The number 24 */ public static final int _24 = 24; + /** * The number 20 */ public static final int _20 = 20; + /** * The number 18 */ public static final int _18 = 18; + /** * The number 16 */ @@ -90,6 +117,7 @@ public class Normal { * The number 12 */ public static final int _12 = 12; + /** * The number 9 */ @@ -388,6 +416,11 @@ public class Normal { */ public static final Character[] EMPTY_CHARACTER_OBJECT_ARRAY = new Character[0]; + /** + * {@code Date} array. + */ + public static final Date[] EMPTY_DATE_OBJECT_ARRAY = new Date[0]; + /** * Bytes per Kilobyte(KB). */ @@ -408,19 +441,6 @@ public class Normal { */ public static final long BYTES_PER_TB = BYTES_PER_GB * _1024; - /** - * 默认缓存大小 8192 - */ - public static final int DEFAULT_BUFFER_SIZE = 2 << 12; - /** - * 默认中等缓存大小 16384 - */ - public static final int DEFAULT_MIDDLE_BUFFER_SIZE = 2 << 13; - /** - * 默认大缓存大小 32768 - */ - public static final int DEFAULT_LARGE_BUFFER_SIZE = 2 << 14; - /** * 默认增长因子,当Map的size达到 容量*增长因子时,开始扩充Map */ diff --git a/bus-core/src/main/java/org/miaixz/bus/core/lang/exception/ExistsException.java b/bus-core/src/main/java/org/miaixz/bus/core/lang/exception/AlreadyExistsException.java similarity index 81% rename from bus-core/src/main/java/org/miaixz/bus/core/lang/exception/ExistsException.java rename to bus-core/src/main/java/org/miaixz/bus/core/lang/exception/AlreadyExistsException.java index 96394639dc..04a121d436 100755 --- a/bus-core/src/main/java/org/miaixz/bus/core/lang/exception/ExistsException.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/lang/exception/AlreadyExistsException.java @@ -33,14 +33,14 @@ * @author Kimi Liu * @since Java 17+ */ -public class ExistsException extends UncheckedException { +public class AlreadyExistsException extends UncheckedException { private static final long serialVersionUID = -1L; /** * 构造 */ - public ExistsException() { + public AlreadyExistsException() { super(); } @@ -49,7 +49,7 @@ public ExistsException() { * * @param e 异常 */ - public ExistsException(final Throwable e) { + public AlreadyExistsException(final Throwable e) { super(e); } @@ -58,7 +58,7 @@ public ExistsException(final Throwable e) { * * @param message 消息 */ - public ExistsException(final String message) { + public AlreadyExistsException(final String message) { super(message); } @@ -68,7 +68,7 @@ public ExistsException(final String message) { * @param format 消息模板 * @param args 参数 */ - public ExistsException(final String format, final Object... args) { + public AlreadyExistsException(final String format, final Object... args) { super(format, args); } @@ -78,7 +78,7 @@ public ExistsException(final String format, final Object... args) { * @param errcode 错误码 * @param errmsg 消息 */ - public ExistsException(final String errcode, final String errmsg) { + public AlreadyExistsException(final String errcode, final String errmsg) { super(errcode, errmsg); } @@ -88,7 +88,7 @@ public ExistsException(final String errcode, final String errmsg) { * @param errcode 错误码 * @param throwable 异常 */ - public ExistsException(final String errcode, final Throwable throwable) { + public AlreadyExistsException(final String errcode, final Throwable throwable) { super(errcode, throwable); } @@ -99,7 +99,7 @@ public ExistsException(final String errcode, final Throwable throwable) { * @param format 消息模板 * @param args 参数 */ - public ExistsException(final Throwable cause, final String format, final Object... args) { + public AlreadyExistsException(final Throwable cause, final String format, final Object... args) { super(cause, format, args); } @@ -108,7 +108,7 @@ public ExistsException(final Throwable cause, final String format, final Object. * @param errmsg 消息 * @param throwable 异常 */ - public ExistsException(final String errcode, final String errmsg, final Throwable throwable) { + public AlreadyExistsException(final String errcode, final String errmsg, final Throwable throwable) { super(errcode, errmsg, throwable); } @@ -120,7 +120,7 @@ public ExistsException(final String errcode, final String errmsg, final Throwabl * @param enableSuppression 是否启用抑制 * @param writableStackTrace 堆栈跟踪是否应该是可写的 */ - public ExistsException(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) { + public AlreadyExistsException(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/math/NumberValidator.java b/bus-core/src/main/java/org/miaixz/bus/core/math/NumberValidator.java index cde495149c..c3f175910c 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/math/NumberValidator.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/math/NumberValidator.java @@ -39,6 +39,45 @@ */ public class NumberValidator { + public static final double DOUBLE_EPSILON = 1e-6; + public static final double FLOAT_EPSILON = 1e-5; + + public static boolean isEqualToZero(float val) { + return Math.copySign(val, 1.0) < FLOAT_EPSILON; + } + + public static boolean isDifferentFromZero(float val) { + return Math.copySign(val, 1.0) > FLOAT_EPSILON; + } + + public static boolean isEqual(float a, float b) { + return Math.copySign(a - b, 1.0) <= FLOAT_EPSILON + || (a == b) + || (Float.isNaN(a) && Float.isNaN(b)); + } + + public static boolean isDifferent(float a, float b) { + return Math.copySign(a - b, 1.0) >= FLOAT_EPSILON; + } + + public static boolean isEqualToZero(double val) { + return Math.copySign(val, 1.0) < DOUBLE_EPSILON; + } + + public static boolean isDifferentFromZero(double val) { + return Math.copySign(val, 1.0) > DOUBLE_EPSILON; + } + + public static boolean isEqual(double a, double b) { + return Math.copySign(a - b, 1.0) <= DOUBLE_EPSILON + || (a == b) + || (Double.isNaN(a) && Double.isNaN(b)); + } + + public static boolean isDifferent(double a, double b) { + return Math.copySign(a - b, 1.0) >= DOUBLE_EPSILON; + } + /** * 是否为数字,支持包括: * diff --git a/bus-core/src/main/java/org/miaixz/bus/core/net/tls/TrustAnyTrustManager.java b/bus-core/src/main/java/org/miaixz/bus/core/net/tls/TrustAnyTrustManager.java index 3ea2b53c27..6b3c691a9b 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/net/tls/TrustAnyTrustManager.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/net/tls/TrustAnyTrustManager.java @@ -28,14 +28,15 @@ package org.miaixz.bus.core.net.tls; import org.miaixz.bus.core.lang.exception.InternalException; +import org.miaixz.bus.core.xyz.IoKit; import org.miaixz.bus.core.xyz.StringKit; import javax.net.ssl.*; +import java.io.IOException; +import java.io.InputStream; import java.net.Socket; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.Provider; +import java.security.*; +import java.security.cert.CertificateException; import java.security.cert.X509Certificate; /** @@ -171,4 +172,102 @@ public void checkClientTrusted(final X509Certificate[] x509Certificates, final S public void checkServerTrusted(final X509Certificate[] x509Certificates, final String s, final SSLEngine sslEngine) { } + public static KeyStore createKeyStore(X509Certificate... certs) + throws KeyStoreException { + KeyStore ks = KeyStore.getInstance("PKCS12"); + try { + ks.load(null); + } catch (IOException e) { + throw new AssertionError(e); + } catch (NoSuchAlgorithmException e) { + throw new AssertionError(e); + } catch (CertificateException e) { + throw new AssertionError(e); + } + for (X509Certificate cert : certs) + ks.setCertificateEntry(cert.getSubjectX500Principal().getName(), cert); + return ks; + } + + public static KeyStore loadKeyStore(String type, String url, String password) + throws IOException, KeyStoreException, NoSuchAlgorithmException, + CertificateException { + return loadKeyStore(type, url, password.toCharArray()); + } + + public static KeyStore loadKeyStore(String type, String url, char[] password) + throws IOException, KeyStoreException, NoSuchAlgorithmException, + CertificateException { + KeyStore ks = KeyStore.getInstance(type); + InputStream in = IoKit.openFileOrURL(url); + try { + ks.load(in, password); + } finally { + IoKit.close(in); + } + return ks; + } + + public static KeyManager createKeyManager(String type, String url, + char[] storePassword, char[] keyPassword) + throws UnrecoverableKeyException, KeyStoreException, + NoSuchAlgorithmException, CertificateException, IOException { + return createKeyManager(loadKeyStore(type, url, storePassword), keyPassword); + } + + public static KeyManager createKeyManager(String type, String url, + String storePassword, String keyPassword) + throws UnrecoverableKeyException, KeyStoreException, + NoSuchAlgorithmException, CertificateException, IOException { + return createKeyManager(loadKeyStore(type, url, storePassword), keyPassword); + } + + public static KeyManager createKeyManager(KeyStore ks, String password) + throws UnrecoverableKeyException, KeyStoreException { + return createKeyManager(ks, password.toCharArray()); + } + + public static KeyManager createKeyManager(KeyStore ks, char[] password) + throws UnrecoverableKeyException, KeyStoreException { + try { + KeyManagerFactory kmf = KeyManagerFactory + .getInstance(KeyManagerFactory.getDefaultAlgorithm()); + kmf.init(ks, password); + KeyManager[] kms = kmf.getKeyManagers(); + return kms.length > 0 ? kms[0] : null; + } catch (NoSuchAlgorithmException e) { + throw new AssertionError(e); + } + } + + public static TrustManager createTrustManager(KeyStore ks) + throws KeyStoreException { + try { + TrustManagerFactory kmf = TrustManagerFactory + .getInstance(TrustManagerFactory.getDefaultAlgorithm()); + kmf.init(ks); + TrustManager[] tms = kmf.getTrustManagers(); + return tms.length > 0 ? tms[0] : null; + } catch (NoSuchAlgorithmException e) { + throw new AssertionError(e); + } + } + + public static TrustManager createTrustManager(X509Certificate... certs) + throws KeyStoreException { + return createTrustManager(createKeyStore(certs)); + } + + public static TrustManager createTrustManager(String type, String url, char[] password) + throws KeyStoreException, NoSuchAlgorithmException, + CertificateException, IOException { + return createTrustManager(loadKeyStore(type, url, password)); + } + + public static TrustManager createTrustManager(String type, String url, String password) + throws KeyStoreException, NoSuchAlgorithmException, + CertificateException, IOException { + return createTrustManager(loadKeyStore(type, url, password)); + } + } diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ColorKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ColorKit.java index d79b1c45e0..32f0e625cf 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/ColorKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/ColorKit.java @@ -203,6 +203,29 @@ public static Color getColor(final int rgb) { return new Color(rgb); } + /** + * 从rgba数组或gray值中获取RGB颜色 + * + * @param gray 在单色显示器上呈现时的单个灰色无符号值。单位在p值中指定, + * 从最小的0x0000(黑色)到最大的0xFFFF(白色)。 + * @param rgba 指定RGB[A]颜色的无符号值数组(可选的) + * @return {@link Color} + */ + public static Color getColor(int gray, int[] rgba) { + int r, g, b, a = 255; + if (rgba != null && rgba.length >= 3) { + r = Math.min(rgba[0], 255); + g = Math.min(rgba[1], 255); + b = Math.min(rgba[2], 255); + if (rgba.length > 3) { + a = Math.min(rgba[3], 255); + } + } else { + r = g = b = gray >> 8; + } + return new Color(r, g, b, a); + } + /** * 16进制的颜色值转换为Color对象,例如#fcf6d6 * diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java index 5744bf8713..8c1c3c6b79 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/FileKit.java @@ -30,6 +30,8 @@ import org.miaixz.bus.core.center.function.ConsumerX; import org.miaixz.bus.core.center.function.FunctionX; import org.miaixz.bus.core.io.BomReader; +import org.miaixz.bus.core.io.file.FileReader; +import org.miaixz.bus.core.io.file.FileWriter; import org.miaixz.bus.core.io.file.*; import org.miaixz.bus.core.io.resource.FileResource; import org.miaixz.bus.core.io.resource.Resource; @@ -1703,7 +1705,7 @@ public static String readUtf8String(final String path) throws InternalException * @throws InternalException IO异常 */ public static String readString(final File file, final java.nio.charset.Charset charset) throws InternalException { - return org.miaixz.bus.core.io.file.FileReader.of(file, charset).readString(); + return FileReader.of(file, charset).readString(); } /** @@ -1791,7 +1793,7 @@ public static > T readUtf8Lines(final File file, fi * @throws InternalException IO异常 */ public static > T readLines(final File file, final java.nio.charset.Charset charset, final T collection) throws InternalException { - return org.miaixz.bus.core.io.file.FileReader.of(file, charset).readLines(collection); + return FileReader.of(file, charset).readLines(collection); } /** @@ -1918,7 +1920,7 @@ public static void readUtf8Lines(final File file, final ConsumerX lineHa * @throws InternalException IO异常 */ public static void readLines(final File file, final java.nio.charset.Charset charset, final ConsumerX lineHandler) throws InternalException { - org.miaixz.bus.core.io.file.FileReader.of(file, charset).readLines(lineHandler); + FileReader.of(file, charset).readLines(lineHandler); } /** @@ -2028,7 +2030,7 @@ public static T readUtf8(final File file, final FunctionX * @throws InternalException IO异常 */ public static T read(final File file, final java.nio.charset.Charset charset, final FunctionX readerHandler) throws InternalException { - return org.miaixz.bus.core.io.file.FileReader.of(file, charset).read(readerHandler); + return FileReader.of(file, charset).read(readerHandler); } /** @@ -2082,7 +2084,7 @@ public static BufferedWriter getWriter(final String path, final java.nio.charset * @throws InternalException IO异常 */ public static BufferedWriter getWriter(final File file, final java.nio.charset.Charset charset, final boolean isAppend) throws InternalException { - return org.miaixz.bus.core.io.file.FileWriter.of(file, charset).getWriter(isAppend); + return FileWriter.of(file, charset).getWriter(isAppend); } /** @@ -2173,7 +2175,7 @@ public static File writeString(final String content, final String path, final ja * @throws InternalException IO异常 */ public static File writeString(final String content, final File file, final java.nio.charset.Charset charset) throws InternalException { - return org.miaixz.bus.core.io.file.FileWriter.of(file, charset).write(content); + return FileWriter.of(file, charset).write(content); } /** @@ -2223,7 +2225,7 @@ public static File appendUtf8String(final String content, final File file) throw * @throws InternalException IO异常 */ public static File appendString(final String content, final File file, final java.nio.charset.Charset charset) throws InternalException { - return org.miaixz.bus.core.io.file.FileWriter.of(file, charset).append(content); + return FileWriter.of(file, charset).append(content); } /** @@ -2366,7 +2368,7 @@ public static File writeLines(final Collection list, final String path, f * @throws InternalException IO异常 */ public static File writeLines(final Collection list, final File file, final java.nio.charset.Charset charset, final boolean isAppend) throws InternalException { - return org.miaixz.bus.core.io.file.FileWriter.of(file, charset).writeLines(list, isAppend); + return FileWriter.of(file, charset).writeLines(list, isAppend); } /** @@ -2380,7 +2382,7 @@ public static File writeLines(final Collection list, final File file, fin * @throws InternalException IO异常 */ public static File writeUtf8Map(final Map map, final File file, final String kvSeparator, final boolean isAppend) throws InternalException { - return org.miaixz.bus.core.io.file.FileWriter.of(file, Charset.UTF_8).writeMap(map, kvSeparator, isAppend); + return FileWriter.of(file, Charset.UTF_8).writeMap(map, kvSeparator, isAppend); } /** @@ -2395,7 +2397,7 @@ public static File writeUtf8Map(final Map map, final File file, final Stri * @throws InternalException IO异常 */ public static File writeMap(final Map map, final File file, final java.nio.charset.Charset charset, final String kvSeparator, final boolean isAppend) throws InternalException { - return org.miaixz.bus.core.io.file.FileWriter.of(file, charset).writeMap(map, kvSeparator, isAppend); + return FileWriter.of(file, charset).writeMap(map, kvSeparator, isAppend); } /** @@ -2435,7 +2437,7 @@ public static File writeBytes(final byte[] data, final File dest) throws Interna * @throws InternalException IO异常 */ public static File writeBytes(final byte[] data, final File dest, final int off, final int len, final boolean isAppend) throws InternalException { - return org.miaixz.bus.core.io.file.FileWriter.of(dest).write(data, off, len, isAppend); + return FileWriter.of(dest).write(data, off, len, isAppend); } /** @@ -2486,7 +2488,7 @@ public static File convertCharset(final File file, final java.nio.charset.Charse */ public static File convertLineSeparator(final File file, final java.nio.charset.Charset charset, final LineSeparator lineSeparator) { final List lines = readLines(file, charset); - return org.miaixz.bus.core.io.file.FileWriter.of(file, charset).writeLines(lines, lineSeparator, false); + return FileWriter.of(file, charset).writeLines(lines, lineSeparator, false); } /** diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/IoKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/IoKit.java index 364223aa38..67ae2e03ad 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/IoKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/IoKit.java @@ -85,7 +85,7 @@ public class IoKit { * @throws InternalException IO异常 */ public static long copy(final Reader reader, final Writer writer) throws InternalException { - return copy(reader, writer, Normal.DEFAULT_BUFFER_SIZE); + return copy(reader, writer, Normal._8192); } /** @@ -141,7 +141,7 @@ public static long copy(final Reader reader, final Writer writer, final int buff * @throws InternalException IO异常 */ public static long copy(final InputStream in, final OutputStream out) throws InternalException { - return copy(in, out, Normal.DEFAULT_BUFFER_SIZE); + return copy(in, out, Normal._8192); } /** @@ -203,6 +203,158 @@ public static long copy(final FileInputStream in, final FileOutputStream out) th return FileChannelCopier.of().copy(in, out); } + /** + * 拷贝流,拷贝后不关闭流 + * + * @param in 输入流 + * @param out 输出流 + * @param buffer 缓存 + */ + public static void copy(InputStream in, OutputStream out, byte[] buffer) + throws IOException { + int count; + while ((count = in.read(buffer, 0, buffer.length)) > 0) + if (out != null) + out.write(buffer, 0, count); + } + + /** + * 拷贝流,拷贝后不关闭流 + * + * @param in 输入流 + * @param out 输出流 + * @param swapBytes 交换字节 + * @throws InternalException IO异常 + */ + public static void copy(InputStream in, OutputStream out, int len, int swapBytes) throws InternalException { + copy(in, out, len & 0xffffffffL, swapBytes); + } + + /** + * 拷贝流,拷贝后不关闭流 + * + * @param in 输入流 + * @param out 输出流 + * @param swapBytes 交换字节 + * @throws InternalException IO异常 + */ + public static void copy(InputStream in, OutputStream out, long len, int swapBytes) throws InternalException { + copy(in, out, len, swapBytes, new byte[(int) Math.min(len, Normal._2048)]); + } + + /** + * 拷贝流,拷贝后不关闭流 + * + * @param in 输入流 + * @param out 输出流 + * @param bufferSize 缓存大小 + * @throws InternalException IO异常 + */ + public static void copy(InputStream in, OutputStream out, long bufferSize) throws InternalException { + copy(in, out, bufferSize & 0xffffffffL, new byte[(int) Math.min(bufferSize, Normal._2048)]); + } + + /** + * 拷贝流,拷贝后不关闭流 + * + * @param in 输入流 + * @param out 输出流 + * @param bufferSize 缓存大小 + * @param buffer 缓存 + * @throws InternalException IO异常 + */ + public static void copy(InputStream in, OutputStream out, int bufferSize, byte[] buffer) throws InternalException { + copy(in, out, bufferSize & 0xffffffffL, buffer); + } + + /** + * 拷贝流,拷贝后不关闭流 + * + * @param in 输入流 + * @param out 输出流 + * @param bufferSize 缓存大小 + * @param buffer 缓存 + * @throws InternalException IO异常 + */ + public static void copy(InputStream in, OutputStream out, long bufferSize, byte[] buffer) throws InternalException { + if (bufferSize < 0) + throw new IndexOutOfBoundsException(); + try { + while (bufferSize > 0) { + int count = in.read(buffer, 0, (int) Math.min(bufferSize, buffer.length)); + if (count < 0) + throw new InternalException(); + out.write(buffer, 0, count); + bufferSize -= count; + } + } catch (IOException e) { + throw new InternalException(e); + } + } + + /** + * 拷贝流,拷贝后不关闭流 + * + * @param in 输入流 + * @param out 输出流 + * @param bufferSize 缓存大小 + * @param swapBytes 交换字节 + * @param buffer 缓存 + * @throws InternalException IO异常 + */ + public static void copy(InputStream in, OutputStream out, int bufferSize, int swapBytes, byte[] buffer) throws InternalException { + copy(in, out, bufferSize & 0xffffffffL, swapBytes, buffer); + } + + /** + * 拷贝流,拷贝后不关闭流 + * + * @param in 输入流 + * @param out 输出流 + * @param bufferSize 缓存大小 + * @param swapBytes 交换字节 + * @param buffer 缓存 + * @throws InternalException IO异常 + */ + public static void copy(InputStream in, OutputStream out, long bufferSize, int swapBytes, byte[] buffer) throws InternalException { + if (swapBytes == 1) { + copy(in, out, bufferSize, buffer); + return; + } + if (!(swapBytes == 2 || swapBytes == 4)) + throw new IllegalArgumentException("swapBytes: " + swapBytes); + if (bufferSize < 0 || (bufferSize % swapBytes) != 0) + throw new IllegalArgumentException("length: " + bufferSize); + int off = 0; + try { + while (bufferSize > 0) { + int count = in.read(buffer, off, (int) Math.min(bufferSize, buffer.length - off)); + if (count < 0) + throw new InternalException("" + count); + bufferSize -= count; + count += off; + off = count % swapBytes; + count -= off; + switch (swapBytes) { + case 2: + ByteKit.swapShorts(buffer, 0, count); + break; + case 4: + ByteKit.swapInts(buffer, 0, count); + break; + case 8: + ByteKit.swapLongs(buffer, 0, count); + break; + } + out.write(buffer, 0, count); + if (off > 0) + System.arraycopy(buffer, count, buffer, 0, off); + } + } catch (IOException e) { + throw new InternalException(e); + } + } + /** * 获得一个文件读取器,默认使用 UTF-8 编码 * @@ -341,7 +493,7 @@ public static String read(final Reader reader) throws InternalException { */ public static String read(final Reader reader, final boolean isClose) throws InternalException { final StringBuilder builder = StringKit.builder(); - final CharBuffer buffer = CharBuffer.allocate(Normal.DEFAULT_BUFFER_SIZE); + final CharBuffer buffer = CharBuffer.allocate(Normal._8192); try { while (-1 != reader.read(buffer)) { builder.append(buffer.flip()); @@ -1536,72 +1688,9 @@ public static long reverseBytesLong(long v) { | (v & 0x00000000000000ffL) << 56; } - public static void copy(InputStream in, OutputStream out, byte[] buf) - throws IOException { - int count; - while ((count = in.read(buf, 0, buf.length)) > 0) - if (null != out) { - out.write(buf, 0, count); - } - } - - public static void copy(InputStream in, OutputStream out, int len, - byte[] buf) throws IOException { - if (len < 0) - throw new IndexOutOfBoundsException(); - while (len > 0) { - int count = in.read(buf, 0, Math.min(len, buf.length)); - if (count < 0) - throw new EOFException(); - out.write(buf, 0, count); - len -= count; - } - } - - public static void copy(InputStream in, OutputStream out, int len, - int swapBytes) throws IOException { - copy(in, out, len, swapBytes, new byte[Math.min(len, 2048)]); - } - - public static void copy(InputStream in, OutputStream out, int len, - int swapBytes, byte[] buf) throws IOException { - if (swapBytes == 1) { - copy(in, out, len, buf); - return; - } - if (!(swapBytes == 2 || swapBytes == 4)) - throw new IllegalArgumentException("swapBytes: " + swapBytes); - if (len < 0 || (len % swapBytes) != 0) - throw new IllegalArgumentException("length: " + len); - int off = 0; - while (len > 0) { - int count = in.read(buf, off, Math.min(len, buf.length - off)); - if (count < 0) - throw new EOFException(); - len -= count; - count += off; - off = count % swapBytes; - count -= off; - switch (swapBytes) { - case 2: - ByteKit.swapShorts(buf, 0, count); - break; - case 4: - ByteKit.swapInts(buf, 0, count); - break; - case 8: - ByteKit.swapLongs(buf, 0, count); - break; - } - out.write(buf, 0, count); - if (off > 0) - System.arraycopy(buf, count, buf, 0, off); - } - } - public static InputStream openFileOrURL(String name) throws IOException { if (name.startsWith("resource:")) { - URL url = ResourceKit.getResourceUrl(name.substring(9), StreamKit.class); + URL url = ResourceKit.getResourceUrl(name.substring(9), IoKit.class); if (null == url) throw new FileNotFoundException(name); return url.openStream(); @@ -1670,7 +1759,7 @@ public static long copyNio(final FileChannel in, final FileChannel out) throws I * @throws InternalException IO异常 */ public static long copyNio(final ReadableByteChannel in, final WritableByteChannel out) throws InternalException { - return copyNio(in, out, Normal.DEFAULT_BUFFER_SIZE); + return copyNio(in, out, Normal._8192); } /** diff --git a/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/digest/Digester.java b/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/digest/Digester.java index 3471aae5f9..b1505983a6 100644 --- a/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/digest/Digester.java +++ b/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/digest/Digester.java @@ -213,7 +213,7 @@ public String digestHex(final String data) { /** * 生成文件摘要 - * 使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 使用默认缓存大小,见 {@link Normal#_8192} * * @param file 被摘要文件 * @return 摘要bytes @@ -231,7 +231,7 @@ public byte[] digest(final File file) throws CryptoException { /** * 生成文件摘要,并转为16进制字符串 - * 使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 使用默认缓存大小,见 {@link Normal#_8192} * * @param file 被摘要文件 * @return 摘要 @@ -280,18 +280,18 @@ public String digestHex(final byte[] data) { } /** - * 生成摘要,使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 生成摘要,使用默认缓存大小,见 {@link Normal#_8192} * * @param data {@link InputStream} 数据流 * @return 摘要bytes */ public byte[] digest(final InputStream data) { - return digest(data, Normal.DEFAULT_BUFFER_SIZE); + return digest(data, Normal._8192); } /** * 生成摘要,并转为16进制字符串 - * 使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 使用默认缓存大小,见 {@link Normal#_8192} * * @param data 被摘要数据 * @return 摘要 @@ -304,13 +304,13 @@ public String digestHex(final InputStream data) { * 生成摘要 * * @param data {@link InputStream} 数据流 - * @param bufferLength 缓存长度,不足1使用 {@link Normal#DEFAULT_BUFFER_SIZE} 做为默认值 + * @param bufferLength 缓存长度,不足1使用 {@link Normal#_8192} 做为默认值 * @return 摘要bytes * @throws InternalException IO异常 */ public byte[] digest(final InputStream data, int bufferLength) throws InternalException { if (bufferLength < 1) { - bufferLength = Normal.DEFAULT_BUFFER_SIZE; + bufferLength = Normal._8192; } final byte[] result; @@ -329,10 +329,10 @@ public byte[] digest(final InputStream data, int bufferLength) throws InternalEx /** * 生成摘要,并转为16进制字符串 - * 使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 使用默认缓存大小,见 {@link Normal#_8192} * * @param data 被摘要数据 - * @param bufferLength 缓存长度,不足1使用 {@link Normal#DEFAULT_BUFFER_SIZE} 做为默认值 + * @param bufferLength 缓存长度,不足1使用 {@link Normal#_8192} 做为默认值 * @return 摘要 */ public String digestHex(final InputStream data, final int bufferLength) { @@ -352,7 +352,7 @@ public int getDigestLength() { * 生成摘要 * * @param data {@link InputStream} 数据流 - * @param bufferLength 缓存长度,不足1使用 {@link Normal#DEFAULT_BUFFER_SIZE} 做为默认值 + * @param bufferLength 缓存长度,不足1使用 {@link Normal#_8192} 做为默认值 * @return 摘要bytes * @throws IOException 从流中读取数据引发的IO异常 */ @@ -370,7 +370,7 @@ private byte[] digestWithoutSalt(final InputStream data, final int bufferLength) * 生成摘要 * * @param data {@link InputStream} 数据流 - * @param bufferLength 缓存长度,不足1使用 {@link Normal#DEFAULT_BUFFER_SIZE} 做为默认值 + * @param bufferLength 缓存长度,不足1使用 {@link Normal#_8192} 做为默认值 * @return 摘要bytes * @throws IOException 从流中读取数据引发的IO异常 */ diff --git a/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/digest/mac/Mac.java b/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/digest/mac/Mac.java index 5de45139a3..4bc7aa10ee 100644 --- a/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/digest/mac/Mac.java +++ b/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/digest/mac/Mac.java @@ -75,12 +75,12 @@ default void update(final byte[] in) { * 生成摘要 * * @param data {@link InputStream} 数据流 - * @param bufferLength 缓存长度,不足1使用 {@link Normal#DEFAULT_BUFFER_SIZE} 做为默认值 + * @param bufferLength 缓存长度,不足1使用 {@link Normal#_8192} 做为默认值 * @return 摘要bytes */ default byte[] digest(final InputStream data, int bufferLength) { if (bufferLength < 1) { - bufferLength = Normal.DEFAULT_BUFFER_SIZE; + bufferLength = Normal._8192; } final byte[] buffer = new byte[bufferLength]; diff --git a/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/symmetric/Crypto.java b/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/symmetric/Crypto.java index 5545414a8c..86216034f5 100644 --- a/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/symmetric/Crypto.java +++ b/bus-crypto/src/main/java/org/miaixz/bus/crypto/builtin/symmetric/Crypto.java @@ -173,8 +173,8 @@ public Crypto(final String algorithm, final SecretKey key, final AlgorithmParame */ private static void copyForZeroPadding(final CipherInputStream in, final OutputStream out, final int blockSize) throws IOException { int n = 1; - if (Normal.DEFAULT_BUFFER_SIZE > blockSize) { - n = Math.max(n, Normal.DEFAULT_BUFFER_SIZE / blockSize); + if (Normal._8192 > blockSize) { + n = Math.max(n, Normal._8192 / blockSize); } // 此处缓存buffer使用blockSize的整数倍,方便读取时可以正好将补位的0读在一个buffer中 final int bufSize = blockSize * n; diff --git a/bus-crypto/src/main/java/org/miaixz/bus/crypto/center/Mac.java b/bus-crypto/src/main/java/org/miaixz/bus/crypto/center/Mac.java index de113e1ff1..93a3974e4c 100644 --- a/bus-crypto/src/main/java/org/miaixz/bus/crypto/center/Mac.java +++ b/bus-crypto/src/main/java/org/miaixz/bus/crypto/center/Mac.java @@ -146,7 +146,7 @@ public String digestHex(final String data) { /** * 生成文件摘要 - * 使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 使用默认缓存大小,见 {@link Normal#_8192} * * @param file 被摘要文件 * @return 摘要bytes @@ -164,7 +164,7 @@ public byte[] digest(final File file) throws CryptoException { /** * 生成文件摘要,并转为16进制字符串 - * 使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 使用默认缓存大小,见 {@link Normal#_8192} * * @param file 被摘要文件 * @return 摘要 @@ -194,18 +194,18 @@ public String digestHex(final byte[] data) { } /** - * 生成摘要,使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 生成摘要,使用默认缓存大小,见 {@link Normal#_8192} * * @param data {@link InputStream} 数据流 * @return 摘要bytes */ public byte[] digest(final InputStream data) { - return digest(data, Normal.DEFAULT_BUFFER_SIZE); + return digest(data, Normal._8192); } /** * 生成摘要,并转为16进制字符串 - * 使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 使用默认缓存大小,见 {@link Normal#_8192} * * @param data 被摘要数据 * @return 摘要 @@ -218,7 +218,7 @@ public String digestHex(final InputStream data) { * 生成摘要 * * @param data {@link InputStream} 数据流 - * @param bufferLength 缓存长度,不足1使用 {@link Normal#DEFAULT_BUFFER_SIZE} 做为默认值 + * @param bufferLength 缓存长度,不足1使用 {@link Normal#_8192} 做为默认值 * @return 摘要bytes */ public byte[] digest(final InputStream data, final int bufferLength) { @@ -227,10 +227,10 @@ public byte[] digest(final InputStream data, final int bufferLength) { /** * 生成摘要,并转为16进制字符串 - * 使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 使用默认缓存大小,见 {@link Normal#_8192} * * @param data 被摘要数据 - * @param bufferLength 缓存长度,不足1使用 {@link Normal#DEFAULT_BUFFER_SIZE} 做为默认值 + * @param bufferLength 缓存长度,不足1使用 {@link Normal#_8192} 做为默认值 * @return 摘要 */ public String digestHex(final InputStream data, final int bufferLength) { diff --git a/bus-crypto/src/main/java/org/miaixz/bus/crypto/center/Sign.java b/bus-crypto/src/main/java/org/miaixz/bus/crypto/center/Sign.java index 110cd596c1..6afe3487a0 100644 --- a/bus-crypto/src/main/java/org/miaixz/bus/crypto/center/Sign.java +++ b/bus-crypto/src/main/java/org/miaixz/bus/crypto/center/Sign.java @@ -275,7 +275,7 @@ public String signHex(final byte[] data) { /** * 生成签名,并转为16进制字符串 - * 使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 使用默认缓存大小,见 {@link Normal#_8192} * * @param data 被签名数据 * @return 签名 @@ -285,21 +285,21 @@ public String signHex(final InputStream data) { } /** - * 生成签名,使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 生成签名,使用默认缓存大小,见 {@link Normal#_8192} * * @param data {@link InputStream} 数据流 * @return 签名bytes */ public byte[] sign(final InputStream data) { - return sign(data, Normal.DEFAULT_BUFFER_SIZE); + return sign(data, Normal._8192); } /** * 生成签名,并转为16进制字符串 - * 使用默认缓存大小,见 {@link Normal#DEFAULT_BUFFER_SIZE} + * 使用默认缓存大小,见 {@link Normal#_8192} * * @param data 被签名数据 - * @param bufferLength 缓存长度,不足1使用 {@link Normal#DEFAULT_BUFFER_SIZE} 做为默认值 + * @param bufferLength 缓存长度,不足1使用 {@link Normal#_8192} 做为默认值 * @return 签名 */ public String digestHex(final InputStream data, final int bufferLength) { @@ -310,12 +310,12 @@ public String digestHex(final InputStream data, final int bufferLength) { * 生成签名 * * @param data {@link InputStream} 数据流 - * @param bufferLength 缓存长度,不足1使用 {@link Normal#DEFAULT_BUFFER_SIZE} 做为默认值 + * @param bufferLength 缓存长度,不足1使用 {@link Normal#_8192} 做为默认值 * @return 签名bytes */ public byte[] sign(final InputStream data, int bufferLength) { if (bufferLength < 1) { - bufferLength = Normal.DEFAULT_BUFFER_SIZE; + bufferLength = Normal._8192; } final byte[] buffer = new byte[bufferLength]; diff --git a/bus-office/src/main/java/org/miaixz/bus/office/csv/CsvParser.java b/bus-office/src/main/java/org/miaixz/bus/office/csv/CsvParser.java index e692e06abe..6450409171 100644 --- a/bus-office/src/main/java/org/miaixz/bus/office/csv/CsvParser.java +++ b/bus-office/src/main/java/org/miaixz/bus/office/csv/CsvParser.java @@ -102,7 +102,7 @@ public final class CsvParser extends ComputeIterator implements Closeabl * @param config 配置,null则为默认配置 */ public CsvParser(final Reader reader, final CsvReadConfig config) { - this(reader, config, Normal.DEFAULT_LARGE_BUFFER_SIZE); + this(reader, config, Normal._32768); } /** diff --git a/bus-setting/src/main/java/org/miaixz/bus/setting/Loader.java b/bus-setting/src/main/java/org/miaixz/bus/setting/Loader.java index d70ccbbc6a..c5d7770536 100644 --- a/bus-setting/src/main/java/org/miaixz/bus/setting/Loader.java +++ b/bus-setting/src/main/java/org/miaixz/bus/setting/Loader.java @@ -388,7 +388,7 @@ protected IniSetting defaultFormat(java.io.Reader reader, int builderCapacity) t Format format = getFormatter(); List iniElements = new ArrayList<>(); // new line split - String newLineSplit = System.getProperty("line.separator", Symbol.LF); + String newLineSplit = System.getProperty(Keys.LINE_SEPARATOR, Symbol.LF); StringBuilder line = new StringBuilder(builderCapacity); int ch; diff --git a/bus-setting/src/main/java/org/miaixz/bus/setting/metric/ini/IniSectionService.java b/bus-setting/src/main/java/org/miaixz/bus/setting/metric/ini/IniSectionService.java index b238c4f816..e71eb657b8 100644 --- a/bus-setting/src/main/java/org/miaixz/bus/setting/metric/ini/IniSectionService.java +++ b/bus-setting/src/main/java/org/miaixz/bus/setting/metric/ini/IniSectionService.java @@ -27,6 +27,7 @@ */ package org.miaixz.bus.setting.metric.ini; +import org.miaixz.bus.core.lang.Keys; import org.miaixz.bus.core.lang.Symbol; import java.util.ArrayList; @@ -96,7 +97,7 @@ protected String valueChanged(String newValue) { */ @Override public String toPropertiesString() { - StringJoiner joiner = new StringJoiner(System.getProperty("line.separator", Symbol.LF)); + StringJoiner joiner = new StringJoiner(System.getProperty(Keys.LINE_SEPARATOR, Symbol.LF)); joiner.add(toString()); for (IniProperty p : this) { joiner.add(p); diff --git a/bus-setting/src/main/java/org/miaixz/bus/setting/metric/ini/IniSetting.java b/bus-setting/src/main/java/org/miaixz/bus/setting/metric/ini/IniSetting.java index 77d153f3a0..19716aa4cf 100644 --- a/bus-setting/src/main/java/org/miaixz/bus/setting/metric/ini/IniSetting.java +++ b/bus-setting/src/main/java/org/miaixz/bus/setting/metric/ini/IniSetting.java @@ -27,6 +27,7 @@ */ package org.miaixz.bus.setting.metric.ini; +import org.miaixz.bus.core.lang.Keys; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.setting.Builder; @@ -83,7 +84,7 @@ public String toString() { } private String getNewLineSplit() { - return System.getProperty("line.separator", Symbol.LF); + return System.getProperty(Keys.LINE_SEPARATOR, Symbol.LF); } /** diff --git a/bus-shade/src/main/java/org/miaixz/bus/shade/safety/Builder.java b/bus-shade/src/main/java/org/miaixz/bus/shade/safety/Builder.java index 99c5eccaea..b2dd376eea 100755 --- a/bus-shade/src/main/java/org/miaixz/bus/shade/safety/Builder.java +++ b/bus-shade/src/main/java/org/miaixz/bus/shade/safety/Builder.java @@ -27,6 +27,7 @@ */ package org.miaixz.bus.shade.safety; +import org.miaixz.bus.core.lang.Keys; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.shade.safety.algorithm.Key; @@ -77,7 +78,7 @@ public abstract class Builder { public static final String XJAR_KEY_HOLD = "hold"; public static final String BOOT_INF_CLASSES = "BOOT-INF/classes/"; public static final String BOOT_INF_LIB = "BOOT-INF/lib/"; - public static final String CRLF = System.getProperty("line.separator"); + public static final String CRLF = System.getProperty(Keys.LINE_SEPARATOR); public static final String ALGORITHM = "AES"; public static int DEFAULT_KEYSIZE = Normal._128; public static int DEFAULT_IVSIZE = Normal._128; From 02b6786cf651806fc93a553cb05aa07fa7799968 Mon Sep 17 00:00:00 2001 From: Kimi Liu <839536@qq.com> Date: Fri, 19 Jul 2024 20:51:30 +0800 Subject: [PATCH 13/16] =?UTF-8?q?update:=20=20=E5=9B=BE=E5=BD=A2=E5=9B=BE?= =?UTF-8?q?=E5=83=8F=E8=A7=A3=E6=9E=90=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/miaixz/bus/core/xyz/NetKit.java | 4 - bus-image/pom.xml | 6 + .../main/java/org/miaixz/bus/image/Args.java | 191 +- .../java/org/miaixz/bus/image/Builder.java | 1473 +- .../java/org/miaixz/bus/image/Centre.java | 17 +- .../java/org/miaixz/bus/image/Device.java | 187 +- .../main/java/org/miaixz/bus/image/Dimse.java | 26 +- .../java/org/miaixz/bus/image/Editors.java | 4 +- .../java/org/miaixz/bus/image/Format.java | 660 +- .../bus/image/{galaxy/data => }/IOD.java | 215 +- .../main/java/org/miaixz/bus/image/Node.java | 64 +- .../java/org/miaixz/bus/image/Option.java | 126 +- .../java/org/miaixz/bus/image/Status.java | 429 +- .../main/java/org/miaixz/bus/image/Tag.java | 600 +- .../main/java/org/miaixz/bus/image/UID.java | 3765 +-- .../image/builtin/AcquisitionModality.java | 0 .../bus/image/builtin/AnatomicRegion.java | 630 +- .../builtin/ArchiveElementDictionary.java | 118 - .../miaixz/bus/image/builtin/ArchiveKey.java | 152 - .../builtin/ContributingOfReference.java | 49 + .../builtin/DeIdentificationCoercion.java | 8 +- .../image/builtin/DeIdentificationMethod.java | 3 +- .../bus/image/builtin/DeIdentifier.java | 40 +- .../miaixz/bus/image/builtin/DicomFiles.java | 124 + .../miaixz/bus/image/builtin/ESoundex.java | 40 + .../miaixz/bus/image/builtin/ESoundex9.java | 40 + .../miaixz/bus/image/builtin/FilesetInfo.java | 75 + .../{FuzzyStr.java => FuzzyString.java} | 2 +- .../bus/image/builtin/HashUIDMapper.java | 0 .../miaixz/bus/image/builtin/KPhonetik.java | 2 +- .../miaixz/bus/image/builtin/Metaphone.java | 2 +- ...ltiframe.java => MultiframeExtractor.java} | 126 +- .../image/builtin/NumberOfFramesAccessor.java | 40 + .../org/miaixz/bus/image/builtin/Phonem.java | 17 +- .../bus/image/builtin/ProcedureReasons.java | 111 + .../image/builtin/ScopeOfAccumulation.java | 69 + .../org/miaixz/bus/image/builtin/Soundex.java | 4 +- .../miaixz/bus/image/builtin/UIDMapper.java | 0 .../org/miaixz/bus/image/builtin/YesNo.java | 54 + .../bus/image/builtin/ldap/LdapBuilder.java | 643 + .../builtin/ldap/LdapDicomConfiguration.java | 2673 +++ .../ldap/LdapDicomConfigurationExtension.java | 113 + .../bus/image/builtin/ldap/LdapEnv.java | 60 + .../builtin/ldap/ReconnectDirContext.java | 158 + .../image/builtin/ldap/ResourceManager.java | 84 + .../bus/image/builtin/ldap/package-info.java | 35 + .../bus/image/builtin/package-info.java | 35 + .../miaixz/bus/image/galaxy/BinaryPrefix.java | 126 - .../{metric => galaxy}/CancelListener.java | 2 +- .../bus/image/galaxy/CountingInputStream.java | 96 + .../image/galaxy/CountingOutputStream.java | 65 + .../bus/image/galaxy/EditorContext.java | 125 + .../miaixz/bus/image/galaxy/ImageParam.java | 68 + .../ImageProgress.java} | 31 +- .../bus/image/galaxy/LimitedInputStream.java | 107 + .../org/miaixz/bus/image/galaxy/Material.java | 493 - .../{metric => galaxy}/ProgressListener.java | 4 +- ...{Availability.java => ProgressStatus.java} | 6 +- .../bus/image/galaxy/RelatedSOPClasses.java | 59 + .../miaixz/bus/image/galaxy/ReverseDNS.java | 67 + .../miaixz/bus/image/galaxy/SafeBuffer.java | 72 + .../bus/image/galaxy/ScheduleExpression.java | 189 - .../miaixz/bus/image/galaxy/SupplierEx.java | 39 + .../bus/image/galaxy/TeeInputStream.java | 66 + ...esSelector.java => AttributeSelector.java} | 49 +- .../bus/image/galaxy/data/Attributes.java | 1295 +- .../image/galaxy/data/AttributesCoercion.java | 2 +- .../image/galaxy/data/BinaryValueType.java | 216 +- .../bus/image/galaxy/data/BulkData.java | 136 +- .../BulkDataWithPrefix.java} | 29 +- .../miaixz/bus/image/galaxy/data/Code.java | 177 +- .../bus/image/galaxy/data/DatePrecision.java | 16 + .../bus/image/galaxy/data/DateRange.java | 30 +- .../image/galaxy/data/ElementDictionary.java | 31 +- .../bus/image/galaxy/data/Fragments.java | 63 +- .../bus/image/galaxy/data/HL7Separator.java | 73 + .../bus/image/galaxy/data/IDWithIssuer.java | 270 + .../bus/image/galaxy/data/IODCache.java | 4 +- .../bus/image/galaxy/data/Implementation.java | 9 +- .../miaixz/bus/image/galaxy/data/Issuer.java | 149 +- .../bus/image/galaxy/data/ItemPointer.java | 29 +- .../image/galaxy/data/ItemPointerVisitor.java | 51 + .../miaixz/bus/image/galaxy/data/Keyword.java | 19641 ++++++++-------- .../galaxy/data/MergeAttributesCoercion.java | 10 +- .../data/NullifyAttributesCoercion.java | 17 +- .../bus/image/galaxy/data/PersonName.java | 70 +- ....java => RemapUIDsAttributesCoercion.java} | 18 +- .../bus/image/galaxy/data/Sequence.java | 64 +- .../image/galaxy/data/SequenceValueType.java | 27 +- .../image/galaxy/data/SequenceVisitor.java | 46 + .../galaxy/data/SpecificCharacterSet.java | 251 +- .../image/galaxy/data/StandardDictionary.java | 4919 ---- .../data/StandardElementDictionary.java | 5452 +++++ .../image/galaxy/data/StringValueType.java | 179 +- .../bus/image/galaxy/data/TemporalType.java | 7 +- .../galaxy/data/TrimISO2020Coercion.java | 63 + .../data/TypeOfPatientID.java} | 16 +- .../bus/image/galaxy/data/UIDVisitor.java | 98 + .../bus/image/galaxy/data/UpdatePolicy.java | 40 + .../org/miaixz/bus/image/galaxy/data/VR.java | 190 +- .../image/galaxy/data/ValidationResult.java | 73 +- .../miaixz/bus/image/galaxy/data/Value.java | 0 .../bus/image/galaxy/data/ValueSelector.java | 28 +- .../bus/image/galaxy/data/ValueType.java | 20 +- .../miaixz/bus/image/galaxy/data/Visitor.java | 39 + .../bus/image/galaxy/data/package-info.java | 35 + .../PrivateElementDictionary.java | 59 + .../AMI_Annotations_01/PrivateKeyword.java | 47 + .../dict/AMI_Annotations_01/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../AMI_Annotations_02/PrivateKeyword.java | 47 + .../dict/AMI_Annotations_02/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 49 + .../AMI_ImageContextExt_01/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 68 + .../AMI_ImageContext_01/PrivateKeyword.java | 63 + .../dict/AMI_ImageContext_01/PrivateTag.java | 65 + .../PrivateElementDictionary.java | 65 + .../AMI_ImageTransform_01/PrivateKeyword.java | 57 + .../AMI_ImageTransform_01/PrivateTag.java | 56 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 49 + .../PrivateTag.java | 44 + .../PrivateElementDictionary.java | 78 + .../PrivateKeyword.java | 71 + .../PrivateTag.java | 77 + .../PrivateElementDictionary.java | 78 + .../PrivateKeyword.java | 71 + .../PrivateTag.java | 77 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../AMI_StudyExtensions_01/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../dict/APEX_PRIVATE/PrivateKeyword.java | 47 + .../galaxy/dict/APEX_PRIVATE/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 49 + .../PrivateTag.java | 44 + .../PrivateElementDictionary.java | 71 + .../PrivateKeyword.java | 63 + .../PrivateTag.java | 65 + .../PrivateElementDictionary.java | 105 + .../PrivateKeyword.java | 125 + .../PrivateTag.java | 158 + .../PrivateElementDictionary.java | 117 + .../PrivateKeyword.java | 141 + .../PrivateTag.java | 182 + .../PrivateElementDictionary.java | 87 + .../PrivateKeyword.java | 83 + .../PrivateTag.java | 95 + .../PrivateElementDictionary.java | 66 + .../PrivateKeyword.java | 55 + .../PrivateTag.java | 53 + .../PrivateElementDictionary.java | 79 + .../PrivateKeyword.java | 81 + .../PrivateTag.java | 92 + .../BioPri3D/PrivateElementDictionary.java | 83 + .../galaxy/dict/BioPri3D/PrivateKeyword.java | 81 + .../galaxy/dict/BioPri3D/PrivateTag.java | 92 + .../PrivateElementDictionary.java | 79 + .../dict/CARDIO_D_R__1_0/PrivateKeyword.java | 77 + .../dict/CARDIO_D_R__1_0/PrivateTag.java | 86 + .../PrivateElementDictionary.java | 66 + .../PrivateKeyword.java | 57 + .../CARDIO_D_R__1_0_siemens/PrivateTag.java | 56 + .../PrivateElementDictionary.java | 104 + .../dict/DIDI_TO_PCR_1_1/PrivateKeyword.java | 129 + .../dict/DIDI_TO_PCR_1_1/PrivateTag.java | 164 + .../PrivateElementDictionary.java | 63 + .../DIGISCAN_IMAGE/PrivateKeyword.java} | 35 +- .../dict/DIGISCAN_IMAGE/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 66 + .../dict/DLX_ANNOT_01/PrivateKeyword.java | 55 + .../galaxy/dict/DLX_ANNOT_01/PrivateTag.java | 47 + .../PrivateElementDictionary.java | 61 + .../dict/DLX_EXAMS_01/PrivateKeyword.java | 51 + .../galaxy/dict/DLX_EXAMS_01/PrivateTag.java | 47 + .../DLX_LKUP_01/PrivateElementDictionary.java | 64 + .../dict/DLX_LKUP_01/PrivateKeyword.java | 53 + .../galaxy/dict/DLX_LKUP_01/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 59 + .../dict/DLX_PATNT_01/PrivateKeyword.java | 47 + .../galaxy/dict/DLX_PATNT_01/PrivateTag.java | 41 + .../PrivateElementDictionary.java} | 105 +- .../dict/DLX_SERIE_01/PrivateKeyword.java | 111 + .../galaxy/dict/DLX_SERIE_01/PrivateTag.java | 137 + .../PrivateElementDictionary.java | 59 + .../dict/DL_INTERNAL_USE/PrivateKeyword.java | 47 + .../dict/DL_INTERNAL_USE/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../FFP_DATA/PrivateElementDictionary.java | 57 + .../galaxy/dict/FFP_DATA/PrivateKeyword.java | 47 + .../galaxy/dict/FFP_DATA/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 77 + .../GEHC_CT_ADVAPP_001/PrivateKeyword.java | 79 + .../dict/GEHC_CT_ADVAPP_001/PrivateTag.java | 89 + .../dict/GEIIS/PrivateElementDictionary.java | 80 + .../galaxy/dict/GEIIS/PrivateKeyword.java | 79 + .../image/galaxy/dict/GEIIS/PrivateTag.java | 89 + .../GEIIS_IW/PrivateElementDictionary.java | 117 + .../galaxy/dict/GEIIS_IW/PrivateKeyword.java | 143 + .../galaxy/dict/GEIIS_IW/PrivateTag.java | 185 + .../GEIIS_PACS/PrivateElementDictionary.java | 69 + .../dict/GEIIS_PACS/PrivateKeyword.java | 63 + .../galaxy/dict/GEIIS_PACS/PrivateTag.java | 65 + .../PrivateElementDictionary.java | 64 + .../dict/GEIIS_RA1000/PrivateKeyword.java | 53 + .../galaxy/dict/GEIIS_RA1000/PrivateTag.java | 50 + .../GEMS_0039/PrivateElementDictionary.java | 59 + .../galaxy/dict/GEMS_0039/PrivateKeyword.java | 47 + .../galaxy/dict/GEMS_0039/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 65 + .../dict/GEMS_3DSTATE_001/PrivateKeyword.java | 55 + .../dict/GEMS_3DSTATE_001/PrivateTag.java | 53 + .../PrivateElementDictionary.java | 101 + .../dict/GEMS_3D_INTVL_01/PrivateKeyword.java | 119 + .../dict/GEMS_3D_INTVL_01/PrivateTag.java | 149 + .../PrivateElementDictionary.java | 247 + .../dict/GEMS_ACQU_01/PrivateKeyword.java | 415 + .../galaxy/dict/GEMS_ACQU_01/PrivateTag.java | 593 + .../PrivateElementDictionary.java | 69 + .../GEMS_ACRQA_1_0_BLOCK1/PrivateKeyword.java | 65 + .../GEMS_ACRQA_1_0_BLOCK1/PrivateTag.java | 68 + .../PrivateElementDictionary.java | 69 + .../GEMS_ACRQA_1_0_BLOCK2/PrivateKeyword.java | 65 + .../GEMS_ACRQA_1_0_BLOCK2/PrivateTag.java | 68 + .../PrivateElementDictionary.java | 70 + .../GEMS_ACRQA_1_0_BLOCK3/PrivateKeyword.java | 65 + .../GEMS_ACRQA_1_0_BLOCK3/PrivateTag.java | 68 + .../PrivateElementDictionary.java | 69 + .../GEMS_ACRQA_2_0_BLOCK1/PrivateKeyword.java | 65 + .../GEMS_ACRQA_2_0_BLOCK1/PrivateTag.java | 68 + .../PrivateElementDictionary.java | 70 + .../GEMS_ACRQA_2_0_BLOCK2/PrivateKeyword.java | 65 + .../GEMS_ACRQA_2_0_BLOCK2/PrivateTag.java | 68 + .../PrivateElementDictionary.java | 72 + .../GEMS_ACRQA_2_0_BLOCK3/PrivateKeyword.java | 69 + .../GEMS_ACRQA_2_0_BLOCK3/PrivateTag.java | 74 + .../PrivateElementDictionary.java | 120 + .../dict/GEMS_ADWSoft_3D1/PrivateKeyword.java | 149 + .../dict/GEMS_ADWSoft_3D1/PrivateTag.java | 194 + .../PrivateElementDictionary.java | 67 + .../dict/GEMS_ADWSoft_DPO/PrivateKeyword.java | 55 + .../dict/GEMS_ADWSoft_DPO/PrivateTag.java | 53 + .../PrivateElementDictionary.java | 59 + .../GEMS_ADWSoft_DPO1/PrivateKeyword.java | 47 + .../dict/GEMS_ADWSoft_DPO1/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 73 + .../dict/GEMS_AWSOFT_CD1/PrivateKeyword.java | 63 + .../dict/GEMS_AWSOFT_CD1/PrivateTag.java | 65 + .../PrivateElementDictionary.java | 64 + .../dict/GEMS_AWSoft_SB1/PrivateKeyword.java | 53 + .../dict/GEMS_AWSoft_SB1/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 57 + .../dict/GEMS_CTHD_01/PrivateKeyword.java | 47 + .../galaxy/dict/GEMS_CTHD_01/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 83 + .../GEMS_CT_CARDIAC_001/PrivateKeyword.java | 83 + .../dict/GEMS_CT_CARDIAC_001/PrivateTag.java | 95 + .../PrivateElementDictionary.java | 62 + .../dict/GEMS_CT_HINO_01/PrivateKeyword.java | 51 + .../dict/GEMS_CT_HINO_01/PrivateTag.java | 47 + .../PrivateElementDictionary.java | 59 + .../dict/GEMS_CT_VES_01/PrivateKeyword.java | 47 + .../dict/GEMS_CT_VES_01/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 105 + .../dict/GEMS_DL_FRAME_01/PrivateKeyword.java | 131 + .../dict/GEMS_DL_FRAME_01/PrivateTag.java | 167 + .../PrivateElementDictionary.java | 196 + .../dict/GEMS_DL_IMG_01/PrivateKeyword.java | 299 + .../dict/GEMS_DL_IMG_01/PrivateTag.java | 419 + .../PrivateElementDictionary.java | 64 + .../dict/GEMS_DL_PATNT_01/PrivateKeyword.java | 53 + .../dict/GEMS_DL_PATNT_01/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 67 + .../GEMS_DL_SERIES_01/PrivateKeyword.java | 57 + .../dict/GEMS_DL_SERIES_01/PrivateTag.java | 56 + .../PrivateElementDictionary.java | 88 + .../dict/GEMS_DL_STUDY_01/PrivateKeyword.java | 95 + .../dict/GEMS_DL_STUDY_01/PrivateTag.java | 113 + .../GEMS_DRS_1/PrivateElementDictionary.java | 67 + .../dict/GEMS_DRS_1/PrivateKeyword.java | 57 + .../galaxy/dict/GEMS_DRS_1/PrivateTag.java | 56 + .../PrivateElementDictionary.java | 67 + .../dict/GEMS_FALCON_03/PrivateKeyword.java | 61 + .../dict/GEMS_FALCON_03/PrivateTag.java | 62 + .../PrivateElementDictionary.java | 76 + .../dict/GEMS_FUNCTOOL_01/PrivateKeyword.java | 73 + .../dict/GEMS_FUNCTOOL_01/PrivateTag.java | 80 + .../PrivateElementDictionary.java | 64 + .../PrivateKeyword.java | 53 + .../PrivateTag.java | 50 + .../PrivateElementDictionary.java | 100 + .../GEMS_GDXE_FALCON_04/PrivateKeyword.java | 123 + .../dict/GEMS_GDXE_FALCON_04/PrivateTag.java | 155 + .../PrivateElementDictionary.java | 347 + .../dict/GEMS_GENIE_1/PrivateKeyword.java | 595 + .../galaxy/dict/GEMS_GENIE_1/PrivateTag.java | 863 + .../PrivateElementDictionary.java | 57 + .../dict/GEMS_GNHD_01/PrivateKeyword.java | 49 + .../galaxy/dict/GEMS_GNHD_01/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 110 + .../dict/GEMS_HELIOS_01/PrivateKeyword.java | 141 + .../dict/GEMS_HELIOS_01/PrivateTag.java | 182 + .../PrivateElementDictionary.java | 80 + .../dict/GEMS_IDEN_01/PrivateKeyword.java | 77 + .../galaxy/dict/GEMS_IDEN_01/PrivateTag.java | 86 + .../GEMS_IDI_01/PrivateElementDictionary.java | 66 + .../dict/GEMS_IDI_01/PrivateKeyword.java | 59 + .../galaxy/dict/GEMS_IDI_01/PrivateTag.java | 59 + .../PrivateElementDictionary.java | 97 + .../dict/GEMS_IMAG_01/PrivateKeyword.java | 117 + .../galaxy/dict/GEMS_IMAG_01/PrivateTag.java | 146 + .../PrivateElementDictionary.java | 68 + .../dict/GEMS_IMPS_01/PrivateKeyword.java | 63 + .../galaxy/dict/GEMS_IMPS_01/PrivateTag.java | 65 + .../PrivateElementDictionary.java | 59 + .../GEMS_IQTB_IDEN_47/PrivateKeyword.java | 47 + .../dict/GEMS_IQTB_IDEN_47/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 61 + .../GEMS_IT_US_REPORT/PrivateKeyword.java | 51 + .../dict/GEMS_IT_US_REPORT/PrivateTag.java | 47 + .../PrivateElementDictionary.java | 65 + .../dict/GEMS_LUNAR_RAW/PrivateKeyword.java | 53 + .../dict/GEMS_LUNAR_RAW/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 198 + .../dict/GEMS_PARM_01/PrivateKeyword.java | 299 + .../galaxy/dict/GEMS_PARM_01/PrivateTag.java | 419 + .../PrivateElementDictionary.java | 59 + .../dict/GEMS_PATI_01/PrivateKeyword.java | 47 + .../galaxy/dict/GEMS_PATI_01/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 386 + .../dict/GEMS_PETD_01/PrivateKeyword.java | 673 + .../galaxy/dict/GEMS_PETD_01/PrivateTag.java | 980 + .../PrivateElementDictionary.java | 104 + .../dict/GEMS_RELA_01/PrivateKeyword.java | 121 + .../galaxy/dict/GEMS_RELA_01/PrivateTag.java | 152 + .../PrivateElementDictionary.java | 67 + .../dict/GEMS_SEND_02/PrivateKeyword.java | 61 + .../galaxy/dict/GEMS_SEND_02/PrivateTag.java | 62 + .../PrivateElementDictionary.java | 67 + .../GEMS_SENOCRYSTAL_V1/PrivateKeyword.java | 61 + .../dict/GEMS_SENOCRYSTAL_V1/PrivateTag.java | 62 + .../PrivateElementDictionary.java | 163 + .../dict/GEMS_SENO_02/PrivateKeyword.java | 235 + .../galaxy/dict/GEMS_SENO_02/PrivateTag.java | 323 + .../PrivateElementDictionary.java | 71 + .../dict/GEMS_SERS_01/PrivateKeyword.java | 65 + .../galaxy/dict/GEMS_SERS_01/PrivateTag.java | 68 + .../PrivateElementDictionary.java | 69 + .../dict/GEMS_STDY_01/PrivateKeyword.java | 61 + .../galaxy/dict/GEMS_STDY_01/PrivateTag.java | 62 + .../PrivateElementDictionary.java | 60 + .../PrivateKeyword.java | 49 + .../PrivateTag.java | 44 + .../PrivateElementDictionary.java | 64 + .../PrivateKeyword.java | 53 + .../PrivateTag.java | 50 + .../PrivateElementDictionary.java | 110 + .../PrivateKeyword.java | 131 + .../PrivateTag.java | 167 + .../PrivateElementDictionary.java | 59 + .../GEMS_VXTL_USERDATA_01/PrivateKeyword.java | 47 + .../GEMS_VXTL_USERDATA_01/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 89 + .../dict/GEMS_XELPRV_01/PrivateKeyword.java | 87 + .../dict/GEMS_XELPRV_01/PrivateTag.java | 101 + .../PrivateElementDictionary.java | 59 + .../dict/GEMS_XR3DCAL_01/PrivateKeyword.java | 47 + .../dict/GEMS_XR3DCAL_01/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 57 + .../dict/GEMS_YMHD_01/PrivateKeyword.java | 49 + .../galaxy/dict/GEMS_YMHD_01/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 66 + .../PrivateKeyword.java | 55 + .../PrivateTag.java | 53 + .../PrivateElementDictionary.java | 75 + .../GE_GENESIS_REV3_0/PrivateKeyword.java | 75 + .../dict/GE_GENESIS_REV3_0/PrivateTag.java | 83 + .../GE_GROUP/PrivateElementDictionary.java | 59 + .../galaxy/dict/GE_GROUP/PrivateKeyword.java | 47 + .../galaxy/dict/GE_GROUP/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 62 + .../dict/GE_Generic_Data/PrivateKeyword.java | 51 + .../dict/GE_Generic_Data/PrivateTag.java | 47 + .../PrivateElementDictionary.java | 69 + .../GE_Informatics_Data/PrivateKeyword.java | 59 + .../dict/GE_Informatics_Data/PrivateTag.java | 59 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 64 + .../PrivateKeyword.java | 57 + .../PrivateTag.java | 56 + .../dict/ISI/PrivateElementDictionary.java | 57 + .../image/galaxy/dict/ISI/PrivateKeyword.java | 47 + .../bus/image/galaxy/dict/ISI/PrivateTag.java | 41 + .../KINETDX/PrivateElementDictionary.java | 67 + .../galaxy/dict/KINETDX/PrivateKeyword.java | 59 + .../image/galaxy/dict/KINETDX/PrivateTag.java | 59 + .../PrivateElementDictionary.java | 59 + .../dict/KINETDX_GRAPHICS/PrivateKeyword.java | 47 + .../dict/KINETDX_GRAPHICS/PrivateTag.java | 41 + .../KRETZ_US/PrivateElementDictionary.java | 59 + .../galaxy/dict/KRETZ_US/PrivateKeyword.java | 47 + .../galaxy/dict/KRETZ_US/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 57 + .../PrivateKeyword.java | 91 + .../Mayo_IBM_Archive_Project/PrivateTag.java | 107 + .../PrivateElementDictionary.java | 190 + .../PrivateKeyword.java | 285 + .../PHILIPS_IMAGING_DD_001_1/PrivateTag.java | 398 + .../PHILIPS_MR/PrivateElementDictionary.java | 60 + .../dict/PHILIPS_MR/PrivateKeyword.java | 49 + .../galaxy/dict/PHILIPS_MR/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 62 + .../dict/PHILIPS_MR_1/PrivateKeyword.java | 53 + .../galaxy/dict/PHILIPS_MR_1/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 199 + .../PrivateKeyword.java | 311 + .../PrivateTag.java | 437 + .../PrivateElementDictionary.java | 116 + .../dict/PHILIPS_MR_LAST/PrivateKeyword.java | 153 + .../dict/PHILIPS_MR_LAST/PrivateTag.java | 200 + .../PrivateElementDictionary.java | 211 + .../dict/PHILIPS_MR_PART/PrivateKeyword.java | 341 + .../dict/PHILIPS_MR_PART/PrivateTag.java | 482 + .../PrivateElementDictionary.java | 59 + .../PHILIPS_MR_PART_12/PrivateKeyword.java | 47 + .../dict/PHILIPS_MR_PART_12/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PHILIPS_MR_PART_6/PrivateKeyword.java | 47 + .../dict/PHILIPS_MR_PART_6/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PHILIPS_MR_PART_7/PrivateKeyword.java | 47 + .../dict/PHILIPS_MR_PART_7/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PHILIPS_MR_R5_5_PART/PrivateKeyword.java | 47 + .../dict/PHILIPS_MR_R5_5_PART/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PHILIPS_MR_R5_6_PART/PrivateKeyword.java | 47 + .../dict/PHILIPS_MR_R5_6_PART/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 107 + .../PHILIPS_MR_SPECTRO_1/PrivateKeyword.java | 145 + .../dict/PHILIPS_MR_SPECTRO_1/PrivateTag.java | 188 + .../PrivateElementDictionary.java | 80 + .../PHILIPS_NM__Private/PrivateKeyword.java | 79 + .../dict/PHILIPS_NM__Private/PrivateTag.java | 89 + .../PrivateElementDictionary.java | 60 + .../PHILIPS_XCT__Private/PrivateKeyword.java | 49 + .../dict/PHILIPS_XCT__Private/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 75 + .../PrivateKeyword.java | 71 + .../PrivateTag.java | 77 + .../PrivateElementDictionary.java | 59 + .../dict/PMS_THORA_5_1/PrivateKeyword.java | 47 + .../galaxy/dict/PMS_THORA_5_1/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 62 + .../dict/POLYTRON_SMS_2_5/PrivateKeyword.java | 53 + .../dict/POLYTRON_SMS_2_5/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../Philips_EV_Imaging_DD_022/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 190 + .../PrivateKeyword.java | 285 + .../Philips_Imaging_DD_001/PrivateTag.java | 398 + .../PrivateElementDictionary.java | 116 + .../PrivateKeyword.java | 149 + .../Philips_Imaging_DD_002/PrivateTag.java | 194 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../Philips_Imaging_DD_065/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 53 + .../Philips_Imaging_DD_067/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 69 + .../PrivateKeyword.java | 63 + .../Philips_Imaging_DD_070/PrivateTag.java | 65 + .../PrivateElementDictionary.java | 65 + .../PrivateKeyword.java | 57 + .../Philips_Imaging_DD_073/PrivateTag.java | 56 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../Philips_Imaging_DD_124/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../Philips_Imaging_DD_129/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 232 + .../PrivateKeyword.java | 377 + .../Philips_MR_Imaging_DD_001/PrivateTag.java | 536 + .../PrivateElementDictionary.java | 88 + .../PrivateKeyword.java | 91 + .../Philips_MR_Imaging_DD_002/PrivateTag.java | 107 + .../PrivateElementDictionary.java | 84 + .../PrivateKeyword.java | 87 + .../Philips_MR_Imaging_DD_003/PrivateTag.java | 101 + .../PrivateElementDictionary.java | 160 + .../PrivateKeyword.java | 231 + .../Philips_MR_Imaging_DD_004/PrivateTag.java | 317 + .../PrivateElementDictionary.java | 164 + .../PrivateKeyword.java | 233 + .../Philips_MR_Imaging_DD_005/PrivateTag.java | 320 + .../PrivateElementDictionary.java} | 87 +- .../PrivateKeyword.java | 107 + .../Philips_MR_Imaging_DD_006/PrivateTag.java | 131 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../Philips_NM_Private_Group/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 86 + .../PrivateKeyword.java | 85 + .../Philips_PET_Private_Group/PrivateTag.java | 98 + .../PrivateElementDictionary.java | 92 + .../PrivateKeyword.java | 91 + .../PrivateTag.java | 107 + .../PrivateElementDictionary.java | 104 + .../PrivateKeyword.java | 117 + .../PrivateTag.java | 146 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../Philips_US_Imaging_DD_017/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../Philips_US_Imaging_DD_021/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 51 + .../Philips_US_Imaging_DD_023/PrivateTag.java | 47 + .../PrivateElementDictionary.java | 77 + .../PrivateKeyword.java | 79 + .../Philips_US_Imaging_DD_033/PrivateTag.java | 89 + .../PrivateElementDictionary.java | 92 + .../PrivateKeyword.java | 113 + .../Philips_US_Imaging_DD_034/PrivateTag.java | 140 + .../PrivateElementDictionary.java | 67 + .../PrivateKeyword.java | 63 + .../Philips_US_Imaging_DD_035/PrivateTag.java | 65 + .../PrivateElementDictionary.java | 64 + .../PrivateKeyword.java | 57 + .../Philips_US_Imaging_DD_036/PrivateTag.java | 56 + .../PrivateElementDictionary.java | 71 + .../PrivateKeyword.java | 67 + .../Philips_US_Imaging_DD_037/PrivateTag.java | 71 + .../PrivateElementDictionary.java | 62 + .../PrivateKeyword.java | 53 + .../Philips_US_Imaging_DD_038/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 90 + .../PrivateKeyword.java | 107 + .../Philips_US_Imaging_DD_039/PrivateTag.java | 131 + .../PrivateElementDictionary.java | 66 + .../PrivateKeyword.java | 61 + .../Philips_US_Imaging_DD_040/PrivateTag.java | 62 + .../PrivateElementDictionary.java | 88 + .../PrivateKeyword.java | 105 + .../Philips_US_Imaging_DD_041/PrivateTag.java | 128 + .../PrivateElementDictionary.java | 93 + .../PrivateKeyword.java | 111 + .../Philips_US_Imaging_DD_042/PrivateTag.java | 137 + .../PrivateElementDictionary.java | 102 + .../PrivateKeyword.java | 129 + .../Philips_US_Imaging_DD_043/PrivateTag.java | 164 + .../PrivateElementDictionary.java | 68 + .../PrivateKeyword.java | 61 + .../Philips_US_Imaging_DD_045/PrivateTag.java | 62 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 49 + .../Philips_US_Imaging_DD_046/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../Philips_US_Imaging_DD_048/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../Philips_US_Imaging_DD_065/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 64 + .../PrivateKeyword.java | 55 + .../Philips_US_Imaging_DD_066/PrivateTag.java | 53 + .../PrivateElementDictionary.java | 86 + .../PrivateKeyword.java | 87 + .../Philips_US_Imaging_DD_109/PrivateTag.java | 101 + .../PrivateElementDictionary.java | 104 + .../PrivateKeyword.java | 123 + .../Philips_US_Imaging_DD_113/PrivateTag.java | 155 + .../PrivateElementDictionary.java | 95 + .../PrivateKeyword.java | 107 + .../PrivateTag.java | 131 + .../PrivateElementDictionary.java | 113 + .../QUASAR_INTERNAL_USE/PrivateKeyword.java | 129 + .../dict/QUASAR_INTERNAL_USE/PrivateTag.java | 164 + .../PrivateElementDictionary.java | 59 + .../dict/REPORT_FROM_APP/PrivateKeyword.java | 47 + .../dict/REPORT_FROM_APP/PrivateTag.java | 41 + .../RadWorksTBR/PrivateElementDictionary.java | 61 + .../dict/RadWorksTBR/PrivateKeyword.java | 49 + .../galaxy/dict/RadWorksTBR/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 60 + .../SHS_MagicView_300/PrivateKeyword.java | 49 + .../dict/SHS_MagicView_300/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 60 + .../SIEMENS_AX_INSPACE_EP/PrivateKeyword.java | 49 + .../SIEMENS_AX_INSPACE_EP/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 63 + .../SIEMENS_CM_VA0__ACQU/PrivateKeyword.java | 55 + .../dict/SIEMENS_CM_VA0__ACQU/PrivateTag.java | 53 + .../PrivateElementDictionary.java | 136 + .../SIEMENS_CM_VA0__CMS/PrivateKeyword.java | 181 + .../dict/SIEMENS_CM_VA0__CMS/PrivateTag.java | 242 + .../PrivateElementDictionary.java | 67 + .../SIEMENS_CM_VA0__LAB/PrivateKeyword.java | 61 + .../dict/SIEMENS_CM_VA0__LAB/PrivateTag.java | 62 + .../PrivateElementDictionary.java | 60 + .../SIEMENS_CSA_ENVELOPE/PrivateKeyword.java | 49 + .../dict/SIEMENS_CSA_ENVELOPE/PrivateTag.java | 44 + .../PrivateElementDictionary.java} | 56 +- .../SIEMENS_CSA_HEADER/PrivateKeyword.java | 57 + .../dict/SIEMENS_CSA_HEADER/PrivateTag.java | 56 + .../PrivateElementDictionary.java | 64 + .../SIEMENS_CSA_NON_IMAGE/PrivateKeyword.java | 53 + .../SIEMENS_CSA_NON_IMAGE/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 65 + .../SIEMENS_CSA_REPORT/PrivateKeyword.java | 53 + .../dict/SIEMENS_CSA_REPORT/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 117 + .../PrivateKeyword.java | 149 + .../SIEMENS_CT_APPL_DATASET/PrivateTag.java | 194 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 72 + .../PrivateKeyword.java | 67 + .../PrivateTag.java | 71 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 114 + .../SIEMENS_CT_VA0__COAD/PrivateKeyword.java | 145 + .../dict/SIEMENS_CT_VA0__COAD/PrivateTag.java | 188 + .../PrivateElementDictionary.java | 112 + .../SIEMENS_CT_VA0__GEN/PrivateKeyword.java | 143 + .../dict/SIEMENS_CT_VA0__GEN/PrivateTag.java | 185 + .../PrivateElementDictionary.java | 71 + .../SIEMENS_CT_VA0__IDE/PrivateKeyword.java | 63 + .../dict/SIEMENS_CT_VA0__IDE/PrivateTag.java | 65 + .../PrivateElementDictionary.java | 60 + .../SIEMENS_CT_VA0__ORI/PrivateKeyword.java | 49 + .../dict/SIEMENS_CT_VA0__ORI/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 61 + .../SIEMENS_CT_VA0__OST/PrivateKeyword.java | 49 + .../dict/SIEMENS_CT_VA0__OST/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 69 + .../SIEMENS_CT_VA0__RAW/PrivateKeyword.java} | 56 +- .../dict/SIEMENS_CT_VA0__RAW/PrivateTag.java | 65 + .../PrivateElementDictionary.java | 90 + .../PrivateKeyword.java | 101 + .../PrivateTag.java | 122 + .../PrivateElementDictionary.java | 106 + .../PrivateKeyword.java | 131 + .../SIEMENS_DFR_01_ORIGINAL/PrivateTag.java | 167 + .../PrivateElementDictionary.java | 59 + .../dict/SIEMENS_DICOM/PrivateKeyword.java | 49 + .../galaxy/dict/SIEMENS_DICOM/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 106 + .../dict/SIEMENS_DLR_01/PrivateKeyword.java | 133 + .../dict/SIEMENS_DLR_01/PrivateTag.java | 170 + .../PrivateElementDictionary.java | 128 + .../PrivateKeyword.java | 175 + .../PrivateTag.java | 233 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java} | 14 +- .../PrivateElementDictionary.java | 118 + .../PrivateKeyword.java | 149 + .../PrivateTag.java | 194 + .../SIEMENS_ISI/PrivateElementDictionary.java | 100 + .../dict/SIEMENS_ISI/PrivateKeyword.java | 125 + .../galaxy/dict/SIEMENS_ISI/PrivateTag.java | 158 + .../SIEMENS_MED/PrivateElementDictionary.java | 77 + .../dict/SIEMENS_MED/PrivateKeyword.java | 75 + .../galaxy/dict/SIEMENS_MED/PrivateTag.java | 83 + .../PrivateElementDictionary.java | 92 + .../SIEMENS_MEDCOM_HEADER/PrivateKeyword.java | 101 + .../SIEMENS_MEDCOM_HEADER/PrivateTag.java | 122 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../SIEMENS_MEDCOM_HEADER2/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 63 + .../SIEMENS_MEDCOM_OOG/PrivateKeyword.java | 51 + .../dict/SIEMENS_MEDCOM_OOG/PrivateTag.java | 47 + .../PrivateElementDictionary.java | 74 + .../SIEMENS_MED_DISPLAY/PrivateKeyword.java | 73 + .../dict/SIEMENS_MED_DISPLAY/PrivateTag.java | 80 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 53 + .../SIEMENS_MED_DISPLAY_0000/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 53 + .../SIEMENS_MED_DISPLAY_0001/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 60 + .../PrivateKeyword.java | 49 + .../PrivateTag.java | 44 + .../PrivateElementDictionary.java | 67 + .../dict/SIEMENS_MED_HG/PrivateKeyword.java | 61 + .../dict/SIEMENS_MED_HG/PrivateTag.java | 62 + .../PrivateElementDictionary.java | 59 + .../SIEMENS_MED_MAMMO/PrivateKeyword.java | 47 + .../dict/SIEMENS_MED_MAMMO/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 67 + .../dict/SIEMENS_MED_MG/PrivateKeyword.java | 61 + .../dict/SIEMENS_MED_MG/PrivateTag.java | 62 + .../PrivateElementDictionary.java | 258 + .../dict/SIEMENS_MED_NM/PrivateKeyword.java | 425 + .../dict/SIEMENS_MED_NM/PrivateTag.java | 608 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 65 + .../dict/SIEMENS_MED_PT/PrivateKeyword.java | 53 + .../dict/SIEMENS_MED_PT/PrivateTag.java | 50 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 55 + .../SIEMENS_MED_PT_WAVEFORM/PrivateTag.java | 53 + .../PrivateElementDictionary.java | 112 + .../PrivateKeyword.java | 147 + .../PrivateTag.java | 191 + .../PrivateElementDictionary.java | 160 + .../PrivateKeyword.java | 315 + .../PrivateTag.java | 443 + .../PrivateElementDictionary.java | 113 + .../PrivateKeyword.java | 147 + .../SIEMENS_MED_SMS_USG_S2000/PrivateTag.java | 191 + .../PrivateElementDictionary.java | 160 + .../PrivateKeyword.java | 241 + .../PrivateTag.java | 332 + .../PrivateElementDictionary.java | 81 + .../PrivateKeyword.java | 79 + .../PrivateTag.java | 89 + .../PrivateElementDictionary.java | 166 + .../SIEMENS_MED_SYNGO_RT/PrivateKeyword.java | 239 + .../dict/SIEMENS_MED_SYNGO_RT/PrivateTag.java | 329 + .../PrivateElementDictionary.java | 59 + .../SIEMENS_MI_RWVM_SUV/PrivateKeyword.java | 47 + .../dict/SIEMENS_MI_RWVM_SUV/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 61 + .../dict/SIEMENS_MR_CM_03/PrivateKeyword.java | 49 + .../dict/SIEMENS_MR_CM_03/PrivateTag.java | 44 + .../PrivateElementDictionary.java} | 69 +- .../PrivateKeyword.java | 75 + .../PrivateTag.java | 83 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 59 + .../SIEMENS_MR_FOR_06/PrivateKeyword.java | 47 + .../dict/SIEMENS_MR_FOR_06/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 103 + .../SIEMENS_MR_HEADER/PrivateKeyword.java | 121 + .../dict/SIEMENS_MR_HEADER/PrivateTag.java | 152 + .../PrivateElementDictionary.java | 59 + .../dict/SIEMENS_MR_IMA/PrivateKeyword.java | 47 + .../dict/SIEMENS_MR_IMA/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 79 + .../SIEMENS_MR_MRS_05/PrivateKeyword.java | 77 + .../dict/SIEMENS_MR_MRS_05/PrivateTag.java | 86 + .../PrivateElementDictionary.java | 171 + .../dict/SIEMENS_MR_N3D/PrivateKeyword.java | 263 + .../dict/SIEMENS_MR_N3D/PrivateTag.java | 365 + .../PrivateElementDictionary.java | 64 + .../PrivateKeyword.java | 53 + .../PrivateTag.java | 50 + .../PrivateElementDictionary.java | 59 + .../dict/SIEMENS_MR_PS_04/PrivateKeyword.java | 47 + .../dict/SIEMENS_MR_PS_04/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 162 + .../SIEMENS_MR_SDI_02/PrivateKeyword.java | 227 + .../dict/SIEMENS_MR_SDI_02/PrivateTag.java | 311 + .../PrivateElementDictionary.java | 145 + .../SIEMENS_MR_SDS_01/PrivateKeyword.java | 191 + .../dict/SIEMENS_MR_SDS_01/PrivateTag.java | 257 + .../PrivateElementDictionary.java | 107 + .../SIEMENS_MR_VA0__COAD/PrivateKeyword.java | 135 + .../dict/SIEMENS_MR_VA0__COAD/PrivateTag.java | 173 + .../PrivateElementDictionary.java | 143 + .../SIEMENS_MR_VA0__GEN/PrivateKeyword.java | 207 + .../dict/SIEMENS_MR_VA0__GEN/PrivateTag.java | 281 + .../PrivateElementDictionary.java | 91 + .../SIEMENS_MR_VA0__RAW/PrivateKeyword.java | 105 + .../dict/SIEMENS_MR_VA0__RAW/PrivateTag.java | 128 + .../PrivateElementDictionary.java | 62 + .../SIEMENS_NUMARIS_II/PrivateKeyword.java | 51 + .../dict/SIEMENS_NUMARIS_II/PrivateTag.java | 47 + .../PrivateElementDictionary.java | 148 + .../dict/SIEMENS_RA_GEN/PrivateKeyword.java | 219 + .../dict/SIEMENS_RA_GEN/PrivateTag.java | 299 + .../PrivateElementDictionary.java | 193 + .../SIEMENS_RA_PLANE_A/PrivateKeyword.java | 311 + .../dict/SIEMENS_RA_PLANE_A/PrivateTag.java | 437 + .../PrivateElementDictionary.java | 193 + .../SIEMENS_RA_PLANE_B/PrivateKeyword.java | 311 + .../dict/SIEMENS_RA_PLANE_B/PrivateTag.java | 437 + .../SIEMENS_RIS/PrivateElementDictionary.java | 74 + .../dict/SIEMENS_RIS/PrivateKeyword.java | 71 + .../galaxy/dict/SIEMENS_RIS/PrivateTag.java | 77 + .../PrivateElementDictionary.java | 114 + .../PrivateKeyword.java | 139 + .../PrivateTag.java | 179 + .../PrivateElementDictionary.java | 59 + .../dict/SIEMENS_SIENET/PrivateKeyword.java | 47 + .../dict/SIEMENS_SIENET/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 160 + .../PrivateKeyword.java | 227 + .../SIEMENS_SMS_AX__ACQ_1_0/PrivateTag.java | 311 + .../PrivateElementDictionary.java | 85 + .../PrivateKeyword.java | 91 + .../PrivateTag.java | 107 + .../PrivateElementDictionary.java | 70 + .../PrivateKeyword.java | 63 + .../SIEMENS_SMS_AX__QUANT_1_0/PrivateTag.java | 65 + .../PrivateElementDictionary.java | 95 + .../PrivateKeyword.java | 109 + .../SIEMENS_SMS_AX__VIEW_1_0/PrivateTag.java | 134 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 256 + .../PrivateKeyword.java | 419 + .../PrivateTag.java | 599 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 72 + .../PrivateKeyword.java | 69 + .../PrivateTag.java | 74 + .../PrivateElementDictionary.java | 66 + .../PrivateKeyword.java | 57 + .../SIEMENS_SYNGO_FRAME_SET/PrivateTag.java | 56 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 79 + .../PrivateKeyword.java | 75 + .../PrivateTag.java | 83 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 49 + .../PrivateTag.java | 44 + .../PrivateElementDictionary.java | 173 + .../PrivateKeyword.java | 257 + .../PrivateTag.java | 356 + .../PrivateElementDictionary.java | 188 + .../PrivateKeyword.java | 289 + .../PrivateTag.java | 404 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 49 + .../PrivateTag.java | 44 + .../PrivateElementDictionary.java | 82 + .../PrivateKeyword.java | 83 + .../PrivateTag.java | 95 + .../PrivateElementDictionary.java | 62 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 53 + .../PrivateTag.java | 50 + .../PrivateElementDictionary.java | 75 + .../SIEMENS_SYNGO_VOLUME/PrivateKeyword.java | 67 + .../dict/SIEMENS_SYNGO_VOLUME/PrivateTag.java | 71 + .../PrivateElementDictionary.java | 102 + .../PrivateKeyword.java | 117 + .../SIEMENS_SYNGO_WORKFLOW/PrivateTag.java | 146 + .../PrivateElementDictionary.java | 71 + .../dict/SIEMENS_Selma/PrivateKeyword.java | 67 + .../galaxy/dict/SIEMENS_Selma/PrivateTag.java | 71 + .../PrivateElementDictionary.java | 60 + .../PrivateKeyword.java | 49 + .../SIEMENS_Ultrasound_S2000/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 107 + .../PrivateKeyword.java | 131 + .../SIEMENS_Ultrasound_SC2000/PrivateTag.java | 167 + .../PrivateElementDictionary.java | 60 + .../SIEMENS_WH_SR_1_0/PrivateKeyword.java | 49 + .../dict/SIEMENS_WH_SR_1_0/PrivateTag.java | 44 + .../dict/SIENET/PrivateElementDictionary.java | 85 + .../galaxy/dict/SIENET/PrivateKeyword.java | 89 + .../image/galaxy/dict/SIENET/PrivateTag.java | 104 + .../SMIL_PB79/PrivateElementDictionary.java | 82 + .../galaxy/dict/SMIL_PB79/PrivateKeyword.java | 89 + .../galaxy/dict/SMIL_PB79/PrivateTag.java | 104 + .../SMIO_PB7B/PrivateElementDictionary.java | 59 + .../galaxy/dict/SMIO_PB7B/PrivateKeyword.java | 47 + .../galaxy/dict/SMIO_PB7B/PrivateTag.java | 41 + .../SMIO_PB7D/PrivateElementDictionary.java | 62 + .../galaxy/dict/SMIO_PB7D/PrivateKeyword.java | 51 + .../galaxy/dict/SMIO_PB7D/PrivateTag.java | 47 + .../dict/SPI/PrivateElementDictionary.java | 59 + .../image/galaxy/dict/SPI/PrivateKeyword.java | 47 + .../bus/image/galaxy/dict/SPI/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 73 + .../SPI_P_CTBE_Release_1/PrivateKeyword.java | 73 + .../dict/SPI_P_CTBE_Release_1/PrivateTag.java | 80 + .../PrivateElementDictionary.java | 120 + .../SPI_P_GV_CT_Release_1/PrivateKeyword.java | 157 + .../SPI_P_GV_CT_Release_1/PrivateTag.java | 206 + .../PrivateElementDictionary.java | 95 + .../SPI_P_PCR_Release_2/PrivateKeyword.java | 111 + .../dict/SPI_P_PCR_Release_2/PrivateTag.java | 137 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 57 + .../PrivateKeyword.java | 61 + .../PrivateTag.java | 62 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 87 + .../PrivateKeyword.java | 95 + .../PrivateTag.java | 113 + .../PrivateElementDictionary.java | 80 + .../PrivateKeyword.java | 79 + .../PrivateTag.java | 89 + .../PrivateElementDictionary.java | 75 + .../PrivateKeyword.java | 73 + .../PrivateTag.java | 80 + .../PrivateElementDictionary.java | 60 + .../PrivateKeyword.java | 49 + .../PrivateTag.java | 44 + .../PrivateElementDictionary.java | 68 + .../PrivateKeyword.java | 61 + .../PrivateTag.java | 62 + .../PrivateElementDictionary.java | 60 + .../PrivateKeyword.java | 49 + .../PrivateTag.java | 44 + .../PrivateElementDictionary.java | 136 + .../dict/SPI_P_Release_1/PrivateKeyword.java | 225 + .../dict/SPI_P_Release_1/PrivateTag.java | 308 + .../PrivateElementDictionary.java | 83 + .../SPI_P_Release_1_1/PrivateKeyword.java | 117 + .../dict/SPI_P_Release_1_1/PrivateTag.java | 146 + .../PrivateElementDictionary.java | 62 + .../SPI_P_Release_1_2/PrivateKeyword.java | 55 + .../dict/SPI_P_Release_1_2/PrivateTag.java | 53 + .../PrivateElementDictionary.java | 71 + .../SPI_P_Release_1_3/PrivateKeyword.java | 65 + .../dict/SPI_P_Release_1_3/PrivateTag.java | 68 + .../PrivateElementDictionary.java | 62 + .../SPI_P_Release_2_1/PrivateKeyword.java | 51 + .../dict/SPI_P_Release_2_1/PrivateTag.java | 47 + .../PrivateElementDictionary.java | 65 + .../PrivateKeyword.java | 55 + .../SPI_P_XSB_DCI_Release_1/PrivateTag.java | 53 + .../PrivateElementDictionary.java | 78 + .../PrivateKeyword.java | 91 + .../SPI_P_XSB_VISUB_Release_1/PrivateTag.java | 107 + .../PrivateElementDictionary.java | 61 + .../dict/SPI_Release_1/PrivateKeyword.java | 49 + .../galaxy/dict/SPI_Release_1/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 55 + .../PrivateTag.java | 53 + .../PrivateElementDictionary.java | 83 + .../PrivateKeyword.java | 83 + .../PrivateTag.java | 95 + .../PrivateElementDictionary.java | 90 + .../PrivateKeyword.java | 99 + .../PrivateTag.java | 119 + .../PrivateElementDictionary.java | 101 + .../PrivateKeyword.java | 121 + .../PrivateTag.java | 152 + .../PrivateElementDictionary.java | 60 + .../PrivateKeyword.java | 49 + .../PrivateTag.java | 44 + .../dict/acuson/PrivateElementDictionary.java | 72 + .../galaxy/dict/acuson/PrivateKeyword.java | 89 + .../image/galaxy/dict/acuson/PrivateTag.java | 104 + .../PrivateElementDictionary.java | 66 + .../PrivateKeyword.java | 57 + .../PrivateTag.java | 56 + .../PrivateElementDictionary.java | 138 + .../PrivateKeyword.java | 187 + .../PrivateTag.java | 251 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../dict/agfa/PrivateElementDictionary.java | 85 + .../galaxy/dict/agfa/PrivateKeyword.java | 91 + .../image/galaxy/dict/agfa/PrivateTag.java | 107 + .../PrivateElementDictionary.java | 73 + .../dict/agfa_adc_compact/PrivateKeyword.java | 69 + .../dict/agfa_adc_compact/PrivateTag.java | 74 + .../agfa_adc_nx/PrivateElementDictionary.java | 80 + .../dict/agfa_adc_nx/PrivateKeyword.java | 79 + .../galaxy/dict/agfa_adc_nx/PrivateTag.java | 89 + .../PrivateElementDictionary.java | 95 + .../dict/agfa_ag_hpstate/PrivateKeyword.java | 109 + .../dict/agfa_ag_hpstate/PrivateTag.java | 134 + .../PrivateElementDictionary.java | 60 + .../PrivateKeyword.java | 49 + .../agfa_displayable_images/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 61 + .../dict/agfa_kosd_1_0/PrivateKeyword.java | 49 + .../galaxy/dict/agfa_kosd_1_0/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 61 + .../PrivateKeyword.java | 49 + .../PrivateTag.java | 44 + .../PrivateElementDictionary.java | 59 + .../dict/agfa_xeroverse/PrivateKeyword.java | 47 + .../dict/agfa_xeroverse/PrivateTag.java | 41 + .../PrivateElementDictionary.java | 104 + .../dict/agility_overlay/PrivateKeyword.java | 125 + .../dict/agility_overlay/PrivateTag.java | 158 + .../PrivateElementDictionary.java | 68 + .../dict/agility_runtime/PrivateKeyword.java | 61 + .../dict/agility_runtime/PrivateTag.java | 62 + .../archive/PrivateElementDictionary.java | 137 + .../galaxy/dict/archive/PrivateKeyword.java | 183 + .../dict/archive/PrivateTag.java} | 321 +- .../elscint/PrivateElementDictionary.java | 375 + .../galaxy/dict/elscint/PrivateKeyword.java | 641 + .../image/galaxy/dict/elscint/PrivateTag.java | 932 + .../PrivateElementDictionary.java | 69 + .../PrivateKeyword.java | 57 + .../PrivateTag.java | 56 + .../PrivateElementDictionary.java | 69 + .../PrivateKeyword.java | 57 + .../PrivateTag.java | 56 + .../PrivateElementDictionary.java | 62 + .../PrivateKeyword.java | 51 + .../PrivateTag.java | 47 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../PrivateTag.java | 41 + .../PrivateElementDictionary.java | 73 + .../dict/mitra_markup_1_0/PrivateKeyword.java | 75 + .../dict/mitra_markup_1_0/PrivateTag.java | 83 + .../PrivateElementDictionary.java | 63 + .../PrivateKeyword.java | 55 + .../PrivateTag.java | 53 + .../PrivateElementDictionary.java | 60 + .../PrivateKeyword.java | 49 + .../mitra_object_document_1_0/PrivateTag.java | 44 + .../PrivateElementDictionary.java | 73 + .../PrivateKeyword.java | 69 + .../PrivateTag.java | 74 + .../PrivateElementDictionary.java | 70 + .../PrivateKeyword.java | 65 + .../mitra_presentation_1_0/PrivateTag.java | 68 + .../bus/image/galaxy/dict/package-info.java | 35 + .../PrivateElementDictionary.java | 62 + .../dict/syngoDynamics/PrivateKeyword.java | 51 + .../galaxy/dict/syngoDynamics/PrivateTag.java | 47 + .../PrivateElementDictionary.java | 59 + .../PrivateKeyword.java | 47 + .../syngoDynamics_Reporting/PrivateTag.java | 41 + .../galaxy/io/BasicBulkDataDescriptor.java | 37 +- .../bus/image/galaxy/io/BulkDataCreator.java | 0 .../image/galaxy/io/BulkDataDescriptor.java | 0 .../image/galaxy/io/Bzip2FileDetector.java | 72 + .../galaxy/io/ContentHandlerAdapter.java | 306 +- .../image/galaxy/io/GenozipFileDetector.java | 61 + .../image/galaxy/io/ImageEncodingOptions.java | 0 .../image/galaxy/io/ImageFileDetector.java | 85 + .../image/galaxy/io/ImageInputHandler.java | 0 .../bus/image/galaxy/io/ImageInputStream.java | 561 +- .../image/galaxy/io/ImageOutputStream.java | 46 +- .../galaxy/io/RAFInputStreamAdapter.java | 4 +- .../galaxy/io/RAFOutputStreamAdapter.java | 0 .../miaixz/bus/image/galaxy/io/SAXReader.java | 4 +- .../bus/image/galaxy/io/SAXTransformer.java | 2 +- .../miaixz/bus/image/galaxy/io/SAXWriter.java | 117 +- .../bus/image/galaxy/io/TemplatesCache.java | 7 +- .../galaxy/io/XSLTAttributesCoercion.java | 11 +- .../bus/image/galaxy/io/package-info.java | 35 + .../image/galaxy/media/AbstractStowrs.java | 294 - .../image/galaxy/media/HeaderFieldValues.java | 188 - .../ImageDirReader.java} | 36 +- .../ImageDirWriter.java} | 62 +- .../galaxy/media/MultipartInputStream.java | 37 +- .../image/galaxy/media/MultipartParser.java | 152 +- .../image/galaxy/media/MultipartReader.java | 356 - .../bus/image/galaxy/media/RecordFactory.java | 50 +- .../bus/image/galaxy/media/RecordType.java | 0 .../image/galaxy/media/StowrsMultiFiles.java | 126 - .../image/galaxy/media/StowrsSingleFile.java | 133 - .../bus/image/galaxy/media/package-info.java | 35 + .../miaixz/bus/image/galaxy/package-info.java | 35 + .../miaixz/bus/image/metric/Association.java | 507 +- .../bus/image/metric/AssociationHandler.java | 32 +- .../bus/image/metric/AssociationListener.java | 0 .../bus/image/metric/AssociationMonitor.java | 2 +- .../bus/image/metric/CancelRQHandler.java | 0 .../org/miaixz/bus/image/metric/Commands.java | 10 +- .../miaixz/bus/image/metric/Compatible.java | 0 .../miaixz/bus/image/metric/Connection.java | 401 +- .../miaixz/bus/image/metric/DataWriter.java | 2 + .../bus/image/metric/DataWriterAdapter.java | 5 +- .../bus/image/metric/DimseRQHandler.java | 10 +- .../org/miaixz/bus/image/metric/DimseRSP.java | 0 .../bus/image/metric/DimseRSPHandler.java | 22 +- .../org/miaixz/bus/image/metric/Editable.java | 36 + .../bus/image/metric/FutureDimseRSP.java | 16 +- .../org/miaixz/bus/image/metric/Property.java | 160 + .../miaixz/bus/image/metric/QueryOption.java | 70 + .../bus/image/metric/SSLManagerFactory.java | 149 - .../bus/image/metric/StorageOptions.java | 9 +- .../org/miaixz/bus/image/metric/TagCamel.java | 510 - .../org/miaixz/bus/image/metric/TagValue.java | 255 - .../org/miaixz/bus/image/metric/Timeout.java | 17 +- .../bus/image/metric/TransferCapability.java | 65 +- .../bus/image/metric/WebApplication.java | 103 +- .../metric/api/ApplicationEntityCache.java | 64 + .../api}/AttributeCoercion.java | 35 +- .../image/metric/api/AttributeCoercions.java | 93 + .../api}/ConfigurationCache.java | 9 +- .../api/ConfigurationChanges.java} | 26 +- .../{galaxy => metric/api}/DeviceCache.java | 16 +- .../api/DicomConfiguration.java} | 17 +- .../metric/api/IApplicationEntityCache.java | 50 + .../{galaxy => metric/api}/IDeviceCache.java | 2 +- .../api/IWebApplicationCache.java} | 4 +- .../api}/WebApplicationCache.java | 17 +- .../bus/image/metric/api/package-info.java | 35 + .../metric/{internal => }/hl7/Delimiter.java | 2 +- .../metric/{internal => }/hl7/ERRSegment.java | 31 +- .../bus/image/metric/hl7/HL7Charset.java | 155 + .../{internal => }/hl7/HL7ContentHandler.java | 4 +- .../{internal => }/hl7/HL7Exception.java | 4 +- .../metric/{internal => }/hl7/HL7Message.java | 45 +- .../metric/{internal => }/hl7/HL7Parser.java | 6 +- .../metric/{internal => }/hl7/HL7Segment.java | 14 +- .../{internal => }/hl7/MLLPConnection.java | 53 +- .../{internal => }/hl7/MLLPInputStream.java | 4 +- .../{internal => }/hl7/MLLPOutputStream.java | 2 +- .../bus/image/metric/hl7/MLLPRelease.java | 38 + .../hl7 => hl7/api}/HL7ApplicationCache.java | 10 +- .../hl7 => hl7/api}/HL7Configuration.java | 4 +- .../hl7 => hl7/api}/IHL7ApplicationCache.java | 3 +- .../image/metric/hl7/api/package-info.java | 35 + .../metric/hl7/json/JsonHL7Configuration.java | 170 + .../json/JsonHL7ConfigurationExtension.java | 47 + .../image/metric/hl7/json/package-info.java | 35 + .../metric/hl7/ldap/LdapHL7Configuration.java | 498 + .../ldap/LdapHL7ConfigurationExtension.java | 81 + .../image/metric/hl7/ldap/package-info.java | 35 + .../net/DefaultHL7MessageListener.java} | 6 +- .../hl7 => hl7/net}/DefaultHL7Service.java | 4 +- .../hl7 => hl7/net}/HL7Application.java | 167 +- .../net}/HL7ApplicationExtension.java | 10 +- .../hl7 => hl7/net}/HL7ApplicationInfo.java | 2 +- .../hl7 => hl7/net}/HL7Connection.java | 8 +- .../hl7 => hl7/net}/HL7ConnectionMonitor.java | 3 +- .../net}/HL7DeviceExtension.java | 38 +- .../hl7 => hl7/net}/HL7MessageListener.java | 3 +- .../net/HL7ProtocolHandler.java} | 31 +- .../metric/hl7/net/HL7SAXTransformer.java | 95 + .../{internal/hl7 => hl7/net}/HL7Service.java | 2 +- .../hl7 => hl7/net}/HL7ServiceRegistry.java | 15 +- .../metric/hl7/net/UnparsedHL7Message.java | 194 + .../image/metric/hl7/net/package-info.java | 35 + .../bus/image/metric/hl7/package-info.java | 35 + .../image/metric/internal/hl7/HL7Charset.java | 164 - .../metric/json/ConfigurationDelegate.java | 41 + .../bus/image/metric/json/JSONReader.java | 579 + .../bus/image/metric/json/JSONWriter.java | 580 + .../image/metric/json/JsonConfiguration.java | 1079 + .../JsonConfigurationExtension.java} | 50 +- .../bus/image/metric/json/package-info.java | 35 + .../metric/{acquire => net}/AEExtension.java | 10 +- .../metric/{ => net}/ApplicationEntity.java | 248 +- .../metric/net/ApplicationEntityInfo.java | 135 + .../ConnectionMonitor.java} | 6 +- .../{acquire => net}/DeviceExtension.java | 6 +- .../bus/image/metric/net/DeviceService.java | 98 + .../metric/net/DeviceServiceInterface.java | 46 + .../metric/{ => net}/IdentityNegotiator.java | 19 +- .../ImageProtocolHandler.java} | 7 +- .../InputStreamDataWriter.java} | 10 +- .../miaixz/bus/image/metric/net/ItemType.java | 51 + .../metric/{ => net}/KeycloakClient.java | 35 +- .../Listener.java} | 4 +- .../metric/net/NoPresentationException.java | 68 + .../image/metric/net/NoRolesException.java | 55 + .../metric/{ => net}/PDVInputStream.java | 2 +- .../metric/{ => net}/PDVOutputStream.java | 2 +- .../miaixz/bus/image/metric/net/PDVType.java | 41 + .../miaixz/bus/image/metric/net/Priority.java | 40 + .../miaixz/bus/image/metric/net/State.java | 226 + .../{internal => }/net/TCPListener.java | 33 +- .../TCPProtocolHandler.java} | 4 +- .../{internal => }/net/UDPListener.java | 27 +- .../UDPProtocolHandler.java} | 4 +- .../bus/image/metric/net/package-info.java | 35 + .../{Tagable.java => package-info.java} | 11 +- .../metric/{internal => }/pdu/AAbort.java | 5 +- .../{internal => }/pdu/AAssociateAC.java | 2 +- .../{internal => }/pdu/AAssociateRJ.java | 13 +- .../{internal => }/pdu/AAssociateRQ.java | 8 +- .../{internal => }/pdu/AAssociateRQAC.java | 97 +- .../{internal => }/pdu/CommonExtended.java | 18 +- .../ExtendedNegotiation.java} | 16 +- .../metric/{internal => }/pdu/IdentityAC.java | 8 +- .../metric/{internal => }/pdu/IdentityRQ.java | 44 +- .../metric/{internal => }/pdu/PDUDecoder.java | 107 +- .../metric/{internal => }/pdu/PDUEncoder.java | 185 +- .../miaixz/bus/image/metric/pdu/PDUType.java | 44 + .../PresentationContext.java} | 22 +- .../{internal => }/pdu/RoleSelection.java | 17 +- .../bus/image/metric/pdu/package-info.java | 35 + ...Service.java => AbstractImageService.java} | 31 +- .../image/metric/service/BasicCEchoSCP.java | 16 +- .../image/metric/service/BasicCFindSCP.java | 25 +- .../image/metric/service/BasicCGetSCP.java | 26 +- .../image/metric/service/BasicCMoveSCP.java | 21 +- .../image/metric/service/BasicCStoreSCP.java | 25 +- .../image/metric/service/BasicMPPSSCP.java | 25 +- .../{BasicQuery.java => BasicQueryTask.java} | 26 +- ...icRetrieve.java => BasicRetrieveTask.java} | 38 +- .../image/metric/service/ImageService.java | 0 .../ImageServiceException.java} | 114 +- ...Handler.java => ImageServiceRegistry.java} | 72 +- .../{Instance.java => InstanceLocator.java} | 14 +- .../{Level.java => QueryRetrieveLevel.java} | 53 +- .../metric/service/QueryRetrieveLevel2.java | 152 + .../service/{Retrieve.java => QueryTask.java} | 2 +- .../service/{Query.java => RetrieveTask.java} | 2 +- .../image/metric/service/package-info.java | 35 + .../bus/image/nimble/BufferedImages.java | 343 +- .../bus/image/nimble/ByteLookupTable.java | 0 .../org/miaixz/bus/image/nimble/CIELab.java | 189 + .../bus/image/nimble/CIELabColorSpace.java | 115 + .../bus/image/nimble/ColorModelFactory.java | 44 +- .../bus/image/nimble/ColorSubsampling.java | 1 - .../bus/image/nimble/EmbeddedOverlay.java | 76 + .../miaixz/bus/image/nimble/ICCProfile.java | 166 + .../miaixz/bus/image/nimble/ImageAdapter.java | 469 + .../bus/image/nimble/ImageContentHash.java | 95 + .../bus/image/nimble/ImageMetaData.java | 125 + .../bus/image/nimble/ImageOutputData.java | 430 + .../bus/image/nimble/ImageReadParam.java | 270 + .../miaixz/bus/image/nimble/ImageReader.java | 735 + .../bus/image/nimble/ImageReaderSpi.java | 100 + .../bus/image/nimble/ImageRendering.java | 189 + .../bus/image/nimble/JpegWriteParam.java | 194 + .../miaixz/bus/image/nimble/LookupTable.java | 0 .../bus/image/nimble/LookupTableFactory.java | 140 +- .../miaixz/bus/image/nimble/OverlayData.java | 249 + .../org/miaixz/bus/image/nimble/Overlays.java | 68 +- .../bus/image/nimble/PaletteColorModel.java | 238 +- .../miaixz/bus/image/nimble/Photometric.java | 64 +- .../bus/image/nimble/PixelAspectRatio.java | 4 +- .../image/nimble/PresentationLutObject.java | 219 + .../bus/image/nimble/RGBImageVoiLut.java | 992 + .../bus/image/nimble/SampledColorModel.java | 7 +- .../bus/image/nimble/SampledSampleModel.java | 9 +- .../bus/image/nimble/ShortLookupTable.java | 1 - .../miaixz/bus/image/nimble/StoredValue.java | 3 +- .../bus/image/nimble/TranscodeParam.java | 125 + .../miaixz/bus/image/nimble/Transcoder.java | 338 + .../bus/image/nimble/VOILUTFunction.java | 38 + .../java/org/miaixz/bus/image/nimble/YBR.java | 0 .../bus/image/nimble/YBRColorSpace.java | 2 + .../codec/BytesWithImageImageDescriptor.java | 43 + ...tream.java => CacheImageOutputStream.java} | 10 +- .../image/nimble/codec/CompressionRule.java | 31 +- .../image/nimble/codec/CompressionRules.java | 6 +- .../bus/image/nimble/codec/Compressor.java | 85 +- .../bus/image/nimble/codec/Decompressor.java | 129 +- .../codec/FormatNameFilterIterator.java | 5 +- .../image/nimble/codec/ImageDescriptor.java | 7 +- .../nimble/codec/ImageReaderFactory.java | 72 +- .../nimble/codec/ImageWriterFactory.java | 65 +- .../bus/image/nimble/codec/Transcoder.java | 465 +- .../nimble/codec/TransferSyntaxType.java | 142 +- .../bus/image/nimble/codec/XPEGParser.java | 54 + .../bus/image/nimble/codec/jpeg/JPEG.java | 61 +- .../image/nimble/codec/jpeg/JPEGHeader.java | 51 +- .../nimble/codec/jpeg/JPEGLSCodingParam.java | 6 +- .../image/nimble/codec/jpeg/JPEGParser.java | 547 + .../image/nimble/codec/jpeg/PatchJPEGLS.java | 71 +- ...tream.java => PatchJPEGLSInputStream.java} | 44 +- ...ream.java => PatchJPEGLSOutputStream.java} | 22 +- .../image/nimble/codec/jpeg/SOFSegment.java | 10 +- .../image/nimble/codec/jpeg/SOSSegment.java | 8 +- .../image/nimble/codec/jpeg/package-info.java | 35 + .../codec/mp4/MP4FileType.java} | 80 +- .../bus/image/nimble/codec/mp4/MP4Parser.java | 353 + .../image/nimble/codec/mp4/package-info.java | 35 + .../image/nimble/codec/mpeg/MPEG2Parser.java | 226 + .../image/nimble/codec/mpeg/MPEGHeader.java | 24 +- .../image/nimble/codec/mpeg/package-info.java | 35 + .../bus/image/nimble/codec/package-info.java | 35 + .../extend}/ImageReaderExtension.java | 7 +- .../extend}/ImageWriterExtension.java | 7 +- .../extend/JsonImageReaderConfiguration.java | 110 + .../extend/JsonImageWriterConfiguration.java | 111 + .../LdapCompressionRulesConfiguration.java | 169 + .../extend/LdapImageReaderConfiguration.java | 187 + .../extend/LdapImageWriterConfiguration.java | 188 + .../bus/image/nimble/extend/package-info.java | 35 + .../bus/image/nimble/opencv/FileRawImage.java | 11 +- .../nimble/opencv/FileStreamSegment.java | 9 +- .../bus/image/nimble/opencv/ImageCV.java | 46 +- .../image/nimble/opencv/ImageConversion.java | 790 +- .../image/nimble/opencv/ImageParameters.java | 153 +- .../image/nimble/opencv/ImageProcessor.java | 951 +- .../bus/image/nimble/opencv/ImageSize.java | 0 .../nimble/opencv/J2kImageWriteParam.java | 7 + .../nimble/opencv/JPEGImageWriteParam.java | 0 .../nimble/opencv/JPEGLSImageWriteParam.java | 0 .../image/nimble/opencv/LookupTableCV.java | 179 +- .../nimble/opencv/MemoryStreamSegment.java | 4 +- .../nimble/opencv/NativeImageReader.java | 192 +- .../opencv/NativeJ2kImageReaderSpi.java | 14 +- .../nimble/opencv/NativeJ2kImageWriter.java | 24 +- .../opencv/NativeJ2kImageWriterSpi.java | 4 +- .../opencv/NativeJLSImageReaderSpi.java | 15 +- .../nimble/opencv/NativeJLSImageWriter.java | 43 +- .../opencv/NativeJLSImageWriterSpi.java | 4 +- .../opencv/NativeJPEGImageReaderSpi.java | 27 +- .../nimble/opencv/NativeJPEGImageWriter.java | 33 +- .../opencv/NativeJPEGImageWriterSpi.java | 4 +- .../nimble/opencv/OpenCVNativeLoader.java | 5 + .../bus/image/nimble/opencv/PlanarImage.java | 29 +- .../bus/image/nimble/opencv/SOFSegment.java | 12 +- ...eStream.java => SegmentedImageStream.java} | 6 +- .../image/nimble/opencv/StreamSegment.java | 158 +- .../bus/image/nimble/opencv/lut/ByteLut.java | 114 + .../bus/image/nimble/opencv/lut/ColorLut.java | 157 + .../opencv/lut/DefaultWlPresentation.java | 56 + .../nimble/opencv/lut/LutParameters.java | 146 + .../bus/image/nimble/opencv/lut/LutShape.java | 141 + .../nimble/opencv/lut/ModalityLutModule.java | 188 + .../opencv/lut/PresentationStateLut.java | 46 + .../nimble/opencv/lut/PresetWindowLevel.java | 441 + .../image/nimble/opencv/lut/VoiLutModule.java | 185 + .../opencv/lut/WindLevelParameters.java | 141 + .../bus/image/nimble/opencv/lut/WlParams.java | 52 + .../nimble/opencv/lut/WlPresentation.java | 40 + .../image/nimble/opencv/lut/package-info.java | 35 + .../bus/image/nimble/opencv/op/MaskArea.java | 92 + .../image/nimble/opencv/op/package-info.java | 35 + .../bus/image/nimble/opencv/package-info.java | 35 + .../nimble/opencv/seg/ContourTopology.java | 61 + .../bus/image/nimble/opencv/seg/Region.java | 184 + .../nimble/opencv/seg/RegionAttributes.java | 213 + .../bus/image/nimble/opencv/seg/Segment.java | 172 + .../image/nimble/opencv/seg/package-info.java | 35 + .../opencv/{ => tile}/TiledAlgorithm.java | 93 +- .../opencv/{ => tile}/TiledProcessor.java | 108 +- .../nimble/opencv/tile/package-info.java | 35 + .../miaixz/bus/image/nimble/package-info.java | 35 + .../ImageioMetaData.java} | 6 +- .../image/nimble/reader/ImageioReadParam.java | 166 + ...DCMImageReader.java => ImageioReader.java} | 522 +- ...geReaderSpi.java => ImageioReaderSpi.java} | 19 +- ...ImageReader.java => RLEImageioReader.java} | 33 +- ...eaderSpi.java => RLEImageioReaderSpi.java} | 12 +- .../bus/image/nimble/reader/package-info.java | 35 + .../BytesWithImageDescriptor.java | 26 +- ...ncapsulatedPixelDataImageInputStream.java} | 14 +- .../ExtendSegmentedInputImageStream.java | 66 + .../bus/image/nimble/stream/ImageAdapter.java | 433 + .../image/nimble/stream/ImageDescriptor.java | 224 + .../nimble/stream/ImageFileInputStream.java | 77 + .../stream/ImageInputStreamAdapter.java | 2 +- .../nimble/stream/ImageReaderDescriptor.java | 38 + .../nimble/stream/OutputStreamAdapter.java | 0 .../stream/SeekableInMemoryByteChannel.java | 204 + ...am.java => SegmentedInputImageStream.java} | 65 +- .../bus/image/nimble/stream/package-info.java | 35 + .../org/miaixz/bus/image/package-info.java | 58 + .../org/miaixz/bus/image/plugin/CFind.java | 149 +- .../org/miaixz/bus/image/plugin/CGet.java | 137 +- .../miaixz/bus/image/plugin/CGetForward.java | 585 + .../org/miaixz/bus/image/plugin/CMove.java | 99 +- .../org/miaixz/bus/image/plugin/CStore.java | 80 +- .../org/miaixz/bus/image/plugin/Dcm2Dcm.java | 43 +- .../org/miaixz/bus/image/plugin/Dcm2Jpg.java | 187 +- .../org/miaixz/bus/image/plugin/Dcm2Json.java | 122 + .../org/miaixz/bus/image/plugin/Dcm2Pdf.java | 148 + .../miaixz/bus/image/plugin/Dcm2String.java | 10 +- .../org/miaixz/bus/image/plugin/Dcm2Xml.java | 21 +- .../org/miaixz/bus/image/plugin/DcmDir.java | 168 +- .../org/miaixz/bus/image/plugin/DcmDump.java | 55 +- .../org/miaixz/bus/image/plugin/DcmLdap.java | 127 + .../miaixz/bus/image/plugin/Deidentify.java | 90 + .../org/miaixz/bus/image/plugin/Echo.java | 60 +- .../org/miaixz/bus/image/plugin/Emf2sf.java | 29 +- .../org/miaixz/bus/image/plugin/FindSCU.java | 143 +- .../org/miaixz/bus/image/plugin/FixLO2UN.java | 5 +- .../org/miaixz/bus/image/plugin/GetSCU.java | 150 +- .../org/miaixz/bus/image/plugin/HL72Xml.java | 24 +- .../org/miaixz/bus/image/plugin/HL7Pdq.java | 115 + .../org/miaixz/bus/image/plugin/HL7Pix.java | 21 +- .../org/miaixz/bus/image/plugin/HL7Rcv.java | 34 +- .../org/miaixz/bus/image/plugin/HL7Snd.java | 19 +- .../org/miaixz/bus/image/plugin/IanSCP.java | 42 +- .../org/miaixz/bus/image/plugin/IanSCU.java | 38 +- .../org/miaixz/bus/image/plugin/Jpg2Dcm.java | 289 +- .../org/miaixz/bus/image/plugin/Json2Dcm.java | 177 + .../org/miaixz/bus/image/plugin/Json2Rst.java | 239 + .../org/miaixz/bus/image/plugin/MkKOS.java | 303 - .../org/miaixz/bus/image/plugin/Modality.java | 154 +- .../org/miaixz/bus/image/plugin/MoveSCU.java | 102 +- .../org/miaixz/bus/image/plugin/MppsSCP.java | 58 +- .../org/miaixz/bus/image/plugin/MppsSCU.java | 92 +- .../org/miaixz/bus/image/plugin/Pdf2Dcm.java | 173 +- .../plugin/{StgSCU.java => StgCmtSCU.java} | 118 +- .../org/miaixz/bus/image/plugin/StoreSCP.java | 221 +- .../org/miaixz/bus/image/plugin/StoreSCU.java | 294 +- .../org/miaixz/bus/image/plugin/StowRS.java | 946 + .../miaixz/bus/image/plugin/StreamSCU.java | 485 + .../org/miaixz/bus/image/plugin/Tpl2Xml.java | 257 + .../org/miaixz/bus/image/plugin/UpsSCU.java | 295 + .../org/miaixz/bus/image/plugin/WadoRS.java | 267 + .../org/miaixz/bus/image/plugin/Xml2Dcm.java | 31 +- .../org/miaixz/bus/image/plugin/Xml2HL7.java | 26 +- .../miaixz/bus/image/plugin/package-info.java | 35 + .../java.nio.file.spi.FileTypeDetector | 2 + .../services/javax.imageio.spi.ImageReaderSpi | 6 +- .../services/javax.imageio.spi.ImageWriterSpi | 2 +- ...xz.bus.image.galaxy.data.ElementDictionary | 327 + .../bus/image/galaxy/media/RecordFactory.xml | 112 +- .../org/miaixz/bus/image/nimble/adobeRGB.icc | Bin 0 -> 2684 bytes .../codec/ImageReaderFactory.properties | 7 + .../codec/ImageWriterFactory.properties | 20 +- .../bus/image/nimble/opencv/lut/presets.xml | 50 + .../org/miaixz/bus/image/nimble/rommRGB.icc | Bin 0 -> 3054 bytes .../org/miaixz/bus/image/nimble/sRGB.icc | Bin 0 -> 13096 bytes .../image/plugin/sop-classes-tcs.properties | 440 + .../image/plugin/sop-classes-uid.properties | 74 + .../bus/image/plugin/sop-classes.properties | 349 + .../bus/starter/image/ImageConfiguration.java | 19 +- .../bus/starter/image/ImageProperties.java | 28 +- 1468 files changed, 152552 insertions(+), 29938 deletions(-) mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/Args.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/Builder.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/Device.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/Dimse.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/Editors.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/Format.java rename bus-image/src/main/java/org/miaixz/bus/image/{galaxy/data => }/IOD.java (83%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/Node.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/Option.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/Status.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/Tag.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/UID.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/AcquisitionModality.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/AnatomicRegion.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/builtin/ArchiveElementDictionary.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/builtin/ArchiveKey.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ContributingOfReference.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentificationCoercion.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentificationMethod.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentifier.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/DicomFiles.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ESoundex.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ESoundex9.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/FilesetInfo.java rename bus-image/src/main/java/org/miaixz/bus/image/builtin/{FuzzyStr.java => FuzzyString.java} (98%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/HashUIDMapper.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/KPhonetik.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/Metaphone.java rename bus-image/src/main/java/org/miaixz/bus/image/builtin/{Multiframe.java => MultiframeExtractor.java} (69%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/NumberOfFramesAccessor.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/Phonem.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ProcedureReasons.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ScopeOfAccumulation.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/Soundex.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/UIDMapper.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/YesNo.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/LdapBuilder.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/LdapDicomConfiguration.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/LdapDicomConfigurationExtension.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/LdapEnv.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/ReconnectDirContext.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/ResourceManager.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/builtin/package-info.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/galaxy/BinaryPrefix.java rename bus-image/src/main/java/org/miaixz/bus/image/{metric => galaxy}/CancelListener.java (98%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/CountingInputStream.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/CountingOutputStream.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/EditorContext.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/ImageParam.java rename bus-image/src/main/java/org/miaixz/bus/image/{metric/Progress.java => galaxy/ImageProgress.java} (87%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/LimitedInputStream.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/galaxy/Material.java rename bus-image/src/main/java/org/miaixz/bus/image/{metric => galaxy}/ProgressListener.java (96%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/galaxy/{Availability.java => ProgressStatus.java} (96%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/RelatedSOPClasses.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/ReverseDNS.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/SafeBuffer.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/galaxy/ScheduleExpression.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/SupplierEx.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/TeeInputStream.java rename bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/{AttributesSelector.java => AttributeSelector.java} (83%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/Attributes.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/AttributesCoercion.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/BinaryValueType.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/BulkData.java rename bus-image/src/main/java/org/miaixz/bus/image/galaxy/{media/UploadSingleFile.java => data/BulkDataWithPrefix.java} (78%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/Code.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/DatePrecision.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/DateRange.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/ElementDictionary.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/Fragments.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/HL7Separator.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/IDWithIssuer.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/IODCache.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/Implementation.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/Issuer.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/ItemPointer.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/ItemPointerVisitor.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/Keyword.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/MergeAttributesCoercion.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/NullifyAttributesCoercion.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/PersonName.java rename bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/{RemapUIDAttributesCoercion.java => RemapUIDsAttributesCoercion.java} (81%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/Sequence.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/SequenceValueType.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/SequenceVisitor.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/SpecificCharacterSet.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/StandardDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/StandardElementDictionary.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/StringValueType.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/TemporalType.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/TrimISO2020Coercion.java rename bus-image/src/main/java/org/miaixz/bus/image/{metric/Thumbnail.java => galaxy/data/TypeOfPatientID.java} (90%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/UIDVisitor.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/UpdatePolicy.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/VR.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/ValidationResult.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/Value.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/ValueSelector.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/ValueType.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/Visitor.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Annotations_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Annotations_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Annotations_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Annotations_02/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Annotations_02/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Annotations_02/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_ImageContextExt_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_ImageContextExt_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_ImageContextExt_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_ImageContext_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_ImageContext_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_ImageContext_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_ImageTransform_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_ImageTransform_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_ImageTransform_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Sequence_AnnotElements_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Sequence_AnnotElements_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Sequence_AnnotElements_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Sequence_Annotations_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Sequence_Annotations_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Sequence_Annotations_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Sequence_Annotations_02/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Sequence_Annotations_02/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_Sequence_Annotations_02/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_StudyExtensions_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_StudyExtensions_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/AMI_StudyExtensions_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/APEX_PRIVATE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/APEX_PRIVATE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/APEX_PRIVATE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Centricity_Radiology_Web_Version_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Centricity_Radiology_Web_Version_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Centricity_Radiology_Web_Version_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Centricity_Radiology_Web_Version_2_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Centricity_Radiology_Web_Version_2_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Centricity_Radiology_Web_Version_2_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Print_Version_5_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Print_Version_5_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Print_Version_5_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadStore_Version_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadStore_Version_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadStore_Version_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadWorks_Version_5_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadWorks_Version_5_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadWorks_Version_5_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadWorks_Version_6_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadWorks_Version_6_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadWorks_Version_6_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadWorks_Version_6_0_Summary/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadWorks_Version_6_0_Summary/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_RadWorks_Version_6_0_Summary/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Workflow_Version_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Workflow_Version_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Applicare_Workflow_Version_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/BioPri3D/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/BioPri3D/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/BioPri3D/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/CARDIO_D_R__1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/CARDIO_D_R__1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/CARDIO_D_R__1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/CARDIO_D_R__1_0_siemens/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/CARDIO_D_R__1_0_siemens/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/CARDIO_D_R__1_0_siemens/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DIDI_TO_PCR_1_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DIDI_TO_PCR_1_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DIDI_TO_PCR_1_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DIGISCAN_IMAGE/PrivateElementDictionary.java rename bus-image/src/main/java/org/miaixz/bus/image/galaxy/{StorageThreshold.java => dict/DIGISCAN_IMAGE/PrivateKeyword.java} (79%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DIGISCAN_IMAGE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_ANNOT_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_ANNOT_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_ANNOT_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_EXAMS_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_EXAMS_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_EXAMS_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_LKUP_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_LKUP_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_LKUP_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_PATNT_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_PATNT_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_PATNT_01/PrivateTag.java rename bus-image/src/main/java/org/miaixz/bus/image/{metric/DefaultEditors.java => galaxy/dict/DLX_SERIE_01/PrivateElementDictionary.java} (50%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_SERIE_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DLX_SERIE_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DL_INTERNAL_USE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DL_INTERNAL_USE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/DL_INTERNAL_USE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/ESOFT_DICOM_ECAT_OWNERCODE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/ESOFT_DICOM_ECAT_OWNERCODE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/ESOFT_DICOM_ECAT_OWNERCODE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/FFP_DATA/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/FFP_DATA/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/FFP_DATA/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEHC_CT_ADVAPP_001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEHC_CT_ADVAPP_001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEHC_CT_ADVAPP_001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS_IW/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS_IW/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS_IW/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS_PACS/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS_PACS/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS_PACS/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS_RA1000/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS_RA1000/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEIIS_RA1000/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_0039/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_0039/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_0039/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_3DSTATE_001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_3DSTATE_001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_3DSTATE_001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_3D_INTVL_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_3D_INTVL_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_3D_INTVL_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACQU_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACQU_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACQU_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_1_0_BLOCK1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_1_0_BLOCK1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_1_0_BLOCK1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_1_0_BLOCK2/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_1_0_BLOCK2/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_1_0_BLOCK2/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_1_0_BLOCK3/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_1_0_BLOCK3/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_1_0_BLOCK3/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_2_0_BLOCK1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_2_0_BLOCK1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_2_0_BLOCK1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_2_0_BLOCK2/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_2_0_BLOCK2/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_2_0_BLOCK2/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_2_0_BLOCK3/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_2_0_BLOCK3/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ACRQA_2_0_BLOCK3/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ADWSoft_3D1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ADWSoft_3D1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ADWSoft_3D1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ADWSoft_DPO/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ADWSoft_DPO/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ADWSoft_DPO/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ADWSoft_DPO1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ADWSoft_DPO1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_ADWSoft_DPO1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_AWSOFT_CD1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_AWSOFT_CD1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_AWSOFT_CD1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_AWSoft_SB1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_AWSoft_SB1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_AWSoft_SB1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CTHD_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CTHD_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CTHD_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CT_CARDIAC_001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CT_CARDIAC_001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CT_CARDIAC_001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CT_HINO_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CT_HINO_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CT_HINO_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CT_VES_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CT_VES_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_CT_VES_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_FRAME_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_FRAME_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_FRAME_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_IMG_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_IMG_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_IMG_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_PATNT_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_PATNT_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_PATNT_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_SERIES_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_SERIES_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_SERIES_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_STUDY_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_STUDY_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DL_STUDY_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DRS_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DRS_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_DRS_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_FALCON_03/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_FALCON_03/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_FALCON_03/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_FUNCTOOL_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_FUNCTOOL_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_FUNCTOOL_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GDXE_ATHENAV2_INTERNAL_USE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GDXE_ATHENAV2_INTERNAL_USE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GDXE_ATHENAV2_INTERNAL_USE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GDXE_FALCON_04/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GDXE_FALCON_04/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GDXE_FALCON_04/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GENIE_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GENIE_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GENIE_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GNHD_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GNHD_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_GNHD_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_HELIOS_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_HELIOS_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_HELIOS_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IDEN_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IDEN_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IDEN_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IDI_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IDI_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IDI_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IMAG_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IMAG_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IMAG_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IMPS_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IMPS_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IMPS_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IQTB_IDEN_47/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IQTB_IDEN_47/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IQTB_IDEN_47/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IT_Centricity_RA600_7_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IT_Centricity_RA600_7_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IT_Centricity_RA600_7_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IT_US_REPORT/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IT_US_REPORT/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_IT_US_REPORT/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_LUNAR_RAW/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_LUNAR_RAW/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_LUNAR_RAW/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_PARM_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_PARM_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_PARM_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_PATI_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_PATI_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_PATI_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_PETD_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_PETD_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_PETD_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_RELA_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_RELA_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_RELA_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SEND_02/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SEND_02/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SEND_02/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SENOCRYSTAL_V1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SENOCRYSTAL_V1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SENOCRYSTAL_V1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SENO_02/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SENO_02/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SENO_02/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SERS_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SERS_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_SERS_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_STDY_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_STDY_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_STDY_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_Ultrasound_ExamGroup_001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_Ultrasound_ExamGroup_001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_Ultrasound_ExamGroup_001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_Ultrasound_ImageGroup_001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_Ultrasound_ImageGroup_001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_Ultrasound_ImageGroup_001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_Ultrasound_MovieGroup_001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_Ultrasound_MovieGroup_001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_Ultrasound_MovieGroup_001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_VXTL_USERDATA_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_VXTL_USERDATA_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_VXTL_USERDATA_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_XELPRV_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_XELPRV_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_XELPRV_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_XR3DCAL_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_XR3DCAL_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_XR3DCAL_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_YMHD_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_YMHD_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GEMS_YMHD_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_1_2_840_113708_794_1_1_2_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_1_2_840_113708_794_1_1_2_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_1_2_840_113708_794_1_1_2_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_GENESIS_REV3_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_GENESIS_REV3_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_GENESIS_REV3_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_GROUP/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_GROUP/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_GROUP/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_Generic_Data/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_Generic_Data/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_Generic_Data/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_Informatics_Data/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_Informatics_Data/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_Informatics_Data/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_LUT_Asymmetry_Parameter/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_LUT_Asymmetry_Parameter/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_LUT_Asymmetry_Parameter/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_____From_Adantage_Review_CS/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_____From_Adantage_Review_CS/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/GE_____From_Adantage_Review_CS/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/ISI/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/ISI/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/ISI/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/KINETDX/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/KINETDX/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/KINETDX/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/KINETDX_GRAPHICS/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/KINETDX_GRAPHICS/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/KINETDX_GRAPHICS/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/KRETZ_US/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/KRETZ_US/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/KRETZ_US/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Mayo_IBM_Archive_Project/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Mayo_IBM_Archive_Project/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Mayo_IBM_Archive_Project/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_IMAGING_DD_001_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_IMAGING_DD_001_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_IMAGING_DD_001_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_IMAGING_DD_001_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_IMAGING_DD_001_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_IMAGING_DD_001_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_LAST/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_LAST/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_LAST/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART_12/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART_12/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART_12/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART_6/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART_6/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART_6/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART_7/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART_7/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_PART_7/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_R5_5_PART/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_R5_5_PART/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_R5_5_PART/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_R5_6_PART/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_R5_6_PART/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_R5_6_PART/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_SPECTRO_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_SPECTRO_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_MR_SPECTRO_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_NM__Private/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_NM__Private/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_NM__Private/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_XCT__Private/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_XCT__Private/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PHILIPS_XCT__Private/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PMI_Private_Calibration_Module_Version_2_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PMI_Private_Calibration_Module_Version_2_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PMI_Private_Calibration_Module_Version_2_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PMS_THORA_5_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PMS_THORA_5_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/PMS_THORA_5_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/POLYTRON_SMS_2_5/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/POLYTRON_SMS_2_5/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/POLYTRON_SMS_2_5/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_EV_Imaging_DD_022/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_EV_Imaging_DD_022/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_EV_Imaging_DD_022/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_002/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_002/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_002/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_065/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_065/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_065/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_067/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_067/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_067/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_070/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_070/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_070/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_073/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_073/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_073/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_124/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_124/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_124/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_129/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_129/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_Imaging_DD_129/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_002/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_002/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_002/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_003/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_003/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_003/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_004/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_004/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_004/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_005/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_005/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_005/PrivateTag.java rename bus-image/src/main/java/org/miaixz/bus/image/galaxy/{media/InvokeImageDisplay.java => dict/Philips_MR_Imaging_DD_006/PrivateElementDictionary.java} (50%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_006/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_MR_Imaging_DD_006/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_NM_Private_Group/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_NM_Private_Group/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_NM_Private_Group/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_PET_Private_Group/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_PET_Private_Group/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_PET_Private_Group/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_RAD_Imaging_DD_001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_RAD_Imaging_DD_001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_RAD_Imaging_DD_001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_RAD_Imaging_DD_097/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_RAD_Imaging_DD_097/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_RAD_Imaging_DD_097/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_017/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_017/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_017/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_021/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_021/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_021/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_023/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_023/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_023/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_033/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_033/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_033/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_034/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_034/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_034/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_035/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_035/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_035/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_036/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_036/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_036/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_037/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_037/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_037/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_038/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_038/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_038/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_039/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_039/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_039/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_040/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_040/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_040/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_041/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_041/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_041/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_042/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_042/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_042/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_043/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_043/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_043/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_045/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_045/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_045/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_046/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_046/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_046/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_048/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_048/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_048/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_065/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_065/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_065/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_066/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_066/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_066/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_109/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_109/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_109/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_113/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_113/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_US_Imaging_DD_113/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_X_ray_Imaging_DD_001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_X_ray_Imaging_DD_001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Philips_X_ray_Imaging_DD_001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/QUASAR_INTERNAL_USE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/QUASAR_INTERNAL_USE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/QUASAR_INTERNAL_USE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/REPORT_FROM_APP/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/REPORT_FROM_APP/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/REPORT_FROM_APP/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/RadWorksTBR/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/RadWorksTBR/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/RadWorksTBR/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SHS_MagicView_300/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SHS_MagicView_300/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SHS_MagicView_300/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_AX_INSPACE_EP/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_AX_INSPACE_EP/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_AX_INSPACE_EP/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CM_VA0__ACQU/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CM_VA0__ACQU/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CM_VA0__ACQU/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CM_VA0__CMS/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CM_VA0__CMS/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CM_VA0__CMS/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CM_VA0__LAB/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CM_VA0__LAB/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CM_VA0__LAB/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_ENVELOPE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_ENVELOPE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_ENVELOPE/PrivateTag.java rename bus-image/src/main/java/org/miaixz/bus/image/{metric/internal/hl7/UnparsedHL7Message.java => galaxy/dict/SIEMENS_CSA_HEADER/PrivateElementDictionary.java} (69%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_HEADER/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_HEADER/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_NON_IMAGE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_NON_IMAGE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_NON_IMAGE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_REPORT/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_REPORT/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CSA_REPORT/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_DATASET/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_DATASET/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_DATASET/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_EVIDENCEDOCUMENT/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_EVIDENCEDOCUMENT/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_EVIDENCEDOCUMENT/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_MEASUREMENT/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_MEASUREMENT/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_MEASUREMENT/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_PRESENTATION/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_PRESENTATION/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_PRESENTATION/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_TMP_DATAMODEL/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_TMP_DATAMODEL/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_APPL_TMP_DATAMODEL/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__COAD/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__COAD/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__COAD/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__GEN/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__GEN/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__GEN/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__IDE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__IDE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__IDE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__ORI/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__ORI/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__ORI/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__OST/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__OST/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__OST/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__RAW/PrivateElementDictionary.java rename bus-image/src/main/java/org/miaixz/bus/image/{metric/AttributeContext.java => galaxy/dict/SIEMENS_CT_VA0__RAW/PrivateKeyword.java} (69%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_CT_VA0__RAW/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DFR_01_MANIPULATED/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DFR_01_MANIPULATED/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DFR_01_MANIPULATED/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DFR_01_ORIGINAL/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DFR_01_ORIGINAL/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DFR_01_ORIGINAL/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DICOM/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DICOM/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DICOM/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DLR_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DLR_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_DLR_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_FLCOMPACT_VA01A_PROC/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_FLCOMPACT_VA01A_PROC/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_FLCOMPACT_VA01A_PROC/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_IKM_CKS_CXRCAD_FINDINGS/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_IKM_CKS_CXRCAD_FINDINGS/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_IKM_CKS_CXRCAD_FINDINGS/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_IKM_CKS_LUNGCAD_BMK/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_IKM_CKS_LUNGCAD_BMK/PrivateKeyword.java rename bus-image/src/main/java/org/miaixz/bus/image/{metric/Readable.java => galaxy/dict/SIEMENS_IKM_CKS_LUNGCAD_BMK/PrivateTag.java} (88%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_IMAGE_SHADOW_ATTRIBUTES/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_IMAGE_SHADOW_ATTRIBUTES/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_IMAGE_SHADOW_ATTRIBUTES/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_ISI/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_ISI/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_ISI/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MEDCOM_HEADER/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MEDCOM_HEADER/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MEDCOM_HEADER/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MEDCOM_HEADER2/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MEDCOM_HEADER2/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MEDCOM_HEADER2/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MEDCOM_OOG/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MEDCOM_OOG/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MEDCOM_OOG/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_DISPLAY/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_DISPLAY/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_DISPLAY/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_DISPLAY_0000/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_DISPLAY_0000/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_DISPLAY_0000/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_DISPLAY_0001/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_DISPLAY_0001/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_DISPLAY_0001/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_ECAT_FILE_INFO/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_ECAT_FILE_INFO/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_ECAT_FILE_INFO/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_HG/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_HG/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_HG/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_MAMMO/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_MAMMO/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_MAMMO/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_MG/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_MG/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_MG/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_NM/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_NM/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_NM/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_OCS_BEAM_DISPLAY_INFO/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_OCS_BEAM_DISPLAY_INFO/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_OCS_BEAM_DISPLAY_INFO/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_OCS_PUBLIC_RT_PLAN_ATTRIBUTES/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_OCS_PUBLIC_RT_PLAN_ATTRIBUTES/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_OCS_PUBLIC_RT_PLAN_ATTRIBUTES/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_OCS_SS_VERSION_INFO/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_OCS_SS_VERSION_INFO/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_OCS_SS_VERSION_INFO/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_PT/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_PT/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_PT/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_PT_WAVEFORM/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_PT_WAVEFORM/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_PT_WAVEFORM/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_ANTARES/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_ANTARES/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_ANTARES/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_ANTARES_3D_VOLUME/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_ANTARES_3D_VOLUME/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_ANTARES_3D_VOLUME/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_S2000/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_S2000/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_S2000/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_S2000_3D_VOLUME/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_S2000_3D_VOLUME/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SMS_USG_S2000_3D_VOLUME/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SP_DXMG_WH_AWS_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SP_DXMG_WH_AWS_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SP_DXMG_WH_AWS_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SYNGO_RT/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SYNGO_RT/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MED_SYNGO_RT/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MI_RWVM_SUV/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MI_RWVM_SUV/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MI_RWVM_SUV/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_CM_03/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_CM_03/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_CM_03/PrivateTag.java rename bus-image/src/main/java/org/miaixz/bus/image/galaxy/{DeleterThreshold.java => dict/SIEMENS_MR_DATAMAPPING_ATTRIBUTES/PrivateElementDictionary.java} (60%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_DATAMAPPING_ATTRIBUTES/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_DATAMAPPING_ATTRIBUTES/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_EXTRACTED_CSA_HEADER/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_EXTRACTED_CSA_HEADER/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_EXTRACTED_CSA_HEADER/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_FOR_06/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_FOR_06/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_FOR_06/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_HEADER/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_HEADER/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_HEADER/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_IMA/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_IMA/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_IMA/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_MRS_05/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_MRS_05/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_MRS_05/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_N3D/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_N3D/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_N3D/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_PHOENIX_ATTRIBUTES/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_PHOENIX_ATTRIBUTES/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_PHOENIX_ATTRIBUTES/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_PS_04/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_PS_04/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_PS_04/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_SDI_02/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_SDI_02/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_SDI_02/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_SDS_01/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_SDS_01/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_SDS_01/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_VA0__COAD/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_VA0__COAD/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_VA0__COAD/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_VA0__GEN/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_VA0__GEN/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_VA0__GEN/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_VA0__RAW/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_VA0__RAW/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_MR_VA0__RAW/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_NUMARIS_II/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_NUMARIS_II/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_NUMARIS_II/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RA_GEN/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RA_GEN/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RA_GEN/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RA_PLANE_A/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RA_PLANE_A/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RA_PLANE_A/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RA_PLANE_B/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RA_PLANE_B/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RA_PLANE_B/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RIS/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RIS/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_RIS/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SERIES_SHADOW_ATTRIBUTES/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SERIES_SHADOW_ATTRIBUTES/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SERIES_SHADOW_ATTRIBUTES/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SIENET/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SIENET/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SIENET/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__ACQ_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__ACQ_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__ACQ_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__ORIGINAL_IMAGE_INFO_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__ORIGINAL_IMAGE_INFO_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__ORIGINAL_IMAGE_INFO_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__QUANT_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__QUANT_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__QUANT_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__VIEW_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__VIEW_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SMS_AX__VIEW_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_3D_FUSION_MATRIX/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_3D_FUSION_MATRIX/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_3D_FUSION_MATRIX/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ADVANCED_PRESENTATION/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ADVANCED_PRESENTATION/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ADVANCED_PRESENTATION/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_DATA_PADDING/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_DATA_PADDING/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_DATA_PADDING/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ENCAPSULATED_DOCUMENT_DATA/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ENCAPSULATED_DOCUMENT_DATA/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ENCAPSULATED_DOCUMENT_DATA/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ENHANCED_IDATASET_API/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ENHANCED_IDATASET_API/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ENHANCED_IDATASET_API/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_EVIDENCE_DOCUMENT_DATA/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_EVIDENCE_DOCUMENT_DATA/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_EVIDENCE_DOCUMENT_DATA/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_FRAME_SET/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_FRAME_SET/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_FRAME_SET/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_FUNCTION_ASSIGNMENT/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_FUNCTION_ASSIGNMENT/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_FUNCTION_ASSIGNMENT/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_INDEX_SERVICE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_INDEX_SERVICE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_INDEX_SERVICE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_INSTANCE_MANIFEST/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_INSTANCE_MANIFEST/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_INSTANCE_MANIFEST/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_LAYOUT_PROTOCOL/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_LAYOUT_PROTOCOL/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_LAYOUT_PROTOCOL/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_OBJECT_GRAPHICS/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_OBJECT_GRAPHICS/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_OBJECT_GRAPHICS/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_PRINT_SERVICE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_PRINT_SERVICE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_PRINT_SERVICE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_REGISTRATION/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_REGISTRATION/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_REGISTRATION/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_SOP_CLASS_PACKING/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_SOP_CLASS_PACKING/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_SOP_CLASS_PACKING/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_TIME_POINT_SERVICE/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_TIME_POINT_SERVICE/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_TIME_POINT_SERVICE/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ULTRA_SOUND_TOYON_DATA_STREAMING/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ULTRA_SOUND_TOYON_DATA_STREAMING/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_ULTRA_SOUND_TOYON_DATA_STREAMING/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_VOLUME/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_VOLUME/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_VOLUME/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_WORKFLOW/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_WORKFLOW/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_SYNGO_WORKFLOW/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_Selma/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_Selma/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_Selma/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_Ultrasound_S2000/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_Ultrasound_S2000/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_Ultrasound_S2000/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_Ultrasound_SC2000/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_Ultrasound_SC2000/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_Ultrasound_SC2000/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_WH_SR_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_WH_SR_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIEMENS_WH_SR_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIENET/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIENET/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SIENET/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SMIL_PB79/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SMIL_PB79/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SMIL_PB79/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SMIO_PB7B/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SMIO_PB7B/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SMIO_PB7B/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SMIO_PB7D/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SMIO_PB7D/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SMIO_PB7D/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_CTBE_Private_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_CTBE_Private_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_CTBE_Private_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_CTBE_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_CTBE_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_CTBE_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_GV_CT_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_GV_CT_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_GV_CT_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_PCR_Release_2/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_PCR_Release_2/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_PCR_Release_2/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_CDS_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_CDS_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_CDS_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_CWS_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_CWS_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_CWS_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_DCI_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_DCI_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_DCI_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_DiDi_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_DiDi_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_DiDi_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_2/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_2/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_2/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_3/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_3/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_3/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_4/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_4/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_4/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_5/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_5/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Private_ICS_Release_1_5/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1_2/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1_2/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1_2/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1_3/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1_3/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_1_3/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_2_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_2_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_Release_2_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_XSB_DCI_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_XSB_DCI_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_XSB_DCI_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_XSB_VISUB_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_XSB_VISUB_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_P_XSB_VISUB_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_Release_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_Release_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/SPI_Release_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens_Ultrasound_Miscellaneous/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens_Ultrasound_Miscellaneous/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens_Ultrasound_Miscellaneous/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Image_Stamp/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Image_Stamp/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Image_Stamp/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Lab_Settings/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Lab_Settings/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Lab_Settings/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Post_Processing/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Post_Processing/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Post_Processing/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Raw_Image_Settings/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Raw_Image_Settings/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Raw_Image_Settings/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Version/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Version/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/Siemens__Thorax_Multix_FD_Version/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson_1_2_840_113680_1_0_0910/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson_1_2_840_113680_1_0_0910/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson_1_2_840_113680_1_0_0910/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson_1_2_840_113680_1_0_7f10/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson_1_2_840_113680_1_0_7f10/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson_1_2_840_113680_1_0_7f10/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson_1_2_840_113680_1_0_7ffe/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson_1_2_840_113680_1_0_7ffe/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/acuson_1_2_840_113680_1_0_7ffe/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_adc_compact/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_adc_compact/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_adc_compact/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_adc_nx/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_adc_nx/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_adc_nx/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_ag_hpstate/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_ag_hpstate/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_ag_hpstate/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_displayable_images/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_displayable_images/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_displayable_images/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_kosd_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_kosd_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_kosd_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_pacs_archive_mirroring_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_pacs_archive_mirroring_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_pacs_archive_mirroring_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_xeroverse/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_xeroverse/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agfa_xeroverse/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agility_overlay/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agility_overlay/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agility_overlay/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agility_runtime/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agility_runtime/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/agility_runtime/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/archive/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/archive/PrivateKeyword.java rename bus-image/src/main/java/org/miaixz/bus/image/{builtin/ArchiveTag.java => galaxy/dict/archive/PrivateTag.java} (50%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/elscint/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/elscint/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/elscint/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/http___www_gemedicalsystems_com_it_solutions_bamwallthickness_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/http___www_gemedicalsystems_com_it_solutions_bamwallthickness_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/http___www_gemedicalsystems_com_it_solutions_bamwallthickness_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/http___www_gemedicalsystems_com_it_solutions_orthoview_2_1/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/http___www_gemedicalsystems_com_it_solutions_orthoview_2_1/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/http___www_gemedicalsystems_com_it_solutions_orthoview_2_1/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/http___www_gemedicalsystems_com_it_solutions_rad_pacs_/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/http___www_gemedicalsystems_com_it_solutions_rad_pacs_/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/http___www_gemedicalsystems_com_it_solutions_rad_pacs_/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_linked_attributes_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_linked_attributes_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_linked_attributes_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_markup_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_markup_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_markup_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_object_attributes_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_object_attributes_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_object_attributes_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_object_document_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_object_document_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_object_document_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_object_utf8_attributes_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_object_utf8_attributes_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_object_utf8_attributes_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_presentation_1_0/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_presentation_1_0/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/mitra_presentation_1_0/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/syngoDynamics/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/syngoDynamics/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/syngoDynamics/PrivateTag.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/syngoDynamics_Reporting/PrivateElementDictionary.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/syngoDynamics_Reporting/PrivateKeyword.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/dict/syngoDynamics_Reporting/PrivateTag.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/BasicBulkDataDescriptor.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/BulkDataCreator.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/BulkDataDescriptor.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/Bzip2FileDetector.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/ContentHandlerAdapter.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/GenozipFileDetector.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/ImageEncodingOptions.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/ImageFileDetector.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/ImageInputHandler.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/ImageInputStream.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/ImageOutputStream.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/RAFInputStreamAdapter.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/RAFOutputStreamAdapter.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/SAXReader.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/SAXTransformer.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/SAXWriter.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/TemplatesCache.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/XSLTAttributesCoercion.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/io/package-info.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/galaxy/media/AbstractStowrs.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/galaxy/media/HeaderFieldValues.java rename bus-image/src/main/java/org/miaixz/bus/image/galaxy/{DirReader.java => media/ImageDirReader.java} (94%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/galaxy/{DirWriter.java => media/ImageDirWriter.java} (88%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/media/MultipartInputStream.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/media/MultipartParser.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/galaxy/media/MultipartReader.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/media/RecordFactory.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/media/RecordType.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/galaxy/media/StowrsMultiFiles.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/galaxy/media/StowrsSingleFile.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/media/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/galaxy/package-info.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/Association.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/AssociationHandler.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/AssociationListener.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/AssociationMonitor.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/CancelRQHandler.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/Commands.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/Compatible.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/Connection.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/DataWriter.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/DataWriterAdapter.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/DimseRQHandler.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/DimseRSP.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/DimseRSPHandler.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/Editable.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/FutureDimseRSP.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/Property.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/QueryOption.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/metric/SSLManagerFactory.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/StorageOptions.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/metric/TagCamel.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/metric/TagValue.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/Timeout.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/TransferCapability.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/WebApplication.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/api/ApplicationEntityCache.java rename bus-image/src/main/java/org/miaixz/bus/image/{galaxy => metric/api}/AttributeCoercion.java (89%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/api/AttributeCoercions.java rename bus-image/src/main/java/org/miaixz/bus/image/{galaxy => metric/api}/ConfigurationCache.java (94%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/{galaxy/ConfigurationChange.java => metric/api/ConfigurationChanges.java} (88%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/{galaxy => metric/api}/DeviceCache.java (83%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/{galaxy/Configuration.java => metric/api/DicomConfiguration.java} (86%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/api/IApplicationEntityCache.java rename bus-image/src/main/java/org/miaixz/bus/image/{galaxy => metric/api}/IDeviceCache.java (98%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/{galaxy/ApplicationCache.java => metric/api/IWebApplicationCache.java} (96%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/{galaxy => metric/api}/WebApplicationCache.java (82%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/api/package-info.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/hl7/Delimiter.java (98%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/hl7/ERRSegment.java (63%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/HL7Charset.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/hl7/HL7ContentHandler.java (98%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/hl7/HL7Exception.java (97%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/hl7/HL7Message.java (81%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/hl7/HL7Parser.java (98%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/hl7/HL7Segment.java (97%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/hl7/MLLPConnection.java (67%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/hl7/MLLPInputStream.java (98%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/hl7/MLLPOutputStream.java (98%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/MLLPRelease.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/api}/HL7ApplicationCache.java (89%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/api}/HL7Configuration.java (94%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/api}/IHL7ApplicationCache.java (95%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/api/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/json/JsonHL7Configuration.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/json/JsonHL7ConfigurationExtension.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/json/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/ldap/LdapHL7Configuration.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/ldap/LdapHL7ConfigurationExtension.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/ldap/package-info.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7/DefaultHL7Listener.java => hl7/net/DefaultHL7MessageListener.java} (91%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/net}/DefaultHL7Service.java (95%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/net}/HL7Application.java (73%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{acquire => hl7/net}/HL7ApplicationExtension.java (92%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/net}/HL7ApplicationInfo.java (98%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/net}/HL7Connection.java (94%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/net}/HL7ConnectionMonitor.java (96%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{acquire => hl7/net}/HL7DeviceExtension.java (82%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/net}/HL7MessageListener.java (96%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7/HL7Handler.java => hl7/net/HL7ProtocolHandler.java} (76%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/net/HL7SAXTransformer.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/net}/HL7Service.java (97%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/hl7 => hl7/net}/HL7ServiceRegistry.java (88%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/net/UnparsedHL7Message.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/net/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/hl7/package-info.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/metric/internal/hl7/HL7Charset.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/json/ConfigurationDelegate.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/json/JSONReader.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/json/JSONWriter.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/json/JsonConfiguration.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{TagView.java => json/JsonConfigurationExtension.java} (66%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/json/package-info.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{acquire => net}/AEExtension.java (92%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{ => net}/ApplicationEntity.java (79%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/net/ApplicationEntityInfo.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{Monitoring.java => net/ConnectionMonitor.java} (95%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{acquire => net}/DeviceExtension.java (94%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/net/DeviceService.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/net/DeviceServiceInterface.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{ => net}/IdentityNegotiator.java (78%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{AdvancedHandler.java => net/ImageProtocolHandler.java} (92%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{InputStreamWriter.java => net/InputStreamDataWriter.java} (91%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/net/ItemType.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{ => net}/KeycloakClient.java (80%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{SocketListener.java => net/Listener.java} (96%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/net/NoPresentationException.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/net/NoRolesException.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{ => net}/PDVInputStream.java (98%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{ => net}/PDVOutputStream.java (98%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/net/PDVType.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/net/Priority.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/net/State.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/net/TCPListener.java (85%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/net/TCPHandler.java => net/TCPProtocolHandler.java} (96%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/net/UDPListener.java (86%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/net/UDPHandler.java => net/UDPProtocolHandler.java} (96%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/net/package-info.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{Tagable.java => package-info.java} (93%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/AAbort.java (97%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/AAssociateAC.java (98%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/AAssociateRJ.java (95%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/AAssociateRQ.java (94%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/AAssociateRQAC.java (79%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/CommonExtended.java (90%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/pdu/ExtendedNegotiate.java => pdu/ExtendedNegotiation.java} (89%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/IdentityAC.java (93%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/IdentityRQ.java (80%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/PDUDecoder.java (88%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/PDUEncoder.java (65%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/pdu/PDUType.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal/pdu/Presentation.java => pdu/PresentationContext.java} (89%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/{internal => }/pdu/RoleSelection.java (88%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/pdu/package-info.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/service/{AbstractService.java => AbstractImageService.java} (75%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/service/BasicCEchoSCP.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/service/BasicCFindSCP.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/service/BasicCGetSCP.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/service/BasicCMoveSCP.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/service/BasicCStoreSCP.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/service/BasicMPPSSCP.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/service/{BasicQuery.java => BasicQueryTask.java} (87%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/service/{BasicRetrieve.java => BasicRetrieveTask.java} (91%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/service/ImageService.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/{ImageException.java => service/ImageServiceException.java} (59%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/service/{ServiceHandler.java => ImageServiceRegistry.java} (70%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/service/{Instance.java => InstanceLocator.java} (89%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/service/{Level.java => QueryRetrieveLevel.java} (81%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/service/QueryRetrieveLevel2.java rename bus-image/src/main/java/org/miaixz/bus/image/metric/service/{Retrieve.java => QueryTask.java} (97%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/metric/service/{Query.java => RetrieveTask.java} (97%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/metric/service/package-info.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/BufferedImages.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ByteLookupTable.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/CIELab.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/CIELabColorSpace.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ColorModelFactory.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ColorSubsampling.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/EmbeddedOverlay.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ICCProfile.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ImageAdapter.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ImageContentHash.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ImageMetaData.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ImageOutputData.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ImageReadParam.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ImageReader.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ImageReaderSpi.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ImageRendering.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/JpegWriteParam.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/LookupTable.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/LookupTableFactory.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/OverlayData.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/Overlays.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/PaletteColorModel.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/Photometric.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/PixelAspectRatio.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/PresentationLutObject.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/RGBImageVoiLut.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/SampledColorModel.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/SampledSampleModel.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/ShortLookupTable.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/StoredValue.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/TranscodeParam.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/Transcoder.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/VOILUTFunction.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/YBR.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/YBRColorSpace.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/BytesWithImageImageDescriptor.java rename bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/{ExtMemoryOutputStream.java => CacheImageOutputStream.java} (91%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/CompressionRule.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/CompressionRules.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/Compressor.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/Decompressor.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/FormatNameFilterIterator.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/ImageDescriptor.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/ImageReaderFactory.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/ImageWriterFactory.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/Transcoder.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/TransferSyntaxType.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/XPEGParser.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/jpeg/JPEG.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/jpeg/JPEGHeader.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/jpeg/JPEGLSCodingParam.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/jpeg/JPEGParser.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/jpeg/PatchJPEGLS.java rename bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/jpeg/{PatchJPEGLSImageInputStream.java => PatchJPEGLSInputStream.java} (84%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/jpeg/{PatchJPEGLSImageOutputStream.java => PatchJPEGLSOutputStream.java} (88%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/jpeg/SOFSegment.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/jpeg/SOSSegment.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/jpeg/package-info.java rename bus-image/src/main/java/org/miaixz/bus/image/{galaxy/RetentionPeriod.java => nimble/codec/mp4/MP4FileType.java} (57%) create mode 100755 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/mp4/MP4Parser.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/mp4/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/mpeg/MPEG2Parser.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/mpeg/MPEGHeader.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/mpeg/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/codec/package-info.java rename bus-image/src/main/java/org/miaixz/bus/image/{metric/acquire => nimble/extend}/ImageReaderExtension.java (93%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/{metric/acquire => nimble/extend}/ImageWriterExtension.java (93%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/extend/JsonImageReaderConfiguration.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/extend/JsonImageWriterConfiguration.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/extend/LdapCompressionRulesConfiguration.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/extend/LdapImageReaderConfiguration.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/extend/LdapImageWriterConfiguration.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/extend/package-info.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/FileRawImage.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/FileStreamSegment.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/ImageCV.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/ImageConversion.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/ImageParameters.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/ImageProcessor.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/ImageSize.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/J2kImageWriteParam.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/JPEGImageWriteParam.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/JPEGLSImageWriteParam.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/LookupTableCV.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/MemoryStreamSegment.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/NativeImageReader.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/NativeJ2kImageReaderSpi.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/NativeJ2kImageWriter.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/NativeJ2kImageWriterSpi.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/NativeJLSImageReaderSpi.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/NativeJLSImageWriter.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/NativeJLSImageWriterSpi.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/NativeJPEGImageReaderSpi.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/NativeJPEGImageWriter.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/NativeJPEGImageWriterSpi.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/PlanarImage.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/SOFSegment.java rename bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/{ExtendInputImageStream.java => SegmentedImageStream.java} (93%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/StreamSegment.java create mode 100755 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/ByteLut.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/ColorLut.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/DefaultWlPresentation.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/LutParameters.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/LutShape.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/ModalityLutModule.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/PresentationStateLut.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/PresetWindowLevel.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/VoiLutModule.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/WindLevelParameters.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/WlParams.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/WlPresentation.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/lut/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/op/MaskArea.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/op/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/seg/ContourTopology.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/seg/Region.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/seg/RegionAttributes.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/seg/Segment.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/seg/package-info.java rename bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/{ => tile}/TiledAlgorithm.java (59%) rename bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/{ => tile}/TiledProcessor.java (82%) create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/opencv/tile/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/package-info.java rename bus-image/src/main/java/org/miaixz/bus/image/nimble/{DicomMetaData.java => reader/ImageioMetaData.java} (94%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/reader/ImageioReadParam.java rename bus-image/src/main/java/org/miaixz/bus/image/nimble/reader/{NativeDCMImageReader.java => ImageioReader.java} (65%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/nimble/reader/{NativeDCMImageReaderSpi.java => ImageioReaderSpi.java} (89%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/nimble/reader/{NativeRLEImageReader.java => RLEImageioReader.java} (94%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/nimble/reader/{NativeRLEImageReaderSpi.java => RLEImageioReaderSpi.java} (91%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/reader/package-info.java rename bus-image/src/main/java/org/miaixz/bus/image/nimble/{codec => stream}/BytesWithImageDescriptor.java (80%) mode change 100755 => 100644 rename bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/{ImagePixelInputStream.java => EncapsulatedPixelDataImageInputStream.java} (90%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/ExtendSegmentedInputImageStream.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/ImageAdapter.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/ImageDescriptor.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/ImageFileInputStream.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/ImageInputStreamAdapter.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/ImageReaderDescriptor.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/OutputStreamAdapter.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/SeekableInMemoryByteChannel.java rename bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/{SegmentedImageStream.java => SegmentedInputImageStream.java} (82%) mode change 100755 => 100644 create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/nimble/stream/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/package-info.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/CGetForward.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Dcm2Dcm.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Dcm2Jpg.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Dcm2Json.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Dcm2Pdf.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Dcm2String.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Dcm2Xml.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/DcmDir.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/DcmLdap.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Deidentify.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Emf2sf.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/FindSCU.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/FixLO2UN.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/GetSCU.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/HL72Xml.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/HL7Pdq.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/HL7Pix.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/HL7Rcv.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/HL7Snd.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/IanSCP.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/IanSCU.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Jpg2Dcm.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Json2Dcm.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Json2Rst.java delete mode 100755 bus-image/src/main/java/org/miaixz/bus/image/plugin/MkKOS.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Modality.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/MoveSCU.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/MppsSCP.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/MppsSCU.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Pdf2Dcm.java rename bus-image/src/main/java/org/miaixz/bus/image/plugin/{StgSCU.java => StgCmtSCU.java} (73%) mode change 100755 => 100644 mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/StoreSCP.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/StoreSCU.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/StowRS.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/StreamSCU.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Tpl2Xml.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/UpsSCU.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/WadoRS.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Xml2Dcm.java mode change 100755 => 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/Xml2HL7.java create mode 100644 bus-image/src/main/java/org/miaixz/bus/image/plugin/package-info.java create mode 100644 bus-image/src/main/resources/META-INF/services/java.nio.file.spi.FileTypeDetector create mode 100644 bus-image/src/main/resources/META-INF/services/org.miaixz.bus.image.galaxy.data.ElementDictionary create mode 100644 bus-image/src/main/resources/org/miaixz/bus/image/nimble/adobeRGB.icc create mode 100644 bus-image/src/main/resources/org/miaixz/bus/image/nimble/opencv/lut/presets.xml create mode 100644 bus-image/src/main/resources/org/miaixz/bus/image/nimble/rommRGB.icc create mode 100644 bus-image/src/main/resources/org/miaixz/bus/image/nimble/sRGB.icc create mode 100644 bus-image/src/main/resources/org/miaixz/bus/image/plugin/sop-classes-tcs.properties create mode 100644 bus-image/src/main/resources/org/miaixz/bus/image/plugin/sop-classes-uid.properties create mode 100644 bus-image/src/main/resources/org/miaixz/bus/image/plugin/sop-classes.properties diff --git a/bus-core/src/main/java/org/miaixz/bus/core/xyz/NetKit.java b/bus-core/src/main/java/org/miaixz/bus/core/xyz/NetKit.java index 9136eb284b..653f5247a0 100644 --- a/bus-core/src/main/java/org/miaixz/bus/core/xyz/NetKit.java +++ b/bus-core/src/main/java/org/miaixz/bus/core/xyz/NetKit.java @@ -121,7 +121,6 @@ public static boolean isValidPort(final int port) { /** * 查找1024~65535范围内的可用端口 * 此方法只检测给定范围内的随机一个端口,检测65535-1024次 - * 来自org.springframework.util.SocketUtils * * @return 可用的端口 */ @@ -132,7 +131,6 @@ public static int getUsableLocalPort() { /** * 查找指定范围内的可用端口,最大值为65535 * 此方法只检测给定范围内的随机一个端口,检测65535-minPort次 - * 来自org.springframework.util.SocketUtils * * @param minPort 端口最小值(包含) * @return 可用的端口 @@ -144,7 +142,6 @@ public static int getUsableLocalPort(final int minPort) { /** * 查找指定范围内的可用端口 * 此方法只检测给定范围内的随机一个端口,检测maxPort-minPort次 - * 来自org.springframework.util.SocketUtils * * @param minPort 端口最小值(包含) * @param maxPort 端口最大值(包含) @@ -165,7 +162,6 @@ public static int getUsableLocalPort(final int minPort, final int maxPort) { /** * 获取多个本地可用端口 - * 来自org.springframework.util.SocketUtils * * @param numRequested 尝试次数 * @param minPort 端口最小值(包含) diff --git a/bus-image/pom.xml b/bus-image/pom.xml index af7d298546..5dc6aef460 100755 --- a/bus-image/pom.xml +++ b/bus-image/pom.xml @@ -72,6 +72,7 @@ 21 21 1.18.34 + 2.1.3 @@ -93,6 +94,11 @@ ${lombok.version} true + + jakarta.json + jakarta.json-api + ${jakarta.json-api.version} + diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Args.java b/bus-image/src/main/java/org/miaixz/bus/image/Args.java old mode 100755 new mode 100644 index c0ac5aa3ef..6138c14c4f --- a/bus-image/src/main/java/org/miaixz/bus/image/Args.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Args.java @@ -27,19 +27,23 @@ */ package org.miaixz.bus.image; -import lombok.Getter; -import lombok.Setter; -import org.miaixz.bus.image.galaxy.data.ElementDictionary; -import org.miaixz.bus.image.metric.ApplicationEntity; +import lombok.Builder; +import lombok.*; +import org.miaixz.bus.core.net.tls.TrustAnyTrustManager; import org.miaixz.bus.image.metric.Connection; -import org.miaixz.bus.image.metric.SSLManagerFactory; -import org.miaixz.bus.image.metric.internal.pdu.AAssociateRQ; -import org.miaixz.bus.image.metric.internal.pdu.IdentityRQ; +import org.miaixz.bus.image.metric.QueryOption; +import org.miaixz.bus.image.metric.net.ApplicationEntity; +import org.miaixz.bus.image.metric.net.Priority; +import org.miaixz.bus.image.metric.pdu.AAssociateRQ; +import org.miaixz.bus.image.metric.pdu.IdentityAC; +import org.miaixz.bus.image.metric.pdu.IdentityRQ; import java.io.IOException; import java.net.URL; import java.security.GeneralSecurityException; +import java.util.Arrays; import java.util.EnumSet; +import java.util.List; /** * 请求参数信息 @@ -49,31 +53,34 @@ */ @Getter @Setter +@Builder +@NoArgsConstructor +@AllArgsConstructor public class Args { - public static String[] IVR_LE_FIRST = { - UID.ImplicitVRLittleEndian, - UID.ExplicitVRLittleEndian, - UID.ExplicitVRBigEndianRetired + public static final String[] IVR_LE_FIRST = { + UID.ImplicitVRLittleEndian.uid, + UID.ExplicitVRLittleEndian.uid, + UID.ExplicitVRBigEndian.uid }; - public static String[] EVR_LE_FIRST = { - UID.ExplicitVRLittleEndian, - UID.ExplicitVRBigEndianRetired, - UID.ImplicitVRLittleEndian + public static final String[] EVR_LE_FIRST = { + UID.ExplicitVRLittleEndian.uid, + UID.ExplicitVRBigEndian.uid, + UID.ImplicitVRLittleEndian.uid }; - public static String[] EVR_BE_FIRST = { - UID.ExplicitVRBigEndianRetired, - UID.ExplicitVRLittleEndian, - UID.ImplicitVRLittleEndian + public static final String[] EVR_BE_FIRST = { + UID.ExplicitVRBigEndian.uid, + UID.ExplicitVRLittleEndian.uid, + UID.ImplicitVRLittleEndian.uid }; - public static String[] IVR_LE_ONLY = { - UID.ImplicitVRLittleEndian + public static final String[] IVR_LE_ONLY = { + UID.ImplicitVRLittleEndian.uid }; + /** * 绑定调用AET */ private boolean bindCallingAet; - /** * 接受的呼叫AET */ @@ -82,82 +89,81 @@ public class Args { * 信息模型 */ private Object informationModel; - private EnumSet types = EnumSet.noneOf(Option.Type.class); - private String[] tsuidOrder = IVR_LE_FIRST; - private String proxy; - private IdentityRQ identity; - private int priority = 0; - private Option option; - private boolean extendNegociation; - /** - * 扩展Sop类URL - */ - private URL extendSopClassesURL; + @Builder.Default + private EnumSet queryOptions = EnumSet.noneOf(QueryOption.class); + @Builder.Default + private String[] tsuidOrder = Arrays.copyOf(IVR_LE_FIRST, IVR_LE_FIRST.length); - private URL extendStorageSOPClass; /** - * 传输功能文件 + * 配置proxy <[user:password@]host:port>,指定HTTP代理隧道连接DICOM的主机和端口。 */ - private URL transferCapabilityFile; + private String proxy; + + private IdentityRQ identityRQ; + private IdentityAC identityAC; - private int tag; - private String[] values; - private int[] parentSeqTags; /** - * 存储模式 + * 优先级 */ - private String storagePattern; + @Builder.Default + private int priority = Priority.NORMAL; - private Editors editors; + private Option option; - public Args() { + private List editors; + + /** + * 是否启用通过UID或名称指定传输 + */ + private boolean negociation; + /** + * SOP类和传输语法可以通过其UID或名称指定 + * sop-classes.properties + */ + private URL sopClasses; + /** + * 根据DICOM Part 4, B.3.1.4定义相关的通用SOP类 + * sop-classes-uid.properties + */ + private URL sopClassesUID; + /** + * 扩展Sop类和传输语法的存储传输能力 + * sop-classes-tcs.properties + */ + private URL sopClassesTCS; - } public Args(boolean bindCallingAet) { this(null, bindCallingAet, null, null); } - public Args(int tag, String... values) { - this(null, tag, values); - } - /** * @param editors 修改DICOM属性的编辑器 - * @param extendNegociation 扩展SOP类 - * @param extendSopClassesURL SOP类扩展的配置文件 + * @param negociation 扩展SOP类 + * @param sopClasses SOP类扩展的配置文件 */ - public Args(Editors editors, - boolean extendNegociation, - URL extendSopClassesURL) { + public Args(List editors, + boolean negociation, + URL sopClasses) { this.editors = editors; - this.extendNegociation = extendNegociation; - this.extendSopClassesURL = extendSopClassesURL; - } - - public Args(int[] parentSeqTags, int tag, String... values) { - this.tag = tag; - this.values = values; - this.parentSeqTags = parentSeqTags; + this.negociation = negociation; + this.sopClasses = sopClasses; } /** * @param option 可选的高级参数(代理、身份验证、连接和TLS) * @param bindCallingAet 当为true时,它将设置侦听器DICOM节点的AET。只有匹配称为AETitle的请求将被接受。 * 如果为假,所有被调用的AETs将被接受 - * @param storagePattern 存储模式 - * @param transferCapabilityFile 获取包含传输功能(sopclass、role、transferSyntaxes)的文件的URL + * @param sopClassesTCS 获取包含传输功能(sopclass、role、transferSyntaxes)的文件的URL * @param acceptedCallingAETitles 可接受的呼叫aetitle的列表。空将接受所有aetitle */ public Args(Option option, boolean bindCallingAet, - String storagePattern, - URL transferCapabilityFile, + URL sopClassesTCS, String... acceptedCallingAETitles) { this.bindCallingAet = bindCallingAet; - this.storagePattern = storagePattern; - this.transferCapabilityFile = transferCapabilityFile; + this.sopClassesTCS = sopClassesTCS; this.acceptedCallingAETitles = null == acceptedCallingAETitles ? new String[0] : acceptedCallingAETitles; if (null == option && null != this.option) { this.option.setMaxOpsInvoked(15); @@ -165,8 +171,13 @@ public Args(Option option, } } - public String getTagName() { - return ElementDictionary.keywordOf(tag, null); + public void configureConnect(AAssociateRQ aAssociateRQ, Connection remote, Node calledNode) { + aAssociateRQ.setCalledAET(calledNode.getAet()); + if (identityRQ != null) { + aAssociateRQ.setIdentityRQ(identityRQ); + } + remote.setHostname(calledNode.getHostname()); + remote.setPort(calledNode.getPort()); } /** @@ -175,12 +186,11 @@ public String getTagName() { * @param connection 连接信息 * @param callingNode 节点信息 */ - public void configureBind(Connection connection, - Node callingNode) { - if (null != callingNode.getHostname()) { + public void configureBind(Connection connection, Node callingNode) { + if (callingNode.getHostname() != null) { connection.setHostname(callingNode.getHostname()); } - if (null != callingNode.getPort()) { + if (callingNode.getPort() != null) { connection.setPort(callingNode.getPort()); } } @@ -189,8 +199,11 @@ public void configureBind(AAssociateRQ aAssociateRQ, Connection remote, Node calledNode) { aAssociateRQ.setCalledAET(calledNode.getAet()); - if (null != identity) { - aAssociateRQ.setIdentityRQ(identity); + if (null != identityRQ) { + aAssociateRQ.setIdentityRQ(identityRQ); + } + if (null != identityAC) { + aAssociateRQ.setIdentityAC(identityAC); } remote.setHostname(calledNode.getHostname()); remote.setPort(calledNode.getPort()); @@ -203,9 +216,7 @@ public void configureBind(AAssociateRQ aAssociateRQ, * @param connection 连接信息 * @param callingNode 节点信息 */ - public void configureBind(ApplicationEntity applicationEntity, - Connection connection, - Node callingNode) { + public void configureBind(ApplicationEntity applicationEntity, Connection connection, Node callingNode) { applicationEntity.setAETitle(callingNode.getAet()); if (null != callingNode.getHostname()) { connection.setHostname(callingNode.getHostname()); @@ -221,7 +232,7 @@ public void configureBind(ApplicationEntity applicationEntity, * @param conn 链接信息 */ public void configure(Connection conn) { - if (null != option) { + if (option != null) { conn.setBacklog(option.getBacklog()); conn.setConnectTimeout(option.getConnectTimeout()); conn.setRequestTimeout(option.getRequestTimeout()); @@ -250,18 +261,20 @@ public void configure(Connection conn) { * @throws IOException 异常 */ public void configureTLS(Connection conn, Connection remote) throws IOException { - if (null != option) { - conn.setTlsCipherSuites(option.getCipherSuites()); - conn.setTlsProtocols(option.getTlsProtocols()); + if (option != null) { + if (option.getCipherSuites() != null) { + conn.setTlsCipherSuites(option.getCipherSuites().toArray(new String[0])); + } + if (option.getTlsProtocols() != null) { + conn.setTlsProtocols(option.getTlsProtocols().toArray(new String[0])); + } conn.setTlsNeedClientAuth(option.isTlsNeedClientAuth()); Device device = conn.getDevice(); try { - device.setKeyManager(SSLManagerFactory.createKeyManager(option.getKeystoreType(), - option.getKeystoreURL(), option.getKeystorePass(), option.getKeyPass())); - device.setTrustManager(SSLManagerFactory.createTrustManager(option.getTruststoreType(), - option.getTruststoreURL(), option.getTruststorePass())); - if (null != remote) { + device.setKeyManager(TrustAnyTrustManager.createKeyManager(option.getKeystoreType(), option.getKeystoreURL(), option.getKeystorePass(), option.getKeyPass())); + device.setTrustManager(TrustAnyTrustManager.createTrustManager(option.getTruststoreType(), option.getTruststoreURL(), option.getTruststorePass())); + if (remote != null) { remote.setTlsProtocols(conn.getTlsProtocols()); remote.setTlsCipherSuites(conn.getTlsCipherSuites()); } @@ -271,4 +284,8 @@ public void configureTLS(Connection conn, Connection remote) throws IOException } } + public boolean hasEditors() { + return editors != null && !editors.isEmpty(); + } + } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Builder.java b/bus-image/src/main/java/org/miaixz/bus/image/Builder.java old mode 100755 new mode 100644 index 31116bb65d..63bd9f4378 --- a/bus-image/src/main/java/org/miaixz/bus/image/Builder.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Builder.java @@ -27,136 +27,186 @@ */ package org.miaixz.bus.image; +import org.miaixz.bus.core.lang.Keys; +import org.miaixz.bus.core.lang.MediaType; import org.miaixz.bus.core.lang.Normal; -import org.miaixz.bus.core.lang.Symbol; +import org.miaixz.bus.core.xyz.ColorKit; import org.miaixz.bus.core.xyz.IoKit; -import org.miaixz.bus.core.xyz.StreamKit; import org.miaixz.bus.core.xyz.StringKit; -import org.miaixz.bus.image.galaxy.data.Attributes; -import org.miaixz.bus.image.galaxy.data.BulkData; -import org.miaixz.bus.image.galaxy.data.ElementDictionary; -import org.miaixz.bus.image.galaxy.data.VR; +import org.miaixz.bus.image.galaxy.ImageProgress; +import org.miaixz.bus.image.galaxy.ProgressStatus; +import org.miaixz.bus.image.galaxy.SupplierEx; +import org.miaixz.bus.image.galaxy.data.*; import org.miaixz.bus.image.galaxy.io.ImageInputStream; -import org.miaixz.bus.image.galaxy.io.ImageOutputStream; -import org.miaixz.bus.image.metric.Progress; -import org.miaixz.bus.image.nimble.codec.jpeg.JPEG; -import org.miaixz.bus.image.nimble.codec.jpeg.JPEGHeader; -import org.miaixz.bus.image.nimble.codec.mpeg.MPEGHeader; +import org.miaixz.bus.image.nimble.CIELab; import org.miaixz.bus.logger.Logger; +import org.miaixz.bus.setting.metric.props.Props; -import java.io.*; -import java.nio.file.Files; -import java.util.Arrays; -import java.util.Date; +import java.awt.*; +import java.awt.geom.Area; +import java.awt.geom.Ellipse2D; +import java.awt.geom.Rectangle2D; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URL; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.temporal.ChronoUnit; +import java.time.temporal.TemporalAccessor; import java.util.List; -import java.util.Optional; +import java.util.*; import java.util.concurrent.ExecutorService; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.DoubleStream; +import java.util.stream.IntStream; +import java.util.stream.Stream; /** - * 方法参数等构建器 - * * @author Kimi Liu * @since Java 17+ */ public class Builder { - public static final int APP_CONTEXT = 0x10; - public static final int RQ_PRES_CONTEXT = 0x20; - public static final int AC_PRES_CONTEXT = 0x21; - public static final int ABSTRACT_SYNTAX = 0x30; - public static final int TRANSFER_SYNTAX = 0x40; - public static final int USER_INFO = 0x50; - public static final int MAX_PDU_LENGTH = 0x51; - public static final int IMPL_CLASS_UID = 0x52; - public static final int ASYNC_OPS_WINDOW = 0x53; - public static final int ROLE_SELECTION = 0x54; - public static final int IMPL_VERSION_NAME = 0x55; - public static final int EXT_NEG = 0x56; - public static final int COMMON_EXT_NEG = 0x57; - public static final int RQ_USER_IDENTITY = 0x58; - public static final int AC_USER_IDENTITY = 0x59; - public static final int MAGIC_LEN = 0xfbfb; - - public static final int KNOWN_INCONSISTENCIES = 0xFFFF; - public static final int NO_KNOWN_INCONSISTENCIES = 0; - public static final int IN_USE = 0xFFFF; - public static final int IN_ACTIVE = 0; - - public static final String FAILED = "FAILED"; - public static final String WARNING = "WARNING"; - public static final String COMPLETED = "COMPLETED"; - - public static final int FILE_BUFFER = 4096; - public static final String SegmentSequenceError = "100"; - public static final String RequiredFieldMissing = "101"; - public static final String DataTypeError = "102"; - public static final String TableValueNotFound = "103"; - public static final String UnsupportedMessageType = "200"; - public static final String UnsupportedEventCode = "201"; - public static final String UnsupportedProcessingID = "202"; - public static final String UnsupportedVersionID = "203"; - public static final String UnknownKeyIdentifier = "204"; - public static final String DuplicateKeyIdentifier = "205"; - public static final String ApplicationRecordLocked = "206"; - public static final String ApplicationInternalError = "207"; - public static final String UnknownSendingApplication = "MSH^1^3"; - public static final String UnknownSendingFacility = "MSH^1^4"; - public static final String UnknownReceivingApplication = "MSH^1^5"; - public static final String UnknownReceivingFacility = "MSH^1^6"; - public static final int MAX_PACKAGE_LEN = 0x10000; - public static final int A_ASSOCIATE_RQ = 0x01; - public static final int A_ASSOCIATE_AC = 0x02; - public static final int A_ASSOCIATE_RJ = 0x03; - public static final int P_DATA_TF = 0x04; - public static final int A_RELEASE_RQ = 0x05; - public static final int A_RELEASE_RP = 0x06; - public static final int A_ABORT = 0x07; - public static final int DATA = 0; - public static final int COMMAND = 1; - public static final int PENDING = 0; - public static final int LAST = 2; - public static final String IMAGE_ORIGINAL_SUFFIX = ".dcm"; - public static final String IMAGE_CONVERT_SUFFIX = ".jpg"; - private static final int INIT_BUFFER_SIZE = 8192; - private static final int MAX_BUFFER_SIZE = 10485768; - - public static String toUID(String uid) { - uid = uid.trim(); - return Symbol.STAR.equals(uid) || Character.isDigit(uid.charAt(0)) ? uid : UID.forName(uid); - } - - public static String[] toUIDs(String s) { - if (Symbol.STAR.equals(s)) { - return new String[]{Symbol.STAR}; - } - - String[] uids = StringKit.splitToArray(s, Symbol.COMMA); - for (int i = 0; i < uids.length; i++) { - uids[i] = toUID(uids[i]); - } - return uids; - } - - public static void close(ImageInputStream in) { - if (null != in) { - for (File file : in.getBulkDataFiles()) { - Builder.delete(file); - } - } - } - - public static void close(final AutoCloseable object) { - if (null != object) { - try { - object.close(); - } catch (Exception e) { - Logger.error("Cannot close AutoCloseable", e); + private static final char[] BASE64 = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'}; + private static final byte[] INV_BASE64 = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 + }; + public static String LINE_SEPARATOR = System.getProperty(Keys.LINE_SEPARATOR); + + /** + * Prepare a file to be written by creating the parent directory if necessary. + * + * @param file the source file + * @throws IOException if an I/O error occurs + */ + public static void prepareToWriteFile(File file) throws IOException { + if (!file.exists()) { + // Check the file that doesn't exist yet. + // Create a new file. The file is writable if the creation succeeds. + File outputDir = file.getParentFile(); + // necessary to check exists otherwise mkdirs() is false when dir exists + if (outputDir != null && !outputDir.exists() && !outputDir.mkdirs()) { + throw new IOException("Cannot write parent directory of " + file.getPath()); } } } + /** + * Print a byte count in a human-readable format + * + * @param bytes number of bytes + * @param si true for SI units (powers of 1000), false for binary units (powers of 1024) + * @return the human-readable size of the byte count + * @see World's most copied + * StackOverflow snippet + */ + public static String humanReadableByte(long bytes, boolean si) { + int unit = si ? 1000 : 1024; + long absBytes = bytes == Long.MIN_VALUE ? Long.MAX_VALUE : Math.abs(bytes); + if (absBytes < unit) return bytes + " B"; + int exp = (int) (Math.log(absBytes) / Math.log(unit)); + long th = (long) Math.ceil(Math.pow(unit, exp) * (unit - 0.05)); + if (exp < 6 && absBytes >= th - ((th & 0xFFF) == 0xD00 ? 51 : 0)) exp++; + String pre = (si ? "kMGTPE" : "KMGTPE").charAt(exp - 1) + (si ? "" : "i"); + if (exp > 4) { + bytes /= unit; + exp -= 1; + } + return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre); + } + + public static Properties loadProperties(String url, Properties p) throws IOException { + if (p == null) { + p = new Properties(); + } + try (InputStream in = IoKit.openFileOrURL(url)) { + p.load(in); + } + return p; + } + + public static void addAttributes(Attributes attrs, int[] tags, String... ss) { + Attributes item = attrs; + for (int i = 0; i < tags.length - 1; i++) { + int tag = tags[i]; + Sequence sq = item.getSequence(tag); + if (sq == null) { + sq = item.newSequence(tag, 1); + } + if (sq.isEmpty()) { + sq.add(new Attributes()); + } + item = sq.get(0); + } + int tag = tags[tags.length - 1]; + VR vr = ElementDictionary.vrOf(tag, item.getPrivateCreator(tag)); + if (ss.length == 0 || ss.length == 1 && ss[0].isEmpty()) { + if (vr == VR.SQ) { + item.newSequence(tag, 1).add(new Attributes(0)); + } else { + item.setNull(tag, vr); + } + } else { + item.setString(tag, vr, ss); + } + } + + public static void addAttributes(Attributes attrs, String[] optVals) { + if (optVals != null) + for (String optVal : optVals) { + int delim = optVal.indexOf('='); + if (delim < 0) { + addAttributes(attrs, Tag.toTags(StringKit.splitToArray(optVal, "/"))); + } else { + addAttributes( + attrs, + Tag.toTags(StringKit.splitToArray(optVal.substring(0, delim), "/")), + optVal.substring(delim + 1)); + } + } + } + + public static void addEmptyAttributes(Attributes attrs, String[] optVals) { + if (optVals != null) { + for (int i = 0; i < optVals.length; i++) { + addAttributes(attrs, Tag.toTags(StringKit.splitToArray(optVals[i], "/"))); + } + } + } + + public static boolean updateAttributes(Attributes data, Attributes attrs, String uidSuffix) { + if (attrs.isEmpty() && uidSuffix == null) { + return false; + } + if (uidSuffix != null) { + data.setString(Tag.StudyInstanceUID, VR.UI, data.getString(Tag.StudyInstanceUID) + uidSuffix); + data.setString( + Tag.SeriesInstanceUID, VR.UI, data.getString(Tag.SeriesInstanceUID) + uidSuffix); + data.setString(Tag.SOPInstanceUID, VR.UI, data.getString(Tag.SOPInstanceUID) + uidSuffix); + } + data.update(UpdatePolicy.OVERWRITE, attrs, null); + return true; + } + public static void shutdown(ExecutorService executorService) { - if (null != executorService) { + if (executorService != null) { try { executorService.shutdown(); } catch (Exception e) { @@ -165,106 +215,676 @@ public static void shutdown(ExecutorService executorService) { } } - public static void forceGettingAttributes(Status dcmState, AutoCloseable closeable) { - Progress p = dcmState.getProgress(); - if (null != p) { - Builder.close(closeable); + public static void encode(byte[] src, int srcPos, int srcLen, char[] dest, + int destPos) { + if (srcPos < 0 || srcLen < 0 || srcLen > src.length - srcPos) + throw new IndexOutOfBoundsException(); + int destLen = (srcLen * 4 / 3 + 3) & ~3; + if (destPos < 0 || destLen > dest.length - destPos) + throw new IndexOutOfBoundsException(); + byte b1, b2, b3; + int n = srcLen / 3; + int r = srcLen - 3 * n; + while (n-- > 0) { + dest[destPos++] = BASE64[((b1 = src[srcPos++]) >>> 2) & 0x3F]; + dest[destPos++] = BASE64[((b1 & 0x03) << 4) + | (((b2 = src[srcPos++]) >>> 4) & 0x0F)]; + dest[destPos++] = BASE64[((b2 & 0x0F) << 2) + | (((b3 = src[srcPos++]) >>> 6) & 0x03)]; + dest[destPos++] = BASE64[b3 & 0x3F]; + } + if (r > 0) + if (r == 1) { + dest[destPos++] = BASE64[((b1 = src[srcPos]) >>> 2) & 0x3F]; + dest[destPos++] = BASE64[((b1 & 0x03) << 4)]; + dest[destPos++] = '='; + dest[destPos++] = '='; + } else { + dest[destPos++] = BASE64[((b1 = src[srcPos++]) >>> 2) & 0x3F]; + dest[destPos++] = BASE64[((b1 & 0x03) << 4) + | (((b2 = src[srcPos]) >>> 4) & 0x0F)]; + dest[destPos++] = BASE64[(b2 & 0x0F) << 2]; + dest[destPos++] = '='; + } + } + + public static void decode(char[] ch, int off, int len, OutputStream out) + throws IOException { + byte b2, b3; + while ((len -= 2) >= 0) { + out.write((byte) ((INV_BASE64[ch[off++]] << 2) + | ((b2 = INV_BASE64[ch[off++]]) >>> 4))); + if ((len-- == 0) || ch[off] == '=') + break; + out.write((byte) ((b2 << 4) + | ((b3 = INV_BASE64[ch[off++]]) >>> 2))); + if ((len-- == 0) || ch[off] == '=') + break; + out.write((byte) ((b3 << 6) | INV_BASE64[ch[off++]])); } } - public static void getAllFilesInDirectory(File directory, List files, boolean recursive) { - File[] fList = directory.listFiles(); - for (File f : fList) { - if (f.isFile()) { - files.add(f); - } else if (recursive && f.isDirectory()) { - getAllFilesInDirectory(f, files, recursive); + public static boolean getEmptytoFalse(String val) { + if (StringKit.hasText(val)) { + return getBoolean(val); + } + return false; + } + + private static boolean getBoolean(String val) { + return Boolean.TRUE.toString().equalsIgnoreCase(val); + } + + public static OptionalDouble getOptionalDouble(Double val) { + return val == null ? OptionalDouble.empty() : OptionalDouble.of(val); + } + + public static OptionalInt getOptionalInteger(Integer val) { + return val == null ? OptionalInt.empty() : OptionalInt.of(val); + } + + public static boolean isVideo(String uid) { + return switch (UID.from(uid)) { + case UID.MPEG2MPML, + UID.MPEG2MPMLF, + UID.MPEG2MPHL, + UID.MPEG2MPHLF, + UID.MPEG4HP41, + UID.MPEG4HP41F, + UID.MPEG4HP41BD, + UID.MPEG4HP41BDF, + UID.MPEG4HP422D, + UID.MPEG4HP422DF, + UID.MPEG4HP423D, + UID.MPEG4HP423DF, + UID.MPEG4HP42STEREO, + UID.MPEG4HP42STEREOF, + UID.HEVCMP51, + UID.HEVCM10P51 -> true; + default -> false; + }; + } + + public static boolean isJpeg2000(String uid) { + return switch (UID.from(uid)) { + case UID.JPEG2000Lossless, + UID.JPEG2000, + UID.JPEG2000MCLossless, + UID.JPEG2000MC, + UID.HTJ2KLossless, + UID.HTJ2KLosslessRPCL, + UID.HTJ2K -> true; + default -> false; + }; + } + + public static boolean isNative(String uid) { + return switch (UID.from(uid)) { + case UID.ImplicitVRLittleEndian, UID.ExplicitVRLittleEndian, UID.ExplicitVRBigEndian -> true; + default -> false; + }; + } + + public static String getFormattedText(Object value, String format) { + return getFormattedText(value, format, Locale.getDefault()); + } + + public static String getFormattedText(Object value, String format, Locale locale) { + if (value == null) { + return Normal.EMPTY; + } + + String str; + + if (value instanceof String string) { + str = string; + } else if (value instanceof String[] strings) { + str = String.join("\\", Arrays.asList(strings)); + } else if (value instanceof TemporalAccessor temporal) { + str = Format.formatDateTime(temporal, locale); + } else if (value instanceof TemporalAccessor[] temporal) { + str = + Stream.of(temporal) + .map(v -> Format.formatDateTime(v, locale)) + .collect(Collectors.joining(", ")); + } else if (value instanceof float[] array) { + str = + IntStream.range(0, array.length) + .mapToObj(i -> String.valueOf(array[i])) + .collect(Collectors.joining(", ")); + } else if (value instanceof double[] array) { + str = DoubleStream.of(array).mapToObj(String::valueOf).collect(Collectors.joining(", ")); + } else if (value instanceof int[] array) { + str = IntStream.of(array).mapToObj(String::valueOf).collect(Collectors.joining(", ")); + } else { + str = value.toString(); + } + + if (StringKit.hasText(format) && !"$V".equals(format.trim())) { + return formatValue(str, value instanceof Float || value instanceof Double, format); + } + + return str == null ? Normal.EMPTY : str; + } + + protected static String formatValue(String value, boolean decimal, String format) { + String str = value; + int index = format.indexOf("$V"); + int fmLength = 2; + if (index != -1) { + boolean suffix = format.length() > index + fmLength; + // If the value ($V) is followed by ':' that means a number formatter is used + if (suffix && format.charAt(index + fmLength) == ':') { + fmLength++; + if (format.charAt(index + fmLength) == 'f' && decimal) { + fmLength++; + String pattern = getPattern(index + fmLength, format); + if (pattern != null) { + fmLength += pattern.length() + 2; + try { + str = + new DecimalFormat(pattern, DecimalFormatSymbols.getInstance()) + .format(Double.parseDouble(str)); + } catch (NumberFormatException e) { + Logger.warn("Cannot apply pattern to decimal value", e); + } + } + } else if (format.charAt(index + fmLength) == 'l') { + fmLength++; + String pattern = getPattern(index + fmLength, format); + if (pattern != null) { + fmLength += pattern.length() + 2; + try { + int limit = Integer.parseInt(pattern); + int size = str.length(); + if (size > limit) { + str = str.substring(0, limit) + "..."; + } + } catch (NumberFormatException e) { + Logger.warn("Cannot apply pattern to decimal value", e); + } + } + } + } + str = format.substring(0, index) + str; + if (format.length() > index + fmLength) { + str += format.substring(index + fmLength); } } + return str; } - private static boolean deleteFile(File fileOrDirectory) { + private static String getPattern(int startIndex, String format) { + int beginIndex = format.indexOf('$', startIndex); + int endIndex = format.indexOf('$', startIndex + 2); + if (beginIndex == -1 || endIndex == -1) { + return null; + } + return format.substring(beginIndex + 1, endIndex); + } + + public static String getStringFromDicomElement(Attributes dicom, int tag) { + if (dicom == null || !dicom.containsValue(tag)) { + return null; + } + + String[] s = dicom.getStrings(tag); + if (s == null || s.length == 0) { + return null; + } + if (s.length == 1) { + return s[0]; + } + StringBuilder sb = new StringBuilder(s[0]); + for (int i = 1; i < s.length; i++) { + sb.append("\\").append(s[i]); + } + return sb.toString(); + } + + public static String[] getStringArrayFromDicomElement(Attributes dicom, int tag) { + return getStringArrayFromDicomElement(dicom, tag, (String) null); + } + + public static String[] getStringArrayFromDicomElement( + Attributes dicom, int tag, String privateCreatorID) { + if (dicom == null || !dicom.containsValue(tag)) { + return null; + } + return dicom.getStrings(privateCreatorID, tag); + } + + public static String[] getStringArrayFromDicomElement( + Attributes dicom, int tag, String[] defaultValue) { + return getStringArrayFromDicomElement(dicom, tag, null, defaultValue); + } + + public static String[] getStringArrayFromDicomElement( + Attributes dicom, int tag, String privateCreatorID, String[] defaultValue) { + if (dicom == null || !dicom.containsValue(tag)) { + return defaultValue; + } + String[] val = dicom.getStrings(privateCreatorID, tag); + if (val == null || val.length == 0) { + return defaultValue; + } + return val; + } + + public static Date getDateFromDicomElement(Attributes dicom, int tag, Date defaultValue) { + if (dicom == null || !dicom.containsValue(tag)) { + return defaultValue; + } + return dicom.getDate(tag, defaultValue); + } + + public static Date[] getDatesFromDicomElement( + Attributes dicom, int tag, String privateCreatorID, Date[] defaultValue) { + if (dicom == null || !dicom.containsValue(tag)) { + return defaultValue; + } + Date[] val = dicom.getDates(privateCreatorID, tag); + if (val == null || val.length == 0) { + return defaultValue; + } + return val; + } + + public static String getPatientAgeInPeriod(Attributes dicom, int tag, boolean computeOnlyIfNull) { + return getPatientAgeInPeriod(dicom, tag, null, null, computeOnlyIfNull); + } + + public static String getPatientAgeInPeriod( + Attributes dicom, + int tag, + String privateCreatorID, + String defaultValue, + boolean computeOnlyIfNull) { + if (dicom == null) { + return defaultValue; + } + + if (computeOnlyIfNull) { + String s = dicom.getString(privateCreatorID, tag, defaultValue); + if (StringKit.hasText(s)) { + return s; + } + } + + Date date = + getDate( + dicom, + Tag.ContentDate, + Tag.AcquisitionDate, + Tag.DateOfSecondaryCapture, + Tag.SeriesDate, + Tag.StudyDate); + + if (date != null) { + Date bithdate = dicom.getDate(Tag.PatientBirthDate); + if (bithdate != null) { + return getPeriod(Format.toLocalDate(bithdate), Format.toLocalDate(date)); + } + } + return null; + } + + private static Date getDate(Attributes dicom, int... tagID) { + Date date = null; + for (int i : tagID) { + date = dicom.getDate(i); + if (date != null) { + return date; + } + } + return date; + } + + public static String getPeriod(LocalDate first, LocalDate last) { + Objects.requireNonNull(first); + Objects.requireNonNull(last); + + long years = ChronoUnit.YEARS.between(first, last); + if (years < 2) { + long months = ChronoUnit.MONTHS.between(first, last); + if (months < 2) { + return String.format("%03dD", ChronoUnit.DAYS.between(first, last)); + } + return String.format("%03dM", months); + } + return String.format("%03dY", years); + } + + public static Float getFloatFromDicomElement(Attributes dicom, int tag, Float defaultValue) { + return getFloatFromDicomElement(dicom, tag, null, defaultValue); + } + + public static Float getFloatFromDicomElement( + Attributes dicom, int tag, String privateCreatorID, Float defaultValue) { + if (dicom == null || !dicom.containsValue(tag)) { + return defaultValue; + } try { - Files.delete(fileOrDirectory.toPath()); - } catch (Exception e) { - Logger.error("Cannot delete", e); - return false; + return dicom.getFloat(privateCreatorID, tag, defaultValue == null ? 0.0F : defaultValue); + } catch (NumberFormatException e) { + Logger.error("Cannot parse Float of {}: {} ", Tag.toString(tag), e.getMessage()); } - return true; + return defaultValue; } - public static boolean delete(File fileOrDirectory) { - if (null == fileOrDirectory || !fileOrDirectory.exists()) { - return false; + public static Integer getIntegerFromDicomElement( + Attributes dicom, int tag, Integer defaultValue) { + return getIntegerFromDicomElement(dicom, tag, null, defaultValue); + } + + public static Integer getIntegerFromDicomElement( + Attributes dicom, int tag, String privateCreatorID, Integer defaultValue) { + if (dicom == null || !dicom.containsValue(tag)) { + return defaultValue; + } + try { + return dicom.getInt(privateCreatorID, tag, defaultValue == null ? 0 : defaultValue); + } catch (NumberFormatException e) { + Logger.error("Cannot parse Integer of {}: {} ", Tag.toString(tag), e.getMessage()); + } + return defaultValue; + } + + public static Double getDoubleFromDicomElement(Attributes dicom, int tag, Double defaultValue) { + return getDoubleFromDicomElement(dicom, tag, null, defaultValue); + } + + public static Double getDoubleFromDicomElement( + Attributes dicom, int tag, String privateCreatorID, Double defaultValue) { + if (dicom == null || !dicom.containsValue(tag)) { + return defaultValue; + } + try { + return dicom.getDouble(privateCreatorID, tag, defaultValue == null ? 0.0 : defaultValue); + } catch (NumberFormatException e) { + Logger.error("Cannot parse Double of {}: {} ", Tag.toString(tag), e.getMessage()); + } + return defaultValue; + } + + public static int[] getIntArrayFromDicomElement(Attributes dicom, int tag, int[] defaultValue) { + return getIntArrayFromDicomElement(dicom, tag, null, defaultValue); + } + + public static int[] getIntArrayFromDicomElement( + Attributes dicom, int tag, String privateCreatorID, int[] defaultValue) { + if (dicom == null || !dicom.containsValue(tag)) { + return defaultValue; + } + try { + int[] val = dicom.getInts(privateCreatorID, tag); + if (val != null && val.length != 0) { + return val; + } + } catch (NumberFormatException e) { + Logger.error("Cannot parse int[] of {}: {} ", Tag.toString(tag), e.getMessage()); + } + return defaultValue; + } + + public static float[] getFloatArrayFromDicomElement( + Attributes dicom, int tag, float[] defaultValue) { + return getFloatArrayFromDicomElement(dicom, tag, null, defaultValue); + } + + public static float[] getFloatArrayFromDicomElement( + Attributes dicom, int tag, String privateCreatorID, float[] defaultValue) { + if (dicom == null || !dicom.containsValue(tag)) { + return defaultValue; } + try { + float[] val = dicom.getFloats(privateCreatorID, tag); + if (val != null && val.length != 0) { + return val; + } + } catch (NumberFormatException e) { + Logger.error("Cannot parse float[] of {}: {} ", Tag.toString(tag), e.getMessage()); + } + return defaultValue; + } - if (fileOrDirectory.isDirectory()) { - final File[] files = fileOrDirectory.listFiles(); - if (null != files) { - for (File child : files) { - delete(child); + public static double[] getDoubleArrayFromDicomElement( + Attributes dicom, int tag, double[] defaultValue) { + return getDoubleArrayFromDicomElement(dicom, tag, null, defaultValue); + } + + public static double[] getDoubleArrayFromDicomElement( + Attributes dicom, int tag, String privateCreatorID, double[] defaultValue) { + if (dicom == null || !dicom.containsValue(tag)) { + return defaultValue; + } + try { + double[] val = dicom.getDoubles(privateCreatorID, tag); + if (val != null && val.length != 0) { + return val; + } + } catch (NumberFormatException e) { + Logger.error("Cannot parse double[] of {}: {} ", Tag.toString(tag), e.getMessage()); + } + return defaultValue; + } + + public static List getSequence(Attributes dicom, int tagSeq) { + if (dicom != null) { + Sequence item = dicom.getSequence(tagSeq); + if (item != null) { + return item; + } + } + return Collections.emptyList(); + } + + public static boolean isImageFrameApplicableToReferencedImageSequence( + List refImgSeq, + int childTag, + String sopInstanceUID, + int frame, + boolean required) { + if (!required && (refImgSeq == null || refImgSeq.isEmpty())) { + return true; + } + if (StringKit.hasText(sopInstanceUID)) { + for (Attributes sopUID : refImgSeq) { + if (sopInstanceUID.equals(sopUID.getString(Tag.ReferencedSOPInstanceUID))) { + int[] frames = sopUID.getInts(childTag); + if (frames == null || frames.length == 0) { + return true; + } + for (int f : frames) { + if (f == frame) { + return true; + } + } + // if the frame has been excluded + return false; } } } - return deleteFile(fileOrDirectory); + return false; } - public static void prepareToWriteFile(File file) throws IOException { - if (!file.exists()) { - // 检查尚不存在的文件 - // 创建一个新文件。如果创建成功,则该文件可写 - File outputDir = file.getParentFile(); - // 需要检查是否存在,否则当dir存在时mkdirs()为false - if (null != outputDir && !outputDir.exists() && !outputDir.mkdirs()) { - throw new IOException("Cannot write parent directory of " + file.getPath()); + public static SupplierEx memoize(SupplierEx original) { + return new SupplierEx<>() { + boolean initialized; + + public T get() throws E { + return delegate.get(); + } + + private synchronized T firstTime() throws E { + if (!initialized) { + T value = original.get(); + delegate = () -> value; + initialized = true; + } + return delegate.get(); + } + + SupplierEx delegate = this::firstTime; + }; + } + + public static LocalDate getDicomDate(String date) { + if (StringKit.hasText(date)) { + try { + return Format.parseDA(date); + } catch (Exception e) { + Logger.error("Parse DICOM date", e); // $NON-NLS-1$ } } + return null; } - public static String humanReadableByte(long bytes, boolean si) { - int unit = si ? 1000 : Normal._1024; - if (bytes < unit) return bytes + " B"; - int exp = (int) (Math.log(bytes) / Math.log(unit)); - String pre = (si ? "kMGTPE" : "KMGTPE").charAt(exp - 1) + (si ? Normal.EMPTY : "i"); - return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre); + public static LocalTime getDicomTime(String time) { + if (StringKit.hasText(time)) { + try { + return Format.parseTM(time); + } catch (Exception e1) { + Logger.error("Parse DICOM time", e1); // $NON-NLS-1$ + } + } + return null; } - public static void notify(Status state, - String iuid, - String cuid, - int intStatus, - String status, - int numberOfSuboperations) { - state.setStatus(intStatus); - Progress p = state.getProgress(); - if (null != p) { - Attributes cmd = Optional.ofNullable(p.getAttributes()).orElseGet(Attributes::new); - cmd.setInt(Tag.Status, VR.US, intStatus); - cmd.setString(Tag.AffectedSOPInstanceUID, VR.UI, iuid); - cmd.setString(Tag.AffectedSOPClassUID, VR.UI, cuid); - notify(p, cmd, status, numberOfSuboperations); - p.setAttributes(cmd); + public static LocalDateTime dateTime(Attributes dcm, int dateID, int timeID) { + if (dcm == null) { + return null; } + LocalDate date = getDicomDate(dcm.getString(dateID)); + if (date == null) { + return null; + } + LocalTime time = getDicomTime(dcm.getString(timeID)); + if (time == null) { + return date.atStartOfDay(); + } + return LocalDateTime.of(date, time); } - public static void notify(Progress progress, - Attributes attributes, - String status, - int numberOfSuboperations) { - if (null != progress && null != attributes) { + /** + * Build the shape from DICOM Shutter + * + * @param dcm the DICOM attributes + * @return the shape + * @see C.7.6.11 + * Display Shutter Module + */ + public static Area getShutterShape(Attributes dcm) { + Area shape = null; + String shutterShape = getStringFromDicomElement(dcm, Tag.ShutterShape); + if (shutterShape != null) { + if (shutterShape.contains("RECTANGULAR") + || shutterShape.contains("RECTANGLE")) { // $NON-NLS-1$ //$NON-NLS-2$ + Rectangle2D rect = new Rectangle2D.Double(); + rect.setFrameFromDiagonal( + dcm.getInt(Tag.ShutterLeftVerticalEdge, 0), + dcm.getInt(Tag.ShutterUpperHorizontalEdge, 0), + dcm.getInt(Tag.ShutterRightVerticalEdge, 0), + dcm.getInt(Tag.ShutterLowerHorizontalEdge, 0)); + if (rect.isEmpty()) { + Logger.error("Shutter rectangle has an empty area!"); + } else { + shape = new Area(rect); + } + } + if (shutterShape.contains("CIRCULAR")) { // $NON-NLS-1$ + int[] centerOfCircularShutter = dcm.getInts(Tag.CenterOfCircularShutter); + if (centerOfCircularShutter != null && centerOfCircularShutter.length >= 2) { + Ellipse2D ellipse = new Ellipse2D.Double(); + double radius = dcm.getInt(Tag.RadiusOfCircularShutter, 0); + // Thanks DICOM for reversing x,y by row,column + ellipse.setFrameFromCenter( + centerOfCircularShutter[1], + centerOfCircularShutter[0], + centerOfCircularShutter[1] + radius, + centerOfCircularShutter[0] + radius); + if (ellipse.isEmpty()) { + Logger.error("Shutter ellipse has an empty area!"); + } else { + if (shape == null) { + shape = new Area(ellipse); + } else { + shape.intersect(new Area(ellipse)); + } + } + } + } + if (shutterShape.contains("POLYGONAL")) { // $NON-NLS-1$ + int[] points = dcm.getInts(Tag.VerticesOfThePolygonalShutter); + if (points != null && points.length >= 6) { + Polygon polygon = new Polygon(); + for (int i = 0; i < points.length / 2; i++) { + // Thanks DICOM for reversing x,y by row,column + polygon.addPoint(points[i * 2 + 1], points[i * 2]); + } + if (isPolygonValid(polygon)) { + if (shape == null) { + shape = new Area(polygon); + } else { + shape.intersect(new Area(polygon)); + } + } else { + Logger.error("Shutter rectangle has an empty area!"); + } + } + } + } + return shape; + } + + private static boolean isPolygonValid(Polygon polygon) { + int[] xPoints = polygon.xpoints; + int[] yPoints = polygon.ypoints; + double area = 0; + for (int i = 0; i < polygon.npoints; i++) { + area += + (xPoints[i] * yPoints[(i + 1) % polygon.npoints]) + - (xPoints[(i + 1) % polygon.npoints] * yPoints[i]); + } + // Evaluating if this is a polygon, not a line + return area != 0 && polygon.npoints > 2; + } + + /** + * Extract the shutter color from ShutterPresentationColorCIELabValue or ShutterPresentationValue + * + * @param dcm the DICOM attributes + * @return the color + */ + public static Color getShutterColor(Attributes dcm) { + int[] rgb = CIELab.dicomLab2rgb(dcm.getInts(Tag.ShutterPresentationColorCIELabValue)); + return ColorKit.getColor(dcm.getInt(Tag.ShutterPresentationValue, 0x0000), rgb); + } + + public static void forceGettingAttributes(Status dcmState, AutoCloseable closeable) { + ImageProgress p = dcmState.getProgress(); + if (p != null) { + IoKit.close(closeable); + } + } + + public static void notifyProgession( + ImageProgress p, Attributes cmd, ProgressStatus ps, int numberOfSuboperations) { + if (p != null && cmd != null) { int c; int f; int r; int w; - if (null == progress.getAttributes()) { + if (p.getAttributes() == null) { c = 0; f = 0; w = 0; r = numberOfSuboperations; } else { - c = progress.getNumberOfCompletedSuboperations(); - f = progress.getNumberOfFailedSuboperations(); - w = progress.getNumberOfWarningSuboperations(); + c = p.getNumberOfCompletedSuboperations(); + f = p.getNumberOfFailedSuboperations(); + w = p.getNumberOfWarningSuboperations(); r = numberOfSuboperations - (c + f + w); } @@ -272,162 +892,439 @@ public static void notify(Progress progress, r = 1; } - if (COMPLETED.equals(status)) { + if (ps == ProgressStatus.COMPLETED) { c++; - } else if (FAILED.equals(status)) { + } else if (ps == ProgressStatus.FAILED) { f++; - } else if (WARNING.equals(status)) { + } else if (ps == ProgressStatus.WARNING) { w++; } - attributes.setInt(Tag.NumberOfCompletedSuboperations, VR.US, c); - attributes.setInt(Tag.NumberOfFailedSuboperations, VR.US, f); - attributes.setInt(Tag.NumberOfWarningSuboperations, VR.US, w); - attributes.setInt(Tag.NumberOfRemainingSuboperations, VR.US, r - 1); + cmd.setInt(Tag.NumberOfCompletedSuboperations, VR.US, c); + cmd.setInt(Tag.NumberOfFailedSuboperations, VR.US, f); + cmd.setInt(Tag.NumberOfWarningSuboperations, VR.US, w); + cmd.setInt(Tag.NumberOfRemainingSuboperations, VR.US, r - 1); } } - public static void pdf(final Attributes attrs, File pdfFile, File dcmFile) throws IOException { - attrs.setString(Tag.SOPClassUID, VR.UI, UID.EncapsulatedPDFStorage); - ensureString(attrs, Tag.SpecificCharacterSet, VR.CS, "ISO_IR 192");// UTF-8 - ensureUID(attrs, Tag.StudyInstanceUID); - ensureUID(attrs, Tag.SeriesInstanceUID); - ensureUID(attrs, Tag.SOPInstanceUID); - setCreationDate(attrs); + public static void notifyProgession( + Status state, + String iuid, + String cuid, + int status, + ProgressStatus ps, + int numberOfSuboperations) { + state.setStatus(status); + ImageProgress p = state.getProgress(); + if (p != null) { + Attributes cmd = Optional.ofNullable(p.getAttributes()).orElseGet(Attributes::new); + cmd.setInt(Tag.Status, VR.US, status); + cmd.setString(Tag.AffectedSOPInstanceUID, VR.UI, iuid); + cmd.setString(Tag.AffectedSOPClassUID, VR.UI, cuid); + notifyProgession(p, cmd, ps, numberOfSuboperations); + p.setAttributes(cmd); + } + } - BulkData bulk = new BulkData(pdfFile.toURI().toString(), 0, (int) pdfFile.length(), false); - attrs.setValue(Tag.EncapsulatedDocument, VR.OB, bulk); - attrs.setString(Tag.MIMETypeOfEncapsulatedDocument, VR.LO, "application/pdf"); - Attributes fmi = attrs.createFileMetaInformation(UID.ExplicitVRLittleEndian); - try (ImageOutputStream dos = new ImageOutputStream(dcmFile)) { - dos.writeDataset(fmi, attrs); + public static int getTotalOfSuboperations(Attributes cmd) { + if (cmd != null) { + int c = cmd.getInt(Tag.NumberOfCompletedSuboperations, 0); + int f = cmd.getInt(Tag.NumberOfFailedSuboperations, 0); + int w = cmd.getInt(Tag.NumberOfWarningSuboperations, 0); + int r = cmd.getInt(Tag.NumberOfRemainingSuboperations, 0); + return r + c + f + w; } + return 0; } - public static void jpeg(final Attributes attrs, File jpgFile, File dcmFile, boolean noAPPn) { - build(attrs, jpgFile, dcmFile, noAPPn, false); + public static String concat(String[] ss, char delim) { + int n = ss.length; + if (n == 0) + return ""; + + if (n == 1) { + String s = ss[0]; + return s != null ? s : ""; + } + int len = n - 1; + for (String s : ss) + if (s != null) + len += s.length(); + + char[] cs = new char[len]; + int off = 0; + int i = 0; + for (String s : ss) { + if (i++ != 0) + cs[off++] = delim; + if (s != null) { + int l = s.length(); + s.getChars(0, l, cs, off); + off += l; + } + } + return new String(cs); } - public static void mpeg2(final Attributes attrs, File mpegFile, File dcmFile) { - build(attrs, mpegFile, dcmFile, false, true); + public static StringBuilder appendLine(StringBuilder sb, Object... ss) { + for (Object s : ss) + sb.append(s); + return sb.append(LINE_SEPARATOR); } - private static void build(final Attributes attrs, File jpgFile, File dcmFile, boolean noAPPn, boolean mpeg) { - Parameters p = new Parameters(); - p.fileLength = (int) jpgFile.length(); + public static Object splitAndTrim(String s, char delim) { + int count = 1; + int delimPos = -1; + while ((delimPos = s.indexOf(delim, delimPos + 1)) >= 0) + count++; - try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(jpgFile))) { - if (!readPixelHeader(p, attrs, bis, mpeg)) { - throw new IOException("Cannot read the header of " + jpgFile.getPath()); - } + if (count == 1) + return substring(s, 0, s.length()); - int itemLen = p.fileLength; - try (ImageOutputStream dos = new ImageOutputStream(dcmFile)) { - ensureString(attrs, Tag.SpecificCharacterSet, VR.CS, "ISO_IR 192");// UTF-8 - ensureUID(attrs, Tag.StudyInstanceUID); - ensureUID(attrs, Tag.SeriesInstanceUID); - ensureUID(attrs, Tag.SOPInstanceUID); + String[] ss = new String[count]; + int delimPos2 = s.length(); + while (--count >= 0) { + delimPos = s.lastIndexOf(delim, delimPos2 - 1); + ss[count] = substring(s, delimPos + 1, delimPos2); + delimPos2 = delimPos; + } + return ss; + } - setCreationDate(attrs); + public static String[] split(String s, char delim) { + if (s == null || s.isEmpty()) + return Normal.EMPTY_STRING_ARRAY; - dos.writeDataset(attrs.createFileMetaInformation(mpeg ? UID.MPEG2 : UID.JPEGBaseline1), attrs); - dos.writeHeader(Tag.PixelData, VR.OB, -1); - dos.writeHeader(Tag.Item, null, 0); - if (null != p.jpegHeader && noAPPn) { - int offset = p.jpegHeader.offsetAfterAPP(); - itemLen -= offset - 3; - dos.writeHeader(Tag.Item, null, (itemLen + 1) & ~1); - dos.write((byte) -1); - dos.write((byte) JPEG.SOI); - dos.write((byte) -1); - dos.write(p.buffer, offset, p.realBufferLength - offset); - } else { - dos.writeHeader(Tag.Item, null, (itemLen + 1) & ~1); - dos.write(p.buffer, 0, p.realBufferLength); - } - IoKit.copy(bis, dos, p.buffer); - if ((itemLen & 1) != 0) { - dos.write(0); - } - dos.writeHeader(Tag.SequenceDelimitationItem, null, 0); - } - } catch (Exception e) { - Logger.error("Building {}", mpeg ? "mpeg" : "jpg", e); + int count = 1; + int delimPos = -1; + while ((delimPos = s.indexOf(delim, delimPos + 1)) >= 0) + count++; + + if (count == 1) + return new String[]{s}; + + String[] ss = new String[count]; + int delimPos2 = s.length(); + while (--count >= 0) { + delimPos = s.lastIndexOf(delim, delimPos2 - 1); + ss[count] = s.substring(delimPos + 1, delimPos2); + delimPos2 = delimPos; } + return ss; } - private static boolean readPixelHeader(Parameters p, Attributes metadata, InputStream in, boolean mpeg) throws IOException { - int grow = INIT_BUFFER_SIZE; - while (p.realBufferLength == p.buffer.length && p.realBufferLength < MAX_BUFFER_SIZE) { - grow += p.realBufferLength; - p.buffer = Arrays.copyOf(p.buffer, grow); - p.realBufferLength += StreamKit.readAvailable(in, p.buffer, p.realBufferLength, p.buffer.length - p.realBufferLength); - boolean jpgHeader; - if (mpeg) { - MPEGHeader mpegHeader = new MPEGHeader(p.buffer); - jpgHeader = null != mpegHeader.toAttributes(metadata, p.fileLength); + private static String substring(String s, int beginIndex, int endIndex) { + while (beginIndex < endIndex && s.charAt(beginIndex) <= ' ') + beginIndex++; + while (beginIndex < endIndex && s.charAt(endIndex - 1) <= ' ') + endIndex--; + return beginIndex < endIndex ? s.substring(beginIndex, endIndex) : ""; + } + + public static String trimTrailing(String s) { + int endIndex = s.length(); + while (endIndex > 0 && s.charAt(endIndex - 1) <= ' ') + endIndex--; + return s.substring(0, endIndex); + } + + public static long parseIS(String s) { + return s != null && s.length() != 0 + ? Long.parseLong(s) + : 0L; + } + + public static long parseUV(String s) { + return s != null && s.length() != 0 + ? Long.parseUnsignedLong(s) + : 0L; + } + + public static double parseDS(String s) { + return s != null && s.length() != 0 + ? Double.parseDouble(s.replace(',', '.')) + : 0; + } + + public static String formatDS(float f) { + String s = Float.toString(f); + int l = s.length(); + if (s.startsWith(".0", l - 2)) + return s.substring(0, l - 2); + int e = s.indexOf('E', l - 5); + return e > 0 && s.startsWith(".0", e - 2) ? cut(s, e - 2, e) : s; + } + + public static String formatDS(double d) { + String s = Double.toString(d); + int l = s.length(); + if (s.startsWith(".0", l - 2)) + return s.substring(0, l - 2); + int skip = l - 16; + int e = s.indexOf('E', l - 5); + return e < 0 ? (skip > 0 ? s.substring(0, 16) : s) + : s.startsWith(".0", e - 2) ? cut(s, e - 2, e) + : skip > 0 ? cut(s, e - skip, e) : s; + } + + private static String cut(String s, int begin, int end) { + int l = s.length(); + char[] ch = new char[l - (end - begin)]; + s.getChars(0, begin, ch, 0); + s.getChars(end, l, ch, begin); + return new String(ch); + } + + public static boolean matches(String s, String key, + boolean matchNullOrEmpty, boolean ignoreCase) { + if (key == null || key.isEmpty()) + return true; + + if (s == null || s.isEmpty()) + return matchNullOrEmpty; + + return containsWildCard(key) + ? compilePattern(key, ignoreCase).matcher(s).matches() + : ignoreCase ? key.equalsIgnoreCase(s) : key.equals(s); + } + + public static Pattern compilePattern(String key, boolean ignoreCase) { + StringTokenizer stk = new StringTokenizer(key, "*?", true); + StringBuilder regex = new StringBuilder(); + while (stk.hasMoreTokens()) { + String tk = stk.nextToken(); + char ch1 = tk.charAt(0); + if (ch1 == '*') { + regex.append(".*"); + } else if (ch1 == '?') { + regex.append("."); } else { - p.jpegHeader = new JPEGHeader(p.buffer, JPEG.SOS); - jpgHeader = null != p.jpegHeader.toAttributes(metadata); - } - if (jpgHeader) { - ensureString(metadata, Tag.SOPClassUID, VR.UI, - mpeg ? UID.VideoPhotographicImageStorage : UID.VLPhotographicImageStorage); - return true; + regex.append("\\Q").append(tk).append("\\E"); } } + return Pattern.compile(regex.toString(), + ignoreCase ? Pattern.CASE_INSENSITIVE : 0); + } + + public static boolean containsWildCard(String s) { + return (s.indexOf('*') >= 0 || s.indexOf('?') >= 0); + } + + public static String[] maskNull(String[] ss) { + return maskNull(ss, Normal.EMPTY_STRING_ARRAY); + } + + public static T maskNull(T o, T mask) { + return o == null ? mask : o; + } + + public static String maskEmpty(String s, String mask) { + return s == null || s.isEmpty() ? mask : s; + } + + public static String truncate(String s, int maxlen) { + return s.length() > maxlen ? s.substring(0, maxlen) : s; + } + + /** + * Returns a {@code String} resulting from replacing all non-ASCII and non-printable characters + * in the specified {@code String} with {@code replacement} character. + * + * @param s - the specified string + * @param replacement - the replacement character + * @return a string + */ + public static String replaceNonPrintASCII(String s, char replacement) { + char[] cs = s.toCharArray(); + int count = 0; + for (int i = 0; i < cs.length; i++) { + if (cs[i] > 0x20 && cs[i] < 0x7F) continue; + cs[i] = replacement; + count++; + } + return count > 0 ? new String(cs) : s; + } + + public static boolean equals(T o1, T o2) { + return Objects.equals(o1, o2); + } + + public static String replaceSystemProperties(String s) { + int i = s.indexOf("${"); + if (i == -1) + return s; + + StringBuilder sb = new StringBuilder(s.length()); + int j = -1; + do { + sb.append(s, j + 1, i); + if ((j = s.indexOf('}', i + 2)) == -1) { + j = i - 1; + break; + } + int k = s.lastIndexOf(':', j); + String val = s.startsWith("env.", i + 2) + ? System.getenv(s.substring(i + 6, k < i ? j : k)) + : System.getProperty(s.substring(i + 2, k < i ? j : k)); + sb.append(val != null ? val : k < 0 ? s.substring(i, j + 1) : s.substring(k + 1, j)); + i = s.indexOf("${", j + 1); + } while (i != -1); + sb.append(s.substring(j + 1)); + return sb.toString(); + } + + public static boolean contains(T[] a, T o) { + for (T t : a) + if (Objects.equals(t, o)) + return true; return false; } - private static void setCreationDate(Attributes attrs) { - Date now = new Date(); - attrs.setDate(Tag.InstanceCreationDate, VR.DA, now); - attrs.setDate(Tag.InstanceCreationTime, VR.TM, now); + public static T[] requireNotEmpty(T[] a, String message) { + if (a.length == 0) + throw new IllegalArgumentException(message); + return a; + } + + public static String requireNotEmpty(String s, String message) { + if (s.isEmpty()) + throw new IllegalArgumentException(message); + return s; } - private static void ensureString(Attributes attrs, int tag, VR vr, String value) { - if (!attrs.containsValue(tag)) { - attrs.setString(tag, vr, value); + public static String[] requireContainsNoEmpty(String[] ss, String message) { + for (String s : ss) + requireNotEmpty(s, message); + return ss; + } + + public static MediaType forTransferSyntax(String ts) { + MediaType type; + switch (UID.from(ts)) { + case UID.ExplicitVRLittleEndian: + case UID.ImplicitVRLittleEndian: + return MediaType.APPLICATION_OCTET_STREAM_TYPE; + case UID.RLELossless: + return MediaType.IMAGE_DICOM_RLE_TYPE; + case UID.JPEGBaseline8Bit: + case UID.JPEGExtended12Bit: + case UID.JPEGLossless: + case UID.JPEGLosslessSV1: + type = MediaType.IMAGE_JPEG_TYPE; + break; + case UID.JPEGLSLossless: + case UID.JPEGLSNearLossless: + type = MediaType.IMAGE_JLS_TYPE; + break; + case UID.JPEG2000Lossless: + case UID.JPEG2000: + type = MediaType.IMAGE_JP2_TYPE; + break; + case UID.JPEG2000MCLossless: + case UID.JPEG2000MC: + type = MediaType.IMAGE_JPX_TYPE; + break; + case UID.HTJ2KLossless: + case UID.HTJ2KLosslessRPCL: + case UID.HTJ2K: + type = MediaType.IMAGE_JPHC_TYPE; + break; + case UID.MPEG2MPML: + case UID.MPEG2MPHL: + type = MediaType.VIDEO_MPEG_TYPE; + break; + case UID.MPEG4HP41: + case UID.MPEG4HP41BD: + type = MediaType.VIDEO_MP4_TYPE; + break; + default: + throw new IllegalArgumentException("ts: " + ts); } + return new MediaType(type.getType(), type.getSubtype(), Collections.singletonMap("transfer-syntax", ts)); } - private static void ensureUID(Attributes attrs, int tag) { - if (!attrs.containsValue(tag)) { - attrs.setString(tag, VR.UI, UID.createUID()); + public static String transferSyntaxOf(MediaType bulkdataMediaType) { + String tsuid = bulkdataMediaType.getParameters().get("transfer-syntax"); + if (tsuid != null) + return tsuid; + + String type = bulkdataMediaType.getType().toLowerCase(); + String subtype = bulkdataMediaType.getSubtype().toLowerCase(); + switch (type) { + case "image": + switch (subtype) { + case "jpeg": + return UID.JPEGLosslessSV1.uid; + case "jls": + case "x-jls": + return UID.JPEGLSLossless.uid; + case "jp2": + return UID.JPEG2000Lossless.uid; + case "jpx": + return UID.JPEG2000MCLossless.uid; + case "x-dicom-rle": + case "dicom-rle": + return UID.RLELossless.uid; + } + case "video": + switch (subtype) { + case "mpeg": + return UID.MPEG2MPML.uid; + case "mp4": + case "quicktime": + return UID.MPEG4HP41.uid; + } } + return UID.ExplicitVRLittleEndian.uid; } - public static boolean updateAttributes(Attributes data, Attributes attrs, - String uidSuffix) { - if (attrs.isEmpty() && null == uidSuffix) - return false; - if (null != uidSuffix) { - data.setString(Tag.StudyInstanceUID, VR.UI, - data.getString(Tag.StudyInstanceUID) + uidSuffix); - data.setString(Tag.SeriesInstanceUID, VR.UI, - data.getString(Tag.SeriesInstanceUID) + uidSuffix); - data.setString(Tag.SOPInstanceUID, VR.UI, - data.getString(Tag.SOPInstanceUID) + uidSuffix); - } - data.update(Attributes.UpdatePolicy.OVERWRITE, attrs, null); - return true; + public static String sopClassOf(MediaType bulkdataMediaType) { + String type = bulkdataMediaType.getType().toLowerCase(); + return type.equals("image") ? UID.SecondaryCaptureImageStorage.uid + : type.equals("video") ? UID.VideoPhotographicImageStorage.uid + : MediaType.equalsIgnoreParameters(bulkdataMediaType, MediaType.APPLICATION_PDF_TYPE) ? UID.EncapsulatedPDFStorage.uid + : MediaType.equalsIgnoreParameters(bulkdataMediaType, MediaType.APPLICATION_XML_TYPE) ? UID.EncapsulatedCDAStorage.uid + : MediaType.isSTLType(bulkdataMediaType) ? UID.EncapsulatedSTLStorage.uid + : MediaType.equalsIgnoreParameters(bulkdataMediaType, MediaType.MODEL_OBJ_TYPE) ? UID.EncapsulatedOBJStorage.uid + : MediaType.equalsIgnoreParameters(bulkdataMediaType, MediaType.MODEL_MTL_TYPE) ? UID.EncapsulatedMTLStorage.uid + : null; + } + + public static String getTransferSyntax(MediaType type) { + return type != null && MediaType.equalsIgnoreParameters(MediaType.APPLICATION_DICOM_TYPE, type) + ? type.getParameters().get("transfer-syntax") + : null; } - public static int toTag(String tagOrKeyword) { + public static MediaType applicationDicomWithTransferSyntax(String tsuid) { + return new MediaType("application", "dicom", Collections.singletonMap("transfer-syntax", tsuid)); + } + + public void validate(File file, IOD iod) { + if (iod == null) + throw new IllegalStateException("IOD net initialized"); + ImageInputStream dis = null; try { - return Integer.parseInt(tagOrKeyword, 16); - } catch (IllegalArgumentException e) { - int tag = ElementDictionary.tagForKeyword(tagOrKeyword, null); - if (tag == -1) - throw new IllegalArgumentException(tagOrKeyword); - return tag; + System.out.print("Validate: " + file + " ... "); + dis = new ImageInputStream(file); + Attributes attrs = dis.readDataset(); + ValidationResult result = attrs.validate(iod); + if (result.isValid()) + System.out.println("OK"); + else { + System.out.println("FAILED:"); + System.out.println(result.asText(attrs)); + } + } catch (IOException e) { + System.out.println("FAILED: " + e.getMessage()); + } finally { + IoKit.close(dis); } } - private static class Parameters { - int realBufferLength = 0; - byte[] buffer = {}; - int fileLength = 0; - JPEGHeader jpegHeader; + + public static Props loadRelSoap(URL url) { + String name = "sop-classes-uid.properties"; + return null; } } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Centre.java b/bus-image/src/main/java/org/miaixz/bus/image/Centre.java index 240d762564..2ba901b358 100644 --- a/bus-image/src/main/java/org/miaixz/bus/image/Centre.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Centre.java @@ -100,6 +100,14 @@ public Centre(Device device) { this.device = Objects.requireNonNull(device); } + public Device getDevice() { + return device; + } + + public boolean isRunning() { + return executor != null; + } + public void start() { start(false); } @@ -110,6 +118,9 @@ public void start() { * @param flag 标记信息 */ public synchronized void start(boolean... flag) { + if (isRunning()) { + return; + } if (BooleanKit.or(flag)) { if (null == executor) { executor = Executors.newSingleThreadExecutor(); @@ -156,9 +167,9 @@ public synchronized void start(boolean... flag) { storeSCP.getApplicationEntity().setAcceptedCallingAETitles(args.getAcceptedCallingAETitles()); - URL transferCapabilityFile = args.getTransferCapabilityFile(); - if (null != transferCapabilityFile) { - storeSCP.loadDefaultTransferCapability(transferCapabilityFile); + URL sopClassesTCS = args.getSopClassesTCS(); + if (null != sopClassesTCS) { + storeSCP.sopClassesTCS(sopClassesTCS); } else { storeSCP.getApplicationEntity() .addTransferCapability(new TransferCapability(null, Symbol.STAR, TransferCapability.Role.SCP, Symbol.STAR)); diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Device.java b/bus-image/src/main/java/org/miaixz/bus/image/Device.java old mode 100755 new mode 100644 index 05db3b144e..048d3dc53d --- a/bus-image/src/main/java/org/miaixz/bus/image/Device.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Device.java @@ -29,13 +29,15 @@ import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; -import org.miaixz.bus.core.net.Protocol; -import org.miaixz.bus.image.galaxy.Material; +import org.miaixz.bus.core.net.tls.TrustAnyTrustManager; import org.miaixz.bus.image.galaxy.data.Code; import org.miaixz.bus.image.galaxy.data.Issuer; import org.miaixz.bus.image.metric.*; -import org.miaixz.bus.image.metric.acquire.DeviceExtension; -import org.miaixz.bus.image.metric.internal.pdu.AAssociateRQ; +import org.miaixz.bus.image.metric.net.ApplicationEntity; +import org.miaixz.bus.image.metric.net.ConnectionMonitor; +import org.miaixz.bus.image.metric.net.DeviceExtension; +import org.miaixz.bus.image.metric.net.KeycloakClient; +import org.miaixz.bus.image.metric.pdu.AAssociateRQ; import javax.net.ssl.KeyManager; import javax.net.ssl.SSLContext; @@ -59,6 +61,8 @@ */ public class Device implements Serializable { + private static final long serialVersionUID = -1L; + /** * AE可以发起的最大开放关联数 */ @@ -187,15 +191,15 @@ public class Device implements Serializable { */ private TimeZone timeZoneOfDevice; private Boolean arcDevExt; + private transient AssociationHandler associationHandler = new AssociationHandler(); private transient DimseRQHandler dimseRQHandler; - private transient Monitoring monitoring; + private transient ConnectionMonitor connectionMonitor; private transient AssociationMonitor associationMonitor; private transient Executor executor; private transient ScheduledExecutorService scheduledExecutor; private transient volatile SSLContext sslContext; private transient volatile KeyManager km; private transient volatile TrustManager tm; - private transient AssociationHandler associationHandler = new AssociationHandler(); public Device() { @@ -220,7 +224,7 @@ private static X509Certificate[] toArray(Collection c) { } private void checkNotEmpty(String name, String val) { - if (null != val && val.isEmpty()) + if (val != null && val.isEmpty()) throw new IllegalArgumentException(name + " cannot be empty"); } @@ -546,9 +550,7 @@ public final String getTrustStoreURL() { public final void setTrustStoreURL(String trustStoreURL) { checkNotEmpty("trustStoreURL", trustStoreURL); - if (null == trustStoreURL - ? null == this.trustStoreURL - : trustStoreURL.equals(this.trustStoreURL)) + if (Objects.equals(trustStoreURL, this.trustStoreURL)) return; this.trustStoreURL = trustStoreURL; @@ -578,7 +580,7 @@ public final String getTrustStorePinProperty() { } public final void setTrustStorePinProperty(String trustStorePinProperty) { - checkNotEmpty("keyPin", keyStoreKeyPin); + checkNotEmpty("trustStorePinProperty", trustStorePinProperty); this.trustStorePinProperty = trustStorePinProperty; } @@ -600,9 +602,7 @@ public final String getKeyStoreURL() { public final void setKeyStoreURL(String keyStoreURL) { checkNotEmpty("keyStoreURL", keyStoreURL); - if (null == keyStoreURL - ? null == this.keyStoreURL - : keyStoreURL.equals(this.keyStoreURL)) + if (Objects.equals(keyStoreURL, this.keyStoreURL)) return; this.keyStoreURL = keyStoreURL; @@ -614,7 +614,7 @@ public final String getKeyStoreType() { } public final void setKeyStoreType(String keyStoreType) { - checkNotEmpty("keyStoreType", keyStoreURL); + checkNotEmpty("keyStoreType", keyStoreType); this.keyStoreType = keyStoreType; } @@ -738,22 +738,30 @@ public final void setDimseRQHandler(DimseRQHandler dimseRQHandler) { this.dimseRQHandler = dimseRQHandler; } + public Boolean getArcDevExt() { + return arcDevExt; + } + + public void setArcDevExt(Boolean arcDevExt) { + this.arcDevExt = arcDevExt; + } + public final AssociationHandler getAssociationHandler() { return associationHandler; } public void setAssociationHandler(AssociationHandler associationHandler) { - if (null == associationHandler) + if (associationHandler == null) throw new NullPointerException(); this.associationHandler = associationHandler; } - public Monitoring getMonitoring() { - return monitoring; + public ConnectionMonitor getConnectionMonitor() { + return connectionMonitor; } - public void setMonitoring(Monitoring monitoring) { - this.monitoring = monitoring; + public void setConnectionMonitor(ConnectionMonitor connectionMonitor) { + this.connectionMonitor = connectionMonitor; } public AssociationMonitor getAssociationMonitor() { @@ -854,7 +862,7 @@ public ApplicationEntity removeApplicationEntity(ApplicationEntity ae) { public ApplicationEntity removeApplicationEntity(String aet) { ApplicationEntity ae = aes.remove(aet); - if (null != ae) + if (ae != null) ae.setDevice(null); return ae; } @@ -891,7 +899,7 @@ public WebApplication removeWebApplication(WebApplication webapp) { public WebApplication removeWebApplication(String name) { WebApplication webapp = webapps.remove(name); - if (null != webapp) + if (webapp != null) webapp.setDevice(null); return webapp; } @@ -919,7 +927,7 @@ public KeycloakClient removeKeycloakClient(KeycloakClient client) { public KeycloakClient removeKeycloakClient(String name) { KeycloakClient client = keycloakClients.remove(name); - if (null != client) + if (client != null) client.setDevice(null); return client; } @@ -935,7 +943,7 @@ public void addDeviceExtension(DeviceExtension ext) { } public boolean removeDeviceExtension(DeviceExtension ext) { - if (null == extensions.remove(ext.getClass())) + if (extensions.remove(ext.getClass()) == null) return false; ext.setDevice(null); @@ -966,7 +974,7 @@ public final void setLimitOpenAssociations(int limit) { */ public int getLimitAssociationsInitiatedBy(String callingAET) { Integer value = limitAssociationsInitiatedBy.get(Objects.requireNonNull(callingAET)); - return null != value ? value.intValue() : 0; + return value != null ? value.intValue() : 0; } /** @@ -1053,6 +1061,17 @@ public int getNumberOfAssociationsInitiatedBy(String callingAET) { } } + public int getNumberOfAssociationsInitiatedTo(String calledAET) { + synchronized (associations) { + int count = 0; + for (Association association : associations) { + if (calledAET.equals(association.getCalledAET())) + count++; + } + return count; + } + } + public void waitForNoOpenConnections() throws InterruptedException { synchronized (associations) { while (!associations.isEmpty()) @@ -1063,7 +1082,7 @@ public void waitForNoOpenConnections() throws InterruptedException { public boolean isLimitOfAssociationsExceeded(AAssociateRQ rq) { Integer limit; return limitOpenAssociations > 0 && associations.size() > limitOpenAssociations - || null != (limit = limitAssociationsInitiatedBy.get(rq.getCallingAET())) + || (limit = limitAssociationsInitiatedBy.get(rq.getCallingAET())) != null && getNumberOfAssociationsInitiatedBy(rq.getCallingAET()) > limit; } @@ -1073,9 +1092,9 @@ public ApplicationEntity getApplicationEntity(String aet) { public ApplicationEntity getApplicationEntity(String aet, boolean matchOtherAETs) { ApplicationEntity ae = aes.get(aet); - if (null == ae) + if (ae == null) ae = aes.get(Symbol.STAR); - if (null == ae && matchOtherAETs) + if (ae == null && matchOtherAETs) for (ApplicationEntity ae1 : getApplicationEntities()) if (ae1.isOtherAETitle(aet)) return ae1; @@ -1101,34 +1120,34 @@ public final void setKeyManager(KeyManager km) { private KeyManager km() throws GeneralSecurityException, IOException { KeyManager ret = km; - if (null != ret || null == keyStoreURL) + if (ret != null || keyStoreURL == null) return ret; String keyStorePin = keyStorePin(); - km = ret = SSLManagerFactory.createKeyManager( - Material.replaceSystemProperties(keyStoreType()), - Material.replaceSystemProperties(keyStoreURL), - Material.replaceSystemProperties(keyStorePin()), - Material.replaceSystemProperties(keyPin(keyStorePin))); + km = ret = TrustAnyTrustManager.createKeyManager( + Builder.replaceSystemProperties(keyStoreType()), + Builder.replaceSystemProperties(keyStoreURL), + Builder.replaceSystemProperties(keyStorePin()), + Builder.replaceSystemProperties(keyPin(keyStorePin))); return ret; } private String keyStoreType() { - if (null == keyStoreType) + if (keyStoreType == null) throw new IllegalStateException("keyStoreURL requires keyStoreType"); return keyStoreType; } private String keyStorePin() { - if (null != keyStorePin) + if (keyStorePin != null) return keyStorePin; - if (null == keyStorePinProperty) + if (keyStorePinProperty == null) throw new IllegalStateException( "keyStoreURL requires keyStorePin or keyStorePinProperty"); String pin = System.getProperty(keyStorePinProperty); - if (null == pin) + if (pin == null) throw new IllegalStateException( "No such keyStorePinProperty: " + keyStorePinProperty); @@ -1136,14 +1155,14 @@ private String keyStorePin() { } private String keyPin(String keyStorePin) { - if (null != keyStoreKeyPin) + if (keyStoreKeyPin != null) return keyStoreKeyPin; - if (null == keyStoreKeyPinProperty) + if (keyStoreKeyPinProperty == null) return keyStorePin; String pin = System.getProperty(keyStoreKeyPinProperty); - if (null == pin) + if (pin == null) throw new IllegalStateException( "No such keyPinProperty: " + keyStoreKeyPinProperty); @@ -1161,37 +1180,37 @@ public final void setTrustManager(TrustManager tm) { private TrustManager tm() throws GeneralSecurityException, IOException { TrustManager ret = tm; - if (null != ret - || null == trustStoreURL && authorizedNodeCertificates.isEmpty()) + if (ret != null + || trustStoreURL == null && authorizedNodeCertificates.isEmpty()) return ret; - tm = ret = null != trustStoreURL - ? SSLManagerFactory.createTrustManager( - Material.replaceSystemProperties(trustStoreType()), - Material.replaceSystemProperties(trustStoreURL), - Material.replaceSystemProperties(trustStorePin())) - : SSLManagerFactory.createTrustManager( + tm = ret = trustStoreURL != null + ? TrustAnyTrustManager.createTrustManager( + Builder.replaceSystemProperties(trustStoreType()), + Builder.replaceSystemProperties(trustStoreURL), + Builder.replaceSystemProperties(trustStorePin())) + : TrustAnyTrustManager.createTrustManager( getAllAuthorizedNodeCertificates()); return ret; } private String trustStoreType() { - if (null == trustStoreType) + if (trustStoreType == null) throw new IllegalStateException("trustStoreURL requires trustStoreType"); return trustStoreType; } private String trustStorePin() { - if (null != trustStorePin) + if (trustStorePin != null) return trustStorePin; - if (null == trustStorePinProperty) + if (trustStorePinProperty == null) throw new IllegalStateException( "trustStoreURL requires trustStorePin or trustStorePinProperty"); String pin = System.getProperty(trustStorePinProperty); - if (null == pin) + if (pin == null) throw new IllegalStateException( "No such trustStorePinProperty: " + trustStorePinProperty); @@ -1200,10 +1219,10 @@ private String trustStorePin() { public SSLContext sslContext() throws GeneralSecurityException, IOException { SSLContext ctx = sslContext; - if (null != ctx) + if (ctx != null) return ctx; - ctx = SSLContext.getInstance(Protocol.TLS.name); + ctx = SSLContext.getInstance("TLS"); ctx.init(keyManagers(), trustManagers(), null); sslContext = ctx; return ctx; @@ -1211,35 +1230,35 @@ public SSLContext sslContext() throws GeneralSecurityException, IOException { public KeyManager[] keyManagers() throws GeneralSecurityException, IOException { KeyManager tmp = km(); - return null != tmp ? new KeyManager[]{tmp} : null; + return tmp != null ? new KeyManager[]{tmp} : null; } public TrustManager[] trustManagers() throws GeneralSecurityException, IOException { TrustManager tmp = tm(); - return null != tmp ? new TrustManager[]{tmp} : null; + return tmp != null ? new TrustManager[]{tmp} : null; } public void execute(Runnable command) { - if (null == executor) - throw new IllegalStateException("executer not initalized"); + if (executor == null) + throw new IllegalStateException("executor not initialized"); executor.execute(command); } public ScheduledFuture schedule(Runnable command, long delay, TimeUnit unit) { - if (null == scheduledExecutor) + if (scheduledExecutor == null) throw new IllegalStateException( - "scheduled executor service not initalized"); + "scheduled executor service not initialized"); return scheduledExecutor.schedule(command, delay, unit); } public ScheduledFuture scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) { - if (null == scheduledExecutor) + if (scheduledExecutor == null) throw new IllegalStateException( - "scheduled executor service not initalized"); + "scheduled executor service not initialized"); return scheduledExecutor.scheduleAtFixedRate(command, initialDelay, period, unit); @@ -1247,9 +1266,9 @@ public ScheduledFuture scheduleAtFixedRate(Runnable command, public ScheduledFuture scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) { - if (null == scheduledExecutor) + if (scheduledExecutor == null) throw new IllegalStateException( - "scheduled executor service not initalized"); + "scheduled executor service not initialized"); return scheduledExecutor.scheduleWithFixedDelay(command, initialDelay, delay, unit); @@ -1262,17 +1281,17 @@ public String toString() { public StringBuilder promptTo(StringBuilder sb, String indent) { String indent2 = indent + Symbol.SPACE; - Material.appendLine(sb, indent, "Device[name: ", deviceName); - Material.appendLine(sb, indent2, "desc: ", description); - Material.appendLine(sb, indent2, "installed: ", installed); + Builder.appendLine(sb, indent, "Device[name: ", deviceName); + Builder.appendLine(sb, indent2, "desc: ", description); + Builder.appendLine(sb, indent2, "installed: ", installed); for (Connection conn : conns) - conn.promptTo(sb, indent2).append(Material.LINE_SEPARATOR); + conn.promptTo(sb, indent2).append(Builder.LINE_SEPARATOR); for (ApplicationEntity ae : aes.values()) - ae.promptTo(sb, indent2).append(Material.LINE_SEPARATOR); - return sb.append(indent).append(Symbol.C_BRACKET_RIGHT); + ae.promptTo(sb, indent2).append(Builder.LINE_SEPARATOR); + return sb.append(indent).append(']'); } - public void reconfigure(Device from) { + public void reconfigure(Device from) throws IOException, GeneralSecurityException { setDeviceAttributes(from); reconfigureConnections(from); reconfigureApplicationEntities(from); @@ -1336,7 +1355,7 @@ private boolean update(Map target, String key = e.getKey(); X509Certificate[] value = e.getValue(); X509Certificate[] certs = target.get(key); - if (null == certs || !Arrays.equals(value, certs)) { + if (certs == null || !Arrays.equals(value, certs)) { target.put(key, value); updated = true; } @@ -1348,7 +1367,7 @@ private void reconfigureConnections(Device from) { Iterator connIter = conns.iterator(); while (connIter.hasNext()) { Connection conn = connIter.next(); - if (null == from.connectionWithEqualsRDN(conn)) { + if (from.connectionWithEqualsRDN(conn) == null) { connIter.remove(); conn.setDevice(null); conn.unbind(); @@ -1356,7 +1375,7 @@ private void reconfigureConnections(Device from) { } for (Connection src : from.conns) { Connection conn = connectionWithEqualsRDN(src); - if (null == conn) + if (conn == null) this.addConnection(conn = new Connection()); conn.reconfigure(src); } @@ -1366,7 +1385,7 @@ private void reconfigureApplicationEntities(Device from) { aes.keySet().retainAll(from.aes.keySet()); for (ApplicationEntity src : from.aes.values()) { ApplicationEntity ae = aes.get(src.getAETitle()); - if (null == ae) + if (ae == null) addApplicationEntity(ae = new ApplicationEntity(src.getAETitle())); ae.reconfigure(src); } @@ -1376,7 +1395,7 @@ private void reconfigureWebApplications(Device from) { webapps.keySet().retainAll(from.webapps.keySet()); for (WebApplication src : from.webapps.values()) { WebApplication webapp = webapps.get(src.getApplicationName()); - if (null == webapp) + if (webapp == null) addWebApplication(webapp = new WebApplication(src.getApplicationName())); webapp.reconfigure(src); } @@ -1386,7 +1405,7 @@ private void reconfigureKeycloakClients(Device from) { keycloakClients.keySet().retainAll(from.keycloakClients.keySet()); for (KeycloakClient src : from.keycloakClients.values()) { KeycloakClient client = keycloakClients.get(src.getKeycloakClientID()); - if (null == client) + if (client == null) addKeycloakClient(client = new KeycloakClient(src.getKeycloakClientID())); client.reconfigure(src); } @@ -1408,7 +1427,7 @@ private void reconfigureDeviceExtensions(Device from) { for (DeviceExtension src : from.extensions.values()) { Class clazz = src.getClass(); DeviceExtension ext = extensions.get(clazz); - if (null == ext) + if (ext == null) try { addDeviceExtension(ext = clazz.newInstance()); } catch (Exception e) { @@ -1429,18 +1448,10 @@ public T getDeviceExtension(Class clazz) { public T getDeviceExtensionNotNull(Class clazz) { T devExt = getDeviceExtension(clazz); - if (null == devExt) + if (devExt == null) throw new IllegalStateException("No " + clazz.getName() + " configured for Device: " + deviceName); return devExt; } - public Boolean getArcDevExt() { - return arcDevExt; - } - - public void setArcDevExt(Boolean arcDevExt) { - this.arcDevExt = arcDevExt; - } - } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Dimse.java b/bus-image/src/main/java/org/miaixz/bus/image/Dimse.java old mode 100755 new mode 100644 index e75c71c349..d04d7820c7 --- a/bus-image/src/main/java/org/miaixz/bus/image/Dimse.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Dimse.java @@ -28,7 +28,6 @@ package org.miaixz.bus.image; import org.miaixz.bus.core.lang.Symbol; -import org.miaixz.bus.image.galaxy.Material; import org.miaixz.bus.image.galaxy.data.Attributes; /** @@ -163,7 +162,7 @@ private static void promptIntTo(Attributes cmd, String name, int tag, private static void promptStringTo(Attributes cmd, String name, int tag, StringBuilder sb) { String s = cmd.getString(tag, null); - if (null != s) + if (s != null) sb.append(name).append(s); } @@ -171,21 +170,25 @@ private static void promptUIDTo(Attributes cmd, String name, int tag, StringBuilder sb) { if (tag != 0) { String uid = cmd.getString(tag, null); - if (null != uid) + if (uid != null) promptUIDTo(name, uid, sb); } } + private static void promptMoveDestination(Attributes cmd, StringBuilder sb) { + sb.append(", dest=").append(cmd.getString(Tag.MoveDestination)); + } + private static void promptUIDTo(String name, String uid, StringBuilder sb) { - sb.append(Material.LINE_SEPARATOR).append(name); + sb.append(Builder.LINE_SEPARATOR).append(name); UID.promptTo(uid, sb); } private static void promptMoveOriginatorTo(Attributes cmd, StringBuilder sb) { String aet = cmd.getString(Tag.MoveOriginatorApplicationEntityTitle, null); - if (null != aet) - sb.append(Material.LINE_SEPARATOR) + if (aet != null) + sb.append(Builder.LINE_SEPARATOR) .append(" orig=") .append(aet) .append(" >> ") @@ -196,10 +199,10 @@ private static void promptMoveOriginatorTo(Attributes cmd, StringBuilder sb) { private static void promptAttributeIdentifierListTo(Attributes cmd, StringBuilder sb) { int[] tags = cmd.getInts(Tag.AttributeIdentifierList); - if (null == tags) + if (tags == null) return; - sb.append(Material.LINE_SEPARATOR).append(" tags=["); + sb.append(Builder.LINE_SEPARATOR).append(" tags=["); if (tags.length > 0) { for (int tag : tags) sb.append(Tag.toString(tag)).append(", "); @@ -259,13 +262,13 @@ public String toString(Attributes cmdAttrs, int pcid, String tsuid) { promptIntTo(cmdAttrs, ", prior=", Tag.Priority, sb); promptMoveOriginatorTo(cmdAttrs, sb); break; + case C_FIND_RQ: case C_GET_RQ: promptIntTo(cmdAttrs, ", prior=", Tag.Priority, sb); - promptAttributeIdentifierListTo(cmdAttrs, sb); break; - case C_FIND_RQ: case C_MOVE_RQ: promptIntTo(cmdAttrs, ", prior=", Tag.Priority, sb); + promptMoveDestination(cmdAttrs, sb); break; case C_GET_RSP: case C_MOVE_RSP: @@ -275,6 +278,9 @@ public String toString(Attributes cmdAttrs, int pcid, String tsuid) { case N_EVENT_REPORT_RSP: promptIntTo(cmdAttrs, ", eventID=", Tag.EventTypeID, sb); break; + case N_GET_RQ: + promptAttributeIdentifierListTo(cmdAttrs, sb); + break; case N_ACTION_RQ: case N_ACTION_RSP: promptIntTo(cmdAttrs, ", actionID=", Tag.ActionTypeID, sb); diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Editors.java b/bus-image/src/main/java/org/miaixz/bus/image/Editors.java old mode 100755 new mode 100644 index 14d1fbaeeb..170c11f2b2 --- a/bus-image/src/main/java/org/miaixz/bus/image/Editors.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Editors.java @@ -27,8 +27,8 @@ */ package org.miaixz.bus.image; +import org.miaixz.bus.image.galaxy.EditorContext; import org.miaixz.bus.image.galaxy.data.Attributes; -import org.miaixz.bus.image.metric.AttributeContext; /** * @author Kimi Liu @@ -37,6 +37,6 @@ @FunctionalInterface public interface Editors { - boolean apply(Attributes attributes, AttributeContext context); + void apply(Attributes attributes, EditorContext context); } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Format.java b/bus-image/src/main/java/org/miaixz/bus/image/Format.java old mode 100755 new mode 100644 index d8b0d59156..654e5a964c --- a/bus-image/src/main/java/org/miaixz/bus/image/Format.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Format.java @@ -27,43 +27,139 @@ */ package org.miaixz.bus.image; -import org.miaixz.bus.core.lang.Algorithm; -import org.miaixz.bus.core.lang.Charset; -import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.image.galaxy.data.Attributes; import org.miaixz.bus.image.galaxy.data.DatePrecision; -import java.io.UnsupportedEncodingException; import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.text.FieldPosition; import java.text.MessageFormat; import java.text.ParsePosition; +import java.time.*; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.format.DateTimeParseException; +import java.time.format.FormatStyle; +import java.time.temporal.ChronoUnit; +import java.time.temporal.Temporal; +import java.time.temporal.TemporalAccessor; import java.util.*; import java.util.concurrent.ThreadLocalRandom; +import java.util.function.UnaryOperator; + +import static java.time.temporal.ChronoField.*; /** - * 日期格式化等工具 - * * @author Kimi Liu * @since Java 17+ */ public class Format extends java.text.Format { - public static final Date[] EMPTY_DATES = {}; + private static final long serialVersionUID = -1L; + private static final char[] CHARS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', - 'o', 'p', 'q', 'r', 's', 't', 'u', 'v' - }; + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v'}; private static final int LONG_BYTES = 8; + private static final DateTimeFormatter DA_PARSER = + new DateTimeFormatterBuilder() + .appendValue(YEAR, 4) + .optionalStart() + .appendLiteral('.') + .optionalEnd() + .appendValue(MONTH_OF_YEAR, 2) + .optionalStart() + .appendLiteral('.') + .optionalEnd() + .appendValue(DAY_OF_MONTH, 2) + .toFormatter(); + private static final DateTimeFormatter DA_FORMATTER = + new DateTimeFormatterBuilder() + .appendValue(YEAR, 4) + .appendValue(MONTH_OF_YEAR, 2) + .appendValue(DAY_OF_MONTH, 2) + .toFormatter(); + private static final DateTimeFormatter TM_PARSER = + new DateTimeFormatterBuilder() + .appendValue(HOUR_OF_DAY, 2) + .optionalStart() + .optionalStart() + .appendLiteral(':') + .optionalEnd() + .appendValue(MINUTE_OF_HOUR, 2) + .optionalStart() + .optionalStart() + .appendLiteral(':') + .optionalEnd() + .appendValue(SECOND_OF_MINUTE, 2) + .optionalStart() + .appendFraction(NANO_OF_SECOND, 0, 6, true) + .toFormatter(); + private static final DateTimeFormatter TM_FORMATTER = + new DateTimeFormatterBuilder() + .appendValue(HOUR_OF_DAY, 2) + .appendValue(MINUTE_OF_HOUR, 2) + .appendValue(SECOND_OF_MINUTE, 2) + .appendFraction(NANO_OF_SECOND, 6, 6, true) + .toFormatter(); + private static final DateTimeFormatter DT_PARSER = + new DateTimeFormatterBuilder() + .appendValue(YEAR, 4) + .optionalStart() + .appendValue(MONTH_OF_YEAR, 2) + .optionalStart() + .appendValue(DAY_OF_MONTH, 2) + .optionalStart() + .appendValue(HOUR_OF_DAY, 2) + .optionalStart() + .appendValue(MINUTE_OF_HOUR, 2) + .optionalStart() + .appendValue(SECOND_OF_MINUTE, 2) + .optionalStart() + .appendFraction(NANO_OF_SECOND, 0, 6, true) + .optionalEnd() + .optionalEnd() + .optionalEnd() + .optionalEnd() + .optionalEnd() + .optionalEnd() + .optionalStart() + .appendOffset("+HHMM", "+0000") + .toFormatter(); + private static final DateTimeFormatter DT_FORMATTER = + new DateTimeFormatterBuilder() + .appendValue(YEAR, 4) + .appendValue(MONTH_OF_YEAR, 2) + .appendValue(DAY_OF_MONTH, 2) + .appendValue(HOUR_OF_DAY, 2) + .appendValue(MINUTE_OF_HOUR, 2) + .appendValue(SECOND_OF_MINUTE, 2) + .appendFraction(NANO_OF_SECOND, 6, 6, true) + .optionalStart() + .appendOffset("+HHMM", "+0000") + .toFormatter(); + /** + * Conversion from old to new Time API + */ + private static final DateTimeFormatter defaultDateFormatter = + DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM); + private static final DateTimeFormatter defaultTimeFormatter = + DateTimeFormatter.ofLocalizedTime(FormatStyle.MEDIUM); + private static final DateTimeFormatter defaultDateTimeFormatter = + DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM); private static TimeZone cachedTimeZone; + private final String pattern; private final int[][] tagPaths; private final int[] index; + private final int[] offsets; + private final Object[] dateTimeOffsets; + private final UnaryOperator[] slices; private final Type[] types; private final MessageFormat format; @@ -74,15 +170,18 @@ public Format(String pattern) { this.tagPaths = new int[n][]; this.index = new int[n]; this.types = new Type[n]; + this.offsets = new int[n]; + this.dateTimeOffsets = new Object[n]; + this.slices = new UnaryOperator[n]; this.format = buildMessageFormat(tokens); } public static Format valueOf(String s) { - return null != s ? new Format(s) : null; + return s != null ? new Format(s) : null; } private static Calendar cal(TimeZone tz) { - Calendar cal = (null != tz) + Calendar cal = (tz != null) ? new GregorianCalendar(tz) : new GregorianCalendar(); cal.clear(); @@ -90,7 +189,7 @@ private static Calendar cal(TimeZone tz) { } private static Calendar cal(TimeZone tz, Date date) { - Calendar cal = (null != tz) + Calendar cal = (tz != null) ? new GregorianCalendar(tz) : new GregorianCalendar(); cal.setTime(date); @@ -187,7 +286,7 @@ public static String formatTimezoneOffsetFromUTC(TimeZone tz) { * @return 来自UTC的时区偏移量,格式为{@code (+|i)HHMM} */ public static String formatTimezoneOffsetFromUTC(TimeZone tz, Date date) { - return appendZZZZZ(tz.getOffset(null == date + return appendZZZZZ(tz.getOffset(date == null ? System.currentTimeMillis() : date.getTime()), new StringBuilder(5)).toString(); } @@ -232,27 +331,24 @@ public static Date parseDA(TimeZone tz, String s) { public static Date parseDA(TimeZone tz, String s, boolean ceil) { Calendar cal = cal(tz); int length = s.length(); - if (!(length == 8 || length == 10 && !Character.isDigit(s.charAt(4)))) - throw new IllegalArgumentException(s); - try { - int pos = 0; - cal.set(Calendar.YEAR, - Integer.parseInt(s.substring(pos, pos + 4))); - pos += 4; - if (!Character.isDigit(s.charAt(pos))) - pos++; - cal.set(Calendar.MONTH, - Integer.parseInt(s.substring(pos, pos + 2)) - 1); - pos += 2; - if (!Character.isDigit(s.charAt(pos))) - pos++; - cal.set(Calendar.DAY_OF_MONTH, - Integer.parseInt(s.substring(pos))); - if (ceil) - ceil(cal, Calendar.DAY_OF_MONTH); - } catch (NumberFormatException e) { + if (!(length == 8 || length == 10 && !Character.isDigit(s.charAt(4)) && s.charAt(7) == s.charAt(4))) throw new IllegalArgumentException(s); - } + int pos = 0; + cal.set(Calendar.YEAR, + parseDigit(s, pos++) * 1000 + + parseDigit(s, pos++) * 100 + + parseDigit(s, pos++) * 10 + + parseDigit(s, pos++)); + if (length == 10) + pos++; + cal.set(Calendar.MONTH, + parseDigit(s, pos++) * 10 + parseDigit(s, pos++) - 1); + if (length == 10) + pos++; + cal.set(Calendar.DAY_OF_MONTH, + parseDigit(s, pos++) * 10 + parseDigit(s, pos++)); + if (ceil) + ceil(cal, Calendar.DAY_OF_MONTH); return cal.getTime(); } @@ -262,7 +358,18 @@ public static Date parseTM(TimeZone tz, String s, DatePrecision precision) { public static Date parseTM(TimeZone tz, String s, boolean ceil, DatePrecision precision) { - return parseTM(cal(tz), s, ceil, precision); + return parseTM(cal(tz), truncateTimeZone(s), ceil, precision); + } + + private static String truncateTimeZone(String s) { + int length = s.length(); + if (length > 4) { + char sign = s.charAt(length - 5); + if (sign == '+' || sign == '-') { + return s.substring(0, length - 5); + } + } + return s; } private static Date parseTM(Calendar cal, String s, boolean ceil, @@ -272,63 +379,72 @@ private static Date parseTM(Calendar cal, String s, boolean ceil, if (pos + 2 > length) throw new IllegalArgumentException(s); - try { - cal.set(precision.lastField = Calendar.HOUR_OF_DAY, - Integer.parseInt(s.substring(pos, pos + 2))); - pos += 2; + cal.set(precision.lastField = Calendar.HOUR_OF_DAY, + parseDigit(s, pos++) * 10 + parseDigit(s, pos++)); + if (pos < length) { + if (!Character.isDigit(s.charAt(pos))) + pos++; + if (pos + 2 > length) + throw new IllegalArgumentException(s); + + cal.set(precision.lastField = Calendar.MINUTE, + parseDigit(s, pos++) * 10 + parseDigit(s, pos++)); if (pos < length) { if (!Character.isDigit(s.charAt(pos))) pos++; if (pos + 2 > length) throw new IllegalArgumentException(s); - - cal.set(precision.lastField = Calendar.MINUTE, - Integer.parseInt(s.substring(pos, pos + 2))); - pos += 2; - if (pos < length) { - if (!Character.isDigit(s.charAt(pos))) - pos++; - if (pos + 2 > length) + cal.set(precision.lastField = Calendar.SECOND, + parseDigit(s, pos++) * 10 + parseDigit(s, pos++)); + int n = length - pos; + if (n > 0) { + if (s.charAt(pos++) != '.') throw new IllegalArgumentException(s); - cal.set(precision.lastField = Calendar.SECOND, - Integer.parseInt(s.substring(pos, pos + 2))); - pos += 2; - if (pos < length) { - float f = Float.parseFloat(s.substring(pos)); - if (f >= 1 || f < 0) - throw new IllegalArgumentException(s); - cal.set(precision.lastField = Calendar.MILLISECOND, - (int) (f * 1000)); - return cal.getTime(); + + int d, millis = 0; + for (int i = 1; i < n; ++i) { + d = parseDigit(s, pos++); + if (i < 4) + millis += d; + else if (i == 4 & d > 4) // round up + millis++; + if (i < 3) millis *= 10; } + for (int i = n; i < 3; ++i) millis *= 10; + cal.set(precision.lastField = Calendar.MILLISECOND, millis); + return cal.getTime(); } } - if (ceil) - ceil(cal, precision.lastField); - } catch (NumberFormatException e) { - throw new IllegalArgumentException(s); } + if (ceil) + ceil(cal, precision.lastField); return cal.getTime(); } + private static int parseDigit(String s, int index) { + int d = s.charAt(index) - '0'; + if (d < 0 || d > 9) throw new IllegalArgumentException(s); + return d; + } + public static Date parseDT(TimeZone tz, String s, DatePrecision precision) { return parseDT(tz, s, false, precision); } public static TimeZone timeZone(String s) { TimeZone tz; - if (s.length() != 5 || null == (tz = safeTimeZone(s))) + if (s.length() != 5 || (tz = safeTimeZone(s)) == null) throw new IllegalArgumentException("Illegal Timezone Offset: " + s); return tz; } private static TimeZone safeTimeZone(String s) { String tzid = tzid(s); - if (null == tzid) + if (tzid == null) return null; TimeZone tz = cachedTimeZone; - if (null == tz || !tz.getID().equals(tzid)) + if (tz == null || !tz.getID().equals(tzid)) cachedTimeZone = tz = TimeZone.getTimeZone(tzid); return tz; @@ -340,7 +456,7 @@ private static String tzid(String s) { char[] tzid = {'G', 'M', 'T', 0, 0, 0, Symbol.C_COLON, 0, 0}; s.getChars(length - 5, length - 2, tzid, 3); s.getChars(length - 2, length, tzid, 7); - if ((tzid[3] == Symbol.C_PLUS || tzid[3] == Symbol.C_MINUS) + if ((tzid[3] == '+' || tzid[3] == '-') && Character.isDigit(tzid[4]) && Character.isDigit(tzid[5]) && Character.isDigit(tzid[7]) @@ -355,47 +471,240 @@ public static Date parseDT(TimeZone tz, String s, boolean ceil, DatePrecision precision) { int length = s.length(); TimeZone tz1 = safeTimeZone(s); - if (precision.includeTimezone = null != tz1) { + if (precision.includeTimezone = tz1 != null) { length -= 5; tz = tz1; } Calendar cal = cal(tz); - try { - int pos = 0; - if (pos + 4 > length) + int pos = 0; + if (pos + 4 > length) + throw new IllegalArgumentException(s); + cal.set(precision.lastField = Calendar.YEAR, + parseDigit(s, pos++) * 1000 + + parseDigit(s, pos++) * 100 + + parseDigit(s, pos++) * 10 + + parseDigit(s, pos++)); + if (pos < length) { + if (!Character.isDigit(s.charAt(pos))) + pos++; + if (pos + 2 > length) throw new IllegalArgumentException(s); - cal.set(precision.lastField = Calendar.YEAR, - Integer.parseInt(s.substring(pos, pos + 4))); - pos += 4; + cal.set(precision.lastField = Calendar.MONTH, + parseDigit(s, pos++) * 10 + parseDigit(s, pos++) - 1); if (pos < length) { if (!Character.isDigit(s.charAt(pos))) pos++; if (pos + 2 > length) throw new IllegalArgumentException(s); - cal.set(precision.lastField = Calendar.MONTH, - Integer.parseInt(s.substring(pos, pos + 2)) - 1); - pos += 2; - if (pos < length) { - if (!Character.isDigit(s.charAt(pos))) - pos++; - if (pos + 2 > length) - throw new IllegalArgumentException(s); - cal.set(precision.lastField = Calendar.DAY_OF_MONTH, - Integer.parseInt(s.substring(pos, pos + 2))); - pos += 2; - if (pos < length) - return parseTM(cal, s.substring(pos, length), ceil, - precision); - } + cal.set(precision.lastField = Calendar.DAY_OF_MONTH, + parseDigit(s, pos++) * 10 + parseDigit(s, pos++)); + if (pos < length) + return parseTM(cal, s.substring(pos, length), ceil, + precision); } - } catch (NumberFormatException e) { - throw new IllegalArgumentException(s); } if (ceil) ceil(cal, precision.lastField); return cal.getTime(); } + public static LocalDate parseDA(String value) { + return LocalDate.from(DA_PARSER.parse(value.trim())); + } + + public static String formatDA(Temporal value) { + return DA_FORMATTER.format(value); + } + + public static LocalTime parseTM(String value) { + return LocalTime.from(TM_PARSER.parse(value.trim())); + } + + public static LocalTime parseTMMax(String value) { + return parseTM(value).plusNanos(nanosToAdd(value)); + } + + public static String formatTM(Temporal value) { + return TM_FORMATTER.format(value); + } + + public static Temporal parseDT(String value) { + TemporalAccessor temporal = DT_PARSER.parse(value.trim()); + LocalDate date = + temporal.isSupported(DAY_OF_MONTH) + ? LocalDate.from(temporal) + : LocalDate.of(temporal.get(YEAR), getMonth(temporal), 1); + LocalTime time = temporal.isSupported(HOUR_OF_DAY) ? LocalTime.from(temporal) : LocalTime.MIN; + LocalDateTime dateTime = LocalDateTime.of(date, time); + return temporal.isSupported(OFFSET_SECONDS) + ? ZonedDateTime.of(dateTime, ZoneOffset.ofTotalSeconds(temporal.get(OFFSET_SECONDS))) + : dateTime; + } + + public static LocalDateTime dateTime(LocalDate date, LocalTime time) { + if (date == null) { + return null; + } + if (time == null) { + return date.atStartOfDay(); + } + return LocalDateTime.of(date, time); + } + + private static int getMonth(TemporalAccessor temporal) { + return temporal.isSupported(MONTH_OF_YEAR) ? temporal.get(MONTH_OF_YEAR) : 1; + } + + public static Temporal parseDTMax(String value) { + int length = lengthWithoutZone(value); + return length > 8 + ? parseDT(value).plus(nanosToAdd(length - 8), ChronoUnit.NANOS) + : parseDT(value).plus(1, yearsMonthsDays(length)).minus(1, ChronoUnit.NANOS); + } + + public static String formatDT(Temporal value) { + return DT_FORMATTER.format(value); + } + + public static String truncateTM(String value, int maxLength) { + if (maxLength < 2) throw new IllegalArgumentException("maxLength %d < 2" + maxLength); + + return truncate(value, value.length(), maxLength, 8); + } + + public static String truncateDT(String value, int maxLength) { + if (maxLength < 4) throw new IllegalArgumentException("maxLength %d < 4" + maxLength); + + int index = indexOfZone(value); + return index < 0 + ? truncate(value, value.length(), maxLength, 16) + : truncate(value, index, maxLength, 16) + value.substring(index); + } + + private static long nanosToAdd(String tm) { + int length = tm.length(); + int index = tm.lastIndexOf(':'); + if (index > 0) { + length--; + if (index > 4) length--; + } + return nanosToAdd(length); + } + + private static long nanosToAdd(int length) { + return switch (length) { + case 2 -> 3599999999999L; + case 4 -> 59999999999L; + case 6, 7 -> 999999999L; + case 8 -> 99999999L; + case 9 -> 9999999L; + case 10 -> 999999L; + case 11 -> 99999L; + case 12 -> 9999L; + case 13 -> 999L; + default -> throw new IllegalArgumentException("length: " + length); + }; + } + + private static ChronoUnit yearsMonthsDays(int length) { + return switch (length) { + case 4 -> ChronoUnit.YEARS; + case 6 -> ChronoUnit.MONTHS; + case 8 -> ChronoUnit.DAYS; + default -> throw new IllegalArgumentException("length: " + length); + }; + } + + private static int lengthWithoutZone(String value) { + int index = indexOfZone(value); + return index < 0 ? value.length() : index; + } + + private static int indexOfZone(String value) { + int index = value.length() - 5; + return index >= 4 && isSign(value.charAt(index)) ? index : -1; + } + + private static boolean isSign(char ch) { + return ch == '+' || ch == '-'; + } + + private static String truncate(String value, int length, int maxLength, int fractionPos) { + return value.substring(0, adjustMaxLength(Math.min(length, maxLength), fractionPos)); + } + + private static int adjustMaxLength(int maxLength, int fractionPos) { + return maxLength < fractionPos ? maxLength & ~1 : maxLength; + } + + /** + * Convert date or time object to display date in String with FormatStyle.MEDIUM + * + * @param date the date or time object + * @return the time to display with FormatStyle.MEDIUM + */ + public static String formatDateTime(TemporalAccessor date) { + return formatDateTime(date, Locale.getDefault()); + } + + public static String formatDateTime(TemporalAccessor date, Locale locale) { + if (date instanceof LocalDate) { + return defaultDateFormatter.withLocale(locale).format(date); + } else if (date instanceof LocalTime) { + return defaultTimeFormatter.withLocale(locale).format(date); + } else if (date instanceof LocalDateTime || date instanceof ZonedDateTime) { + return defaultDateTimeFormatter.withLocale(locale).format(date); + } else if (date instanceof Instant) { + return defaultDateTimeFormatter + .withLocale(locale) + .format(((Instant) date).atZone(ZoneId.systemDefault())); + } + return ""; + } + + public static LocalDate toLocalDate(Date date) { + if (date != null) { + LocalDateTime datetime = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); + return datetime.toLocalDate(); + } + return null; + } + + public static LocalTime toLocalTime(Date date) { + if (date != null) { + LocalDateTime datetime = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); + return datetime.toLocalTime(); + } + return null; + } + + public static LocalDateTime toLocalDateTime(Date date) { + if (date != null) { + return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); + } + return null; + } + + public static Date dateTime(Date date, Date time) { + if (time == null) { + return date; + } else if (date == null) { + return time; + } + Calendar calendarA = Calendar.getInstance(); + calendarA.setTime(date); + + Calendar calendarB = Calendar.getInstance(); + calendarB.setTime(time); + + calendarA.set(Calendar.HOUR_OF_DAY, calendarB.get(Calendar.HOUR_OF_DAY)); + calendarA.set(Calendar.MINUTE, calendarB.get(Calendar.MINUTE)); + calendarA.set(Calendar.SECOND, calendarB.get(Calendar.SECOND)); + calendarA.set(Calendar.MILLISECOND, calendarB.get(Calendar.MILLISECOND)); + + return calendarA.getTime(); + } + private List tokenize(String s) { List result = new ArrayList<>(); StringTokenizer stk = new StringTokenizer(s, "{}", true); @@ -410,7 +719,7 @@ private List tokenize(String s) { if (delim == '{') { if (level++ == 0) { if (prevDelim == '}') - result.add(Normal.EMPTY); + result.add(""); } else { sb.append(delim); } @@ -459,10 +768,22 @@ private MessageFormat buildMessageFormat(List tokens) { } if (typeStart != 0) { int typeEnd = tagStr.indexOf(Symbol.C_COMMA, typeStart); + if (typeEnd < 0) typeEnd = tagStr.length(); try { - types[i] = Type.valueOf(tagStr.substring(typeStart, - typeEnd < 0 ? tagStr.length() : typeEnd)); - } catch (IllegalArgumentException e) { + if (tagStr.startsWith("date", typeStart)) { + types[i] = Type.date; + if (typeStart + 4 < typeEnd) { + dateTimeOffsets[i] = Period.parse(tagStr.substring(typeStart + 4, typeEnd)); + } + } else if (tagStr.startsWith("time", typeStart)) { + types[i] = Type.time; + if (typeStart + 4 < typeEnd) { + dateTimeOffsets[i] = Duration.parse(tagStr.substring(typeStart + 4, typeEnd)); + } + } else { + types[i] = Type.valueOf(tagStr.substring(typeStart, typeEnd)); + } + } catch (IllegalArgumentException | DateTimeParseException e) { throw new IllegalArgumentException(pattern); } switch (types[i]) { @@ -470,8 +791,20 @@ private MessageFormat buildMessageFormat(List tokens) { case date: case time: case choice: - formatBuilder.append( - typeStart > 0 ? tagStr.substring(typeStart - 1) : tagStr); + formatBuilder.append(',').append(types[i]).append(tagStr.substring(typeEnd)); + break; + case offset: + try { + offsets[i] = Integer.parseInt(tagStr.substring(typeEnd + 1)); + } catch (IllegalArgumentException e) { + throw new IllegalArgumentException(pattern); + } + case slice: + try { + slices[i] = new Slice(tagStr.substring(typeEnd + 1)); + } catch (RuntimeException e) { + throw new IllegalArgumentException(pattern); + } } } else { types[i] = Type.none; @@ -499,24 +832,26 @@ private MessageFormat buildMessageFormat(List tokens) { } @Override - public StringBuffer format(Object object, StringBuffer result, FieldPosition pos) { - return format.format(toArgs((Attributes) object), result, pos); + public StringBuffer format(Object obj, StringBuffer result, FieldPosition pos) { + return format.format(toArgs((Attributes) obj), result, pos); } private Object[] toArgs(Attributes attrs) { Object[] args = new Object[tagPaths.length]; + outer: for (int i = 0; i < args.length; i++) { + Attributes item = attrs; + int tag = 0; int[] tagPath = tagPaths[i]; - if (null == tagPath) { // now - args[i] = types[i].toArg(attrs, 0, index[i]); - } else { + if (tagPath != null) { // !now int last = tagPath.length - 1; - Attributes item = attrs; - for (int j = 0; j < last && null != item; j++) { + tag = tagPath[last]; + for (int j = 0; j < last; j++) { item = item.getNestedDataset(tagPath[j]); + if (item == null) continue outer; } - args[i] = null != item ? types[i].toArg(item, tagPath[last], index[i]) : null; } + args[i] = types[i].toArg(item, tag, index[i], offsets[i], dateTimeOffsets[i], slices[i]); } return args; } @@ -534,74 +869,114 @@ public String toString() { private enum Type { none { @Override - Object toArg(Attributes attrs, int tag, int index) { - return attrs.getString(tag, index); + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { + return attrs.getString(tag, index, ""); + } + }, + upper { + @Override + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { + return attrs.getString(tag, index, "").toUpperCase(); + } + }, + slice { + @Override + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator slice) { + return slice.apply(attrs.getString(tag, index)); } }, number { @Override - Object toArg(Attributes attrs, int tag, int index) { + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { return attrs.getDouble(tag, index, 0.); } }, + offset { + @Override + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { + return Integer.toString(attrs.getInt(tag, index, 0) + offset); + } + }, date { @Override - Object toArg(Attributes attrs, int tag, int index) { - return tag != 0 ? attrs.getDate(tag, index) : new Date(); + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { + Date date = tag != 0 ? attrs.getDate(tag, index) : new Date(); + if (!(dateTimeOffset instanceof Period dateOffset)) return date; + Calendar cal = Calendar.getInstance(attrs.getTimeZone()); + cal.setTime(date); + cal.add(Calendar.YEAR, dateOffset.getYears()); + cal.add(Calendar.MONTH, dateOffset.getMonths()); + cal.add(Calendar.DAY_OF_MONTH, dateOffset.getDays()); + return cal.getTime(); } }, time { @Override - Object toArg(Attributes attrs, int tag, int index) { - return tag != 0 ? attrs.getDate(tag, index) : new Date(); + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { + Date date = tag != 0 ? attrs.getDate(tag, index) : new Date(); + if (!(dateTimeOffset instanceof Duration timeOffset)) return date; + Calendar cal = Calendar.getInstance(attrs.getTimeZone()); + cal.setTime(date); + cal.add(Calendar.SECOND, (int) timeOffset.getSeconds()); + return cal.getTime(); } }, choice { @Override - Object toArg(Attributes attrs, int tag, int index) { + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { return attrs.getDouble(tag, index, 0.); } }, hash { @Override - Object toArg(Attributes attrs, int tag, int index) { + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { String s = attrs.getString(tag, index); - return null != s ? Tag.toHexString(s.hashCode()) : null; + return s != null ? Tag.toHexString(s.hashCode()) : null; } }, md5 { @Override - Object toArg(Attributes attrs, int tag, int index) { + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { String s = attrs.getString(tag, index); - return null != s ? getMD5String(s) : null; + return s != null ? getMD5String(s) : null; } }, urlencoded { @Override - Object toArg(Attributes attrs, int tag, int index) { + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { String s = attrs.getString(tag, index); - try { - return null != s ? URLEncoder.encode(s, Charset.DEFAULT_UTF_8) : null; - } catch (UnsupportedEncodingException e) { - throw new AssertionError(e); - } + return s != null ? URLEncoder.encode(s, StandardCharsets.UTF_8) : null; } }, rnd { @Override - Object toArg(Attributes attrs, int tag, int index) { + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { return Tag.toHexString(ThreadLocalRandom.current().nextInt()); } }, uuid { @Override - Object toArg(Attributes attrs, int tag, int index) { + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { return UUID.randomUUID(); } }, uid { @Override - Object toArg(Attributes attrs, int tag, int index) { + Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice) { return UID.createUID(); } }; @@ -634,12 +1009,13 @@ static long toLong(byte[] ba, int offset) { return l; } - abstract Object toArg(Attributes attrs, int tag, int index); + abstract Object toArg(Attributes attrs, int tag, int index, int offset, Object dateTimeOffset, + UnaryOperator splice); String getMD5String(String s) { try { - MessageDigest digest = MessageDigest.getInstance(Algorithm.MD5.getValue()); - digest.update(null == s ? new byte[0] : s.getBytes(Charset.UTF_8)); + MessageDigest digest = MessageDigest.getInstance("MD5"); + digest.update(s == null ? new byte[0] : s.getBytes(StandardCharsets.UTF_8)); return toString32(digest.digest()); } catch (NoSuchAlgorithmException e) { return s; @@ -647,4 +1023,36 @@ String getMD5String(String s) { } } + private class Slice implements UnaryOperator { + final int beginIndex; + final int endIndex; + + public Slice(String s) { + String[] ss = Builder.split(s, ','); + if (ss.length == 1) { + beginIndex = Integer.parseInt(ss[0]); + endIndex = 0; + } else if (ss.length == 2) { + endIndex = Integer.parseInt(ss[1]); + beginIndex = endIndex != 0 ? Integer.parseInt(ss[0]) : 0; + } else { + throw new IllegalArgumentException(s); + } + } + + @Override + public String apply(String s) { + try { + int l = s.length(); + return endIndex == 0 + ? s.substring(beginIndex < 0 ? Math.max(0, l + beginIndex) : beginIndex) + : s.substring( + beginIndex < 0 ? Math.max(0, l + beginIndex) : beginIndex, + endIndex < 0 ? l + endIndex : Math.min(l, endIndex)); + } catch (RuntimeException e) { + return ""; + } + } + } + } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/IOD.java b/bus-image/src/main/java/org/miaixz/bus/image/IOD.java old mode 100755 new mode 100644 similarity index 83% rename from bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/IOD.java rename to bus-image/src/main/java/org/miaixz/bus/image/IOD.java index 425dcbb417..3aa8f276df --- a/bus-image/src/main/java/org/miaixz/bus/image/galaxy/data/IOD.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/IOD.java @@ -25,13 +25,15 @@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ */ -package org.miaixz.bus.image.galaxy.data; +package org.miaixz.bus.image; import org.miaixz.bus.core.lang.Normal; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.xyz.ResourceKit; -import org.miaixz.bus.image.Tag; -import org.miaixz.bus.image.galaxy.Material; +import org.miaixz.bus.image.galaxy.data.Attributes; +import org.miaixz.bus.image.galaxy.data.Code; +import org.miaixz.bus.image.galaxy.data.Sequence; +import org.miaixz.bus.image.galaxy.data.VR; import org.xml.sax.Locator; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; @@ -51,6 +53,8 @@ */ public class IOD extends ArrayList { + private static final long serialVersionUID = -1L; + private DataElementType type; private Condition condition; private int lineNumber = -1; @@ -80,7 +84,7 @@ public static IOD valueOf(Code code) { Tag.CodingSchemeDesignator, VR.SH, DataElementType.TYPE_1, 1, 1, 0) .setValues(code.getCodingSchemeDesignator())); String codingSchemeVersion = code.getCodingSchemeVersion(); - if (null == codingSchemeVersion) + if (codingSchemeVersion == null) iod.add(new DataElement( Tag.CodingSchemeVersion, VR.SH, DataElementType.TYPE_0, -1, -1, 0)); else @@ -132,6 +136,8 @@ public enum DataElementType { public static class DataElement implements Serializable { + private static final long serialVersionUID = -1L; + public final int tag; public final VR vr; public final DataElementType type; @@ -166,7 +172,7 @@ public int getValueNumber() { } public DataElement addItemIOD(IOD iod) { - if (null == this.values) { + if (this.values == null) { this.values = new IOD[]{iod}; } else { IOD[] iods = (IOD[]) this.values; @@ -360,10 +366,10 @@ public MemberOf setValues(Code... values) { } public boolean match(Attributes attrs) { - if (null == values) + if (values == null) throw new IllegalStateException("values not initialized"); Attributes item = item(attrs); - if (null == item) + if (item == null) return matchNotPresent; if (values instanceof int[]) @@ -376,7 +382,7 @@ else if (values instanceof Code[]) private boolean match(Attributes item, String[] ss) { String val = item.getString(tag, valueIndex); - if (null == val) + if (val == null) return not != matchNotPresent; for (String s : ss) { if (s.equals(val)) @@ -387,7 +393,7 @@ private boolean match(Attributes item, String[] ss) { private boolean match(Attributes item, Code[] codes) { Sequence seq = item.getSequence(tag); - if (null != seq) + if (seq != null) for (Attributes codeItem : seq) { try { Code val = new Code(codeItem); @@ -440,61 +446,57 @@ public void setDocumentLocator(Locator locator) { @Override public void startElement(String uri, String localName, String qName, org.xml.sax.Attributes atts) throws SAXException { - switch (qName.charAt(0)) { - case 'A': - if (qName.equals("And")) - startCondition(qName, new And()); + switch (qName) { + case "And": + startCondition(qName, new And()); + break; + case "Code": + startCode( + atts.getValue("codeValue"), + atts.getValue("codingSchemeDesignator"), + atts.getValue("codingSchemeVersion"), + atts.getValue("codeMeaning")); + break; + case "DataElement": + startDataElement( + atts.getValue("tag"), + atts.getValue("vr"), + atts.getValue("type"), + atts.getValue("vm"), + atts.getValue("items"), + atts.getValue("valueNumber")); + break; + case "If": + startIf(atts.getValue("id"), atts.getValue("idref")); + break; + case "Item": + startItem(atts.getValue("id"), + atts.getValue("idref"), + atts.getValue("type")); + break; + case "MemberOf": + startCondition(qName, memberOf(atts)); break; - case 'C': - if (qName.equals("Code")) - startCode( - atts.getValue("codeValue"), - atts.getValue("codingSchemeDesignator"), - atts.getValue("codingSchemeVersion"), - atts.getValue("codeMeaning")); - case 'D': - if (qName.equals("DataElement")) - startDataElement( - atts.getValue("tag"), - atts.getValue("vr"), - atts.getValue("type"), - atts.getValue("vm"), - atts.getValue("items"), - atts.getValue("valueNumber")); + case "NotAnd": + startCondition(qName, new And().not()); break; - case 'I': - if (qName.equals("If")) - startIf(atts.getValue("id"), atts.getValue("idref")); - else if (qName.equals("Item")) - startItem(atts.getValue("id"), - atts.getValue("idref"), - atts.getValue("type")); + case "NotMemberOf": + startCondition(qName, memberOf(atts).not()); break; - case 'M': - if (qName.equals("MemberOf")) - startCondition(qName, memberOf(atts)); + case "NotOr": + startCondition(qName, new Or().not()); break; - case 'N': - if (qName.equals("NotAnd")) - startCondition(qName, new And().not()); - else if (qName.equals("NotMemberOf")) - startCondition(qName, memberOf(atts).not()); - else if (qName.equals("NotOr")) - startCondition(qName, new Or().not()); - else if (qName.equals("NotPresent")) - startCondition(qName, present(atts).not()); + case "NotPresent": + startCondition(qName, present(atts).not()); break; - case 'O': - if (qName.equals("Or")) - startCondition(qName, new Or()); + case "Or": + startCondition(qName, new Or()); break; - case 'P': - if (qName.equals("Present")) - startCondition(qName, present(atts)); + case "Present": + startCondition(qName, present(atts)); break; - case 'V': - if (qName.equals("Value")) - startValue(); + case "Value": + startValue(); break; } } @@ -525,11 +527,11 @@ private void startCode(String codeValue, String codingSchemeDesignator, String codingSchemeVersion, String codeMeaning) throws SAXException { - if (null == codeValue) + if (codeValue == null) throw new SAXException("missing codeValue attribute"); - if (null == codingSchemeDesignator) + if (codingSchemeDesignator == null) throw new SAXException("missing codingSchemeDesignator attribute"); - if (null == codeMeaning) + if (codeMeaning == null) throw new SAXException("missing codeMeaning attribute"); codes.add(new Code(codeValue, codingSchemeDesignator, codingSchemeVersion, codeMeaning)); @@ -538,46 +540,26 @@ private void startCode(String codeValue, @Override public void endElement(String uri, String localName, String qName) throws SAXException { - switch (qName.charAt(0)) { - case 'A': - if (qName.equals("And")) - endCondition(qName); + switch (qName) { + case "DataElement": + endDataElement(); break; - case 'D': - if (qName.equals("DataElement")) - endDataElement(); + case "Item": + endItem(); break; - case 'I': - if (qName.equals("If")) - endCondition(qName); - else if (qName.equals("Item")) - endItem(); + case "Value": + endValue(); break; - case 'M': - if (qName.equals("MemberOf")) - endCondition(qName); - break; - case 'N': - if (qName.equals("NotAnd")) - endCondition(qName); - else if (qName.equals("NotMemberOf")) - endCondition(qName); - else if (qName.equals("NotOr")) - endCondition(qName); - else if (qName.equals("NotPresent")) - endCondition(qName); - break; - case 'O': - if (qName.equals("Or")) - endCondition(qName); - break; - case 'P': - if (qName.equals("Present")) - endCondition(qName); - break; - case 'V': - if (qName.equals("Value")) - endValue(); + case "And": + case "If": + case "MemberOf": + case "NotAnd": + case "NotMemberOf": + case "NotOr": + case "NotPresent": + case "Or": + case "Present": + endCondition(qName); break; } processCharacters = false; @@ -585,8 +567,7 @@ else if (qName.equals("NotPresent")) } @Override - public void characters(char[] ch, int start, int length) - throws SAXException { + public void characters(char[] ch, int start, int length) { if (processCharacters) sb.append(ch, start, length); } @@ -594,9 +575,8 @@ public void characters(char[] ch, int start, int length) private void startDataElement(String tagStr, String vrStr, String typeStr, String vmStr, String items, String valueNumberStr) throws SAXException { - if (null != idref) { + if (idref != null) throw new SAXException(" with idref must be empty"); - } IOD iod = iodStack.getLast(); int tag = tagOf(tagStr); @@ -606,9 +586,9 @@ private void startDataElement(String tagStr, String vrStr, int minVM = -1; int maxVM = -1; String vm = vr == VR.SQ ? items : vmStr; - if (null != vm) { + if (vm != null) { try { - String[] ss = Material.split(vm, Symbol.C_MINUS); + String[] ss = Builder.split(vm, Symbol.C_MINUS); if (ss[0].charAt(0) != 'n') { minVM = Integer.parseInt(ss[0]); if (ss.length > 1) { @@ -627,16 +607,15 @@ private void startDataElement(String tagStr, String vrStr, } DataElement el = new DataElement(tag, vr, type, minVM, maxVM, valueNumberOf(valueNumberStr, 0)); - if (null != locator) { + if (locator != null) el.setLineNumber(locator.getLineNumber()); - } iod.add(el); elementConditions = true; itemConditions = false; } private DataElementType typeOf(String s) throws SAXException { - if (null == s) + if (s == null) throw new SAXException("missing type attribute"); try { return DataElementType.valueOf("TYPE_" + s); @@ -666,7 +645,7 @@ private int tagOf(String s) throws SAXException { } private int[] tagPathOf(String s) throws SAXException { - String[] ss = Material.split(s, Symbol.C_SLASH); + String[] ss = Builder.split(s, Symbol.C_SLASH); if (ss.length == 0) throw new SAXException("missing tag attribute"); @@ -685,14 +664,14 @@ private int[] tagPathOf(String s) throws SAXException { private int valueNumberOf(String s, int def) throws SAXException { try { - return null != s ? Integer.parseInt(s) : def; + return s != null ? Integer.parseInt(s) : def; } catch (IllegalArgumentException e) { throw new SAXException("invalid valueNumber=\"" + s + Symbol.C_DOUBLE_QUOTES); } } private boolean matchNotPresentOf(String s) { - return null != s && s.equalsIgnoreCase("true"); + return s != null && s.equalsIgnoreCase("true"); } @@ -743,24 +722,24 @@ private void endValue() { private void startItem(String id, String idref, String type) throws SAXException { IOD iod; - if (null != idref) { - if (null != type) + if (idref != null) { + if (type != null) throw new SAXException(" with idref must not specify type"); iod = id2iod.get(idref); - if (null == iod) + if (iod == null) throw new SAXException( "could not resolve "); } else { iod = new IOD(); - if (null != type) + if (type != null) iod.setType(typeOf(type)); - if (null != locator) + if (locator != null) iod.setLineNumber(locator.getLineNumber()); } getLastDataElement().addItemIOD(iod); iodStack.add(iod); - if (null != id) + if (id != null) id2iod.put(id, iod); this.idref = idref; @@ -778,16 +757,16 @@ private void startIf(String id, String idref) throws SAXException { throw new SAXException("unexpected "); Condition cond; - if (null != idref) { + if (idref != null) { cond = id2cond.get(idref); - if (null == cond) + if (cond == null) throw new SAXException( "could not resolve "); } else { cond = new And().id(id); } conditionStack.add(cond); - if (null != id) + if (id != null) id2cond.put(id, cond); this.idref = idref; } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Node.java b/bus-image/src/main/java/org/miaixz/bus/image/Node.java old mode 100755 new mode 100644 index 0ff6f202f4..8d25ffa62b --- a/bus-image/src/main/java/org/miaixz/bus/image/Node.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Node.java @@ -29,8 +29,6 @@ import lombok.Getter; import lombok.Setter; -import org.miaixz.bus.core.lang.Normal; -import org.miaixz.bus.core.net.Protocol; import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.image.metric.Association; import org.miaixz.bus.logger.Logger; @@ -52,7 +50,8 @@ public class Node { private final String aet; private final String hostname; private final Integer port; - private final boolean validate; + private final boolean validateHostname; + private final Long id; public Node(String aet) { this(aet, null, null); @@ -63,23 +62,28 @@ public Node(String aet, Integer port) { } public Node(String aet, String hostname, Integer port) { - this(aet, hostname, port, false); + this(null, aet, hostname, port, false); } - public Node(String aet, String hostname, Integer port, boolean validate) { + public Node(Long id, String aet, String hostname, Integer port) { + this(id, aet, hostname, port, false); + } + + public Node(Long id, String aet, String hostname, Integer port, boolean validateHostname) { if (!StringKit.hasText(aet)) { throw new IllegalArgumentException("Missing AETitle"); } - if (aet.length() > Normal._16) { + if (aet.length() > 16) { throw new IllegalArgumentException("AETitle has more than 16 characters"); } - if (null != port && (port < 1 || port > 65535)) { + if (port != null && (port < 1 || port > 65535)) { throw new IllegalArgumentException("Port is out of bound"); } - this.aet = aet; + this.id = id; + this.aet = aet.trim(); this.hostname = hostname; this.port = port; - this.validate = validate; + this.validateHostname = validateHostname; } public static String convertToIP(String hostname) { @@ -88,13 +92,13 @@ public static String convertToIP(String hostname) { } catch (UnknownHostException e) { Logger.error("Cannot resolve hostname", e); } - return StringKit.hasText(hostname) ? hostname : Protocol.HOST_IPV4; + return StringKit.hasText(hostname) ? hostname : "127.0.0.1"; } public static Node buildLocalDicomNode(Association as) { String ip = null; InetAddress address = as.getSocket().getLocalAddress(); - if (null != address) { + if (address != null) { ip = address.getHostAddress(); } return new Node(as.getLocalAET(), ip, as.getSocket().getLocalPort()); @@ -103,12 +107,32 @@ public static Node buildLocalDicomNode(Association as) { public static Node buildRemoteDicomNode(Association as) { String ip = null; InetAddress address = as.getSocket().getInetAddress(); - if (null != address) { + if (address != null) { ip = address.getHostAddress(); } return new Node(as.getRemoteAET(), ip, as.getSocket().getPort()); } + public Long getId() { + return id; + } + + public String getAet() { + return aet; + } + + public String getHostname() { + return hostname; + } + + public Integer getPort() { + return port; + } + + public boolean isValidateHostname() { + return validateHostname; + } + public boolean equalsHostname(String anotherHostname) { if (Objects.equals(hostname, anotherHostname)) { return true; @@ -119,11 +143,11 @@ public boolean equalsHostname(String anotherHostname) { @Override public boolean equals(Object o) { if (this == o) return true; - if (null == o || getClass() != o.getClass()) return false; + if (o == null || getClass() != o.getClass()) return false; Node node = (Node) o; - return aet.equals(node.aet) && - Objects.equals(hostname, node.hostname) && - Objects.equals(port, node.port); + return aet.equals(node.aet) + && Objects.equals(hostname, node.hostname) + && Objects.equals(port, node.port); } @Override @@ -133,13 +157,7 @@ public int hashCode() { @Override public String toString() { - StringBuilder buf = new StringBuilder("Host="); - buf.append(hostname); - buf.append(" AET="); - buf.append(aet); - buf.append(" Port="); - buf.append(port); - return buf.toString(); + return "Host=" + hostname + " AET=" + aet + " Port=" + port; } } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Option.java b/bus-image/src/main/java/org/miaixz/bus/image/Option.java old mode 100755 new mode 100644 index 199bd1ce47..9aabe7bbfb --- a/bus-image/src/main/java/org/miaixz/bus/image/Option.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Option.java @@ -27,49 +27,66 @@ */ package org.miaixz.bus.image; -import lombok.Getter; -import lombok.Setter; -import org.miaixz.bus.core.net.Protocol; +import lombok.Builder; +import lombok.*; import org.miaixz.bus.image.metric.Connection; -import org.miaixz.bus.image.metric.internal.pdu.ExtendedNegotiate; -import java.util.EnumSet; +import java.util.List; /** - * 服务请求选项 + * 请求可选项 * * @author Kimi Liu * @since Java 17+ */ @Getter @Setter +@Builder +@NoArgsConstructor +@AllArgsConstructor public class Option { /** * 此AE可以异步执行的最大操作数,无限制为0,而非异步为1 */ + @Builder.Default private int maxOpsInvoked = Connection.SYNCHRONOUS_MODE; + @Builder.Default private int maxOpsPerformed = Connection.SYNCHRONOUS_MODE; + @Builder.Default private int maxPdulenRcv = Connection.DEF_MAX_PDU_LENGTH; + @Builder.Default private int maxPdulenSnd = Connection.DEF_MAX_PDU_LENGTH; + @Builder.Default private boolean packPDV = true; + @Builder.Default private int backlog = Connection.DEF_BACKLOG; - private int connectTimeout = Connection.NO_TIMEOUT; - private int requestTimeout = Connection.NO_TIMEOUT; - private int acceptTimeout = Connection.NO_TIMEOUT; - private int releaseTimeout = Connection.NO_TIMEOUT; - private int responseTimeout = Connection.NO_TIMEOUT; - private int retrieveTimeout = Connection.NO_TIMEOUT; - private int idleTimeout = Connection.NO_TIMEOUT; + + private int connectTimeout; + private int requestTimeout; + private int acceptTimeout; + private int releaseTimeout; + private int responseTimeout; + private int retrieveTimeout; + private int idleTimeout; + @Builder.Default private int socloseDelay = Connection.DEF_SOCKETDELAY; - private int sosndBuffer = Connection.DEF_BUFFERSIZE; - private int sorcvBuffer = Connection.DEF_BUFFERSIZE; + private int sosndBuffer; + private int sorcvBuffer; + @Builder.Default private boolean tcpNoDelay = true; - private String[] cipherSuites; - private String[] tlsProtocols; + @Builder.Default + private List cipherSuites = List.of( + "SSL_RSA_WITH_NULL_SHA", + "TLS_RSA_WITH_AES_128_CBC_SHA", + "SSL_RSA_WITH_3DES_EDE_CBC_SHA" + ); + @Builder.Default + private List tlsProtocols = List.of( + "TLSv1", "SSLv3" + ); private boolean tlsNeedClientAuth; - private String keystoreURL; private String keystoreType; private String keystorePass; @@ -78,77 +95,4 @@ public class Option { private String truststoreType; private String truststorePass; - public Option() { - - } - - public Option(boolean tlsNeedClientAuth, String keystoreURL, String keystoreType, String keystorePass, String keyPass, String truststoreURL, String truststoreType, String truststorePass) { - this( - new String[]{ - "SSL_RSA_WITH_NULL_SHA", - "TLS_RSA_WITH_AES_128_CBC_SHA", - "SSL_RSA_WITH_3DES_EDE_CBC_SHA" - }, - new String[]{ - Protocol.TLSv1.name, - Protocol.SSLv3.name - }, - tlsNeedClientAuth, - keystoreURL, - keystoreType, - keystorePass, - keyPass, - truststoreURL, - truststoreType, - truststorePass - ); - } - - public Option(String[] cipherSuites, String[] tlsProtocols, boolean tlsNeedClientAuth, String keystoreURL, String keystoreType, String keystorePass, String keyPass, String truststoreURL, String truststoreType, String truststorePass) { - if (null == cipherSuites) { - throw new IllegalArgumentException("cipherSuites cannot be null"); - } - this.cipherSuites = cipherSuites; - this.tlsProtocols = tlsProtocols; - this.tlsNeedClientAuth = tlsNeedClientAuth; - this.keystoreURL = keystoreURL; - this.keystoreType = keystoreType; - this.keystorePass = keystorePass; - this.keyPass = keyPass; - this.truststoreURL = truststoreURL; - this.truststoreType = truststoreType; - this.truststorePass = truststorePass; - } - - public enum Type { - - RELATIONAL, - DATETIME, - FUZZY, - TIMEZONE; - - public static byte[] toExtendedNegotiationInformation(EnumSet opts) { - byte[] info = new byte[opts.contains(TIMEZONE) ? 4 : opts.contains(FUZZY) || opts.contains(DATETIME) ? 3 : 1]; - for (Type query : opts) - info[query.ordinal()] = 1; - return info; - } - - public static EnumSet toOptions(ExtendedNegotiate extNeg) { - EnumSet opts = EnumSet.noneOf(Type.class); - if (null != extNeg) { - toOption(extNeg, Type.RELATIONAL, opts); - toOption(extNeg, Type.DATETIME, opts); - toOption(extNeg, Type.FUZZY, opts); - toOption(extNeg, Type.TIMEZONE, opts); - } - return opts; - } - - private static void toOption(ExtendedNegotiate extNeg, Type opt, EnumSet opts) { - if (extNeg.getField(opt.ordinal(), (byte) 0) == 1) opts.add(opt); - } - - } - } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Status.java b/bus-image/src/main/java/org/miaixz/bus/image/Status.java old mode 100755 new mode 100644 index 4615ed81ef..ea424b0f89 --- a/bus-image/src/main/java/org/miaixz/bus/image/Status.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Status.java @@ -27,24 +27,22 @@ */ package org.miaixz.bus.image; -import lombok.Getter; -import lombok.Setter; import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.xyz.StringKit; +import org.miaixz.bus.image.galaxy.ImageParam; +import org.miaixz.bus.image.galaxy.ImageProgress; import org.miaixz.bus.image.galaxy.data.Attributes; -import org.miaixz.bus.image.metric.Progress; +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.ZoneId; import java.util.ArrayList; import java.util.List; /** - * 相关处理状态 - * * @author Kimi Liu * @since Java 17+ */ -@Getter -@Setter public class Status { public static final int Success = 0x0000; @@ -55,191 +53,214 @@ public class Status { public static final int Cancel = 0xFE00; /** - * 失败:无此类属性(105H): 无法识别指定属性的标签 - * 在N-SET-RSP,N-CREATE-RSP中使用 可能包含:属性标识符列表(0000,1005) + * Failure: no such attribute (105H): the Tag for the specified Attribute + * was not recognized. + * Used in N-SET-RSP, N-CREATE-RSP. + * May contain: + * Attribute Identifier List (0000,1005) */ public static final int NoSuchAttribute = 0x0105; /** - * 失败:属性值无效(106H): 指定的属性值超出范围或不合适 - * 在N-SET-RSP,N-CREATE-RSP中使用 - * 可能包含:修改列表/属性列表(无标签) + * Failure: invalid attribute value (106H): the Attribute Value specified + * was out of range or otherwise inappropriate. + * Used in N-SET-RSP, N-CREATE-RSP. + * May contain: + * Modification List/Attribute List (no tag) */ public static final int InvalidAttributeValue = 0x0106; /** - * 警告:属性列表错误(107H): 由于无法识别指定的属性 - * 因此未读取/修改/创建一个或多个属性值 - * 在N-GET-RSP,N-SET-RSP,N-CREATE-RSP 中使用可能包含: - * 受影响的SOP类UID(0000,0002) - * 受影响的SOP实例UID(0000,1000) - * 属性标识符列表(0000,1005) + * Warning: attribute list error (107H): one or more Attribute Values were + * not read/modified/created because the specified Attribute was not recognized. + * Used in N-GET-RSP, N-SET-RSP, N-CREATE-RSP + * May contain: + * Affected SOP Class UID (0000,0002) + * Affected SOP Instance UID (0000,1000) + * Attribute Identifier List (0000,1005) */ public static final int AttributeListError = 0x0107; /** - * 失败:处理失败(110H): 在处理操作时遇到一般失败 - * 用于N-EVENT-REPORT-RSP,N-GET-RSP,N-SET-RSP,N-ACTION-RSP,N-CREATE-RSP,N-DELETE-RSP - * 可能包含: - * 受影响的SOP类UID(0000,0002) - * 错误注释(0000,0902) - * 错误ID(0000,0903) - * 受影响的SOP实例UID(0000,1000) + * Failure: processing failure (110H): a general failure in processing the + * operation was encountered. + * Used in N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, N-ACTION-RSP, + * N-CREATE-RSP, N-DELETE-RSP. + * May contain: + * Affected SOP Class UID (0000,0002) + * Error Comment (0000,0902) + * Error ID (0000,0903) + * Affected SOP Instance UID (0000,1000) */ public static final int ProcessingFailure = 0x0110; /** - * 失败:重复的SOP实例(111H): - * 由调用DIMSE-service-user提供的新的托管SOP实例值已经为指定SOP类的托管SOP实例注册 - * 在N-CREATE-RSP中使用可能包含: - * 受影响的SOP实例UID(0000,1000) + * Failure: duplicate SOP Instance (111H): the new managed SOP Instance + * Value supplied by the invoking DIMSE-service-user was already registered + * for a managed SOP Instance of the specified SOP Class. + * Used in N-CREATE-RSP. + * May contain: + * Affected SOP Instance UID (0000,1000) */ public static final int DuplicateSOPinstance = 0x0111; /** - * 失败:没有这样的SOP实例(112H):无法识别SOP实例 - * 用于N-EVENT-REPORT-RSP,N-SET-RSP,N-ACTION-RSP,N-DELETE-RSP - * 可能包含:受影响的SOP实例UID(0000,1000) + * Failure: no such SOP Instance (112H): the SOP Instance was not recognized. + * Used in N-EVENT-REPORT-RSP, N-SET-RSP, N-ACTION-RSP, N-DELETE-RSP. + * May contain: + * Affected SOP Instance UID (0000,1000) */ public static final int NoSuchObjectInstance = 0x0112; /** - * 失败:没有这样的事件类型(113H):指定的事件类型无法识别 - * 用于N-EVENT-REPORT-RSP - * 可能包含: - * 受影响的SOP类UID(0000,0002) - * 事件类型ID (0000,1002) + * Failure: no such event type (113H): the event type specified was not + * recognized. + * Used in N-EVENT-REPORT-RSP. + * May contain: + * Affected SOP Class UID (0000,0002) + * Event Type ID (0000,1002) */ public static final int NoSuchEventType = 0x0113; /** - * 失败:没有这样的参数(114H): 指定的事件/动作信息 - * 没有得到认可/支持 - * 用于n事件-报告- rsp, n行动- rsp - * 可能包含: - * 受影响的SOP类UID (0000,0002) - * 事件类型ID (0000,1002) - * 动作类型ID (0000,1008) + * Failure: no such argument (114H): the event/action information specified + * was not recognized/supported. + * Used in N-EVENT-REPORT-RSP, N-ACTION-RSP. + * May contain: + * Affected SOP Class UID (0000,0002) + * Event Type ID (0000,1002) + * Action Type ID (0000,1008) */ public static final int NoSuchArgument = 0x0114; /** - * 失败:无效参数值(115H): 事件/动作信息 - * 指定的值超出范围或不合适 - * 用于n事件-报告- rsp, n行动- rsp - * 可能包含: - * 受影响的SOP类UID (0000,0002) - * 受影响的SOP实例UID (0000,1000) - * 事件类型ID (0000,1002) - * 事件信息(无标签) - * 动作类型ID (0000,1008) - * 动作信息(无标签) + * Failure: invalid argument value (115H): the event/action information + * value specified was out of range or otherwise inappropriate. + * Used in N-EVENT-REPORT-RSP, N-ACTION-RSP. + * May contain: + * Affected SOP Class UID (0000,0002) + * Affected SOP Instance UID (0000,1000) + * Event Type ID (0000,1002) + * Event Information (no tag) + * Action Type ID (0000,1008) + * Action Information (no tag) */ public static final int InvalidArgumentValue = 0x0115; /** - * 警告:属性值超出范围(116H):属性值 - * 指定超出范围或不合适 - * 用于N-SET-RSP, N-CREATE-RSP - * 可能包含: - * 修改列表/属性列表 + * Warning: attribute value out of range (116H): the Attribute Value + * specified was out of range or otherwise inappropriate. + * Used in N-SET-RSP, N-CREATE-RSP. + * May contain: + * Modification List/Attribute List */ public static final int AttributeValueOutOfRange = 0x0116; /** - * 失败:无效的SOP实例(117H): 指定的SOP实例UID暗示违反了UID构造规则 - * 用于N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, N-ACTION-RSP, - * N-CREATE-RSP N-DELETE-RSP - * 可能包含:受影响的SOP实例UID (0000,1000) + * Failure: invalid SOP Instance (117H): the SOP Instance UID specified + * implied a violation of the UID construction rules. + * Used in N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, N-ACTION-RSP, + * N-CREATE-RSP, N-DELETE-RSP. + * May contain: + * Affected SOP Instance UID (0000,1000) */ public static final int InvalidObjectInstance = 0x0117; /** - * 失败:没有SOP类(118H): SOP类不被认可 - * 用于N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, N-ACTION-RSP, - * N-CREATE-RSP N-DELETE-RSP - * 可能包含: - * 受影响的SOP类UID (0000,0002) + * Failure: no such SOP class (118H): the SOP Class was not recognized. + * Used in N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, N-ACTION-RSP, + * N-CREATE-RSP, N-DELETE-RSP. + * May contain: + * Affected SOP Class UID (0000,0002) */ public static final int NoSuchSOPclass = 0x0118; /** - * 失败:类实例冲突(119H):指定的SOP实例为不是指定SOP类的成员 - * 用于N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, N-ACTION-RSP, - * N-DELETE-RSP - * 可能包含: - * 受影响的SOP类UID (0000,0002) - * 受影响的SOP实例UID (0000,1000) + * Failure: class-instance conflict (119H): the specified SOP Instance is + * not a member of the specified SOP class. + * Used in N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, N-ACTION-RSP, + * N-DELETE-RSP. + * May contain: + * Affected SOP Class UID (0000,0002) + * Affected SOP Instance UID (0000,1000) */ public static final int ClassInstanceConflict = 0x0119; /** - * 失败:缺少属性(120H):没有提供必需的属性 - * 用于N-CREATE-RSP - * 可能包含: - * 修改列表/属性列表(无标签) + * Failure: missing Attribute (120H): a required Attribute was not + * supplied. + * Used in N-CREATE-RSP. + * May contain: + * Modification List/Attribute List (no tag) */ public static final int MissingAttribute = 0x0120; /** - * 失败:缺少属性值(121H):没有提供所需的属性值,默认值不可用 - * 用于N-SET-RSP, N-CREATE-RSP - * 可能包含: - * 属性标识符列表(0000,1005) + * Failure: missing Attribute Value (121H): a required Attribute Value was + * not supplied and a default value was not available. + * Used in N-SET-RSP, N-CREATE-RSP. + * May contain: + * Attribute Identifier List (0000,1005) */ public static final int MissingAttributeValue = 0x0121; /** - * 拒绝:不支持SOP类(112H) - * 用于C-STORE-RSP, C-FIND-RSP, C-GET-RSP, C-MOVE-RSP - * 可能包含: - * 受影响的SOP类UID (0000,0002) + * Refused: SOP Class Not Supported (112H). + * Used in C-STORE-RSP, C-FIND-RSP, C-GET-RSP, C-MOVE-RSP. + * May contain: + * Affected SOP Class UID (0000,0002) */ public static final int SOPclassNotSupported = 0x0122; /** - * 失败:没有这样的动作类型(123H):不支持指定的动作类型 - * 用于N-ACTION-RSP - * 可能包含: - * 受影响的SOP类UID (0000,0002) - * 动作类型ID (0000,1008) + * Failure: no such action type (123H): the action type specified was not + * supported. + * Used in N-ACTION-RSP. + * May contain: + * Affected SOP Class UID (0000,0002) + * Action Type ID (0000,1008) */ public static final int NoSuchActionType = 0x0123; /** - * 拒绝:未授权(124H): dimse -service用户未被授权调用操作 - * 用于C-STORE-RSP, C-FIND-RSP, C-GET-RSP, C-MOVE-RSP, N-GET-RSP, - * N-SET-RSP, N-ACTION-RSP, N-CREATE-RSP, -DELETE-RSP - * 可能包含: - * 错误注释(0000,0902) + * Refused: not authorized (124H): the DIMSE-service-user was not + * authorized to invoke the operation. + * Used in C-STORE-RSP, C-FIND-RSP, C-GET-RSP, C-MOVE-RSP, N-GET-RSP, + * N-SET-RSP, N-ACTION-RSP, N-CREATE-RSP, -DELETE-RSP. + * May contain: + * Error Comment (0000,0902) */ public static final int NotAuthorized = 0x0124; /** - * 失败:重复调用(210H):消息ID (0000,0110)指定的是分配给另一个通知或操作 - * 用于C-STORE-RSP, C-FIND-RSP, C-GET-RSP, C-MOVE-RSP, c - echoc - rsp, - * N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, N-ACTION-RSP, N-CREATE-RSP, - * N-DELETE-RSP + * Failure: duplicate invocation (210H): the Message ID (0000,0110) + * specified is allocated to another notification or operation. + * Used in C-STORE-RSP, C-FIND-RSP, C-GET-RSP, C-MOVE-RSP, C-ECHO-RSP, + * N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, N-ACTION-RSP, N-CREATE-RSP, + * N-DELETE-RSP. */ public static final int DuplicateInvocation = 0x0210; /** - * 故障:无法识别的操作(211H):该操作不是dimse -service用户之间约定的操作之一 - * 用于C-STORE-RSP, C-FIND-RSP, C-GET-RSP, C-MOVE-RSP, - * c - echoe - rsp, N-EVENT-REPORT-RSP, -GET-RSP, N-SET-RSP, - * N-ACTION-RSP, N-CREATE-RSP, N-DELETE-RSP + * Failure: unrecognized operation (211H): the operation is not one of + * those agreed between the DIMSE-service-users. + * Used in C-STORE-RSP, C-FIND-RSP, C-GET-RSP, C-MOVE-RSP, C-ECHO-RSP, + * N-EVENT-REPORT-RSP, -GET-RSP, N-SET-RSP, N-ACTION-RSP, N-CREATE-RSP, + * N-DELETE-RSP. */ public static final int UnrecognizedOperation = 0x0211; /** - * 失败:参数输入错误(212H):所提供的参数之一未被同意用于dimse -service用户之间的关联 - * 用于N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, - * N-ACTION-RSP, N-CREATE-RSP, N-DELETE-RSP + * Failure: mistyped argument (212H): one of the parameters supplied has + * not been agreed for use on the Association between the DIMSE-service-users. + * Used in N-EVENT-REPORT-RSP, N-GET-RSP, N-SET-RSP, N-ACTION-RSP, + * N-CREATE-RSP, N-DELETE-RSP. */ public static final int MistypedArgument = 0x0212; /** - * 失败:资源限制(213H):由于资源限制,没有执行操作 + * Failure: resource limitation (213H): the operation was not performed due + * to resource limitation. */ public static final int ResourceLimitation = 0x0213; @@ -258,82 +279,121 @@ public class Status { public static final int UnableToProcess = 0xC000; public static final int CannotUnderstand = 0xC000; - private final Progress progress; - private final List list; + public static final int UPSCreatedWithModifications = 0xB300; + public static final int UPSDeletionLockNotGranted = 0xB301; + public static final int UPSAlreadyInRequestedStateOfCanceled = 0xB304; + public static final int UPSCoercedInvalidValuesToValidValues = 0xB305; + public static final int UPSAlreadyInRequestedStateOfCompleted = 0xB306; + + public static final int UPSMayNoLongerBeUpdated = 0xC300; + public static final int UPSTransactionUIDNotCorrect = 0xC301; + public static final int UPSAlreadyInProgress = 0xC302; + public static final int UPSStateMayNotChangedToScheduled = 0xC303; + public static final int UPSNotMetFinalStateRequirements = 0xC304; + public static final int UPSDoesNotExist = 0xC307; + public static final int UPSUnknownReceivingAET = 0xC308; + public static final int UPSNotScheduled = 0xC309; + public static final int UPSNotYetInProgress = 0xC310; + public static final int UPSAlreadyCompleted = 0xC311; + public static final int UPSPerformerCannotBeContacted = 0xC312; + public static final int UPSPerformerChoosesNotToCancel = 0xC313; + public static final int UPSActionNotAppropriate = 0xC314; + public static final int UPSDoesNotSupportEventReports = 0xC315; + + private final List dicomRSP; + private final ImageProgress progress; + private final List dicomMatchingKeys; + private volatile int status; private String message; + private String errorMessage; + private LocalDateTime startConnectionDateTime; + private LocalDateTime startTransferDateTime; + private LocalDateTime endTransferDateTime; + private long bytesSize; public Status() { - this(Pending, null, null); + this(Status.Pending, null, null); } - public Status(Progress progress) { - this(Pending, null, progress); + public Status(ImageProgress progress) { + this(Status.Pending, null, progress); } - public Status(int status, String message, Progress progress) { + public Status(int status, String message, ImageProgress progress) { this.status = status; this.message = message; this.progress = progress; - this.list = new ArrayList<>(); + this.dicomRSP = new ArrayList<>(); + this.dicomMatchingKeys = new ArrayList<>(); + this.bytesSize = -1; } - public static Status build(Status dcmState, String timeMessage, Exception e) { + public static boolean isPending(int status) { + return (status & Pending) == Pending; + } + + public static Status buildMessage(Status dcmState, String timeMessage, Exception e) { Status state = dcmState; - if (null == state) { + if (state == null) { state = new Status(Status.UnableToProcess, null, null); } - Progress p = state.getProgress(); + ImageProgress p = state.getProgress(); int s = state.getStatus(); StringBuilder msg = new StringBuilder(); boolean hasFailed = false; - if (null != p) { + if (p != null) { int failed = p.getNumberOfFailedSuboperations(); int warning = p.getNumberOfWarningSuboperations(); int remaining = p.getNumberOfRemainingSuboperations(); if (failed > 0) { hasFailed = true; - msg.append(String.format("%d/%d operations has failed.", failed, - failed + p.getNumberOfCompletedSuboperations())); + msg.append( + String.format( + "%d/%d operations has failed.", + failed, failed + p.getNumberOfCompletedSuboperations())); } else if (remaining > 0) { msg.append(String.format("%d operations remains. ", remaining)); } else if (warning > 0) { msg.append(String.format("%d operations has a warning status. ", warning)); } } - if (null != e) { + if (e != null) { hasFailed = true; if (msg.length() > 0) { - msg.append(Symbol.SPACE); + msg.append(" "); } - msg.append(e.getLocalizedMessage()); + msg.append(e.getMessage()); + state.setErrorMessage(e.getMessage()); } - if (null != p && null != p.getAttributes()) { + if (p != null && p.getAttributes() != null) { String error = p.getErrorComment(); if (StringKit.hasText(error)) { hasFailed = true; if (msg.length() > 0) { - msg.append(Symbol.LF); + msg.append("\n"); } - msg.append("DICOM error : "); + msg.append("DICOM error"); + msg.append(Symbol.COLON + Symbol.SPACE); msg.append(error); } if (!Status.isPending(s) && s != -1 && s != Status.Success && s != Status.Cancel) { if (msg.length() > 0) { - msg.append(Symbol.LF); + msg.append("\n"); } - msg.append("DICOM status : "); + msg.append("DICOM status"); + msg.append(Symbol.COLON + Symbol.SPACE); msg.append(s); } } if (!hasFailed) { - if (null != timeMessage) { + if (timeMessage != null) { msg.append(timeMessage); } } else { @@ -345,20 +405,113 @@ public static Status build(Status dcmState, String timeMessage, Exception e) { return state; } - public static boolean isPending(int status) { - return (status & Pending) == Pending; - } - + /** + * Get the DICOM status + * + * @return the DICOM status of the process + */ public int getStatus() { - if (null != progress && null != progress.getAttributes()) { + if (progress != null && progress.getAttributes() != null) { return progress.getStatus(); } return status; } - public void setList(Attributes attributes) { - if (null != attributes) { - this.list.add(attributes); + /** + * Set the DICOM status + * + * @param status DICOM status of the process + */ + public void setStatus(int status) { + this.status = status; + } + + public synchronized String getMessage() { + return message; + } + + public synchronized void setMessage(String message) { + this.message = message; + } + + public ImageProgress getProgress() { + return progress; + } + + public List getDicomRSP() { + return dicomRSP; + } + + public List getDicomMatchingKeys() { + return dicomMatchingKeys; + } + + public LocalDateTime getStartTransferDateTime() { + return startTransferDateTime; + } + + public void setStartTransferDateTime(LocalDateTime startTransferDateTime) { + this.startTransferDateTime = startTransferDateTime; + } + + public LocalDateTime getEndTransferDateTime() { + return endTransferDateTime; + } + + public void setEndTransferDateTime(LocalDateTime endTransferDateTime) { + this.endTransferDateTime = endTransferDateTime; + } + + public LocalDateTime getStartConnectionDateTime() { + return startConnectionDateTime; + } + + public void setStartConnectionDateTime(LocalDateTime startConnectionDateTime) { + this.startConnectionDateTime = startConnectionDateTime; + } + + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public long getBytesSize() { + return bytesSize; + } + + public void setBytesSize(long bytesSize) { + this.bytesSize = bytesSize; + } + + public void addDicomRSP(Attributes dicomRSP) { + this.dicomRSP.add(dicomRSP); + } + + public void addDicomMatchingKeys(ImageParam param) { + this.dicomMatchingKeys.add(param); + } + + public void addProcessTime(long startTimeStamp, long endTimeStamp) { + addProcessTime(0, startTimeStamp, endTimeStamp); + } + + public void addProcessTime(long connectionTimeStamp, long startTimeStamp, long endTimeStamp) { + if (connectionTimeStamp > 0) { + setStartConnectionDateTime( + Instant.ofEpochMilli(connectionTimeStamp) + .atZone(ZoneId.systemDefault()) + .toLocalDateTime()); + } + if (startTimeStamp > 0) { + setStartTransferDateTime( + Instant.ofEpochMilli(startTimeStamp).atZone(ZoneId.systemDefault()).toLocalDateTime()); + } + if (endTimeStamp > 0) { + setEndTransferDateTime( + Instant.ofEpochMilli(endTimeStamp).atZone(ZoneId.systemDefault()).toLocalDateTime()); } } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/Tag.java b/bus-image/src/main/java/org/miaixz/bus/image/Tag.java old mode 100755 new mode 100644 index f9db98ee22..38626faa20 --- a/bus-image/src/main/java/org/miaixz/bus/image/Tag.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/Tag.java @@ -27,13 +27,9 @@ */ package org.miaixz.bus.image; -import org.miaixz.bus.core.lang.Normal; -import org.miaixz.bus.core.lang.Symbol; -import org.miaixz.bus.image.galaxy.Material; +import org.miaixz.bus.image.galaxy.data.ElementDictionary; /** - * 文件信息标识 - * * @author Kimi Liu * @since Java 17+ */ @@ -43,7 +39,7 @@ public class Tag { public static final int CommandLengthToEnd = 1; public static final int AffectedSOPClassUID = 2; public static final int RequestedSOPClassUID = 3; - public static final int CommandRecognitionCode = Normal._16; + public static final int CommandRecognitionCode = 16; public static final int CommandField = 256; public static final int MessageID = 272; public static final int MessageIDBeingRespondedTo = 288; @@ -95,6 +91,16 @@ public class Tag { public static final int SourceApplicationEntityTitle = 131094; public static final int SendingApplicationEntityTitle = 131095; public static final int ReceivingApplicationEntityTitle = 131096; + public static final int SourcePresentationAddress = 131110; + public static final int SendingPresentationAddress = 131111; + public static final int ReceivingPresentationAddress = 131112; + public static final int RTVMetaInformationVersion = 131121; + public static final int RTVCommunicationSOPClassUID = 131122; + public static final int RTVCommunicationSOPInstanceUID = 131123; + public static final int RTVSourceIdentifier = 131125; + public static final int RTVFlowIdentifier = 131126; + public static final int RTVFlowRTPSamplingRate = 131127; + public static final int RTVFlowActualFrameDuration = 131128; public static final int PrivateInformationCreatorUID = 131328; public static final int PrivateInformation = 131330; public static final int FileSetID = 266544; @@ -126,9 +132,12 @@ public class Tag { public static final int InstanceCreatorUID = 524308; public static final int InstanceCoercionDateTime = 524309; public static final int SOPClassUID = 524310; + public static final int AcquisitionUID = 524311; public static final int SOPInstanceUID = 524312; + public static final int PyramidUID = 524313; public static final int RelatedGeneralSOPClassUID = 524314; public static final int OriginalSpecializedSOPClassUID = 524315; + public static final int SyntheticData = 524316; public static final int StudyDate = 524320; public static final int SeriesDate = 524321; public static final int AcquisitionDate = 524322; @@ -219,6 +228,48 @@ public class Tag { public static final int PrivateDataElementDescription = 525070; public static final int PrivateDataElementEncoding = 525071; public static final int PrivateDataElementDefinitionSequence = 525072; + public static final int ScopeOfInventorySequence = 525312; + public static final int InventoryPurpose = 525313; + public static final int InventoryInstanceDescription = 525314; + public static final int InventoryLevel = 525315; + public static final int ItemInventoryDateTime = 525316; + public static final int RemovedFromOperationalUse = 525317; + public static final int ReasonForRemovalCodeSequence = 525318; + public static final int StoredInstanceBaseURI = 525319; + public static final int FolderAccessURI = 525320; + public static final int FileAccessURI = 525321; + public static final int ContainerFileType = 525322; + public static final int FilenameInContainer = 525323; + public static final int FileOffsetInContainer = 525324; + public static final int FileLengthInContainer = 525325; + public static final int StoredInstanceTransferSyntaxUID = 525326; + public static final int ExtendedMatchingMechanisms = 525327; + public static final int RangeMatchingSequence = 525328; + public static final int ListOfUIDMatchingSequence = 525329; + public static final int EmptyValueMatchingSequence = 525330; + public static final int GeneralMatchingSequence = 525331; + public static final int RequestedStatusInterval = 525332; + public static final int RetainInstances = 525333; + public static final int ExpirationDateTime = 525334; + public static final int TransactionStatus = 525335; + public static final int TransactionStatusComment = 525336; + public static final int FileSetAccessSequence = 525337; + public static final int FileAccessSequence = 525338; + public static final int RecordKey = 525339; + public static final int PriorRecordKey = 525340; + public static final int MetadataSequence = 525341; + public static final int UpdatedMetadataSequence = 525342; + public static final int StudyUpdateDateTime = 525343; + public static final int InventoryAccessEndPointsSequence = 525344; + public static final int StudyAccessEndPointsSequence = 525345; + public static final int IncorporatedInventoryInstanceSequence = 525346; + public static final int InventoriedStudiesSequence = 525347; + public static final int InventoriedSeriesSequence = 525348; + public static final int InventoriedInstancesSequence = 525349; + public static final int InventoryCompletionStatus = 525350; + public static final int NumberOfStudyRecordsInInstance = 525351; + public static final int TotalNumberOfStudyRecords = 525352; + public static final int MaximumNumberOfRecords = 525353; public static final int NetworkID = 528384; public static final int StationName = 528400; public static final int StudyDescription = 528432; @@ -237,10 +288,12 @@ public class Tag { public static final int OperatorIdentificationSequence = 528498; public static final int AdmittingDiagnosesDescription = 528512; public static final int AdmittingDiagnosesCodeSequence = 528516; + public static final int PyramidDescription = 528520; public static final int ManufacturerModelName = 528528; public static final int ReferencedResultsSequence = 528640; public static final int ReferencedStudySequence = 528656; public static final int ReferencedPerformedProcedureStepSequence = 528657; + public static final int ReferencedInstancesBySOPClassSequence = 528658; public static final int ReferencedSeriesSequence = 528661; public static final int ReferencedPatientSequence = 528672; public static final int ReferencedVisitSequence = 528677; @@ -268,6 +321,7 @@ public class Tag { public static final int FailedSOPSequence = 528792; public static final int ReferencedSOPSequence = 528793; public static final int OtherFailuresSequence = 528794; + public static final int FailedStudySequence = 528795; public static final int StudiesContainingOtherReferencedInstancesSequence = 528896; public static final int RelatedSeriesSequence = 528976; public static final int LossyImageCompressionRetired = 532752; @@ -310,6 +364,7 @@ public class Tag { public static final int AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial = 533082; public static final int OnAxisBackgroundAnatomicStructureCodeSequenceTrial = 533084; public static final int AlternateRepresentationSequence = 536577; + public static final int AvailableTransferSyntaxUID = 536578; public static final int IrradiationEventUID = 536592; public static final int SourceIrradiationEventSequence = 536593; public static final int RadiopharmaceuticalAdministrationEventUID = 536594; @@ -410,20 +465,28 @@ public class Tag { public static final int ClinicalTrialSponsorName = 1179664; public static final int ClinicalTrialProtocolID = 1179680; public static final int ClinicalTrialProtocolName = 1179681; + public static final int IssuerOfClinicalTrialProtocolID = 1179682; + public static final int OtherClinicalTrialProtocolIDsSequence = 1179683; public static final int ClinicalTrialSiteID = 1179696; public static final int ClinicalTrialSiteName = 1179697; + public static final int IssuerOfClinicalTrialSiteID = 1179698; public static final int ClinicalTrialSubjectID = 1179712; + public static final int IssuerOfClinicalTrialSubjectID = 1179713; public static final int ClinicalTrialSubjectReadingID = 1179714; + public static final int IssuerOfClinicalTrialSubjectReadingID = 1179715; public static final int ClinicalTrialTimePointID = 1179728; public static final int ClinicalTrialTimePointDescription = 1179729; public static final int LongitudinalTemporalOffsetFromEvent = 1179730; public static final int LongitudinalTemporalEventType = 1179731; + public static final int ClinicalTrialTimePointTypeCodeSequence = 1179732; + public static final int IssuerOfClinicalTrialTimePointID = 1179733; public static final int ClinicalTrialCoordinatingCenterName = 1179744; public static final int PatientIdentityRemoved = 1179746; public static final int DeidentificationMethod = 1179747; public static final int DeidentificationMethodCodeSequence = 1179748; public static final int ClinicalTrialSeriesID = 1179761; public static final int ClinicalTrialSeriesDescription = 1179762; + public static final int IssuerOfClinicalTrialSeriesID = 1179763; public static final int ClinicalTrialProtocolEthicsCommitteeName = 1179777; public static final int ClinicalTrialProtocolEthicsCommitteeApprovalNumber = 1179778; public static final int ConsentForClinicalTrialUseSequence = 1179779; @@ -455,6 +518,14 @@ public class Tag { public static final int MultipleComponentApprovalSequence = 1310982; public static final int OtherApprovalStatus = 1310983; public static final int OtherSecondaryApprovalStatus = 1310984; + public static final int DataElementLabelSequence = 1311232; + public static final int DataElementLabelItemSequence = 1311233; + public static final int DataElement = 1311234; + public static final int DataElementName = 1311235; + public static final int DataElementDescription = 1311236; + public static final int DataElementConditionality = 1311237; + public static final int DataElementMinimumCharacters = 1311238; + public static final int DataElementMaximumCharacters = 1311239; public static final int ActualEnvironmentalConditions = 1314832; public static final int ExpiryDate = 1314848; public static final int EnvironmentalConditions = 1314880; @@ -506,6 +577,8 @@ public class Tag { public static final int TimeOfGainCalibration = 1323127; public static final int BadPixelImage = 1323136; public static final int CalibrationNotes = 1323161; + public static final int LinearityCorrectionTechnique = 1323264; + public static final int BeamHardeningCorrectionTechnique = 1323265; public static final int PulserEquipmentSequence = 1327106; public static final int PulserType = 1327108; public static final int PulserNotes = 1327110; @@ -728,6 +801,11 @@ public class Tag { public static final int GPSAreaInformation = 1441932; public static final int GPSDateStamp = 1441933; public static final int GPSDifferential = 1441934; + public static final int LightSourcePolarization = 1445889; + public static final int EmitterColorTemperature = 1445890; + public static final int ContactMethod = 1445891; + public static final int ImmersionMedia = 1445892; + public static final int OpticalMagnificationFactor = 1445893; public static final int ContrastBolusAgent = 1572880; public static final int ContrastBolusAgentSequence = 1572882; public static final int ContrastBolusT1Relaxivity = 1572883; @@ -790,6 +868,7 @@ public class Tag { public static final int GantryID = 1576968; public static final int UniqueDeviceIdentifier = 1576969; public static final int UDISequence = 1576970; + public static final int ManufacturerDeviceClassUID = 1576971; public static final int SecondaryCaptureDeviceID = 1576976; public static final int HardcopyCreationDeviceID = 1576977; public static final int DateOfSecondaryCapture = 1576978; @@ -898,9 +977,30 @@ public class Tag { public static final int CompressionPressure = 1577379; public static final int PaddleDescription = 1577380; public static final int CompressionContactArea = 1577381; + public static final int AcquisitionMode = 1577392; + public static final int DoseModeName = 1577393; + public static final int AcquiredSubtractionMaskFlag = 1577394; + public static final int FluoroscopyPersistenceFlag = 1577395; + public static final int FluoroscopyLastImageHoldPersistenceFlag = 1577396; + public static final int UpperLimitNumberOfPersistentFluoroscopyFrames = 1577397; + public static final int ContrastBolusAutoInjectionTriggerFlag = 1577398; + public static final int ContrastBolusInjectionDelay = 1577399; + public static final int XAAcquisitionPhaseDetailsSequence = 1577400; + public static final int XAAcquisitionFrameRate = 1577401; + public static final int XAPlaneDetailsSequence = 1577402; + public static final int AcquisitionFieldOfViewLabel = 1577403; + public static final int XRayFilterDetailsSequence = 1577404; + public static final int XAAcquisitionDuration = 1577405; + public static final int ReconstructionPipelineType = 1577406; + public static final int ImageFilterDetailsSequence = 1577407; + public static final int AppliedMaskSubtractionFlag = 1577408; + public static final int RequestedSeriesDescriptionCodeSequence = 1577409; public static final int DateOfLastCalibration = 1577472; public static final int TimeOfLastCalibration = 1577473; public static final int DateTimeOfLastCalibration = 1577474; + public static final int CalibrationDateTime = 1577475; + public static final int DateOfManufacture = 1577476; + public static final int DateOfInstallation = 1577477; public static final int ConvolutionKernel = 1577488; public static final int UpperLowerPixelValues = 1577536; public static final int ActualFrameDuration = 1577538; @@ -957,6 +1057,15 @@ public class Tag { public static final int ShutterPresentationValue = 1578530; public static final int ShutterOverlayGroup = 1578531; public static final int ShutterPresentationColorCIELabValue = 1578532; + public static final int OutlineShapeType = 1578544; + public static final int OutlineLeftVerticalEdge = 1578545; + public static final int OutlineRightVerticalEdge = 1578546; + public static final int OutlineUpperHorizontalEdge = 1578547; + public static final int OutlineLowerHorizontalEdge = 1578548; + public static final int CenterOfCircularOutline = 1578549; + public static final int DiameterOfCircularOutline = 1578550; + public static final int NumberOfPolygonalVertices = 1578551; + public static final int VerticesOfThePolygonalOutline = 1578552; public static final int CollimatorShape = 1578752; public static final int CollimatorLeftVerticalEdge = 1578754; public static final int CollimatorRightVerticalEdge = 1578756; @@ -993,6 +1102,7 @@ public class Tag { public static final int AcquisitionComments = 1589248; public static final int OutputPower = 1593344; public static final int TransducerData = 1593360; + public static final int TransducerIdentificationSequence = 1593361; public static final int FocusDepth = 1593362; public static final int ProcessingFunction = 1593376; public static final int PostprocessingFunction = 1593377; @@ -1057,6 +1167,7 @@ public class Tag { public static final int TableOfPixelValues = 1597528; public static final int TableOfParameterValues = 1597530; public static final int RWaveTimeVector = 1597536; + public static final int ActiveImageAreaOverlayGroup = 1597552; public static final int DetectorConditionsNominalFlag = 1601536; public static final int DetectorTemperature = 1601537; public static final int DetectorType = 1601540; @@ -1507,6 +1618,27 @@ public class Tag { public static final int TransducerBeamSteeringCodeSequence = 1611790; public static final int TransducerApplicationCodeSequence = 1611791; public static final int ZeroVelocityPixelValue = 1611792; + public static final int PhotoacousticExcitationCharacteristicsSequence = 1611809; + public static final int ExcitationSpectralWidth = 1611810; + public static final int ExcitationEnergy = 1611811; + public static final int ExcitationPulseDuration = 1611812; + public static final int ExcitationWavelengthSequence = 1611813; + public static final int ExcitationWavelength = 1611814; + public static final int IlluminationTranslationFlag = 1611816; + public static final int AcousticCouplingMediumFlag = 1611817; + public static final int AcousticCouplingMediumCodeSequence = 1611818; + public static final int AcousticCouplingMediumTemperature = 1611819; + public static final int TransducerResponseSequence = 1611820; + public static final int CenterFrequency = 1611821; + public static final int FractionalBandwidth = 1611822; + public static final int LowerCutoffFrequency = 1611823; + public static final int UpperCutoffFrequency = 1611824; + public static final int TransducerTechnologySequence = 1611825; + public static final int SoundSpeedCorrectionMechanismCodeSequence = 1611826; + public static final int ObjectSoundSpeed = 1611827; + public static final int AcousticCouplingMediumSoundSpeed = 1611828; + public static final int PhotoacousticImageFrameTypeSequence = 1611829; + public static final int ImageDataTypeCodeSequence = 1611830; public static final int ReferenceLocationLabel = 1612032; public static final int ReferenceLocationDescription = 1612033; public static final int ReferenceBasisCodeSequence = 1612034; @@ -1585,6 +1717,7 @@ public class Tag { public static final int OverlayNumber = 2097186; public static final int CurveNumber = 2097188; public static final int LUTNumber = 2097190; + public static final int PyramidLabel = 2097191; public static final int ImagePosition = 2097200; public static final int ImagePositionPatient = 2097202; public static final int ImageOrientation = 2097205; @@ -1705,6 +1838,7 @@ public class Tag { public static final int HorizontalFieldOfView = 2228236; public static final int PupilDilated = 2228237; public static final int DegreeOfDilation = 2228238; + public static final int VertexDistance = 2228239; public static final int StereoBaselineAngle = 2228240; public static final int StereoBaselineDisplacement = 2228241; public static final int StereoHorizontalPixelOffset = 2228242; @@ -1857,7 +1991,7 @@ public class Tag { public static final int OphthalmicEnFaceImageQualityRatingSequence = 2233896; public static final int QualityThreshold = 2233904; public static final int OCTBscanAnalysisAcquisitionParametersSequence = 2233920; - public static final int NumberofBscansPerFrame = 2233922; + public static final int NumberOfBscansPerFrame = 2233922; public static final int BscanSlabThickness = 2233923; public static final int DistanceBetweenBscanSlabs = 2233924; public static final int BscanCycleTime = 2233925; @@ -1974,13 +2108,7 @@ public class Tag { public static final int NumberOfFrames = 2621448; public static final int FrameIncrementPointer = 2621449; public static final int FrameDimensionPointer = 2621450; - /** - * 图像行数(图像高度) - */ public static final int Rows = 2621456; - /** - * 图像列数(图像宽度) - */ public static final int Columns = 2621457; public static final int Planes = 2621458; public static final int UltrasoundColorDataPresent = 2621460; @@ -2010,15 +2138,9 @@ public class Tag { public static final int BlockColumns = 2621586; public static final int RowOverlap = 2621587; public static final int ColumnOverlap = 2621588; - /** - * 图像数据存储位数,一般是8位和16位,本文图像处理用的是16位图像 - */ public static final int BitsAllocated = 2621696; public static final int BitsStored = 2621697; public static final int HighBit = 2621698; - /** - * 是否是带符号,0是无符号,1是有符号 - */ public static final int PixelRepresentation = 2621699; public static final int SmallestValidPixelValue = 2621700; public static final int LargestValidPixelValue = 2621701; @@ -2067,13 +2189,7 @@ public class Tag { public static final int PixelSpacingCalibrationDescription = 2624004; public static final int PixelIntensityRelationship = 2625600; public static final int PixelIntensityRelationshipSign = 2625601; - /** - * 默认窗位 - */ public static final int WindowCenter = 2625616; - /** - * 默认窗宽 - */ public static final int WindowWidth = 2625617; public static final int RescaleIntercept = 2625618; public static final int RescaleSlope = 2625619; @@ -2132,6 +2248,7 @@ public class Tag { public static final int LossyImageCompressionRatio = 2629906; public static final int LossyImageCompressionMethod = 2629908; public static final int ModalityLUTSequence = 2633728; + public static final int VariableModalityLUTSequence = 2633729; public static final int LUTDescriptor = 2633730; public static final int LUTExplanation = 2633731; public static final int ModalityLUTType = 2633732; @@ -2255,10 +2372,23 @@ public class Tag { public static final int StudyComponentStatusID = 3280981; public static final int RequestedProcedureDescription = 3280992; public static final int RequestedProcedureCodeSequence = 3280996; + public static final int RequestedLateralityCodeSequence = 3280997; public static final int ReasonForVisit = 3280998; public static final int ReasonForVisitCodeSequence = 3280999; public static final int RequestedContrastAgent = 3281008; public static final int StudyComments = 3293184; + public static final int FlowIdentifierSequence = 3407873; + public static final int FlowIdentifier = 3407874; + public static final int FlowTransferSyntaxUID = 3407875; + public static final int FlowRTPSamplingRate = 3407876; + public static final int SourceIdentifier = 3407877; + public static final int FrameOriginTimestamp = 3407879; + public static final int IncludesImagingSubject = 3407880; + public static final int FrameUsefulnessGroupSequence = 3407881; + public static final int RealTimeBulkDataFlowSequence = 3407882; + public static final int CameraPositionGroupSequence = 3407883; + public static final int IncludesInformation = 3407884; + public static final int TimeOfFrameGroupSequence = 3407885; public static final int ReferencedPatientAliasSequence = 3670020; public static final int VisitStatusID = 3670024; public static final int AdmissionID = 3670032; @@ -2327,6 +2457,31 @@ public class Tag { public static final int MultiplexedAudioChannelsDescriptionCodeSequence = 3801856; public static final int ChannelIdentificationCode = 3801857; public static final int ChannelMode = 3801858; + public static final int MultiplexGroupUID = 3801872; + public static final int PowerlineFrequency = 3801873; + public static final int ChannelImpedanceSequence = 3801874; + public static final int ImpedanceValue = 3801875; + public static final int ImpedanceMeasurementDateTime = 3801876; + public static final int ImpedanceMeasurementFrequency = 3801877; + public static final int ImpedanceMeasurementCurrentType = 3801878; + public static final int WaveformAmplifierType = 3801879; + public static final int FilterLowFrequencyCharacteristicsSequence = 3801880; + public static final int FilterHighFrequencyCharacteristicsSequence = 3801881; + public static final int SummarizedFilterLookupTable = 3801888; + public static final int NotchFilterCharacteristicsSequence = 3801889; + public static final int WaveformFilterType = 3801890; + public static final int AnalogFilterCharacteristicsSequence = 3801891; + public static final int AnalogFilterRollOff = 3801892; + public static final int AnalogFilterType = 3801893; + public static final int DigitalFilterCharacteristicsSequence = 3801894; + public static final int DigitalFilterOrder = 3801895; + public static final int DigitalFilterTypeCodeSequence = 3801896; + public static final int WaveformFilterDescription = 3801897; + public static final int FilterLookupTableSequence = 3801898; + public static final int FilterLookupTableDescription = 3801899; + public static final int FrequencyEncodingCodeSequence = 3801900; + public static final int MagnitudeEncodingCodeSequence = 3801901; + public static final int FilterLookupTableData = 3801902; public static final int ScheduledStationAETitle = 4194305; public static final int ScheduledProcedureStepStartDate = 4194306; public static final int ScheduledProcedureStepStartTime = 4194307; @@ -2528,6 +2683,7 @@ public class Tag { public static final int DocumentingOrganizationIdentifierCodeSequenceTrial = 4235304; public static final int VerificationDateTime = 4235312; public static final int ObservationDateTime = 4235314; + public static final int ObservationStartDateTime = 4235315; public static final int ValueType = 4235328; public static final int ConceptNameCodeSequence = 4235331; public static final int MeasurementPrecisionDescriptionTrial = 4235335; @@ -2623,6 +2779,14 @@ public class Tag { public static final int RelationshipSequenceTrial = 4237105; public static final int RelationshipTypeCodeSequenceTrial = 4237106; public static final int LanguageCodeSequenceTrial = 4237124; + public static final int TabulatedValuesSequence = 4237313; + public static final int NumberOfTableRows = 4237314; + public static final int NumberOfTableColumns = 4237315; + public static final int TableRowNumber = 4237316; + public static final int TableColumnNumber = 4237317; + public static final int TableRowDefinitionSequence = 4237318; + public static final int TableColumnDefinitionSequence = 4237319; + public static final int CellValuesSequence = 4237320; public static final int UniformResourceLocatorTrial = 4237714; public static final int WaveformAnnotationSequence = 4239392; public static final int TemplateIdentifier = 4250368; @@ -2788,6 +2952,10 @@ public class Tag { public static final int CondenserLensPower = 4718865; public static final int ObjectiveLensPower = 4718866; public static final int ObjectiveLensNumericalAperture = 4718867; + public static final int ConfocalMode = 4718868; + public static final int TissueLocation = 4718869; + public static final int ConfocalMicroscopyImageFrameTypeSequence = 4718870; + public static final int ImageAcquisitionDepth = 4718871; public static final int PaletteColorLookupTableSequence = 4718880; public static final int ReferencedImageNavigationSequence = 4719104; public static final int TopLeftHandCornerOfLocalizerArea = 4719105; @@ -2985,6 +3153,7 @@ public class Tag { public static final int VectorDimensionality = 6684703; public static final int VectorAccuracy = 6684704; public static final int VectorCoordinateData = 6684705; + public static final int DoublePointCoordinatesData = 6684706; public static final int TrianglePointIndexList = 6684707; public static final int EdgePointIndexList = 6684708; public static final int VertexPointIndexList = 6684709; @@ -3099,6 +3268,24 @@ public class Tag { public static final int ModelModification = 6844417; public static final int ModelMirroring = 6844418; public static final int ModelUsageCodeSequence = 6844419; + public static final int ModelGroupUID = 6844420; + public static final int RelativeURIReferenceWithinEncapsulatedDocument = 6844421; + public static final int AnnotationCoordinateType = 6946817; + public static final int AnnotationGroupSequence = 6946818; + public static final int AnnotationGroupUID = 6946819; + public static final int AnnotationGroupLabel = 6946821; + public static final int AnnotationGroupDescription = 6946822; + public static final int AnnotationGroupGenerationType = 6946823; + public static final int AnnotationGroupAlgorithmIdentificationSequence = 6946824; + public static final int AnnotationPropertyCategoryCodeSequence = 6946825; + public static final int AnnotationPropertyTypeCodeSequence = 6946826; + public static final int AnnotationPropertyTypeModifierCodeSequence = 6946827; + public static final int NumberOfAnnotations = 6946828; + public static final int AnnotationAppliesToAllOpticalPaths = 6946829; + public static final int ReferencedOpticalPathIdentifier = 6946830; + public static final int AnnotationAppliesToAllZPlanes = 6946831; + public static final int CommonZCoordinateValue = 6946832; + public static final int AnnotationIndexList = 6946833; public static final int GraphicAnnotationSequence = 7340033; public static final int GraphicLayer = 7340034; public static final int BoundingBoxAnnotationUnits = 7340035; @@ -3197,6 +3384,7 @@ public class Tag { public static final int FiducialIdentifierCodeSequence = 7340817; public static final int ContourUncertaintyRadius = 7340818; public static final int UsedFiducialsSequence = 7340820; + public static final int UsedRTStructureSetROISequence = 7340821; public static final int GraphicCoordinatesDataSequence = 7340824; public static final int FiducialUID = 7340826; public static final int ReferencedFiducialUID = 7340827; @@ -3344,6 +3532,9 @@ public class Tag { public static final int SelectorSSValue = 7471230; public static final int SelectorUIValue = 7471231; public static final int SelectorCodeSequenceValue = 7471232; + public static final int SelectorOVValue = 7471233; + public static final int SelectorSVValue = 7471234; + public static final int SelectorUVValue = 7471235; public static final int NumberOfScreens = 7471360; public static final int NominalScreenDefinitionSequence = 7471362; public static final int NumberOfVerticalPixels = 7471364; @@ -3746,6 +3937,60 @@ public class Tag { public static final int PrimaryFluenceModeSequence = 805437520; public static final int FluenceMode = 805437521; public static final int FluenceModeID = 805437522; + public static final int SelectedFrameNumber = 805437696; + public static final int SelectedFrameFunctionalGroupsSequence = 805437697; + public static final int RTImageFrameGeneralContentSequence = 805437698; + public static final int RTImageFrameContextSequence = 805437699; + public static final int RTImageScopeSequence = 805437700; + public static final int BeamModifierCoordinatesPresenceFlag = 805437701; + public static final int StartCumulativeMeterset = 805437702; + public static final int StopCumulativeMeterset = 805437703; + public static final int RTAcquisitionPatientPositionSequence = 805437704; + public static final int RTImageFrameImagingDevicePositionSequence = 805437705; + public static final int RTImageFramekVRadiationAcquisitionSequence = 805437706; + public static final int RTImageFrameMVRadiationAcquisitionSequence = 805437707; + public static final int RTImageFrameRadiationAcquisitionSequence = 805437708; + public static final int ImagingSourcePositionSequence = 805437709; + public static final int ImageReceptorPositionSequence = 805437710; + public static final int DevicePositionToEquipmentMappingMatrix = 805437711; + public static final int DevicePositionParameterSequence = 805437712; + public static final int ImagingSourceLocationSpecificationType = 805437713; + public static final int ImagingDeviceLocationMatrixSequence = 805437714; + public static final int ImagingDeviceLocationParameterSequence = 805437715; + public static final int ImagingApertureSequence = 805437716; + public static final int ImagingApertureSpecificationType = 805437717; + public static final int NumberOfAcquisitionDevices = 805437718; + public static final int AcquisitionDeviceSequence = 805437719; + public static final int AcquisitionTaskSequence = 805437720; + public static final int AcquisitionTaskWorkitemCodeSequence = 805437721; + public static final int AcquisitionSubtaskSequence = 805437722; + public static final int SubtaskWorkitemCodeSequence = 805437723; + public static final int AcquisitionTaskIndex = 805437724; + public static final int AcquisitionSubtaskIndex = 805437725; + public static final int ReferencedBaselineParametersRTRadiationInstanceSequence = 805437726; + public static final int PositionAcquisitionTemplateIdentificationSequence = 805437727; + public static final int PositionAcquisitionTemplateID = 805437728; + public static final int PositionAcquisitionTemplateName = 805437729; + public static final int PositionAcquisitionTemplateCodeSequence = 805437730; + public static final int PositionAcquisitionTemplateDescription = 805437731; + public static final int AcquisitionTaskApplicabilitySequence = 805437732; + public static final int ProjectionImagingAcquisitionParameterSequence = 805437733; + public static final int CTImagingAcquisitionParameterSequence = 805437734; + public static final int KVImagingGenerationParametersSequence = 805437735; + public static final int MVImagingGenerationParametersSequence = 805437736; + public static final int AcquisitionSignalType = 805437737; + public static final int AcquisitionMethod = 805437738; + public static final int ScanStartPositionSequence = 805437739; + public static final int ScanStopPositionSequence = 805437740; + public static final int ImagingSourceToBeamModifierDefinitionPlaneDistance = 805437741; + public static final int ScanArcType = 805437742; + public static final int DetectorPositioningType = 805437743; + public static final int AdditionalRTAccessoryDeviceSequence = 805437744; + public static final int DeviceSpecificAcquisitionParameterSequence = 805437745; + public static final int ReferencedPositionReferenceInstanceSequence = 805437746; + public static final int EnergyDerivationCodeSequence = 805437747; + public static final int MaximumCumulativeMetersetExposure = 805437748; + public static final int AcquisitionInitiationSequence = 805437749; public static final int DVHType = 805568513; public static final int DoseUnits = 805568514; public static final int DoseType = 805568516; @@ -3787,6 +4032,8 @@ public class Tag { public static final int ROIDescription = 805699624; public static final int ROIDisplayColor = 805699626; public static final int ROIVolume = 805699628; + public static final int ROIDateTime = 805699629; + public static final int ROIObservationDateTime = 805699630; public static final int RTRelatedROISequence = 805699632; public static final int RTROIRelationship = 805699635; public static final int ROIGenerationAlgorithm = 805699638; @@ -3800,6 +4047,12 @@ public class Tag { public static final int NumberOfContourPoints = 805699654; public static final int ContourNumber = 805699656; public static final int AttachedContours = 805699657; + public static final int SourcePixelPlanesCharacteristicsSequence = 805699658; + public static final int SourceSeriesSequence = 805699659; + public static final int SourceSeriesInformationSequence = 805699660; + public static final int ROICreatorSequence = 805699661; + public static final int ROIInterpreterSequence = 805699662; + public static final int ROIObservationContextCodeSequence = 805699663; public static final int ContourData = 805699664; public static final int RTROIObservationsSequence = 805699712; public static final int ObservationNumber = 805699714; @@ -3822,6 +4075,9 @@ public class Tag { public static final int FrameOfReferenceTransformationType = 805699780; public static final int FrameOfReferenceTransformationMatrix = 805699782; public static final int FrameOfReferenceTransformationComment = 805699784; + public static final int PatientLocationCoordinatesSequence = 805699785; + public static final int PatientLocationCoordinatesCodeSequence = 805699786; + public static final int PatientSupportPositionSequence = 805699787; public static final int MeasuredDoseReferenceSequence = 805830672; public static final int MeasuredDoseDescription = 805830674; public static final int MeasuredDoseType = 805830676; @@ -3875,9 +4131,14 @@ public class Tag { public static final int ReferencedCalculatedDoseReferenceSequence = 805830800; public static final int ReferencedCalculatedDoseReferenceNumber = 805830802; public static final int BeamLimitingDeviceLeafPairsSequence = 805830816; + public static final int EnhancedRTBeamLimitingDeviceSequence = 805830817; + public static final int EnhancedRTBeamLimitingOpeningSequence = 805830818; + public static final int EnhancedRTBeamLimitingDeviceDefinitionFlag = 805830819; + public static final int ParallelRTBeamDelimiterOpeningExtents = 805830820; public static final int RecordedWedgeSequence = 805830832; public static final int RecordedCompensatorSequence = 805830848; public static final int RecordedBlockSequence = 805830864; + public static final int RecordedBlockSlabSequence = 805830865; public static final int TreatmentSummaryMeasuredDoseReferenceSequence = 805830880; public static final int RecordedSnoutSequence = 805830896; public static final int RecordedRangeShifterSequence = 805830898; @@ -4191,6 +4452,7 @@ public class Tag { public static final int SourceApplicatorWallNominalThickness = 805962396; public static final int SourceApplicatorWallNominalTransmission = 805962398; public static final int SourceApplicatorStepSize = 805962400; + public static final int ApplicatorShapeReferencedROINumber = 805962401; public static final int TransferTubeNumber = 805962402; public static final int TransferTubeLength = 805962404; public static final int ChannelShieldSequence = 805962416; @@ -4273,6 +4535,7 @@ public class Tag { public static final int ScanSpotReorderingAllowed = 805962645; public static final int ScanSpotMetersetWeights = 805962646; public static final int ScanningSpotSize = 805962648; + public static final int ScanSpotSizesDelivered = 805962649; public static final int NumberOfPaintings = 805962650; public static final int IonToleranceTableSequence = 805962656; public static final int IonBeamSequence = 805962658; @@ -4291,6 +4554,7 @@ public class Tag { public static final int GeneralAccessoryType = 805962787; public static final int GeneralAccessoryNumber = 805962788; public static final int SourceToGeneralAccessoryDistance = 805962789; + public static final int IsocenterToGeneralAccessoryDistance = 805962790; public static final int ApplicatorGeometrySequence = 805962801; public static final int ApplicatorApertureShape = 805962802; public static final int ApplicatorOpening = 805962803; @@ -4317,6 +4581,213 @@ public class Tag { public static final int DeliveredNominalRangeModulatedRegionDepths = 805963024; public static final int DeliveredReferenceDoseDefinition = 805963025; public static final int ReferenceDoseDefinition = 805963026; + public static final int RTControlPointIndex = 805963264; + public static final int RadiationGenerationModeIndex = 805963265; + public static final int ReferencedDefinedDeviceIndex = 805963266; + public static final int RadiationDoseIdentificationIndex = 805963267; + public static final int NumberOfRTControlPoints = 805963268; + public static final int ReferencedRadiationGenerationModeIndex = 805963269; + public static final int TreatmentPositionIndex = 805963270; + public static final int ReferencedDeviceIndex = 805963271; + public static final int TreatmentPositionGroupLabel = 805963272; + public static final int TreatmentPositionGroupUID = 805963273; + public static final int TreatmentPositionGroupSequence = 805963274; + public static final int ReferencedTreatmentPositionIndex = 805963275; + public static final int ReferencedRadiationDoseIdentificationIndex = 805963276; + public static final int RTAccessoryHolderWaterEquivalentThickness = 805963277; + public static final int ReferencedRTAccessoryHolderDeviceIndex = 805963278; + public static final int RTAccessoryHolderSlotExistenceFlag = 805963279; + public static final int RTAccessoryHolderSlotSequence = 805963280; + public static final int RTAccessoryHolderSlotID = 805963281; + public static final int RTAccessoryHolderSlotDistance = 805963282; + public static final int RTAccessorySlotDistance = 805963283; + public static final int RTAccessoryHolderDefinitionSequence = 805963284; + public static final int RTAccessoryDeviceSlotID = 805963285; + public static final int RTRadiationSequence = 805963286; + public static final int RadiationDoseSequence = 805963287; + public static final int RadiationDoseIdentificationSequence = 805963288; + public static final int RadiationDoseIdentificationLabel = 805963289; + public static final int ReferenceDoseType = 805963290; + public static final int PrimaryDoseValueIndicator = 805963291; + public static final int DoseValuesSequence = 805963292; + public static final int DoseValuePurpose = 805963293; + public static final int ReferenceDosePointCoordinates = 805963294; + public static final int RadiationDoseValuesParametersSequence = 805963295; + public static final int MetersetToDoseMappingSequence = 805963296; + public static final int ExpectedInVivoMeasurementValuesSequence = 805963297; + public static final int ExpectedInVivoMeasurementValueIndex = 805963298; + public static final int RadiationDoseInVivoMeasurementLabel = 805963299; + public static final int RadiationDoseCentralAxisDisplacement = 805963300; + public static final int RadiationDoseValue = 805963301; + public static final int RadiationDoseSourceToSkinDistance = 805963302; + public static final int RadiationDoseMeasurementPointCoordinates = 805963303; + public static final int RadiationDoseSourceToExternalContourDistance = 805963304; + public static final int RTToleranceSetSequence = 805963305; + public static final int RTToleranceSetLabel = 805963306; + public static final int AttributeToleranceValuesSequence = 805963307; + public static final int ToleranceValue = 805963308; + public static final int PatientSupportPositionToleranceSequence = 805963309; + public static final int TreatmentTimeLimit = 805963310; + public static final int CArmPhotonElectronControlPointSequence = 805963311; + public static final int ReferencedRTRadiationSequence = 805963312; + public static final int ReferencedRTInstanceSequence = 805963313; + public static final int ReferencedRTPatientSetupSequence = 805963314; + public static final int SourceToPatientSurfaceDistance = 805963316; + public static final int TreatmentMachineSpecialModeCodeSequence = 805963317; + public static final int IntendedNumberOfFractions = 805963318; + public static final int RTRadiationSetIntent = 805963319; + public static final int RTRadiationPhysicalAndGeometricContentDetailFlag = 805963320; + public static final int RTRecordFlag = 805963321; + public static final int TreatmentDeviceIdentificationSequence = 805963322; + public static final int ReferencedRTPhysicianIntentSequence = 805963323; + public static final int CumulativeMeterset = 805963324; + public static final int DeliveryRate = 805963325; + public static final int DeliveryRateUnitSequence = 805963326; + public static final int TreatmentPositionSequence = 805963327; + public static final int RadiationSourceAxisDistance = 805963328; + public static final int NumberOfRTBeamLimitingDevices = 805963329; + public static final int RTBeamLimitingDeviceProximalDistance = 805963330; + public static final int RTBeamLimitingDeviceDistalDistance = 805963331; + public static final int ParallelRTBeamDelimiterDeviceOrientationLabelCodeSequence = 805963332; + public static final int BeamModifierOrientationAngle = 805963333; + public static final int FixedRTBeamDelimiterDeviceSequence = 805963334; + public static final int ParallelRTBeamDelimiterDeviceSequence = 805963335; + public static final int NumberOfParallelRTBeamDelimiters = 805963336; + public static final int ParallelRTBeamDelimiterBoundaries = 805963337; + public static final int ParallelRTBeamDelimiterPositions = 805963338; + public static final int RTBeamLimitingDeviceOffset = 805963339; + public static final int RTBeamDelimiterGeometrySequence = 805963340; + public static final int RTBeamLimitingDeviceDefinitionSequence = 805963341; + public static final int ParallelRTBeamDelimiterOpeningMode = 805963342; + public static final int ParallelRTBeamDelimiterLeafMountingSide = 805963343; + public static final int PatientSetupUID = 805963344; + public static final int WedgeDefinitionSequence = 805963345; + public static final int RadiationBeamWedgeAngle = 805963346; + public static final int RadiationBeamWedgeThinEdgeDistance = 805963347; + public static final int RadiationBeamEffectiveWedgeAngle = 805963348; + public static final int NumberOfWedgePositions = 805963349; + public static final int RTBeamLimitingDeviceOpeningSequence = 805963350; + public static final int NumberOfRTBeamLimitingDeviceOpenings = 805963351; + public static final int RadiationDosimeterUnitSequence = 805963352; + public static final int RTDeviceDistanceReferenceLocationCodeSequence = 805963353; + public static final int RadiationDeviceConfigurationAndCommissioningKeySequence = 805963354; + public static final int PatientSupportPositionParameterSequence = 805963355; + public static final int PatientSupportPositionSpecificationMethod = 805963356; + public static final int PatientSupportPositionDeviceParameterSequence = 805963357; + public static final int DeviceOrderIndex = 805963358; + public static final int PatientSupportPositionParameterOrderIndex = 805963359; + public static final int PatientSupportPositionDeviceToleranceSequence = 805963360; + public static final int PatientSupportPositionToleranceOrderIndex = 805963361; + public static final int CompensatorDefinitionSequence = 805963362; + public static final int CompensatorMapOrientation = 805963363; + public static final int CompensatorProximalThicknessMap = 805963364; + public static final int CompensatorDistalThicknessMap = 805963365; + public static final int CompensatorBasePlaneOffset = 805963366; + public static final int CompensatorShapeFabricationCodeSequence = 805963367; + public static final int CompensatorShapeSequence = 805963368; + public static final int RadiationBeamCompensatorMillingToolDiameter = 805963369; + public static final int BlockDefinitionSequence = 805963370; + public static final int BlockEdgeData = 805963371; + public static final int BlockOrientation = 805963372; + public static final int RadiationBeamBlockThickness = 805963373; + public static final int RadiationBeamBlockSlabThickness = 805963374; + public static final int BlockEdgeDataSequence = 805963375; + public static final int NumberOfRTAccessoryHolders = 805963376; + public static final int GeneralAccessoryDefinitionSequence = 805963377; + public static final int NumberOfGeneralAccessories = 805963378; + public static final int BolusDefinitionSequence = 805963379; + public static final int NumberOfBoluses = 805963380; + public static final int EquipmentFrameOfReferenceUID = 805963381; + public static final int EquipmentFrameOfReferenceDescription = 805963382; + public static final int EquipmentReferencePointCoordinatesSequence = 805963383; + public static final int EquipmentReferencePointCodeSequence = 805963384; + public static final int RTBeamLimitingDeviceAngle = 805963385; + public static final int SourceRollAngle = 805963386; + public static final int RadiationGenerationModeSequence = 805963387; + public static final int RadiationGenerationModeLabel = 805963388; + public static final int RadiationGenerationModeDescription = 805963389; + public static final int RadiationGenerationModeMachineCodeSequence = 805963390; + public static final int RadiationTypeCodeSequence = 805963391; + public static final int NominalEnergy = 805963392; + public static final int MinimumNominalEnergy = 805963393; + public static final int MaximumNominalEnergy = 805963394; + public static final int RadiationFluenceModifierCodeSequence = 805963395; + public static final int EnergyUnitCodeSequence = 805963396; + public static final int NumberOfRadiationGenerationModes = 805963397; + public static final int PatientSupportDevicesSequence = 805963398; + public static final int NumberOfPatientSupportDevices = 805963399; + public static final int RTBeamModifierDefinitionDistance = 805963400; + public static final int BeamAreaLimitSequence = 805963401; + public static final int ReferencedRTPrescriptionSequence = 805963402; + public static final int DoseValueInterpretation = 805963403; + public static final int TreatmentSessionUID = 805963520; + public static final int RTRadiationUsage = 805963521; + public static final int ReferencedRTRadiationSetSequence = 805963522; + public static final int ReferencedRTRadiationRecordSequence = 805963523; + public static final int RTRadiationSetDeliveryNumber = 805963524; + public static final int ClinicalFractionNumber = 805963525; + public static final int RTTreatmentFractionCompletionStatus = 805963526; + public static final int RTRadiationSetUsage = 805963527; + public static final int TreatmentDeliveryContinuationFlag = 805963528; + public static final int TreatmentRecordContentOrigin = 805963529; + public static final int RTTreatmentTerminationStatus = 805963540; + public static final int RTTreatmentTerminationReasonCodeSequence = 805963541; + public static final int MachineSpecificTreatmentTerminationCodeSequence = 805963542; + public static final int RTRadiationSalvageRecordControlPointSequence = 805963554; + public static final int StartingMetersetValueKnownFlag = 805963555; + public static final int TreatmentTerminationDescription = 805963568; + public static final int TreatmentToleranceViolationSequence = 805963569; + public static final int TreatmentToleranceViolationCategory = 805963570; + public static final int TreatmentToleranceViolationAttributeSequence = 805963571; + public static final int TreatmentToleranceViolationDescription = 805963572; + public static final int TreatmentToleranceViolationIdentification = 805963573; + public static final int TreatmentToleranceViolationDateTime = 805963574; + public static final int RecordedRTControlPointDateTime = 805963578; + public static final int ReferencedRadiationRTControlPointIndex = 805963579; + public static final int AlternateValueSequence = 805963582; + public static final int ConfirmationSequence = 805963583; + public static final int InterlockSequence = 805963584; + public static final int InterlockDateTime = 805963585; + public static final int InterlockDescription = 805963586; + public static final int InterlockOriginatingDeviceSequence = 805963587; + public static final int InterlockCodeSequence = 805963588; + public static final int InterlockResolutionCodeSequence = 805963589; + public static final int InterlockResolutionUserSequence = 805963590; + public static final int OverrideDateTime = 805963616; + public static final int TreatmentToleranceViolationTypeCodeSequence = 805963617; + public static final int TreatmentToleranceViolationCauseCodeSequence = 805963618; + public static final int MeasuredMetersetToDoseMappingSequence = 805963634; + public static final int ReferencedExpectedInVivoMeasurementValueIndex = 805963635; + public static final int DoseMeasurementDeviceCodeSequence = 805963636; + public static final int AdditionalParameterRecordingInstanceSequence = 805963648; + public static final int InterlockOriginDescription = 805963651; + public static final int RTPatientPositionScopeSequence = 805963652; + public static final int ReferencedTreatmentPositionGroupUID = 805963653; + public static final int RadiationOrderIndex = 805963654; + public static final int OmittedRadiationSequence = 805963655; + public static final int ReasonForOmissionCodeSequence = 805963656; + public static final int RTDeliveryStartPatientPositionSequence = 805963657; + public static final int RTTreatmentPreparationPatientPositionSequence = 805963658; + public static final int ReferencedRTTreatmentPreparationSequence = 805963659; + public static final int ReferencedPatientSetupPhotoSequence = 805963660; + public static final int PatientTreatmentPreparationMethodCodeSequence = 805963661; + public static final int PatientTreatmentPreparationProcedureParameterDescription = 805963662; + public static final int PatientTreatmentPreparationDeviceSequence = 805963663; + public static final int PatientTreatmentPreparationProcedureSequence = 805963664; + public static final int PatientTreatmentPreparationProcedureCodeSequence = 805963665; + public static final int PatientTreatmentPreparationMethodDescription = 805963666; + public static final int PatientTreatmentPreparationProcedureParameterSequence = 805963667; + public static final int PatientSetupPhotoDescription = 805963668; + public static final int PatientTreatmentPreparationProcedureIndex = 805963669; + public static final int ReferencedPatientSetupProcedureIndex = 805963670; + public static final int RTRadiationTaskSequence = 805963671; + public static final int RTPatientPositionDisplacementSequence = 805963672; + public static final int RTPatientPositionSequence = 805963673; + public static final int DisplacementReferenceLabel = 805963674; + public static final int DisplacementMatrix = 805963675; + public static final int PatientSupportDisplacementSequence = 805963676; + public static final int DisplacementReferenceLocationCodeSequence = 805963677; + public static final int RTRadiationSetDeliveryUsage = 805963678; public static final int ReferencedRTPlanSequence = 806092802; public static final int ReferencedBeamSequence = 806092804; public static final int ReferencedBeamNumber = 806092806; @@ -4351,6 +4822,22 @@ public class Tag { public static final int OmittedBeamTaskSequence = 806093073; public static final int ReasonForOmission = 806093074; public static final int ReasonForOmissionDescription = 806093075; + public static final int PrescriptionOverviewSequence = 806093076; + public static final int TotalPrescriptionDose = 806093077; + public static final int PlanOverviewSequence = 806093078; + public static final int PlanOverviewIndex = 806093079; + public static final int ReferencedPlanOverviewIndex = 806093080; + public static final int NumberOfFractionsIncluded = 806093081; + public static final int DoseCalibrationConditionsSequence = 806093088; + public static final int AbsorbedDoseToMetersetRatio = 806093089; + public static final int DelineatedRadiationFieldSize = 806093090; + public static final int DoseCalibrationConditionsVerifiedFlag = 806093091; + public static final int CalibrationReferencePointDepth = 806093092; + public static final int GatingBeamHoldTransitionSequence = 806093093; + public static final int BeamHoldTransition = 806093094; + public static final int BeamHoldTransitionDateTime = 806093095; + public static final int BeamHoldOriginatingDeviceSequence = 806093096; + public static final int BeamHoldTransitionTriggerSource = 806093097; public static final int ApprovalStatus = 806223874; public static final int ReviewDate = 806223876; public static final int ReviewTime = 806223877; @@ -4401,6 +4888,7 @@ public class Tag { public static final int SegmentAnnotationTypeCodeSequence = 806354988; public static final int DeviceLabel = 806354989; public static final int DeviceTypeCodeSequence = 806354990; + public static final int SegmentAnnotationTypeModifierCodeSequence = 806354991; public static final int PatientEquipmentRelationshipCodeSequence = 806354992; public static final int ReferencedFiducialsUID = 806354993; public static final int PatientTreatmentOrientationSequence = 806354994; @@ -4489,6 +4977,19 @@ public class Tag { public static final int IntendedStartDayOfWeek = 806355078; public static final int WeekdayFractionPatternSequence = 806355079; public static final int DeliveryTimeStructureCodeSequence = 806355080; + public static final int TreatmentSiteModifierCodeSequence = 806355081; + public static final int RoboticBaseLocationIndicator = 806355088; + public static final int RoboticPathNodeSetCodeSequence = 806355089; + public static final int RoboticNodeIdentifier = 806355090; + public static final int RTTreatmentSourceCoordinates = 806355091; + public static final int RadiationSourceCoordinateSystemYawAngle = 806355092; + public static final int RadiationSourceCoordinateSystemRollAngle = 806355093; + public static final int RadiationSourceCoordinateSystemPitchAngle = 806355094; + public static final int RoboticPathControlPointSequence = 806355095; + public static final int TomotherapeuticControlPointSequence = 806355096; + public static final int TomotherapeuticLeafOpenDurations = 806355097; + public static final int TomotherapeuticLeafInitialClosedDurations = 806355098; + public static final int ConceptualVolumeIdentificationSequence = 806355104; public static final int Arbitrary = 1073741840; public static final int TextComments = 1073758208; public static final int ResultsID = 1074266176; @@ -4554,7 +5055,7 @@ public class Tag { public static final int RouteSegmentEndTime = 1074794534; public static final int TDRType = 1074794535; public static final int InternationalRouteSegment = 1074794536; - public static final int ThreatDetectionAlgorithmandVersion = 1074794537; + public static final int ThreatDetectionAlgorithmAndVersion = 1074794537; public static final int AssignedLocation = 1074794538; public static final int AlarmDecisionTime = 1074794539; public static final int AlarmDecision = 1074794545; @@ -4685,11 +5186,9 @@ public class Tag { public static final int OverlayComments = 1610629120; public static final int ExtendedOffsetTable = 2145386497; public static final int ExtendedOffsetTableLengths = 2145386498; + public static final int EncapsulatedPixelDataValueTotalLength = 2145386499; public static final int FloatPixelData = 2145386504; public static final int DoubleFloatPixelData = 2145386505; - /** - * 这个字段里存的就是Dicom文件的图像数据 - */ public static final int PixelData = 2145386512; public static final int CoefficientsSDVN = 2145386528; public static final int CoefficientsSDHN = 2145386544; @@ -4755,7 +5254,6 @@ public class Tag { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15 }; - private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' @@ -4833,17 +5331,17 @@ public static int[] fromHexStrings(String[] ss) { public static String toString(int tag) { char[] s = { - Symbol.C_PARENTHESE_LEFT, + '(', HEX_DIGITS[(tag >>> 28)], HEX_DIGITS[(tag >>> 24) & 0xF], HEX_DIGITS[(tag >>> 20) & 0xF], HEX_DIGITS[(tag >>> 16) & 0xF], - Symbol.C_COMMA, + ',', HEX_DIGITS[(tag >>> 12) & 0xF], HEX_DIGITS[(tag >>> 8) & 0xF], HEX_DIGITS[(tag >>> 4) & 0xF], HEX_DIGITS[(tag >>> 0) & 0xF], - Symbol.C_PARENTHESE_RIGHT}; + ')'}; return new String(s); } @@ -4893,9 +5391,9 @@ public static int groupLengthTagOf(int tag) { } public static boolean isItem(int tag) { - return tag == Tag.Item - || tag == Tag.ItemDelimitationItem - || tag == Tag.SequenceDelimitationItem; + return tag == Item + || tag == ItemDelimitationItem + || tag == SequenceDelimitationItem; } public static boolean isFileMetaInformation(int tag) { @@ -4923,7 +5421,7 @@ public static int forName(String name) { } public static int[] parseTagPath(String tagPath) { - String[] names = Material.split(tagPath, Symbol.C_DOT); + String[] names = Builder.split(tagPath, '.'); int[] tags = new int[names.length]; for (int i = 0; i < tags.length; i++) if ((tags[i] = forName(names[i])) == -1) @@ -4931,4 +5429,32 @@ public static int[] parseTagPath(String tagPath) { return tags; } + public static int[] toTags(String[] tagOrKeywords) { + int[] tags = new int[tagOrKeywords.length]; + for (int i = 0; i < tags.length; i++) { + tags[i] = toTag(tagOrKeywords[i]); + } + return tags; + } + + public static int toTag(String tagOrKeyword) { + try { + return Integer.parseInt(tagOrKeyword, 16); + } catch (IllegalArgumentException e) { + int tag = ElementDictionary.tagForKeyword(tagOrKeyword, null); + if (tag == -1) { + throw new IllegalArgumentException(tagOrKeyword); + } + return tag; + } + } + + public enum Type { + STANDARD, PRIVATE, PRIVATE_CREATOR; + + public static Type typeOf(int tag) { + return (tag & 0x00010000) != 0 ? (tag & 0x0000FF00) != 0 ? PRIVATE : PRIVATE_CREATOR : STANDARD; + } + } + } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/UID.java b/bus-image/src/main/java/org/miaixz/bus/image/UID.java old mode 100755 new mode 100644 index 258eb20253..0ebb4e6df2 --- a/bus-image/src/main/java/org/miaixz/bus/image/UID.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/UID.java @@ -27,3090 +27,608 @@ */ package org.miaixz.bus.image; -import org.miaixz.bus.core.lang.Normal; -import org.miaixz.bus.core.lang.Symbol; import org.miaixz.bus.core.xyz.ByteKit; +import org.miaixz.bus.core.xyz.StringKit; import org.miaixz.bus.image.galaxy.data.Attributes; -import org.miaixz.bus.image.galaxy.data.Sequence; -import org.miaixz.bus.image.galaxy.data.VR; -import org.miaixz.bus.image.galaxy.data.Value; +import org.miaixz.bus.image.galaxy.data.UIDVisitor; import java.lang.reflect.Field; import java.math.BigInteger; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.Arrays; -import java.util.HashMap; import java.util.Map; +import java.util.Objects; import java.util.UUID; import java.util.regex.Pattern; /** - * UID信息 - * * @author Kimi Liu * @since Java 17+ */ -public class UID { - - /** - * Verification SOP Class, SOPClass - */ - public static final String VerificationSOPClass = "1.2.840.10008.1.1"; - - /** - * Implicit VR Little Endian, TransferSyntax - */ - public static final String ImplicitVRLittleEndian = "1.2.840.10008.1.2"; - - /** - * Explicit VR Little Endian, TransferSyntax - */ - public static final String ExplicitVRLittleEndian = "1.2.840.10008.1.2.1"; - - /** - * Deflated Explicit VR Little Endian, TransferSyntax - */ - public static final String DeflatedExplicitVRLittleEndian = "1.2.840.10008.1.2.1.99"; - - /** - * Explicit VR Big Endian (Retired), TransferSyntax - */ - public static final String ExplicitVRBigEndianRetired = "1.2.840.10008.1.2.2"; - - /** - * JPEG Baseline (Process 1), TransferSyntax - */ - public static final String JPEGBaseline1 = "1.2.840.10008.1.2.4.50"; - - /** - * JPEG Extended (Process 2/4), TransferSyntax - */ - public static final String JPEGExtended24 = "1.2.840.10008.1.2.4.51"; - - /** - * JPEG Extended (Process 3/5) (Retired), TransferSyntax - */ - public static final String JPEGExtended35Retired = "1.2.840.10008.1.2.4.52"; - - /** - * JPEG Spectral Selection, Non-Hierarchical (Process 6/8) (Retired), TransferSyntax - */ - public static final String JPEGSpectralSelectionNonHierarchical68Retired = "1.2.840.10008.1.2.4.53"; - - /** - * JPEG Spectral Selection, Non-Hierarchical (Process 7/9) (Retired), TransferSyntax - */ - public static final String JPEGSpectralSelectionNonHierarchical79Retired = "1.2.840.10008.1.2.4.54"; - - /** - * JPEG Full Progression, Non-Hierarchical (Process 10/12) (Retired), TransferSyntax - */ - public static final String JPEGFullProgressionNonHierarchical1012Retired = "1.2.840.10008.1.2.4.55"; - - /** - * JPEG Full Progression, Non-Hierarchical (Process 11/13) (Retired), TransferSyntax - */ - public static final String JPEGFullProgressionNonHierarchical1113Retired = "1.2.840.10008.1.2.4.56"; - - /** - * JPEG Lossless, Non-Hierarchical (Process 14), TransferSyntax - */ - public static final String JPEGLosslessNonHierarchical14 = "1.2.840.10008.1.2.4.57"; - - /** - * JPEG Lossless, Non-Hierarchical (Process 15) (Retired), TransferSyntax - */ - public static final String JPEGLosslessNonHierarchical15Retired = "1.2.840.10008.1.2.4.58"; - - /** - * JPEG Extended, Hierarchical (Process 16/18) (Retired), TransferSyntax - */ - public static final String JPEGExtendedHierarchical1618Retired = "1.2.840.10008.1.2.4.59"; - - /** - * JPEG Extended, Hierarchical (Process 17/19) (Retired), TransferSyntax - */ - public static final String JPEGExtendedHierarchical1719Retired = "1.2.840.10008.1.2.4.60"; - - /** - * JPEG Spectral Selection, Hierarchical (Process 20/22) (Retired), TransferSyntax - */ - public static final String JPEGSpectralSelectionHierarchical2022Retired = "1.2.840.10008.1.2.4.61"; - - /** - * JPEG Spectral Selection, Hierarchical (Process 21/23) (Retired), TransferSyntax - */ - public static final String JPEGSpectralSelectionHierarchical2123Retired = "1.2.840.10008.1.2.4.62"; - - /** - * JPEG Full Progression, Hierarchical (Process 24/26) (Retired), TransferSyntax - */ - public static final String JPEGFullProgressionHierarchical2426Retired = "1.2.840.10008.1.2.4.63"; - - /** - * JPEG Full Progression, Hierarchical (Process 25/27) (Retired), TransferSyntax - */ - public static final String JPEGFullProgressionHierarchical2527Retired = "1.2.840.10008.1.2.4.64"; - - /** - * JPEG Lossless, Hierarchical (Process 28) (Retired), TransferSyntax - */ - public static final String JPEGLosslessHierarchical28Retired = "1.2.840.10008.1.2.4.65"; - - /** - * JPEG Lossless, Hierarchical (Process 29) (Retired), TransferSyntax - */ - public static final String JPEGLosslessHierarchical29Retired = "1.2.840.10008.1.2.4.66"; - - /** - * JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]), TransferSyntax - */ - public static final String JPEGLossless = "1.2.840.10008.1.2.4.70"; - - /** - * JPEG-LS Lossless Image Compression, TransferSyntax - */ - public static final String JPEGLSLossless = "1.2.840.10008.1.2.4.80"; - - /** - * JPEG-LS Lossy (Near-Lossless) Image Compression, TransferSyntax - */ - public static final String JPEGLSLossyNearLossless = "1.2.840.10008.1.2.4.81"; - - /** - * JPEG 2000 Image Compression (Lossless Only), TransferSyntax - */ - public static final String JPEG2000LosslessOnly = "1.2.840.10008.1.2.4.90"; - - /** - * JPEG 2000 Image Compression, TransferSyntax - */ - public static final String JPEG2000 = "1.2.840.10008.1.2.4.91"; - - /** - * JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only), TransferSyntax - */ - public static final String JPEG2000Part2MultiComponentLosslessOnly = "1.2.840.10008.1.2.4.92"; - - /** - * JPEG 2000 Part 2 Multi-component Image Compression, TransferSyntax - */ - public static final String JPEG2000Part2MultiComponent = "1.2.840.10008.1.2.4.93"; - - /** - * JPIP Referenced, TransferSyntax - */ - public static final String JPIPReferenced = "1.2.840.10008.1.2.4.94"; - - /** - * JPIP Referenced Deflate, TransferSyntax - */ - public static final String JPIPReferencedDeflate = "1.2.840.10008.1.2.4.95"; - - /** - * MPEG2 Main Profile / Main Level, TransferSyntax - */ - public static final String MPEG2 = "1.2.840.10008.1.2.4.100"; - - /** - * MPEG2 Main Profile / High Level, TransferSyntax - */ - public static final String MPEG2MainProfileHighLevel = "1.2.840.10008.1.2.4.101"; - - /** - * MPEG-4 AVC/H.264 High Profile / Level 4.1, TransferSyntax - */ - public static final String MPEG4AVCH264HighProfileLevel41 = "1.2.840.10008.1.2.4.102"; - - /** - * MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1, TransferSyntax - */ - public static final String MPEG4AVCH264BDCompatibleHighProfileLevel41 = "1.2.840.10008.1.2.4.103"; - - /** - * MPEG-4 AVC/H.264 High Profile / Level 4.2 For 2D Video, TransferSyntax - */ - public static final String MPEG4AVCH264HighProfileLevel42For2DVideo = "1.2.840.10008.1.2.4.104"; - - /** - * MPEG-4 AVC/H.264 High Profile / Level 4.2 For 3D Video, TransferSyntax - */ - public static final String MPEG4AVCH264HighProfileLevel42For3DVideo = "1.2.840.10008.1.2.4.105"; - - /** - * MPEG-4 AVC/H.264 Stereo High Profile / Level 4.2, TransferSyntax - */ - public static final String MPEG4AVCH264StereoHighProfileLevel42 = "1.2.840.10008.1.2.4.106"; - - /** - * HEVC/H.265 Main Profile / Level 5.1, TransferSyntax - */ - public static final String HEVCH265MainProfileLevel51 = "1.2.840.10008.1.2.4.107"; - - /** - * HEVC/H.265 Main 10 Profile / Level 5.1, TransferSyntax - */ - public static final String HEVCH265Main10ProfileLevel51 = "1.2.840.10008.1.2.4.108"; - - /** - * RLE Lossless, TransferSyntax - */ - public static final String RLELossless = "1.2.840.10008.1.2.5"; - - /** - * RFC 2557 MIME encapsulation (Retired), TransferSyntax - */ - public static final String RFC2557MIMEEncapsulationRetired = "1.2.840.10008.1.2.6.1"; - - /** - * XML Encoding (Retired), TransferSyntax - */ - public static final String XMLEncodingRetired = "1.2.840.10008.1.2.6.2"; - - /** - * SMPTE ST 2110-20 Uncompressed Progressive Active Video, TransferSyntax - */ - public static final String SMPTEST211020UncompressedProgressiveActiveVideo = "1.2.840.10008.1.2.7.1"; - - /** - * SMPTE ST 2110-20 Uncompressed Interlaced Active Video, TransferSyntax - */ - public static final String SMPTEST211020UncompressedInterlacedActiveVideo = "1.2.840.10008.1.2.7.2"; - - /** - * SMPTE ST 2110-30 PCM Digital Audio, TransferSyntax - */ - public static final String SMPTEST211030PCMDigitalAudio = "1.2.840.10008.1.2.7.3"; - - /** - * Media Storage Directory Storage, SOPClass - */ - public static final String MediaStorageDirectoryStorage = "1.2.840.10008.1.3.10"; - - /** - * Talairach Brain Atlas Frame of Reference, WellKnownFrameOfReference - */ - public static final String TalairachBrainAtlasFrameOfReference = "1.2.840.10008.1.4.1.1"; - - /** - * SPM2 T1 Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2T1FrameOfReference = "1.2.840.10008.1.4.1.2"; - - /** - * SPM2 T2 Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2T2FrameOfReference = "1.2.840.10008.1.4.1.3"; - - /** - * SPM2 PD Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2PDFrameOfReference = "1.2.840.10008.1.4.1.4"; - - /** - * SPM2 EPI Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2EPIFrameOfReference = "1.2.840.10008.1.4.1.5"; - - /** - * SPM2 FIL T1 Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2FILT1FrameOfReference = "1.2.840.10008.1.4.1.6"; - - /** - * SPM2 PET Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2PETFrameOfReference = "1.2.840.10008.1.4.1.7"; - - /** - * SPM2 TRANSM Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2TRANSMFrameOfReference = "1.2.840.10008.1.4.1.8"; - - /** - * SPM2 SPECT Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2SPECTFrameOfReference = "1.2.840.10008.1.4.1.9"; - - /** - * SPM2 GRAY Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2GRAYFrameOfReference = "1.2.840.10008.1.4.1.10"; - - /** - * SPM2 WHITE Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2WHITEFrameOfReference = "1.2.840.10008.1.4.1.11"; - - /** - * SPM2 CSF Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2CSFFrameOfReference = "1.2.840.10008.1.4.1.12"; - - /** - * SPM2 BRAINMASK Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2BRAINMASKFrameOfReference = "1.2.840.10008.1.4.1.13"; - - /** - * SPM2 AVG305T1 Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2AVG305T1FrameOfReference = "1.2.840.10008.1.4.1.14"; - - /** - * SPM2 AVG152T1 Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2AVG152T1FrameOfReference = "1.2.840.10008.1.4.1.15"; - - /** - * SPM2 AVG152T2 Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2AVG152T2FrameOfReference = "1.2.840.10008.1.4.1.16"; - - /** - * SPM2 AVG152PD Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2AVG152PDFrameOfReference = "1.2.840.10008.1.4.1.17"; - - /** - * SPM2 SINGLESUBJT1 Frame of Reference, WellKnownFrameOfReference - */ - public static final String SPM2SINGLESUBJT1FrameOfReference = "1.2.840.10008.1.4.1.18"; - - /** - * ICBM 452 T1 Frame of Reference, WellKnownFrameOfReference - */ - public static final String ICBM452T1FrameOfReference = "1.2.840.10008.1.4.2.1"; - - /** - * ICBM Single Subject MRI Frame of Reference, WellKnownFrameOfReference - */ - public static final String ICBMSingleSubjectMRIFrameOfReference = "1.2.840.10008.1.4.2.2"; - - /** - * IEC 61217 Fixed Coordinate System Frame of Reference, WellKnownFrameOfReference - */ - public static final String IEC61217FixedCoordinateSystemFrameOfReference = "1.2.840.10008.1.4.3.1"; - - /** - * Standard Robotic-Arm Coordinate System Frame of Reference, WellKnownFrameOfReference - */ - public static final String StandardRoboticArmCoordinateSystemFrameOfReference = "1.2.840.10008.1.4.3.2"; - - /** - * Hot Iron Color Palette SOP Instance, WellKnownSOPInstance - */ - public static final String HotIronColorPaletteSOPInstance = "1.2.840.10008.1.5.1"; - - /** - * PET Color Palette SOP Instance, WellKnownSOPInstance - */ - public static final String PETColorPaletteSOPInstance = "1.2.840.10008.1.5.2"; - - /** - * Hot Metal Blue Color Palette SOP Instance, WellKnownSOPInstance - */ - public static final String HotMetalBlueColorPaletteSOPInstance = "1.2.840.10008.1.5.3"; - - /** - * PET 20 Step Color Palette SOP Instance, WellKnownSOPInstance - */ - public static final String PET20StepColorPaletteSOPInstance = "1.2.840.10008.1.5.4"; - - /** - * Spring Color Palette SOP Instance, WellKnownSOPInstance - */ - public static final String SpringColorPaletteSOPInstance = "1.2.840.10008.1.5.5"; - - /** - * Summer Color Palette SOP Instance, WellKnownSOPInstance - */ - public static final String SummerColorPaletteSOPInstance = "1.2.840.10008.1.5.6"; - - /** - * Fall Color Palette SOP Instance, WellKnownSOPInstance - */ - public static final String FallColorPaletteSOPInstance = "1.2.840.10008.1.5.7"; - - /** - * Winter Color Palette SOP Instance, WellKnownSOPInstance - */ - public static final String WinterColorPaletteSOPInstance = "1.2.840.10008.1.5.8"; - - /** - * Basic Study Content Notification SOP Class (Retired), SOPClass - */ - public static final String BasicStudyContentNotificationSOPClassRetired = "1.2.840.10008.1.9"; - - /** - * Papyrus 3 Implicit VR Little Endian (Retired), TransferSyntax - */ - public static final String Papyrus3ImplicitVRLittleEndianRetired = "1.2.840.10008.1.20"; - - /** - * Storage Commitment Push Model SOP Class, SOPClass - */ - public static final String StorageCommitmentPushModelSOPClass = "1.2.840.10008.1.20.1"; - - /** - * Storage Commitment Push Model SOP Instance, WellKnownSOPInstance - */ - public static final String StorageCommitmentPushModelSOPInstance = "1.2.840.10008.1.20.1.1"; - - /** - * Storage Commitment Pull Model SOP Class (Retired), SOPClass - */ - public static final String StorageCommitmentPullModelSOPClassRetired = "1.2.840.10008.1.20.2"; - - /** - * Storage Commitment Pull Model SOP Instance (Retired), WellKnownSOPInstance - */ - public static final String StorageCommitmentPullModelSOPInstanceRetired = "1.2.840.10008.1.20.2.1"; - - /** - * Procedural Event Logging SOP Class, SOPClass - */ - public static final String ProceduralEventLoggingSOPClass = "1.2.840.10008.1.40"; - - /** - * Procedural Event Logging SOP Instance, WellKnownSOPInstance - */ - public static final String ProceduralEventLoggingSOPInstance = "1.2.840.10008.1.40.1"; - - /** - * Substance Administration Logging SOP Class, SOPClass - */ - public static final String SubstanceAdministrationLoggingSOPClass = "1.2.840.10008.1.42"; - - /** - * Substance Administration Logging SOP Instance, WellKnownSOPInstance - */ - public static final String SubstanceAdministrationLoggingSOPInstance = "1.2.840.10008.1.42.1"; - - /** - * DICOM UID Registry, DICOMUIDsAsACodingScheme - */ - public static final String DICOMUIDRegistry = "1.2.840.10008.2.6.1"; - - /** - * DICOM Controlled Terminology, CodingScheme - */ - public static final String DICOMControlledTerminology = "1.2.840.10008.2.16.4"; - - /** - * Adult Mouse Anatomy Ontology, CodingScheme - */ - public static final String AdultMouseAnatomyOntology = "1.2.840.10008.2.16.5"; - - /** - * Uberon Ontology, CodingScheme - */ - public static final String UberonOntology = "1.2.840.10008.2.16.6"; - - /** - * Integrated Taxonomic Information System (ITIS) Taxonomic Serial Number (TSN), CodingScheme - */ - public static final String IntegratedTaxonomicInformationSystemITISTaxonomicSerialNumberTSN = "1.2.840.10008.2.16.7"; - - /** - * Mouse Genome Initiative (MGI), CodingScheme - */ - public static final String MouseGenomeInitiativeMGI = "1.2.840.10008.2.16.8"; - - /** - * PubChem Compound CID, CodingScheme - */ - public static final String PubChemCompoundCID = "1.2.840.10008.2.16.9"; - - /** - * ICD-11, CodingScheme - */ - public static final String ICD11 = "1.2.840.10008.2.16.10"; - - /** - * New York University Melanoma Clinical Cooperative Group, CodingScheme - */ - public static final String NewYorkUniversityMelanomaClinicalCooperativeGroup = "1.2.840.10008.2.16.11"; - - /** - * Mayo Clinic Non-radiological Images Specific Body Structure Anatomical Surface Region Guide, CodingScheme - */ - public static final String MayoClinicNonRadiologicalImagesSpecificBodyStructureAnatomicalSurfaceRegionGuide = "1.2.840.10008.2.16.12"; - - /** - * Image Biomarker Standardisation Initiative, CodingScheme - */ - public static final String ImageBiomarkerStandardisationInitiative = "1.2.840.10008.2.16.13"; - - /** - * Radiomics Ontology, CodingScheme - */ - public static final String RadiomicsOntology = "1.2.840.10008.2.16.14"; - - /** - * RadElement, CodingScheme - */ - public static final String RadElement = "1.2.840.10008.2.16.15"; - - /** - * DICOM Application Context Name, ApplicationContextName - */ - public static final String DICOMApplicationContextName = "1.2.840.10008.3.1.1.1"; - - /** - * Detached Patient Management SOP Class (Retired), SOPClass - */ - public static final String DetachedPatientManagementSOPClassRetired = "1.2.840.10008.3.1.2.1.1"; - - /** - * Detached Patient Management Meta SOP Class (Retired), MetaSOPClass - */ - public static final String DetachedPatientManagementMetaSOPClassRetired = "1.2.840.10008.3.1.2.1.4"; - - /** - * Detached Visit Management SOP Class (Retired), SOPClass - */ - public static final String DetachedVisitManagementSOPClassRetired = "1.2.840.10008.3.1.2.2.1"; - - /** - * Detached Study Management SOP Class (Retired), SOPClass - */ - public static final String DetachedStudyManagementSOPClassRetired = "1.2.840.10008.3.1.2.3.1"; - - /** - * Study Component Management SOP Class (Retired), SOPClass - */ - public static final String StudyComponentManagementSOPClassRetired = "1.2.840.10008.3.1.2.3.2"; - - /** - * Modality Performed Procedure Step SOP Class, SOPClass - */ - public static final String ModalityPerformedProcedureStepSOPClass = "1.2.840.10008.3.1.2.3.3"; - - /** - * Modality Performed Procedure Step Retrieve SOP Class, SOPClass - */ - public static final String ModalityPerformedProcedureStepRetrieveSOPClass = "1.2.840.10008.3.1.2.3.4"; - - /** - * Modality Performed Procedure Step Notification SOP Class, SOPClass - */ - public static final String ModalityPerformedProcedureStepNotificationSOPClass = "1.2.840.10008.3.1.2.3.5"; - - /** - * Detached Results Management SOP Class (Retired), SOPClass - */ - public static final String DetachedResultsManagementSOPClassRetired = "1.2.840.10008.3.1.2.5.1"; - - /** - * Detached Results Management Meta SOP Class (Retired), MetaSOPClass - */ - public static final String DetachedResultsManagementMetaSOPClassRetired = "1.2.840.10008.3.1.2.5.4"; - - /** - * Detached Study Management Meta SOP Class (Retired), MetaSOPClass - */ - public static final String DetachedStudyManagementMetaSOPClassRetired = "1.2.840.10008.3.1.2.5.5"; - - /** - * Detached Interpretation Management SOP Class (Retired), SOPClass - */ - public static final String DetachedInterpretationManagementSOPClassRetired = "1.2.840.10008.3.1.2.6.1"; - - /** - * Storage Service Class, ServiceClass - */ - public static final String StorageServiceClass = "1.2.840.10008.4.2"; - - /** - * Basic Film Session SOP Class, SOPClass - */ - public static final String BasicFilmSessionSOPClass = "1.2.840.10008.5.1.1.1"; - - /** - * Basic Film Box SOP Class, SOPClass - */ - public static final String BasicFilmBoxSOPClass = "1.2.840.10008.5.1.1.2"; - - /** - * Basic Grayscale Image Box SOP Class, SOPClass - */ - public static final String BasicGrayscaleImageBoxSOPClass = "1.2.840.10008.5.1.1.4"; - - /** - * Basic Color Image Box SOP Class, SOPClass - */ - public static final String BasicColorImageBoxSOPClass = "1.2.840.10008.5.1.1.4.1"; - - /** - * Referenced Image Box SOP Class (Retired), SOPClass - */ - public static final String ReferencedImageBoxSOPClassRetired = "1.2.840.10008.5.1.1.4.2"; - - /** - * Basic Grayscale Print Management Meta SOP Class, MetaSOPClass - */ - public static final String BasicGrayscalePrintManagementMetaSOPClass = "1.2.840.10008.5.1.1.9"; - - /** - * Referenced Grayscale Print Management Meta SOP Class (Retired), MetaSOPClass - */ - public static final String ReferencedGrayscalePrintManagementMetaSOPClassRetired = "1.2.840.10008.5.1.1.9.1"; - - /** - * Print Job SOP Class, SOPClass - */ - public static final String PrintJobSOPClass = "1.2.840.10008.5.1.1.14"; - - /** - * Basic Annotation Box SOP Class, SOPClass - */ - public static final String BasicAnnotationBoxSOPClass = "1.2.840.10008.5.1.1.15"; - - /** - * Printer SOP Class, SOPClass - */ - public static final String PrinterSOPClass = "1.2.840.10008.5.1.1.16"; - - /** - * Printer Configuration Retrieval SOP Class, SOPClass - */ - public static final String PrinterConfigurationRetrievalSOPClass = "1.2.840.10008.5.1.1.16.376"; - - /** - * Printer SOP Instance, WellKnownPrinterSOPInstance - */ - public static final String PrinterSOPInstance = "1.2.840.10008.5.1.1.17"; - - /** - * Printer Configuration Retrieval SOP Instance, WellKnownPrinterSOPInstance - */ - public static final String PrinterConfigurationRetrievalSOPInstance = "1.2.840.10008.5.1.1.17.376"; - - /** - * Basic Color Print Management Meta SOP Class, MetaSOPClass - */ - public static final String BasicColorPrintManagementMetaSOPClass = "1.2.840.10008.5.1.1.18"; - - /** - * Referenced Color Print Management Meta SOP Class (Retired), MetaSOPClass - */ - public static final String ReferencedColorPrintManagementMetaSOPClassRetired = "1.2.840.10008.5.1.1.18.1"; - - /** - * VOI LUT Box SOP Class, SOPClass - */ - public static final String VOILUTBoxSOPClass = "1.2.840.10008.5.1.1.22"; - - /** - * Presentation LUT SOP Class, SOPClass - */ - public static final String PresentationLUTSOPClass = "1.2.840.10008.5.1.1.23"; - - /** - * Image Overlay Box SOP Class (Retired), SOPClass - */ - public static final String ImageOverlayBoxSOPClassRetired = "1.2.840.10008.5.1.1.24"; - - /** - * Basic Print Image Overlay Box SOP Class (Retired), SOPClass - */ - public static final String BasicPrintImageOverlayBoxSOPClassRetired = "1.2.840.10008.5.1.1.24.1"; - - /** - * Print Queue SOP Instance (Retired), WellKnownPrintQueueSOPInstance - */ - public static final String PrintQueueSOPInstanceRetired = "1.2.840.10008.5.1.1.25"; - - /** - * Print Queue Management SOP Class (Retired), SOPClass - */ - public static final String PrintQueueManagementSOPClassRetired = "1.2.840.10008.5.1.1.26"; - - /** - * Stored Print Storage SOP Class (Retired), SOPClass - */ - public static final String StoredPrintStorageSOPClassRetired = "1.2.840.10008.5.1.1.27"; - - /** - * Hardcopy Grayscale Image Storage SOP Class (Retired), SOPClass - */ - public static final String HardcopyGrayscaleImageStorageSOPClassRetired = "1.2.840.10008.5.1.1.29"; - - /** - * Hardcopy Color Image Storage SOP Class (Retired), SOPClass - */ - public static final String HardcopyColorImageStorageSOPClassRetired = "1.2.840.10008.5.1.1.30"; - - /** - * Pull Print Request SOP Class (Retired), SOPClass - */ - public static final String PullPrintRequestSOPClassRetired = "1.2.840.10008.5.1.1.31"; - - /** - * Pull Stored Print Management Meta SOP Class (Retired), MetaSOPClass - */ - public static final String PullStoredPrintManagementMetaSOPClassRetired = "1.2.840.10008.5.1.1.32"; - - /** - * Media Creation Management SOP Class UID, SOPClass - */ - public static final String MediaCreationManagementSOPClassUID = "1.2.840.10008.5.1.1.33"; - - /** - * Display System SOP Class, SOPClass - */ - public static final String DisplaySystemSOPClass = "1.2.840.10008.5.1.1.40"; - - /** - * Display System SOP Instance, WellKnownSOPInstance - */ - public static final String DisplaySystemSOPInstance = "1.2.840.10008.5.1.1.40.1"; - - /** - * Computed Radiography Image Storage, SOPClass - */ - public static final String ComputedRadiographyImageStorage = "1.2.840.10008.5.1.4.1.1.1"; - - /** - * Digital X-Ray Image Storage - For Presentation, SOPClass - */ - public static final String DigitalXRayImageStorageForPresentation = "1.2.840.10008.5.1.4.1.1.1.1"; - - /** - * Digital X-Ray Image Storage - For Processing, SOPClass - */ - public static final String DigitalXRayImageStorageForProcessing = "1.2.840.10008.5.1.4.1.1.1.1.1"; - - /** - * Digital Mammography X-Ray Image Storage - For Presentation, SOPClass - */ - public static final String DigitalMammographyXRayImageStorageForPresentation = "1.2.840.10008.5.1.4.1.1.1.2"; - - /** - * Digital Mammography X-Ray Image Storage - For Processing, SOPClass - */ - public static final String DigitalMammographyXRayImageStorageForProcessing = "1.2.840.10008.5.1.4.1.1.1.2.1"; - - /** - * Digital Intra-Oral X-Ray Image Storage - For Presentation, SOPClass - */ - public static final String DigitalIntraOralXRayImageStorageForPresentation = "1.2.840.10008.5.1.4.1.1.1.3"; - - /** - * Digital Intra-Oral X-Ray Image Storage - For Processing, SOPClass - */ - public static final String DigitalIntraOralXRayImageStorageForProcessing = "1.2.840.10008.5.1.4.1.1.1.3.1"; - - /** - * CT Image Storage, SOPClass - */ - public static final String CTImageStorage = "1.2.840.10008.5.1.4.1.1.2"; - - /** - * Enhanced CT Image Storage, SOPClass - */ - public static final String EnhancedCTImageStorage = "1.2.840.10008.5.1.4.1.1.2.1"; - - /** - * Legacy Converted Enhanced CT Image Storage, SOPClass - */ - public static final String LegacyConvertedEnhancedCTImageStorage = "1.2.840.10008.5.1.4.1.1.2.2"; - - /** - * Ultrasound Multi-frame Image Storage (Retired), SOPClass - */ - public static final String UltrasoundMultiFrameImageStorageRetired = "1.2.840.10008.5.1.4.1.1.3"; - - /** - * Ultrasound Multi-frame Image Storage, SOPClass - */ - public static final String UltrasoundMultiFrameImageStorage = "1.2.840.10008.5.1.4.1.1.3.1"; - - /** - * MR Image Storage, SOPClass - */ - public static final String MRImageStorage = "1.2.840.10008.5.1.4.1.1.4"; - - /** - * Enhanced MR Image Storage, SOPClass - */ - public static final String EnhancedMRImageStorage = "1.2.840.10008.5.1.4.1.1.4.1"; - - /** - * MR Spectroscopy Storage, SOPClass - */ - public static final String MRSpectroscopyStorage = "1.2.840.10008.5.1.4.1.1.4.2"; - - /** - * Enhanced MR Color Image Storage, SOPClass - */ - public static final String EnhancedMRColorImageStorage = "1.2.840.10008.5.1.4.1.1.4.3"; - - /** - * Legacy Converted Enhanced MR Image Storage, SOPClass - */ - public static final String LegacyConvertedEnhancedMRImageStorage = "1.2.840.10008.5.1.4.1.1.4.4"; - - /** - * Nuclear Medicine Image Storage (Retired), SOPClass - */ - public static final String NuclearMedicineImageStorageRetired = "1.2.840.10008.5.1.4.1.1.5"; - - /** - * Ultrasound Image Storage (Retired), SOPClass - */ - public static final String UltrasoundImageStorageRetired = "1.2.840.10008.5.1.4.1.1.6"; - - /** - * Ultrasound Image Storage, SOPClass - */ - public static final String UltrasoundImageStorage = "1.2.840.10008.5.1.4.1.1.6.1"; - - /** - * Enhanced US Volume Storage, SOPClass - */ - public static final String EnhancedUSVolumeStorage = "1.2.840.10008.5.1.4.1.1.6.2"; - - /** - * Secondary Capture Image Storage, SOPClass - */ - public static final String SecondaryCaptureImageStorage = "1.2.840.10008.5.1.4.1.1.7"; - - /** - * Multi-frame Single Bit Secondary Capture Image Storage, SOPClass - */ - public static final String MultiFrameSingleBitSecondaryCaptureImageStorage = "1.2.840.10008.5.1.4.1.1.7.1"; - - /** - * Multi-frame Grayscale Byte Secondary Capture Image Storage, SOPClass - */ - public static final String MultiFrameGrayscaleByteSecondaryCaptureImageStorage = "1.2.840.10008.5.1.4.1.1.7.2"; - - /** - * Multi-frame Grayscale Word Secondary Capture Image Storage, SOPClass - */ - public static final String MultiFrameGrayscaleWordSecondaryCaptureImageStorage = "1.2.840.10008.5.1.4.1.1.7.3"; - - /** - * Multi-frame True Color Secondary Capture Image Storage, SOPClass - */ - public static final String MultiFrameTrueColorSecondaryCaptureImageStorage = "1.2.840.10008.5.1.4.1.1.7.4"; - - /** - * Standalone Overlay Storage (Retired), SOPClass - */ - public static final String StandaloneOverlayStorageRetired = "1.2.840.10008.5.1.4.1.1.8"; - - /** - * Standalone Curve Storage (Retired), SOPClass - */ - public static final String StandaloneCurveStorageRetired = "1.2.840.10008.5.1.4.1.1.9"; - - /** - * Waveform Storage - Trial (Retired), SOPClass - */ - public static final String WaveformStorageTrialRetired = "1.2.840.10008.5.1.4.1.1.9.1"; - - /** - * 12-lead ECG Waveform Storage, SOPClass - */ - public static final String TwelveLeadECGWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.1.1"; - - /** - * General ECG Waveform Storage, SOPClass - */ - public static final String GeneralECGWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.1.2"; - - /** - * Ambulatory ECG Waveform Storage, SOPClass - */ - public static final String AmbulatoryECGWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.1.3"; - - /** - * Hemodynamic Waveform Storage, SOPClass - */ - public static final String HemodynamicWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.2.1"; - - /** - * Cardiac Electrophysiology Waveform Storage, SOPClass - */ - public static final String CardiacElectrophysiologyWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.3.1"; - - /** - * Basic Voice Audio Waveform Storage, SOPClass - */ - public static final String BasicVoiceAudioWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.4.1"; - - /** - * General Audio Waveform Storage, SOPClass - */ - public static final String GeneralAudioWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.4.2"; - - /** - * Arterial Pulse Waveform Storage, SOPClass - */ - public static final String ArterialPulseWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.5.1"; - - /** - * Respiratory Waveform Storage, SOPClass - */ - public static final String RespiratoryWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.6.1"; - - /** - * Multi-channel Respiratory Waveform Storage, SOPClass - */ - public static final String MultiChannelRespiratoryWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.6.2"; - - /** - * Routine Scalp Electroencephalogram Waveform Storage, SOPClass - */ - public static final String RoutineScalpElectroencephalogramWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.7.1"; - - /** - * Electromyogram Waveform Storage, SOPClass - */ - public static final String ElectromyogramWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.7.2"; - - /** - * Electrooculogram Waveform Storage, SOPClass - */ - public static final String ElectrooculogramWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.7.3"; - - /** - * Sleep Electroencephalogram Waveform Storage, SOPClass - */ - public static final String SleepElectroencephalogramWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.7.4"; - - /** - * Body Position Waveform Storage, SOPClass - */ - public static final String BodyPositionWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.8.1"; - - /** - * Standalone Modality LUT Storage (Retired), SOPClass - */ - public static final String StandaloneModalityLUTStorageRetired = "1.2.840.10008.5.1.4.1.1.10"; - - /** - * Standalone VOI LUT Storage (Retired), SOPClass - */ - public static final String StandaloneVOILUTStorageRetired = "1.2.840.10008.5.1.4.1.1.11"; - - /** - * Grayscale Softcopy Presentation State Storage, SOPClass - */ - public static final String GrayscaleSoftcopyPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.1"; - - /** - * Color Softcopy Presentation State Storage, SOPClass - */ - public static final String ColorSoftcopyPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.2"; - - /** - * Pseudo-Color Softcopy Presentation State Storage, SOPClass - */ - public static final String PseudoColorSoftcopyPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.3"; - - /** - * Blending Softcopy Presentation State Storage, SOPClass - */ - public static final String BlendingSoftcopyPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.4"; - - /** - * XA/XRF Grayscale Softcopy Presentation State Storage, SOPClass - */ - public static final String XAXRFGrayscaleSoftcopyPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.5"; - - /** - * Grayscale Planar MPR Volumetric Presentation State Storage, SOPClass - */ - public static final String GrayscalePlanarMPRVolumetricPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.6"; - - /** - * Compositing Planar MPR Volumetric Presentation State Storage, SOPClass - */ - public static final String CompositingPlanarMPRVolumetricPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.7"; - - /** - * Advanced Blending Presentation State Storage, SOPClass - */ - public static final String AdvancedBlendingPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.8"; - - /** - * Volume Rendering Volumetric Presentation State Storage, SOPClass - */ - public static final String VolumeRenderingVolumetricPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.9"; - - /** - * Segmented Volume Rendering Volumetric Presentation State Storage, SOPClass - */ - public static final String SegmentedVolumeRenderingVolumetricPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.10"; - - /** - * Multiple Volume Rendering Volumetric Presentation State Storage, SOPClass - */ - public static final String MultipleVolumeRenderingVolumetricPresentationStateStorage = "1.2.840.10008.5.1.4.1.1.11.11"; - - /** - * X-Ray Angiographic Image Storage, SOPClass - */ - public static final String XRayAngiographicImageStorage = "1.2.840.10008.5.1.4.1.1.12.1"; - - /** - * Enhanced XA Image Storage, SOPClass - */ - public static final String EnhancedXAImageStorage = "1.2.840.10008.5.1.4.1.1.12.1.1"; - - /** - * X-Ray Radiofluoroscopic Image Storage, SOPClass - */ - public static final String XRayRadiofluoroscopicImageStorage = "1.2.840.10008.5.1.4.1.1.12.2"; - - /** - * Enhanced XRF Image Storage, SOPClass - */ - public static final String EnhancedXRFImageStorage = "1.2.840.10008.5.1.4.1.1.12.2.1"; - - /** - * X-Ray Angiographic Bi-Plane Image Storage (Retired), SOPClass - */ - public static final String XRayAngiographicBiPlaneImageStorageRetired = "1.2.840.10008.5.1.4.1.1.12.3"; - - /** - * Zeiss OPT File (Retired), SOPClass - */ - public static final String ZeissOPTFileRetired = "1.2.840.10008.5.1.4.1.1.12.77"; - - /** - * X-Ray 3D Angiographic Image Storage, SOPClass - */ - public static final String XRay3DAngiographicImageStorage = "1.2.840.10008.5.1.4.1.1.13.1.1"; - - /** - * X-Ray 3D Craniofacial Image Storage, SOPClass - */ - public static final String XRay3DCraniofacialImageStorage = "1.2.840.10008.5.1.4.1.1.13.1.2"; - - /** - * Breast Tomosynthesis Image Storage, SOPClass - */ - public static final String BreastTomosynthesisImageStorage = "1.2.840.10008.5.1.4.1.1.13.1.3"; - - /** - * Breast Projection X-Ray Image Storage - For Presentation, SOPClass - */ - public static final String BreastProjectionXRayImageStorageForPresentation = "1.2.840.10008.5.1.4.1.1.13.1.4"; - - /** - * Breast Projection X-Ray Image Storage - For Processing, SOPClass - */ - public static final String BreastProjectionXRayImageStorageForProcessing = "1.2.840.10008.5.1.4.1.1.13.1.5"; - - /** - * Intravascular Optical Coherence Tomography Image Storage - For Presentation, SOPClass - */ - public static final String IntravascularOpticalCoherenceTomographyImageStorageForPresentation = "1.2.840.10008.5.1.4.1.1.14.1"; - - /** - * Intravascular Optical Coherence Tomography Image Storage - For Processing, SOPClass - */ - public static final String IntravascularOpticalCoherenceTomographyImageStorageForProcessing = "1.2.840.10008.5.1.4.1.1.14.2"; - - /** - * Nuclear Medicine Image Storage, SOPClass - */ - public static final String NuclearMedicineImageStorage = "1.2.840.10008.5.1.4.1.1.20"; - - /** - * Parametric Map Storage, SOPClass - */ - public static final String ParametricMapStorage = "1.2.840.10008.5.1.4.1.1.30"; - - /** - * MR Image Storage Zero Padded (Retired), SOPClass - */ - public static final String MRImageStorageZeroPaddedRetired = "1.2.840.10008.5.1.4.1.1.40"; - - /** - * Raw Data Storage, SOPClass - */ - public static final String RawDataStorage = "1.2.840.10008.5.1.4.1.1.66"; - - /** - * Spatial Registration Storage, SOPClass - */ - public static final String SpatialRegistrationStorage = "1.2.840.10008.5.1.4.1.1.66.1"; - - /** - * Spatial Fiducials Storage, SOPClass - */ - public static final String SpatialFiducialsStorage = "1.2.840.10008.5.1.4.1.1.66.2"; - - /** - * Deformable Spatial Registration Storage, SOPClass - */ - public static final String DeformableSpatialRegistrationStorage = "1.2.840.10008.5.1.4.1.1.66.3"; - - /** - * Segmentation Storage, SOPClass - */ - public static final String SegmentationStorage = "1.2.840.10008.5.1.4.1.1.66.4"; - - /** - * Surface Segmentation Storage, SOPClass - */ - public static final String SurfaceSegmentationStorage = "1.2.840.10008.5.1.4.1.1.66.5"; - - /** - * Tractography Results Storage, SOPClass - */ - public static final String TractographyResultsStorage = "1.2.840.10008.5.1.4.1.1.66.6"; - - /** - * Real World Value Mapping Storage, SOPClass - */ - public static final String RealWorldValueMappingStorage = "1.2.840.10008.5.1.4.1.1.67"; - - /** - * Surface Scan Mesh Storage, SOPClass - */ - public static final String SurfaceScanMeshStorage = "1.2.840.10008.5.1.4.1.1.68.1"; - - /** - * Surface Scan Point Cloud Storage, SOPClass - */ - public static final String SurfaceScanPointCloudStorage = "1.2.840.10008.5.1.4.1.1.68.2"; - - /** - * VL Image Storage - Trial (Retired), SOPClass - */ - public static final String VLImageStorageTrialRetired = "1.2.840.10008.5.1.4.1.1.77.1"; - - /** - * VL Multi-frame Image Storage - Trial (Retired), SOPClass - */ - public static final String VLMultiFrameImageStorageTrialRetired = "1.2.840.10008.5.1.4.1.1.77.2"; - - /** - * VL Endoscopic Image Storage, SOPClass - */ - public static final String VLEndoscopicImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.1"; - - /** - * Video Endoscopic Image Storage, SOPClass - */ - public static final String VideoEndoscopicImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.1.1"; - - /** - * VL Microscopic Image Storage, SOPClass - */ - public static final String VLMicroscopicImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.2"; - - /** - * Video Microscopic Image Storage, SOPClass - */ - public static final String VideoMicroscopicImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.2.1"; - - /** - * VL Slide-Coordinates Microscopic Image Storage, SOPClass - */ - public static final String VLSlideCoordinatesMicroscopicImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.3"; - - /** - * VL Photographic Image Storage, SOPClass - */ - public static final String VLPhotographicImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.4"; - - /** - * Video Photographic Image Storage, SOPClass - */ - public static final String VideoPhotographicImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.4.1"; - - /** - * Ophthalmic Photography 8 Bit Image Storage, SOPClass - */ - public static final String OphthalmicPhotography8BitImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.5.1"; - - /** - * Ophthalmic Photography 16 Bit Image Storage, SOPClass - */ - public static final String OphthalmicPhotography16BitImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.5.2"; - - /** - * Stereometric Relationship Storage, SOPClass - */ - public static final String StereometricRelationshipStorage = "1.2.840.10008.5.1.4.1.1.77.1.5.3"; - - /** - * Ophthalmic Tomography Image Storage, SOPClass - */ - public static final String OphthalmicTomographyImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.5.4"; - - /** - * Wide Field Ophthalmic Photography Stereographic Projection Image Storage, SOPClass - */ - public static final String WideFieldOphthalmicPhotographyStereographicProjectionImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.5.5"; - - /** - * Wide Field Ophthalmic Photography 3D Coordinates Image Storage, SOPClass - */ - public static final String WideFieldOphthalmicPhotography3DCoordinatesImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.5.6"; - - /** - * Ophthalmic Optical Coherence Tomography En Face Image Storage, SOPClass - */ - public static final String OphthalmicOpticalCoherenceTomographyEnFaceImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.5.7"; - - /** - * Ophthalmic Optical Coherence Tomography B-scan Volume Analysis Storage, SOPClass - */ - public static final String OphthalmicOpticalCoherenceTomographyBScanVolumeAnalysisStorage = "1.2.840.10008.5.1.4.1.1.77.1.5.8"; - - /** - * VL Whole Slide Microscopy Image Storage, SOPClass - */ - public static final String VLWholeSlideMicroscopyImageStorage = "1.2.840.10008.5.1.4.1.1.77.1.6"; - - /** - * Lensometry Measurements Storage, SOPClass - */ - public static final String LensometryMeasurementsStorage = "1.2.840.10008.5.1.4.1.1.78.1"; - - /** - * Autorefraction Measurements Storage, SOPClass - */ - public static final String AutorefractionMeasurementsStorage = "1.2.840.10008.5.1.4.1.1.78.2"; - - /** - * Keratometry Measurements Storage, SOPClass - */ - public static final String KeratometryMeasurementsStorage = "1.2.840.10008.5.1.4.1.1.78.3"; - - /** - * Subjective Refraction Measurements Storage, SOPClass - */ - public static final String SubjectiveRefractionMeasurementsStorage = "1.2.840.10008.5.1.4.1.1.78.4"; - - /** - * Visual Acuity Measurements Storage, SOPClass - */ - public static final String VisualAcuityMeasurementsStorage = "1.2.840.10008.5.1.4.1.1.78.5"; - - /** - * Spectacle Prescription Report Storage, SOPClass - */ - public static final String SpectaclePrescriptionReportStorage = "1.2.840.10008.5.1.4.1.1.78.6"; - - /** - * Ophthalmic Axial Measurements Storage, SOPClass - */ - public static final String OphthalmicAxialMeasurementsStorage = "1.2.840.10008.5.1.4.1.1.78.7"; - - /** - * Intraocular Lens Calculations Storage, SOPClass - */ - public static final String IntraocularLensCalculationsStorage = "1.2.840.10008.5.1.4.1.1.78.8"; - - /** - * Macular Grid Thickness and Volume Report Storage, SOPClass - */ - public static final String MacularGridThicknessAndVolumeReportStorage = "1.2.840.10008.5.1.4.1.1.79.1"; - - /** - * Ophthalmic Visual Field Static Perimetry Measurements Storage, SOPClass - */ - public static final String OphthalmicVisualFieldStaticPerimetryMeasurementsStorage = "1.2.840.10008.5.1.4.1.1.80.1"; - - /** - * Ophthalmic Thickness Map Storage, SOPClass - */ - public static final String OphthalmicThicknessMapStorage = "1.2.840.10008.5.1.4.1.1.81.1"; - - /** - * Corneal Topography Map Storage, SOPClass - */ - public static final String CornealTopographyMapStorage = "1.2.840.10008.5.1.4.1.1.82.1"; - - /** - * Text SR Storage - Trial (Retired), SOPClass - */ - public static final String TextSRStorageTrialRetired = "1.2.840.10008.5.1.4.1.1.88.1"; - - /** - * Audio SR Storage - Trial (Retired), SOPClass - */ - public static final String AudioSRStorageTrialRetired = "1.2.840.10008.5.1.4.1.1.88.2"; - - /** - * Detail SR Storage - Trial (Retired), SOPClass - */ - public static final String DetailSRStorageTrialRetired = "1.2.840.10008.5.1.4.1.1.88.3"; - - /** - * Comprehensive SR Storage - Trial (Retired), SOPClass - */ - public static final String ComprehensiveSRStorageTrialRetired = "1.2.840.10008.5.1.4.1.1.88.4"; - - /** - * Basic Text SR Storage, SOPClass - */ - public static final String BasicTextSRStorage = "1.2.840.10008.5.1.4.1.1.88.11"; - - /** - * Enhanced SR Storage, SOPClass - */ - public static final String EnhancedSRStorage = "1.2.840.10008.5.1.4.1.1.88.22"; - - /** - * Comprehensive SR Storage, SOPClass - */ - public static final String ComprehensiveSRStorage = "1.2.840.10008.5.1.4.1.1.88.33"; - - /** - * Comprehensive 3D SR Storage, SOPClass - */ - public static final String Comprehensive3DSRStorage = "1.2.840.10008.5.1.4.1.1.88.34"; - - /** - * Extensible SR Storage, SOPClass - */ - public static final String ExtensibleSRStorage = "1.2.840.10008.5.1.4.1.1.88.35"; - - /** - * Procedure Log Storage, SOPClass - */ - public static final String ProcedureLogStorage = "1.2.840.10008.5.1.4.1.1.88.40"; - - /** - * Mammography CAD SR Storage, SOPClass - */ - public static final String MammographyCADSRStorage = "1.2.840.10008.5.1.4.1.1.88.50"; - - /** - * Key Object Selection Document Storage, SOPClass - */ - public static final String KeyObjectSelectionDocumentStorage = "1.2.840.10008.5.1.4.1.1.88.59"; - - /** - * Chest CAD SR Storage, SOPClass - */ - public static final String ChestCADSRStorage = "1.2.840.10008.5.1.4.1.1.88.65"; - - /** - * X-Ray Radiation Dose SR Storage, SOPClass - */ - public static final String XRayRadiationDoseSRStorage = "1.2.840.10008.5.1.4.1.1.88.67"; - - /** - * Radiopharmaceutical Radiation Dose SR Storage, SOPClass - */ - public static final String RadiopharmaceuticalRadiationDoseSRStorage = "1.2.840.10008.5.1.4.1.1.88.68"; - - /** - * Colon CAD SR Storage, SOPClass - */ - public static final String ColonCADSRStorage = "1.2.840.10008.5.1.4.1.1.88.69"; - - /** - * Implantation Plan SR Storage, SOPClass - */ - public static final String ImplantationPlanSRStorage = "1.2.840.10008.5.1.4.1.1.88.70"; - - /** - * Acquisition Context SR Storage, SOPClass - */ - public static final String AcquisitionContextSRStorage = "1.2.840.10008.5.1.4.1.1.88.71"; - - /** - * Simplified Adult Echo SR Storage, SOPClass - */ - public static final String SimplifiedAdultEchoSRStorage = "1.2.840.10008.5.1.4.1.1.88.72"; - - /** - * Patient Radiation Dose SR Storage, SOPClass - */ - public static final String PatientRadiationDoseSRStorage = "1.2.840.10008.5.1.4.1.1.88.73"; - - /** - * Planned Imaging Agent Administration SR Storage, SOPClass - */ - public static final String PlannedImagingAgentAdministrationSRStorage = "1.2.840.10008.5.1.4.1.1.88.74"; - - /** - * Performed Imaging Agent Administration SR Storage, SOPClass - */ - public static final String PerformedImagingAgentAdministrationSRStorage = "1.2.840.10008.5.1.4.1.1.88.75"; - - /** - * Content Assessment Results Storage, SOPClass - */ - public static final String ContentAssessmentResultsStorage = "1.2.840.10008.5.1.4.1.1.90.1"; - - /** - * Encapsulated PDF Storage, SOPClass - */ - public static final String EncapsulatedPDFStorage = "1.2.840.10008.5.1.4.1.1.104.1"; - - /** - * Encapsulated CDA Storage, SOPClass - */ - public static final String EncapsulatedCDAStorage = "1.2.840.10008.5.1.4.1.1.104.2"; - - /** - * Encapsulated STL Storage, SOPClass - */ - public static final String EncapsulatedSTLStorage = "1.2.840.10008.5.1.4.1.1.104.3"; - - /** - * Encapsulated OBJ Storage, SOPClass - */ - public static final String EncapsulatedOBJStorage = "1.2.840.10008.5.1.4.1.1.104.4"; - - /** - * Encapsulated MTL Storage, SOPClass - */ - public static final String EncapsulatedMTLStorage = "1.2.840.10008.5.1.4.1.1.104.5"; - - /** - * Positron Emission Tomography Image Storage, SOPClass - */ - public static final String PositronEmissionTomographyImageStorage = "1.2.840.10008.5.1.4.1.1.128"; - - /** - * Legacy Converted Enhanced PET Image Storage, SOPClass - */ - public static final String LegacyConvertedEnhancedPETImageStorage = "1.2.840.10008.5.1.4.1.1.128.1"; - - /** - * Standalone PET Curve Storage (Retired), SOPClass - */ - public static final String StandalonePETCurveStorageRetired = "1.2.840.10008.5.1.4.1.1.129"; - - /** - * Enhanced PET Image Storage, SOPClass - */ - public static final String EnhancedPETImageStorage = "1.2.840.10008.5.1.4.1.1.130"; - - /** - * Basic Structured Display Storage, SOPClass - */ - public static final String BasicStructuredDisplayStorage = "1.2.840.10008.5.1.4.1.1.131"; - - /** - * CT Defined Procedure Protocol Storage, SOPClass - */ - public static final String CTDefinedProcedureProtocolStorage = "1.2.840.10008.5.1.4.1.1.200.1"; - - /** - * CT Performed Procedure Protocol Storage, SOPClass - */ - public static final String CTPerformedProcedureProtocolStorage = "1.2.840.10008.5.1.4.1.1.200.2"; - - /** - * Protocol Approval Storage, SOPClass - */ - public static final String ProtocolApprovalStorage = "1.2.840.10008.5.1.4.1.1.200.3"; - - /** - * Protocol Approval Information Model - FIND, SOPClass - */ - public static final String ProtocolApprovalInformationModelFIND = "1.2.840.10008.5.1.4.1.1.200.4"; - - /** - * Protocol Approval Information Model - MOVE, SOPClass - */ - public static final String ProtocolApprovalInformationModelMOVE = "1.2.840.10008.5.1.4.1.1.200.5"; - - /** - * Protocol Approval Information Model - GET, SOPClass - */ - public static final String ProtocolApprovalInformationModelGET = "1.2.840.10008.5.1.4.1.1.200.6"; - - /** - * RT Image Storage, SOPClass - */ - public static final String RTImageStorage = "1.2.840.10008.5.1.4.1.1.481.1"; - - /** - * RT Dose Storage, SOPClass - */ - public static final String RTDoseStorage = "1.2.840.10008.5.1.4.1.1.481.2"; - - /** - * RT Structure Set Storage, SOPClass - */ - public static final String RTStructureSetStorage = "1.2.840.10008.5.1.4.1.1.481.3"; - - /** - * RT Beams Treatment Record Storage, SOPClass - */ - public static final String RTBeamsTreatmentRecordStorage = "1.2.840.10008.5.1.4.1.1.481.4"; - - /** - * RT Plan Storage, SOPClass - */ - public static final String RTPlanStorage = "1.2.840.10008.5.1.4.1.1.481.5"; - - /** - * RT Brachy Treatment Record Storage, SOPClass - */ - public static final String RTBrachyTreatmentRecordStorage = "1.2.840.10008.5.1.4.1.1.481.6"; - - /** - * RT Treatment Summary Record Storage, SOPClass - */ - public static final String RTTreatmentSummaryRecordStorage = "1.2.840.10008.5.1.4.1.1.481.7"; - - /** - * RT Ion Plan Storage, SOPClass - */ - public static final String RTIonPlanStorage = "1.2.840.10008.5.1.4.1.1.481.8"; - - /** - * RT Ion Beams Treatment Record Storage, SOPClass - */ - public static final String RTIonBeamsTreatmentRecordStorage = "1.2.840.10008.5.1.4.1.1.481.9"; - - /** - * RT Physician Intent Storage, SOPClass - */ - public static final String RTPhysicianIntentStorage = "1.2.840.10008.5.1.4.1.1.481.10"; - - /** - * RT Segment Annotation Storage, SOPClass - */ - public static final String RTSegmentAnnotationStorage = "1.2.840.10008.5.1.4.1.1.481.11"; - - /** - * RT Radiation Set Storage, SOPClass - */ - public static final String RTRadiationSetStorage = "1.2.840.10008.5.1.4.1.1.481.12"; - - /** - * C-Arm Photon-Electron Radiation Storage, SOPClass - */ - public static final String CArmPhotonElectronRadiationStorage = "1.2.840.10008.5.1.4.1.1.481.13"; - - /** - * Tomotherapeutic Radiation Storage, SOPClass - */ - public static final String TomotherapeuticRadiationStorage = "1.2.840.10008.5.1.4.1.1.481.14"; - - /** - * Robotic-Arm Radiation Storage, SOPClass - */ - public static final String RoboticArmRadiationStorage = "1.2.840.10008.5.1.4.1.1.481.15"; - - /** - * RT Radiation Record Set Storage, SOPClass - */ - public static final String RTRadiationRecordSetStorage = "1.2.840.10008.5.1.4.1.1.481.16"; - - /** - * RT Radiation Salvage Record Storage, SOPClass - */ - public static final String RTRadiationSalvageRecordStorage = "1.2.840.10008.5.1.4.1.1.481.17"; - - /** - * Tomotherapeutic Radiation Record Storage, SOPClass - */ - public static final String TomotherapeuticRadiationRecordStorage = "1.2.840.10008.5.1.4.1.1.481.18"; - - /** - * C-Arm Photon-Electron Radiation Record Storage, SOPClass - */ - public static final String CArmPhotonElectronRadiationRecordStorage = "1.2.840.10008.5.1.4.1.1.481.19"; - - /** - * Robotic Radiation Record Storage, SOPClass - */ - public static final String RoboticRadiationRecordStorage = "1.2.840.10008.5.1.4.1.1.481.20"; - - /** - * DICOS CT Image Storage, SOPClass - */ - public static final String DICOSCTImageStorage = "1.2.840.10008.5.1.4.1.1.501.1"; - - /** - * DICOS Digital X-Ray Image Storage - For Presentation, SOPClass - */ - public static final String DICOSDigitalXRayImageStorageForPresentation = "1.2.840.10008.5.1.4.1.1.501.2.1"; - - /** - * DICOS Digital X-Ray Image Storage - For Processing, SOPClass - */ - public static final String DICOSDigitalXRayImageStorageForProcessing = "1.2.840.10008.5.1.4.1.1.501.2.2"; - - /** - * DICOS Threat Detection Report Storage, SOPClass - */ - public static final String DICOSThreatDetectionReportStorage = "1.2.840.10008.5.1.4.1.1.501.3"; - - /** - * DICOS 2D AIT Storage, SOPClass - */ - public static final String DICOS2DAITStorage = "1.2.840.10008.5.1.4.1.1.501.4"; - - /** - * DICOS 3D AIT Storage, SOPClass - */ - public static final String DICOS3DAITStorage = "1.2.840.10008.5.1.4.1.1.501.5"; - - /** - * DICOS Quadrupole Resonance (QR) Storage, SOPClass - */ - public static final String DICOSQuadrupoleResonanceQRStorage = "1.2.840.10008.5.1.4.1.1.501.6"; - - /** - * Eddy Current Image Storage, SOPClass - */ - public static final String EddyCurrentImageStorage = "1.2.840.10008.5.1.4.1.1.601.1"; - - /** - * Eddy Current Multi-frame Image Storage, SOPClass - */ - public static final String EddyCurrentMultiFrameImageStorage = "1.2.840.10008.5.1.4.1.1.601.2"; - - /** - * Patient Root Query/Retrieve Information Model - FIND, SOPClass - */ - public static final String PatientRootQueryRetrieveInformationModelFIND = "1.2.840.10008.5.1.4.1.2.1.1"; - - /** - * Patient Root Query/Retrieve Information Model - MOVE, SOPClass - */ - public static final String PatientRootQueryRetrieveInformationModelMOVE = "1.2.840.10008.5.1.4.1.2.1.2"; - - /** - * Patient Root Query/Retrieve Information Model - GET, SOPClass - */ - public static final String PatientRootQueryRetrieveInformationModelGET = "1.2.840.10008.5.1.4.1.2.1.3"; - - /** - * Study Root Query/Retrieve Information Model - FIND, SOPClass - */ - public static final String StudyRootQueryRetrieveInformationModelFIND = "1.2.840.10008.5.1.4.1.2.2.1"; - - /** - * Study Root Query/Retrieve Information Model - MOVE, SOPClass - */ - public static final String StudyRootQueryRetrieveInformationModelMOVE = "1.2.840.10008.5.1.4.1.2.2.2"; - - /** - * Study Root Query/Retrieve Information Model - GET, SOPClass - */ - public static final String StudyRootQueryRetrieveInformationModelGET = "1.2.840.10008.5.1.4.1.2.2.3"; - - /** - * Patient/Study Only Query/Retrieve Information Model - FIND (Retired), SOPClass - */ - public static final String PatientStudyOnlyQueryRetrieveInformationModelFINDRetired = "1.2.840.10008.5.1.4.1.2.3.1"; - - /** - * Patient/Study Only Query/Retrieve Information Model - MOVE (Retired), SOPClass - */ - public static final String PatientStudyOnlyQueryRetrieveInformationModelMOVERetired = "1.2.840.10008.5.1.4.1.2.3.2"; - - /** - * Patient/Study Only Query/Retrieve Information Model - GET (Retired), SOPClass - */ - public static final String PatientStudyOnlyQueryRetrieveInformationModelGETRetired = "1.2.840.10008.5.1.4.1.2.3.3"; - - /** - * Composite Instance Root Retrieve - MOVE, SOPClass - */ - public static final String CompositeInstanceRootRetrieveMOVE = "1.2.840.10008.5.1.4.1.2.4.2"; - - /** - * Composite Instance Root Retrieve - GET, SOPClass - */ - public static final String CompositeInstanceRootRetrieveGET = "1.2.840.10008.5.1.4.1.2.4.3"; - - /** - * Composite Instance Retrieve Without Bulk Data - GET, SOPClass - */ - public static final String CompositeInstanceRetrieveWithoutBulkDataGET = "1.2.840.10008.5.1.4.1.2.5.3"; - - /** - * Defined Procedure Protocol Information Model - FIND, SOPClass - */ - public static final String DefinedProcedureProtocolInformationModelFIND = "1.2.840.10008.5.1.4.20.1"; - - /** - * Defined Procedure Protocol Information Model - MOVE, SOPClass - */ - public static final String DefinedProcedureProtocolInformationModelMOVE = "1.2.840.10008.5.1.4.20.2"; - - /** - * Defined Procedure Protocol Information Model - GET, SOPClass - */ - public static final String DefinedProcedureProtocolInformationModelGET = "1.2.840.10008.5.1.4.20.3"; - - /** - * Modality Worklist Information Model - FIND, SOPClass - */ - public static final String ModalityWorklistInformationModelFIND = "1.2.840.10008.5.1.4.31"; - - /** - * General Purpose Worklist Management Meta SOP Class (Retired), MetaSOPClass - */ - public static final String GeneralPurposeWorklistManagementMetaSOPClassRetired = "1.2.840.10008.5.1.4.32"; - - /** - * General Purpose Worklist Information Model - FIND (Retired), SOPClass - */ - public static final String GeneralPurposeWorklistInformationModelFINDRetired = "1.2.840.10008.5.1.4.32.1"; - - /** - * General Purpose Scheduled Procedure Step SOP Class (Retired), SOPClass - */ - public static final String GeneralPurposeScheduledProcedureStepSOPClassRetired = "1.2.840.10008.5.1.4.32.2"; - - /** - * General Purpose Performed Procedure Step SOP Class (Retired), SOPClass - */ - public static final String GeneralPurposePerformedProcedureStepSOPClassRetired = "1.2.840.10008.5.1.4.32.3"; - - /** - * Instance Availability Notification SOP Class, SOPClass - */ - public static final String InstanceAvailabilityNotificationSOPClass = "1.2.840.10008.5.1.4.33"; - - /** - * RT Beams Delivery Instruction Storage - Trial (Retired), SOPClass - */ - public static final String RTBeamsDeliveryInstructionStorageTrialRetired = "1.2.840.10008.5.1.4.34.1"; - - /** - * RT Conventional Machine Verification - Trial (Retired), SOPClass - */ - public static final String RTConventionalMachineVerificationTrialRetired = "1.2.840.10008.5.1.4.34.2"; - - /** - * RT Ion Machine Verification - Trial (Retired), SOPClass - */ - public static final String RTIonMachineVerificationTrialRetired = "1.2.840.10008.5.1.4.34.3"; - - /** - * Unified Worklist and Procedure Step Service Class - Trial (Retired), ServiceClass - */ - public static final String UnifiedWorklistAndProcedureStepServiceClassTrialRetired = "1.2.840.10008.5.1.4.34.4"; - - /** - * Unified Procedure Step - Push SOP Class - Trial (Retired), SOPClass - */ - public static final String UnifiedProcedureStepPushSOPClassTrialRetired = "1.2.840.10008.5.1.4.34.4.1"; - - /** - * Unified Procedure Step - Watch SOP Class - Trial (Retired), SOPClass - */ - public static final String UnifiedProcedureStepWatchSOPClassTrialRetired = "1.2.840.10008.5.1.4.34.4.2"; - - /** - * Unified Procedure Step - Pull SOP Class - Trial (Retired), SOPClass - */ - public static final String UnifiedProcedureStepPullSOPClassTrialRetired = "1.2.840.10008.5.1.4.34.4.3"; - - /** - * Unified Procedure Step - Event SOP Class - Trial (Retired), SOPClass - */ - public static final String UnifiedProcedureStepEventSOPClassTrialRetired = "1.2.840.10008.5.1.4.34.4.4"; - - /** - * UPS Global Subscription SOP Instance, WellKnownSOPInstance - */ - public static final String UPSGlobalSubscriptionSOPInstance = "1.2.840.10008.5.1.4.34.5"; - - /** - * UPS Filtered Global Subscription SOP Instance, WellKnownSOPInstance - */ - public static final String UPSFilteredGlobalSubscriptionSOPInstance = "1.2.840.10008.5.1.4.34.5.1"; - - /** - * Unified Worklist and Procedure Step Service Class, ServiceClass - */ - public static final String UnifiedWorklistAndProcedureStepServiceClass = "1.2.840.10008.5.1.4.34.6"; - - /** - * Unified Procedure Step - Push SOP Class, SOPClass - */ - public static final String UnifiedProcedureStepPushSOPClass = "1.2.840.10008.5.1.4.34.6.1"; - - /** - * Unified Procedure Step - Watch SOP Class, SOPClass - */ - public static final String UnifiedProcedureStepWatchSOPClass = "1.2.840.10008.5.1.4.34.6.2"; - - /** - * Unified Procedure Step - Pull SOP Class, SOPClass - */ - public static final String UnifiedProcedureStepPullSOPClass = "1.2.840.10008.5.1.4.34.6.3"; - - /** - * Unified Procedure Step - Event SOP Class, SOPClass - */ - public static final String UnifiedProcedureStepEventSOPClass = "1.2.840.10008.5.1.4.34.6.4"; - - /** - * Unified Procedure Step - Query SOP Class, SOPClass - */ - public static final String UnifiedProcedureStepQuerySOPClass = "1.2.840.10008.5.1.4.34.6.5"; - - /** - * RT Beams Delivery Instruction Storage, SOPClass - */ - public static final String RTBeamsDeliveryInstructionStorage = "1.2.840.10008.5.1.4.34.7"; - - /** - * RT Conventional Machine Verification, SOPClass - */ - public static final String RTConventionalMachineVerification = "1.2.840.10008.5.1.4.34.8"; - - /** - * RT Ion Machine Verification, SOPClass - */ - public static final String RTIonMachineVerification = "1.2.840.10008.5.1.4.34.9"; - - /** - * RT Brachy Application Setup Delivery Instruction Storage, SOPClass - */ - public static final String RTBrachyApplicationSetupDeliveryInstructionStorage = "1.2.840.10008.5.1.4.34.10"; - - /** - * General Relevant Patient Information Query, SOPClass - */ - public static final String GeneralRelevantPatientInformationQuery = "1.2.840.10008.5.1.4.37.1"; - - /** - * Breast Imaging Relevant Patient Information Query, SOPClass - */ - public static final String BreastImagingRelevantPatientInformationQuery = "1.2.840.10008.5.1.4.37.2"; - - /** - * Cardiac Relevant Patient Information Query, SOPClass - */ - public static final String CardiacRelevantPatientInformationQuery = "1.2.840.10008.5.1.4.37.3"; - - /** - * Hanging Protocol Storage, SOPClass - */ - public static final String HangingProtocolStorage = "1.2.840.10008.5.1.4.38.1"; - - /** - * Hanging Protocol Information Model - FIND, SOPClass - */ - public static final String HangingProtocolInformationModelFIND = "1.2.840.10008.5.1.4.38.2"; - - /** - * Hanging Protocol Information Model - MOVE, SOPClass - */ - public static final String HangingProtocolInformationModelMOVE = "1.2.840.10008.5.1.4.38.3"; - - /** - * Hanging Protocol Information Model - GET, SOPClass - */ - public static final String HangingProtocolInformationModelGET = "1.2.840.10008.5.1.4.38.4"; - - /** - * Color Palette Storage, SOPClass - */ - public static final String ColorPaletteStorage = "1.2.840.10008.5.1.4.39.1"; - - /** - * Color Palette Query/Retrieve Information Model - FIND, SOPClass - */ - public static final String ColorPaletteQueryRetrieveInformationModelFIND = "1.2.840.10008.5.1.4.39.2"; - - /** - * Color Palette Query/Retrieve Information Model - MOVE, SOPClass - */ - public static final String ColorPaletteQueryRetrieveInformationModelMOVE = "1.2.840.10008.5.1.4.39.3"; - - /** - * Color Palette Query/Retrieve Information Model - GET, SOPClass - */ - public static final String ColorPaletteQueryRetrieveInformationModelGET = "1.2.840.10008.5.1.4.39.4"; - - /** - * Product Characteristics Query SOP Class, SOPClass - */ - public static final String ProductCharacteristicsQuerySOPClass = "1.2.840.10008.5.1.4.41"; - - /** - * Substance Approval Query SOP Class, SOPClass - */ - public static final String SubstanceApprovalQuerySOPClass = "1.2.840.10008.5.1.4.42"; - - /** - * Generic Implant Template Storage, SOPClass - */ - public static final String GenericImplantTemplateStorage = "1.2.840.10008.5.1.4.43.1"; - - /** - * Generic Implant Template Information Model - FIND, SOPClass - */ - public static final String GenericImplantTemplateInformationModelFIND = "1.2.840.10008.5.1.4.43.2"; - - /** - * Generic Implant Template Information Model - MOVE, SOPClass - */ - public static final String GenericImplantTemplateInformationModelMOVE = "1.2.840.10008.5.1.4.43.3"; - - /** - * Generic Implant Template Information Model - GET, SOPClass - */ - public static final String GenericImplantTemplateInformationModelGET = "1.2.840.10008.5.1.4.43.4"; - - /** - * Implant Assembly Template Storage, SOPClass - */ - public static final String ImplantAssemblyTemplateStorage = "1.2.840.10008.5.1.4.44.1"; - - /** - * Implant Assembly Template Information Model - FIND, SOPClass - */ - public static final String ImplantAssemblyTemplateInformationModelFIND = "1.2.840.10008.5.1.4.44.2"; - - /** - * Implant Assembly Template Information Model - MOVE, SOPClass - */ - public static final String ImplantAssemblyTemplateInformationModelMOVE = "1.2.840.10008.5.1.4.44.3"; - - /** - * Implant Assembly Template Information Model - GET, SOPClass - */ - public static final String ImplantAssemblyTemplateInformationModelGET = "1.2.840.10008.5.1.4.44.4"; - - /** - * Implant Template Group Storage, SOPClass - */ - public static final String ImplantTemplateGroupStorage = "1.2.840.10008.5.1.4.45.1"; - - /** - * Implant Template Group Information Model - FIND, SOPClass - */ - public static final String ImplantTemplateGroupInformationModelFIND = "1.2.840.10008.5.1.4.45.2"; - - /** - * Implant Template Group Information Model - MOVE, SOPClass - */ - public static final String ImplantTemplateGroupInformationModelMOVE = "1.2.840.10008.5.1.4.45.3"; - - /** - * Implant Template Group Information Model - GET, SOPClass - */ - public static final String ImplantTemplateGroupInformationModelGET = "1.2.840.10008.5.1.4.45.4"; - - /** - * Native DICOM Model, ApplicationHostingModel - */ - public static final String NativeDICOMModel = "1.2.840.10008.7.1.1"; - - /** - * Abstract Multi-Dimensional Image Model, ApplicationHostingModel - */ - public static final String AbstractMultiDimensionalImageModel = "1.2.840.10008.7.1.2"; - - /** - * DICOM Content Mapping Resource, MappingResource - */ - public static final String DICOMContentMappingResource = "1.2.840.10008.8.1.1"; - - /** - * Video Endoscopic Image Real-Time Communication, SOPClass - */ - public static final String VideoEndoscopicImageRealTimeCommunication = "1.2.840.10008.10.1"; - - /** - * Video Photographic Image Real-Time Communication, SOPClass - */ - public static final String VideoPhotographicImageRealTimeCommunication = "1.2.840.10008.10.2"; - - /** - * Audio Waveform Real-Time Communication, SOPClass - */ - public static final String AudioWaveformRealTimeCommunication = "1.2.840.10008.10.3"; - - /** - * Rendition Selection Document Real-Time Communication, SOPClass - */ - public static final String RenditionSelectionDocumentRealTimeCommunication = "1.2.840.10008.10.4"; - - /** - * dicomDeviceName, LDAPOID - */ - public static final String dicomDeviceName = "1.2.840.10008.15.0.3.1"; - - /** - * dicomDescription, LDAPOID - */ - public static final String dicomDescription = "1.2.840.10008.15.0.3.2"; - - /** - * dicomManufacturer, LDAPOID - */ - public static final String dicomManufacturer = "1.2.840.10008.15.0.3.3"; - - /** - * dicomManufacturerModelName, LDAPOID - */ - public static final String dicomManufacturerModelName = "1.2.840.10008.15.0.3.4"; - - /** - * dicomSoftwareVersion, LDAPOID - */ - public static final String dicomSoftwareVersion = "1.2.840.10008.15.0.3.5"; - - /** - * dicomVendorData, LDAPOID - */ - public static final String dicomVendorData = "1.2.840.10008.15.0.3.6"; - - /** - * dicomAETitle, LDAPOID - */ - public static final String dicomAETitle = "1.2.840.10008.15.0.3.7"; - - /** - * dicomNetworkConnectionReference, LDAPOID - */ - public static final String dicomNetworkConnectionReference = "1.2.840.10008.15.0.3.8"; - - /** - * dicomApplicationCluster, LDAPOID - */ - public static final String dicomApplicationCluster = "1.2.840.10008.15.0.3.9"; - - /** - * dicomAssociationInitiator, LDAPOID - */ - public static final String dicomAssociationInitiator = "1.2.840.10008.15.0.3.10"; - - /** - * dicomAssociationAcceptor, LDAPOID - */ - public static final String dicomAssociationAcceptor = "1.2.840.10008.15.0.3.11"; - - /** - * dicomHostname, LDAPOID - */ - public static final String dicomHostname = "1.2.840.10008.15.0.3.12"; - - /** - * dicomPort, LDAPOID - */ - public static final String dicomPort = "1.2.840.10008.15.0.3.13"; - - /** - * dicomSOPClass, LDAPOID - */ - public static final String dicomSOPClass = "1.2.840.10008.15.0.3.14"; - - /** - * dicomTransferRole, LDAPOID - */ - public static final String dicomTransferRole = "1.2.840.10008.15.0.3.15"; - - /** - * dicomTransferSyntax, LDAPOID - */ - public static final String dicomTransferSyntax = "1.2.840.10008.15.0.3.16"; - - /** - * dicomPrimaryDeviceType, LDAPOID - */ - public static final String dicomPrimaryDeviceType = "1.2.840.10008.15.0.3.17"; - - /** - * dicomRelatedDeviceReference, LDAPOID - */ - public static final String dicomRelatedDeviceReference = "1.2.840.10008.15.0.3.18"; - - /** - * dicomPreferredCalledAETitle, LDAPOID - */ - public static final String dicomPreferredCalledAETitle = "1.2.840.10008.15.0.3.19"; - - /** - * dicomTLSCyphersuite, LDAPOID - */ - public static final String dicomTLSCyphersuite = "1.2.840.10008.15.0.3.20"; - - /** - * dicomAuthorizedNodeCertificateReference, LDAPOID - */ - public static final String dicomAuthorizedNodeCertificateReference = "1.2.840.10008.15.0.3.21"; - - /** - * dicomThisNodeCertificateReference, LDAPOID - */ - public static final String dicomThisNodeCertificateReference = "1.2.840.10008.15.0.3.22"; - - /** - * dicomInstalled, LDAPOID - */ - public static final String dicomInstalled = "1.2.840.10008.15.0.3.23"; - - /** - * dicomStationName, LDAPOID - */ - public static final String dicomStationName = "1.2.840.10008.15.0.3.24"; - - /** - * dicomDeviceSerialNumber, LDAPOID - */ - public static final String dicomDeviceSerialNumber = "1.2.840.10008.15.0.3.25"; - - /** - * dicomInstitutionName, LDAPOID - */ - public static final String dicomInstitutionName = "1.2.840.10008.15.0.3.26"; - - /** - * dicomInstitutionAddress, LDAPOID - */ - public static final String dicomInstitutionAddress = "1.2.840.10008.15.0.3.27"; - - /** - * dicomInstitutionDepartmentName, LDAPOID - */ - public static final String dicomInstitutionDepartmentName = "1.2.840.10008.15.0.3.28"; - - /** - * dicomIssuerOfPatientID, LDAPOID - */ - public static final String dicomIssuerOfPatientID = "1.2.840.10008.15.0.3.29"; - - /** - * dicomPreferredCallingAETitle, LDAPOID - */ - public static final String dicomPreferredCallingAETitle = "1.2.840.10008.15.0.3.30"; - - /** - * dicomSupportedCharacterSet, LDAPOID - */ - public static final String dicomSupportedCharacterSet = "1.2.840.10008.15.0.3.31"; - - /** - * dicomConfigurationRoot, LDAPOID - */ - public static final String dicomConfigurationRoot = "1.2.840.10008.15.0.4.1"; - - /** - * dicomDevicesRoot, LDAPOID - */ - public static final String dicomDevicesRoot = "1.2.840.10008.15.0.4.2"; - - /** - * dicomUniqueAETitlesRegistryRoot, LDAPOID - */ - public static final String dicomUniqueAETitlesRegistryRoot = "1.2.840.10008.15.0.4.3"; - - /** - * dicomDevice, LDAPOID - */ - public static final String dicomDevice = "1.2.840.10008.15.0.4.4"; - - /** - * dicomNetworkAE, LDAPOID - */ - public static final String dicomNetworkAE = "1.2.840.10008.15.0.4.5"; - - /** - * dicomNetworkConnection, LDAPOID - */ - public static final String dicomNetworkConnection = "1.2.840.10008.15.0.4.6"; - - /** - * dicomUniqueAETitle, LDAPOID - */ - public static final String dicomUniqueAETitle = "1.2.840.10008.15.0.4.7"; - - /** - * dicomTransferCapability, LDAPOID - */ - public static final String dicomTransferCapability = "1.2.840.10008.15.0.4.8"; - - /** - * Universal Coordinated Time, SynchronizationFrameOfReference - */ - public static final String UniversalCoordinatedTime = "1.2.840.10008.15.1.1"; - - /** - * Private Agfa Basic Attribute Presentation State, SOPClass - */ - public static final String PrivateAgfaBasicAttributePresentationState = "1.2.124.113532.3500.7"; - - /** - * Private Agfa Arrival Transaction, SOPClass - */ - public static final String PrivateAgfaArrivalTransaction = "1.2.124.113532.3500.8.1"; - - /** - * Private Agfa Dictation Transaction, SOPClass - */ - public static final String PrivateAgfaDictationTransaction = "1.2.124.113532.3500.8.2"; - - /** - * Private Agfa Report Transcription Transaction, SOPClass - */ - public static final String PrivateAgfaReportTranscriptionTransaction = "1.2.124.113532.3500.8.3"; - - /** - * Private Agfa Report Approval Transaction, SOPClass - */ - public static final String PrivateAgfaReportApprovalTransaction = "1.2.124.113532.3500.8.4"; - - /** - * Private TomTec Annotation Storage, SOPClass - */ - public static final String PrivateTomTecAnnotationStorage = "1.2.276.0.48.5.1.4.1.1.7"; - - /** - * Private Toshiba US Image Storage, SOPClass - */ - public static final String PrivateToshibaUSImageStorage = "1.2.392.200036.9116.7.8.1.1.1"; - - /** - * Private Fuji CR Image Storage, SOPClass - */ - public static final String PrivateFujiCRImageStorage = "1.2.392.200036.9125.1.1.2"; - - /** - * Private GE Collage Storage, SOPClass - */ - public static final String PrivateGECollageStorage = "1.2.528.1.1001.5.1.1.1"; - - /** - * Private ERAD Practice Builder Report Text Storage, SOPClass - */ - public static final String PrivateERADPracticeBuilderReportTextStorage = "1.2.826.0.1.3680043.293.1.0.1"; - - /** - * Private ERAD Practice Builder Report Dictation Storage, SOPClass - */ - public static final String PrivateERADPracticeBuilderReportDictationStorage = "1.2.826.0.1.3680043.293.1.0.2"; - - /** - * Private Philips HP Live 3D 01 Storage, SOPClass - */ - public static final String PrivatePhilipsHPLive3D01Storage = "1.2.840.113543.6.6.1.3.10001"; - - /** - * Private Philips HP Live 3D 02 Storage, SOPClass - */ - public static final String PrivatePhilipsHPLive3D02Storage = "1.2.840.113543.6.6.1.3.10002"; - - /** - * Private GE 3D Model Storage, SOPClass - */ - public static final String PrivateGE3DModelStorage = "1.2.840.113619.4.26"; - - /** - * Private GE Dicom CT Image Info Object, SOPClass - */ - public static final String PrivateGEDicomCTImageInfoObject = "1.2.840.113619.4.3"; - - /** - * Private GE Dicom Display Image Info Object, SOPClass - */ - public static final String PrivateGEDicomDisplayImageInfoObject = "1.2.840.113619.4.4"; - - /** - * Private GE Dicom MR Image Info Object, SOPClass - */ - public static final String PrivateGEDicomMRImageInfoObject = "1.2.840.113619.4.2"; - - /** - * Private GE eNTEGRA Protocol or NM Genie Storage, SOPClass - */ - public static final String PrivateGEeNTEGRAProtocolOrNMGenieStorage = "1.2.840.113619.4.27"; - - /** - * Private GE PET Raw Data Storage, SOPClass - */ - public static final String PrivateGEPETRawDataStorage = "1.2.840.113619.4.30"; - - /** - * Private GE RT Plan Storage, SOPClass - */ - public static final String PrivateGERTPlanStorage = "1.2.840.113619.4.5.249"; - - /** - * Private PixelMed Legacy Converted Enhanced CT Image Storage, SOPClass - */ - public static final String PrivatePixelMedLegacyConvertedEnhancedCTImageStorage = "1.3.6.1.4.1.5962.301.1"; - - /** - * Private PixelMed Legacy Converted Enhanced MR Image Storage, SOPClass - */ - public static final String PrivatePixelMedLegacyConvertedEnhancedMRImageStorage = "1.3.6.1.4.1.5962.301.2"; - - /** - * Private PixelMed Legacy Converted Enhanced PET Image Storage, SOPClass - */ - public static final String PrivatePixelMedLegacyConvertedEnhancedPETImageStorage = "1.3.6.1.4.1.5962.301.3"; - - /** - * Private PixelMed Floating Point Image Storage, SOPClass - */ - public static final String PrivatePixelMedFloatingPointImageStorage = "1.3.6.1.4.1.5962.301.9"; - - /** - * Private Siemens CSA Non Image Storage, SOPClass - */ - public static final String PrivateSiemensCSANonImageStorage = "1.3.12.2.1107.5.9.1"; - - /** - * Private Siemens CT MR Volume Storage, SOPClass - */ - public static final String PrivateSiemensCTMRVolumeStorage = "1.3.12.2.1107.5.99.3.10"; - - /** - * Private Siemens AX Frame Sets Storage, SOPClass - */ - public static final String PrivateSiemensAXFrameSetsStorage = "1.3.12.2.1107.5.99.3.11"; - - /** - * Private Philips Specialised XA Storage, SOPClass - */ - public static final String PrivatePhilipsSpecialisedXAStorage = "1.3.46.670589.2.3.1.1"; - - /** - * Private Philips CX Image Storage, SOPClass - */ - public static final String PrivatePhilipsCXImageStorage = "1.3.46.670589.2.4.1.1"; - - /** - * Private Philips 3D Presentation State Storage, SOPClass - */ - public static final String PrivatePhilips3DPresentationStateStorage = "1.3.46.670589.2.5.1.1"; - - /** - * Private Philips VRML Storage, SOPClass - */ - public static final String PrivatePhilipsVRMLStorage = "1.3.46.670589.2.8.1.1"; - - /** - * Private Philips Volume Set Storage, SOPClass - */ - public static final String PrivatePhilipsVolumeSetStorage = "1.3.46.670589.2.11.1.1"; - - /** - * Private Philips Volume Storage (Retired), SOPClass - */ - public static final String PrivatePhilipsVolumeStorageRetired = "1.3.46.670589.5.0.1"; - - /** - * Private Philips Volume Storage, SOPClass - */ - public static final String PrivatePhilipsVolumeStorage = "1.3.46.670589.5.0.1.1"; - - /** - * Private Philips 3D Object Storage (Retired), SOPClass - */ - public static final String PrivatePhilips3DObjectStorageRetired = "1.3.46.670589.5.0.2"; - - /** - * Private Philips 3D Object Storage, SOPClass - */ - public static final String PrivatePhilips3DObjectStorage = "1.3.46.670589.5.0.2.1"; - - /** - * Private Philips Surface Storage (Retired), SOPClass - */ - public static final String PrivatePhilipsSurfaceStorageRetired = "1.3.46.670589.5.0.3"; - - /** - * Private Philips Surface Storage, SOPClass - */ - public static final String PrivatePhilipsSurfaceStorage = "1.3.46.670589.5.0.3.1"; - - /** - * Private Philips Composite Object Storage, SOPClass - */ - public static final String PrivatePhilipsCompositeObjectStorage = "1.3.46.670589.5.0.4"; - - /** - * Private Philips MR Cardio Profile Storage, SOPClass - */ - public static final String PrivatePhilipsMRCardioProfileStorage = "1.3.46.670589.5.0.7"; - - /** - * Private Philips MR Cardio Storage (Retired), SOPClass - */ - public static final String PrivatePhilipsMRCardioStorageRetired = "1.3.46.670589.5.0.8"; - - /** - * Private Philips MR Cardio Storage, SOPClass - */ - public static final String PrivatePhilipsMRCardioStorage = "1.3.46.670589.5.0.8.1"; - - /** - * Private Philips CT Synthetic Image Storage, SOPClass - */ - public static final String PrivatePhilipsCTSyntheticImageStorage = "1.3.46.670589.5.0.9"; - - /** - * Private Philips MR Synthetic Image Storage, SOPClass - */ - public static final String PrivatePhilipsMRSyntheticImageStorage = "1.3.46.670589.5.0.10"; - - /** - * Private Philips MR Cardio Analysis Storage (Retired), SOPClass - */ - public static final String PrivatePhilipsMRCardioAnalysisStorageRetired = "1.3.46.670589.5.0.11"; - - /** - * Private Philips MR Cardio Analysis Storage, SOPClass - */ - public static final String PrivatePhilipsMRCardioAnalysisStorage = "1.3.46.670589.5.0.11.1"; - - /** - * Private Philips CX Synthetic Image Storage, SOPClass - */ - public static final String PrivatePhilipsCXSyntheticImageStorage = "1.3.46.670589.5.0.12"; - - /** - * Private Philips Perfusion Storage, SOPClass - */ - public static final String PrivatePhilipsPerfusionStorage = "1.3.46.670589.5.0.13"; - - /** - * Private Philips Perfusion Image Storage, SOPClass - */ - public static final String PrivatePhilipsPerfusionImageStorage = "1.3.46.670589.5.0.14"; - - /** - * Private Philips X-Ray MF Storage, SOPClass - */ - public static final String PrivatePhilipsXRayMFStorage = "1.3.46.670589.7.8.1618510091"; - - /** - * Private Philips Live Run Storage, SOPClass - */ - public static final String PrivatePhilipsLiveRunStorage = "1.3.46.670589.7.8.1618510092"; - - /** - * Private Philips Run Storage, SOPClass - */ - public static final String PrivatePhilipsRunStorage = "1.3.46.670589.7.8.16185100129"; - - /** - * Private Philips Reconstruction Storage, SOPClass - */ - public static final String PrivatePhilipsReconstructionStorage = "1.3.46.670589.7.8.16185100130"; - - /** - * Private Philips MR Spectrum Storage, SOPClass +public enum UID { + + Verification("1.2.840.10008.1.1", "Verification SOP Class"), + ImplicitVRLittleEndian("1.2.840.10008.1.2", "Implicit VR Little Endian"), + ExplicitVRLittleEndian("1.2.840.10008.1.2.1", "Explicit VR Little Endian"), + EncapsulatedUncompressedExplicitVRLittleEndian("1.2.840.10008.1.2.1.98", "Encapsulated Uncompressed Explicit VR Little Endian"), + DeflatedExplicitVRLittleEndian("1.2.840.10008.1.2.1.99", "Deflated Explicit VR Little Endian"), + ExplicitVRBigEndian("1.2.840.10008.1.2.2", "Explicit VR Big Endian (Retired)"), + JPEGBaseline8Bit("1.2.840.10008.1.2.4.50", "JPEG Baseline (Process 1)"), + JPEGExtended12Bit("1.2.840.10008.1.2.4.51", "JPEG Extended (Process 2 & 4)"), + JPEGExtended35("1.2.840.10008.1.2.4.52", "JPEG Extended (Process 3 & 5) (Retired)"), + JPEGSpectralSelectionNonHierarchical68("1.2.840.10008.1.2.4.53", "JPEG Spectral Selection"), + JPEGSpectralSelectionNonHierarchical79("1.2.840.10008.1.2.4.54", "JPEG Spectral Selection"), + JPEGFullProgressionNonHierarchical1012("1.2.840.10008.1.2.4.55", "JPEG Full Progression"), + JPEGFullProgressionNonHierarchical1113("1.2.840.10008.1.2.4.56", "JPEG Full Progression"), + JPEGLossless("1.2.840.10008.1.2.4.57", "JPEG Lossless"), + JPEGLosslessNonHierarchical15("1.2.840.10008.1.2.4.58", "JPEG Lossless"), + JPEGExtendedHierarchical1618("1.2.840.10008.1.2.4.59", "JPEG Extended"), + JPEGExtendedHierarchical1719("1.2.840.10008.1.2.4.60", "JPEG Extended"), + JPEGSpectralSelectionHierarchical2022("1.2.840.10008.1.2.4.61", "JPEG Spectral Selection"), + JPEGSpectralSelectionHierarchical2123("1.2.840.10008.1.2.4.62", "JPEG Spectral Selection"), + JPEGFullProgressionHierarchical2426("1.2.840.10008.1.2.4.63", "JPEG Full Progression"), + JPEGFullProgressionHierarchical2527("1.2.840.10008.1.2.4.64", "JPEG Full Progression"), + JPEGLosslessHierarchical28("1.2.840.10008.1.2.4.65", "JPEG Lossless"), + JPEGLosslessHierarchical29("1.2.840.10008.1.2.4.66", "JPEG Lossless"), + JPEGLosslessSV1("1.2.840.10008.1.2.4.70", "JPEG Lossless"), + JPEGLSLossless("1.2.840.10008.1.2.4.80", "JPEG-LS Lossless Image Compression"), + JPEGLSNearLossless("1.2.840.10008.1.2.4.81", "JPEG-LS Lossy (Near-Lossless) Image Compression"), + JPEG2000Lossless("1.2.840.10008.1.2.4.90", "JPEG 2000 Image Compression (Lossless Only)"), + JPEG2000("1.2.840.10008.1.2.4.91", "JPEG 2000 Image Compression"), + JPEG2000MCLossless("1.2.840.10008.1.2.4.92", "JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only)"), + JPEG2000MC("1.2.840.10008.1.2.4.93", "JPEG 2000 Part 2 Multi-component Image Compression"), + JPIPReferenced("1.2.840.10008.1.2.4.94", "JPIP Referenced"), + JPIPReferencedDeflate("1.2.840.10008.1.2.4.95", "JPIP Referenced Deflate"), + MPEG2MPML("1.2.840.10008.1.2.4.100", "MPEG2 Main Profile / Main Level"), + MPEG2MPMLF("1.2.840.10008.1.2.4.100.1", "Fragmentable MPEG2 Main Profile / Main Level"), + MPEG2MPHL("1.2.840.10008.1.2.4.101", "MPEG2 Main Profile / High Level"), + MPEG2MPHLF("1.2.840.10008.1.2.4.101.1", "Fragmentable MPEG2 Main Profile / High Level"), + MPEG4HP41("1.2.840.10008.1.2.4.102", "MPEG-4 AVC/H.264 High Profile / Level 4.1"), + MPEG4HP41F("1.2.840.10008.1.2.4.102.1", "Fragmentable MPEG-4 AVC/H.264 High Profile / Level 4.1"), + MPEG4HP41BD("1.2.840.10008.1.2.4.103", "MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1"), + MPEG4HP41BDF("1.2.840.10008.1.2.4.103.1", "Fragmentable MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1"), + MPEG4HP422D("1.2.840.10008.1.2.4.104", "MPEG-4 AVC/H.264 High Profile / Level 4.2 For 2D Video"), + MPEG4HP422DF("1.2.840.10008.1.2.4.104.1", "Fragmentable MPEG-4 AVC/H.264 High Profile / Level 4.2 For 2D Video"), + MPEG4HP423D("1.2.840.10008.1.2.4.105", "MPEG-4 AVC/H.264 High Profile / Level 4.2 For 3D Video"), + MPEG4HP423DF("1.2.840.10008.1.2.4.105.1", "Fragmentable MPEG-4 AVC/H.264 High Profile / Level 4.2 For 3D Video"), + MPEG4HP42STEREO("1.2.840.10008.1.2.4.106", "MPEG-4 AVC/H.264 Stereo High Profile / Level 4.2"), + MPEG4HP42STEREOF("1.2.840.10008.1.2.4.106.1", "Fragmentable MPEG-4 AVC/H.264 Stereo High Profile / Level 4.2"), + HEVCMP51("1.2.840.10008.1.2.4.107", "HEVC/H.265 Main Profile / Level 5.1"), + HEVCM10P51("1.2.840.10008.1.2.4.108", "HEVC/H.265 Main 10 Profile / Level 5.1"), + HTJ2KLossless("1.2.840.10008.1.2.4.201", "High-Throughput JPEG 2000 Image Compression (Lossless Only)"), + HTJ2KLosslessRPCL("1.2.840.10008.1.2.4.202", "High-Throughput JPEG 2000 with RPCL Options Image Compression (Lossless Only)"), + HTJ2K("1.2.840.10008.1.2.4.203", "High-Throughput JPEG 2000 Image Compression"), + JPIPHTJ2KReferenced("1.2.840.10008.1.2.4.204", "JPIP HTJ2K Referenced"), + JPIPHTJ2KReferencedDeflate("1.2.840.10008.1.2.4.205", "JPIP HTJ2K Referenced Deflate"), + RLELossless("1.2.840.10008.1.2.5", "RLE Lossless"), + RFC2557MIMEEncapsulation("1.2.840.10008.1.2.6.1", "RFC 2557 MIME encapsulation (Retired)"), + XMLEncoding("1.2.840.10008.1.2.6.2", "XML Encoding (Retired)"), + SMPTEST211020UncompressedProgressiveActiveVideo("1.2.840.10008.1.2.7.1", "SMPTE ST 2110-20 Uncompressed Progressive Active Video"), + SMPTEST211020UncompressedInterlacedActiveVideo("1.2.840.10008.1.2.7.2", "SMPTE ST 2110-20 Uncompressed Interlaced Active Video"), + SMPTEST211030PCMDigitalAudio("1.2.840.10008.1.2.7.3", "SMPTE ST 2110-30 PCM Digital Audio"), + MediaStorageDirectoryStorage("1.2.840.10008.1.3.10", "Media Storage Directory Storage"), + HotIronPalette("1.2.840.10008.1.5.1", "Hot Iron Color Palette SOP Instance"), + PETPalette("1.2.840.10008.1.5.2", "PET Color Palette SOP Instance"), + HotMetalBluePalette("1.2.840.10008.1.5.3", "Hot Metal Blue Color Palette SOP Instance"), + PET20StepPalette("1.2.840.10008.1.5.4", "PET 20 Step Color Palette SOP Instance"), + SpringPalette("1.2.840.10008.1.5.5", "Spring Color Palette SOP Instance"), + SummerPalette("1.2.840.10008.1.5.6", "Summer Color Palette SOP Instance"), + FallPalette("1.2.840.10008.1.5.7", "Fall Color Palette SOP Instance"), + WinterPalette("1.2.840.10008.1.5.8", "Winter Color Palette SOP Instance"), + BasicStudyContentNotification("1.2.840.10008.1.9", "Basic Study Content Notification SOP Class (Retired)"), + Papyrus3ImplicitVRLittleEndian("1.2.840.10008.1.20", "Papyrus 3 Implicit VR Little Endian (Retired)"), + StorageCommitmentPushModel("1.2.840.10008.1.20.1", "Storage Commitment Push Model SOP Class"), + StorageCommitmentPushModelInstance("1.2.840.10008.1.20.1.1", "Storage Commitment Push Model SOP Instance"), + StorageCommitmentPullModel("1.2.840.10008.1.20.2", "Storage Commitment Pull Model SOP Class (Retired)"), + StorageCommitmentPullModelInstance("1.2.840.10008.1.20.2.1", "Storage Commitment Pull Model SOP Instance (Retired)"), + ProceduralEventLogging("1.2.840.10008.1.40", "Procedural Event Logging SOP Class"), + ProceduralEventLoggingInstance("1.2.840.10008.1.40.1", "Procedural Event Logging SOP Instance"), + SubstanceAdministrationLogging("1.2.840.10008.1.42", "Substance Administration Logging SOP Class"), + SubstanceAdministrationLoggingInstance("1.2.840.10008.1.42.1", "Substance Administration Logging SOP Instance"), + DCMUID("1.2.840.10008.2.6.1", "DICOM UID Registry"), + DCM("1.2.840.10008.2.16.4", "DICOM Controlled Terminology"), + MA("1.2.840.10008.2.16.5", "Adult Mouse Anatomy Ontology"), + UBERON("1.2.840.10008.2.16.6", "Uberon Ontology"), + ITIS_TSN("1.2.840.10008.2.16.7", "Integrated Taxonomic Information System (ITIS) Taxonomic Serial Number (TSN)"), + MGI("1.2.840.10008.2.16.8", "Mouse Genome Initiative (MGI)"), + PUBCHEM_CID("1.2.840.10008.2.16.9", "PubChem Compound CID"), + DC("1.2.840.10008.2.16.10", "Dublin Core"), + NYUMCCG("1.2.840.10008.2.16.11", "New York University Melanoma Clinical Cooperative Group"), + MAYONRISBSASRG("1.2.840.10008.2.16.12", "Mayo Clinic Non-radiological Images Specific Body Structure Anatomical Surface Region Guide"), + IBSI("1.2.840.10008.2.16.13", "Image Biomarker Standardisation Initiative"), + RO("1.2.840.10008.2.16.14", "Radiomics Ontology"), + RADELEMENT("1.2.840.10008.2.16.15", "RadElement"), + I11("1.2.840.10008.2.16.16", "ICD-11"), + UNS("1.2.840.10008.2.16.17", "Unified numbering system (UNS) for metals and alloys"), + RRID("1.2.840.10008.2.16.18", "Research Resource Identification"), + DICOMApplicationContext("1.2.840.10008.3.1.1.1", "DICOM Application Context Name"), + DetachedPatientManagement("1.2.840.10008.3.1.2.1.1", "Detached Patient Management SOP Class (Retired)"), + DetachedPatientManagementMeta("1.2.840.10008.3.1.2.1.4", "Detached Patient Management Meta SOP Class (Retired)"), + DetachedVisitManagement("1.2.840.10008.3.1.2.2.1", "Detached Visit Management SOP Class (Retired)"), + DetachedStudyManagement("1.2.840.10008.3.1.2.3.1", "Detached Study Management SOP Class (Retired)"), + StudyComponentManagement("1.2.840.10008.3.1.2.3.2", "Study Component Management SOP Class (Retired)"), + ModalityPerformedProcedureStep("1.2.840.10008.3.1.2.3.3", "Modality Performed Procedure Step SOP Class"), + ModalityPerformedProcedureStepRetrieve("1.2.840.10008.3.1.2.3.4", "Modality Performed Procedure Step Retrieve SOP Class"), + ModalityPerformedProcedureStepNotification("1.2.840.10008.3.1.2.3.5", "Modality Performed Procedure Step Notification SOP Class"), + DetachedResultsManagement("1.2.840.10008.3.1.2.5.1", "Detached Results Management SOP Class (Retired)"), + DetachedResultsManagementMeta("1.2.840.10008.3.1.2.5.4", "Detached Results Management Meta SOP Class (Retired)"), + DetachedStudyManagementMeta("1.2.840.10008.3.1.2.5.5", "Detached Study Management Meta SOP Class (Retired)"), + DetachedInterpretationManagement("1.2.840.10008.3.1.2.6.1", "Detached Interpretation Management SOP Class (Retired)"), + Storage("1.2.840.10008.4.2", "Storage Service Class"), + BasicFilmSession("1.2.840.10008.5.1.1.1", "Basic Film Session SOP Class"), + BasicFilmBox("1.2.840.10008.5.1.1.2", "Basic Film Box SOP Class"), + BasicGrayscaleImageBox("1.2.840.10008.5.1.1.4", "Basic Grayscale Image Box SOP Class"), + BasicColorImageBox("1.2.840.10008.5.1.1.4.1", "Basic Color Image Box SOP Class"), + ReferencedImageBox("1.2.840.10008.5.1.1.4.2", "Referenced Image Box SOP Class (Retired)"), + BasicGrayscalePrintManagementMeta("1.2.840.10008.5.1.1.9", "Basic Grayscale Print Management Meta SOP Class"), + ReferencedGrayscalePrintManagementMeta("1.2.840.10008.5.1.1.9.1", "Referenced Grayscale Print Management Meta SOP Class (Retired)"), + PrintJob("1.2.840.10008.5.1.1.14", "Print Job SOP Class"), + BasicAnnotationBox("1.2.840.10008.5.1.1.15", "Basic Annotation Box SOP Class"), + Printer("1.2.840.10008.5.1.1.16", "Printer SOP Class"), + PrinterConfigurationRetrieval("1.2.840.10008.5.1.1.16.376", "Printer Configuration Retrieval SOP Class"), + PrinterInstance("1.2.840.10008.5.1.1.17", "Printer SOP Instance"), + PrinterConfigurationRetrievalInstance("1.2.840.10008.5.1.1.17.376", "Printer Configuration Retrieval SOP Instance"), + BasicColorPrintManagementMeta("1.2.840.10008.5.1.1.18", "Basic Color Print Management Meta SOP Class"), + ReferencedColorPrintManagementMeta("1.2.840.10008.5.1.1.18.1", "Referenced Color Print Management Meta SOP Class (Retired)"), + VOILUTBox("1.2.840.10008.5.1.1.22", "VOI LUT Box SOP Class"), + PresentationLUT("1.2.840.10008.5.1.1.23", "Presentation LUT SOP Class"), + ImageOverlayBox("1.2.840.10008.5.1.1.24", "Image Overlay Box SOP Class (Retired)"), + BasicPrintImageOverlayBox("1.2.840.10008.5.1.1.24.1", "Basic Print Image Overlay Box SOP Class (Retired)"), + PrintQueueInstance("1.2.840.10008.5.1.1.25", "Print Queue SOP Instance (Retired)"), + PrintQueueManagement("1.2.840.10008.5.1.1.26", "Print Queue Management SOP Class (Retired)"), + StoredPrintStorage("1.2.840.10008.5.1.1.27", "Stored Print Storage SOP Class (Retired)"), + HardcopyGrayscaleImageStorage("1.2.840.10008.5.1.1.29", "Hardcopy Grayscale Image Storage SOP Class (Retired)"), + HardcopyColorImageStorage("1.2.840.10008.5.1.1.30", "Hardcopy Color Image Storage SOP Class (Retired)"), + PullPrintRequest("1.2.840.10008.5.1.1.31", "Pull Print Request SOP Class (Retired)"), + PullStoredPrintManagementMeta("1.2.840.10008.5.1.1.32", "Pull Stored Print Management Meta SOP Class (Retired)"), + MediaCreationManagement("1.2.840.10008.5.1.1.33", "Media Creation Management SOP Class UID"), + DisplaySystem("1.2.840.10008.5.1.1.40", "Display System SOP Class"), + DisplaySystemInstance("1.2.840.10008.5.1.1.40.1", "Display System SOP Instance"), + ComputedRadiographyImageStorage("1.2.840.10008.5.1.4.1.1.1", "Computed Radiography Image Storage"), + DigitalXRayImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.1.1", "Digital X-Ray Image Storage - For Presentation"), + DigitalXRayImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.1.1.1", "Digital X-Ray Image Storage - For Processing"), + DigitalMammographyXRayImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.1.2", "Digital Mammography X-Ray Image Storage - For Presentation"), + DigitalMammographyXRayImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.1.2.1", "Digital Mammography X-Ray Image Storage - For Processing"), + DigitalIntraOralXRayImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.1.3", "Digital Intra-Oral X-Ray Image Storage - For Presentation"), + DigitalIntraOralXRayImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.1.3.1", "Digital Intra-Oral X-Ray Image Storage - For Processing"), + CTImageStorage("1.2.840.10008.5.1.4.1.1.2", "CT Image Storage"), + EnhancedCTImageStorage("1.2.840.10008.5.1.4.1.1.2.1", "Enhanced CT Image Storage"), + LegacyConvertedEnhancedCTImageStorage("1.2.840.10008.5.1.4.1.1.2.2", "Legacy Converted Enhanced CT Image Storage"), + UltrasoundMultiFrameImageStorageRetired("1.2.840.10008.5.1.4.1.1.3", "Ultrasound Multi-frame Image Storage (Retired)"), + UltrasoundMultiFrameImageStorage("1.2.840.10008.5.1.4.1.1.3.1", "Ultrasound Multi-frame Image Storage"), + MRImageStorage("1.2.840.10008.5.1.4.1.1.4", "MR Image Storage"), + EnhancedMRImageStorage("1.2.840.10008.5.1.4.1.1.4.1", "Enhanced MR Image Storage"), + MRSpectroscopyStorage("1.2.840.10008.5.1.4.1.1.4.2", "MR Spectroscopy Storage"), + EnhancedMRColorImageStorage("1.2.840.10008.5.1.4.1.1.4.3", "Enhanced MR Color Image Storage"), + LegacyConvertedEnhancedMRImageStorage("1.2.840.10008.5.1.4.1.1.4.4", "Legacy Converted Enhanced MR Image Storage"), + NuclearMedicineImageStorageRetired("1.2.840.10008.5.1.4.1.1.5", "Nuclear Medicine Image Storage (Retired)"), + UltrasoundImageStorageRetired("1.2.840.10008.5.1.4.1.1.6", "Ultrasound Image Storage (Retired)"), + UltrasoundImageStorage("1.2.840.10008.5.1.4.1.1.6.1", "Ultrasound Image Storage"), + EnhancedUSVolumeStorage("1.2.840.10008.5.1.4.1.1.6.2", "Enhanced US Volume Storage"), + PhotoacousticImageStorage("1.2.840.10008.5.1.4.1.1.6.3", "Photoacoustic Image Storage"), + SecondaryCaptureImageStorage("1.2.840.10008.5.1.4.1.1.7", "Secondary Capture Image Storage"), + MultiFrameSingleBitSecondaryCaptureImageStorage("1.2.840.10008.5.1.4.1.1.7.1", "Multi-frame Single Bit Secondary Capture Image Storage"), + MultiFrameGrayscaleByteSecondaryCaptureImageStorage("1.2.840.10008.5.1.4.1.1.7.2", "Multi-frame Grayscale Byte Secondary Capture Image Storage"), + MultiFrameGrayscaleWordSecondaryCaptureImageStorage("1.2.840.10008.5.1.4.1.1.7.3", "Multi-frame Grayscale Word Secondary Capture Image Storage"), + MultiFrameTrueColorSecondaryCaptureImageStorage("1.2.840.10008.5.1.4.1.1.7.4", "Multi-frame True Color Secondary Capture Image Storage"), + StandaloneOverlayStorage("1.2.840.10008.5.1.4.1.1.8", "Standalone Overlay Storage (Retired)"), + StandaloneCurveStorage("1.2.840.10008.5.1.4.1.1.9", "Standalone Curve Storage (Retired)"), + WaveformStorageTrial("1.2.840.10008.5.1.4.1.1.9.1", "Waveform Storage - Trial (Retired)"), + TwelveLeadECGWaveformStorage("1.2.840.10008.5.1.4.1.1.9.1.1", "12-lead ECG Waveform Storage"), + GeneralECGWaveformStorage("1.2.840.10008.5.1.4.1.1.9.1.2", "General ECG Waveform Storage"), + AmbulatoryECGWaveformStorage("1.2.840.10008.5.1.4.1.1.9.1.3", "Ambulatory ECG Waveform Storage"), + General32bitECGWaveformStorage("1.2.840.10008.5.1.4.1.1.9.1.4", "General 32-bit ECG Waveform Storage"), + HemodynamicWaveformStorage("1.2.840.10008.5.1.4.1.1.9.2.1", "Hemodynamic Waveform Storage"), + CardiacElectrophysiologyWaveformStorage("1.2.840.10008.5.1.4.1.1.9.3.1", "Cardiac Electrophysiology Waveform Storage"), + BasicVoiceAudioWaveformStorage("1.2.840.10008.5.1.4.1.1.9.4.1", "Basic Voice Audio Waveform Storage"), + GeneralAudioWaveformStorage("1.2.840.10008.5.1.4.1.1.9.4.2", "General Audio Waveform Storage"), + ArterialPulseWaveformStorage("1.2.840.10008.5.1.4.1.1.9.5.1", "Arterial Pulse Waveform Storage"), + RespiratoryWaveformStorage("1.2.840.10008.5.1.4.1.1.9.6.1", "Respiratory Waveform Storage"), + MultichannelRespiratoryWaveformStorage("1.2.840.10008.5.1.4.1.1.9.6.2", "Multi-channel Respiratory Waveform Storage"), + RoutineScalpElectroencephalogramWaveformStorage("1.2.840.10008.5.1.4.1.1.9.7.1", "Routine Scalp Electroencephalogram Waveform Storage"), + ElectromyogramWaveformStorage("1.2.840.10008.5.1.4.1.1.9.7.2", "Electromyogram Waveform Storage"), + ElectrooculogramWaveformStorage("1.2.840.10008.5.1.4.1.1.9.7.3", "Electrooculogram Waveform Storage"), + SleepElectroencephalogramWaveformStorage("1.2.840.10008.5.1.4.1.1.9.7.4", "Sleep Electroencephalogram Waveform Storage"), + BodyPositionWaveformStorage("1.2.840.10008.5.1.4.1.1.9.8.1", "Body Position Waveform Storage"), + StandaloneModalityLUTStorage("1.2.840.10008.5.1.4.1.1.10", "Standalone Modality LUT Storage (Retired)"), + StandaloneVOILUTStorage("1.2.840.10008.5.1.4.1.1.11", "Standalone VOI LUT Storage (Retired)"), + GrayscaleSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.1", "Grayscale Softcopy Presentation State Storage"), + ColorSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.2", "Color Softcopy Presentation State Storage"), + PseudoColorSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.3", "Pseudo-Color Softcopy Presentation State Storage"), + BlendingSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.4", "Blending Softcopy Presentation State Storage"), + XAXRFGrayscaleSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.5", "XA/XRF Grayscale Softcopy Presentation State Storage"), + GrayscalePlanarMPRVolumetricPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.6", "Grayscale Planar MPR Volumetric Presentation State Storage"), + CompositingPlanarMPRVolumetricPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.7", "Compositing Planar MPR Volumetric Presentation State Storage"), + AdvancedBlendingPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.8", "Advanced Blending Presentation State Storage"), + VolumeRenderingVolumetricPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.9", "Volume Rendering Volumetric Presentation State Storage"), + SegmentedVolumeRenderingVolumetricPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.10", "Segmented Volume Rendering Volumetric Presentation State Storage"), + MultipleVolumeRenderingVolumetricPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.11", "Multiple Volume Rendering Volumetric Presentation State Storage"), + VariableModalityLUTSoftcopyPresentationStateStorage("1.2.840.10008.5.1.4.1.1.11.12", "Variable Modality LUT Softcopy Presentation State Storage"), + XRayAngiographicImageStorage("1.2.840.10008.5.1.4.1.1.12.1", "X-Ray Angiographic Image Storage"), + EnhancedXAImageStorage("1.2.840.10008.5.1.4.1.1.12.1.1", "Enhanced XA Image Storage"), + XRayRadiofluoroscopicImageStorage("1.2.840.10008.5.1.4.1.1.12.2", "X-Ray Radiofluoroscopic Image Storage"), + EnhancedXRFImageStorage("1.2.840.10008.5.1.4.1.1.12.2.1", "Enhanced XRF Image Storage"), + XRayAngiographicBiPlaneImageStorage("1.2.840.10008.5.1.4.1.1.12.3", "X-Ray Angiographic Bi-Plane Image Storage (Retired)"), + ZeissOPTFile("1.2.840.10008.5.1.4.1.1.12.77", "Zeiss OPT File (Retired)"), + XRay3DAngiographicImageStorage("1.2.840.10008.5.1.4.1.1.13.1.1", "X-Ray 3D Angiographic Image Storage"), + XRay3DCraniofacialImageStorage("1.2.840.10008.5.1.4.1.1.13.1.2", "X-Ray 3D Craniofacial Image Storage"), + BreastTomosynthesisImageStorage("1.2.840.10008.5.1.4.1.1.13.1.3", "Breast Tomosynthesis Image Storage"), + BreastProjectionXRayImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.13.1.4", "Breast Projection X-Ray Image Storage - For Presentation"), + BreastProjectionXRayImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.13.1.5", "Breast Projection X-Ray Image Storage - For Processing"), + IntravascularOpticalCoherenceTomographyImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.14.1", "Intravascular Optical Coherence Tomography Image Storage - For Presentation"), + IntravascularOpticalCoherenceTomographyImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.14.2", "Intravascular Optical Coherence Tomography Image Storage - For Processing"), + NuclearMedicineImageStorage("1.2.840.10008.5.1.4.1.1.20", "Nuclear Medicine Image Storage"), + ParametricMapStorage("1.2.840.10008.5.1.4.1.1.30", "Parametric Map Storage"), + MRImageStorageZeroPadded("1.2.840.10008.5.1.4.1.1.40", "MR Image Storage Zero Padded (Retired)"), + RawDataStorage("1.2.840.10008.5.1.4.1.1.66", "Raw Data Storage"), + SpatialRegistrationStorage("1.2.840.10008.5.1.4.1.1.66.1", "Spatial Registration Storage"), + SpatialFiducialsStorage("1.2.840.10008.5.1.4.1.1.66.2", "Spatial Fiducials Storage"), + DeformableSpatialRegistrationStorage("1.2.840.10008.5.1.4.1.1.66.3", "Deformable Spatial Registration Storage"), + SegmentationStorage("1.2.840.10008.5.1.4.1.1.66.4", "Segmentation Storage"), + SurfaceSegmentationStorage("1.2.840.10008.5.1.4.1.1.66.5", "Surface Segmentation Storage"), + TractographyResultsStorage("1.2.840.10008.5.1.4.1.1.66.6", "Tractography Results Storage"), + RealWorldValueMappingStorage("1.2.840.10008.5.1.4.1.1.67", "Real World Value Mapping Storage"), + SurfaceScanMeshStorage("1.2.840.10008.5.1.4.1.1.68.1", "Surface Scan Mesh Storage"), + SurfaceScanPointCloudStorage("1.2.840.10008.5.1.4.1.1.68.2", "Surface Scan Point Cloud Storage"), + VLImageStorageTrial("1.2.840.10008.5.1.4.1.1.77.1", "VL Image Storage - Trial (Retired)"), + VLMultiFrameImageStorageTrial("1.2.840.10008.5.1.4.1.1.77.2", "VL Multi-frame Image Storage - Trial (Retired)"), + VLEndoscopicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.1", "VL Endoscopic Image Storage"), + VideoEndoscopicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.1.1", "Video Endoscopic Image Storage"), + VLMicroscopicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.2", "VL Microscopic Image Storage"), + VideoMicroscopicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.2.1", "Video Microscopic Image Storage"), + VLSlideCoordinatesMicroscopicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.3", "VL Slide-Coordinates Microscopic Image Storage"), + VLPhotographicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.4", "VL Photographic Image Storage"), + VideoPhotographicImageStorage("1.2.840.10008.5.1.4.1.1.77.1.4.1", "Video Photographic Image Storage"), + OphthalmicPhotography8BitImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.1", "Ophthalmic Photography 8 Bit Image Storage"), + OphthalmicPhotography16BitImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.2", "Ophthalmic Photography 16 Bit Image Storage"), + StereometricRelationshipStorage("1.2.840.10008.5.1.4.1.1.77.1.5.3", "Stereometric Relationship Storage"), + OphthalmicTomographyImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.4", "Ophthalmic Tomography Image Storage"), + WideFieldOphthalmicPhotographyStereographicProjectionImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.5", "Wide Field Ophthalmic Photography Stereographic Projection Image Storage"), + WideFieldOphthalmicPhotography3DCoordinatesImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.6", "Wide Field Ophthalmic Photography 3D Coordinates Image Storage"), + OphthalmicOpticalCoherenceTomographyEnFaceImageStorage("1.2.840.10008.5.1.4.1.1.77.1.5.7", "Ophthalmic Optical Coherence Tomography En Face Image Storage"), + OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage("1.2.840.10008.5.1.4.1.1.77.1.5.8", "Ophthalmic Optical Coherence Tomography B-scan Volume Analysis Storage"), + VLWholeSlideMicroscopyImageStorage("1.2.840.10008.5.1.4.1.1.77.1.6", "VL Whole Slide Microscopy Image Storage"), + DermoscopicPhotographyImageStorage("1.2.840.10008.5.1.4.1.1.77.1.7", "Dermoscopic Photography Image Storage"), + ConfocalMicroscopyImageStorage("1.2.840.10008.5.1.4.1.1.77.1.8", "Confocal Microscopy Image Storage"), + ConfocalMicroscopyTiledPyramidalImageStorage("1.2.840.10008.5.1.4.1.1.77.1.9", "Confocal Microscopy Tiled Pyramidal Image Storage"), + LensometryMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.1", "Lensometry Measurements Storage"), + AutorefractionMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.2", "Autorefraction Measurements Storage"), + KeratometryMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.3", "Keratometry Measurements Storage"), + SubjectiveRefractionMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.4", "Subjective Refraction Measurements Storage"), + VisualAcuityMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.5", "Visual Acuity Measurements Storage"), + SpectaclePrescriptionReportStorage("1.2.840.10008.5.1.4.1.1.78.6", "Spectacle Prescription Report Storage"), + OphthalmicAxialMeasurementsStorage("1.2.840.10008.5.1.4.1.1.78.7", "Ophthalmic Axial Measurements Storage"), + IntraocularLensCalculationsStorage("1.2.840.10008.5.1.4.1.1.78.8", "Intraocular Lens Calculations Storage"), + MacularGridThicknessAndVolumeReportStorage("1.2.840.10008.5.1.4.1.1.79.1", "Macular Grid Thickness and Volume Report Storage"), + OphthalmicVisualFieldStaticPerimetryMeasurementsStorage("1.2.840.10008.5.1.4.1.1.80.1", "Ophthalmic Visual Field Static Perimetry Measurements Storage"), + OphthalmicThicknessMapStorage("1.2.840.10008.5.1.4.1.1.81.1", "Ophthalmic Thickness Map Storage"), + CornealTopographyMapStorage("1.2.840.10008.5.1.4.1.1.82.1", "Corneal Topography Map Storage"), + TextSRStorageTrial("1.2.840.10008.5.1.4.1.1.88.1", "Text SR Storage - Trial (Retired)"), + AudioSRStorageTrial("1.2.840.10008.5.1.4.1.1.88.2", "Audio SR Storage - Trial (Retired)"), + DetailSRStorageTrial("1.2.840.10008.5.1.4.1.1.88.3", "Detail SR Storage - Trial (Retired)"), + ComprehensiveSRStorageTrial("1.2.840.10008.5.1.4.1.1.88.4", "Comprehensive SR Storage - Trial (Retired)"), + BasicTextSRStorage("1.2.840.10008.5.1.4.1.1.88.11", "Basic Text SR Storage"), + EnhancedSRStorage("1.2.840.10008.5.1.4.1.1.88.22", "Enhanced SR Storage"), + ComprehensiveSRStorage("1.2.840.10008.5.1.4.1.1.88.33", "Comprehensive SR Storage"), + Comprehensive3DSRStorage("1.2.840.10008.5.1.4.1.1.88.34", "Comprehensive 3D SR Storage"), + ExtensibleSRStorage("1.2.840.10008.5.1.4.1.1.88.35", "Extensible SR Storage"), + ProcedureLogStorage("1.2.840.10008.5.1.4.1.1.88.40", "Procedure Log Storage"), + MammographyCADSRStorage("1.2.840.10008.5.1.4.1.1.88.50", "Mammography CAD SR Storage"), + KeyObjectSelectionDocumentStorage("1.2.840.10008.5.1.4.1.1.88.59", "Key Object Selection Document Storage"), + ChestCADSRStorage("1.2.840.10008.5.1.4.1.1.88.65", "Chest CAD SR Storage"), + XRayRadiationDoseSRStorage("1.2.840.10008.5.1.4.1.1.88.67", "X-Ray Radiation Dose SR Storage"), + RadiopharmaceuticalRadiationDoseSRStorage("1.2.840.10008.5.1.4.1.1.88.68", "Radiopharmaceutical Radiation Dose SR Storage"), + ColonCADSRStorage("1.2.840.10008.5.1.4.1.1.88.69", "Colon CAD SR Storage"), + ImplantationPlanSRStorage("1.2.840.10008.5.1.4.1.1.88.70", "Implantation Plan SR Storage"), + AcquisitionContextSRStorage("1.2.840.10008.5.1.4.1.1.88.71", "Acquisition Context SR Storage"), + SimplifiedAdultEchoSRStorage("1.2.840.10008.5.1.4.1.1.88.72", "Simplified Adult Echo SR Storage"), + PatientRadiationDoseSRStorage("1.2.840.10008.5.1.4.1.1.88.73", "Patient Radiation Dose SR Storage"), + PlannedImagingAgentAdministrationSRStorage("1.2.840.10008.5.1.4.1.1.88.74", "Planned Imaging Agent Administration SR Storage"), + PerformedImagingAgentAdministrationSRStorage("1.2.840.10008.5.1.4.1.1.88.75", "Performed Imaging Agent Administration SR Storage"), + EnhancedXRayRadiationDoseSRStorage("1.2.840.10008.5.1.4.1.1.88.76", "Enhanced X-Ray Radiation Dose SR Storage"), + ContentAssessmentResultsStorage("1.2.840.10008.5.1.4.1.1.90.1", "Content Assessment Results Storage"), + MicroscopyBulkSimpleAnnotationsStorage("1.2.840.10008.5.1.4.1.1.91.1", "Microscopy Bulk Simple Annotations Storage"), + EncapsulatedPDFStorage("1.2.840.10008.5.1.4.1.1.104.1", "Encapsulated PDF Storage"), + EncapsulatedCDAStorage("1.2.840.10008.5.1.4.1.1.104.2", "Encapsulated CDA Storage"), + EncapsulatedSTLStorage("1.2.840.10008.5.1.4.1.1.104.3", "Encapsulated STL Storage"), + EncapsulatedOBJStorage("1.2.840.10008.5.1.4.1.1.104.4", "Encapsulated OBJ Storage"), + EncapsulatedMTLStorage("1.2.840.10008.5.1.4.1.1.104.5", "Encapsulated MTL Storage"), + PositronEmissionTomographyImageStorage("1.2.840.10008.5.1.4.1.1.128", "Positron Emission Tomography Image Storage"), + LegacyConvertedEnhancedPETImageStorage("1.2.840.10008.5.1.4.1.1.128.1", "Legacy Converted Enhanced PET Image Storage"), + StandalonePETCurveStorage("1.2.840.10008.5.1.4.1.1.129", "Standalone PET Curve Storage (Retired)"), + EnhancedPETImageStorage("1.2.840.10008.5.1.4.1.1.130", "Enhanced PET Image Storage"), + BasicStructuredDisplayStorage("1.2.840.10008.5.1.4.1.1.131", "Basic Structured Display Storage"), + CTDefinedProcedureProtocolStorage("1.2.840.10008.5.1.4.1.1.200.1", "CT Defined Procedure Protocol Storage"), + CTPerformedProcedureProtocolStorage("1.2.840.10008.5.1.4.1.1.200.2", "CT Performed Procedure Protocol Storage"), + ProtocolApprovalStorage("1.2.840.10008.5.1.4.1.1.200.3", "Protocol Approval Storage"), + ProtocolApprovalInformationModelFind("1.2.840.10008.5.1.4.1.1.200.4", "Protocol Approval Information Model - FIND"), + ProtocolApprovalInformationModelMove("1.2.840.10008.5.1.4.1.1.200.5", "Protocol Approval Information Model - MOVE"), + ProtocolApprovalInformationModelGet("1.2.840.10008.5.1.4.1.1.200.6", "Protocol Approval Information Model - GET"), + XADefinedProcedureProtocolStorage("1.2.840.10008.5.1.4.1.1.200.7", "XA Defined Procedure Protocol Storage"), + XAPerformedProcedureProtocolStorage("1.2.840.10008.5.1.4.1.1.200.8", "XA Performed Procedure Protocol Storage"), + InventoryStorage("1.2.840.10008.5.1.4.1.1.201.1", "Inventory Storage"), + InventoryFind("1.2.840.10008.5.1.4.1.1.201.2", "Inventory - FIND"), + InventoryMove("1.2.840.10008.5.1.4.1.1.201.3", "Inventory - MOVE"), + InventoryGet("1.2.840.10008.5.1.4.1.1.201.4", "Inventory - GET"), + InventoryCreation("1.2.840.10008.5.1.4.1.1.201.5", "Inventory Creation"), + RepositoryQuery("1.2.840.10008.5.1.4.1.1.201.6", "Repository Query"), + StorageManagementInstance("1.2.840.10008.5.1.4.1.1.201.1.1", "Storage Management SOP Instance"), + RTImageStorage("1.2.840.10008.5.1.4.1.1.481.1", "RT Image Storage"), + RTDoseStorage("1.2.840.10008.5.1.4.1.1.481.2", "RT Dose Storage"), + RTStructureSetStorage("1.2.840.10008.5.1.4.1.1.481.3", "RT Structure Set Storage"), + RTBeamsTreatmentRecordStorage("1.2.840.10008.5.1.4.1.1.481.4", "RT Beams Treatment Record Storage"), + RTPlanStorage("1.2.840.10008.5.1.4.1.1.481.5", "RT Plan Storage"), + RTBrachyTreatmentRecordStorage("1.2.840.10008.5.1.4.1.1.481.6", "RT Brachy Treatment Record Storage"), + RTTreatmentSummaryRecordStorage("1.2.840.10008.5.1.4.1.1.481.7", "RT Treatment Summary Record Storage"), + RTIonPlanStorage("1.2.840.10008.5.1.4.1.1.481.8", "RT Ion Plan Storage"), + RTIonBeamsTreatmentRecordStorage("1.2.840.10008.5.1.4.1.1.481.9", "RT Ion Beams Treatment Record Storage"), + RTPhysicianIntentStorage("1.2.840.10008.5.1.4.1.1.481.10", "RT Physician Intent Storage"), + RTSegmentAnnotationStorage("1.2.840.10008.5.1.4.1.1.481.11", "RT Segment Annotation Storage"), + RTRadiationSetStorage("1.2.840.10008.5.1.4.1.1.481.12", "RT Radiation Set Storage"), + CArmPhotonElectronRadiationStorage("1.2.840.10008.5.1.4.1.1.481.13", "C-Arm Photon-Electron Radiation Storage"), + TomotherapeuticRadiationStorage("1.2.840.10008.5.1.4.1.1.481.14", "Tomotherapeutic Radiation Storage"), + RoboticArmRadiationStorage("1.2.840.10008.5.1.4.1.1.481.15", "Robotic-Arm Radiation Storage"), + RTRadiationRecordSetStorage("1.2.840.10008.5.1.4.1.1.481.16", "RT Radiation Record Set Storage"), + RTRadiationSalvageRecordStorage("1.2.840.10008.5.1.4.1.1.481.17", "RT Radiation Salvage Record Storage"), + TomotherapeuticRadiationRecordStorage("1.2.840.10008.5.1.4.1.1.481.18", "Tomotherapeutic Radiation Record Storage"), + CArmPhotonElectronRadiationRecordStorage("1.2.840.10008.5.1.4.1.1.481.19", "C-Arm Photon-Electron Radiation Record Storage"), + RoboticRadiationRecordStorage("1.2.840.10008.5.1.4.1.1.481.20", "Robotic Radiation Record Storage"), + RTRadiationSetDeliveryInstructionStorage("1.2.840.10008.5.1.4.1.1.481.21", "RT Radiation Set Delivery Instruction Storage"), + RTTreatmentPreparationStorage("1.2.840.10008.5.1.4.1.1.481.22", "RT Treatment Preparation Storage"), + EnhancedRTImageStorage("1.2.840.10008.5.1.4.1.1.481.23", "Enhanced RT Image Storage"), + EnhancedContinuousRTImageStorage("1.2.840.10008.5.1.4.1.1.481.24", "Enhanced Continuous RT Image Storage"), + RTPatientPositionAcquisitionInstructionStorage("1.2.840.10008.5.1.4.1.1.481.25", "RT Patient Position Acquisition Instruction Storage"), + DICOSCTImageStorage("1.2.840.10008.5.1.4.1.1.501.1", "DICOS CT Image Storage"), + DICOSDigitalXRayImageStorageForPresentation("1.2.840.10008.5.1.4.1.1.501.2.1", "DICOS Digital X-Ray Image Storage - For Presentation"), + DICOSDigitalXRayImageStorageForProcessing("1.2.840.10008.5.1.4.1.1.501.2.2", "DICOS Digital X-Ray Image Storage - For Processing"), + DICOSThreatDetectionReportStorage("1.2.840.10008.5.1.4.1.1.501.3", "DICOS Threat Detection Report Storage"), + DICOS2DAITStorage("1.2.840.10008.5.1.4.1.1.501.4", "DICOS 2D AIT Storage"), + DICOS3DAITStorage("1.2.840.10008.5.1.4.1.1.501.5", "DICOS 3D AIT Storage"), + DICOSQuadrupoleResonanceStorage("1.2.840.10008.5.1.4.1.1.501.6", "DICOS Quadrupole Resonance (QR) Storage"), + EddyCurrentImageStorage("1.2.840.10008.5.1.4.1.1.601.1", "Eddy Current Image Storage"), + EddyCurrentMultiFrameImageStorage("1.2.840.10008.5.1.4.1.1.601.2", "Eddy Current Multi-frame Image Storage"), + PatientRootQueryRetrieveInformationModelFind("1.2.840.10008.5.1.4.1.2.1.1", "Patient Root Query/Retrieve Information Model - FIND"), + PatientRootQueryRetrieveInformationModelMove("1.2.840.10008.5.1.4.1.2.1.2", "Patient Root Query/Retrieve Information Model - MOVE"), + PatientRootQueryRetrieveInformationModelGet("1.2.840.10008.5.1.4.1.2.1.3", "Patient Root Query/Retrieve Information Model - GET"), + StudyRootQueryRetrieveInformationModelFind("1.2.840.10008.5.1.4.1.2.2.1", "Study Root Query/Retrieve Information Model - FIND"), + StudyRootQueryRetrieveInformationModelMove("1.2.840.10008.5.1.4.1.2.2.2", "Study Root Query/Retrieve Information Model - MOVE"), + StudyRootQueryRetrieveInformationModelGet("1.2.840.10008.5.1.4.1.2.2.3", "Study Root Query/Retrieve Information Model - GET"), + PatientStudyOnlyQueryRetrieveInformationModelFind("1.2.840.10008.5.1.4.1.2.3.1", "Patient/Study Only Query/Retrieve Information Model - FIND (Retired)"), + PatientStudyOnlyQueryRetrieveInformationModelMove("1.2.840.10008.5.1.4.1.2.3.2", "Patient/Study Only Query/Retrieve Information Model - MOVE (Retired)"), + PatientStudyOnlyQueryRetrieveInformationModelGet("1.2.840.10008.5.1.4.1.2.3.3", "Patient/Study Only Query/Retrieve Information Model - GET (Retired)"), + CompositeInstanceRootRetrieveMove("1.2.840.10008.5.1.4.1.2.4.2", "Composite Instance Root Retrieve - MOVE"), + CompositeInstanceRootRetrieveGet("1.2.840.10008.5.1.4.1.2.4.3", "Composite Instance Root Retrieve - GET"), + CompositeInstanceRetrieveWithoutBulkDataGet("1.2.840.10008.5.1.4.1.2.5.3", "Composite Instance Retrieve Without Bulk Data - GET"), + DefinedProcedureProtocolInformationModelFind("1.2.840.10008.5.1.4.20.1", "Defined Procedure Protocol Information Model - FIND"), + DefinedProcedureProtocolInformationModelMove("1.2.840.10008.5.1.4.20.2", "Defined Procedure Protocol Information Model - MOVE"), + DefinedProcedureProtocolInformationModelGet("1.2.840.10008.5.1.4.20.3", "Defined Procedure Protocol Information Model - GET"), + ModalityWorklistInformationModelFind("1.2.840.10008.5.1.4.31", "Modality Worklist Information Model - FIND"), + GeneralPurposeWorklistManagementMeta("1.2.840.10008.5.1.4.32", "General Purpose Worklist Management Meta SOP Class (Retired)"), + GeneralPurposeWorklistInformationModelFind("1.2.840.10008.5.1.4.32.1", "General Purpose Worklist Information Model - FIND (Retired)"), + GeneralPurposeScheduledProcedureStep("1.2.840.10008.5.1.4.32.2", "General Purpose Scheduled Procedure Step SOP Class (Retired)"), + GeneralPurposePerformedProcedureStep("1.2.840.10008.5.1.4.32.3", "General Purpose Performed Procedure Step SOP Class (Retired)"), + InstanceAvailabilityNotification("1.2.840.10008.5.1.4.33", "Instance Availability Notification SOP Class"), + RTBeamsDeliveryInstructionStorageTrial("1.2.840.10008.5.1.4.34.1", "RT Beams Delivery Instruction Storage - Trial (Retired)"), + RTConventionalMachineVerificationTrial("1.2.840.10008.5.1.4.34.2", "RT Conventional Machine Verification - Trial (Retired)"), + RTIonMachineVerificationTrial("1.2.840.10008.5.1.4.34.3", "RT Ion Machine Verification - Trial (Retired)"), + UnifiedWorklistAndProcedureStepTrial("1.2.840.10008.5.1.4.34.4", "Unified Worklist and Procedure Step Service Class - Trial (Retired)"), + UnifiedProcedureStepPushTrial("1.2.840.10008.5.1.4.34.4.1", "Unified Procedure Step - Push SOP Class - Trial (Retired)"), + UnifiedProcedureStepWatchTrial("1.2.840.10008.5.1.4.34.4.2", "Unified Procedure Step - Watch SOP Class - Trial (Retired)"), + UnifiedProcedureStepPullTrial("1.2.840.10008.5.1.4.34.4.3", "Unified Procedure Step - Pull SOP Class - Trial (Retired)"), + UnifiedProcedureStepEventTrial("1.2.840.10008.5.1.4.34.4.4", "Unified Procedure Step - Event SOP Class - Trial (Retired)"), + UPSGlobalSubscriptionInstance("1.2.840.10008.5.1.4.34.5", "UPS Global Subscription SOP Instance"), + UPSFilteredGlobalSubscriptionInstance("1.2.840.10008.5.1.4.34.5.1", "UPS Filtered Global Subscription SOP Instance"), + UnifiedWorklistAndProcedureStep("1.2.840.10008.5.1.4.34.6", "Unified Worklist and Procedure Step Service Class"), + UnifiedProcedureStepPush("1.2.840.10008.5.1.4.34.6.1", "Unified Procedure Step - Push SOP Class"), + UnifiedProcedureStepWatch("1.2.840.10008.5.1.4.34.6.2", "Unified Procedure Step - Watch SOP Class"), + UnifiedProcedureStepPull("1.2.840.10008.5.1.4.34.6.3", "Unified Procedure Step - Pull SOP Class"), + UnifiedProcedureStepEvent("1.2.840.10008.5.1.4.34.6.4", "Unified Procedure Step - Event SOP Class"), + UnifiedProcedureStepQuery("1.2.840.10008.5.1.4.34.6.5", "Unified Procedure Step - Query SOP Class"), + RTBeamsDeliveryInstructionStorage("1.2.840.10008.5.1.4.34.7", "RT Beams Delivery Instruction Storage"), + RTConventionalMachineVerification("1.2.840.10008.5.1.4.34.8", "RT Conventional Machine Verification"), + RTIonMachineVerification("1.2.840.10008.5.1.4.34.9", "RT Ion Machine Verification"), + RTBrachyApplicationSetupDeliveryInstructionStorage("1.2.840.10008.5.1.4.34.10", "RT Brachy Application Setup Delivery Instruction Storage"), + GeneralRelevantPatientInformationQuery("1.2.840.10008.5.1.4.37.1", "General Relevant Patient Information Query"), + BreastImagingRelevantPatientInformationQuery("1.2.840.10008.5.1.4.37.2", "Breast Imaging Relevant Patient Information Query"), + CardiacRelevantPatientInformationQuery("1.2.840.10008.5.1.4.37.3", "Cardiac Relevant Patient Information Query"), + HangingProtocolStorage("1.2.840.10008.5.1.4.38.1", "Hanging Protocol Storage"), + HangingProtocolInformationModelFind("1.2.840.10008.5.1.4.38.2", "Hanging Protocol Information Model - FIND"), + HangingProtocolInformationModelMove("1.2.840.10008.5.1.4.38.3", "Hanging Protocol Information Model - MOVE"), + HangingProtocolInformationModelGet("1.2.840.10008.5.1.4.38.4", "Hanging Protocol Information Model - GET"), + ColorPaletteStorage("1.2.840.10008.5.1.4.39.1", "Color Palette Storage"), + ColorPaletteQueryRetrieveInformationModelFind("1.2.840.10008.5.1.4.39.2", "Color Palette Query/Retrieve Information Model - FIND"), + ColorPaletteQueryRetrieveInformationModelMove("1.2.840.10008.5.1.4.39.3", "Color Palette Query/Retrieve Information Model - MOVE"), + ColorPaletteQueryRetrieveInformationModelGet("1.2.840.10008.5.1.4.39.4", "Color Palette Query/Retrieve Information Model - GET"), + ProductCharacteristicsQuery("1.2.840.10008.5.1.4.41", "Product Characteristics Query SOP Class"), + SubstanceApprovalQuery("1.2.840.10008.5.1.4.42", "Substance Approval Query SOP Class"), + GenericImplantTemplateStorage("1.2.840.10008.5.1.4.43.1", "Generic Implant Template Storage"), + GenericImplantTemplateInformationModelFind("1.2.840.10008.5.1.4.43.2", "Generic Implant Template Information Model - FIND"), + GenericImplantTemplateInformationModelMove("1.2.840.10008.5.1.4.43.3", "Generic Implant Template Information Model - MOVE"), + GenericImplantTemplateInformationModelGet("1.2.840.10008.5.1.4.43.4", "Generic Implant Template Information Model - GET"), + ImplantAssemblyTemplateStorage("1.2.840.10008.5.1.4.44.1", "Implant Assembly Template Storage"), + ImplantAssemblyTemplateInformationModelFind("1.2.840.10008.5.1.4.44.2", "Implant Assembly Template Information Model - FIND"), + ImplantAssemblyTemplateInformationModelMove("1.2.840.10008.5.1.4.44.3", "Implant Assembly Template Information Model - MOVE"), + ImplantAssemblyTemplateInformationModelGet("1.2.840.10008.5.1.4.44.4", "Implant Assembly Template Information Model - GET"), + ImplantTemplateGroupStorage("1.2.840.10008.5.1.4.45.1", "Implant Template Group Storage"), + ImplantTemplateGroupInformationModelFind("1.2.840.10008.5.1.4.45.2", "Implant Template Group Information Model - FIND"), + ImplantTemplateGroupInformationModelMove("1.2.840.10008.5.1.4.45.3", "Implant Template Group Information Model - MOVE"), + ImplantTemplateGroupInformationModelGet("1.2.840.10008.5.1.4.45.4", "Implant Template Group Information Model - GET"), + NativeDICOMModel("1.2.840.10008.7.1.1", "Native DICOM Model"), + AbstractMultiDimensionalImageModel("1.2.840.10008.7.1.2", "Abstract Multi-Dimensional Image Model"), + DICOMContentMappingResource("1.2.840.10008.8.1.1", "DICOM Content Mapping Resource"), + VideoEndoscopicImageRealTimeCommunication("1.2.840.10008.10.1", "Video Endoscopic Image Real-Time Communication"), + VideoPhotographicImageRealTimeCommunication("1.2.840.10008.10.2", "Video Photographic Image Real-Time Communication"), + AudioWaveformRealTimeCommunication("1.2.840.10008.10.3", "Audio Waveform Real-Time Communication"), + RenditionSelectionDocumentRealTimeCommunication("1.2.840.10008.10.4", "Rendition Selection Document Real-Time Communication"), + dicomDeviceName("1.2.840.10008.15.0.3.1", "dicomDeviceName"), + dicomDescription("1.2.840.10008.15.0.3.2", "dicomDescription"), + dicomManufacturer("1.2.840.10008.15.0.3.3", "dicomManufacturer"), + dicomManufacturerModelName("1.2.840.10008.15.0.3.4", "dicomManufacturerModelName"), + dicomSoftwareVersion("1.2.840.10008.15.0.3.5", "dicomSoftwareVersion"), + dicomVendorData("1.2.840.10008.15.0.3.6", "dicomVendorData"), + dicomAETitle("1.2.840.10008.15.0.3.7", "dicomAETitle"), + dicomNetworkConnectionReference("1.2.840.10008.15.0.3.8", "dicomNetworkConnectionReference"), + dicomApplicationCluster("1.2.840.10008.15.0.3.9", "dicomApplicationCluster"), + dicomAssociationInitiator("1.2.840.10008.15.0.3.10", "dicomAssociationInitiator"), + dicomAssociationAcceptor("1.2.840.10008.15.0.3.11", "dicomAssociationAcceptor"), + dicomHostname("1.2.840.10008.15.0.3.12", "dicomHostname"), + dicomPort("1.2.840.10008.15.0.3.13", "dicomPort"), + dicomSOPClass("1.2.840.10008.15.0.3.14", "dicomSOPClass"), + dicomTransferRole("1.2.840.10008.15.0.3.15", "dicomTransferRole"), + dicomTransferSyntax("1.2.840.10008.15.0.3.16", "dicomTransferSyntax"), + dicomPrimaryDeviceType("1.2.840.10008.15.0.3.17", "dicomPrimaryDeviceType"), + dicomRelatedDeviceReference("1.2.840.10008.15.0.3.18", "dicomRelatedDeviceReference"), + dicomPreferredCalledAETitle("1.2.840.10008.15.0.3.19", "dicomPreferredCalledAETitle"), + dicomTLSCyphersuite("1.2.840.10008.15.0.3.20", "dicomTLSCyphersuite"), + dicomAuthorizedNodeCertificateReference("1.2.840.10008.15.0.3.21", "dicomAuthorizedNodeCertificateReference"), + dicomThisNodeCertificateReference("1.2.840.10008.15.0.3.22", "dicomThisNodeCertificateReference"), + dicomInstalled("1.2.840.10008.15.0.3.23", "dicomInstalled"), + dicomStationName("1.2.840.10008.15.0.3.24", "dicomStationName"), + dicomDeviceSerialNumber("1.2.840.10008.15.0.3.25", "dicomDeviceSerialNumber"), + dicomInstitutionName("1.2.840.10008.15.0.3.26", "dicomInstitutionName"), + dicomInstitutionAddress("1.2.840.10008.15.0.3.27", "dicomInstitutionAddress"), + dicomInstitutionDepartmentName("1.2.840.10008.15.0.3.28", "dicomInstitutionDepartmentName"), + dicomIssuerOfPatientID("1.2.840.10008.15.0.3.29", "dicomIssuerOfPatientID"), + dicomPreferredCallingAETitle("1.2.840.10008.15.0.3.30", "dicomPreferredCallingAETitle"), + dicomSupportedCharacterSet("1.2.840.10008.15.0.3.31", "dicomSupportedCharacterSet"), + dicomConfigurationRoot("1.2.840.10008.15.0.4.1", "dicomConfigurationRoot"), + dicomDevicesRoot("1.2.840.10008.15.0.4.2", "dicomDevicesRoot"), + dicomUniqueAETitlesRegistryRoot("1.2.840.10008.15.0.4.3", "dicomUniqueAETitlesRegistryRoot"), + dicomDevice("1.2.840.10008.15.0.4.4", "dicomDevice"), + dicomNetworkAE("1.2.840.10008.15.0.4.5", "dicomNetworkAE"), + dicomNetworkConnection("1.2.840.10008.15.0.4.6", "dicomNetworkConnection"), + dicomUniqueAETitle("1.2.840.10008.15.0.4.7", "dicomUniqueAETitle"), + dicomTransferCapability("1.2.840.10008.15.0.4.8", "dicomTransferCapability"), + UTC("1.2.840.10008.15.1.1", "Universal Coordinated Time"), + PrivateEncapsulatedGenozipStorage("1.2.40.0.13.1.5.1.4.1.1.104.1", "Private Encapsulated Genozip Storage"), + PrivateEncapsulatedBzip2VCFStorage("1.2.40.0.13.1.5.1.4.1.1.104.2", "Private Encapsulated Bzip2 VCF Storage"), + PrivateEncapsulatedBzip2DocumentStorage("1.2.40.0.13.1.5.1.4.1.1.104.3", "Private Encapsulated Bzip2 Document Storage"), + PrivateAgfaBasicAttributePresentationState("1.2.124.113532.3500.7", "Private Agfa Basic Attribute Presentation State"), + PrivateAgfaArrivalTransaction("1.2.124.113532.3500.8.1", "Private Agfa Arrival Transaction"), + PrivateAgfaDictationTransaction("1.2.124.113532.3500.8.2", "Private Agfa Dictation Transaction"), + PrivateAgfaReportTranscriptionTransaction("1.2.124.113532.3500.8.3", "Private Agfa Report Transcription Transaction"), + PrivateAgfaReportApprovalTransaction("1.2.124.113532.3500.8.4", "Private Agfa Report Approval Transaction"), + PrivateTomTecAnnotationStorage("1.2.276.0.48.5.1.4.1.1.7", "Private TomTec Annotation Storage"), + PrivateToshibaUSImageStorage("1.2.392.200036.9116.7.8.1.1.1", "Private Toshiba US Image Storage"), + PrivateFujiCRImageStorage("1.2.392.200036.9125.1.1.2", "Private Fuji CR Image Storage"), + PrivateGECollageStorage("1.2.528.1.1001.5.1.1.1", "Private GE Collage Storage"), + PrivateERADPracticeBuilderReportTextStorage("1.2.826.0.1.3680043.293.1.0.1", "Private ERAD Practice Builder Report Text Storage"), + PrivateERADPracticeBuilderReportDictationStorage("1.2.826.0.1.3680043.293.1.0.2", "Private ERAD Practice Builder Report Dictation Storage"), + PrivatePhilipsHPLive3D01Storage("1.2.840.113543.6.6.1.3.10001", "Private Philips HP Live 3D 01 Storage"), + PrivatePhilipsHPLive3D02Storage("1.2.840.113543.6.6.1.3.10002", "Private Philips HP Live 3D 02 Storage"), + PrivateGE3DModelStorage("1.2.840.113619.4.26", "Private GE 3D Model Storage"), + PrivateGEDicomCTImageInfoObject("1.2.840.113619.4.3", "Private GE Dicom CT Image Info Object"), + PrivateGEDicomDisplayImageInfoObject("1.2.840.113619.4.4", "Private GE Dicom Display Image Info Object"), + PrivateGEDicomMRImageInfoObject("1.2.840.113619.4.2", "Private GE Dicom MR Image Info Object"), + PrivateGEeNTEGRAProtocolOrNMGenieStorage("1.2.840.113619.4.27", "Private GE eNTEGRA Protocol or NM Genie Storage"), + PrivateGEPETRawDataStorage("1.2.840.113619.4.30", "Private GE PET Raw Data Storage"), + PrivateGERTPlanStorage("1.2.840.113619.4.5.249", "Private GE RT Plan Storage"), + PrivatePixelMedLegacyConvertedEnhancedCTImageStorage("1.3.6.1.4.1.5962.301.1", "Private PixelMed Legacy Converted Enhanced CT Image Storage"), + PrivatePixelMedLegacyConvertedEnhancedMRImageStorage("1.3.6.1.4.1.5962.301.2", "Private PixelMed Legacy Converted Enhanced MR Image Storage"), + PrivatePixelMedLegacyConvertedEnhancedPETImageStorage("1.3.6.1.4.1.5962.301.3", "Private PixelMed Legacy Converted Enhanced PET Image Storage"), + PrivatePixelMedFloatingPointImageStorage("1.3.6.1.4.1.5962.301.9", "Private PixelMed Floating Point Image Storage"), + PrivateSiemensCSANonImageStorage("1.3.12.2.1107.5.9.1", "Private Siemens CSA Non Image Storage"), + PrivateSiemensCTMRVolumeStorage("1.3.12.2.1107.5.99.3.10", "Private Siemens CT MR Volume Storage"), + PrivateSiemensAXFrameSetsStorage("1.3.12.2.1107.5.99.3.11", "Private Siemens AX Frame Sets Storage"), + PrivatePhilipsSpecialisedXAStorage("1.3.46.670589.2.3.1.1", "Private Philips Specialised XA Storage"), + PrivatePhilipsCXImageStorage("1.3.46.670589.2.4.1.1", "Private Philips CX Image Storage"), + PrivatePhilips3DPresentationStateStorage("1.3.46.670589.2.5.1.1", "Private Philips 3D Presentation State Storage"), + PrivatePhilipsVRMLStorage("1.3.46.670589.2.8.1.1", "Private Philips VRML Storage"), + PrivatePhilipsVolumeSetStorage("1.3.46.670589.2.11.1.1", "Private Philips Volume Set Storage"), + PrivatePhilipsVolumeStorageRetired("1.3.46.670589.5.0.1", "Private Philips Volume Storage (Retired)"), + PrivatePhilipsVolumeStorage("1.3.46.670589.5.0.1.1", "Private Philips Volume Storage"), + PrivatePhilips3DObjectStorageRetired("1.3.46.670589.5.0.2", "Private Philips 3D Object Storage (Retired)"), + PrivatePhilips3DObjectStorage("1.3.46.670589.5.0.2.1", "Private Philips 3D Object Storage"), + PrivatePhilipsSurfaceStorageRetired("1.3.46.670589.5.0.3", "Private Philips Surface Storage (Retired)"), + PrivatePhilipsSurfaceStorage("1.3.46.670589.5.0.3.1", "Private Philips Surface Storage"), + PrivatePhilipsCompositeObjectStorage("1.3.46.670589.5.0.4", "Private Philips Composite Object Storage"), + PrivatePhilipsMRCardioProfileStorage("1.3.46.670589.5.0.7", "Private Philips MR Cardio Profile Storage"), + PrivatePhilipsMRCardioStorageRetired("1.3.46.670589.5.0.8", "Private Philips MR Cardio Storage (Retired)"), + PrivatePhilipsMRCardioStorage("1.3.46.670589.5.0.8.1", "Private Philips MR Cardio Storage"), + PrivatePhilipsCTSyntheticImageStorage("1.3.46.670589.5.0.9", "Private Philips CT Synthetic Image Storage"), + PrivatePhilipsMRSyntheticImageStorage("1.3.46.670589.5.0.10", "Private Philips MR Synthetic Image Storage"), + PrivatePhilipsMRCardioAnalysisStorageRetired("1.3.46.670589.5.0.11", "Private Philips MR Cardio Analysis Storage (Retired)"), + PrivatePhilipsMRCardioAnalysisStorage("1.3.46.670589.5.0.11.1", "Private Philips MR Cardio Analysis Storage"), + PrivatePhilipsCXSyntheticImageStorage("1.3.46.670589.5.0.12", "Private Philips CX Synthetic Image Storage"), + PrivatePhilipsPerfusionStorage("1.3.46.670589.5.0.13", "Private Philips Perfusion Storage"), + PrivatePhilipsPerfusionImageStorage("1.3.46.670589.5.0.14", "Private Philips Perfusion Image Storage"), + PrivatePhilipsXRayMFStorage("1.3.46.670589.7.8.1618510091", "Private Philips X-Ray MF Storage"), + PrivatePhilipsLiveRunStorage("1.3.46.670589.7.8.1618510092", "Private Philips Live Run Storage"), + PrivatePhilipsRunStorage("1.3.46.670589.7.8.16185100129", "Private Philips Run Storage"), + PrivatePhilipsReconstructionStorage("1.3.46.670589.7.8.16185100130", "Private Philips Reconstruction Storage"), + PrivatePhilipsMRSpectrumStorage("1.3.46.670589.11.0.0.12.1", "Private Philips MR Spectrum Storage"), + PrivatePhilipsMRSeriesDataStorage("1.3.46.670589.11.0.0.12.2", "Private Philips MR Series Data Storage"), + PrivatePhilipsMRColorImageStorage("1.3.46.670589.11.0.0.12.3", "Private Philips MR Color Image Storage"), + PrivatePhilipsMRExamcardStorage("1.3.46.670589.11.0.0.12.4", "Private Philips MR Examcard Storage"), + PrivatePMODMultiFrameImageStorage("2.16.840.1.114033.5.1.4.1.1.130", "Private PMOD Multi-frame Image Storage"); + + public static final Pattern PATTERN = Pattern.compile("[012]((\\.0)|(\\.[1-9]\\d*))+"); + public static final Charset ASCII = StandardCharsets.US_ASCII; + /** + * UID root for UUIDs (Universally Unique Identifiers) generated in + * accordance with Rec. ITU-T X.667 | ISO/IEC 9834-8. + * + * @see OID repository {joint-iso-itu-t(2) uuid(25)} */ - public static final String PrivatePhilipsMRSpectrumStorage = "1.3.46.670589.11.0.0.12.1"; + private static final String UUID_ROOT = "2.25"; + public static String root = UUID_ROOT; - /** - * Private Philips MR Series Data Storage, SOPClass - */ - public static final String PrivatePhilipsMRSeriesDataStorage = "1.3.46.670589.11.0.0.12.2"; + public final String uid; + public final String desc; /** - * Private Philips MR Color Image Storage, SOPClass + * 构造 + * + * @param uid 编码 + * @param desc 描述 */ - public static final String PrivatePhilipsMRColorImageStorage = "1.3.46.670589.11.0.0.12.3"; + UID(String uid, String desc) { + this.uid = uid; + this.desc = desc; + } /** - * Private Philips MR Examcard Storage, SOPClass + * get uid + * + * @param uid uid + * @return this */ - public static final String PrivatePhilipsMRExamcardStorage = "1.3.46.670589.11.0.0.12.4"; + public static UID from(String uid) { + for (UID u : UID.values()) { + if (u.uid.equals(uid)) { + return u; + } + } + return null; + } /** - * Private PMOD Multi-frame Image Storage, SOPClass + * get desc for uid + * + * @param uid uid + * @return the string */ - public static final String PrivatePMODMultiframeImageStorage = "2.16.840.1.114033.5.1.4.1.1.130"; - - - private static final Map map = new HashMap<>(); - private static final String UUID_ROOT = "2.25"; - private static final Pattern PATTERN = - Pattern.compile("[012]((\\.0)|(\\.[1-9]\\d*))+"); - private static final Charset ASCII = Charset.forName("US-ASCII"); - public static String root = UUID_ROOT; - - static { - map.put(VerificationSOPClass, "Verification SOP Class"); - map.put(ImplicitVRLittleEndian, "Implicit VR Little Endian"); - map.put("1.2.840.10008.1.2.1", "Explicit VR Little Endian"); - map.put("1.2.840.10008.1.2.1.99", "Deflated Explicit VR Little Endian"); - map.put("1.2.840.10008.1.2.2", "Explicit VR Big Endian (Retired)"); - map.put("1.2.840.10008.1.2.4.50", "JPEG Baseline (Process 1)"); - map.put("1.2.840.10008.1.2.4.51", "JPEG Extended (Process 2 & 4)"); - map.put("1.2.840.10008.1.2.4.52", "JPEG Extended (Process 3 & 5) (Retired)"); - map.put("1.2.840.10008.1.2.4.53", "JPEG Spectral Selection, Non-Hierarchical (Process 6 & 8) (Retired)"); - map.put("1.2.840.10008.1.2.4.54", "JPEG Spectral Selection, Non-Hierarchical (Process 7 & 9) (Retired)"); - map.put("1.2.840.10008.1.2.4.55", "JPEG Full Progression, Non-Hierarchical (Process 10 & 12) (Retired)"); - map.put("1.2.840.10008.1.2.4.56", "JPEG Full Progression, Non-Hierarchical (Process 11 & 13) (Retired)"); - map.put("1.2.840.10008.1.2.4.57", "JPEG Lossless, Non-Hierarchical (Process 14)"); - map.put("1.2.840.10008.1.2.4.58", "JPEG Lossless, Non-Hierarchical (Process 15) (Retired)"); - map.put("1.2.840.10008.1.2.4.59", "JPEG Extended, Hierarchical (Process 16 & 18) (Retired)"); - map.put("1.2.840.10008.1.2.4.60", "JPEG Extended, Hierarchical (Process 17 & 19) (Retired)"); - map.put("1.2.840.10008.1.2.4.61", "JPEG Spectral Selection, Hierarchical (Process 20 & 22) (Retired)"); - map.put("1.2.840.10008.1.2.4.62", "JPEG Spectral Selection, Hierarchical (Process 21 & 23) (Retired)"); - map.put("1.2.840.10008.1.2.4.63", "JPEG Full Progression, Hierarchical (Process 24 & 26) (Retired)"); - map.put("1.2.840.10008.1.2.4.64", "JPEG Full Progression, Hierarchical (Process 25 & 27) (Retired)"); - map.put("1.2.840.10008.1.2.4.65", "JPEG Lossless, Hierarchical (Process 28) (Retired)"); - map.put("1.2.840.10008.1.2.4.66", "JPEG Lossless, Hierarchical (Process 29) (Retired)"); - map.put("1.2.840.10008.1.2.4.70", "JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])"); - map.put("1.2.840.10008.1.2.4.80", "JPEG-LS Lossless Image Compression"); - map.put("1.2.840.10008.1.2.4.81", "JPEG-LS Lossy (Near-Lossless) Image Compression"); - map.put("1.2.840.10008.1.2.4.90", "JPEG 2000 Image Compression (Lossless Only)"); - map.put("1.2.840.10008.1.2.4.91", "JPEG 2000 Image Compression"); - map.put("1.2.840.10008.1.2.4.92", "JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only)"); - map.put("1.2.840.10008.1.2.4.93", "JPEG 2000 Part 2 Multi-component Image Compression"); - map.put("1.2.840.10008.1.2.4.94", "JPIP Referenced"); - map.put("1.2.840.10008.1.2.4.95", "JPIP Referenced Deflate"); - map.put("1.2.840.10008.1.2.4.100", "MPEG2 Main Profile / Main Level"); - map.put("1.2.840.10008.1.2.4.101", "MPEG2 Main Profile / High Level"); - map.put("1.2.840.10008.1.2.4.102", "MPEG-4 AVC/H.264 High Profile / Level 4.1"); - map.put("1.2.840.10008.1.2.4.103", "MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1"); - map.put("1.2.840.10008.1.2.4.104", "MPEG-4 AVC/H.264 High Profile / Level 4.2 For 2D Video"); - map.put("1.2.840.10008.1.2.4.105", "MPEG-4 AVC/H.264 High Profile / Level 4.2 For 3D Video"); - map.put("1.2.840.10008.1.2.4.106", "MPEG-4 AVC/H.264 Stereo High Profile / Level 4.2"); - map.put("1.2.840.10008.1.2.4.107", "HEVC/H.265 Main Profile / Level 5.1"); - map.put("1.2.840.10008.1.2.4.108", "HEVC/H.265 Main 10 Profile / Level 5.1"); - map.put("1.2.840.10008.1.2.5", "RLE Lossless"); - map.put("1.2.840.10008.1.2.6.1", "RFC 2557 MIME encapsulation (Retired)"); - map.put("1.2.840.10008.1.2.6.2", "XML Encoding (Retired)"); - map.put("1.2.840.10008.1.2.7.1", "SMPTE ST 2110-20 Uncompressed Progressive Active Video"); - map.put("1.2.840.10008.1.2.7.2", "SMPTE ST 2110-20 Uncompressed Interlaced Active Video"); - map.put("1.2.840.10008.1.2.7.3", "SMPTE ST 2110-30 PCM Digital Audio"); - map.put("1.2.840.10008.1.3.10", "Media Storage Directory Storage"); - map.put("1.2.840.10008.1.4.1.1", "Talairach Brain Atlas Frame of Reference"); - map.put("1.2.840.10008.1.4.1.2", "SPM2 T1 Frame of Reference"); - map.put("1.2.840.10008.1.4.1.3", "SPM2 T2 Frame of Reference"); - map.put("1.2.840.10008.1.4.1.4", "SPM2 PD Frame of Reference"); - map.put("1.2.840.10008.1.4.1.5", "SPM2 EPI Frame of Reference"); - map.put("1.2.840.10008.1.4.1.6", "SPM2 FIL T1 Frame of Reference"); - map.put("1.2.840.10008.1.4.1.7", "SPM2 PET Frame of Reference"); - map.put("1.2.840.10008.1.4.1.8", "SPM2 TRANSM Frame of Reference"); - map.put("1.2.840.10008.1.4.1.9", "SPM2 SPECT Frame of Reference"); - map.put("1.2.840.10008.1.4.1.10", "SPM2 GRAY Frame of Reference"); - map.put("1.2.840.10008.1.4.1.11", "SPM2 WHITE Frame of Reference"); - map.put("1.2.840.10008.1.4.1.12", "SPM2 CSF Frame of Reference"); - map.put("1.2.840.10008.1.4.1.13", "SPM2 BRAINMASK Frame of Reference"); - map.put("1.2.840.10008.1.4.1.14", "SPM2 AVG305T1 Frame of Reference"); - map.put("1.2.840.10008.1.4.1.15", "SPM2 AVG152T1 Frame of Reference"); - map.put("1.2.840.10008.1.4.1.16", "SPM2 AVG152T2 Frame of Reference"); - map.put("1.2.840.10008.1.4.1.17", "SPM2 AVG152PD Frame of Reference"); - map.put("1.2.840.10008.1.4.1.18", "SPM2 SINGLESUBJT1 Frame of Reference"); - map.put("1.2.840.10008.1.4.2.1", "ICBM 452 T1 Frame of Reference"); - map.put("1.2.840.10008.1.4.2.2", "ICBM Single Subject MRI Frame of Reference"); - map.put("1.2.840.10008.1.4.3.1", "IEC 61217 Fixed Coordinate System Frame of Reference"); - map.put("1.2.840.10008.1.4.3.2", "Standard Robotic-Arm Coordinate System Frame of Reference"); - map.put("1.2.840.10008.1.5.1", "Hot Iron Color Palette SOP Instance"); - map.put("1.2.840.10008.1.5.2", "PET Color Palette SOP Instance"); - map.put("1.2.840.10008.1.5.3", "Hot Metal Blue Color Palette SOP Instance"); - map.put("1.2.840.10008.1.5.4", "PET 20 Step Color Palette SOP Instance"); - map.put("1.2.840.10008.1.5.5", "Spring Color Palette SOP Instance"); - map.put("1.2.840.10008.1.5.6", "Summer Color Palette SOP Instance"); - map.put("1.2.840.10008.1.5.7", "Fall Color Palette SOP Instance"); - map.put("1.2.840.10008.1.5.8", "Winter Color Palette SOP Instance"); - map.put("1.2.840.10008.1.9", "Basic Study Content Notification SOP Class (Retired)"); - map.put("1.2.840.10008.1.20", "Papyrus 3 Implicit VR Little Endian (Retired)"); - map.put("1.2.840.10008.1.20.1", "Storage Commitment Push Model SOP Class"); - map.put("1.2.840.10008.1.20.1.1", "Storage Commitment Push Model SOP Instance"); - map.put("1.2.840.10008.1.20.2", "Storage Commitment Pull Model SOP Class (Retired)"); - map.put("1.2.840.10008.1.20.2.1", "Storage Commitment Pull Model SOP Instance (Retired)"); - map.put("1.2.840.10008.1.40", "Procedural Event Logging SOP Class"); - map.put("1.2.840.10008.1.40.1", "Procedural Event Logging SOP Instance"); - map.put("1.2.840.10008.1.42", "Substance Administration Logging SOP Class"); - map.put("1.2.840.10008.1.42.1", "Substance Administration Logging SOP Instance"); - map.put("1.2.840.10008.2.6.1", "DICOM UID Registry"); - map.put("1.2.840.10008.2.16.4", "DICOM Controlled Terminology"); - map.put("1.2.840.10008.2.16.5", "Adult Mouse Anatomy Ontology"); - map.put("1.2.840.10008.2.16.6", "Uberon Ontology"); - map.put("1.2.840.10008.2.16.7", "Integrated Taxonomic Information System (ITIS) Taxonomic Serial Number (TSN)"); - map.put("1.2.840.10008.2.16.8", "Mouse Genome Initiative (MGI)"); - map.put("1.2.840.10008.2.16.9", "PubChem Compound CID"); - map.put("1.2.840.10008.2.16.10", "ICD-11"); - map.put("1.2.840.10008.2.16.11", "New York University Melanoma Clinical Cooperative Group"); - map.put("1.2.840.10008.2.16.12", "Mayo Clinic Non-radiological Images Specific Body Structure Anatomical Surface Region Guide"); - map.put("1.2.840.10008.2.16.13", "Image Biomarker Standardisation Initiative"); - map.put("1.2.840.10008.2.16.14", "Radiomics Ontology"); - map.put("1.2.840.10008.2.16.15", "RadElement"); - map.put("1.2.840.10008.3.1.1.1", "DICOM Application Context Name"); - map.put("1.2.840.10008.3.1.2.1.1", "Detached Patient Management SOP Class (Retired)"); - map.put("1.2.840.10008.3.1.2.1.4", "Detached Patient Management Meta SOP Class (Retired)"); - map.put("1.2.840.10008.3.1.2.2.1", "Detached Visit Management SOP Class (Retired)"); - map.put("1.2.840.10008.3.1.2.3.1", "Detached Study Management SOP Class (Retired)"); - map.put("1.2.840.10008.3.1.2.3.2", "Study Component Management SOP Class (Retired)"); - map.put("1.2.840.10008.3.1.2.3.3", "Modality Performed Procedure Step SOP Class"); - map.put("1.2.840.10008.3.1.2.3.4", "Modality Performed Procedure Step Retrieve SOP Class"); - map.put("1.2.840.10008.3.1.2.3.5", "Modality Performed Procedure Step Notification SOP Class"); - map.put("1.2.840.10008.3.1.2.5.1", "Detached Results Management SOP Class (Retired)"); - map.put("1.2.840.10008.3.1.2.5.4", "Detached Results Management Meta SOP Class (Retired)"); - map.put("1.2.840.10008.3.1.2.5.5", "Detached Study Management Meta SOP Class (Retired)"); - map.put("1.2.840.10008.3.1.2.6.1", "Detached Interpretation Management SOP Class (Retired)"); - map.put("1.2.840.10008.4.2", "Storage Service Class"); - map.put("1.2.840.10008.5.1.1.1", "Basic Film Session SOP Class"); - map.put("1.2.840.10008.5.1.1.2", "Basic Film Box SOP Class"); - map.put("1.2.840.10008.5.1.1.4", "Basic Grayscale Image Box SOP Class"); - map.put("1.2.840.10008.5.1.1.4.1", "Basic Color Image Box SOP Class"); - map.put("1.2.840.10008.5.1.1.4.2", "Referenced Image Box SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.9", "Basic Grayscale Print Management Meta SOP Class"); - map.put("1.2.840.10008.5.1.1.9.1", "Referenced Grayscale Print Management Meta SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.14", "Print Job SOP Class"); - map.put("1.2.840.10008.5.1.1.15", "Basic Annotation Box SOP Class"); - map.put("1.2.840.10008.5.1.1.16", "Printer SOP Class"); - map.put("1.2.840.10008.5.1.1.16.376", "Printer Configuration Retrieval SOP Class"); - map.put("1.2.840.10008.5.1.1.17", "Printer SOP Instance"); - map.put("1.2.840.10008.5.1.1.17.376", "Printer Configuration Retrieval SOP Instance"); - map.put("1.2.840.10008.5.1.1.18", "Basic Color Print Management Meta SOP Class"); - map.put("1.2.840.10008.5.1.1.18.1", "Referenced Color Print Management Meta SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.22", "VOI LUT Box SOP Class"); - map.put("1.2.840.10008.5.1.1.23", "Presentation LUT SOP Class"); - map.put("1.2.840.10008.5.1.1.24", "Image Overlay Box SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.24.1", "Basic Print Image Overlay Box SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.25", "Print Queue SOP Instance (Retired)"); - map.put("1.2.840.10008.5.1.1.26", "Print Queue Management SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.27", "Stored Print Storage SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.29", "Hardcopy Grayscale Image Storage SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.30", "Hardcopy Color Image Storage SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.31", "Pull Print Request SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.32", "Pull Stored Print Management Meta SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.1.33", "Media Creation Management SOP Class UID"); - map.put("1.2.840.10008.5.1.1.40", "Display System SOP Class"); - map.put("1.2.840.10008.5.1.1.40.1", "Display System SOP Instance"); - map.put("1.2.840.10008.5.1.4.1.1.1", "Computed Radiography Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.1.1", "Digital X-Ray Image Storage - For Presentation"); - map.put("1.2.840.10008.5.1.4.1.1.1.1.1", "Digital X-Ray Image Storage - For Processing"); - map.put("1.2.840.10008.5.1.4.1.1.1.2", "Digital Mammography X-Ray Image Storage - For Presentation"); - map.put("1.2.840.10008.5.1.4.1.1.1.2.1", "Digital Mammography X-Ray Image Storage - For Processing"); - map.put("1.2.840.10008.5.1.4.1.1.1.3", "Digital Intra-Oral X-Ray Image Storage - For Presentation"); - map.put("1.2.840.10008.5.1.4.1.1.1.3.1", "Digital Intra-Oral X-Ray Image Storage - For Processing"); - map.put("1.2.840.10008.5.1.4.1.1.2", "CT Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.2.1", "Enhanced CT Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.2.2", "Legacy Converted Enhanced CT Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.3", "Ultrasound Multi-frame Image Storage (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.3.1", "Ultrasound Multi-frame Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.4", "MR Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.4.1", "Enhanced MR Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.4.2", "MR Spectroscopy Storage"); - map.put("1.2.840.10008.5.1.4.1.1.4.3", "Enhanced MR Color Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.4.4", "Legacy Converted Enhanced MR Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.5", "Nuclear Medicine Image Storage (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.6", "Ultrasound Image Storage (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.6.1", "Ultrasound Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.6.2", "Enhanced US Volume Storage"); - map.put("1.2.840.10008.5.1.4.1.1.7", "Secondary Capture Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.7.1", "Multi-frame Single Bit Secondary Capture Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.7.2", "Multi-frame Grayscale Byte Secondary Capture Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.7.3", "Multi-frame Grayscale Word Secondary Capture Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.7.4", "Multi-frame True Color Secondary Capture Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.8", "Standalone Overlay Storage (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.9", "Standalone Curve Storage (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.9.1", "Waveform Storage - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.9.1.1", "12-lead ECG Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.1.2", "General ECG Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.1.3", "Ambulatory ECG Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.2.1", "Hemodynamic Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.3.1", "Cardiac Electrophysiology Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.4.1", "Basic Voice Audio Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.4.2", "General Audio Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.5.1", "Arterial Pulse Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.6.1", "Respiratory Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.6.2", "Multi-channel Respiratory Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.7.1", "Routine Scalp Electroencephalogram Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.7.2", "Electromyogram Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.7.3", "Electrooculogram Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.7.4", "Sleep Electroencephalogram Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.9.8.1", "Body Position Waveform Storage"); - map.put("1.2.840.10008.5.1.4.1.1.10", "Standalone Modality LUT Storage (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.11", "Standalone VOI LUT Storage (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.11.1", "Grayscale Softcopy Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.11.2", "Color Softcopy Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.11.3", "Pseudo-Color Softcopy Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.11.4", "Blending Softcopy Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.11.5", "XA/XRF Grayscale Softcopy Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.11.6", "Grayscale Planar MPR Volumetric Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.11.7", "Compositing Planar MPR Volumetric Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.11.8", "Advanced Blending Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.11.9", "Volume Rendering Volumetric Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.11.10", "Segmented Volume Rendering Volumetric Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.11.11", "Multiple Volume Rendering Volumetric Presentation State Storage"); - map.put("1.2.840.10008.5.1.4.1.1.12.1", "X-Ray Angiographic Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.12.1.1", "Enhanced XA Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.12.2", "X-Ray Radiofluoroscopic Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.12.2.1", "Enhanced XRF Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.12.3", "X-Ray Angiographic Bi-Plane Image Storage (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.12.77", "Zeiss OPT File (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.13.1.1", "X-Ray 3D Angiographic Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.13.1.2", "X-Ray 3D Craniofacial Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.13.1.3", "Breast Tomosynthesis Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.13.1.4", "Breast Projection X-Ray Image Storage - For Presentation"); - map.put("1.2.840.10008.5.1.4.1.1.13.1.5", "Breast Projection X-Ray Image Storage - For Processing"); - map.put("1.2.840.10008.5.1.4.1.1.14.1", "Intravascular Optical Coherence Tomography Image Storage - For Presentation"); - map.put("1.2.840.10008.5.1.4.1.1.14.2", "Intravascular Optical Coherence Tomography Image Storage - For Processing"); - map.put("1.2.840.10008.5.1.4.1.1.20", "Nuclear Medicine Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.30", "Parametric Map Storage"); - map.put("1.2.840.10008.5.1.4.1.1.40", "MR Image Storage Zero Padded (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.66", "Raw Data Storage"); - map.put("1.2.840.10008.5.1.4.1.1.66.1", "Spatial Registration Storage"); - map.put("1.2.840.10008.5.1.4.1.1.66.2", "Spatial Fiducials Storage"); - map.put("1.2.840.10008.5.1.4.1.1.66.3", "Deformable Spatial Registration Storage"); - map.put("1.2.840.10008.5.1.4.1.1.66.4", "Segmentation Storage"); - map.put("1.2.840.10008.5.1.4.1.1.66.5", "Surface Segmentation Storage"); - map.put("1.2.840.10008.5.1.4.1.1.66.6", "Tractography Results Storage"); - map.put("1.2.840.10008.5.1.4.1.1.67", "Real World Value Mapping Storage"); - map.put("1.2.840.10008.5.1.4.1.1.68.1", "Surface Scan Mesh Storage"); - map.put("1.2.840.10008.5.1.4.1.1.68.2", "Surface Scan Point Cloud Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1", "VL Image Storage - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.77.2", "VL Multi-frame Image Storage - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.1", "VL Endoscopic Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.1.1", "Video Endoscopic Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.2", "VL Microscopic Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.2.1", "Video Microscopic Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.3", "VL Slide-Coordinates Microscopic Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.4", "VL Photographic Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.4.1", "Video Photographic Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.5.1", "Ophthalmic Photography 8 Bit Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.5.2", "Ophthalmic Photography 16 Bit Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.5.3", "Stereometric Relationship Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.5.4", "Ophthalmic Tomography Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.5.5", "Wide Field Ophthalmic Photography Stereographic Projection Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.5.6", "Wide Field Ophthalmic Photography 3D Coordinates Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.5.7", "Ophthalmic Optical Coherence Tomography En Face Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.5.8", "Ophthalmic Optical Coherence Tomography B-scan Volume Analysis Storage"); - map.put("1.2.840.10008.5.1.4.1.1.77.1.6", "VL Whole Slide Microscopy Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.78.1", "Lensometry Measurements Storage"); - map.put("1.2.840.10008.5.1.4.1.1.78.2", "Autorefraction Measurements Storage"); - map.put("1.2.840.10008.5.1.4.1.1.78.3", "Keratometry Measurements Storage"); - map.put("1.2.840.10008.5.1.4.1.1.78.4", "Subjective Refraction Measurements Storage"); - map.put("1.2.840.10008.5.1.4.1.1.78.5", "Visual Acuity Measurements Storage"); - map.put("1.2.840.10008.5.1.4.1.1.78.6", "Spectacle Prescription Report Storage"); - map.put("1.2.840.10008.5.1.4.1.1.78.7", "Ophthalmic Axial Measurements Storage"); - map.put("1.2.840.10008.5.1.4.1.1.78.8", "Intraocular Lens Calculations Storage"); - map.put("1.2.840.10008.5.1.4.1.1.79.1", "Macular Grid Thickness and Volume Report Storage"); - map.put("1.2.840.10008.5.1.4.1.1.80.1", "Ophthalmic Visual Field Static Perimetry Measurements Storage"); - map.put("1.2.840.10008.5.1.4.1.1.81.1", "Ophthalmic Thickness Map Storage"); - map.put("1.2.840.10008.5.1.4.1.1.82.1", "Corneal Topography Map Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.1", "Text SR Storage - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.88.2", "Audio SR Storage - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.88.3", "Detail SR Storage - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.88.4", "Comprehensive SR Storage - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.88.11", "Basic Text SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.22", "Enhanced SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.33", "Comprehensive SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.34", "Comprehensive 3D SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.35", "Extensible SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.40", "Procedure Log Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.50", "Mammography CAD SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.59", "Key Object Selection Document Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.65", "Chest CAD SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.67", "X-Ray Radiation Dose SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.68", "Radiopharmaceutical Radiation Dose SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.69", "Colon CAD SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.70", "Implantation Plan SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.71", "Acquisition Context SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.72", "Simplified Adult Echo SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.73", "Patient Radiation Dose SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.74", "Planned Imaging Agent Administration SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.88.75", "Performed Imaging Agent Administration SR Storage"); - map.put("1.2.840.10008.5.1.4.1.1.90.1", "Content Assessment Results Storage"); - map.put("1.2.840.10008.5.1.4.1.1.104.1", "Encapsulated PDF Storage"); - map.put("1.2.840.10008.5.1.4.1.1.104.2", "Encapsulated CDA Storage"); - map.put("1.2.840.10008.5.1.4.1.1.104.3", "Encapsulated STL Storage"); - map.put("1.2.840.10008.5.1.4.1.1.104.4", "Encapsulated OBJ Storage"); - map.put("1.2.840.10008.5.1.4.1.1.104.5", "Encapsulated MTL Storage"); - map.put("1.2.840.10008.5.1.4.1.1.128", "Positron Emission Tomography Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.128.1", "Legacy Converted Enhanced PET Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.129", "Standalone PET Curve Storage (Retired)"); - map.put("1.2.840.10008.5.1.4.1.1.130", "Enhanced PET Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.131", "Basic Structured Display Storage"); - map.put("1.2.840.10008.5.1.4.1.1.200.1", "CT Defined Procedure Protocol Storage"); - map.put("1.2.840.10008.5.1.4.1.1.200.2", "CT Performed Procedure Protocol Storage"); - map.put("1.2.840.10008.5.1.4.1.1.200.3", "Protocol Approval Storage"); - map.put("1.2.840.10008.5.1.4.1.1.200.4", "Protocol Approval Information Model - FIND"); - map.put("1.2.840.10008.5.1.4.1.1.200.5", "Protocol Approval Information Model - MOVE"); - map.put("1.2.840.10008.5.1.4.1.1.200.6", "Protocol Approval Information Model - GET"); - map.put("1.2.840.10008.5.1.4.1.1.481.1", "RT Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.2", "RT Dose Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.3", "RT Structure Set Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.4", "RT Beams Treatment Record Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.5", "RT Plan Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.6", "RT Brachy Treatment Record Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.7", "RT Treatment Summary Record Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.8", "RT Ion Plan Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.9", "RT Ion Beams Treatment Record Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.10", "RT Physician Intent Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.11", "RT Segment Annotation Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.12", "RT Radiation Set Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.13", "C-Arm Photon-Electron Radiation Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.14", "Tomotherapeutic Radiation Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.15", "Robotic-Arm Radiation Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.16", "RT Radiation Record Set Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.17", "RT Radiation Salvage Record Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.18", "Tomotherapeutic Radiation Record Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.19", "C-Arm Photon-Electron Radiation Record Storage"); - map.put("1.2.840.10008.5.1.4.1.1.481.20", "Robotic Radiation Record Storage"); - map.put("1.2.840.10008.5.1.4.1.1.501.1", "DICOS CT Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.501.2.1", "DICOS Digital X-Ray Image Storage - For Presentation"); - map.put("1.2.840.10008.5.1.4.1.1.501.2.2", "DICOS Digital X-Ray Image Storage - For Processing"); - map.put("1.2.840.10008.5.1.4.1.1.501.3", "DICOS Threat Detection Report Storage"); - map.put("1.2.840.10008.5.1.4.1.1.501.4", "DICOS 2D AIT Storage"); - map.put("1.2.840.10008.5.1.4.1.1.501.5", "DICOS 3D AIT Storage"); - map.put("1.2.840.10008.5.1.4.1.1.501.6", "DICOS Quadrupole Resonance (QR) Storage"); - map.put("1.2.840.10008.5.1.4.1.1.601.1", "Eddy Current Image Storage"); - map.put("1.2.840.10008.5.1.4.1.1.601.2", "Eddy Current Multi-frame Image Storage"); - map.put("1.2.840.10008.5.1.4.1.2.1.1", "Patient Root Query/Retrieve Information Model - FIND"); - map.put("1.2.840.10008.5.1.4.1.2.1.2", "Patient Root Query/Retrieve Information Model - MOVE"); - map.put("1.2.840.10008.5.1.4.1.2.1.3", "Patient Root Query/Retrieve Information Model - GET"); - map.put("1.2.840.10008.5.1.4.1.2.2.1", "Study Root Query/Retrieve Information Model - FIND"); - map.put("1.2.840.10008.5.1.4.1.2.2.2", "Study Root Query/Retrieve Information Model - MOVE"); - map.put("1.2.840.10008.5.1.4.1.2.2.3", "Study Root Query/Retrieve Information Model - GET"); - map.put("1.2.840.10008.5.1.4.1.2.3.1", "Patient/Study Only Query/Retrieve Information Model - FIND (Retired)"); - map.put("1.2.840.10008.5.1.4.1.2.3.2", "Patient/Study Only Query/Retrieve Information Model - MOVE (Retired)"); - map.put("1.2.840.10008.5.1.4.1.2.3.3", "Patient/Study Only Query/Retrieve Information Model - GET (Retired)"); - map.put("1.2.840.10008.5.1.4.1.2.4.2", "Composite Instance Root Retrieve - MOVE"); - map.put("1.2.840.10008.5.1.4.1.2.4.3", "Composite Instance Root Retrieve - GET"); - map.put("1.2.840.10008.5.1.4.1.2.5.3", "Composite Instance Retrieve Without Bulk Data - GET"); - map.put("1.2.840.10008.5.1.4.20.1", "Defined Procedure Protocol Information Model - FIND"); - map.put("1.2.840.10008.5.1.4.20.2", "Defined Procedure Protocol Information Model - MOVE"); - map.put("1.2.840.10008.5.1.4.20.3", "Defined Procedure Protocol Information Model - GET"); - map.put("1.2.840.10008.5.1.4.31", "Modality Worklist Information Model - FIND"); - map.put("1.2.840.10008.5.1.4.32", "General Purpose Worklist Management Meta SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.4.32.1", "General Purpose Worklist Information Model - FIND (Retired)"); - map.put("1.2.840.10008.5.1.4.32.2", "General Purpose Scheduled Procedure Step SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.4.32.3", "General Purpose Performed Procedure Step SOP Class (Retired)"); - map.put("1.2.840.10008.5.1.4.33", "Instance Availability Notification SOP Class"); - map.put("1.2.840.10008.5.1.4.34.1", "RT Beams Delivery Instruction Storage - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.34.2", "RT Conventional Machine Verification - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.34.3", "RT Ion Machine Verification - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.34.4", "Unified Worklist and Procedure Step Service Class - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.34.4.1", "Unified Procedure Step - Push SOP Class - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.34.4.2", "Unified Procedure Step - Watch SOP Class - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.34.4.3", "Unified Procedure Step - Pull SOP Class - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.34.4.4", "Unified Procedure Step - Event SOP Class - Trial (Retired)"); - map.put("1.2.840.10008.5.1.4.34.5", "UPS Global Subscription SOP Instance"); - map.put("1.2.840.10008.5.1.4.34.5.1", "UPS Filtered Global Subscription SOP Instance"); - map.put("1.2.840.10008.5.1.4.34.6", "Unified Worklist and Procedure Step Service Class"); - map.put("1.2.840.10008.5.1.4.34.6.1", "Unified Procedure Step - Push SOP Class"); - map.put("1.2.840.10008.5.1.4.34.6.2", "Unified Procedure Step - Watch SOP Class"); - map.put("1.2.840.10008.5.1.4.34.6.3", "Unified Procedure Step - Pull SOP Class"); - map.put("1.2.840.10008.5.1.4.34.6.4", "Unified Procedure Step - Event SOP Class"); - map.put("1.2.840.10008.5.1.4.34.6.5", "Unified Procedure Step - Query SOP Class"); - map.put("1.2.840.10008.5.1.4.34.7", "RT Beams Delivery Instruction Storage"); - map.put("1.2.840.10008.5.1.4.34.8", "RT Conventional Machine Verification"); - map.put("1.2.840.10008.5.1.4.34.9", "RT Ion Machine Verification"); - map.put("1.2.840.10008.5.1.4.34.10", "RT Brachy Application Setup Delivery Instruction Storage"); - map.put("1.2.840.10008.5.1.4.37.1", "General Relevant Patient Information Query"); - map.put("1.2.840.10008.5.1.4.37.2", "Breast Imaging Relevant Patient Information Query"); - map.put("1.2.840.10008.5.1.4.37.3", "Cardiac Relevant Patient Information Query"); - map.put("1.2.840.10008.5.1.4.38.1", "Hanging Protocol Storage"); - map.put("1.2.840.10008.5.1.4.38.2", "Hanging Protocol Information Model - FIND"); - map.put("1.2.840.10008.5.1.4.38.3", "Hanging Protocol Information Model - MOVE"); - map.put("1.2.840.10008.5.1.4.38.4", "Hanging Protocol Information Model - GET"); - map.put("1.2.840.10008.5.1.4.39.1", "Color Palette Storage"); - map.put("1.2.840.10008.5.1.4.39.2", "Color Palette Query/Retrieve Information Model - FIND"); - map.put("1.2.840.10008.5.1.4.39.3", "Color Palette Query/Retrieve Information Model - MOVE"); - map.put("1.2.840.10008.5.1.4.39.4", "Color Palette Query/Retrieve Information Model - GET"); - map.put("1.2.840.10008.5.1.4.41", "Product Characteristics Query SOP Class"); - map.put("1.2.840.10008.5.1.4.42", "Substance Approval Query SOP Class"); - map.put("1.2.840.10008.5.1.4.43.1", "Generic Implant Template Storage"); - map.put("1.2.840.10008.5.1.4.43.2", "Generic Implant Template Information Model - FIND"); - map.put("1.2.840.10008.5.1.4.43.3", "Generic Implant Template Information Model - MOVE"); - map.put("1.2.840.10008.5.1.4.43.4", "Generic Implant Template Information Model - GET"); - map.put("1.2.840.10008.5.1.4.44.1", "Implant Assembly Template Storage"); - map.put("1.2.840.10008.5.1.4.44.2", "Implant Assembly Template Information Model - FIND"); - map.put("1.2.840.10008.5.1.4.44.3", "Implant Assembly Template Information Model - MOVE"); - map.put("1.2.840.10008.5.1.4.44.4", "Implant Assembly Template Information Model - GET"); - map.put("1.2.840.10008.5.1.4.45.1", "Implant Template Group Storage"); - map.put("1.2.840.10008.5.1.4.45.2", "Implant Template Group Information Model - FIND"); - map.put("1.2.840.10008.5.1.4.45.3", "Implant Template Group Information Model - MOVE"); - map.put("1.2.840.10008.5.1.4.45.4", "Implant Template Group Information Model - GET"); - map.put("1.2.840.10008.7.1.1", "Native DICOM Model"); - map.put("1.2.840.10008.7.1.2", "Abstract Multi-Dimensional Image Model"); - map.put("1.2.840.10008.8.1.1", "DICOM Content Mapping Resource"); - map.put("1.2.840.10008.10.1", "Video Endoscopic Image Real-Time Communication"); - map.put("1.2.840.10008.10.2", "Video Photographic Image Real-Time Communication"); - map.put("1.2.840.10008.10.3", "Audio Waveform Real-Time Communication"); - map.put("1.2.840.10008.10.4", "Rendition Selection Document Real-Time Communication"); - map.put("1.2.840.10008.15.0.3.1", "dicomDeviceName"); - map.put("1.2.840.10008.15.0.3.2", "dicomDescription"); - map.put("1.2.840.10008.15.0.3.3", "dicomManufacturer"); - map.put("1.2.840.10008.15.0.3.4", "dicomManufacturerModelName"); - map.put("1.2.840.10008.15.0.3.5", "dicomSoftwareVersion"); - map.put("1.2.840.10008.15.0.3.6", "dicomVendorData"); - map.put("1.2.840.10008.15.0.3.7", "dicomAETitle"); - map.put("1.2.840.10008.15.0.3.8", "dicomNetworkConnectionReference"); - map.put("1.2.840.10008.15.0.3.9", "dicomApplicationCluster"); - map.put("1.2.840.10008.15.0.3.10", "dicomAssociationInitiator"); - map.put("1.2.840.10008.15.0.3.11", "dicomAssociationAcceptor"); - map.put("1.2.840.10008.15.0.3.12", "dicomHostname"); - map.put("1.2.840.10008.15.0.3.13", "dicomPort"); - map.put("1.2.840.10008.15.0.3.14", "dicomSOPClass"); - map.put("1.2.840.10008.15.0.3.15", "dicomTransferRole"); - map.put("1.2.840.10008.15.0.3.16", "dicomTransferSyntax"); - map.put("1.2.840.10008.15.0.3.17", "dicomPrimaryDeviceType"); - map.put("1.2.840.10008.15.0.3.18", "dicomRelatedDeviceReference"); - map.put("1.2.840.10008.15.0.3.19", "dicomPreferredCalledAETitle"); - map.put("1.2.840.10008.15.0.3.20", "dicomTLSCyphersuite"); - map.put("1.2.840.10008.15.0.3.21", "dicomAuthorizedNodeCertificateReference"); - map.put("1.2.840.10008.15.0.3.22", "dicomThisNodeCertificateReference"); - map.put("1.2.840.10008.15.0.3.23", "dicomInstalled"); - map.put("1.2.840.10008.15.0.3.24", "dicomStationName"); - map.put("1.2.840.10008.15.0.3.25", "dicomDeviceSerialNumber"); - map.put("1.2.840.10008.15.0.3.26", "dicomInstitutionName"); - map.put("1.2.840.10008.15.0.3.27", "dicomInstitutionAddress"); - map.put("1.2.840.10008.15.0.3.28", "dicomInstitutionDepartmentName"); - map.put("1.2.840.10008.15.0.3.29", "dicomIssuerOfPatientID"); - map.put("1.2.840.10008.15.0.3.30", "dicomPreferredCallingAETitle"); - map.put("1.2.840.10008.15.0.3.31", "dicomSupportedCharacterSet"); - map.put("1.2.840.10008.15.0.4.1", "dicomConfigurationRoot"); - map.put("1.2.840.10008.15.0.4.2", "dicomDevicesRoot"); - map.put("1.2.840.10008.15.0.4.3", "dicomUniqueAETitlesRegistryRoot"); - map.put("1.2.840.10008.15.0.4.4", "dicomDevice"); - map.put("1.2.840.10008.15.0.4.5", "dicomNetworkAE"); - map.put("1.2.840.10008.15.0.4.6", "dicomNetworkConnection"); - map.put("1.2.840.10008.15.0.4.7", "dicomUniqueAETitle"); - map.put("1.2.840.10008.15.0.4.8", "dicomTransferCapability"); - map.put("1.2.840.10008.15.1.1", "Universal Coordinated Time"); - map.put("1.2.124.113532.3500.7", "Private Agfa Basic Attribute Presentation State"); - map.put("1.2.124.113532.3500.8.1", "Private Agfa Arrival Transaction"); - map.put("1.2.124.113532.3500.8.2", "Private Agfa Dictation Transaction"); - map.put("1.2.124.113532.3500.8.3", "Private Agfa Report Transcription Transaction"); - map.put("1.2.124.113532.3500.8.4", "Private Agfa Report Approval Transaction"); - map.put("1.2.276.0.48.5.1.4.1.1.7", "Private TomTec Annotation Storage"); - map.put("1.2.392.200036.9116.7.8.1.1.1", "Private Toshiba US Image Storage"); - map.put("1.2.392.200036.9125.1.1.2", "Private Fuji CR Image Storage"); - map.put("1.2.528.1.1001.5.1.1.1", "Private GE Collage Storage"); - map.put("1.2.826.0.1.3680043.293.1.0.1", "Private ERAD Practice Builder Report Text Storage"); - map.put("1.2.826.0.1.3680043.293.1.0.2", "Private ERAD Practice Builder Report Dictation Storage"); - map.put("1.2.840.113543.6.6.1.3.10001", "Private Philips HP Live 3D 01 Storage"); - map.put("1.2.840.113543.6.6.1.3.10002", "Private Philips HP Live 3D 02 Storage"); - map.put("1.2.840.113619.4.26", "Private GE 3D Model Storage"); - map.put("1.2.840.113619.4.3", "Private GE Dicom CT Image Info Object"); - map.put("1.2.840.113619.4.4", "Private GE Dicom Display Image Info Object"); - map.put("1.2.840.113619.4.2", "Private GE Dicom MR Image Info Object"); - map.put("1.2.840.113619.4.27", "Private GE eNTEGRA Protocol or NM Genie Storage"); - map.put("1.2.840.113619.4.30", "Private GE PET Raw Data Storage"); - map.put("1.2.840.113619.4.5.249", "Private GE RT Plan Storage"); - map.put("1.3.6.1.4.1.5962.301.1", "Private PixelMed Legacy Converted Enhanced CT Image Storage"); - map.put("1.3.6.1.4.1.5962.301.2", "Private PixelMed Legacy Converted Enhanced MR Image Storage"); - map.put("1.3.6.1.4.1.5962.301.3", "Private PixelMed Legacy Converted Enhanced PET Image Storage"); - map.put("1.3.6.1.4.1.5962.301.9", "Private PixelMed Floating Point Image Storage"); - map.put("1.3.12.2.1107.5.9.1", "Private Siemens CSA Non Image Storage"); - map.put("1.3.12.2.1107.5.99.3.10", "Private Siemens CT MR Volume Storage"); - map.put("1.3.12.2.1107.5.99.3.11", "Private Siemens AX Frame Sets Storage"); - map.put("1.3.46.670589.2.3.1.1", "Private Philips Specialised XA Storage"); - map.put("1.3.46.670589.2.4.1.1", "Private Philips CX Image Storage"); - map.put("1.3.46.670589.2.5.1.1", "Private Philips 3D Presentation State Storage"); - map.put("1.3.46.670589.2.8.1.1", "Private Philips VRML Storage"); - map.put("1.3.46.670589.2.11.1.1", "Private Philips Volume Set Storage"); - map.put("1.3.46.670589.5.0.1", "Private Philips Volume Storage (Retired)"); - map.put("1.3.46.670589.5.0.1.1", "Private Philips Volume Storage"); - map.put("1.3.46.670589.5.0.2", "Private Philips 3D Object Storage (Retired)"); - map.put("1.3.46.670589.5.0.2.1", "Private Philips 3D Object Storage"); - map.put("1.3.46.670589.5.0.3", "Private Philips Surface Storage (Retired)"); - map.put("1.3.46.670589.5.0.3.1", "Private Philips Surface Storage"); - map.put("1.3.46.670589.5.0.4", "Private Philips Composite Object Storage"); - map.put("1.3.46.670589.5.0.7", "Private Philips MR Cardio Profile Storage"); - map.put("1.3.46.670589.5.0.8", "Private Philips MR Cardio Storage (Retired)"); - map.put("1.3.46.670589.5.0.8.1", "Private Philips MR Cardio Storage"); - map.put("1.3.46.670589.5.0.9", "Private Philips CT Synthetic Image Storage"); - map.put("1.3.46.670589.5.0.10", "Private Philips MR Synthetic Image Storage"); - map.put("1.3.46.670589.5.0.11", "Private Philips MR Cardio Analysis Storage (Retired)"); - map.put("1.3.46.670589.5.0.11.1", "Private Philips MR Cardio Analysis Storage"); - map.put("1.3.46.670589.5.0.12", "Private Philips CX Synthetic Image Storage"); - map.put("1.3.46.670589.5.0.13", "Private Philips Perfusion Storage"); - map.put("1.3.46.670589.5.0.14", "Private Philips Perfusion Image Storage"); - map.put("1.3.46.670589.7.8.1618510091", "Private Philips X-Ray MF Storage"); - map.put("1.3.46.670589.7.8.1618510092", "Private Philips Live Run Storage"); - map.put("1.3.46.670589.7.8.16185100129", "Private Philips Run Storage"); - map.put("1.3.46.670589.7.8.16185100130", "Private Philips Reconstruction Storage"); - map.put("1.3.46.670589.11.0.0.12.1", "Private Philips MR Spectrum Storage"); - map.put("1.3.46.670589.11.0.0.12.2", "Private Philips MR Series Data Storage"); - map.put("1.3.46.670589.11.0.0.12.3", "Private Philips MR Color Image Storage"); - map.put("1.3.46.670589.11.0.0.12.4", "Private Philips MR Examcard Storage"); - map.put("2.16.840.1.114033.5.1.4.1.1.130", "Private PMOD Multi-frame Image Storage"); - } - public static String nameOf(String uid) { - try { - return map.get(uid); - } catch (Exception e) { + for (UID u : UID.values()) { + if (Objects.equals(u.uid, uid)) { + return u.desc; + } } - return Symbol.QUESTION_MARK; + return "?"; } public static String forName(String keyword) { try { return (String) UID.class.getField(keyword).get(null); - } catch (Exception e) { + } catch (Exception var2) { throw new IllegalArgumentException(keyword); } } - public static final String getRoot() { - return UUID_ROOT; - } - - public static final void setRoot(String root) { - checkRoot(root); - UID.root = root; - } - - private static void checkRoot(String root) { - if (root.length() > 24) - throw new IllegalArgumentException("root length > 24"); - if (!isValid(root)) - throw new IllegalArgumentException(root); - } - - public static boolean isValid(String uid) { - return uid.length() <= Normal._64 && PATTERN.matcher(uid).matches(); - } - - public static String createUID() { - return randomUID(root); - } - - public static String createNameBasedUID(byte[] name) { - return nameBasedUID(name, root); - } - - public static String createNameBasedUID(byte[] name, String root) { - checkRoot(root); - return nameBasedUID(name, root); - } - - public static String createUID(String root) { - checkRoot(root); - return randomUID(root); - } - - public static String createUIDIfNull(String uid) { - return null == uid ? randomUID(root) : uid; - } - - public static String createUIDIfNull(String uid, String root) { - checkRoot(root); - return null == uid ? randomUID(root) : uid; - } - - public static String remapUID(String uid) { - return nameBasedUID(uid.getBytes(ASCII), root); - } - - public static String remapUID(String uid, String root) { - checkRoot(root); - return nameBasedUID(uid.getBytes(ASCII), root); - } - - private static String randomUID(String root) { - return toUID(root, UUID.randomUUID()); - } - - private static String nameBasedUID(byte[] name, String root) { - return toUID(root, UUID.nameUUIDFromBytes(name)); + public static String toUID(String uid) { + uid = uid.trim(); + return (uid.equals("*") || Character.isDigit(uid.charAt(0))) ? uid : forName(uid); } private static String toUID(String root, UUID uuid) { @@ -3122,16 +640,24 @@ private static String toUID(String root, UUID uuid) { int uuidlen = uuidStr.length(); char[] cs = new char[rootlen + uuidlen + 1]; root.getChars(0, rootlen, cs, 0); - cs[rootlen] = Symbol.C_DOT; + cs[rootlen] = '.'; uuidStr.getChars(0, uuidlen, cs, rootlen + 1); return new String(cs); } - public static StringBuilder promptTo(String uid, StringBuilder sb) { - return sb.append(uid).append(" - ").append(UID.nameOf(uid)); + public static String[] toUIDs(String s) { + if (s.equals("*")) { + return new String[]{"*"}; + } + + String[] uids = StringKit.splitToArray(s, ","); + for (int i = 0; i < uids.length; i++) { + uids[i] = toUID(uids[i]); + } + return uids; } - public static String[] findUIDs(String regex) { + private static String[] findUIDs(String regex) { Pattern p = Pattern.compile(regex); Field[] fields = UID.class.getFields(); String[] uids = new String[fields.length]; @@ -3147,90 +673,103 @@ public static String[] findUIDs(String regex) { return Arrays.copyOf(uids, j); } - public static int remapUIDs(Attributes attrs, Map uidMap) { + public static String remapUID(String uid) { + return nameBasedUID(uid.getBytes(ASCII), root); + } + + public static String remapUID(String uid, String root) { + checkRoot(root); + return nameBasedUID(uid.getBytes(ASCII), root); + } + + public static int remapUID(Attributes attrs, Map uidMap) { return remapUIDs(attrs, uidMap, null); } /** - * Replaces UIDs in Attributes according specified mapping. + * Replaces UIDs in Attributes according specified mapping. * * @param attrs Attributes object which UIDs will be replaced * @param uidMap Specified mapping * @param modified Attributes object to collect overwritten non-empty - * attributes with original values or true + * attributes with original values or null * @return number of replaced UIDs */ - public static int remapUIDs(Attributes attrs, Map uidMap, Attributes modified) { - Visitor visitor = new Visitor(uidMap, modified); + private static int remapUIDs(Attributes attrs, Map uidMap, Attributes modified) { + UIDVisitor UIDVisitor = new UIDVisitor(uidMap, modified); try { - attrs.accept(visitor, true); + attrs.accept(UIDVisitor, true); } catch (Exception e) { throw new RuntimeException(e); } - return visitor.replaced; + return UIDVisitor.replaced; } - private static class Visitor implements Attributes.Visitor { - private final Map uidMap; - private final Attributes modified; - private int replaced; - private int rootSeqTag; + private static String randomUID(String root) { + return toUID(root, UUID.randomUUID()); + } - public Visitor(Map uidMap, Attributes modified) { - this.uidMap = uidMap; - this.modified = modified; - } + private static String nameBasedUID(byte[] name, String root) { + return toUID(root, UUID.nameUUIDFromBytes(name)); + } - @Override - public boolean visit(Attributes attrs, int tag, VR vr, Object val) { - if (vr != VR.UI || val == Value.NULL) { - if (attrs.isRoot()) - rootSeqTag = vr == VR.SQ ? tag : 0; - return true; - } + public static StringBuilder promptTo(String uid, StringBuilder sb) { + return sb.append(uid).append(" - ").append(nameOf(uid)); + } - String[] ss; - if (val instanceof byte[]) { - ss = attrs.getStrings(tag); - val = ss.length == 1 ? ss[0] : ss; - } - if (val instanceof String[]) { - ss = (String[]) val; - for (int i = 0, c = 0; i < ss.length; i++) { - String uid = uidMap.get(ss[i]); - if (null != uid) { - if (c++ == 0) - modified(attrs, tag, vr, ss.clone()); - ss[i] = uid; - replaced++; - } - } - } else { - String uid = uidMap.get(val); - if (null != uid) { - modified(attrs, tag, vr, val); - attrs.setString(tag, VR.UI, uid); - replaced++; - } - } - return true; - } + public static String createUID() { + return randomUID(root); + } + + public static String createUID(String root) { + checkRoot(root); + return randomUID(root); + } - private void modified(Attributes attrs, int tag, VR vr, Object val) { - if (null == modified) - return; + public static String createNameBasedUID(byte[] name) { + return nameBasedUID(name, root); + } - if (rootSeqTag == 0) { - modified.setValue(tag, vr, val); - } else if (!modified.contains(rootSeqTag)) { - Sequence src = attrs.getRoot().getSequence(rootSeqTag); - Sequence dst = modified.newSequence(rootSeqTag, src.size()); - for (Attributes item : src) { - dst.add(new Attributes(item)); - } - } - } + private static String createNameBasedUID(byte[] name, String root) { + checkRoot(root); + return nameBasedUID(name, root); + } + + public static String createUIDIfNull(String uid) { + return uid == null ? randomUID(root) : uid; + } + + private static String createUIDIfNull(String uid, String root) { + checkRoot(root); + return uid == null ? randomUID(root) : uid; + } + + private static boolean isValid1(String uid) { + return uid.length() <= 64 && PATTERN.matcher(uid).matches(); + } + + private static final String getRoot() { + return root; + } + + private static final void setRoot(String root) { + checkRoot(root); + UID.root = root; + } + + private static void checkRoot(String root) { + if (root.length() > 24) + throw new IllegalArgumentException("root length > 24"); + if (!isValid1(root)) + throw new IllegalArgumentException(root); + } + + public String getUid() { + return uid; + } + public String getDesc() { + return desc; } } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/AcquisitionModality.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/AcquisitionModality.java old mode 100755 new mode 100644 diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/AnatomicRegion.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/AnatomicRegion.java old mode 100755 new mode 100644 index 5a94cbd36c..7c1d8e1d37 --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/AnatomicRegion.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/AnatomicRegion.java @@ -38,135 +38,355 @@ */ public class AnatomicRegion { - public static final Code Abdomen = new Code("T-D4000", "SRT", null, "Abdomen"); - public static final Code AbdomenPelvis = new Code("R-FAB57", "SRT", null, "Abdomen and Pelvis"); - public static final Code AdrenalGland = new Code("T-B3000", "SRT", null, "Adrenal gland"); - public static final Code AnkleJoint = new Code("T-15750", "SRT", null, "Ankle joint"); - public static final Code Aorta = new Code("T-42000", "SRT", null, "Aorta"); - public static final Code Axilla = new Code("T-D8104", "SRT", null, "Axilla"); - public static final Code Back = new Code("T-D2100", "SRT", null, "Back"); - public static final Code Bladder = new Code("T-74000", "SRT", null, "Bladder"); - public static final Code Brain = new Code("T-A0100", "SRT", null, "Brain"); - public static final Code Breast = new Code("T-04000", "SRT", null, "Breast"); - public static final Code Bronchus = new Code("T-26000", "SRT", null, "Bronchus"); - public static final Code Buttock = new Code("T-D2600", "SRT", null, "Buttock"); - public static final Code Calcaneus = new Code("T-12770", "SRT", null, "Calcaneus"); - public static final Code CalfOfLeg = new Code("T-D9440", "SRT", null, "Calf of leg"); - public static final Code CarotidArtery = new Code("T-45010", "SRT", null, "Carotid Artery"); - public static final Code Cerebellum = new Code("T-A6000", "SRT", null, "Cerebellum"); - public static final Code CervicalSpine = new Code("T-11501", "SRT", null, "Cervical spine"); - public static final Code CervicoThoracicSpine = new Code("T-D00F7", "SRT", null, "Cervico-thoracic spine"); - public static final Code Cervix = new Code("T-83200", "SRT", null, "Cervix"); - public static final Code Cheek = new Code("T-D1206", "SRT", null, "Cheek"); - public static final Code Chest = new Code("T-D3000", "SRT", null, "Chest"); - public static final Code ChestAbdomen = new Code("R-FAB55", "SRT", null, "Chest and Abdomen"); - public static final Code ChestAbdomenPelvis = new Code("R-FAB56", "SRT", null, "Chest, Abdomen and Pelvis"); - public static final Code CircleOfWillis = new Code("T-45526", "SRT", null, "Circle of Willis"); - public static final Code Clavicle = new Code("T-12310", "SRT", null, "Clavicle"); - public static final Code Coccyx = new Code("T-11BF0", "SRT", null, "Coccyx"); - public static final Code Colon = new Code("T-59300", "SRT", null, "Colon"); - public static final Code Cornea = new Code("T-AA200", "SRT", null, "Cornea"); - public static final Code CoronaryArtery = new Code("T-43000", "SRT", null, "Coronary artery"); - public static final Code Duodenum = new Code("T-58200", "SRT", null, "Duodenum"); - public static final Code Ear = new Code("T-AB000", "SRT", null, "Ear"); - public static final Code ElbowJoint = new Code("T-15430", "SRT", null, "Elbow joint"); - public static final Code EntireBody = new Code("T-D0010", "SRT", null, "Entire body"); - public static final Code Esophagus = new Code("T-56000", "SRT", null, "Esophagus"); - public static final Code Extremity = new Code("T-D0300", "SRT", null, "Extremity"); - public static final Code Eye = new Code("T-AA000", "SRT", null, "Eye"); - public static final Code Eyelid = new Code("T-AA810", "SRT", null, "Eyelid"); - public static final Code Face = new Code("T-D1200", "SRT", null, "Face"); - public static final Code Femur = new Code("T-12710", "SRT", null, "Femur"); - public static final Code Finger = new Code("T-D8800", "SRT", null, "Finger"); - public static final Code Foot = new Code("T-D9700", "SRT", null, "Foot"); - public static final Code Gallbladder = new Code("T-63000", "SRT", null, "Gallbladder"); - public static final Code Hand = new Code("T-D8700", "SRT", null, "Hand"); - public static final Code Head = new Code("T-D1100", "SRT", null, "Head"); - public static final Code HeadNeck = new Code("T-D1000", "SRT", null, "Head and Neck"); - public static final Code Heart = new Code("T-32000", "SRT", null, "Heart"); - public static final Code HipJoint = new Code("T-15710", "SRT", null, "Hip joint"); - public static final Code Humerus = new Code("T-12410", "SRT", null, "Humerus"); - public static final Code Ileum = new Code("T-58600", "SRT", null, "Ileum"); - public static final Code Ilium = new Code("T-12340", "SRT", null, "Ilium"); - public static final Code InternalAuditoryCanal = new Code("T-AB959", "SRT", null, "Internal Auditory Canal"); - public static final Code JawRegion = new Code("T-D1213", "SRT", null, "Jaw region"); - public static final Code Jejunum = new Code("T-58400", "SRT", null, "Jejunum"); - public static final Code Kidney = new Code("T-71000", "SRT", null, "Kidney"); - public static final Code Knee = new Code("T-D9200", "SRT", null, "Knee"); - public static final Code Larynx = new Code("T-24100", "SRT", null, "Larynx"); - public static final Code Liver = new Code("T-62000", "SRT", null, "Liver"); - public static final Code LowerLeg = new Code("T-D9400", "SRT", null, "Lower leg"); - public static final Code LumbarSpine = new Code("T-11503", "SRT", null, "Lumbar spine"); - public static final Code LumboSacralSpine = new Code("T-D00F9", "SRT", null, "Lumbo-sacral spine"); - public static final Code Lung = new Code("T-28000", "SRT", null, "Lung"); - public static final Code Mandible = new Code("T-11180", "SRT", null, "Mandible"); - public static final Code Maxilla = new Code("T-11170", "SRT", null, "Maxilla"); - public static final Code Mediastinum = new Code("T-D3300", "SRT", null, "Mediastinum"); - public static final Code Mouth = new Code("T-51000", "SRT", null, "Mouth"); - public static final Code Neck = new Code("T-D1600", "SRT", null, "Neck"); - public static final Code NeckChest = new Code("R-FAB52", "SRT", null, "Neck and Chest"); - public static final Code NeckChestAbdomen = new Code("R-FAB53", "SRT", null, "Neck, Chest and Abdomen"); - public static final Code NeckChestAbdomenPelvis = new Code("R-FAB54", "SRT", null, "Neck, Chest, Abdomen and Pelvis"); - public static final Code Nose = new Code("T-21000", "SRT", null, "Nose"); - public static final Code OrbitalStructure = new Code("T-D14AE", "SRT", null, "Orbital structure"); - public static final Code Ovary = new Code("T-87000", "SRT", null, "Ovary"); - public static final Code Pancreas = new Code("T-65000", "SRT", null, "Pancreas"); - public static final Code ParotidGland = new Code("T-61100", "SRT", null, "Parotid gland"); - public static final Code Patella = new Code("T-12730", "SRT", null, "Patella"); - public static final Code Pelvis = new Code("T-D6000", "SRT", null, "Pelvis"); - public static final Code Penis = new Code("T-91000", "SRT", null, "Penis"); - public static final Code Pharynx = new Code("T-55000", "SRT", null, "Pharynx"); - public static final Code Prostate = new Code("T-9200B", "SRT", null, "Prostate"); - public static final Code Radius = new Code("T-12420", "SRT", null, "Radius"); - public static final Code RadiusUlna = new Code("T-12403", "SRT", null, "Radius and ulna"); - public static final Code Rectum = new Code("T-59600", "SRT", null, "Rectum"); - public static final Code Rib = new Code("T-11300", "SRT", null, "Rib"); - public static final Code Sacrum = new Code("T-11AD0", "SRT", null, "Sacrum"); - public static final Code Scalp = new Code("T-D1160", "SRT", null, "Scalp"); - public static final Code Scapula = new Code("T-12280", "SRT", null, "Scapula"); - public static final Code Sclera = new Code("T-AA110", "SRT", null, "Sclera"); - public static final Code Scrotum = new Code("T-98000", "SRT", null, "Scrotum"); - public static final Code Shoulder = new Code("T-D2220", "SRT", null, "Shoulder"); - public static final Code Skull = new Code("T-11100", "SRT", null, "Skull"); - public static final Code Spine = new Code("T-D04FF", "SRT", null, "Spine"); - public static final Code Spleen = new Code("T-C3000", "SRT", null, "Spleen"); - public static final Code Sternum = new Code("T-11210", "SRT", null, "Sternum"); - public static final Code Stomach = new Code("T-57000", "SRT", null, "Stomach"); - public static final Code SubmandibularGland = new Code("T-61300", "SRT", null, "Submandibular gland"); - public static final Code TemporomandibularJoint = new Code("T-15290", "SRT", null, "Temporomandibular joint"); - public static final Code Testis = new Code("T-94000", "SRT", null, "Testis"); - public static final Code Thigh = new Code("T-D9100", "SRT", null, "Thigh"); - public static final Code ThoracicSpine = new Code("T-11502", "SRT", null, "Thoracic spine"); - public static final Code ThoracoLumbarSpine = new Code("T-D00F8", "SRT", null, "Thoraco-lumbar spine"); - public static final Code Thumb = new Code("T-D8810", "SRT", null, "Thumb"); - public static final Code Thymus = new Code("T-C8000", "SRT", null, "Thymus"); - public static final Code Thyroid = new Code("T-B6000", "SRT", null, "Thyroid"); - public static final Code Tibia = new Code("T-12740", "SRT", null, "Tibia"); - public static final Code TibiaFibula = new Code("T-12701", "SRT", null, "Tibia and fibula"); - public static final Code Toe = new Code("T-D9800", "SRT", null, "Toe"); - public static final Code Tongue = new Code("T-53000", "SRT", null, "Tongue"); - public static final Code Trachea = new Code("T-25000", "SRT", null, "Trachea"); - public static final Code Ulna = new Code("T-12430", "SRT", null, "Ulna"); - public static final Code UpperArm = new Code("T-D8200", "SRT", null, "Upper arm"); - public static final Code Ureter = new Code("T-73000", "SRT", null, "Ureter"); - public static final Code Urethra = new Code("T-75000", "SRT", null, "Urethra"); - public static final Code Uterus = new Code("T-83000", "SRT", null, "Uterus"); - public static final Code Vagina = new Code("T-82000", "SRT", null, "Vagina"); - public static final Code Vulva = new Code("T-81000", "SRT", null, "Vulva"); - public static final Code WristJoint = new Code("T-15460", "SRT", null, "Wrist joint"); - public static final Code Zygoma = new Code("T-11166", "SRT", null, "Zygoma"); + public static final Code Abdomen = new Code("818981001", "SCT", null, "Abdomen"); + public static final Code AbdomenPelvis = new Code("818982008", "SCT", null, "Abdomen and Pelvis"); + public static final Code AbdominalAorta = new Code("7832008", "SCT", null, "Abdomen aorta"); + public static final Code AcromioclavicularJoint = new Code("85856004", "SCT", null, "Acromioclavicular joint"); + public static final Code AdrenalGland = new Code("23451007", "SCT", null, "Adrenal gland"); + public static final Code AmnioticFluid = new Code("77012006", "SCT", null, "Amniotic fluid"); + public static final Code AnkleJoint = new Code("70258002", "SCT", null, "Ankle joint"); + public static final Code AntecubitalVein = new Code("128553008", "SCT", null, "Antecubital vein"); + public static final Code AnteriorCardiacVein = new Code("194996006", "SCT", null, "Anterior cardiac vein"); + public static final Code AnteriorCerebralArtery = new Code("60176003", "SCT", null, "Anterior cerebral artery"); + public static final Code AnteriorCommunicatingArtery = new Code("8012006", "SCT", null, "Anterior communicating artery"); + public static final Code AnteriorSpinalArtery = new Code("17388009", "SCT", null, "Anterior spinal artery"); + public static final Code AnteriorTibialArtery = new Code("68053000", "SCT", null, "Anterior tibial artery"); + public static final Code AnusRectumSigmoidColon = new Code("110612005", "SCT", null, "Anus, rectum and sigmoid colon"); + public static final Code Aorta = new Code("15825003", "SCT", null, "Aorta"); + public static final Code AorticArch = new Code("57034009", "SCT", null, "Aortic arch"); + public static final Code Appendix = new Code("66754008", "SCT", null, "Appendix"); + public static final Code Artery = new Code("51114001", "SCT", null, "Artery"); + public static final Code AscendingAorta = new Code("54247002", "SCT", null, "Ascending aorta"); + public static final Code AscendingColon = new Code("9040008", "SCT", null, "Ascending colon"); + public static final Code Axilla = new Code("91470000", "SCT", null, "Axilla"); + public static final Code AxillaryArtery = new Code("67937003", "SCT", null, "Axillary Artery"); + public static final Code AxillaryVein = new Code("68705008", "SCT", null, "Axillary vein"); + public static final Code AzygosVein = new Code("72107004", "SCT", null, "Azygos vein"); + public static final Code Back = new Code("77568009", "SCT", null, "Back"); + public static final Code BasilarArtery = new Code("59011009", "SCT", null, "Basilar artery"); + public static final Code BileDuct = new Code("28273000", "SCT", null, "Bile Duct"); + public static final Code BiliaryTract = new Code("34707002", "SCT", null, "Biliary tract"); + public static final Code Bladder = new Code("89837001", "SCT", null, "Bladder"); + public static final Code BladderUrethra = new Code("110837003", "SCT", null, "Bladder and urethra"); + public static final Code BrachialArtery = new Code("17137000", "SCT", null, "Brachial artery"); + public static final Code BrachialVein = new Code("20115005", "SCT", null, "Brachial vein"); + public static final Code Brain = new Code("12738006", "SCT", null, "Brain"); + public static final Code Breast = new Code("76752008", "SCT", null, "Breast"); + public static final Code Bronchus = new Code("955009", "SCT", null, "Bronchus"); + public static final Code Buttock = new Code("46862004", "SCT", null, "Buttock"); + public static final Code Calcaneus = new Code("80144004", "SCT", null, "Calcaneus"); + public static final Code CalfOfLeg = new Code("53840002", "SCT", null, "Calf of leg"); + public static final Code CarotidArtery = new Code("69105007", "SCT", null, "Carotid Artery"); + public static final Code CarotidBulb = new Code("21479005", "SCT", null, "Carotid Bulb"); + public static final Code CeliacArtery = new Code("57850000", "SCT", null, "Celiac artery"); + public static final Code CephalicVein = new Code("20699002", "SCT", null, "Cephalic vein"); + public static final Code Cerebellum = new Code("113305005", "SCT", null, "Cerebellum"); + public static final Code CerebralArtery = new Code("88556005", "SCT", null, "Cerebral artery"); + public static final Code CerebralHemisphere = new Code("372073000", "SCT", null, "Cerebral hemisphere"); + public static final Code CervicalSpine = new Code("122494005", "SCT", null, "Cervical spine"); + public static final Code CervicoThoracicSpine = new Code("1217257000", "SCT", null, "Cervico-thoracic spine"); + public static final Code Cervix = new Code("71252005", "SCT", null, "Cervix"); + public static final Code Cheek = new Code("60819002", "SCT", null, "Cheek"); + public static final Code Chest = new Code("43799004", "SCT", null, "Chest"); + public static final Code ChestAbdomen = new Code("416550000", "SCT", null, "Chest and Abdomen"); + public static final Code ChestAbdomenPelvis = new Code("416775004", "SCT", null, "Chest, Abdomen and Pelvis"); + public static final Code ChoroidPlexus = new Code("80621003", "SCT", null, "Choroid plexus"); + public static final Code CircleOfWillis = new Code("11279006", "SCT", null, "Circle of Willis"); + public static final Code Clavicle = new Code("51299004", "SCT", null, "Clavicle"); + public static final Code Coccyx = new Code("64688005", "SCT", null, "Coccyx"); + public static final Code Colon = new Code("71854001", "SCT", null, "Colon"); + public static final Code CommonBileDuct = new Code("79741001", "SCT", null, "Common bile duct"); + public static final Code CommonCarotidArtery = new Code("32062004", "SCT", null, "Common carotid artery"); + public static final Code CommonFemoralArtery = new Code("181347005", "SCT", null, "Common femoral artery"); + public static final Code CommonFemoralVein = new Code("397363009", "SCT", null, "Common femoral vein"); + public static final Code CommonIliacArtery = new Code("73634005", "SCT", null, "Common iliac artery"); + public static final Code CommonIliacVein = new Code("46027005", "SCT", null, "Common iliac vein"); + public static final Code Cornea = new Code("28726007", "SCT", null, "Cornea"); + public static final Code CoronaryArtery = new Code("41801008", "SCT", null, "Coronary artery"); + public static final Code CoronarySinus = new Code("90219004", "SCT", null, "Coronary sinus"); + public static final Code DescendingAorta = new Code("32672002", "SCT", null, "Descending aorta"); + public static final Code DescendingColon = new Code("32622004", "SCT", null, "Descending colon"); + public static final Code Duodenum = new Code("38848004", "SCT", null, "Duodenum"); + public static final Code Ear = new Code("117590005", "SCT", null, "Ear"); + public static final Code ElbowJoint = new Code("16953009", "SCT", null, "Elbow joint"); + public static final Code EndoArterial = new Code("51114001", "SCT", null, "Endo-arterial"); + public static final Code EndoCardiac = new Code("80891009", "SCT", null, "Endo-cardiac"); + public static final Code EndoEsophageal = new Code("32849002", "SCT", null, "Endo-esophageal"); + public static final Code Endometrium = new Code("2739003", "SCT", null, "Endometrium"); + public static final Code EndoNasal = new Code("53342003", "SCT", null, "Endo-nasal"); + public static final Code EndoNasopharyngeal = new Code("18962004", "SCT", null, "Endo-nasopharyngeal"); + public static final Code EndoRectal = new Code("34402009", "SCT", null, "Endo-rectal"); + public static final Code EndoRenal = new Code("64033007", "SCT", null, "Endo-renal"); + public static final Code EndoUreteric = new Code("87953007", "SCT", null, "Endo-ureteric"); + public static final Code EndoUrethral = new Code("13648007", "SCT", null, "Endo-urethral"); + public static final Code EndoVaginal = new Code("76784001", "SCT", null, "Endo-vaginal"); + public static final Code EndoVascular = new Code("59820001", "SCT", null, "Endo-vascular"); + public static final Code EndoVenous = new Code("29092000", "SCT", null, "Endo-venous"); + public static final Code EndoVesical = new Code("48367006", "SCT", null, "Endo-vesical"); + public static final Code EntireBody = new Code("38266002", "SCT", null, "Entire body"); + public static final Code Epididymis = new Code("87644002", "SCT", null, "Epididymis"); + public static final Code EpigastricRegion = new Code("27947004", "SCT", null, "Epigastric region"); + public static final Code Esophagus = new Code("32849002", "SCT", null, "Esophagus"); + public static final Code ExternalAuditoryCanal = new Code("84301002", "SCT", null, "External auditory canal"); + public static final Code ExternalCarotidArtery = new Code("22286001", "SCT", null, "External carotid artery"); + public static final Code ExternalIliacArtery = new Code("113269004", "SCT", null, "External iliac artery"); + public static final Code ExternalIliacVein = new Code("63507001", "SCT", null, "External iliac vein"); + public static final Code ExternalJugularVein = new Code("71585003", "SCT", null, "External jugular vein"); + public static final Code Extremity = new Code("66019005", "SCT", null, "Extremity"); + public static final Code Eye = new Code("81745001", "SCT", null, "Eye"); + public static final Code Eyelid = new Code("80243003", "SCT", null, "Eyelid"); + public static final Code Face = new Code("89545001", "SCT", null, "Face"); + public static final Code FacialArtery = new Code("23074001", "SCT", null, "Facial artery"); + public static final Code FemoralArtery = new Code("7657000", "SCT", null, "Femoral artery"); + public static final Code FemoralVein = new Code("83419000", "SCT", null, "Femoral vein"); + public static final Code Femur = new Code("71341001", "SCT", null, "Femur"); + public static final Code Fibula = new Code("87342007", "SCT", null, "Fibula"); + public static final Code Finger = new Code("7569003", "SCT", null, "Finger"); + public static final Code Flank = new Code("58602004", "SCT", null, "Flank"); + public static final Code FontanelSkull = new Code("79361005", "SCT", null, "Fontanel of skull"); + public static final Code Foot = new Code("56459004", "SCT", null, "Foot"); + public static final Code Forearm = new Code("14975008", "SCT", null, "Forearm"); + public static final Code FourthVentricle = new Code("35918002", "SCT", null, "Fourth Ventricle"); + public static final Code Gallbladder = new Code("28231008", "SCT", null, "Gallbladder"); + public static final Code GastricVein = new Code("110568007", "SCT", null, "Gastric vein"); + public static final Code GenicularArtery = new Code("128559007", "SCT", null, "Genicular artery"); + public static final Code GestationalSac = new Code("300571009", "SCT", null, "Gestational sac"); + public static final Code GlutealRegion = new Code("46862004", "SCT", null, "Gluteal region"); + public static final Code GreatSaphenousVein = new Code("60734001", "SCT", null, "Great saphenous vein"); + public static final Code Hand = new Code("85562004", "SCT", null, "Hand"); + public static final Code Head = new Code("69536005", "SCT", null, "Head"); + public static final Code HeadNeck = new Code("774007", "SCT", null, "Head and Neck"); + public static final Code Heart = new Code("80891009", "SCT", null, "Heart"); + public static final Code HepaticArtery = new Code("76015000", "SCT", null, "Hepatic artery"); + public static final Code HepaticVein = new Code("8993003", "SCT", null, "Hepatic vein"); + public static final Code HipJoint = new Code("24136001", "SCT", null, "Hip joint"); + public static final Code Humerus = new Code("85050009", "SCT", null, "Humerus"); + public static final Code HypogastricRegion = new Code("11708003", "SCT", null, "Hypogastric region"); + public static final Code Hypopharynx = new Code("81502006", "SCT", null, "Hypopharynx"); + public static final Code Ileum = new Code("34516001", "SCT", null, "Ileum"); + public static final Code IliacArtery = new Code("10293006", "SCT", null, "Iliac artery"); + public static final Code IliacVein = new Code("244411005", "SCT", null, "Iliac vein"); + public static final Code Ilium = new Code("22356005", "SCT", null, "Ilium"); + public static final Code InferiorMesentricArtery = new Code("33795007", "SCT", null, "Inferior mesenteric artery"); + public static final Code InferiorVenaCava = new Code("64131007", "SCT", null, "Inferior vena cava"); + public static final Code InguinalRegion = new Code("26893007", "SCT", null, "Inguinal region"); + public static final Code InnominateArtery = new Code("12691009", "SCT", null, "Innominate artery"); + public static final Code InnominateVein = new Code("8887007", "SCT", null, "Innominate vein"); + public static final Code InternalAuditoryCanal = new Code("361078006", "SCT", null, "Internal Auditory Canal"); + public static final Code InternalCarotidArtery = new Code("86117002", "SCT", null, "Internal carotid artery"); + public static final Code InternalIliacArtery = new Code("90024005", "SCT", null, "Internal iliac artery"); + public static final Code InternalJugularVein = new Code("12123001", "SCT", null, "Internal jugular vein"); + public static final Code InternalMammaryArtery = new Code("86117002", "SCT", null, "Internal mammary artery"); + public static final Code Intracranial = new Code("1101003", "SCT", null, "Intracranial"); + public static final Code JawRegion = new Code("661005", "SCT", null, "Jaw region"); + public static final Code Jejunum = new Code("21306003", "SCT", null, "Jejunum"); + public static final Code Joint = new Code("39352004", "SCT", null, "Joint"); + public static final Code Kidney = new Code("64033007", "SCT", null, "Kidney"); + public static final Code Knee = new Code("72696002", "SCT", null, "Knee"); + public static final Code LacrimalArtery = new Code("59749000", "SCT", null, "Lacrimal artery"); + public static final Code LargeIntestine = new Code("14742008", "SCT", null, "Large intestine"); + public static final Code Larynx = new Code("4596009", "SCT", null, "Larynx"); + public static final Code LateralVentricle = new Code("66720007", "SCT", null, "Lateral Ventricle"); + public static final Code LeftAtrium = new Code("82471001", "SCT", null, "Left atrium"); + public static final Code LeftFemoralArtery = new Code("113270003", "SCT", null, "Left femoral artery"); + public static final Code LeftHepaticVein = new Code("273202007", "SCT", null, "Left hepatic vein"); + public static final Code LeftHypochondriacRegion = new Code("133945003", "SCT", null, "Left hypochondriac region"); + public static final Code LeftInguinalRegion = new Code("85119005", "SCT", null, "Left inguinal region"); + public static final Code LeftLowerQuadrantAbdomen = new Code("68505006", "SCT", null, "Left lower quadrant of abdomen"); + public static final Code LeftLumbarRegion = new Code("1017210004", "SCT", null, "Left lumbar region"); + public static final Code LeftPortalVein = new Code("70253006", "SCT", null, "Left portal vein"); + public static final Code LeftPulmonaryArtery = new Code("50408007", "SCT", null, "Left pulmonary artery"); + public static final Code LeftUpperQuadrantAbdomen = new Code("86367003", "SCT", null, "Left upper quadrant of abdomen"); + public static final Code LeftVentricle = new Code("87878005", "SCT", null, "Left ventricle"); + public static final Code LingualArtery = new Code("113264009", "SCT", null, "Lingual artery"); + public static final Code Liver = new Code("10200004", "SCT", null, "Liver"); + public static final Code LowerLeg = new Code("30021000", "SCT", null, "Lower leg"); + public static final Code LowerLimb = new Code("61685007", "SCT", null, "Lower limb"); + public static final Code LumbarArtery = new Code("34635009", "SCT", null, "Lumbar artery"); + public static final Code LumbarRegion = new Code("52612000", "SCT", null, "Lumbar region"); + public static final Code LumbarSpine = new Code("122496007", "SCT", null, "Lumbar spine"); + public static final Code LumboSacralSpine = new Code("1217253001", "SCT", null, "Lumbo-sacral spine"); + public static final Code LumenBloodVessel = new Code("91747007", "SCT", null, "Lumen of blood vessel"); + public static final Code Lung = new Code("39607008", "SCT", null, "Lung"); + public static final Code Mandible = new Code("91609006", "SCT", null, "Mandible"); + public static final Code MastoidBone = new Code("59066005", "SCT", null, "Mastoid Bone"); + public static final Code Maxilla = new Code("70925003", "SCT", null, "Maxilla"); + public static final Code Mediastinum = new Code("72410000", "SCT", null, "Mediastinum"); + public static final Code MesentericArtery = new Code("86570000", "SCT", null, "Mesenteric artery"); + public static final Code MesentericVein = new Code("128583004", "SCT", null, "Mesenteric vein"); + public static final Code MiddleCerebralArtery = new Code("17232002", "SCT", null, "Middle cerebral artery"); + public static final Code MiddleHepaticVein = new Code("273099000", "SCT", null, "Middle hepatic vein"); + public static final Code MorisonsPouch = new Code("243977002", "SCT", null, "Morisons Pouch"); + public static final Code Mouth = new Code("123851003", "SCT", null, "Mouth"); + public static final Code Nasopharynx = new Code("360955006", "SCT", null, "Nasopharynx"); + public static final Code Neck = new Code("45048000", "SCT", null, "Neck"); + public static final Code NeckChest = new Code("417437006", "SCT", null, "Neck and Chest"); + public static final Code NeckChestAbdomen = new Code("416152001", "SCT", null, "Neck, Chest and Abdomen"); + public static final Code NeckChestAbdomenPelvis = new Code("416319003", "SCT", null, "Neck, Chest, Abdomen and Pelvis"); + public static final Code Nose = new Code("45206002", "SCT", null, "Nose"); + public static final Code OccipitalArtery = new Code("31145008", "SCT", null, "Occipital artery"); + public static final Code OccipitalVein = new Code("32114007", "SCT", null, "Occipital vein"); + public static final Code OphthalmicArtery = new Code("53549008", "SCT", null, "Ophthalmic artery"); + public static final Code OpticCanal = new Code("55024004", "SCT", null, "Optic canal"); + public static final Code OrbitalStructure = new Code("363654007", "SCT", null, "Orbital structure"); + public static final Code Ovary = new Code("15497006", "SCT", null, "Ovary"); + public static final Code Pancreas = new Code("15776009", "SCT", null, "Pancreas"); + public static final Code PancreaticDuct = new Code("69930009", "SCT", null, "Pancreatic duct"); + public static final Code PancreaticDuctBileDuctSystems = new Code("110621006", "SCT", null, "Pancreatic duct and bile duct systems"); + public static final Code Parasternal = new Code("91691001", "SCT", null, "Parasternal"); + public static final Code Parathyroid = new Code("111002", "SCT", null, "Parathyroid"); + public static final Code ParotidGland = new Code("45289007", "SCT", null, "Parotid gland"); + public static final Code Patella = new Code("64234005", "SCT", null, "Patella"); + public static final Code Pelvis = new Code("816092008", "SCT", null, "Pelvis"); + public static final Code PelvisLowerExtremities = new Code("1231522001", "SCT", null, "Pelvis and lower extremities"); + public static final Code PenileArtery = new Code("282044005", "SCT", null, "Penile artery"); + public static final Code Penis = new Code("18911002", "SCT", null, "Penis"); + public static final Code Perineum = new Code("38864007", "SCT", null, "Perineum"); + public static final Code PeronealArtery = new Code("8821006", "SCT", null, "Peroneal artery"); + public static final Code Phantom = new Code("706342009", "SCT", null, "Phantom"); + public static final Code Pharynx = new Code("54066008", "SCT", null, "Pharynx"); + public static final Code PharynxLarynx = new Code("312535008", "SCT", null, "Pharynx and Larynx"); + public static final Code Placenta = new Code("78067005", "SCT", null, "Placenta"); + public static final Code PoplitealArtery = new Code("43899006", "SCT", null, "Popliteal artery"); + public static final Code PoplitealFossa = new Code("32361000", "SCT", null, "Popliteal fossa"); + public static final Code PoplitealVein = new Code("56849005", "SCT", null, "Popliteal vein"); + public static final Code PortalVein = new Code("32764006", "SCT", null, "Portal vein"); + public static final Code PosteriorCerebralArtery = new Code("70382005", "SCT", null, "Posterior cerebral artery"); + public static final Code PosteriorCommunicatingArtery = new Code("43119007", "SCT", null, "Posterior communicating artery"); + public static final Code PosteriorTibialArtery = new Code("13363002", "SCT", null, "Posterior tibial artery"); + public static final Code ProfundaFemorisArtery = new Code("31677005", "SCT", null, "Profunda femoris artery"); + public static final Code ProfundaFemorisVein = new Code("23438002", "SCT", null, "Profunda femoris vein"); + public static final Code Prostate = new Code("41216001", "SCT", null, "Prostate"); + public static final Code PulmonaryArtery = new Code("81040000", "SCT", null, "Pulmonary artery"); + public static final Code PulmonaryVein = new Code("122972007", "SCT", null, "Pulmonary vein"); + public static final Code RadialArtery = new Code("45631007", "SCT", null, "Radial artery"); + public static final Code Radius = new Code("62413002", "SCT", null, "Radius"); + public static final Code RadiusUlna = new Code("110535000", "SCT", null, "Radius and ulna"); + public static final Code RectouterinePouch = new Code("53843000", "SCT", null, "Rectouterine pouch"); + public static final Code Rectum = new Code("34402009", "SCT", null, "Rectum"); + public static final Code RenalArtery = new Code("2841007", "SCT", null, "Renal artery"); + public static final Code RenalVein = new Code("56400007", "SCT", null, "Renal vein"); + public static final Code Retroperitoneum = new Code("82849001", "SCT", null, "Retroperitoneum"); + public static final Code Rib = new Code("113197003", "SCT", null, "Rib"); + public static final Code RightAtrium = new Code("73829009", "SCT", null, "Right atrium"); + public static final Code RightFemoralArtery = new Code("69833005", "SCT", null, "Right femoral artery"); + public static final Code RightHepaticVein = new Code("272998002", "SCT", null, "Right hepatic vein"); + public static final Code RightHypochondriacRegion = new Code("133946002", "SCT", null, "Right hypochondriac region"); + public static final Code RightInguinalRegion = new Code("37117007", "SCT", null, "Right inguinal region"); + public static final Code RightLowerQuadrantAbdomen = new Code("48544008", "SCT", null, "Right lower quadrant of abdomen"); + public static final Code RightLumbarRegion = new Code("1017211000", "SCT", null, "Right lumbar region"); + public static final Code RightPortalVein = new Code("73931004", "SCT", null, "Right portal vein"); + public static final Code RightPulmonaryArtery = new Code("78480002", "SCT", null, "Right pulmonary artery"); + public static final Code RightUpperQuadrantAbdomen = new Code("50519007", "SCT", null, "Right upper quadrant of abdomen"); + public static final Code RightVentricle = new Code("53085002", "SCT", null, "Right ventricle"); + public static final Code SacroiliacJoint = new Code("39723000", "SCT", null, "Sacroiliac joint"); + public static final Code Sacrum = new Code("54735007", "SCT", null, "Sacrum"); + public static final Code SaphenofemoralJunction = new Code("128587003", "SCT", null, "Saphenofemoral junction"); + public static final Code SaphenousVein = new Code("362072009", "SCT", null, "Saphenous vein"); + public static final Code Scalp = new Code("41695006", "SCT", null, "Scalp"); + public static final Code Scapula = new Code("79601000", "SCT", null, "Scapula"); + public static final Code Sclera = new Code("18619003", "SCT", null, "Sclera"); + public static final Code Scrotum = new Code("20233005", "SCT", null, "Scrotum"); + public static final Code SellaTurcica = new Code("42575006", "SCT", null, "Sella turcica"); + public static final Code SeminalVesicle = new Code("64739004", "SCT", null, "Seminal vesicle"); + public static final Code SesamoidBonesFoot = new Code("58742003", "SCT", null, "Sesamoid bones of foot"); + public static final Code Shoulder = new Code("16982005", "SCT", null, "Shoulder"); + public static final Code SigmoidColon = new Code("60184004", "SCT", null, "Sigmoid Colon"); + public static final Code Skull = new Code("89546000", "SCT", null, "Skull"); + public static final Code SmallIntestine = new Code("30315005", "SCT", null, "Small Intestine"); + public static final Code SpinalCord = new Code("2748008", "SCT", null, "Spinal Cord"); + public static final Code Spine = new Code("421060004", "SCT", null, "Spine"); + public static final Code Spleen = new Code("78961009", "SCT", null, "Spleen"); + public static final Code SplenicArtery = new Code("22083002", "SCT", null, "Splenic artery"); + public static final Code SplenicVein = new Code("35819009", "SCT", null, "Splenic vein"); + public static final Code SternoclavicularJoint = new Code("7844006", "SCT", null, "Sternoclavicular joint"); + public static final Code Sternum = new Code("56873002", "SCT", null, "Sternum"); + public static final Code Stomach = new Code("69695003", "SCT", null, "Stomach"); + public static final Code SubclavianArtery = new Code("36765005", "SCT", null, "Subclavian artery"); + public static final Code SubclavianVein = new Code("9454009", "SCT", null, "Subclavian vein"); + public static final Code Subcostal = new Code("19695001", "SCT", null, "Subcostal"); + public static final Code SubmandibularGland = new Code("54019009", "SCT", null, "Submandibular gland"); + public static final Code SuperficialFemoralArtery = new Code("181349008", "SCT", null, "Superficial femoral artery"); + public static final Code SuperficialFemoralVein = new Code("397364003", "SCT", null, "Superficial femoral vein"); + public static final Code SuperiorLeftPulmonaryVein = new Code("43863001", "SCT", null, "Superior left pulmonary vein"); + public static final Code SuperiorMesentericArtery = new Code("42258001", "SCT", null, "Superior mesenteric artery"); + public static final Code SuperiorRightPulmonaryVein = new Code("8629005", "SCT", null, "Superior right pulmonary vein"); + public static final Code SuperiorThyroidArtery = new Code("72021004", "SCT", null, "Superior thyroid artery"); + public static final Code SuperiorVenaCava = new Code("48345005", "SCT", null, "Superior vena cava"); + public static final Code SupraclavicularRegionNeck = new Code("77621008", "SCT", null, "Supraclavicular region of neck"); + public static final Code SuprapubicRegion = new Code("11708003", "SCT", null, "Suprapubic region"); + public static final Code TemporomandibularJoint = new Code("53620006", "SCT", null, "Temporomandibular joint"); + public static final Code Testis = new Code("40689003", "SCT", null, "Testis"); + public static final Code Thalamus = new Code("42695009", "SCT", null, "Thalamus"); + public static final Code Thigh = new Code("68367000", "SCT", null, "Thigh"); + public static final Code ThirdVentricle = new Code("49841001", "SCT", null, "Third ventricle"); + public static final Code ThoracicAorta = new Code("113262008", "SCT", null, "Thoracic aorta"); + public static final Code ThoracicSpine = new Code("122495006", "SCT", null, "Thoracic spine"); + public static final Code ThoracoLumbarSpine = new Code("1217256009", "SCT", null, "Thoraco-lumbar spine"); + public static final Code Thorax = new Code("43799004", "SCT", null, "Thorax"); + public static final Code Thumb = new Code("76505004", "SCT", null, "Thumb"); + public static final Code Thymus = new Code("9875009", "SCT", null, "Thymus"); + public static final Code Thyroid = new Code("69748006", "SCT", null, "Thyroid"); + public static final Code Tibia = new Code("12611008", "SCT", null, "Tibia"); + public static final Code TibiaFibula = new Code("110536004", "SCT", null, "Tibia and fibula"); + public static final Code Toe = new Code("29707007", "SCT", null, "Toe"); + public static final Code Tongue = new Code("21974007", "SCT", null, "Tongue"); + public static final Code Trachea = new Code("44567001", "SCT", null, "Trachea"); + public static final Code TracheaBronchus = new Code("110726009", "SCT", null, "Trachea and bronchus"); + public static final Code TransverseColon = new Code("485005", "SCT", null, "Transverse colon"); + public static final Code Ulna = new Code("23416004", "SCT", null, "Ulna"); + public static final Code UlnarArtery = new Code("44984001", "SCT", null, "Ulnar artery"); + public static final Code UmbilicalArtery = new Code("50536004", "SCT", null, "Umbilical artery"); + public static final Code UmbilicalRegion = new Code("90290004", "SCT", null, "Umbilical region"); + public static final Code UmbilicalVein = new Code("284639000", "SCT", null, "Umbilical vein"); + public static final Code UpperArm = new Code("40983000", "SCT", null, "Upper arm"); + public static final Code UpperLimb = new Code("53120007", "SCT", null, "Upper limb"); + public static final Code UpperUrinaryTract = new Code("431491007", "SCT", null, "Upper urinary tract"); + public static final Code Ureter = new Code("87953007", "SCT", null, "Ureter"); + public static final Code Urethra = new Code("13648007", "SCT", null, "Urethra"); + public static final Code Uterus = new Code("35039007", "SCT", null, "Uterus"); + public static final Code Vagina = new Code("76784001", "SCT", null, "Vagina"); + public static final Code Vein = new Code("29092000", "SCT", null, "Vein"); + public static final Code VertebralArtery = new Code("85234005", "SCT", null, "Vertebral Artery"); + public static final Code Vulva = new Code("45292006", "SCT", null, "Vulva"); + public static final Code WristJoint = new Code("74670003", "SCT", null, "Wrist joint"); + public static final Code Zygoma = new Code("13881006", "SCT", null, "Zygoma"); private static final Map BODY_PART_EXAMINED = new HashMap<>(); static { BODY_PART_EXAMINED.put("ABDOMEN", Abdomen); BODY_PART_EXAMINED.put("ABDOMENPELVIS", AbdomenPelvis); + BODY_PART_EXAMINED.put("ABDOMINALAORTA", AbdominalAorta); + BODY_PART_EXAMINED.put("ACJOINT", AcromioclavicularJoint); BODY_PART_EXAMINED.put("ADRENAL", AdrenalGland); + BODY_PART_EXAMINED.put("AMNIOTICFLUID", AmnioticFluid); BODY_PART_EXAMINED.put("ANKLE", AnkleJoint); + BODY_PART_EXAMINED.put("ANTECUBITALV", AntecubitalVein); + BODY_PART_EXAMINED.put("ANTCARDIACV", AnteriorCardiacVein); + BODY_PART_EXAMINED.put("ACA", AnteriorCerebralArtery); + BODY_PART_EXAMINED.put("ANTCOMMA", AnteriorCommunicatingArtery); + BODY_PART_EXAMINED.put("ANTSPINALA", AnteriorSpinalArtery); + BODY_PART_EXAMINED.put("ANTTIBIALA", AnteriorTibialArtery); + BODY_PART_EXAMINED.put("ANUSRECTUMSIGMD", AnusRectumSigmoidColon); BODY_PART_EXAMINED.put("AORTA", Aorta); + BODY_PART_EXAMINED.put("AORTICARCH", AorticArch); + BODY_PART_EXAMINED.put("APPENDIX", Appendix); + BODY_PART_EXAMINED.put("ARTERY", Artery); + BODY_PART_EXAMINED.put("ASCAORTA", AscendingAorta); + BODY_PART_EXAMINED.put("ASCENDINGCOLON", AscendingColon); BODY_PART_EXAMINED.put("AXILLA", Axilla); + BODY_PART_EXAMINED.put("AXILLARYA", AxillaryArtery); + BODY_PART_EXAMINED.put("AXILLARYV", AxillaryVein); + BODY_PART_EXAMINED.put("AZYGOSVEIN", AzygosVein); BODY_PART_EXAMINED.put("BACK", Back); + BODY_PART_EXAMINED.put("BASILARA", BasilarArtery); + BODY_PART_EXAMINED.put("BILEDUCT", BileDuct); + BODY_PART_EXAMINED.put("BILIARYTRACT", BiliaryTract); BODY_PART_EXAMINED.put("BLADDER", Bladder); + BODY_PART_EXAMINED.put("BLADDERURETHRA", BladderUrethra); + BODY_PART_EXAMINED.put("BRACHIALA", BrachialArtery); + BODY_PART_EXAMINED.put("BRACHIALV", BrachialVein); BODY_PART_EXAMINED.put("BRAIN", Brain); BODY_PART_EXAMINED.put("BREAST", Breast); BODY_PART_EXAMINED.put("BRONCHUS", Bronchus); @@ -174,7 +394,12 @@ public class AnatomicRegion { BODY_PART_EXAMINED.put("CALCANEUS", Calcaneus); BODY_PART_EXAMINED.put("CALF", CalfOfLeg); BODY_PART_EXAMINED.put("CAROTID", CarotidArtery); + BODY_PART_EXAMINED.put("BULB", CarotidBulb); + BODY_PART_EXAMINED.put("CELIACA", CeliacArtery); + BODY_PART_EXAMINED.put("CEPHALICV", CephalicVein); BODY_PART_EXAMINED.put("CEREBELLUM", Cerebellum); + BODY_PART_EXAMINED.put("CEREBRALA", CerebralArtery); + BODY_PART_EXAMINED.put("CEREBHEMISPHERE", CerebralHemisphere); BODY_PART_EXAMINED.put("CSPINE", CervicalSpine); BODY_PART_EXAMINED.put("CTSPINE", CervicoThoracicSpine); BODY_PART_EXAMINED.put("CERVIX", Cervix); @@ -182,83 +407,240 @@ public class AnatomicRegion { BODY_PART_EXAMINED.put("CHEST", Chest); BODY_PART_EXAMINED.put("CHESTABDOMEN", ChestAbdomen); BODY_PART_EXAMINED.put("CHESTABDPELVIS", ChestAbdomenPelvis); + BODY_PART_EXAMINED.put("CHOROIDPLEXUS", ChoroidPlexus); BODY_PART_EXAMINED.put("CIRCLEOFWILLIS", CircleOfWillis); BODY_PART_EXAMINED.put("CLAVICLE", Clavicle); BODY_PART_EXAMINED.put("COCCYX", Coccyx); BODY_PART_EXAMINED.put("COLON", Colon); + BODY_PART_EXAMINED.put("COMMONBILEDUCT", CommonBileDuct); + BODY_PART_EXAMINED.put("CCA", CommonCarotidArtery); + BODY_PART_EXAMINED.put("CFA", CommonFemoralArtery); + BODY_PART_EXAMINED.put("CFV", CommonFemoralVein); + BODY_PART_EXAMINED.put("COMILIACA", CommonIliacArtery); + BODY_PART_EXAMINED.put("COMILIACV", CommonIliacVein); BODY_PART_EXAMINED.put("CORNEA", Cornea); BODY_PART_EXAMINED.put("CORONARYARTERY", CoronaryArtery); + BODY_PART_EXAMINED.put("CORONARYSINUS", CoronarySinus); + BODY_PART_EXAMINED.put("DESCAORTA", DescendingAorta); + BODY_PART_EXAMINED.put("DESCENDINGCOLON", DescendingColon); BODY_PART_EXAMINED.put("DUODENUM", Duodenum); BODY_PART_EXAMINED.put("EAR", Ear); BODY_PART_EXAMINED.put("ELBOW", ElbowJoint); + BODY_PART_EXAMINED.put("ENDOARTERIAL", EndoArterial); + BODY_PART_EXAMINED.put("ENDOCARDIAC", EndoCardiac); + BODY_PART_EXAMINED.put("ENDOESOPHAGEAL", EndoEsophageal); + BODY_PART_EXAMINED.put("ENDOMETRIUM", Endometrium); + BODY_PART_EXAMINED.put("ENDONASAL", EndoNasal); + BODY_PART_EXAMINED.put("ENDONASOPHARYNYX", EndoNasopharyngeal); + BODY_PART_EXAMINED.put("ENDORECTAL", EndoRectal); + BODY_PART_EXAMINED.put("ENDORENAL", EndoRenal); + BODY_PART_EXAMINED.put("ENDOURETERIC", EndoUreteric); + BODY_PART_EXAMINED.put("ENDOURETHRAL", EndoUrethral); + BODY_PART_EXAMINED.put("ENDOVAGINAL", EndoVaginal); + BODY_PART_EXAMINED.put("ENDOVASCULAR", EndoVascular); + BODY_PART_EXAMINED.put("ENDOVENOUS", EndoVenous); + BODY_PART_EXAMINED.put("ENDOVESICAL", EndoVesical); BODY_PART_EXAMINED.put("WHOLEBODY", EntireBody); + BODY_PART_EXAMINED.put("EPIDIDYMIS", Epididymis); + BODY_PART_EXAMINED.put("EPIGASTRIC", EpigastricRegion); BODY_PART_EXAMINED.put("ESOPHAGUS", Esophagus); + BODY_PART_EXAMINED.put("EAC", ExternalAuditoryCanal); + BODY_PART_EXAMINED.put("ECA", ExternalCarotidArtery); + BODY_PART_EXAMINED.put("EXTILIACA", ExternalIliacArtery); + BODY_PART_EXAMINED.put("EXTILIACV", ExternalIliacVein); + BODY_PART_EXAMINED.put("EXTJUGV", ExternalJugularVein); BODY_PART_EXAMINED.put("EXTREMITY", Extremity); BODY_PART_EXAMINED.put("EYE", Eye); BODY_PART_EXAMINED.put("EYELID", Eyelid); BODY_PART_EXAMINED.put("FACE", Face); + BODY_PART_EXAMINED.put("FACIALA", FacialArtery); + BODY_PART_EXAMINED.put("FEMORALA", FemoralArtery); + BODY_PART_EXAMINED.put("FEMORALV", FemoralVein); BODY_PART_EXAMINED.put("FEMUR", Femur); + BODY_PART_EXAMINED.put("FIBULA", Fibula); BODY_PART_EXAMINED.put("FINGER", Finger); + BODY_PART_EXAMINED.put("FLANK", Flank); + BODY_PART_EXAMINED.put("FONTANEL", FontanelSkull); BODY_PART_EXAMINED.put("FOOT", Foot); + BODY_PART_EXAMINED.put("FOREARM", Forearm); + BODY_PART_EXAMINED.put("4THVENTRICLE", FourthVentricle); BODY_PART_EXAMINED.put("GALLBLADDER", Gallbladder); + BODY_PART_EXAMINED.put("GASTRICV", GastricVein); + BODY_PART_EXAMINED.put("GENICULARA", GenicularArtery); + BODY_PART_EXAMINED.put("GESTSAC", GestationalSac); + BODY_PART_EXAMINED.put("GLUTEAL", GlutealRegion); + BODY_PART_EXAMINED.put("GSV", GreatSaphenousVein); BODY_PART_EXAMINED.put("HAND", Hand); BODY_PART_EXAMINED.put("HEAD", Head); BODY_PART_EXAMINED.put("HEADNECK", HeadNeck); BODY_PART_EXAMINED.put("HEART", Heart); + BODY_PART_EXAMINED.put("HEPATICA", HepaticArtery); + BODY_PART_EXAMINED.put("HEPATICV", HepaticVein); BODY_PART_EXAMINED.put("HIP", HipJoint); BODY_PART_EXAMINED.put("HUMERUS", Humerus); + BODY_PART_EXAMINED.put("HYPOGASTRIC", HypogastricRegion); + BODY_PART_EXAMINED.put("HYPOPHARYNX", Hypopharynx); BODY_PART_EXAMINED.put("ILEUM", Ileum); + BODY_PART_EXAMINED.put("ILIACA", IliacArtery); + BODY_PART_EXAMINED.put("ILIACV", IliacVein); BODY_PART_EXAMINED.put("ILIUM", Ilium); + BODY_PART_EXAMINED.put("INFMESA", InferiorMesentricArtery); + BODY_PART_EXAMINED.put("INFVENACAVA", InferiorVenaCava); + BODY_PART_EXAMINED.put("INGUINAL", InguinalRegion); + BODY_PART_EXAMINED.put("INNOMINATEA", InnominateArtery); + BODY_PART_EXAMINED.put("INNOMINATEV", InnominateVein); BODY_PART_EXAMINED.put("IAC", InternalAuditoryCanal); + BODY_PART_EXAMINED.put("ICA", InternalCarotidArtery); + BODY_PART_EXAMINED.put("INTILIACA", InternalIliacArtery); + BODY_PART_EXAMINED.put("INTJUGULARV", InternalJugularVein); + BODY_PART_EXAMINED.put("INTMAMMARYA", InternalMammaryArtery); + BODY_PART_EXAMINED.put("INTRACRANIAL", Intracranial); BODY_PART_EXAMINED.put("JAW", JawRegion); BODY_PART_EXAMINED.put("JEJUNUM", Jejunum); + BODY_PART_EXAMINED.put("JOINT", Joint); BODY_PART_EXAMINED.put("KIDNEY", Kidney); BODY_PART_EXAMINED.put("KNEE", Knee); + BODY_PART_EXAMINED.put("LACRIMALA", LacrimalArtery); + BODY_PART_EXAMINED.put("LARGEINTESTINE", LargeIntestine); BODY_PART_EXAMINED.put("LARYNX", Larynx); + BODY_PART_EXAMINED.put("LATVENTRICLE", LateralVentricle); + BODY_PART_EXAMINED.put("LATRIUM", LeftAtrium); + BODY_PART_EXAMINED.put("LFEMORALA", LeftFemoralArtery); + BODY_PART_EXAMINED.put("LHEPATICV", LeftHepaticVein); + BODY_PART_EXAMINED.put("LHYPOCHONDRIAC", LeftHypochondriacRegion); + BODY_PART_EXAMINED.put("LINGUINAL", LeftInguinalRegion); + BODY_PART_EXAMINED.put("LLQ", LeftLowerQuadrantAbdomen); + BODY_PART_EXAMINED.put("LLUMBAR", LeftLumbarRegion); + BODY_PART_EXAMINED.put("LPORTALV", LeftPortalVein); + BODY_PART_EXAMINED.put("LPULMONARYA", LeftPulmonaryArtery); + BODY_PART_EXAMINED.put("LUQ", LeftUpperQuadrantAbdomen); + BODY_PART_EXAMINED.put("LVENTRICLE", LeftVentricle); + BODY_PART_EXAMINED.put("LINGUALA", LingualArtery); BODY_PART_EXAMINED.put("LIVER", Liver); BODY_PART_EXAMINED.put("LEG", LowerLeg); + BODY_PART_EXAMINED.put("LOWERLIMB", LowerLimb); + BODY_PART_EXAMINED.put("LUMBARA", LumbarArtery); + BODY_PART_EXAMINED.put("LUMBAR", LumbarRegion); BODY_PART_EXAMINED.put("LSPINE", LumbarSpine); BODY_PART_EXAMINED.put("LSSPINE", LumboSacralSpine); + BODY_PART_EXAMINED.put("LUMEN", LumenBloodVessel); BODY_PART_EXAMINED.put("LUNG", Lung); - BODY_PART_EXAMINED.put("JAW", Mandible); + BODY_PART_EXAMINED.put("MANDIBLE", Mandible); + BODY_PART_EXAMINED.put("MASTOID", MastoidBone); BODY_PART_EXAMINED.put("MAXILLA", Maxilla); BODY_PART_EXAMINED.put("MEDIASTINUM", Mediastinum); + BODY_PART_EXAMINED.put("MESENTRICA", MesentericArtery); + BODY_PART_EXAMINED.put("MESENTRICV", MesentericVein); + BODY_PART_EXAMINED.put("MCA", MiddleCerebralArtery); + BODY_PART_EXAMINED.put("MIDHEPATICV", MiddleHepaticVein); + BODY_PART_EXAMINED.put("MORISONSPOUCH", MorisonsPouch); BODY_PART_EXAMINED.put("MOUTH", Mouth); + BODY_PART_EXAMINED.put("NASOPHARYNX", Nasopharynx); BODY_PART_EXAMINED.put("NECK", Neck); BODY_PART_EXAMINED.put("NECKCHEST", NeckChest); BODY_PART_EXAMINED.put("NECKCHESTABDOMEN", NeckChestAbdomen); BODY_PART_EXAMINED.put("NECKCHESTABDPELV", NeckChestAbdomenPelvis); BODY_PART_EXAMINED.put("NOSE", Nose); + BODY_PART_EXAMINED.put("OCCPITALA", OccipitalArtery); + BODY_PART_EXAMINED.put("OCCPITALV", OccipitalVein); + BODY_PART_EXAMINED.put("OPHTHALMICA", OphthalmicArtery); + BODY_PART_EXAMINED.put("OPTICCANAL", OpticCanal); BODY_PART_EXAMINED.put("ORBIT", OrbitalStructure); BODY_PART_EXAMINED.put("OVARY", Ovary); BODY_PART_EXAMINED.put("PANCREAS", Pancreas); + BODY_PART_EXAMINED.put("PANCREATICDUCT", PancreaticDuct); + BODY_PART_EXAMINED.put("PANCBILEDUCT", PancreaticDuctBileDuctSystems); + BODY_PART_EXAMINED.put("PARASTERNAL", Parasternal); + BODY_PART_EXAMINED.put("PARATHYROID", Parathyroid); BODY_PART_EXAMINED.put("PAROTID", ParotidGland); BODY_PART_EXAMINED.put("PATELLA", Patella); BODY_PART_EXAMINED.put("PELVIS", Pelvis); + BODY_PART_EXAMINED.put("PELVISLOWEXTREMT", PelvisLowerExtremities); + BODY_PART_EXAMINED.put("PENILEA", PenileArtery); BODY_PART_EXAMINED.put("PENIS", Penis); + BODY_PART_EXAMINED.put("PERINEUM", Perineum); + BODY_PART_EXAMINED.put("PERONEALA", PeronealArtery); + BODY_PART_EXAMINED.put("PHANTOM", Phantom); BODY_PART_EXAMINED.put("PHARYNX", Pharynx); + BODY_PART_EXAMINED.put("PHARYNXLARYNX", PharynxLarynx); + BODY_PART_EXAMINED.put("PLACENTA", Placenta); + BODY_PART_EXAMINED.put("POPLITEALA", PoplitealArtery); + BODY_PART_EXAMINED.put("POPLITEALFOSSA", PoplitealFossa); + BODY_PART_EXAMINED.put("POPLITEALV", PoplitealVein); + BODY_PART_EXAMINED.put("PORTALV", PortalVein); + BODY_PART_EXAMINED.put("PCA", PosteriorCerebralArtery); + BODY_PART_EXAMINED.put("POSCOMMA", PosteriorCommunicatingArtery); + BODY_PART_EXAMINED.put("POSTIBIALA", PosteriorTibialArtery); + BODY_PART_EXAMINED.put("PROFFEMA", ProfundaFemorisArtery); + BODY_PART_EXAMINED.put("PROFFEMV", ProfundaFemorisVein); BODY_PART_EXAMINED.put("PROSTATE", Prostate); + BODY_PART_EXAMINED.put("PULMONARYA", PulmonaryArtery); + BODY_PART_EXAMINED.put("PULMONARYV", PulmonaryVein); + BODY_PART_EXAMINED.put("RADIALA", RadialArtery); BODY_PART_EXAMINED.put("RADIUS", Radius); BODY_PART_EXAMINED.put("RADIUSULNA", RadiusUlna); + BODY_PART_EXAMINED.put("CULDESAC", RectouterinePouch); BODY_PART_EXAMINED.put("RECTUM", Rectum); + BODY_PART_EXAMINED.put("RENALA", RenalArtery); + BODY_PART_EXAMINED.put("RENALV", RenalVein); + BODY_PART_EXAMINED.put("RETROPERITONEUM", Retroperitoneum); BODY_PART_EXAMINED.put("RIB", Rib); + BODY_PART_EXAMINED.put("RATRIUM", RightAtrium); + BODY_PART_EXAMINED.put("RFEMORALA", RightFemoralArtery); + BODY_PART_EXAMINED.put("RHEPATICV", RightHepaticVein); + BODY_PART_EXAMINED.put("RHYPOCHONDRIAC", RightHypochondriacRegion); + BODY_PART_EXAMINED.put("RINGUINAL", RightInguinalRegion); + BODY_PART_EXAMINED.put("RLQ", RightLowerQuadrantAbdomen); + BODY_PART_EXAMINED.put("RLUMBAR", RightLumbarRegion); + BODY_PART_EXAMINED.put("RPORTALV", RightPortalVein); + BODY_PART_EXAMINED.put("RPULMONARYA", RightPulmonaryArtery); + BODY_PART_EXAMINED.put("RUQ", RightUpperQuadrantAbdomen); + BODY_PART_EXAMINED.put("RVENTRICLE", RightVentricle); + BODY_PART_EXAMINED.put("SIJOINT", SacroiliacJoint); BODY_PART_EXAMINED.put("SSPINE", Sacrum); + BODY_PART_EXAMINED.put("SFJ", SaphenofemoralJunction); + BODY_PART_EXAMINED.put("SAPHENOUSV", SaphenousVein); BODY_PART_EXAMINED.put("SCALP", Scalp); BODY_PART_EXAMINED.put("SCAPULA", Scapula); BODY_PART_EXAMINED.put("SCLERA", Sclera); BODY_PART_EXAMINED.put("SCROTUM", Scrotum); + BODY_PART_EXAMINED.put("SELLA", SellaTurcica); + BODY_PART_EXAMINED.put("SEMVESICLE", SeminalVesicle); + BODY_PART_EXAMINED.put("SESAMOID", SesamoidBonesFoot); BODY_PART_EXAMINED.put("SHOULDER", Shoulder); + BODY_PART_EXAMINED.put("SIGMOID", SigmoidColon); BODY_PART_EXAMINED.put("SKULL", Skull); + BODY_PART_EXAMINED.put("SMALLINTESTINE", SmallIntestine); + BODY_PART_EXAMINED.put("SPINALCORD", SpinalCord); BODY_PART_EXAMINED.put("SPINE", Spine); BODY_PART_EXAMINED.put("SPLEEN", Spleen); + BODY_PART_EXAMINED.put("SPLENICA", SplenicArtery); + BODY_PART_EXAMINED.put("SPLENICV", SplenicVein); + BODY_PART_EXAMINED.put("SCJOINT", SternoclavicularJoint); BODY_PART_EXAMINED.put("STERNUM", Sternum); BODY_PART_EXAMINED.put("STOMACH", Stomach); + BODY_PART_EXAMINED.put("SUBCLAVIANA", SubclavianArtery); + BODY_PART_EXAMINED.put("SUBCLAVIANV", SubclavianVein); + BODY_PART_EXAMINED.put("SUBCOSTAL", Subcostal); BODY_PART_EXAMINED.put("SUBMANDIBULAR", SubmandibularGland); + BODY_PART_EXAMINED.put("SFA", SuperficialFemoralArtery); + BODY_PART_EXAMINED.put("SFV", SuperficialFemoralVein); + BODY_PART_EXAMINED.put("LSUPPULMONARYV", SuperiorLeftPulmonaryVein); + BODY_PART_EXAMINED.put("SMA", SuperiorMesentericArtery); + BODY_PART_EXAMINED.put("RSUPPULMONARYV", SuperiorRightPulmonaryVein); + BODY_PART_EXAMINED.put("SUPTHYROIDA", SuperiorThyroidArtery); + BODY_PART_EXAMINED.put("SVC", SuperiorVenaCava); + BODY_PART_EXAMINED.put("SUPRACLAVICULAR", SupraclavicularRegionNeck); + BODY_PART_EXAMINED.put("SUPRAPUBIC", SuprapubicRegion); BODY_PART_EXAMINED.put("TMJ", TemporomandibularJoint); BODY_PART_EXAMINED.put("TESTIS", Testis); + BODY_PART_EXAMINED.put("THALAMUS", Thalamus); BODY_PART_EXAMINED.put("THIGH", Thigh); + BODY_PART_EXAMINED.put("3RDVENTRICLE", ThirdVentricle); + BODY_PART_EXAMINED.put("THORACICAORTA", ThoracicAorta); BODY_PART_EXAMINED.put("TSPINE", ThoracicSpine); BODY_PART_EXAMINED.put("TLSPINE", ThoracoLumbarSpine); + BODY_PART_EXAMINED.put("THORAX", Thorax); BODY_PART_EXAMINED.put("THUMB", Thumb); BODY_PART_EXAMINED.put("THYMUS", Thymus); BODY_PART_EXAMINED.put("THYROID", Thyroid); @@ -267,12 +649,22 @@ public class AnatomicRegion { BODY_PART_EXAMINED.put("TOE", Toe); BODY_PART_EXAMINED.put("TONGUE", Tongue); BODY_PART_EXAMINED.put("TRACHEA", Trachea); + BODY_PART_EXAMINED.put("TRACHEABRONCHUS", TracheaBronchus); + BODY_PART_EXAMINED.put("TRANSVERSECOLON", TransverseColon); BODY_PART_EXAMINED.put("ULNA", Ulna); - BODY_PART_EXAMINED.put("ARM", UpperArm); + BODY_PART_EXAMINED.put("ULNARA", UlnarArtery); + BODY_PART_EXAMINED.put("UMBILICALA", UmbilicalArtery); + BODY_PART_EXAMINED.put("UMBILICAL", UmbilicalRegion); + BODY_PART_EXAMINED.put("UMBILICALV", UmbilicalVein); + BODY_PART_EXAMINED.put("UPPERARM", UpperArm); + BODY_PART_EXAMINED.put("UPPERLIMB", UpperLimb); + BODY_PART_EXAMINED.put("UPRURINARYTRACT", UpperUrinaryTract); BODY_PART_EXAMINED.put("URETER", Ureter); BODY_PART_EXAMINED.put("URETHRA", Urethra); BODY_PART_EXAMINED.put("UTERUS", Uterus); BODY_PART_EXAMINED.put("VAGINA", Vagina); + BODY_PART_EXAMINED.put("VEIN", Vein); + BODY_PART_EXAMINED.put("VERTEBRALA", VertebralArtery); BODY_PART_EXAMINED.put("VULVA", Vulva); BODY_PART_EXAMINED.put("WRIST", WristJoint); BODY_PART_EXAMINED.put("ZYGOMA", Zygoma); diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ArchiveElementDictionary.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ArchiveElementDictionary.java deleted file mode 100755 index e447737ab3..0000000000 --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ArchiveElementDictionary.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - ~ ~ - ~ The MIT License (MIT) ~ - ~ ~ - ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ - ~ ~ - ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ - ~ of this software and associated documentation files (the "Software"), to deal ~ - ~ in the Software without restriction, including without limitation the rights ~ - ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ - ~ copies of the Software, and to permit persons to whom the Software is ~ - ~ furnished to do so, subject to the following conditions: ~ - ~ ~ - ~ The above copyright notice and this permission notice shall be included in ~ - ~ all copies or substantial portions of the Software. ~ - ~ ~ - ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ - ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ - ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ - ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ - ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ - ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ - ~ THE SOFTWARE. ~ - ~ ~ - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - */ -package org.miaixz.bus.image.builtin; - -import org.miaixz.bus.image.galaxy.data.ElementDictionary; -import org.miaixz.bus.image.galaxy.data.VR; - -/** - * @author Kimi Liu - * @since Java 17+ - */ -public class ArchiveElementDictionary extends ElementDictionary { - - public ArchiveElementDictionary() { - super(ArchiveTag.PrivateCreator, ArchiveTag.class); - } - - @Override - public String keywordOf(int tag) { - return ArchiveKey.valueOf(tag); - } - - @Override - public VR vrOf(int tag) { - switch (tag & 0xFFFF00FF) { - case ArchiveTag.SendingApplicationEntityTitleOfSeries: - case ArchiveTag.InstanceExternalRetrieveAETitle: - return VR.AE; - case ArchiveTag.PatientVerificationStatus: - case ArchiveTag.StudyRejectionState: - case ArchiveTag.StudyCompleteness: - case ArchiveTag.StudyExpirationState: - case ArchiveTag.SeriesRejectionState: - case ArchiveTag.SeriesCompleteness: - case ArchiveTag.InstanceRecordPurgeStateOfSeries: - case ArchiveTag.SeriesMetadataStorageObjectStatus: - case ArchiveTag.StorageObjectStatus: - case ArchiveTag.SeriesExpirationState: - case ArchiveTag.XRoadPersonStatus: - case ArchiveTag.XRoadDataStatus: - return VR.CS; - case ArchiveTag.StudyExpirationDate: - case ArchiveTag.SeriesExpirationDate: - return VR.DA; - case ArchiveTag.PatientCreateDateTime: - case ArchiveTag.PatientUpdateDateTime: - case ArchiveTag.PatientVerificationDateTime: - case ArchiveTag.StudyReceiveDateTime: - case ArchiveTag.StudyUpdateDateTime: - case ArchiveTag.StudyAccessDateTime: - case ArchiveTag.SeriesReceiveDateTime: - case ArchiveTag.SeriesUpdateDateTime: - case ArchiveTag.ScheduledMetadataUpdateDateTimeOfSeries: - case ArchiveTag.ScheduledInstanceRecordPurgeDateTimeOfSeries: - case ArchiveTag.InstanceReceiveDateTime: - case ArchiveTag.InstanceUpdateDateTime: - case ArchiveTag.ScheduledStorageVerificationDateTimeOfSeries: - case ArchiveTag.ScheduledCompressionDateTimeOfSeries: - case ArchiveTag.SeriesMetadataCreationDateTime: - return VR.DT; - case ArchiveTag.StudyAccessControlID: - case ArchiveTag.StorageIDsOfStudy: - case ArchiveTag.StudyExpirationExporterID: - case ArchiveTag.SeriesMetadataStorageID: - case ArchiveTag.SeriesMetadataStoragePath: - case ArchiveTag.SeriesMetadataStorageObjectDigest: - case ArchiveTag.StorageID: - case ArchiveTag.StoragePath: - case ArchiveTag.StorageObjectDigest: - case ArchiveTag.OtherStorageSequence: - case ArchiveTag.SeriesExpirationExporterID: - return VR.LO; - case ArchiveTag.RejectionCodeSequence: - return VR.SQ; - case ArchiveTag.StorageTransferSyntaxUID: - return VR.UI; - case ArchiveTag.StudySizeInKB: - case ArchiveTag.SeriesMetadataStorageObjectSize: - case ArchiveTag.StorageObjectSize: - return VR.UL; - case ArchiveTag.FailedVerificationsOfPatient: - case ArchiveTag.FailedRetrievesOfStudy: - case ArchiveTag.StudySizeBytes: - case ArchiveTag.FailedRetrievesOfSeries: - case ArchiveTag.FailuresOfLastStorageVerificationOfSeries: - case ArchiveTag.FailuresOfLastCompressionOfSeries: - case ArchiveTag.SeriesMetadataUpdateFailures: - return VR.US; - } - return VR.UN; - } - -} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ArchiveKey.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ArchiveKey.java deleted file mode 100755 index 214ea9047a..0000000000 --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ArchiveKey.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - ~ ~ - ~ The MIT License (MIT) ~ - ~ ~ - ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ - ~ ~ - ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ - ~ of this software and associated documentation files (the "Software"), to deal ~ - ~ in the Software without restriction, including without limitation the rights ~ - ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ - ~ copies of the Software, and to permit persons to whom the Software is ~ - ~ furnished to do so, subject to the following conditions: ~ - ~ ~ - ~ The above copyright notice and this permission notice shall be included in ~ - ~ all copies or substantial portions of the Software. ~ - ~ ~ - ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ - ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ - ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ - ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ - ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ - ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ - ~ THE SOFTWARE. ~ - ~ ~ - ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - */ -package org.miaixz.bus.image.builtin; - -import org.miaixz.bus.core.lang.Normal; - -/** - * @author Kimi Liu - * @since Java 17+ - */ -public class ArchiveKey { - - public static String valueOf(int tag) { - switch (tag & 0xFFFF00FF) { - case ArchiveTag.PatientCreateDateTime: - return "PatientCreateDateTime"; - case ArchiveTag.PatientUpdateDateTime: - return "PatientUpdateDateTime"; - case ArchiveTag.PatientVerificationDateTime: - return "PatientVerificationDateTime"; - case ArchiveTag.PatientVerificationStatus: - return "PatientVerificationStatus"; - case ArchiveTag.FailedVerificationsOfPatient: - return "FailedVerificationsOfPatient"; - case ArchiveTag.StudyReceiveDateTime: - return "StudyReceiveDateTime"; - case ArchiveTag.StudyUpdateDateTime: - return "StudyUpdateDateTime"; - case ArchiveTag.StudyAccessDateTime: - return "StudyAccessDateTime"; - case ArchiveTag.StudyExpirationDate: - return "StudyExpirationDate"; - case ArchiveTag.StudyRejectionState: - return "StudyRejectionState"; - case ArchiveTag.StudyCompleteness: - return "StudyCompleteness"; - case ArchiveTag.FailedRetrievesOfStudy: - return "FailedRetrievesOfStudy"; - case ArchiveTag.StudyAccessControlID: - return "StudyAccessControlID"; - case ArchiveTag.StorageIDsOfStudy: - return "StorageIDsOfStudy"; - case ArchiveTag.StudySizeInKB: - return "StudySizeInKB"; - case ArchiveTag.StudySizeBytes: - return "StudySizeBytes"; - case ArchiveTag.StudyExpirationState: - return "StudyExpirationState"; - case ArchiveTag.StudyExpirationExporterID: - return "StudyExpirationExporterID"; - case ArchiveTag.SeriesReceiveDateTime: - return "SeriesReceiveDateTime"; - case ArchiveTag.SeriesUpdateDateTime: - return "SeriesUpdateDateTime"; - case ArchiveTag.SeriesExpirationDate: - return "SeriesExpirationDate"; - case ArchiveTag.SeriesRejectionState: - return "SeriesRejectionState"; - case ArchiveTag.SeriesCompleteness: - return "SeriesCompleteness"; - case ArchiveTag.FailedRetrievesOfSeries: - return "FailedRetrievesOfSeries"; - case ArchiveTag.SendingApplicationEntityTitleOfSeries: - return "SendingApplicationEntityTitleOfSeries"; - case ArchiveTag.ScheduledMetadataUpdateDateTimeOfSeries: - return "ScheduledMetadataUpdateDateTimeOfSeries"; - case ArchiveTag.ScheduledInstanceRecordPurgeDateTimeOfSeries: - return "ScheduledInstanceRecordPurgeDateTimeOfSeries"; - case ArchiveTag.InstanceRecordPurgeStateOfSeries: - return "InstanceRecordPurgeStateOfSeries"; - case ArchiveTag.SeriesMetadataStorageID: - return "SeriesMetadataStorageID"; - case ArchiveTag.SeriesMetadataStoragePath: - return "SeriesMetadataStoragePath"; - case ArchiveTag.SeriesMetadataStorageObjectSize: - return "SeriesMetadataStorageObjectSize"; - case ArchiveTag.SeriesMetadataStorageObjectDigest: - return "SeriesMetadataStorageObjectDigest"; - case ArchiveTag.SeriesMetadataStorageObjectStatus: - return "SeriesMetadataStorageObjectStatus"; - case ArchiveTag.InstanceReceiveDateTime: - return "InstanceReceiveDateTime"; - case ArchiveTag.InstanceUpdateDateTime: - return "InstanceUpdateDateTime"; - case ArchiveTag.RejectionCodeSequence: - return "RejectionCodeSequence"; - case ArchiveTag.InstanceExternalRetrieveAETitle: - return "InstanceExternalRetrieveAETitle"; - case ArchiveTag.StorageID: - return "StorageID"; - case ArchiveTag.StoragePath: - return "StoragePath"; - case ArchiveTag.StorageTransferSyntaxUID: - return "StorageTransferSyntaxUID"; - case ArchiveTag.StorageObjectSize: - return "StorageObjectSize"; - case ArchiveTag.StorageObjectDigest: - return "StorageObjectDigest"; - case ArchiveTag.OtherStorageSequence: - return "OtherStorageSequence"; - case ArchiveTag.StorageObjectStatus: - return "StorageObjectStatus"; - case ArchiveTag.ScheduledStorageVerificationDateTimeOfSeries: - return "ScheduledStorageVerificationDateTimeOfSeries"; - case ArchiveTag.FailuresOfLastStorageVerificationOfSeries: - return "FailuresOfLastStorageVerificationOfSeries"; - case ArchiveTag.ScheduledCompressionDateTimeOfSeries: - return "ScheduledCompressionDateTimeOfSeries"; - case ArchiveTag.FailuresOfLastCompressionOfSeries: - return "FailuresOfLastCompressionOfSeries"; - case ArchiveTag.SeriesExpirationState: - return "SeriesExpirationState"; - case ArchiveTag.SeriesExpirationExporterID: - return "SeriesExpirationExporterID"; - case ArchiveTag.SeriesMetadataCreationDateTime: - return "SeriesMetadataCreationDateTime"; - case ArchiveTag.SeriesMetadataUpdateFailures: - return "SeriesMetadataUpdateFailures"; - case ArchiveTag.XRoadPersonStatus: - return "XRoadPersonStatus"; - case ArchiveTag.XRoadDataStatus: - return "XRoadDataStatus"; - } - return Normal.EMPTY; - } - -} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ContributingOfReference.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ContributingOfReference.java new file mode 100644 index 0000000000..00abf0ab9d --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ContributingOfReference.java @@ -0,0 +1,49 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin; + +import org.miaixz.bus.image.galaxy.data.Code; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public class ContributingOfReference { + + public static final Code AcquisitionEquipment = new Code("109101", "DCM", null, "Acquisition Equipment"); + public static final Code ProcessingEquipment = new Code("109102", "DCM", null, "Processing Equipment"); + public static final Code ModifyingEquipment = new Code("109103", "DCM", null, "Modifying Equipment"); + public static final Code DeIdentifyingEquipment = new Code("109104", "DCM", null, "De-identifying Equipment"); + public static final Code FrameExtractingEquipment = new Code("109105", "DCM", null, "Frame Extracting Equipment"); + public static final Code EnhancedMultiFrameConversionEquipment = new Code("109106", "DCM", null, "Enhanced Multi-frame Conversion Equipment Equipment"); + public static final Code PortableMediaImporterEquipment = new Code("MEDIM", "DCM", null, "Portable Media Importer Equipment"); + public static final Code FilmDigitizer = new Code("FILMD", "DCM", null, "Film Digitizer"); + public static final Code DocumentDigitizerEquipment = new Code("DOCD", "DCM", null, "Document Digitizer Equipment"); + public static final Code VideoTapeDigitizerEquipment = new Code("VIDD", "DCM", null, "Video Tape Digitizer Equipment"); + +} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentificationCoercion.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentificationCoercion.java old mode 100755 new mode 100644 index d778aa9784..c918421ed8 --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentificationCoercion.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentificationCoercion.java @@ -45,7 +45,7 @@ public DeIdentificationCoercion(DeIdentifier deIdentifier, AttributesCoercion ne } public static AttributesCoercion valueOf(DeIdentifier.Option[] options, AttributesCoercion next) { - return null != options && options.length > 0 + return options != null && options.length > 0 ? new DeIdentificationCoercion(new DeIdentifier(options), next) : next; } @@ -53,13 +53,13 @@ public static AttributesCoercion valueOf(DeIdentifier.Option[] options, Attribut @Override public String remapUID(String uid) { String remappedUID = deIdentifier.remapUID(uid); - return null != next ? next.remapUID(remappedUID) : remappedUID; + return next != null ? next.remapUID(remappedUID) : remappedUID; } @Override - public void coerce(Attributes attrs, Attributes modified) { + public void coerce(Attributes attrs, Attributes modified) throws Exception { deIdentifier.deidentify(attrs); - if (null != next) + if (next != null) next.coerce(attrs, modified); } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentificationMethod.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentificationMethod.java old mode 100755 new mode 100644 index 71c3a19190..8764932591 --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentificationMethod.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentificationMethod.java @@ -46,7 +46,8 @@ public class DeIdentificationMethod { public static final Code RetainPatientCharacteristicsOption = new Code("113108", "DCM", null, "Retain Patient Characteristics Option"); public static final Code RetainDeviceIdentityOption = new Code("113109", "DCM", null, "Retain Device Identity Option"); public static final Code RetainUIDsOption = new Code("113110", "DCM", null, "Retain UIDs Option"); - public static final Code RetainSafePrivateOption = new Code("113110", "DCM", null, "Retain Safe Private Option"); + public static final Code RetainSafePrivateOption = new Code("113111", "DCM", null, "Retain Safe Private Option"); public static final Code RetainInstitutionIdentityOption = new Code("113112", "DCM", null, "Retain Institution Identity Option"); + public static final Code RetainPatientIDHashOption = new Code("113113", "99DCM", null, "Retain Patient ID Hash Option"); } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentifier.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentifier.java old mode 100755 new mode 100644 index 4b0f026513..48fcc55d95 --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentifier.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/DeIdentifier.java @@ -31,8 +31,10 @@ import org.miaixz.bus.image.UID; import org.miaixz.bus.image.galaxy.data.*; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.EnumSet; +import java.util.UUID; /** * @author Kimi Liu @@ -212,6 +214,7 @@ public class DeIdentifier { private static final int[] X_INSTITUTION = { Tag.InstitutionAddress, Tag.InstitutionalDepartmentName, + Tag.InstitutionalDepartmentTypeCodeSequence }; private static final int[] X_DEVICE = { @@ -409,6 +412,10 @@ public DeIdentifier(Option... options) { initDummyValues(d); } + private static String hash(IDWithIssuer pid) { + return UUID.nameUUIDFromBytes(pid.toString().getBytes(StandardCharsets.UTF_8)).toString(); + } + private static int[] cat(int[] a, int[] b) { int[] dest = new int[a.length + b.length]; System.arraycopy(a, 0, dest, 0, a.length); @@ -436,8 +443,10 @@ public void setDummyValue(int tag, VR vr, String s) { } public void deidentify(Attributes attrs) { + IDWithIssuer pid = options.contains(Option.RetainPatientIDHashOption) ? IDWithIssuer.pidOf(attrs) : null; deidentifyItem(attrs); correct(attrs); + if (pid != null) attrs.setString(Tag.PatientID, VR.LO, hash(pid)); attrs.setString(Tag.PatientIdentityRemoved, VR.CS, YES); attrs.setString(Tag.LongitudinalTemporalInformationModified, VR.CS, options.contains(Option.RetainLongitudinalTemporalInformationFullDatesOption) ? UNMODIFIED : REMOVED); @@ -487,9 +496,8 @@ private void deidentifyItem(Attributes attrs) { try { attrs.accept((attrs1, tag, vr, value) -> { if (value instanceof Sequence) - for (Attributes item : (Sequence) value) { + for (Attributes item : (Sequence) value) deidentifyItem(item); - } return true; }, false); } catch (Exception e) { @@ -499,26 +507,22 @@ private void deidentifyItem(Attributes attrs) { public enum Option { BasicApplicationConfidentialityProfile(DeIdentificationMethod.BasicApplicationConfidentialityProfile), - /* - CleanPixelDataOption(DeIdentificationMethod.CleanPixelDataOption), - CleanRecognizableVisualFeaturesOption(DeIdentificationMethod.CleanRecognizableVisualFeaturesOption), - CleanGraphicsOption(DeIdentificationMethod.CleanGraphicsOption), - CleanStructuredContentOption(DeIdentificationMethod.CleanStructuredContentOption), - CleanDescriptorsOption(DeIdentificationMethod.CleanDescriptorsOption), - */ + // CleanPixelDataOption(DeIdentificationMethod.CleanPixelDataOption), + // CleanRecognizableVisualFeaturesOption(DeIdentificationMethod.CleanRecognizableVisualFeaturesOption), + // CleanGraphicsOption(DeIdentificationMethod.CleanGraphicsOption), + // CleanStructuredContentOption(DeIdentificationMethod.CleanStructuredContentOption), + // CleanDescriptorsOption(DeIdentificationMethod.CleanDescriptorsOption), RetainLongitudinalTemporalInformationFullDatesOption( DeIdentificationMethod.RetainLongitudinalTemporalInformationFullDatesOption), - /* - RetainLongitudinalTemporalInformationModifiedDatesOption( - DeIdentificationMethod.RetainLongitudinalTemporalInformationModifiedDatesOption), - RetainPatientCharacteristicsOption(DeIdentificationMethod.RetainPatientCharacteristicsOption), - */ + // RetainLongitudinalTemporalInformationModifiedDatesOption( + // DeIdentificationMethod.RetainLongitudinalTemporalInformationModifiedDatesOption), + // RetainPatientCharacteristicsOption(DeIdentificationMethod.RetainPatientCharacteristicsOption), RetainDeviceIdentityOption(DeIdentificationMethod.RetainDeviceIdentityOption), RetainInstitutionIdentityOption(DeIdentificationMethod.RetainInstitutionIdentityOption), - RetainUIDsOption(DeIdentificationMethod.RetainUIDsOption); - /* - RetainSafePrivateOption(DeIdentificationMethod.RetainSafePrivateOption); - */ + RetainUIDsOption(DeIdentificationMethod.RetainUIDsOption), + // RetainSafePrivateOption(DeIdentificationMethod.RetainSafePrivateOption), + RetainPatientIDHashOption(DeIdentificationMethod.RetainPatientIDHashOption); + private final Code code; Option(Code code) { diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/DicomFiles.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/DicomFiles.java new file mode 100644 index 0000000000..7b44036ee2 --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/DicomFiles.java @@ -0,0 +1,124 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin; + +import org.miaixz.bus.core.xyz.IoKit; +import org.miaixz.bus.image.Tag; +import org.miaixz.bus.image.UID; +import org.miaixz.bus.image.galaxy.data.Attributes; +import org.miaixz.bus.image.galaxy.io.ContentHandlerAdapter; +import org.miaixz.bus.image.galaxy.io.ImageInputStream; + +import javax.xml.XMLConstants; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; +import java.io.File; +import java.util.List; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public abstract class DicomFiles { + + private static SAXParser saxParser; + + public static void scan(List fnames, Callback scb) { + scan(fnames, true, scb); // default printout = true + } + + public static void scan(List fnames, boolean printout, Callback scb) { + for (String fname : fnames) { + scan(new File(fname), printout, scb); + } + } + + private static void scan(File f, boolean printout, Callback scb) { + if (f.isDirectory()) { + for (String s : f.list()) { + scan(new File(f, s), printout, scb); + } + return; + } + if (f.getName().endsWith(".xml")) { + try { + SAXParser p = saxParser; + if (p == null) { + SAXParserFactory factory = SAXParserFactory.newInstance(); + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); + saxParser = p = factory.newSAXParser(); + } + Attributes ds = new Attributes(); + ContentHandlerAdapter ch = new ContentHandlerAdapter(ds); + p.parse(f, ch); + Attributes fmi = ch.getFileMetaInformation(); + if (fmi == null) { + fmi = ds.createFileMetaInformation(UID.ExplicitVRLittleEndian.uid); + } + boolean b = scb.dicomFile(f, fmi, -1, ds); + if (printout) { + System.out.print(b ? '.' : 'I'); + } + } catch (Exception e) { + System.out.println(); + System.out.println("Failed to parse file " + f + ": " + e.getMessage()); + e.printStackTrace(System.out); + } + } else { + ImageInputStream in = null; + try { + in = new ImageInputStream(f); + in.setIncludeBulkData(ImageInputStream.IncludeBulkData.NO); + Attributes fmi = in.readFileMetaInformation(); + long dsPos = in.getPosition(); + Attributes ds = in.readDataset(-1, Tag.PixelData); + if (fmi == null + || !fmi.containsValue(Tag.TransferSyntaxUID) + || !fmi.containsValue(Tag.MediaStorageSOPClassUID) + || !fmi.containsValue(Tag.MediaStorageSOPInstanceUID)) { + fmi = ds.createFileMetaInformation(in.getTransferSyntax()); + } + boolean b = scb.dicomFile(f, fmi, dsPos, ds); + if (printout) { + System.out.print(b ? '.' : 'I'); + } + } catch (Exception e) { + System.out.println(); + System.out.println("Failed to scan file " + f + ": " + e.getMessage()); + e.printStackTrace(System.out); + } finally { + IoKit.close(in); + } + } + } + + public interface Callback { + boolean dicomFile(File f, Attributes fmi, long dsPos, Attributes ds) throws Exception; + } + +} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ESoundex.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ESoundex.java new file mode 100644 index 0000000000..81cb6cdb41 --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ESoundex.java @@ -0,0 +1,40 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public class ESoundex extends Soundex { + + public ESoundex() { + super(true, Integer.MAX_VALUE, 0, MAP_6); + } + +} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ESoundex9.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ESoundex9.java new file mode 100644 index 0000000000..0acca167dc --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ESoundex9.java @@ -0,0 +1,40 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public class ESoundex9 extends Soundex { + + public ESoundex9() { + super(true, Integer.MAX_VALUE, 0, MAP_9); + } + +} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/FilesetInfo.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/FilesetInfo.java new file mode 100644 index 0000000000..115a5edcf4 --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/FilesetInfo.java @@ -0,0 +1,75 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin; + +import java.io.File; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public class FilesetInfo { + + private String uid; + private String id; + private File descFile; + private String descFileCharset; + + public final String getFilesetUID() { + return uid; + } + + public final void setFilesetUID(String uid) { + this.uid = uid; + } + + public final String getFilesetID() { + return id; + } + + public final void setFilesetID(String id) { + this.id = id; + } + + public final File getDescriptorFile() { + return descFile; + } + + public final void setDescriptorFile(File descFile) { + this.descFile = descFile; + } + + public final String getDescriptorFileCharset() { + return descFileCharset; + } + + public final void setDescriptorFileCharset(String descFileCharset) { + this.descFileCharset = descFileCharset; + } + +} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/FuzzyStr.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/FuzzyString.java old mode 100755 new mode 100644 similarity index 98% rename from bus-image/src/main/java/org/miaixz/bus/image/builtin/FuzzyStr.java rename to bus-image/src/main/java/org/miaixz/bus/image/builtin/FuzzyString.java index 8721e85fd6..fefd515f5e --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/FuzzyStr.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/FuzzyString.java @@ -31,7 +31,7 @@ * @author Kimi Liu * @since Java 17+ */ -public interface FuzzyStr { +public interface FuzzyString { String toFuzzy(String in); diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/HashUIDMapper.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/HashUIDMapper.java old mode 100755 new mode 100644 diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/KPhonetik.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/KPhonetik.java old mode 100755 new mode 100644 index 7026bb88a5..052b5b1600 --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/KPhonetik.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/KPhonetik.java @@ -33,7 +33,7 @@ * @author Kimi Liu * @since Java 17+ */ -public class KPhonetik implements FuzzyStr { +public class KPhonetik implements FuzzyString { @Override public String toFuzzy(String s) { diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/Metaphone.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/Metaphone.java old mode 100755 new mode 100644 index af5f4fc28f..10d64f6bea --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/Metaphone.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/Metaphone.java @@ -33,7 +33,7 @@ * @author Kimi Liu * @since Java 17+ */ -public class Metaphone implements FuzzyStr { +public class Metaphone implements FuzzyString { private static boolean vowel(char ch) { return ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U'; diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/Multiframe.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/MultiframeExtractor.java old mode 100755 new mode 100644 similarity index 69% rename from bus-image/src/main/java/org/miaixz/bus/image/builtin/Multiframe.java rename to bus-image/src/main/java/org/miaixz/bus/image/builtin/MultiframeExtractor.java index 35dac82e53..b50bd22880 --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/Multiframe.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/MultiframeExtractor.java @@ -42,9 +42,9 @@ * @author Kimi Liu * @since Java 17+ */ -public class Multiframe { +public class MultiframeExtractor { - private static final HashMap impls = new HashMap(8); + private static final HashMap impls = new HashMap<>(8); private static final int[] EXCLUDE_TAGS = { Tag.ReferencedImageEvidenceSequence, Tag.SourceImageEvidenceSequence, @@ -55,14 +55,26 @@ public class Multiframe { Tag.PixelData}; static { - impls.put(UID.EnhancedCTImageStorage, Impl.EnhancedCTImageExtractor); - impls.put(UID.EnhancedMRImageStorage, Impl.EnhancedMRImageExtractor); - impls.put(UID.EnhancedPETImageStorage, Impl.EnhancedPETImageExtractor); + impls.put(UID.EnhancedCTImageStorage.uid, Impl.EnhancedCTImageExtractor); + impls.put(UID.EnhancedMRImageStorage.uid, Impl.EnhancedMRImageExtractor); + impls.put(UID.EnhancedXAImageStorage.uid, Impl.EnhancedXAImageExtractor); + impls.put(UID.EnhancedXRFImageStorage.uid, Impl.EnhancedXRFImageExtractor); + impls.put(UID.EnhancedPETImageStorage.uid, Impl.EnhancedPETImageExtractor); + impls.put(UID.XRay3DAngiographicImageStorage.uid, Impl.XRay3DAngiographicImageExtractor); + impls.put(UID.NuclearMedicineImageStorage.uid, Impl.NuclearMedicineImageExtractor); + impls.put(UID.UltrasoundMultiFrameImageStorage.uid, Impl.UltrasoundMultiFrameImageExtractor); + impls.put(UID.MultiFrameGrayscaleByteSecondaryCaptureImageStorage.uid, Impl.MultiFrameGrayscaleByteSecondaryCaptureImageExtractor); + impls.put(UID.MultiFrameGrayscaleWordSecondaryCaptureImageStorage.uid, Impl.MultiFrameGrayscaleWordSecondaryCaptureImageExtractor); + impls.put(UID.MultiFrameTrueColorSecondaryCaptureImageStorage.uid, Impl.MultiFrameTrueColorSecondaryCaptureImageExtractor); + impls.put(UID.XRayAngiographicImageStorage.uid, Impl.XRayAngiographicImageExtractor); + impls.put(UID.XRayRadiofluoroscopicImageStorage.uid, Impl.XRayRadiofluoroscopicImageExtractor); + impls.put(UID.RTImageStorage.uid, Impl.RTImageExtractor); } private boolean preserveSeriesInstanceUID; private String instanceNumberFormat = "%s%04d"; private UIDMapper uidMapper = new HashUIDMapper(); + private NumberOfFramesAccessor nofAccessor = new NumberOfFramesAccessor(); public static boolean isSupportedSOPClass(String cuid) { return impls.containsKey(cuid); @@ -70,12 +82,12 @@ public static boolean isSupportedSOPClass(String cuid) { public static String legacySOPClassUID(String mfcuid) { Impl impl = impls.get(mfcuid); - return null != impl ? impl.sfcuid : null; + return impl != null ? impl.sfcuid : null; } private static Impl implFor(String mfcuid) { Impl impl = impls.get(mfcuid); - if (null == impl) + if (impl == null) throw new IllegalArgumentException( "Unsupported SOP Class: " + mfcuid); return impl; @@ -104,11 +116,21 @@ public final UIDMapper getUIDMapper() { } public final void setUIDMapper(UIDMapper uidMapper) { - if (null == uidMapper) + if (uidMapper == null) throw new NullPointerException(); this.uidMapper = uidMapper; } + public final NumberOfFramesAccessor getNumberOfFramesAccessorr() { + return nofAccessor; + } + + public final void setNumberOfFramesAccessor(NumberOfFramesAccessor accessor) { + if (accessor == null) + throw new NullPointerException(); + this.nofAccessor = accessor; + } + /** * 从增强型多帧图像中提取特定帧,并将其作为对应的旧式单帧图像返回。 * @@ -121,27 +143,29 @@ public Attributes extract(Attributes emf, int frame) { .extract(this, emf, frame); } - private Attributes extract(Attributes emf, int frame, String cuid) { - Attributes sfgs = emf.getNestedDataset(Tag.SharedFunctionalGroupsSequence); - if (null == sfgs) - throw new IllegalArgumentException( - "Missing (5200,9229) Shared Functional Groups Sequence"); - Attributes fgs = emf.getNestedDataset(Tag.PerFrameFunctionalGroupsSequence, frame); - if (null == fgs) - throw new IllegalArgumentException( - "Missing (5200,9230) Per-frame Functional Groups Sequence Item for frame #" + (frame + 1)); + private Attributes extract(Attributes emf, int frame, String cuid, boolean enhanced) { Attributes dest = new Attributes(emf.size() * 2); dest.addNotSelected(emf, EXCLUDE_TAGS); - addFunctionGroups(dest, sfgs); - addFunctionGroups(dest, fgs); + if (enhanced) { + Attributes sfgs = emf.getNestedDataset(Tag.SharedFunctionalGroupsSequence); + if (sfgs == null) + throw new IllegalArgumentException( + "Missing (5200,9229) Shared Functional Groups Sequence"); + Attributes fgs = emf.getNestedDataset(Tag.PerFrameFunctionalGroupsSequence, frame); + if (fgs == null) + throw new IllegalArgumentException( + "Missing (5200,9230) Per-frame Functional Groups Sequence Item for frame #" + (frame + 1)); + addFunctionGroups(dest, sfgs); + addFunctionGroups(dest, fgs); + dest.setString(Tag.ImageType, VR.CS, dest.getStrings(Tag.FrameType)); + dest.remove(Tag.FrameType); + } addPixelData(dest, emf, frame); dest.setString(Tag.SOPClassUID, VR.UI, cuid); dest.setString(Tag.SOPInstanceUID, VR.UI, uidMapper.get( dest.getString(Tag.SOPInstanceUID)) + Symbol.C_DOT + (frame + 1)); dest.setString(Tag.InstanceNumber, VR.IS, createInstanceNumber(dest.getString(Tag.InstanceNumber, Normal.EMPTY), frame)); - dest.setString(Tag.ImageType, VR.CS, dest.getStrings(Tag.FrameType)); - dest.remove(Tag.FrameType); if (!preserveSeriesInstanceUID) dest.setString(Tag.SeriesInstanceUID, VR.UI, uidMapper.get( dest.getString(Tag.SeriesInstanceUID))); @@ -152,26 +176,27 @@ private Attributes extract(Attributes emf, int frame, String cuid) { private void adjustReferencedImages(Attributes attrs, int sqtag) { Sequence sq = attrs.getSequence(sqtag); - if (null == sq) + if (sq == null) return; - ArrayList newRefs = new ArrayList(); + ArrayList newRefs = new ArrayList<>(); for (Iterator itr = sq.iterator(); itr.hasNext(); ) { Attributes ref = itr.next(); String cuid = legacySOPClassUID(ref.getString(Tag.ReferencedSOPClassUID)); - if (null == cuid) + if (cuid == null) continue; itr.remove(); String iuid = uidMapper.get(ref.getString(Tag.ReferencedSOPInstanceUID)); int[] frames = ref.getInts(Tag.ReferencedFrameNumber); - int n = null == frames ? 1 : frames.length; + int n = frames == null ? nofAccessor.getNumberOfFrames(iuid) + : frames.length; ref.remove(Tag.ReferencedFrameNumber); ref.setString(Tag.ReferencedSOPClassUID, VR.UI, cuid); for (int i = 0; i < n; i++) { Attributes newRef = new Attributes(ref); newRef.setString(Tag.ReferencedSOPInstanceUID, VR.UI, - iuid + Symbol.C_DOT + (null != frames ? frames[i] : (i + 1))); + iuid + '.' + (frames != null ? frames[i] : (i + 1))); newRefs.add(newRef); } } @@ -184,7 +209,7 @@ private void addFunctionGroups(Attributes dest, Attributes fgs) { Attributes fg; for (int sqTag : fgs.tags()) if (sqTag != Tag.ReferencedImageSequence - && null != (fg = fgs.getNestedDataset(sqTag))) + && (fg = fgs.getNestedDataset(sqTag)) != null) dest.addAll(fg); } @@ -207,7 +232,7 @@ private void addPixelData(Attributes dest, Attributes src, int frame) { private BulkData extractPixelData(BulkData src, int frame, int length) { return new BulkData(src.uriWithoutOffsetAndLength(), - src.offset() + frame * length, length, + src.offset() + (long) frame * length, length, src.bigEndian()); } @@ -226,13 +251,13 @@ private int calcFrameLength(Attributes src) { private String createInstanceNumber(String mfinstno, int frame) { String s = String.format(instanceNumberFormat, mfinstno, frame + 1); - return s.length() > Normal._16 ? s.substring(s.length() - Normal._16) : s; + return s.length() > 16 ? s.substring(s.length() - 16) : s; } private enum Impl { - EnhancedCTImageExtractor(UID.CTImageStorage), - EnhancedMRImageExtractor(UID.MRImageStorage) { - Attributes extract(Multiframe mfe, Attributes emf, int frame) { + EnhancedCTImageExtractor(UID.CTImageStorage.uid, true), + EnhancedMRImageExtractor(UID.MRImageStorage.uid, true) { + Attributes extract(MultiframeExtractor mfe, Attributes emf, int frame) { Attributes sf = super.extract(mfe, emf, frame); setEchoTime(sf); setScanningSequence(sf); @@ -270,16 +295,16 @@ void setSequenceVariant(Attributes sf) { if (!"SINGLE".equals(sf.getString(Tag.SegmentedKSpaceTraversal))) list.add("SK"); String mf = sf.getString(Tag.MagnetizationTransfer); - if (null != mf && !"NONE".equals(mf)) + if (mf != null && !"NONE".equals(mf)) list.add("MTC"); String ssps = sf.getString(Tag.SteadyStatePulseSequence); - if (null != ssps && !"NONE".equals(ssps)) + if (ssps != null && !"NONE".equals(ssps)) list.add("TIME_REVERSED".equals(ssps) ? "TRSS" : "SS"); String sp = sf.getString(Tag.Spoiling); - if (null != sp && !"NONE".equals(sp)) + if (sp != null && !"NONE".equals(sp)) list.add("SP"); String op = sf.getString(Tag.OversamplingPhase); - if (null != op && !"NONE".equals(op)) + if (op != null && !"NONE".equals(op)) list.add("OSP"); if (list.isEmpty()) list.add("NONE"); @@ -290,7 +315,7 @@ void setSequenceVariant(Attributes sf) { void setScanOptions(Attributes sf) { List list = new ArrayList<>(3); String per = sf.getString(Tag.RectilinearPhaseEncodeReordering); - if (null != per && !"LINEAR".equals(per)) + if (per != null && !"LINEAR".equals(per)) list.add("PER"); String frameType3 = sf.getString(Tag.ImageType, 2); if ("ANGIO".equals(frameType3)) @@ -305,29 +330,42 @@ void setScanOptions(Attributes sf) { if ("FREQUENCY".equals(pfd)) list.add("PFF"); String sp = sf.getString(Tag.SpatialPresaturation); - if (null != sp && !"NONE".equals(sp)) + if (sp != null && !"NONE".equals(sp)) list.add("SP"); String sss = sf.getString(Tag.SpectrallySelectedSuppression); - if (null != sss && sss.startsWith("FAT")) + if (sss != null && sss.startsWith("FAT")) list.add("FS"); String fc = sf.getString(Tag.FlowCompensation); - if (null != fc && !"NONE".equals(fc)) + if (fc != null && !"NONE".equals(fc)) list.add("FC"); sf.setString(Tag.ScanOptions, VR.CS, list.toArray(new String[list.size()])); } }, - EnhancedPETImageExtractor(UID.PositronEmissionTomographyImageStorage); + EnhancedXAImageExtractor(UID.XRayAngiographicImageStorage.uid, true), + EnhancedXRFImageExtractor(UID.XRayRadiofluoroscopicImageStorage.uid, true), + EnhancedPETImageExtractor(UID.PositronEmissionTomographyImageStorage.uid, true), + XRay3DAngiographicImageExtractor(UID.XRay3DAngiographicImageStorage.uid, true), + NuclearMedicineImageExtractor(UID.NuclearMedicineImageStorage.uid, false), + UltrasoundMultiFrameImageExtractor(UID.UltrasoundImageStorage.uid, false), + MultiFrameGrayscaleByteSecondaryCaptureImageExtractor(UID.SecondaryCaptureImageStorage.uid, false), + MultiFrameGrayscaleWordSecondaryCaptureImageExtractor(UID.SecondaryCaptureImageStorage.uid, false), + MultiFrameTrueColorSecondaryCaptureImageExtractor(UID.SecondaryCaptureImageStorage.uid, false), + XRayAngiographicImageExtractor(UID.XRayAngiographicImageStorage.uid, false), + XRayRadiofluoroscopicImageExtractor(UID.XRayRadiofluoroscopicImageStorage.uid, false), + RTImageExtractor(UID.RTImageStorage.uid, false); private final String sfcuid; + private final boolean enhanced; - Impl(String sfcuid) { + Impl(String sfcuid, boolean enhanced) { this.sfcuid = sfcuid; + this.enhanced = enhanced; } - Attributes extract(Multiframe mfe, Attributes emf, int frame) { - return mfe.extract(emf, frame, sfcuid); + Attributes extract(MultiframeExtractor mfe, Attributes emf, int frame) { + return mfe.extract(emf, frame, sfcuid, enhanced); } } diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/NumberOfFramesAccessor.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/NumberOfFramesAccessor.java new file mode 100644 index 0000000000..c7c7f8eade --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/NumberOfFramesAccessor.java @@ -0,0 +1,40 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public class NumberOfFramesAccessor { + + public int getNumberOfFrames(String iuid) { + return 1; + } + +} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/Phonem.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/Phonem.java old mode 100755 new mode 100644 index deca8a2981..0ba73a74d0 --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/Phonem.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/Phonem.java @@ -27,18 +27,25 @@ */ package org.miaixz.bus.image.builtin; -import org.miaixz.bus.core.lang.Normal; - /** + * Implementation + * + * @see Martin Wilz + * @author Kimi Liu * @since Java 17+ */ -public class Phonem implements FuzzyStr { +public class Phonem implements FuzzyString { + + public static void main(String[] args) { + Phonem inst = new Phonem(); + for (String arg : args) + System.out.println(inst.toFuzzy(arg)); + } @Override public String toFuzzy(String s) { - if (null == s || s.length() == 0) - return Normal.EMPTY; + if (s == null || s.length() == 0) return ""; char[] in = s.toUpperCase().toCharArray(); char next = in[0]; diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ProcedureReasons.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ProcedureReasons.java new file mode 100644 index 0000000000..3800550cda --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ProcedureReasons.java @@ -0,0 +1,111 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin; + +import org.miaixz.bus.image.galaxy.data.Code; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public class ProcedureReasons { + + public static final Code EquipmentFailure = new Code( + "110501", + "DCM", + null, + "Equipment failure"); + public static final Code DuplicateOrder = new Code( + "110510", + "DCM", + null, + "Duplicate order"); + public static final Code DiscontinuedForUnspecifiedReason = new Code( + "110513", + "DCM", + null, + "Discontinued for unspecified reason"); + public static final Code IncorrectWorklistEntrySelected = new Code( + "110514", + "DCM", + null, + "Incorrect worklist entry selected"); + public static final Code ObjectsIncorrectlyFormatted = new Code( + "110521", + "DCM", + null, + "Objects incorrectly formatted"); + public static final Code ObjectTypesNotSupported = new Code( + "110522", + "DCM", + null, + "Object Types not supported"); + public static final Code ObjectSetIncomplete = new Code( + "110523", + "DCM", + null, + "Object Set incomplete"); + public static final Code MediaFailure = new Code( + "110524", + "DCM", + null, + "Media Failure"); + public static final Code ResourcePreEmpted = new Code( + "110526", + "DCM", + null, + "Resource pre-empted"); + public static final Code ResourceInadequate = new Code( + "110527", + "DCM", + null, + "Resource inadequate"); + public static final Code DiscontinuedProcedureStepRescheduled = new Code( + "110528", + "DCM", + null, + "Discontinued Procedure Step rescheduled"); + public static final Code DiscontinuedProcedureStepReschedulingRecommended = new Code( + "110529", + "DCM", + null, + "Discontinued Procedure Step rescheduling recommended"); + public static final Code WorkitemAssignmentRejectedByAssignedResource = new Code( + "110530", + "DCM", + null, + "Workitem assignment rejected by assigned resource"); + public static final Code WorkitemExpired = new Code( + "110533", + "DCM", + null, + "Workitem expired"); + // TODO Include CID 9301 Modality PPS Discontinuation Reasons + // TODO Include CID 60 Imaging Agent Administration Adverse Events + +} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ScopeOfAccumulation.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ScopeOfAccumulation.java new file mode 100644 index 0000000000..226e55b231 --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ScopeOfAccumulation.java @@ -0,0 +1,69 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin; + +import org.miaixz.bus.image.galaxy.data.Code; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public class ScopeOfAccumulation { + + public static final Code CODE = new Code( + "113705", + "DCM", + null, + "Scope of Accumulation"); + public static final Code Study = new Code( + "113014", + "DCM", + null, + "Study"); + public static final Code Series = new Code( + "113015", + "DCM", + null, + "Series"); + public static final Code PerformedProcedureStep = new Code( + "113016", + "DCM", + null, + "Performed Procedure Step"); + public static final Code ProcedureStepToThisPoint = new Code( + "113970", + "DCM", + null, + "Procedure Step To This Point"); + public static final Code IrradiationEvent = new Code( + "113852", + "DCM", + null, + "Irradiation Event"); + +} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/Soundex.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/Soundex.java old mode 100755 new mode 100644 index 7ee3310e66..9cbeef0067 --- a/bus-image/src/main/java/org/miaixz/bus/image/builtin/Soundex.java +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/Soundex.java @@ -33,7 +33,7 @@ * @author Kimi Liu * @since Java 17+ */ -public class Soundex implements FuzzyStr { +public class Soundex implements FuzzyString { protected static final String MAP_6 = // A BCD E FG H I JKLMN O PQRST U V W X Y Z @@ -60,7 +60,7 @@ public Soundex(boolean encodeFirst, int codeLength, int padLength, String map) { @Override public String toFuzzy(String s) { - if (null == s || s.length() == 0) + if (s == null || s.length() == 0) return Normal.EMPTY; char[] in = s.toCharArray(); diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/UIDMapper.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/UIDMapper.java old mode 100755 new mode 100644 diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/YesNo.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/YesNo.java new file mode 100644 index 0000000000..d2c51dff46 --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/YesNo.java @@ -0,0 +1,54 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin; + +import org.miaixz.bus.image.galaxy.data.Code; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public class YesNo { + + public static final Code Yes = new Code( + "373066001", + "SCT", + null, + "Yes"); + public static final Code No = new Code( + "373067005", + "SCT", + null, + "No"); + public static final Code Undetermined = new Code( + "373068000", + "SCT", + null, + "Undetermined"); + +} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/LdapBuilder.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/LdapBuilder.java new file mode 100644 index 0000000000..d09ba4af2d --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/LdapBuilder.java @@ -0,0 +1,643 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin.ldap; + +import org.miaixz.bus.image.Device; +import org.miaixz.bus.image.Format; +import org.miaixz.bus.image.galaxy.data.Code; +import org.miaixz.bus.image.galaxy.data.DatePrecision; +import org.miaixz.bus.image.galaxy.data.Issuer; +import org.miaixz.bus.image.metric.Connection; +import org.miaixz.bus.image.metric.api.ConfigurationChanges; + +import javax.naming.NameNotFoundException; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.directory.*; +import java.lang.reflect.Array; +import java.nio.charset.StandardCharsets; +import java.util.*; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public class LdapBuilder { + + private static final Code[] EMPTY_CODES = {}; + private final static char[] DIGITS = { + '0', '1', '2', '3', '4', '5', + '6', '7', '8', '9', 'A', 'B', + 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', + 'U', 'V', 'W', 'X', 'Y', 'Z' + }; + + public static boolean hasObjectClass(Attributes attrs, String objectClass) + throws NamingException { + NamingEnumeration ne = + (NamingEnumeration) attrs.get("objectclass").getAll(); + try { + while (ne.hasMore()) + if (objectClass.equals(ne.next())) + return true; + } finally { + LdapBuilder.safeClose(ne); + } + return false; + } + + public static void safeClose(NamingEnumeration enumeration) { + if (enumeration != null) + try { + enumeration.close(); + } catch (NamingException e) { + } + } + + public static void storeConnRefs(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, Collection conns, + String deviceDN) { + if (!conns.isEmpty()) { + attrs.put(LdapBuilder.connRefs(conns, deviceDN)); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute("dicomNetworkConnectionReference"); + for (Connection conn : conns) + attribute.addValue(LdapBuilder.dnOf(conn, deviceDN)); + ldapObj.add(attribute); + } + } + } + + private static Attribute connRefs(Collection conns, + String deviceDN) { + Attribute attr = new BasicAttribute("dicomNetworkConnectionReference"); + for (Connection conn : conns) + attr.add(LdapBuilder.dnOf(conn, deviceDN)); + return attr; + } + + public static void storeNotEmpty(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, T[] vals, T... defVals) { + if (vals.length > 0 && !LdapBuilder.equals(vals, defVals)) { + attrs.put(LdapBuilder.attr(attrID, vals)); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + for (T val : vals) + attribute.addValue(val); + ldapObj.add(attribute); + } + } + } + + public static void storeNotEmpty(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, + Map map) { + storeNotEmpty(ldapObj, attrs, attrID, toStrings(map)); + } + + public static String[] toStrings(Map map) { + String[] ss = new String[map.size()]; + int i = 0; + for (Map.Entry entry : map.entrySet()) + ss[i++] = entry.getKey() + '=' + entry.getValue(); + return ss; + } + + public static void storeNotEmpty(Attributes attrs, String attrID, T[] vals, T... defVals) { + if (vals.length > 0 && !LdapBuilder.equals(vals, defVals)) + attrs.put(LdapBuilder.attr(attrID, vals)); + } + + public static Attribute attr(String attrID, Map map) { + return attr(attrID, toStrings(map)); + } + + public static Attribute attr(String attrID, T... vals) { + Attribute attr = new BasicAttribute(attrID); + for (T val : vals) + attr.add(val.toString()); + return attr; + } + + public static void storeNotEmpty(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, int... vals) { + if (vals != null && vals.length > 0) { + attrs.put(LdapBuilder.attr(attrID, vals)); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + for (int val : vals) + attribute.addValue(val); + ldapObj.add(attribute); + } + } + } + + public static void storeNotEmpty(Attributes attrs, String attrID, int... vals) { + if (vals != null && vals.length > 0) + attrs.put(LdapBuilder.attr(attrID, vals)); + } + + public static Attribute attr(String attrID, int... vals) { + Attribute attr = new BasicAttribute(attrID); + for (int val : vals) + attr.add(Integer.toString(val)); + return attr; + } + + public static void storeNotNullOrDef(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, T val, T defVal) { + if (val != null && !val.equals(defVal)) { + attrs.put(attrID, LdapBuilder.toString(val)); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + attribute.addValue(val); + ldapObj.add(attribute); + } + } + } + + public static void storeNotNullOrDef(Attributes attrs, String attrID, T val, T defVal) { + if (val != null && !val.equals(defVal)) + attrs.put(attrID, LdapBuilder.toString(val)); + } + + public static void storeNotNull(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, Integer val) { + if (val != null) { + LdapBuilder.storeInt(attrs, attrID, val); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + attribute.addValue(val); + ldapObj.add(attribute); + } + } + } + + public static void storeNotDef(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, int val, int defVal) { + if (val != defVal) { + LdapBuilder.storeInt(attrs, attrID, val); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + attribute.addValue(val); + ldapObj.add(attribute); + } + } + } + + public static void storeNotDef(Attributes attrs, String attrID, int val, int defVal) { + if (val != defVal) + LdapBuilder.storeInt(attrs, attrID, val); + } + + public static void storeNotDef( + ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, long val, long defVal) { + if (val != defVal) { + LdapBuilder.storeLong(attrs, attrID, val); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + attribute.addValue(val); + ldapObj.add(attribute); + } + } + } + + public static void storeNotDef(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, boolean val, boolean defVal) { + if (val != defVal) { + LdapBuilder.storeBoolean(attrs, attrID, val); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + attribute.addValue(val); + ldapObj.add(attribute); + } + } + } + + public static Attribute storeBoolean(Attributes attrs, String attrID, boolean val) { + return attrs.put(attrID, LdapBuilder.toString(val)); + } + + public static Attribute storeBoolean(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, boolean val) { + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + attribute.addValue(val); + ldapObj.add(attribute); + } + return attrs.put(attrID, LdapBuilder.toString(val)); + } + + public static Attribute storeInt(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, int val) { + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + attribute.addValue(val); + ldapObj.add(attribute); + } + return attrs.put(attrID, Integer.toString(val)); + } + + public static Attribute storeInt(Attributes attrs, String attrID, int val) { + return attrs.put(attrID, Integer.toString(val)); + } + + public static Attribute storeLong(Attributes attrs, String attrID, long val) { + return attrs.put(attrID, Long.toString(val)); + } + + public static String dnOf(Connection conn, String deviceDN) { + String cn = conn.getCommonName(); + return (cn != null) + ? LdapBuilder.dnOf("cn", cn, deviceDN) + : (conn.isServer() + ? LdapBuilder.dnOf("dicomHostname", conn.getHostname(), + "dicomPort", Integer.toString(conn.getPort()), + deviceDN) + : LdapBuilder.dnOf("dicomHostname", conn.getHostname(), deviceDN)); + } + + public static String dnOf(String attrID, String attrValue, String parentDN) { + return attrID + '=' + attrValue + ',' + parentDN; + } + + public static String cutAttrValueFromDN(String dn, String attrID) { + int beginIndex = dn.indexOf(attrID + '='); + if (beginIndex < 0) + return null; + + beginIndex += attrID.length() + 1; + int endIndex = dn.indexOf(',', beginIndex); + return endIndex >= 0 ? dn.substring(beginIndex, endIndex) : dn.substring(beginIndex); + } + + public static String dnOf(String attrID1, String attrValue1, + String attrID2, String attrValue2, String baseDN) { + return attrID1 + '=' + attrValue1 + + '+' + attrID2 + '=' + attrValue2 + + ',' + baseDN; + } + + public static void storeDiff(ConfigurationChanges.ModifiedObject ldapObj, List mods, + String attrId, boolean prev, boolean val, boolean defVal) { + if (val != prev) { + mods.add((val == defVal) + ? new ModificationItem(DirContext.REMOVE_ATTRIBUTE, + new BasicAttribute(attrId)) + : new ModificationItem(DirContext.REPLACE_ATTRIBUTE, + new BasicAttribute(attrId, LdapBuilder.toString(val)))); + if (ldapObj != null) + ldapObj.add(new ConfigurationChanges.ModifiedAttribute(attrId, prev, val)); + } + } + + public static void storeDiff(ConfigurationChanges.ModifiedObject ldapObj, List mods, + String attrId, int prev, int val, int defVal) { + if (val != prev) { + mods.add((val == defVal) + ? new ModificationItem(DirContext.REMOVE_ATTRIBUTE, + new BasicAttribute(attrId)) + : new ModificationItem(DirContext.REPLACE_ATTRIBUTE, + new BasicAttribute(attrId, Integer.toString(val)))); + if (ldapObj != null) + ldapObj.add(new ConfigurationChanges.ModifiedAttribute(attrId, prev, val)); + } + } + + public static void storeDiff(ConfigurationChanges.ModifiedObject ldapObj, List mods, + String attrId, long prev, long val, long defVal) { + if (val != prev) { + mods.add((val == defVal) + ? new ModificationItem(DirContext.REMOVE_ATTRIBUTE, + new BasicAttribute(attrId)) + : new ModificationItem(DirContext.REPLACE_ATTRIBUTE, + new BasicAttribute(attrId, Long.toString(val)))); + if (ldapObj != null) + ldapObj.add(new ConfigurationChanges.ModifiedAttribute(attrId, prev, val)); + } + } + + public static void storeDiffObject(ConfigurationChanges.ModifiedObject ldapObj, List mods, + String attrId, T prev, T val, T defVal) { + if (val == null || val.equals(defVal)) { + if (prev != null && !prev.equals(defVal)) { + mods.add(new ModificationItem(DirContext.REMOVE_ATTRIBUTE, + new BasicAttribute(attrId))); + if (ldapObj != null) + ldapObj.add(new ConfigurationChanges.ModifiedAttribute(attrId, + LdapBuilder.toString(prev), LdapBuilder.toString(val))); + } + } else if (!val.equals(prev)) { + mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, + new BasicAttribute(attrId, LdapBuilder.toString(val)))); + if (ldapObj != null) + ldapObj.add(new ConfigurationChanges.ModifiedAttribute(attrId, + LdapBuilder.toString(prev), LdapBuilder.toString(val))); + } + } + + public static void storeDiffProperties(ConfigurationChanges.ModifiedObject ldapObj, List mods, + String attrID, Map prevs, Map props) { + if (!equalsProperties(prevs, props)) { + mods.add(props.size() == 0 + ? new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new BasicAttribute(attrID)) + : new ModificationItem(DirContext.REPLACE_ATTRIBUTE, LdapBuilder.attr(attrID, props))); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + for (String val : LdapBuilder.toStrings(props)) + attribute.addValue(val); + for (String prev : LdapBuilder.toStrings(prevs)) + attribute.removeValue(prev); + ldapObj.add(attribute); + } + } + } + + private static boolean equalsProperties(Map prevs, Map props) { + if (prevs == props) + return true; + + if (prevs.size() != props.size()) + return false; + + for (Map.Entry prop : props.entrySet()) { + Object value = prop.getValue(); + Object prevValue = prevs.get(prop.getKey()); + if (!(value == null + ? prevValue == null && prevs.containsKey(prop.getKey()) + : prevValue != null && prevValue.toString().equals(value.toString()))) + return false; + } + return true; + } + + public static void storeDiff(ConfigurationChanges.ModifiedObject ldapObj, List mods, + String attrId, int[] prevs, int[] vals, int... defVals) { + storeDiff(ldapObj, mods, attrId, + Arrays.stream(prevs).boxed().toArray(Integer[]::new), + Arrays.stream(vals).boxed().toArray(Integer[]::new), + Arrays.stream(defVals).boxed().toArray(Integer[]::new)); + } + + public static void storeDiff(ConfigurationChanges.ModifiedObject ldapObj, List mods, + String attrId, T[] prevs, T[] vals, T... defVals) { + if (!LdapBuilder.equals(prevs, vals)) { + mods.add((vals.length == 0 || LdapBuilder.equals(defVals, vals)) + ? new ModificationItem(DirContext.REMOVE_ATTRIBUTE, + new BasicAttribute(attrId)) + : new ModificationItem(DirContext.REPLACE_ATTRIBUTE, + attr(attrId, vals))); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrId); + for (T val : vals) + attribute.addValue(val); + for (T prev : prevs) + attribute.removeValue(prev); + ldapObj.add(attribute); + } + } + } + + public static void storeDiffWithOrdinalPrefix(ConfigurationChanges.ModifiedObject ldapObj, + List mods, + String attrId, String[] prevs, String[] vals) { + if (!Arrays.equals(prevs, vals)) { + String[] valsWithOrdinalPrefix = addOrdinalPrefix(vals); + mods.add((vals.length == 0) + ? new ModificationItem(DirContext.REMOVE_ATTRIBUTE, + new BasicAttribute(attrId)) + : new ModificationItem(DirContext.REPLACE_ATTRIBUTE, + attr(attrId, valsWithOrdinalPrefix))); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrId); + for (String val : valsWithOrdinalPrefix) + attribute.addValue(val); + for (String prev : addOrdinalPrefix(prevs)) + attribute.removeValue(prev); + ldapObj.add(attribute); + } + } + } + + public static void storeDiff(ConfigurationChanges.ModifiedObject ldapObj, List mods, + String attrId, List prevs, List conns, String deviceDN) { + if (!LdapBuilder.equalsConnRefs(prevs, conns, deviceDN)) { + mods.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, + connRefs(conns, deviceDN))); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrId); + for (Connection conn : conns) + attribute.addValue(LdapBuilder.dnOf(conn, deviceDN)); + for (Connection conn : prevs) + attribute.removeValue(LdapBuilder.dnOf(conn, deviceDN)); + ldapObj.add(attribute); + } + } + } + + private static boolean equalsConnRefs(List conns1, + List conns2, String deviceDN) { + if (conns1.size() != conns2.size()) + return false; + for (Connection conn1 : conns1) + if (LdapBuilder.findByDN(deviceDN, conns2, dnOf(conn1, deviceDN)) == null) + return false; + return true; + } + + public static boolean equals(T[] a, T[] a2) { + int length = a.length; + if (a2.length != length) + return false; + + outer: + for (Object o1 : a) { + for (Object o2 : a2) + if (o1.equals(o2)) + continue outer; + return false; + } + return true; + } + + public static Connection findByDN(String deviceDN, + List conns, String dn) { + for (Connection conn : conns) + if (dn.equals(dnOf(conn, deviceDN))) + return conn; + return null; + } + + public static Boolean booleanValue(Attribute attr, Boolean defVal) + throws NamingException { + return attr != null ? Boolean.valueOf((String) attr.get()) : defVal; + } + + public static boolean booleanValue(Attribute attr, boolean defVal) + throws NamingException { + return attr != null ? Boolean.parseBoolean((String) attr.get()) : defVal; + } + + public static String stringValue(Attribute attr, String defVal) throws NamingException { + return attr != null ? stringValue(attr.get()) : defVal; + } + + private static String stringValue(Object o) { + return o instanceof byte[] ? new String((byte[]) o, StandardCharsets.UTF_8) : (String) o; + } + + public static TimeZone timeZoneValue(Attribute attr, TimeZone defVal) throws NamingException { + return attr != null ? TimeZone.getTimeZone((String) attr.get()) : defVal; + } + + public static Date dateTimeValue(Attribute attr) throws NamingException { + return attr != null ? Format.parseDT(null, (String) attr.get(), new DatePrecision()) : null; + } + + public static > T enumValue(Class enumType, Attribute attr, T defVal) throws NamingException { + return attr != null ? Enum.valueOf(enumType, (String) attr.get()) : defVal; + } + + public static > T[] enumArray(Class enumType, Attribute attr) throws NamingException { + T[] a = (T[]) Array.newInstance(enumType, attr != null ? attr.size() : 0); + for (int i = 0; i < a.length; i++) + a[i] = Enum.valueOf(enumType, (String) attr.get(i)); + + return a; + } + + public static String[] stringArray(Attribute attr, String... defVals) throws NamingException { + if (attr == null) + return defVals; + + String[] ss = new String[attr.size()]; + for (int i = 0; i < ss.length; i++) + ss[i] = (String) attr.get(i); + + return ss; + } + + public static long longValue(Attribute attr, long defVal) throws NamingException { + return attr != null ? Long.parseLong((String) attr.get()) : defVal; + } + + public static int intValue(Attribute attr, int defVal) throws NamingException { + return attr != null ? Integer.parseInt((String) attr.get()) : defVal; + } + + public static Long longValue(Attribute attr, Long defVal) throws NamingException { + return attr != null ? Long.valueOf((String) attr.get()) : defVal; + } + + public static Integer intValue(Attribute attr, Integer defVal) throws NamingException { + return attr != null ? Integer.valueOf((String) attr.get()) : defVal; + } + + public static Code codeValue(Attribute attr) throws NamingException { + return attr != null ? new Code((String) attr.get()) : null; + } + + public static Issuer issuerValue(Attribute attr) throws NamingException { + return attr != null ? new Issuer((String) attr.get()) : null; + } + + public static int[] intArray(Attribute attr) throws NamingException { + if (attr == null) + return new int[]{}; + + int[] a = new int[attr.size()]; + for (int i = 0; i < a.length; i++) + a[i] = Integer.parseInt((String) attr.get(i)); + + return a; + } + + public static Code[] codeArray(Attribute attr) throws NamingException { + if (attr == null) + return EMPTY_CODES; + + Code[] codes = new Code[attr.size()]; + for (int i = 0; i < codes.length; i++) + codes[i] = new Code((String) attr.get(i)); + + return codes; + } + + public static Connection findConnection(String connDN, String deviceDN, Device device) + throws NameNotFoundException { + for (Connection conn : device.listConnections()) + if (dnOf(conn, deviceDN).equalsIgnoreCase(connDN)) + return conn; + + throw new NameNotFoundException(connDN); + } + + public static String toString(boolean val) { + return val ? "TRUE" : "FALSE"; + } + + public static String toString(Object o) { + return (o instanceof Boolean) ? toString(((Boolean) o).booleanValue()) + : (o instanceof TimeZone) ? ((TimeZone) o).getID() + : (o instanceof Date) ? Format.formatDT(null, (Date) o) + : o != null ? o.toString() : null; + } + + public static Attributes attrs(String objectclass, String attrID, String attrVal) { + Attributes attrs = new BasicAttributes(true); // case-ignore + attrs.put("objectclass", objectclass); + storeNotNullOrDef(attrs, attrID, attrVal, null); + return attrs; + } + + public static String[] addOrdinalPrefix(String[] vals) { + String[] result = new String[vals.length]; + for (int i = 0; i < result.length; i++) { + String val = vals[i]; + int vallen = val.length(); + char[] cs = new char[3 + vallen]; + cs[0] = '{'; + cs[1] = DIGITS[i]; + cs[2] = '}'; + val.getChars(0, vallen, cs, 3); + result[i] = new String(cs); + } + return result; + } + + public static String[] removeOrdinalPrefix(String[] vals) { + Arrays.sort(vals); + String[] result = new String[vals.length]; + for (int i = 0; i < result.length; i++) + result[i] = vals[i].substring(3); + return result; + } + + public static String cutDeviceName(String name) { + int start = name.indexOf("dicomDeviceName="); + if (start < 0) + return null; + + start += 16; + int end = name.indexOf(',', start); + return end < 0 ? name.substring(start) : name.substring(start, end); + } + +} diff --git a/bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/LdapDicomConfiguration.java b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/LdapDicomConfiguration.java new file mode 100644 index 0000000000..108f9748dd --- /dev/null +++ b/bus-image/src/main/java/org/miaixz/bus/image/builtin/ldap/LdapDicomConfiguration.java @@ -0,0 +1,2673 @@ +/* + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + ~ ~ + ~ The MIT License (MIT) ~ + ~ ~ + ~ Copyright (c) 2015-2024 miaixz.org and other contributors. ~ + ~ ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy ~ + ~ of this software and associated documentation files (the "Software"), to deal ~ + ~ in the Software without restriction, including without limitation the rights ~ + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ~ + ~ copies of the Software, and to permit persons to whom the Software is ~ + ~ furnished to do so, subject to the following conditions: ~ + ~ ~ + ~ The above copyright notice and this permission notice shall be included in ~ + ~ all copies or substantial portions of the Software. ~ + ~ ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ~ + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ~ + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ~ + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ~ + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ~ + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ~ + ~ THE SOFTWARE. ~ + ~ ~ + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + */ +package org.miaixz.bus.image.builtin.ldap; + +import org.miaixz.bus.core.lang.Normal; +import org.miaixz.bus.core.lang.exception.AlreadyExistsException; +import org.miaixz.bus.core.lang.exception.InternalException; +import org.miaixz.bus.core.lang.exception.NotFoundException; +import org.miaixz.bus.image.Builder; +import org.miaixz.bus.image.Device; +import org.miaixz.bus.image.Dimse; +import org.miaixz.bus.image.galaxy.io.BasicBulkDataDescriptor; +import org.miaixz.bus.image.metric.*; +import org.miaixz.bus.image.metric.api.AttributeCoercion; +import org.miaixz.bus.image.metric.api.AttributeCoercions; +import org.miaixz.bus.image.metric.api.ConfigurationChanges; +import org.miaixz.bus.image.metric.api.DicomConfiguration; +import org.miaixz.bus.image.metric.net.ApplicationEntity; +import org.miaixz.bus.image.metric.net.ApplicationEntityInfo; +import org.miaixz.bus.image.metric.net.KeycloakClient; +import org.miaixz.bus.logger.Logger; + +import javax.naming.*; +import javax.naming.directory.*; +import java.io.ByteArrayInputStream; +import java.security.cert.CertificateEncodingException; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.util.*; + +/** + * @author Kimi Liu + * @since Java 17+ + */ +public final class LdapDicomConfiguration implements DicomConfiguration { + + static final String[] AE_ATTRS = { + "dicomDeviceName", + "dicomAETitle", + "dcmOtherAETitle", + "dicomDescription", + "dicomAssociationInitiator", + "dicomAssociationAcceptor", + "dicomApplicationCluster", + "dicomInstalled", + "hl7ApplicationName", + "dicomNetworkConnectionReference" + }; + static final String[] WEBAPP_ATTRS = { + "dicomDeviceName", + "dcmWebAppName", + "dcmWebServicePath", + "dcmWebServiceClass", + "dcmKeycloakClientID", + "dicomAETitle", + "dicomDescription", + "dicomApplicationCluster", + "dcmProperty", + "dicomInstalled", + "dicomNetworkConnectionReference" + }; + private static final String CN_UNIQUE_AE_TITLES_REGISTRY = "cn=Unique AE Titles Registry,"; + private static final String CN_UNIQUE_WEB_APP_NAMES_REGISTRY = "cn=Unique Web Application Names Registry,"; + private static final String CN_DEVICES = "cn=Devices,"; + private static final String DICOM_CONFIGURATION = "DICOM Configuration"; + private static final String DICOM_CONFIGURATION_ROOT = "dicomConfigurationRoot"; + private static final String PKI_USER = "pkiUser"; + private static final String USER_CERTIFICATE_BINARY = "userCertificate;binary"; + private static final X509Certificate[] EMPTY_X509_CERTIFICATES = {}; + private final ReconnectDirContext ctx; + private final String baseDN; + private final List extensions = new ArrayList<>(); + /** + * Needed for avoiding infinite loops when dealing with extensions containing circular references + * e.g., one device extension references another device which has an extension that references the former device. + * Devices that have been created but not fully loaded are added to this threadlocal. See loadDevice. + */ + private final ThreadLocal> currentlyLoadedDevicesLocal = new ThreadLocal<>(); + private String configurationDN; + private String devicesDN; + private String aetsRegistryDN; + private String webAppsRegistryDN; + private String configurationCN = DICOM_CONFIGURATION; + private String configurationRoot = DICOM_CONFIGURATION_ROOT; + private String pkiUser = PKI_USER; + private String userCertificate = USER_CERTIFICATE_BINARY; + private boolean extended = true; + + public LdapDicomConfiguration() throws InternalException { + this(ResourceManager.getInitialEnvironment()); + } + + + public LdapDicomConfiguration(Hashtable env) + throws InternalException { + Hashtable map = new Hashtable(); + for (Map.Entry entry : env.entrySet()) + map.put((String) entry.getKey(), + Builder.replaceSystemProperties((String) entry.getValue())); + + try { + // split baseDN from LDAP URL + String s = map.get(Context.PROVIDER_URL); + int end = s.lastIndexOf('/'); + map.put(Context.PROVIDER_URL, s.substring(0, end)); + this.baseDN = s.substring(end + 1); + this.ctx = new ReconnectDirContext(map); + } catch (Exception e) { + throw new InternalException(e); + } + } + + private static void appendFilter(String attrid, T value, StringBuilder sb) { + if (value == null) + return; + + sb.append('(').append(attrid).append('=').append(LdapBuilder.toString(value)).append(')'); + } + + private static void appendFilter(String attrid, T[] values, StringBuilder sb) { + if (values.length == 0) + return; + + if (values.length == 1) { + appendFilter(attrid, values[0], sb); + return; + } + + sb.append("(|"); + for (T value : values) + appendFilter(attrid, value, sb); + sb.append(")"); + } + + private static EnumSet toQueryOptions(Attributes attrs) + throws NamingException { + Attribute relational = attrs.get("dcmRelationalQueries"); + Attribute datetime = attrs.get("dcmCombinedDateTimeMatching"); + Attribute fuzzy = attrs.get("dcmFuzzySemanticMatching"); + Attribute timezone = attrs.get("dcmTimezoneQueryAdjustment"); + if (relational == null && datetime == null && fuzzy == null && timezone == null) + return null; + EnumSet opts = EnumSet.noneOf(QueryOption.class); + if (LdapBuilder.booleanValue(relational, false)) + opts.add(QueryOption.RELATIONAL); + if (LdapBuilder.booleanValue(datetime, false)) + opts.add(QueryOption.DATETIME); + if (LdapBuilder.booleanValue(fuzzy, false)) + opts.add(QueryOption.FUZZY); + if (LdapBuilder.booleanValue(timezone, false)) + opts.add(QueryOption.TIMEZONE); + return opts; + } + + private static StorageOptions toStorageOptions(Attributes attrs) throws NamingException { + Attribute levelOfSupport = attrs.get("dcmStorageConformance"); + Attribute signatureSupport = attrs.get("dcmDigitalSignatureSupport"); + Attribute coercion = attrs.get("dcmDataElementCoercion"); + if (levelOfSupport == null && signatureSupport == null && coercion == null) + return null; + StorageOptions opts = new StorageOptions(); + opts.setLevelOfSupport( + StorageOptions.LevelOfSupport.valueOf(LdapBuilder.intValue(levelOfSupport, 3))); + opts.setDigitalSignatureSupport( + StorageOptions.DigitalSignatureSupport.valueOf(LdapBuilder.intValue(signatureSupport, 0))); + opts.setElementCoercion( + StorageOptions.ElementCoercion.valueOf(LdapBuilder.intValue(coercion, 2))); + return opts; + } + + private static byte[][] byteArrays(Attribute attr) throws NamingException { + if (attr == null) + return new byte[0][]; + + byte[][] bb = new byte[attr.size()][]; + for (int i = 0; i < bb.length; i++) + bb[i] = (byte[]) attr.get(i); + + return bb; + } + + private static TransferCapability findByDN(String aeDN, + Collection tcs, String dn) { + for (TransferCapability tc : tcs) + if (dn.equals(dnOf(tc, aeDN))) + return tc; + return null; + } + + private static void storeDiff(ConfigurationChanges.ModifiedObject ldapObj, List mods, String attrId, + byte[][] prevs, byte[][] vals) { + if (!equals(prevs, vals)) { + mods.add((vals.length == 0) + ? new ModificationItem(DirContext.REMOVE_ATTRIBUTE, + new BasicAttribute(attrId)) + : new ModificationItem(DirContext.REPLACE_ATTRIBUTE, + attr(attrId, vals))); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrId); + for (byte[] val : vals) + attribute.addValue(val.length + " bytes"); + for (byte[] prev : prevs) + attribute.removeValue(prev.length + " bytes"); + ldapObj.add(attribute); + } + } + } + + private static boolean equals(byte[][] a, byte[][] a2) { + int length = a.length; + if (a2.length != length) + return false; + + outer: + for (byte[] o1 : a) { + for (byte[] o2 : a2) + if (Arrays.equals(o1, o2)) + continue outer; + return false; + } + return true; + } + + private static String aetDN(String aet, String parentDN) { + return LdapBuilder.dnOf("dicomAETitle", aet, parentDN); + } + + private static String webAppDN(String webAppName, String parentDN) { + return LdapBuilder.dnOf("dcmWebAppName", webAppName, parentDN); + } + + private static String keycloakClientDN(String keycloakClientID, String parentDN) { + return LdapBuilder.dnOf("dcmKeycloakClientID", keycloakClientID, parentDN); + } + + private static String dnOf(TransferCapability tc, String aeDN) { + String cn = tc.getCommonName(); + return (cn != null) + ? LdapBuilder.dnOf("cn", cn, aeDN) + : LdapBuilder.dnOf("dicomSOPClass", tc.getSopClass(), + "dicomTransferRole", tc.getRole().toString(), aeDN); + } + + private static void storeNotEmpty(ConfigurationChanges.ModifiedObject ldapObj, Attributes attrs, String attrID, byte[]... vals) { + if (vals != null && vals.length > 0) { + attrs.put(attr(attrID, vals)); + if (ldapObj != null) { + ConfigurationChanges.ModifiedAttribute attribute = new ConfigurationChanges.ModifiedAttribute(attrID); + for (byte[] val : vals) + attribute.addValue(val.length + " bytes"); + ldapObj.add(attribute); + } + } + } + + private static Attribute attr(String attrID, byte[]... vals) { + Attribute attr = new BasicAttribute(attrID); + for (byte[] val : vals) + attr.add(val); + return attr; + } + + private static Attributes storeTo(ConfigurationChanges.ModifiedObject ldapObj, + BasicBulkDataDescriptor descriptor, BasicAttributes attrs) { + attrs.put("objectclass", "dcmBulkDataDescriptor"); + LdapBuilder.storeNotNullOrDef(ldapObj, attrs, "dcmBulkDataDescriptorID", + descriptor.getBulkDataDescriptorID(), null); + LdapBuilder.storeNotDef(ldapObj, attrs, "dcmBulkDataExcludeDefaults", + descriptor.isExcludeDefaults(), false); + LdapBuilder.storeNotEmpty(ldapObj, attrs, "dcmAttributeSelector", descriptor.getAttributeSelectors()); + LdapBuilder.storeNotEmpty(ldapObj, attrs, "dcmBulkDataVRLengthThreshold", + descriptor.getLengthsThresholdsAsStrings()); + return attrs; + } + + private static Attributes storeTo(AttributeCoercion ac, BasicAttributes attrs) { + attrs.put("objectclass", "dcmAttributeCoercion"); + attrs.put("cn", ac.getCommonName()); + LdapBuilder.storeNotNullOrDef(attrs, "dcmDIMSE", ac.getDIMSE(), null); + LdapBuilder.storeNotNullOrDef(attrs, "dicomTransferRole", ac.getRole(), null); + LdapBuilder.storeNotEmpty(attrs, "dcmAETitle", ac.getAETitles()); + LdapBuilder.storeNotEmpty(attrs, "dcmSOPClass", ac.getSOPClasses()); + LdapBuilder.storeNotNullOrDef(attrs, "dcmURI", ac.getURI(), null); + return attrs; + } + + private static String toFilter(ApplicationEntityInfo keys) { + if (keys == null) + return "(objectclass=dicomNetworkAE)"; + + StringBuilder sb = new StringBuilder(); + sb.append("(&(objectclass=dicomNetworkAE)"); + if (keys.getAETitle() != null) { + sb.append("(|"); + appendFilter("dicomAETitle", keys.getAETitle(), sb); + appendFilter("dcmOtherAETitle", keys.getAETitle(), sb); + sb.append(")"); + } + appendFilter("dicomDescription", keys.getDescription(), sb); + appendFilter("dicomAssociationInitiator", keys.getAssociationInitiator(), sb); + appendFilter("dicomAssociationAcceptor", keys.getAssociationAcceptor(), sb); + appendFilter("dicomApplicationCluster", keys.getApplicationClusters(), sb); + sb.append(")"); + return sb.toString(); + } + + private static String toFilter(WebApplication keys) { + if (keys == null) + return "(objectclass=dcmWebApp)"; + + StringBuilder sb = new StringBuilder(); + sb.append("(&(objectclass=dcmWebApp)"); + appendFilter("dcmWebAppName", keys.getApplicationName(), sb); + appendFilter("dicomDescription", keys.getDescription(), sb); + appendFilter("dcmWebServicePath", keys.getServicePath(), sb); + appendFilter("dcmWebServiceClass", keys.getServiceClasses(), sb); + appendFilter("dicomAETitle", keys.getAETitle(), sb); + appendFilter("dicomApplicationCluster", keys.getApplicationClusters(), sb); + appendFilter("dcmKeycloakClientID", keys.getKeycloakClientID(), sb); + sb.append(")"); + return sb.toString(); + } + + public boolean isExtended() { + return extended; + } + + public void setExtended(boolean extended) { + this.extended = extended; + } + + public String getConfigurationCN() { + return configurationCN; + } + + public void setConfigurationCN(String configurationCN) { + this.configurationCN = configurationCN; + } + + public String getConfigurationRoot() { + return configurationRoot; + } + + public void setConfigurationRoot(String configurationRoot) { + this.configurationRoot = configurationRoot; + } + + public String getPkiUser() { + return pkiUser; + } + + public void setPkiUser(String pkiUser) { + this.pkiUser = pkiUser; + } + + public String getUserCertificate() { + return userCertificate; + } + + public void setUserCertificate(String userCertificate) { + this.userCertificate = userCertificate; + } + + public void addDicomConfigurationExtension(LdapDicomConfigurationExtension ext) { + ext.setDicomConfiguration(this); + extensions.add(ext); + } + + public boolean removeDicomConfigurationExtension( + LdapDicomConfigurationExtension ext) { + if (!extensions.remove(ext)) + return false; + + ext.setDicomConfiguration(null); + return true; + } + + + @Override + public T getDicomConfigurationExtension(Class clazz) { + for (LdapDicomConfigurationExtension ext : extensions) { + if (clazz.isInstance(ext)) + return (T) ext; + } + return null; + } + + @Override + public synchronized void close() { + ctx.close(); + } + + @Override + public synchronized boolean configurationExists() throws InternalException { + return configurationDN != null || findConfiguration(); + } + + public boolean exists(String dn) throws NamingException { + try { + ctx.getAttributes(dn); + return true; + } catch (NameNotFoundException e) { + return false; + } + } + + @Override + public synchronized boolean purgeConfiguration() throws InternalException { + if (!configurationExists()) + return false; + + try { + destroySubcontextWithChilds(configurationDN); + Logger.info("Purge DICOM Configuration at {}", configurationDN); + clearConfigurationDN(); + } catch (NamingException e) { + throw new InternalException(e); + } + return true; + } + + @Override + public synchronized boolean registerAETitle(String aet) throws InternalException { + ensureConfigurationExists(); + try { + registerAET(aet); + return true; + } catch (AlreadyExistsException e) { + return false; + } + } + + @Override + public synchronized boolean registerWebAppName(String webAppName) throws InternalException { + ensureConfigurationExists(); + try { + registerWebApp(webAppName); + return true; + } catch (AlreadyExistsException e) { + return false; + } + } + + private String registerAET(String aet) throws InternalException { + try { + String dn = aetDN(aet, aetsRegistryDN); + createSubcontext(dn, LdapBuilder.attrs("dicomUniqueAETitle", "dicomAETitle", aet)); + return dn; + } catch (NameAlreadyBoundException e) { + throw new AlreadyExistsException("AE Title '" + aet + "' already exists"); + } catch (NamingException e) { + throw new InternalException(e); + } + } + + private String registerWebApp(String webAppName) throws InternalException { + try { + String dn = webAppDN(webAppName, webAppsRegistryDN); + createSubcontext(dn, LdapBuilder.attrs("dcmUniqueWebAppName", "dcmWebAppName", webAppName)); + return dn; + } catch (NameAlreadyBoundException e) { + throw new AlreadyExistsException("Web Application '" + webAppName + "' already exists"); + } catch (NamingException e) { + throw new InternalException(e); + } + } + + @Override + public synchronized void unregisterAETitle(String aet) throws InternalException { + if (configurationExists()) + try { + ctx.destroySubcontext(aetDN(aet, aetsRegistryDN)); + } catch (NameNotFoundException e) { + } catch (NamingException e) { + throw new InternalException(e); + } + } + + @Override + public synchronized void unregisterWebAppName(String webAppName) throws InternalException { + if (configurationExists()) + try { + ctx.destroySubcontext(webAppDN(webAppName, webAppsRegistryDN)); + } catch (NameNotFoundException e) { + } catch (NamingException e) { + throw new InternalException(e); + } + } + + @Override + public synchronized ApplicationEntity findApplicationEntity(String aet) + throws InternalException { + return findDevice( + "(&(objectclass=dicomNetworkAE)(dicomAETitle=" + aet + "))", aet) + .getApplicationEntity(aet); + } + + @Override + public synchronized WebApplication findWebApplication(String name) throws InternalException { + return findDevice("(&(objectclass=dcmWebApp)(dcmWebAppName=" + name + "))", name) + .getWebApplication(name); + } + + public synchronized Device findDevice(String filter, String childName) + throws InternalException { + if (!configurationExists()) + throw new NotFoundException(); + + SearchControls ctls = searchControlSubtreeScope(1, Normal.EMPTY_STRING_ARRAY, false); + NamingEnumeration ne = null; + String childDN; + try { + ne = ctx.search(devicesDN, filter, ctls); + if (!ne.hasMore()) + throw new NotFoundException(childName); + + childDN = ne.next().getNameInNamespace(); + } catch (NamingException e) { + throw new InternalException(e); + } finally { + LdapBuilder.safeClose(ne); + } + String deviceDN = childDN.substring(childDN.indexOf(',') + 1); + return loadDevice(deviceDN); + } + + public Connection findConnection(String connDN, Map cache) + throws NamingException, InternalException { + Connection conn = cache.get(connDN); + if (conn == null) { + try { + String[] attrIds = {"dicomHostname", "dicomPort", "dicomTLSCipherSuite", "dicomInstalled"}; + Attributes attrs = ctx.getAttributes(connDN, attrIds); + cache.put(connDN, conn = new Connection()); + loadFrom(conn, attrs, false); + } catch (NameNotFoundException e) { + throw new InternalException(e); + } + } + return conn; + } + + private SearchControls searchControlSubtreeScope(int countLimit, String[] returningAttrs, boolean returningObjFlag) { + SearchControls ctls = new SearchControls(); + ctls.setSearchScope(SearchControls.SUBTREE_SCOPE); + ctls.setCountLimit(countLimit); + ctls.setReturningAttributes(returningAttrs); + ctls.setReturningObjFlag(returningObjFlag); + return ctls; + } + + @Override + public synchronized Device findDevice(String name) throws InternalException { + if (!configurationExists()) + throw new NotFoundException(); + + return loadDevice(deviceRef(name)); + } + + @Override + public synchronized Device[] listDeviceInfos(Device keys) throws InternalException { + if (!configurationExists()) + return new Device[0]; + + List results = new ArrayList<>(); + NamingEnumeration ne = null; + try { + ne = search(devicesDN, toFilter(keys), "dicomDeviceName", + "dicomDescription", + "dicomManufacturer", + "dicomManufacturerModelName", + "dicomSoftwareVersion", + "dicomStationName", + "dicomInstitutionName", + "dicomInstitutionDepartmentName", + "dicomPrimaryDeviceType", + "dicomInstalled", + "objectClass"); + while (ne.hasMore()) { + Device deviceInfo = new Device(); + loadFrom(deviceInfo, ne.next().getAttributes()); + results.add(deviceInfo); + } + } catch (NamingException | CertificateException e) { + throw new InternalException(e); + } finally { + LdapBuilder.safeClose(ne); + } + return results.toArray(new Device[results.size()]); + } + + private String toFilter(Device keys) { + if (keys == null) + return "(objectclass=dicomDevice)"; + + StringBuilder sb = new StringBuilder(); + sb.append("(&(objectclass=dicomDevice)"); + appendFilter("dicomDeviceName", keys.getDeviceName(), sb); + appendFilter("dicomDescription", keys.getDescription(), sb); + appendFilter("dicomManufacturer", keys.getManufacturer(), sb); + appendFilter("dicomManufacturerModelName", keys.getManufacturerModelName(), sb); + appendFilter("dicomSoftwareVersion", keys.getSoftwareVersions(), sb); + appendFilter("dicomStationName", keys.getStationName(), sb); + appendFilter("dicomInstitutionName", keys.getInstitutionNames(), sb); + appendFilter("dicomInstitutionDepartmentName", keys.getInstitutionalDepartmentNames(), sb); + appendFilter("dicomPrimaryDeviceType", keys.getPrimaryDeviceTypes(), sb); + appendFilter("dicomInstalled", keys.isInstalled(), sb); + sb.append(")"); + return sb.toString(); + } + + private void loadFrom(ApplicationEntityInfo aetInfo, Attributes attrs, String deviceName, + Map connCache) + throws NamingException, InternalException { + aetInfo.setDeviceName(deviceName); + aetInfo.setAETitle( + LdapBuilder.stringValue(attrs.get("dicomAETitle"), null)); + aetInfo.setOtherAETitle( + LdapBuilder.stringArray(attrs.get("dcmOtherAETitle"))); + aetInfo.setDescription( + LdapBuilder.stringValue(attrs.get("dicomDescription"), null)); + aetInfo.setAssociationInitiator( + LdapBuilder.booleanValue(attrs.get("dicomAssociationInitiator"), true)); + aetInfo.setAssociationAcceptor( + LdapBuilder.booleanValue(attrs.get("dicomAssociationAcceptor"), true)); + aetInfo.setInstalled( + LdapBuilder.booleanValue(attrs.get("dicomInstalled"), null)); + aetInfo.setApplicationClusters( + LdapBuilder.stringArray(attrs.get("dicomApplicationCluster"))); + aetInfo.setHl7ApplicationName( + LdapBuilder.stringValue(attrs.get("hl7ApplicationName"), null)); + for (String connDN : LdapBuilder.stringArray(attrs.get("dicomNetworkConnectionReference"))) + aetInfo.getConnections().add(findConnection(connDN, connCache)); + } + + private void loadFrom(WebApplication keys, Attributes attrs, String deviceName, + Map connCache, Map keycloakClientCache) + throws NamingException, InternalException { + keys.setDeviceName(deviceName); + keys.setApplicationName(LdapBuilder.stringValue(attrs.get("dcmWebAppName"), null)); + keys.setDescription(LdapBuilder.stringValue(attrs.get("dicomDescription"), null)); + keys.setServicePath(LdapBuilder.stringValue(attrs.get("dcmWebServicePath"), null)); + keys.setServiceClasses(LdapBuilder.enumArray(WebApplication.ServiceClass.class, attrs.get("dcmWebServiceClass"))); + keys.setAETitle(LdapBuilder.stringValue(attrs.get("dicomAETitle"), null)); + keys.setApplicationClusters(LdapBuilder.stringArray(attrs.get("dicomApplicationCluster"))); + keys.setProperties(LdapBuilder.stringArray(attrs.get("dcmProperty"))); + String keycloakClientID = LdapBuilder.stringValue(attrs.get("dcmKeycloakClientID"), null); + keys.setKeycloakClientID(keycloakClientID); + keys.setInstalled(LdapBuilder.booleanValue(attrs.get("dicomInstalled"), null)); + for (String connDN : LdapBuilder.stringArray(attrs.get("dicomNetworkConnectionReference"))) + keys.getConnections().add(findConnection(connDN, connCache)); + if (keycloakClientID != null) + keys.setKeycloakClient(findKeycloakClient(keycloakClientID, deviceName, keycloakClientCache)); + } + + private KeycloakClient findKeycloakClient(String clientID, String deviceName, Map cache) + throws NamingException, InternalException { + String keycloakClientDN = keycloakClientDN(clientID, deviceRef(deviceName)); + KeycloakClient keycloakClient = cache.get(keycloakClientDN); + if (keycloakClient == null) { + try { + Attributes attrs = ctx.getAttributes(keycloakClientDN); + cache.put(keycloakClientDN, keycloakClient = new KeycloakClient(clientID)); + loadFrom(keycloakClient, attrs); + } catch (NameNotFoundException e) { + throw new InternalException(e); + } + } + return keycloakClient; + } + + @Override + public synchronized String[] listDeviceNames() throws InternalException { + if (!configurationExists()) + return Normal.EMPTY_STRING_ARRAY; + + return list(devicesDN, "(objectclass=dicomDevice)", "dicomDeviceName"); + } + + @Override + public synchronized String[] listRegisteredAETitles() throws InternalException { + if (!configurationExists()) + return Normal.EMPTY_STRING_ARRAY; + + return list(aetsRegistryDN, "(objectclass=dicomUniqueAETitle)", "dicomAETitle"); + } + + @Override + public synchronized String[] listRegisteredWebAppNames() throws InternalException { + if (!configurationExists()) + return Normal.EMPTY_STRING_ARRAY; + + return list(webAppsRegistryDN, "(objectclass=dcmUniqueWebAppName)", "dcmWebAppName"); + } + + public synchronized String[] list(String dn, String filter, String attrID) + throws InternalException { + List values = new ArrayList<>(); + NamingEnumeration ne = null; + try { + ne = search(dn, filter, attrID); + while (ne.hasMore()) { + SearchResult sr = ne.next(); + Attributes attrs = sr.getAttributes(); + values.add(LdapBuilder.stringValue(attrs.get(attrID), null)); + } + } catch (NamingException e) { + throw new InternalException(e); + } finally { + LdapBuilder.safeClose(ne); + } + return values.toArray(new String[values.size()]); + } + + @Override + public synchronized ConfigurationChanges persist(Device device, EnumSet