com.evolveum.midpoint.prism
Class Definition

java.lang.Object
  extended by com.evolveum.midpoint.prism.Definition
All Implemented Interfaces:
DebugDumpable, Dumpable, java.io.Serializable
Direct Known Subclasses:
ComplexTypeDefinition, ItemDefinition

public abstract class Definition
extends java.lang.Object
implements java.io.Serializable, Dumpable, DebugDumpable

Abstract definition in the schema. This is supposed to be a superclass for all definitions. It defines common properties for all definitions. The definitions represent data structures of the schema. Therefore instances of Java objects from this class represent specific definitions from the schema, not specific properties or objects. E.g the definitions does not have any value. To transform definition to a real property or object use the explicit instantiate() methods provided in the definition classes. E.g. the instantiate() method will create instance of Property using appropriate PropertyDefinition. The convenience methods in Schema are using this abstract class to find appropriate definitions easily.

Author:
Radovan Semancik
See Also:
Serialized Form

Field Summary
protected  javax.xml.namespace.QName defaultName
           
protected  java.lang.String displayName
           
protected  java.lang.Integer displayOrder
           
protected  java.lang.String help
           
protected  boolean ignored
           
protected  PrismContext prismContext
           
protected  javax.xml.namespace.QName typeName
           
 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
 
Method Summary
protected  void copyDefinitionData(Definition clone)
           
 java.lang.String debugDump()
          Show the content of the object intended for diagnostics by system administrator.
 java.lang.String debugDump(int indent)
           
 java.lang.String dump()
          Show the content of the object intended for diagnostics by developer.
 boolean equals(java.lang.Object obj)
           
protected abstract  java.lang.String getDebugDumpClassName()
          Return a human readable name of this class suitable for logs.
 javax.xml.namespace.QName getDefaultName()
          Returns default name for the defined entity.
 java.lang.String getDisplayName()
          Returns display name.
 java.lang.Integer getDisplayOrder()
          Specifies an order in which the item should be displayed relative to other items at the same level.
 java.lang.String getHelp()
          Returns help string.
 PrismContext getPrismContext()
           
protected  SchemaRegistry getSchemaRegistry()
           
 java.lang.Class getTypeClass()
           
 javax.xml.namespace.QName getTypeName()
          Returns the name of the definition type.
 int hashCode()
           
 boolean isIgnored()
           
 void setDisplayName(java.lang.String displayName)
           
 void setDisplayOrder(java.lang.Integer displayOrder)
           
 void setHelp(java.lang.String help)
           
 void setIgnored(boolean ignored)
           
 void setTypeName(javax.xml.namespace.QName typeName)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultName

protected javax.xml.namespace.QName defaultName

typeName

protected javax.xml.namespace.QName typeName

ignored

protected boolean ignored

displayName

protected java.lang.String displayName

displayOrder

protected java.lang.Integer displayOrder

help

protected java.lang.String help

prismContext

protected transient PrismContext prismContext
Method Detail

getDefaultName

public javax.xml.namespace.QName getDefaultName()
Returns default name for the defined entity. The default name is the name that the entity usually takes, but a name that is not fixed by the schema. The name corresponds to the XML element name in the XML representation of the schema. It does NOT correspond to a XSD type name. For example the default name may be the element name that is usually used for a specific object (e.g. "user"), while the same object may be represented using other names that resolve to the same type. In XML representation it corresponds to "defaultElement" XSD annotation.

Returns:
the defaultName

getTypeName

public javax.xml.namespace.QName getTypeName()
Returns the name of the definition type. Returns a name of the type for this definition. In XML representation that corresponds to the name of the XSD type.

Returns:
the typeName

setTypeName

public void setTypeName(javax.xml.namespace.QName typeName)

isIgnored

public boolean isIgnored()

setIgnored

public void setIgnored(boolean ignored)

getDisplayName

public java.lang.String getDisplayName()
Returns display name. Specifies the printable name of the object class or attribute. It must contain a printable string. It may also contain a key to catalog file. Returns null if no display name is set. Corresponds to "displayName" XSD annotation.

Returns:
display name string or catalog key

setDisplayName

public void setDisplayName(java.lang.String displayName)

getDisplayOrder

public java.lang.Integer getDisplayOrder()
Specifies an order in which the item should be displayed relative to other items at the same level. The items will be displayed by sorting them by the values of displayOrder annotation (ascending). Items that do not have any displayOrder annotation will be displayed last. The ordering of values with the same displayOrder is undefined and it may be arbitrary.


setDisplayOrder

public void setDisplayOrder(java.lang.Integer displayOrder)

getHelp

public java.lang.String getHelp()
Returns help string. Specifies the help text or a key to catalog file for a help text. The help text may be displayed in any suitable way by the GUI. It should explain the meaning of an attribute or object class. Returns null if no help string is set. Corresponds to "help" XSD annotation.

Returns:
help string or catalog key

setHelp

public void setHelp(java.lang.String help)

getPrismContext

public PrismContext getPrismContext()

getSchemaRegistry

protected SchemaRegistry getSchemaRegistry()

getTypeClass

public java.lang.Class getTypeClass()

copyDefinitionData

protected void copyDefinitionData(Definition clone)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

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

dump

public java.lang.String dump()
Description copied from interface: Dumpable
Show the content of the object intended for diagnostics by developer. The content may be multi-line, in case of hierarchical objects it may be intended. The use of this method may not be efficient. It is not supposed to be used in normal operation. However, it is very useful in tests or in case of dumping objects in severe error situations.

Specified by:
dump in interface Dumpable
Returns:
content of the object intended for diagnostics.

debugDump

public java.lang.String debugDump()
Description copied from interface: DebugDumpable
Show the content of the object intended for diagnostics by system administrator. The out put should be suitable to use in system logs at "debug" level. It may be multi-line, but in that case it should be well indented and quite terse. As it is intended to be used by system administrator, it should not use any developer terms such as class names, exceptions or stack traces.

Specified by:
debugDump in interface DebugDumpable
Returns:
content of the object intended for diagnostics by system administrator.

debugDump

public java.lang.String debugDump(int indent)
Specified by:
debugDump in interface DebugDumpable

getDebugDumpClassName

protected abstract java.lang.String getDebugDumpClassName()
Return a human readable name of this class suitable for logs.



Copyright © 2012 evolveum. All Rights Reserved.