Class 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 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.
    • 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 class java.lang.Object
        Returns:
        True if equal.
      • hashCode

        public int hashCode()
        Get the hash code.
        Overrides:
        hashCode in class java.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 class java.lang.Object
        Returns:
        The string representation.