Package ome.dsl

Class Property


  • public abstract class Property
    extends java.lang.Object
    represents the definition of a property within a SemanticType
    Since:
    OMERO-3.0
    • Constructor Detail

      • Property

        protected Property​(SemanticType st,
                           java.util.Properties attrs,
                           java.util.Properties databaseTypes)
        creates a Property and sets fields based on attributes USING DEFAULT VALUES. Subclasses may override these values
    • Method Detail

      • validate

        public void validate()
      • makeNew

        public static Property makeNew​(java.lang.String element,
                                       SemanticType st,
                                       java.util.Properties attributes,
                                       java.util.Properties databaseTypes)
                                throws java.lang.IllegalArgumentException,
                                       java.lang.IllegalStateException
        creates a new property based on the element-valued key in FIELDS2CLASSES. Used mainly by the xml reader
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalStateException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setDatabaseTypes

        public void setDatabaseTypes​(java.util.Properties databaseTypes)
      • setName

        public void setName​(java.lang.String name)
      • getName

        public java.lang.String getName()
      • getNameCapped

        public java.lang.String getNameCapped()
        Read-only property
      • getNameUpper

        public java.lang.String getNameUpper()
        Read-only property
      • setType

        public void setType​(java.lang.String type)
      • getType

        public java.lang.String getType()
      • _getType

        public java.lang.String _getType()
        Returns the actual type with no modification. getType() is probably poorly named, but changing it would require changing all the templates extensively.
      • setActualType

        public void setActualType​(SemanticType type)
      • setActualTarget

        public void setActualTarget​(SemanticType type)
      • getDbType

        public java.lang.String getDbType()
        Read-only variable
      • getTypeAnnotation

        public java.lang.String getTypeAnnotation()
        Read-only variable
      • getShortType

        public java.lang.String getShortType()
        Read-only variable
      • getFieldName

        public java.lang.String getFieldName()
        Read-only variable 4.2: multiple links to the same object forces us to not use "shortType" (the unqualified type of the link) and instead to use the name of the link relationship. TODO: In later versions, we could always use this value in order to have everything more consistent and simple.
      • getFieldType

        public java.lang.String getFieldType()
        Read-only value. Overwritten in subclasses
      • getFieldInitializer

        public java.lang.String getFieldInitializer()
        Read-only value. Overwritten in subclasses
      • setTag

        public void setTag​(java.lang.String tag)
      • getTag

        public java.lang.String getTag()
      • setTarget

        public void setTarget​(java.lang.String target)
      • getTarget

        public java.lang.String getTarget()
      • getShortTarget

        public java.lang.String getShortTarget()
        Read-only property
      • getTargetName

        public java.lang.String getTargetName()
        Read-only property 4.2: multiple links to the same object forces generate a name different from "shortTarget"
        See Also:
        getShortType()
      • setDefaultValue

        public void setDefaultValue​(java.lang.String defaultValue)
      • getDefaultValue

        public java.lang.String getDefaultValue()
      • setRequired

        public void setRequired​(java.lang.Boolean required)
      • getRequired

        public java.lang.Boolean getRequired()
      • getNullable

        public java.lang.Boolean getNullable()
        Read-only field
      • setUnique

        public void setUnique​(java.lang.Boolean unique)
      • getUnique

        public java.lang.Boolean getUnique()
      • setOrdered

        public void setOrdered​(java.lang.Boolean ordered)
      • getOrdered

        public java.lang.Boolean getOrdered()
      • setInverse

        public void setInverse​(java.lang.String inverse)
      • getInverse

        public java.lang.String getInverse()
      • getInverseCapped

        public java.lang.String getInverseCapped()
        Read-only variable
      • setInsert

        public void setInsert​(java.lang.Boolean insert)
      • getInsert

        public java.lang.Boolean getInsert()
      • setUpdate

        public void setUpdate​(java.lang.Boolean update)
      • getUpdate

        public java.lang.Boolean getUpdate()
      • setForeignKey

        public void setForeignKey​(java.lang.String foreignKey)
      • getForeignKey

        public java.lang.String getForeignKey()
      • setOne2Many

        public void setOne2Many​(java.lang.Boolean one2Many)
      • getOne2Many

        public java.lang.Boolean getOne2Many()
      • setBidirectional

        public void setBidirectional​(java.lang.Boolean bdir)
      • getBidirectional

        public java.lang.Boolean getBidirectional()
      • setDeprecated

        public void setDeprecated​(java.lang.Boolean deprecated)
      • getDeprecated

        public java.lang.Boolean getDeprecated()
      • getDef

        public java.lang.String getDef()
        Returns:
        the database definition for the property's type, or an empty string
        See Also:
        ticket 803
      • getIsLink

        public boolean getIsLink()
        Read-only property, for subclassing