Package jadex.rules.state
Class OAVObjectType
- java.lang.Object
-
- jadex.rules.state.OAVObjectType
-
- Direct Known Subclasses:
OAVJavaType
public class OAVObjectType extends java.lang.ObjectType 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.MapattributesThe attribute descriptions.protected java.lang.StringnameThe name of the OAV object type.protected OAVObjectTypesupertypeThe supertype of this type (if any).protected OAVTypeModeltmodelThe type model.
-
Constructor Summary
Constructors Modifier Constructor Description protectedOAVObjectType(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 voidaddAttributeType(OAVAttributeType attribute)Add an attribute type description.OAVAttributeTypecreateAttributeType(java.lang.String name, OAVObjectType type)Create a new attribute type.OAVAttributeTypecreateAttributeType(java.lang.String name, OAVObjectType type, java.lang.String mult)Create a new attribute type.OAVAttributeTypecreateAttributeType(java.lang.String name, OAVObjectType type, java.lang.String mult, java.lang.Object def)Create a new attribute type.OAVAttributeTypecreateAttributeType(java.lang.String name, OAVObjectType type, java.lang.String mult, java.lang.Object def, OAVAttributeType idxattr)Create a new attribute type.booleanequals(java.lang.Object object)Test if two types are equal.OAVAttributeTypegetAttributeType(java.lang.String attribute)Get an attribute type description.OAVAttributeTypegetAttributeType0(java.lang.String attribute)Get an attribute type description.OAVAttributeTypegetDeclaredAttributeType0(java.lang.String attribute)Get an attribute type description.java.util.CollectiongetDeclaredAttributeTypes()Get the declared attribute types (i.e. not those of super types).java.lang.StringgetName()Get the name of the OAV object type.OAVObjectTypegetSupertype()Get the supertype of this typ.OAVTypeModelgetTypeModel()Get the supertype of this typ.inthashCode()Get the hash code.booleanisSubtype(OAVObjectType type)Test if this type is same type or subtype of another type.java.lang.StringtoString()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:
equalsin classjava.lang.Object- Returns:
- True if equal.
-
hashCode
public int hashCode()
Get the hash code.- Overrides:
hashCodein 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:
toStringin classjava.lang.Object- Returns:
- The string representation.
-
-