@@ -13,27 +13,27 @@ import scala.collection.mutable
13
13
class Schema (val domainShortName : String ,
14
14
val basePackage : String ,
15
15
val additionalTraversalsPackages : Seq [String ],
16
- val properties : Seq [Property [_ ]],
16
+ val properties : Seq [Property [? ]],
17
17
val anyNode : AnyNodeType ,
18
18
val nodeBaseTypes : Seq [NodeBaseType ],
19
19
val nodeTypes : Seq [NodeType ],
20
20
val edgeTypes : Seq [EdgeType ],
21
- val constantsByCategory : Map [String , Seq [Constant [_ ]]],
21
+ val constantsByCategory : Map [String , Seq [Constant [? ]]],
22
22
val protoOptions : Option [ProtoOptions ],
23
- val noWarnList : Set [(AbstractNodeType , Property [_ ])]) {
23
+ val noWarnList : Set [(AbstractNodeType , Property [? ])]) {
24
24
25
25
/** nodeTypes and nodeBaseTypes combined */
26
26
lazy val allNodeTypes : Seq [AbstractNodeType ] =
27
27
nodeTypes ++ nodeBaseTypes
28
28
29
29
/** properties that are used in node types */
30
- def nodeProperties : Seq [Property [_ ]] =
30
+ def nodeProperties : Seq [Property [? ]] =
31
31
properties.filter(property =>
32
32
(nodeTypes ++ nodeBaseTypes).exists(_.properties.contains(property))
33
33
)
34
34
35
35
/** properties that are used in edge types */
36
- def edgeProperties : Seq [Property [_ ]] =
36
+ def edgeProperties : Seq [Property [? ]] =
37
37
properties.filter(property =>
38
38
edgeTypes.exists(_.properties.contains(property))
39
39
)
@@ -58,12 +58,12 @@ abstract class AbstractNodeType(val name: String, val comment: Option[String], v
58
58
def starterName (name: String ): this .type = {this ._starterName = Option (name); this }
59
59
def withoutStarter (): this .type = starterName(null )
60
60
/** properties (including potentially inherited properties) */
61
- override def properties : Seq [Property [_ ]] = {
61
+ override def properties : Seq [Property [? ]] = {
62
62
val entireClassHierarchy = this +: extendzRecursively
63
63
entireClassHierarchy.flatMap(_.propertiesWithoutInheritance).distinct.sortBy(_.name.toLowerCase)
64
64
}
65
65
66
- def propertiesWithoutInheritance : Seq [Property [_ ]] =
66
+ def propertiesWithoutInheritance : Seq [Property [? ]] =
67
67
_properties.toSeq.sortBy(_.name.toLowerCase)
68
68
69
69
def extendz (additional : NodeBaseType * ): this .type = {
@@ -139,14 +139,14 @@ class NodeType(name: String, comment: Option[String], schemaInfo: SchemaInfo)
139
139
extends AbstractNodeType (name, comment, schemaInfo) with HasOptionalProtoId {
140
140
protected val _containedNodes : mutable.Set [ContainedNode ] = mutable.Set .empty
141
141
142
- private var _primaryKey : Option [Property [_ ]] = None
142
+ private var _primaryKey : Option [Property [? ]] = None
143
143
144
- def primaryKey (p : Property [_ ]): this .type = {
144
+ def primaryKey (p : Property [? ]): this .type = {
145
145
this ._primaryKey = Option (p)
146
146
this
147
147
}
148
148
149
- def primaryKey : Option [Property [_ ]] = this ._primaryKey
149
+ def primaryKey : Option [Property [? ]] = this ._primaryKey
150
150
151
151
lazy val classNameDb = s " ${className}Db "
152
152
@@ -212,7 +212,7 @@ class EdgeType(val name: String, val comment: Option[String], val schemaInfo: Sc
212
212
override def toString = s " EdgeType( $name) "
213
213
214
214
/** properties (including potentially inherited properties) */
215
- def properties : Seq [Property [_ ]] =
215
+ def properties : Seq [Property [? ]] =
216
216
_properties.toSeq.sortBy(_.name.toLowerCase)
217
217
}
218
218
@@ -240,7 +240,7 @@ class Property[A](val name: String,
240
240
}
241
241
242
242
def isMandatory : Boolean =
243
- cardinality.isInstanceOf [Cardinality .One [_ ]]
243
+ cardinality.isInstanceOf [Cardinality .One [? ]]
244
244
245
245
def hasDefault : Boolean =
246
246
default.isDefined
@@ -273,7 +273,7 @@ object Property {
273
273
object Long extends ValueType [Long ]
274
274
object Float extends ValueType [Float ]
275
275
object Double extends ValueType [Double ]
276
- object List extends ValueType [Seq [_ ]]
276
+ object List extends ValueType [Seq [? ]]
277
277
object Char extends ValueType [Char ]
278
278
object NodeRef extends ValueType [Any ]
279
279
object Unknown extends ValueType [Any ]
@@ -357,20 +357,20 @@ trait HasClassName {
357
357
}
358
358
359
359
trait HasProperties {
360
- protected val _properties : mutable.Set [Property [_ ]] = mutable.Set .empty
360
+ protected val _properties : mutable.Set [Property [? ]] = mutable.Set .empty
361
361
362
- def addProperty (additional : Property [_ ]): this .type = {
362
+ def addProperty (additional : Property [? ]): this .type = {
363
363
_properties.add(additional)
364
364
this
365
365
}
366
366
367
- def addProperties (additional : Property [_ ]* ): this .type = {
367
+ def addProperties (additional : Property [? ]* ): this .type = {
368
368
additional.foreach(addProperty)
369
369
this
370
370
}
371
371
372
372
/** properties (including potentially inherited properties) */
373
- def properties : Seq [Property [_ ]]
373
+ def properties : Seq [Property [? ]]
374
374
}
375
375
376
376
trait HasOptionalProtoId {
@@ -390,10 +390,10 @@ trait HasSchemaInfo {
390
390
391
391
/** carry extra information on where a schema element is being defined, e.g. when we want to be able to
392
392
* refer back that `node XYZ` was defined in `BaseSchema`, e.g. for documentation */
393
- case class SchemaInfo (definedIn : Option [Class [_ ]])
393
+ case class SchemaInfo (definedIn : Option [Class [? ]])
394
394
object SchemaInfo {
395
395
val Unknown = SchemaInfo (None )
396
396
397
- def forClass (schemaClass : Class [_ ]): SchemaInfo =
397
+ def forClass (schemaClass : Class [? ]): SchemaInfo =
398
398
SchemaInfo (Option (schemaClass))
399
399
}
0 commit comments