private void updateValueTypeFacet(
      RDFSNamedClass cls, Slot slot, OWLQuantifierRestriction restriction) {
    ValueType oldValueType = ((Cls) cls).getTemplateSlotValueType(slot);
    ValueType newValueType = oldValueType;
    Collection oldAllowedClses = ((Cls) cls).getTemplateSlotAllowedClses(slot);
    Collection newAllowedClses = oldAllowedClses;
    Collection oldAllowedValues = ((Cls) cls).getTemplateSlotAllowedValues(slot);
    Collection newAllowedValues = oldAllowedValues;
    RDFResource filler = restriction.getFiller();
    if (filler instanceof RDFSClass) {
      RDFSClass quantifierClass = (RDFSClass) filler;
      if (RDFSNames.Cls.LITERAL.equals(quantifierClass.getName())) {
        newValueType = ValueType.ANY;
      } else {
        newValueType = ValueType.INSTANCE;
        newAllowedClses = getQuantifierClsClses(quantifierClass);
      }
    } else {
      if (filler instanceof OWLDataRange) {
        newAllowedValues = ((OWLDataRange) filler).getOneOf().getValues();
        newValueType = ValueType.SYMBOL;
      } else {
        RDFSDatatype datatype = (RDFSDatatype) filler;
        if (datatype.equals(owlModel.getRDFXMLLiteralType())) {
          newValueType = ValueType.STRING;
        } else {
          String uri = XMLSchemaDatatypes.getXSDDatatype(datatype).getURI();
          newValueType = XMLSchemaDatatypes.getValueType(uri);
        }
      }
    }

    if (oldValueType == newValueType) {
      if (newValueType == ValueType.INSTANCE && !oldAllowedClses.equals(newAllowedClses)) {
        setAllowedClses(cls, slot, newAllowedClses);
      } else if (newValueType == ValueType.SYMBOL && !oldAllowedValues.equals(newAllowedValues)) {
        setAllowedValues(cls, slot, newAllowedValues);
      }
    } else {
      if (log.isLoggable(Level.FINE)) {
        log.fine(
            "+ Setting :VALUE-TYPE of "
                + cls.getName()
                + "."
                + slot.getName()
                + " to "
                + newValueType);
      }
      ((Cls) cls).setTemplateSlotValueType(slot, newValueType);
      if (newValueType == ValueType.INSTANCE) {
        setAllowedClses(cls, slot, newAllowedClses);
      } else if (newValueType == ValueType.SYMBOL) {
        setAllowedValues(cls, slot, newAllowedValues);
      }
    }
  }
 @Override
 protected void clearFiller(OWLQuantifierRestriction restriction) {
   owlModel.setTemplateSlotAllowedClses(
       restriction, restriction.getOnProperty(), Collections.EMPTY_LIST);
   // restriction.setTemplateSlotAllowedClses(restriction.getOnProperty(), Collections.EMPTY_LIST);
 }