Package com.evolveum.midpoint.prism.impl
Class ComplexTypeDefinitionImpl
java.lang.Object
com.evolveum.midpoint.prism.AbstractFreezable
com.evolveum.midpoint.prism.impl.DefinitionImpl
com.evolveum.midpoint.prism.impl.TypeDefinitionImpl
com.evolveum.midpoint.prism.impl.ComplexTypeDefinitionImpl
- All Implemented Interfaces:
ComplexTypeDefinition,Definition,Freezable,LocalItemDefinitionStore,MutableComplexTypeDefinition,MutableDefinition,MutableTypeDefinition,PrismContextSensitive,Revivable,SmartVisitable<Definition>,TypeDefinition,Visitable<Definition>,DebugDumpable,Serializable,Cloneable
public class ComplexTypeDefinitionImpl
extends TypeDefinitionImpl
implements MutableComplexTypeDefinition
Direct implementation of
ComplexTypeDefinition.- Author:
- Radovan Semancik
- See Also:
-
Field Summary
Fields inherited from class com.evolveum.midpoint.prism.impl.TypeDefinitionImpl
compileTimeClass, instantiationOrder, serializationProxyFields inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
deprecated, deprecatedSince, displayName, displayOrder, documentation, elaborate, emphasized, experimental, help, isAbstract, isRuntimeSchema, plannedRemoval, processing, removed, removedSince, typeNameFields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(Visitor<Definition> visitor, SmartVisitation<Definition> visitation) voidadd(ItemDefinition<?> definition) voidaddSubstitution(ItemDefinition<?> itemDef, ItemDefinition<?> maybeSubst) @NotNull ComplexTypeDefinitionImplclone()Does a shallow clone of this definition (i.e. item definitions themselves are NOT cloned).protected voidcreatePropertyDefinition(String localName, String localTypeName) createPropertyDefinition(String localName, QName typeName) createPropertyDefinition(QName name, QName typeName) debugDump(int indent) debugDump(int indent, IdentityHashMap<Definition, Object> seen) @NotNull ComplexTypeDefinitiondeepClone(DeepCloneOperation operation) Does a deep clone of this definition.voidbooleanprotected voidextendItemDumpDefinition(StringBuilder sb, ItemDefinition<?> def) <ID extends ItemDefinition<?>>
IDfindItemDefinition(@NotNull ItemPath path, @NotNull Class<ID> clazz) Returns a definition of given type corresponding to given path (rooted at this store).<ID extends ItemDefinition<?>>
IDfindLocalItemDefinition(@NotNull QName name) Returns the localItemDefinitioncorresponding to given item name (in case-sensitive manner).protected StringReturn a human readable name of this class suitable for logs.When resolving unqualified names for items contained in this CTD, what should be the default namespace to look into at first.@NotNull List<? extends ItemDefinition<?>>Returns set of item definitions.Returns human-readable name of this class suitable for documentation.If not null, indicates that this type defines the structure of `extension` element of a given type.When resolving unqualified names for items contained in this CTD, what namespace(s) should be ignored.protected StringinthashCode()booleanbooleanhasSubstitutions(QName itemName) Returns true if item has substitutions in current container definitionbooleanFlag indicating whether this type was marked as "container" in the original schema.booleanisEmpty()Returns true if there are no item definitions.booleanTrue if the complex type definition is a type dedicated to hold so-called https://docs.evolveum.com/midpoint/devel/design/xml-json-yaml-vs-xnode-vs-internal-data/heterogeneous-lists/[heterogeneous lists].booleanFlag indicating whether this type was marked as "object" in the original schema.booleanFlag indicating whether this type was marked as "objectReference" in the original schema.booleanbooleanTrue if the complex type definition contains xsd:any (directly or indirectly).voidmerge(ComplexTypeDefinition otherComplexTypeDef) Merge provided definition into this definition.voidvoidreplaceDefinition(@NotNull QName itemName, ItemDefinition<?> newDefinition) Replaces a definition for an item with given name.voidrevive(PrismContext prismContext) TODO: Is revive necessary if prism context is static?voidsetAttributeDefinitions(List<PrismPropertyDefinition<?>> definitions) voidsetContainerMarker(boolean containerMarker) voidsetDefaultNamespace(String defaultNamespace) voidsetExtensionForType(QName extensionForType) voidsetIgnoredNamespaces(@NotNull List<String> ignoredNamespaces) voidsetListMarker(boolean listMarker) voidsetObjectMarker(boolean objectMarker) voidsetReferenceMarker(boolean referenceMarker) voidsetStrictAnyMarker(boolean marker) voidsetXsdAnyMarker(boolean xsdAnyMarker) substitution(QName name) Returns an interface to mutate this definition.voidtrimTo(@NotNull Collection<ItemPath> paths) Trims the definition (and any definitions it refers to) to contain only items related to given paths.Methods inherited from class com.evolveum.midpoint.prism.impl.TypeDefinitionImpl
addStaticSubType, canRepresent, copyDefinitionDataFrom, getCompileTimeClass, getInstantiationOrder, getStaticSubTypes, getSuperType, isAssignableFrom, setCompileTimeClass, setInstantiationOrder, setSuperType, useSerializationProxy, writeReplaceMethods inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
accept, addDiagram, addSchemaMigration, checkMutableOnExposing, copyDefinitionDataFrom, extendDumpHeader, getAnnotation, getAnnotations, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getPlannedRemoval, getPrismContext, getProcessing, getRemovedSince, getSchemaMigrations, getTypeClass, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRemoved, isRuntimeSchema, setAbstract, setAnnotation, setDeprecated, setDeprecatedSince, setDisplayName, setDisplayOrder, setDocumentation, setElaborate, setEmphasized, setExperimental, setHelp, setPlannedRemoval, setProcessing, setRemoved, setRemovedSince, setRuntimeSchema, setTypeName, toStringMethods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutableMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.prism.ComplexTypeDefinition
hasOperationalOnlyItems, isItemDefinitionRemoved, itemOrSubstitutionMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.Definition
getAnnotation, getAnnotations, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getProcessing, getRemovedSince, getSchemaMigrations, getSchemaRegistry, getTypeClass, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRemoved, isRuntimeSchema, setAnnotationMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.LocalItemDefinitionStore
containsItemDefinition, findContainerDefinition, findItemDefinition, findLocalItemDefinition, findPropertyDefinition, findReferenceDefinitionMethods inherited from interface com.evolveum.midpoint.prism.MutableComplexTypeDefinition
setAbstract, setCompileTimeClass, setSuperTypeMethods inherited from interface com.evolveum.midpoint.prism.MutableDefinition
addDiagram, addSchemaMigration, setDeprecated, setDisplayName, setDisplayOrder, setDocumentation, setEmphasized, setExperimental, setHelp, setProcessing, setRemoved, setRemovedSince, setRuntimeSchema, setTypeNameMethods inherited from interface com.evolveum.midpoint.prism.MutableTypeDefinition
setInstantiationOrderMethods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContextMethods inherited from interface com.evolveum.midpoint.prism.TypeDefinition
canRepresent, getCompileTimeClass, getInstantiationOrder, getStaticSubTypes, getSuperType, isAssignableFrom
-
Constructor Details
-
ComplexTypeDefinitionImpl
-
-
Method Details
-
getSchemaNamespace
-
getDefinitions
Returns set of item definitions. The set contains all item definitions of all types that were parsed. Order of definitions is insignificant.- Specified by:
getDefinitionsin interfaceComplexTypeDefinition- Specified by:
getDefinitionsin interfaceLocalItemDefinitionStore- Returns:
- set of definitions
-
add
- Specified by:
addin interfaceMutableComplexTypeDefinition
-
getExtensionForType
Description copied from interface:ComplexTypeDefinitionIf not null, indicates that this type defines the structure of `extension` element of a given type. E.g. `getExtensionForType()` == `c:UserType` means that this complex type defines structure of `extension` elements of `UserType` objects.- Specified by:
getExtensionForTypein interfaceComplexTypeDefinition
-
setExtensionForType
- Specified by:
setExtensionForTypein interfaceMutableComplexTypeDefinition
-
isReferenceMarker
public boolean isReferenceMarker()Description copied from interface:ComplexTypeDefinitionFlag indicating whether this type was marked as "objectReference" in the original schema.- Specified by:
isReferenceMarkerin interfaceComplexTypeDefinition
-
setReferenceMarker
public void setReferenceMarker(boolean referenceMarker) - Specified by:
setReferenceMarkerin interfaceMutableComplexTypeDefinition
-
isContainerMarker
public boolean isContainerMarker()Description copied from interface:ComplexTypeDefinitionFlag indicating whether this type was marked as "container" in the original schema. Does not provide any information to schema processing logic, just conveys the marker from original schema so we can serialize and deserialize the schema without loss of information.- Specified by:
isContainerMarkerin interfaceComplexTypeDefinition
-
setContainerMarker
public void setContainerMarker(boolean containerMarker) - Specified by:
setContainerMarkerin interfaceMutableComplexTypeDefinition
-
isObjectMarker
public boolean isObjectMarker()Description copied from interface:ComplexTypeDefinitionFlag indicating whether this type was marked as "object" in the original schema. Does not provide any information to schema processing logic, just conveys the marker from original schema so we can serialized and deserialize the schema without loss of information.- Specified by:
isObjectMarkerin interfaceComplexTypeDefinition
-
isXsdAnyMarker
public boolean isXsdAnyMarker()Description copied from interface:ComplexTypeDefinitionTrue if the complex type definition contains xsd:any (directly or indirectly).- Specified by:
isXsdAnyMarkerin interfaceComplexTypeDefinition
-
setXsdAnyMarker
public void setXsdAnyMarker(boolean xsdAnyMarker) - Specified by:
setXsdAnyMarkerin interfaceMutableComplexTypeDefinition
-
isListMarker
public boolean isListMarker()Description copied from interface:ComplexTypeDefinitionTrue if the complex type definition is a type dedicated to hold so-called https://docs.evolveum.com/midpoint/devel/design/xml-json-yaml-vs-xnode-vs-internal-data/heterogeneous-lists/[heterogeneous lists]. See alsoDOMUtil.IS_LIST_ATTRIBUTE_NAMEandItemDefinition.isHeterogeneousListItem().- Specified by:
isListMarkerin interfaceComplexTypeDefinition
-
setListMarker
public void setListMarker(boolean listMarker) - Specified by:
setListMarkerin interfaceMutableComplexTypeDefinition
-
getDefaultNamespace
Description copied from interface:ComplexTypeDefinitionWhen resolving unqualified names for items contained in this CTD, what should be the default namespace to look into at first. Currently does NOT apply recursively (to inner CTDs). Set by parsing `defaultNamespace` XSD annotation.- Specified by:
getDefaultNamespacein interfaceComplexTypeDefinition
-
setDefaultNamespace
- Specified by:
setDefaultNamespacein interfaceMutableComplexTypeDefinition
-
getIgnoredNamespaces
Description copied from interface:ComplexTypeDefinitionWhen resolving unqualified names for items contained in this CTD, what namespace(s) should be ignored. Names in this list are interpreted as a namespace prefixes. Currently does NOT apply recursively (to inner CTDs). Set by parsing `ignoredNamespace` XSD annotations.- Specified by:
getIgnoredNamespacesin interfaceComplexTypeDefinition
-
setIgnoredNamespaces
- Specified by:
setIgnoredNamespacesin interfaceMutableComplexTypeDefinition
-
setObjectMarker
public void setObjectMarker(boolean objectMarker) - Specified by:
setObjectMarkerin interfaceMutableComplexTypeDefinition
-
createPropertyDefinition
- Specified by:
createPropertyDefinitionin interfaceMutableComplexTypeDefinition
-
createPropertyDefinition
-
createPropertyDefinition
- Specified by:
createPropertyDefinitionin interfaceMutableComplexTypeDefinition
-
createPropertyDefinition
-
findLocalItemDefinition
Description copied from interface:LocalItemDefinitionStoreReturns the localItemDefinitioncorresponding to given item name (in case-sensitive manner). Does not try to resolve items globally (in the case of "any" content). Note: some implementors provide optimized implementations of this method.- Specified by:
findLocalItemDefinitionin interfaceLocalItemDefinitionStore
-
findItemDefinition
public <ID extends ItemDefinition<?>> ID findItemDefinition(@NotNull @NotNull ItemPath path, @NotNull @NotNull Class<ID> clazz) Description copied from interface:LocalItemDefinitionStoreReturns a definition of given type corresponding to given path (rooted at this store). Tries the global resolution in the case of "any" content.- Specified by:
findItemDefinitionin interfaceLocalItemDefinitionStore
-
merge
Merge provided definition into this definition.- Specified by:
mergein interfaceComplexTypeDefinition
-
revive
Description copied from interface:RevivableTODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)- Specified by:
revivein interfaceRevivable- Specified by:
revivein classDefinitionImpl
-
isEmpty
public boolean isEmpty()Description copied from interface:ComplexTypeDefinitionReturns true if there are no item definitions.- Specified by:
isEmptyin interfaceComplexTypeDefinition
-
accept
- Specified by:
acceptin interfaceSmartVisitable<Definition>- Overrides:
acceptin classDefinitionImpl- Returns:
- false if we already was here
-
clone
Description copied from interface:ComplexTypeDefinitionDoes a shallow clone of this definition (i.e. item definitions themselves are NOT cloned).- Specified by:
clonein interfaceComplexTypeDefinition- Specified by:
clonein interfaceDefinition- Specified by:
clonein interfaceMutableComplexTypeDefinition- Specified by:
clonein classDefinitionImpl
-
deepClone
-
deepClone
Description copied from interface:ComplexTypeDefinitionDoes a deep clone of this definition.- Specified by:
deepClonein interfaceComplexTypeDefinition
-
copyDefinitionDataFrom
-
replaceDefinition
Description copied from interface:MutableComplexTypeDefinitionReplaces a definition for an item with given name. TODO specify the behavior more precisely- Specified by:
replaceDefinitionin interfaceMutableComplexTypeDefinition
-
hashCode
public int hashCode()- Overrides:
hashCodein classTypeDefinitionImpl
-
equals
- Overrides:
equalsin classTypeDefinitionImpl
-
debugDump
- Specified by:
debugDumpin interfaceDebugDumpable- Overrides:
debugDumpin classDefinitionImpl
-
debugDump
- Specified by:
debugDumpin interfaceDefinition
-
extendItemDumpDefinition
-
getDebugDumpClassName
Return a human readable name of this class suitable for logs.- Specified by:
getDebugDumpClassNamein classDefinitionImpl
-
getDocClassName
Description copied from class:DefinitionImplReturns human-readable name of this class suitable for documentation. (e.g. "property")- Specified by:
getDocClassNamein classDefinitionImpl
-
trimTo
Description copied from interface:ComplexTypeDefinitionTrims the definition (and any definitions it refers to) to contain only items related to given paths. USE WITH CARE. Be sure no shared definitions would be affected by this operation!- Specified by:
trimToin interfaceComplexTypeDefinition
-
delete
- Specified by:
deletein interfaceMutableComplexTypeDefinition
-
toMutable
Description copied from interface:DefinitionReturns an interface to mutate this definition.- Specified by:
toMutablein interfaceComplexTypeDefinition- Specified by:
toMutablein interfaceDefinition
-
performFreeze
public void performFreeze()- Overrides:
performFreezein classAbstractFreezable
-
addSubstitution
- Specified by:
addSubstitutionin interfaceMutableComplexTypeDefinition
-
substitution
- Specified by:
substitutionin interfaceComplexTypeDefinition
-
hasSubstitutions
public boolean hasSubstitutions()- Specified by:
hasSubstitutionsin interfaceComplexTypeDefinition
-
hasSubstitutions
Description copied from interface:ComplexTypeDefinitionReturns true if item has substitutions in current container definition- Specified by:
hasSubstitutionsin interfaceComplexTypeDefinition
-
setAttributeDefinitions
- Specified by:
setAttributeDefinitionsin interfaceMutableComplexTypeDefinition
-
getXmlAttributeDefinitions
- Specified by:
getXmlAttributeDefinitionsin interfaceComplexTypeDefinition
-
isStrictAnyMarker
public boolean isStrictAnyMarker()- Specified by:
isStrictAnyMarkerin interfaceComplexTypeDefinition
-
setStrictAnyMarker
public void setStrictAnyMarker(boolean marker) - Specified by:
setStrictAnyMarkerin interfaceMutableComplexTypeDefinition
-