Package ome.dsl

Class SemanticType


  • public abstract class SemanticType
    extends java.lang.Object
    represents a SemanticType definition.
    Since:
    OMERO-3.0
    • Field Detail

      • RESTRICTED_COLUMNS

        public static final java.util.Set<java.lang.String> RESTRICTED_COLUMNS
      • RESTRICTED_TABLE

        public static final java.util.Set<java.lang.String> RESTRICTED_TABLE
      • TYPES

        public static final java.util.Set<java.lang.String> TYPES
      • TYPES2CLASSES

        public static final java.util.Map<java.lang.String,​java.lang.Class<?>> TYPES2CLASSES
      • profile

        public final java.lang.String profile
        Database profile, i.e. ${omero.db.profile}.
        See Also:
        ticket 73
      • databaseTypes

        public final java.util.Properties databaseTypes
    • Constructor Detail

      • SemanticType

        public SemanticType​(java.lang.String profile,
                            java.util.Properties attrs,
                            java.util.Properties databaseTypes)
        sets the the various properties available in attrs USING DEFAULTS IF NOT AVAILABLE. Subclasses may override these values.
    • Method Detail

      • isRestrictive

        public boolean isRestrictive()
        A database is "restrictive" if it prevents the use of certain columns and table names, both keywords and lengths.
      • validate

        public void validate()
      • makeNew

        public static SemanticType makeNew​(java.lang.String profile,
                                           java.lang.String element,
                                           java.util.Properties attributes,
                                           java.util.Properties databaseTypes)
                                    throws java.lang.IllegalArgumentException,
                                           java.lang.IllegalStateException
        creates a new type based on the element-valued key in TYPES2CLASSES. 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
      • typeToColumn

        public static java.lang.String typeToColumn​(java.lang.String type)
      • setAbstract

        public void setAbstract​(java.lang.Boolean abstrakt)
      • getAbstract

        public java.lang.Boolean getAbstract()
      • setAnnotated

        public void setAnnotated​(java.lang.Boolean annotated)
      • getAnnotated

        public java.lang.Boolean getAnnotated()
      • setId

        public void setId​(java.lang.String id)
      • getId

        public java.lang.String getId()
      • getLastDotInId

        public int getLastDotInId()
      • getPackage

        public java.lang.String getPackage()
        Read-only property
      • getShortname

        public java.lang.String getShortname()
        Read-only property
      • countName

        public java.lang.String countName​(Property p)
        Read-only property. Introduced during ticket:73 in order to handle databases with relation name length restrictions.
      • indexName

        public java.lang.String indexName​(Property p)
        Read-only property. Introduced during ticket:73 in order to handle databases with relation name length restrictions.
      • columnName

        public java.lang.String columnName​(Property p)
      • columnName

        public java.lang.String columnName​(Property p,
                                           java.lang.String quote)
      • tableName

        public java.lang.String tableName()
      • inverse

        public java.lang.String inverse​(Property p)
      • typeAnnotation

        public java.lang.String typeAnnotation​(Property p)
      • propName

        public java.lang.String propName​(Property p)
      • setTable

        public void setTable​(java.lang.String table)
      • getTable

        public java.lang.String getTable()
      • getSequenceName

        public java.lang.String getSequenceName()
      • fk

        public java.lang.String fk​(java.lang.String fkvalue)
      • setActualSuperClass

        public void setActualSuperClass​(SemanticType st)
      • getActualSuperClass

        public SemanticType getActualSuperClass()
      • setSuperclass

        public void setSuperclass​(java.lang.String superclass)
      • getSuperclass

        public java.lang.String getSuperclass()
      • setDiscriminator

        public void setDiscriminator​(java.lang.String discriminator)
      • getDiscriminator

        public java.lang.String getDiscriminator()
      • setNamed

        public void setNamed​(java.lang.Boolean named)
      • getNamed

        public java.lang.Boolean getNamed()
      • setDescribed

        public void setDescribed​(java.lang.Boolean described)
      • getDescribed

        public java.lang.Boolean getDescribed()
      • setImmutable

        public void setImmutable​(java.lang.Boolean immutable)
      • getImmutable

        public java.lang.Boolean getImmutable()
      • setDeprecated

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

        public java.lang.Boolean getDeprecated()
      • setProperties

        public void setProperties​(java.util.List<Property> properties)
      • getProperties

        public java.util.List<Property> getProperties()
      • getProperty

        public Property getProperty​(java.lang.String name)
      • getClassProperties

        public java.util.List<Property> getClassProperties()
        Read-only method which currently filters out EntryField
      • getPropertyClosure

        public java.util.List<Property> getPropertyClosure()
        Read-only method which returns a set of this class's getClassProperties() as well as those of the entire inheritance hierarchy.
      • getRequiredSingleProperties

        public java.util.List<Property> getRequiredSingleProperties()
      • getCheck

        public java.lang.String getCheck()
      • setGlobal

        public void setGlobal​(java.lang.Boolean global)
      • getGlobal

        public java.lang.Boolean getGlobal()
      • getDetails

        public java.lang.String getDetails()
        Read-only field
      • getIsLink

        public boolean getIsLink()
        Read-only property to be overwritten by subclasses
      • getIsAnnotationLink

        public boolean getIsAnnotationLink()
      • getIsEnum

        public boolean getIsEnum()
        Read-only property to be overwritten by subclasses
      • getUniqueConstraints

        public java.util.Set<java.lang.String> getUniqueConstraints()
      • unqualify

        public static java.lang.String unqualify​(java.lang.String klass)
        Helper method