Package ome.dsl
Class SemanticType
- java.lang.Object
-
- ome.dsl.SemanticType
-
public abstract class SemanticType extends java.lang.Objectrepresents a SemanticType definition.- Since:
- OMERO-3.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringABSTRACTstatic java.lang.StringCONTAINERjava.util.PropertiesdatabaseTypesstatic java.lang.StringENUMstatic java.lang.StringLINKjava.lang.StringprofileDatabase profile, i.e.static java.util.Set<java.lang.String>RESTRICTED_COLUMNSstatic java.util.Set<java.lang.String>RESTRICTED_TABLEstatic java.lang.StringRESULTstatic java.lang.StringTYPEstatic java.util.Set<java.lang.String>TYPESstatic java.util.Map<java.lang.String,java.lang.Class<?>>TYPES2CLASSES
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcolumnName(Property p)java.lang.StringcolumnName(Property p, java.lang.String quote)java.lang.StringcountName(Property p)Read-only property.java.lang.Stringfk(java.lang.String fkvalue)java.lang.BooleangetAbstract()SemanticTypegetActualSuperClass()java.lang.BooleangetAnnotated()java.lang.StringgetCheck()java.util.List<Property>getClassProperties()Read-only method which currently filters outEntryFieldjava.lang.BooleangetDeprecated()java.lang.BooleangetDescribed()java.lang.StringgetDetails()Read-only fieldjava.lang.StringgetDiscriminator()java.lang.BooleangetGlobal()java.lang.StringgetId()java.lang.BooleangetImmutable()booleangetIsAnnotationLink()booleangetIsEnum()Read-only property to be overwritten by subclassesbooleangetIsLink()Read-only property to be overwritten by subclassesintgetLastDotInId()java.lang.BooleangetNamed()java.lang.StringgetPackage()Read-only propertyjava.util.List<Property>getProperties()PropertygetProperty(java.lang.String name)java.util.List<Property>getPropertyClosure()Read-only method which returns a set of this class'sgetClassProperties()as well as those of the entire inheritance hierarchy.java.util.List<Property>getRequiredSingleProperties()java.lang.StringgetSequenceName()java.lang.StringgetShortname()Read-only propertyjava.lang.StringgetSuperclass()java.lang.StringgetTable()java.util.Set<java.lang.String>getUniqueConstraints()java.lang.StringindexName(Property p)Read-only property.java.lang.Stringinverse(Property p)booleanisRestrictive()A database is "restrictive" if it prevents the use of certain columns and table names, both keywords and lengths.static SemanticTypemakeNew(java.lang.String profile, java.lang.String element, java.util.Properties attributes, java.util.Properties databaseTypes)creates a new type based on the element-valued key in TYPES2CLASSES.java.lang.StringpropName(Property p)voidsetAbstract(java.lang.Boolean abstrakt)voidsetActualSuperClass(SemanticType st)voidsetAnnotated(java.lang.Boolean annotated)voidsetDeprecated(java.lang.Boolean deprecated)voidsetDescribed(java.lang.Boolean described)voidsetDiscriminator(java.lang.String discriminator)voidsetGlobal(java.lang.Boolean global)voidsetId(java.lang.String id)voidsetImmutable(java.lang.Boolean immutable)voidsetNamed(java.lang.Boolean named)voidsetProperties(java.util.List<Property> properties)voidsetSuperclass(java.lang.String superclass)voidsetTable(java.lang.String table)java.lang.StringtableName()java.lang.StringtoString()java.lang.StringtypeAnnotation(Property p)static java.lang.StringtypeToColumn(java.lang.String type)static java.lang.Stringunqualify(java.lang.String klass)Helper methodvoidvalidate()
-
-
-
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
-
ABSTRACT
public static final java.lang.String ABSTRACT
- See Also:
- Constant Field Values
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
CONTAINER
public static final java.lang.String CONTAINER
- See Also:
- Constant Field Values
-
RESULT
public static final java.lang.String RESULT
- See Also:
- Constant Field Values
-
LINK
public static final java.lang.String LINK
- See Also:
- Constant Field Values
-
ENUM
public static final java.lang.String ENUM
- See Also:
- Constant Field Values
-
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
-
-
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.IllegalArgumentExceptionjava.lang.IllegalStateException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.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 outEntryField
-
getPropertyClosure
public java.util.List<Property> getPropertyClosure()
Read-only method which returns a set of this class'sgetClassProperties()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
-
-