Skip to content

Commit

Permalink
Add schema for items indexing
Browse files Browse the repository at this point in the history
Here we added the schema needed to create searchable ("indexed") values
in identity/items/normalized container. No implementation yet, only
the schema.

Some shuffling of identity/correlation schema was done as well.

Also, low-level correlators tests were fixed, and a skeleton of new
TestItemsCorrelator was created.
  • Loading branch information
mederly committed Aug 6, 2022
1 parent 2d2531d commit ce044d0
Show file tree
Hide file tree
Showing 45 changed files with 964 additions and 816 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public abstract class SchemaConstants {
// NAMESPACES

public static final String NS_ORG = "http://midpoint.evolveum.com/xml/ns/public/common/org-3";
public static final String NS_IDENTITY = "http://midpoint.evolveum.com/xml/ns/public/common/identity-3";
public static final String NS_IDENTITY = "http://midpoint.evolveum.com/xml/ns/public/common/identity-3"; // TODO
public static final String PREFIX_NS_ORG = "org";
public static final String NS_QUERY = PrismConstants.NS_QUERY;
public static final String NS_TYPES = PrismConstants.NS_TYPES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* Information needed to carry out synchronization-related activities (classification, correlation,
* and execution of synchronization reactions). This class exists to unify the "legacy" way of specifying
* this information (in `synchronization` section of resource definition) and "modern" one - right in `schemaHandling` part.
*
* Created using {@link SynchronizationPolicyFactory}.
*/
public class SynchronizationPolicy {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (C) 2010-2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.schema.util;

import org.jetbrains.annotations.Nullable;

import com.evolveum.midpoint.xml.ns._public.common.common_3.CompositeCorrelatorType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectTemplateCorrelationType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectTemplateType;

public class ObjectTemplateTypeUtil {

public static @Nullable CompositeCorrelatorType getCorrelators(@Nullable ObjectTemplateType template) {
if (template == null) {
return null;
}
ObjectTemplateCorrelationType correlation = template.getCorrelation();
return correlation != null ? correlation.getCorrelators() : null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4011,21 +4011,6 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="identity" type="tns:IdentityItemDefinitionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Defines "identity item" configuration for this item. Currently, it is supported only
for definitions of focal items.

TODO define more precisely
</xsd:documentation>
<xsd:appinfo>
<a:since>4.6</a:since>
<a:experimental>true</a:experimental>
<a:displayName>ItemRefinedDefinitionType.identity</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:long"/>
</xsd:complexType>
Expand Down Expand Up @@ -8411,7 +8396,20 @@
<xsd:element name="identity" type="tns:IdentityDataHandlingType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Definition of handling of the identity data.
Definition of handling of the identity data. TODO better explanation

TODO better name ... multiSource? multiProvenance?
</xsd:documentation>
<xsd:appinfo>
<a:since>4.6</a:since>
<a:experimental>true</a:experimental>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="correlation" type="tns:ObjectTemplateCorrelationType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Definition of correlation for the corresponding focus objects.
</xsd:documentation>
<xsd:appinfo>
<a:since>4.6</a:since>
Expand Down Expand Up @@ -8472,6 +8470,44 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="indexing" type="tns:ItemIndexingDefinitionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Defines "indexing" of item value or values, i.e. their transformation to a form suitable
for advanced - for example, fuzzy - searching.

Indexing is needed in two typical cases (often overlapping):

- Either when a special transformation is necessary (e.g., taking first N characters of
the normalized form; or a unique custom transformation)
- and/or when we need to index data that are not searchable by default (e.g. multi-provenance
properties, or properties not indexed by the repository).
</xsd:documentation>
<xsd:appinfo>
<a:since>4.6</a:since>
<a:experimental>true</a:experimental>
<a:displayName>ItemRefinedDefinitionType.indexing</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="identity" type="tns:IdentityItemDefinitionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Marks the item as the one with multiple origins. Such items are not stored directly in their
"main" place in the focus objects, but in $focus/identities/identity[x]/data object instead.
(Where identity[x] is the value assigned to the given origin.) Then there may be special
mapping or mappings devoted to the selection of the value or values to be stored right
to the "main" place of the focus item.

TODO better name for this configuration item... multiSource? multiProvenance? multiOrigin? multi?
</xsd:documentation>
<xsd:appinfo>
<a:since>4.6</a:since>
<a:experimental>true</a:experimental>
<a:displayName>ItemRefinedDefinitionType.identity</a:displayName>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
Expand Down Expand Up @@ -10660,29 +10696,6 @@
<xsd:attribute name="id" type="xsd:long"/>
</xsd:complexType>

<xsd:complexType name="SystemConfigurationCorrelationType">
<xsd:annotation>
<xsd:documentation>
Global settings related to correlation.
</xsd:documentation>
<xsd:appinfo>
<a:since>4.5</a:since>
<a:experimental>true</a:experimental>
<a:container>true</a:container>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="correlators" type="tns:CompositeCorrelatorType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Globally-defined correlators.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:long"/>
</xsd:complexType>

<xsd:complexType name="SystemConfigurationAuditType">
<xsd:annotation>
<xsd:documentation>
Expand Down

0 comments on commit ce044d0

Please sign in to comment.