Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
7f08d554
Commit
7f08d554
authored
Jan 05, 2015
by
Dan Markwat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed duplicate definitions of TypeHelpers - causing classpath issues
in eclipse, but mostly it is duplicative.
parent
b8308a31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
42 deletions
+0
-42
TypesSerializationTest.scala
.../apache/hadoop/metadata/json/TypesSerializationTest.scala
+0
-42
No files found.
typesystem/src/test/scala/org/apache/hadoop/metadata/json/TypesSerializationTest.scala
View file @
7f08d554
...
...
@@ -146,45 +146,3 @@ class TypesSerializationTest extends BaseTest with TypeHelpers {
Assert
.
assertEquals
(
typesDef1
,
typesDef2
)
}
}
trait
TypeHelpers
{
def
requiredAttr
(
name
:
String
,
dataType
:
IDataType
[
_
])
=
new
AttributeDefinition
(
name
,
dataType
.
getName
,
Multiplicity
.
REQUIRED
,
false
,
null
)
def
optionalAttr
(
name
:
String
,
dataTypeName
:
String
)
=
new
AttributeDefinition
(
name
,
dataTypeName
,
Multiplicity
.
OPTIONAL
,
false
,
null
)
def
optionalAttr
(
name
:
String
,
dataType
:
IDataType
[
_
])
=
new
AttributeDefinition
(
name
,
dataType
.
getName
,
Multiplicity
.
OPTIONAL
,
false
,
null
)
def
structDef
(
name
:
String
,
attrs
:
AttributeDefinition*
)
=
{
new
StructTypeDefinition
(
name
,
attrs
.
toArray
)
}
def
defineTraits
(
ts
:
TypeSystem
,
tDefs
:
HierarchicalTypeDefinition
[
TraitType
]*)
=
{
ts
.
defineTraitTypes
(
tDefs
:_
*
)
}
def
createTraitTypeDef
(
name
:
String
,
superTypes
:
Seq
[
String
],
attrDefs
:
AttributeDefinition*
)
:
HierarchicalTypeDefinition
[
TraitType
]
=
{
val
sts
=
ImmutableList
.
copyOf
(
superTypes
.
toArray
)
return
new
HierarchicalTypeDefinition
[
TraitType
](
classOf
[
TraitType
],
name
,
sts
,
attrDefs
.
toArray
)
}
def
createClassTypeDef
(
name
:
String
,
superTypes
:
Seq
[
String
],
attrDefs
:
AttributeDefinition*
)
:
HierarchicalTypeDefinition
[
ClassType
]
=
{
val
sts
=
ImmutableList
.
copyOf
(
superTypes
.
toArray
)
return
new
HierarchicalTypeDefinition
[
ClassType
](
classOf
[
ClassType
],
name
,
sts
,
attrDefs
.
toArray
)
}
@throws
(
classOf
[
MetadataException
])
def
defineClassType
(
ts
:
TypeSystem
,
classDef
:
HierarchicalTypeDefinition
[
ClassType
])
:
ClassType
=
{
ts
.
defineTypes
(
ImmutableList
.
of
[
StructTypeDefinition
],
ImmutableList
.
of
[
HierarchicalTypeDefinition
[
TraitType
]],
ImmutableList
.
of
[
HierarchicalTypeDefinition
[
ClassType
]](
classDef
))
return
ts
.
getDataType
(
classOf
[
ClassType
],
classDef
.
typeName
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment