@Override
  public CompositeRefinedObjectClassDefinition determineCompositeObjectClassDefinition(
      QName structuralObjectClassQName, ShadowKindType kind, String intent) {
    RefinedObjectClassDefinition structuralObjectClassDefinition = null;
    Collection<RefinedObjectClassDefinition> auxiliaryObjectClassDefinitions;
    if (kind != null) {
      structuralObjectClassDefinition = getRefinedDefinition(kind, intent);
    }
    if (structuralObjectClassDefinition == null) {
      // Fallback to objectclass only
      if (structuralObjectClassQName == null) {
        throw new IllegalArgumentException("No kind nor objectclass defined");
      }
      structuralObjectClassDefinition = getRefinedDefinition(structuralObjectClassQName);
    }

    if (structuralObjectClassDefinition == null) {
      return null;
    }

    auxiliaryObjectClassDefinitions =
        structuralObjectClassDefinition.getAuxiliaryObjectClassDefinitions();

    return new CompositeRefinedObjectClassDefinitionImpl(
        structuralObjectClassDefinition, auxiliaryObjectClassDefinitions);
  }
 @Override
 public CompositeRefinedObjectClassDefinition determineCompositeObjectClassDefinition(
     ResourceShadowDiscriminator discriminator) {
   if (discriminator.getKind() == null && discriminator.getObjectClass() == null) {
     return null;
   }
   RefinedObjectClassDefinition structuralObjectClassDefinition;
   if (discriminator.getKind() == null && discriminator.getObjectClass() != null) {
     structuralObjectClassDefinition = getRefinedDefinition(discriminator.getObjectClass());
   } else {
     structuralObjectClassDefinition =
         getRefinedDefinition(discriminator.getKind(), discriminator.getIntent());
   }
   if (structuralObjectClassDefinition == null) {
     return null;
   }
   Collection<RefinedObjectClassDefinition> auxiliaryObjectClassDefinitions =
       structuralObjectClassDefinition.getAuxiliaryObjectClassDefinitions();
   return new CompositeRefinedObjectClassDefinitionImpl(
       structuralObjectClassDefinition, auxiliaryObjectClassDefinitions);
 }