|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.unimi.dico.islab.idbs2.kc.Type
public class Type
Representation of a class of a KnowledgeChunk
: could be an asserted class or an excluded class.
This is in fact an association between a class (represented by a KnowledgeChunk
of type T)
and a knowledge chunk being its instance.
The same class could appear in more than one Type
instance, every time connected with different
KnowledgeChunk
s.
KnowledgeChunk
Constructor Summary | |
---|---|
protected |
Type()
Empty constructor needed for Hibernate compatibility. |
protected |
Type(KnowledgeChunk kc,
KnowledgeChunk type,
boolean assertedType)
Direct use of this constructor is discouraged. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Check if the given object obj is equal to the current instance. |
Integer |
getId()
Getter for the id field. |
KnowledgeChunk |
getInstance()
Getter for the instance field. |
KnowledgeChunk |
getType()
Getter for the type field. |
int |
hashCode()
|
boolean |
isAssertedType()
Getter for the assertedType field. |
void |
setAssertedType(boolean assertedType)
Setter for the assertedType field. |
String |
toString()
Generates a string representation of the current class wrapper. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Type()
protected Type(KnowledgeChunk kc, KnowledgeChunk type, boolean assertedType) throws org.hibernate.PropertyValueException
Direct use of this constructor is discouraged. Use KnowledgeChunk.addType
instead.
kc
- the KnowledgeChunk
being instance of the class type
.type
- the KnowledgeChunk
of type T being a class of kc
.assertedType
- could be kc
is an instance of type
kc
is not an instance of type
org.hibernate.PropertyValueException
KnowledgeChunk.addType(KnowledgeChunk)
,
KnowledgeChunk.addType(KnowledgeChunk, boolean)
Method Detail |
---|
public boolean equals(Object obj)
Check if the given object obj
is equal to the current instance. To be
considered equal, obj
must be an instance of Type
and must have
the fields type.id
, instance.id
and assertedType
identical
to the corresponding fields of the current object.
equals
in class Object
obj
- the object instance to be compared with the current one.
obj
is equal to this instance, false otherwise.Object.equals(Object)
public int hashCode()
hashCode
in class Object
public String toString()
Generates a string representation of the current class wrapper.
toString
in class Object
public KnowledgeChunk getType()
Getter for the type
field.
KnowledgeChunk
being a class of kc
public KnowledgeChunk getInstance()
Getter for the instance
field.
KnowledgeChunk
being an instance of type
public Integer getId()
Getter for the id
field.
public boolean isAssertedType()
Getter for the assertedType
field.
type
is an asserted class of kc
type
is an excluded class of kc
public void setAssertedType(boolean assertedType)
Setter for the assertedType
field.
assertedType
- must be set to
type
is an asserted class of kc
type
is an excluded class of kc
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |