Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
naming-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ics-software
naming-backend
Commits
4996d812
Commit
4996d812
authored
1 year ago
by
Lars Johansson
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused code for comparison of beans.element and repository.model objects
parent
7ebb4f0d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/openepics/names/util/StructureElementUtil.java
+0
-190
0 additions, 190 deletions
...n/java/org/openepics/names/util/StructureElementUtil.java
with
0 additions
and
190 deletions
src/main/java/org/openepics/names/util/StructureElementUtil.java
+
0
−
190
View file @
4996d812
...
@@ -25,8 +25,6 @@ import java.util.UUID;
...
@@ -25,8 +25,6 @@ import java.util.UUID;
import
org.openepics.names.repository.model.DeviceGroup
;
import
org.openepics.names.repository.model.DeviceGroup
;
import
org.openepics.names.repository.model.DeviceType
;
import
org.openepics.names.repository.model.DeviceType
;
import
org.openepics.names.repository.model.Discipline
;
import
org.openepics.names.repository.model.Discipline
;
import
org.openepics.names.repository.model.NameStructure
;
import
org.openepics.names.repository.model.Structure
;
import
org.openepics.names.repository.model.Subsystem
;
import
org.openepics.names.repository.model.Subsystem
;
import
org.openepics.names.repository.model.System
;
import
org.openepics.names.repository.model.System
;
import
org.openepics.names.repository.model.SystemGroup
;
import
org.openepics.names.repository.model.SystemGroup
;
...
@@ -627,194 +625,6 @@ public class StructureElementUtil {
...
@@ -627,194 +625,6 @@ public class StructureElementUtil {
when
,
who
);
when
,
who
);
}
}
private
static
boolean
hasSameContent
(
StructureElement
structureElement
,
NameStructure
nameStructure
)
{
// StructureElement
// x uuid
// x description
// x status
// x latest
// x deleted
// NameStructure
// x uuid
// x description
// x status
// x latest
// x deleted
if
(
structureElement
==
null
&&
nameStructure
==
null
)
return
true
;
if
(
structureElement
==
null
)
return
false
;
if
(
nameStructure
==
null
)
return
false
;
if
(
structureElement
.
getUuid
()
==
null
)
{
if
(
nameStructure
.
getUuid
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
getUuid
().
equals
(
nameStructure
.
getUuid
()))
return
false
;
if
(
structureElement
.
getDescription
()
==
null
)
{
if
(
nameStructure
.
getDescription
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
getDescription
().
equals
(
nameStructure
.
getDescription
()))
return
false
;
if
(
structureElement
.
getStatus
()
==
null
)
{
if
(
nameStructure
.
getStatus
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
getStatus
().
equals
(
nameStructure
.
getStatus
()))
return
false
;
if
(
structureElement
.
isLatest
()
==
null
)
{
if
(
nameStructure
.
isLatest
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
isLatest
().
equals
(
nameStructure
.
isLatest
()))
return
false
;
if
(
structureElement
.
isDeleted
()
==
null
)
{
if
(
nameStructure
.
isDeleted
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
isDeleted
().
equals
(
nameStructure
.
isDeleted
()))
return
false
;
return
true
;
}
private
static
boolean
hasSameContent
(
StructureElement
structureElement
,
Structure
structure
)
{
// StructureElement
// x name
// x mnemonic
// Structure
// x name
// x mnemonic
if
(!
hasSameContent
(
structureElement
,
(
NameStructure
)
structure
))
return
false
;
if
(
structureElement
==
null
)
return
false
;
if
(
structureElement
.
getName
()
==
null
)
{
if
(
structure
.
getName
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
getName
().
equals
(
structure
.
getName
()))
return
false
;
if
(
structureElement
.
getMnemonic
()
==
null
)
{
if
(
structure
.
getMnemonic
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
getMnemonic
().
equals
(
structure
.
getMnemonic
()))
return
false
;
return
true
;
}
public
static
boolean
hasSameContent
(
StructureElement
structureElement
,
SystemGroup
systemGroup
)
{
// StructureElement
// x type
// SystemGroup
if
(!
hasSameContent
(
structureElement
,
(
Structure
)
systemGroup
))
return
false
;
return
Type
.
SYSTEMGROUP
.
equals
(
structureElement
.
getType
());
}
public
static
boolean
hasSameContent
(
StructureElement
structureElement
,
System
system
)
{
// StructureElement
// x type
// x parent
// System
// x parent_uuid
if
(!
hasSameContent
(
structureElement
,
(
Structure
)
system
))
return
false
;
if
(!
Type
.
SYSTEM
.
equals
(
structureElement
.
getType
()))
{
return
false
;
}
if
(
structureElement
.
getParent
()
==
null
)
{
if
(
system
.
getParentUuid
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
getParent
().
equals
(
system
.
getParentUuid
()))
return
false
;
return
true
;
}
public
static
boolean
hasSameContent
(
StructureElement
structureElement
,
Subsystem
subsystem
)
{
// StructureElement
// x type
// x parent
// Subsystem
// x parent_uuid
if
(!
hasSameContent
(
structureElement
,
(
Structure
)
subsystem
))
return
false
;
if
(!
Type
.
SUBSYSTEM
.
equals
(
structureElement
.
getType
()))
{
return
false
;
}
if
(
structureElement
.
getParent
()
==
null
)
{
if
(
subsystem
.
getParentUuid
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
getParent
().
equals
(
subsystem
.
getParentUuid
()))
return
false
;
return
true
;
}
public
static
boolean
hasSameContent
(
StructureElement
structureElement
,
Discipline
discipline
)
{
// StructureElement
// x type
// Discipline
if
(!
hasSameContent
(
structureElement
,
(
Structure
)
discipline
))
return
false
;
return
Type
.
DISCIPLINE
.
equals
(
structureElement
.
getType
());
}
public
static
boolean
hasSameContent
(
StructureElement
structureElement
,
DeviceGroup
deviceGroup
)
{
// StructureElement
// x type
// x parent
// Subsystem
// x parent_uuid
if
(!
hasSameContent
(
structureElement
,
(
Structure
)
deviceGroup
))
return
false
;
if
(!
Type
.
DEVICEGROUP
.
equals
(
structureElement
.
getType
()))
{
return
false
;
}
if
(
structureElement
.
getParent
()
==
null
)
{
if
(
deviceGroup
.
getParentUuid
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
getParent
().
equals
(
deviceGroup
.
getParentUuid
()))
return
false
;
return
true
;
}
public
static
boolean
hasSameContent
(
StructureElement
structureElement
,
DeviceType
deviceType
)
{
// StructureElement
// x type
// x parent
// DeviceType
// x parent_uuid
if
(!
hasSameContent
(
structureElement
,
(
Structure
)
deviceType
))
return
false
;
if
(!
Type
.
DEVICETYPE
.
equals
(
structureElement
.
getType
()))
{
return
false
;
}
if
(
structureElement
.
getParent
()
==
null
)
{
if
(
deviceType
.
getParentUuid
()
!=
null
)
return
false
;
}
else
if
(!
structureElement
.
getParent
().
equals
(
deviceType
.
getParentUuid
()))
return
false
;
return
true
;
}
// ----------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------------
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment