Package jadex.rules.state
Class OAVObjectType
- java.lang.Object
-
- jadex.rules.state.OAVObjectType
-
- Direct Known Subclasses:
OAVJavaType
public class OAVObjectType extends java.lang.Object
Type definition for an object stored as OAV triples. Type handling is useful for debugging and may be ignored for performance in production environments.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map
attributes
The attribute descriptions.protected java.lang.String
name
The name of the OAV object type.protected OAVObjectType
supertype
The supertype of this type (if any).protected OAVTypeModel
tmodel
The type model.
-
Constructor Summary
Constructors Modifier Constructor Description protected
OAVObjectType(java.lang.String name, OAVObjectType supertype, OAVTypeModel tmodel)
Create a new OAV object type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAttributeType(OAVAttributeType attribute)
Add an attribute type description.OAVAttributeType
createAttributeType(java.lang.String name, OAVObjectType type)
Create a new attribute type.OAVAttributeType
createAttributeType(java.lang.String name, OAVObjectType type, java.lang.String mult)
Create a new attribute type.OAVAttributeType
createAttributeType(java.lang.String name, OAVObjectType type, java.lang.String mult, java.lang.Object def)
Create a new attribute type.OAVAttributeType
createAttributeType(java.lang.String name, OAVObjectType type, java.lang.String mult, java.lang.Object def, OAVAttributeType idxattr)
Create a new attribute type.boolean
equals(java.lang.Object object)
Test if two types are equal.OAVAttributeType
getAttributeType(java.lang.String attribute)
Get an attribute type description.OAVAttributeType
getAttributeType0(java.lang.String attribute)
Get an attribute type description.OAVAttributeType
getDeclaredAttributeType0(java.lang.String attribute)
Get an attribute type description.java.util.Collection
getDeclaredAttributeTypes()
Get the declared attribute types (i.e.java.lang.String
getName()
Get the name of the OAV object type.OAVObjectType
getSupertype()
Get the supertype of this typ.OAVTypeModel
getTypeModel()
Get the supertype of this typ.int
hashCode()
Get the hash code.boolean
isSubtype(OAVObjectType type)
Test if this type is same type or subtype of another type.java.lang.String
toString()
Get the string representation.
-
-
-
Field Detail
-
name
protected java.lang.String name
The name of the OAV object type.
-
supertype
protected OAVObjectType supertype
The supertype of this type (if any).
-
attributes
protected java.util.Map attributes
The attribute descriptions.
-
tmodel
protected OAVTypeModel tmodel
The type model.
-
-
Constructor Detail
-
OAVObjectType
protected OAVObjectType(java.lang.String name, OAVObjectType supertype, OAVTypeModel tmodel)
Create a new OAV object type.- Parameters:
name
- The name of the OAV object type.supertype
- The supertype.
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name of the OAV object type.- Returns:
- The name of the OAV object type.
-
addAttributeType
protected void addAttributeType(OAVAttributeType attribute)
Add an attribute type description.- Parameters:
attribute
- The OAV attribute type.
-
createAttributeType
public OAVAttributeType createAttributeType(java.lang.String name, OAVObjectType type)
Create a new attribute type.- Parameters:
name
- The name.type
- The type.mult
- The multiplicity.def
- The default value.
-
createAttributeType
public OAVAttributeType createAttributeType(java.lang.String name, OAVObjectType type, java.lang.String mult)
Create a new attribute type.- Parameters:
name
- The name.type
- The type.mult
- The multiplicity.def
- The default value.
-
createAttributeType
public OAVAttributeType createAttributeType(java.lang.String name, OAVObjectType type, java.lang.String mult, java.lang.Object def)
Create a new attribute type.- Parameters:
name
- The name.type
- The type.mult
- The multiplicity.def
- The default value.
-
createAttributeType
public OAVAttributeType createAttributeType(java.lang.String name, OAVObjectType type, java.lang.String mult, java.lang.Object def, OAVAttributeType idxattr)
Create a new attribute type.- Parameters:
name
- The name.type
- The type.mult
- The multiplicity.def
- The default value.
-
getAttributeType
public OAVAttributeType getAttributeType(java.lang.String attribute)
Get an attribute type description.- Parameters:
attribute
- The name of the attribute.- Returns:
- The OAV attribute type.
-
getAttributeType0
public OAVAttributeType getAttributeType0(java.lang.String attribute)
Get an attribute type description.- Parameters:
attribute
- The name of the attribute.- Returns:
- The OAV attribute type.
-
getDeclaredAttributeType0
public OAVAttributeType getDeclaredAttributeType0(java.lang.String attribute)
Get an attribute type description.- Parameters:
attribute
- The name of the attribute.- Returns:
- The OAV attribute type.
-
getDeclaredAttributeTypes
public java.util.Collection getDeclaredAttributeTypes()
Get the declared attribute types (i.e. not those of super types).
-
getTypeModel
public OAVTypeModel getTypeModel()
Get the supertype of this typ.- Returns:
- The supertype (if any).
-
getSupertype
public OAVObjectType getSupertype()
Get the supertype of this typ.- Returns:
- The supertype (if any).
-
equals
public boolean equals(java.lang.Object object)
Test if two types are equal.- Overrides:
equals
in classjava.lang.Object
- Returns:
- True if equal.
-
hashCode
public int hashCode()
Get the hash code.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hashcode.
-
isSubtype
public boolean isSubtype(OAVObjectType type)
Test if this type is same type or subtype of another type.- Parameters:
type
- The type to test.- Returns:
- True, if this object is same type or subtype.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
-