docs: boolean canCastToTypeAndMatchesConstraints( JcrSession session,
                                                  JcrPropertyDefinition propertyDefinition,
                                                  Value value ) {
          try {
              assert value instanceof JcrValue : "Illegal implementation of Value interface";
              ((JcrValue)value).asType(propertyDefinition.getRequiredType()); // throws ValueFormatException if there's a problem
              return propertyDefinition.satisfiesConstraints(value, session);
          } catch (javax.jcr.ValueFormatException vfe) {
              // Cast failed
              return false;
          }
      }