docs: private void store( MutableCachedNode nodeTypeNode,
                          JcrPropertyDefinition propertyDef ) {
          // Find an existing node for this property definition ...
          final NodeKey key = propertyDef.key();
          final Name name = propertyDef.getInternalName();
          MutableCachedNode propDefnNode = null;
          if (!nodeTypeNode.isNew()) {
              if (nodeTypeNode.getChildReferences(system).hasChild(key)) {
                  // The node already exists ...
                  propDefnNode = system.mutable(key);
              }
          }
  
          List<Property> properties = new ArrayList<Property>();
          properties.add(propertyFactory.create(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.PROPERTY_DEFINITION));
  
          if (!JcrNodeType.RESIDUAL_ITEM_NAME.equals(propertyDef.getName())) {
              properties.add(propertyFactory.create(JcrLexicon.NAME, name));
          }
          properties.add(propertyFactory.create(JcrLexicon.AUTO_CREATED, propertyDef.isAutoCreated()));
          properties.add(propertyFactory.create(JcrLexicon.MANDATORY, propertyDef.isMandatory()));
          properties.add(propertyFactory.create(JcrLexicon.MULTIPLE, propertyDef.isMultiple()));
          properties.add(propertyFactory.create(JcrLexicon.PROTECTED, propertyDef.isProtected()));
          properties.add(propertyFactory.create(JcrLexicon.ON_PARENT_VERSION,
                                                OnParentVersionAction.nameFromValue(propertyDef.getOnParentVersion())));
          properties.add(propertyFactory.create(JcrLexicon.REQUIRED_TYPE,
                                                org.modeshape.jcr.api.PropertyType.nameFromValue(propertyDef.getRequiredType())
                                                                                  .toUpperCase()));
  
          List<String> symbols = new ArrayList<String>();
          for (String value : propertyDef.getAvailableQueryOperators()) {
              if (value != null) symbols.add(value);
          }
          properties.add(propertyFactory.create(JcrLexicon.AVAILABLE_QUERY_OPERATORS, symbols));
  
          Value[] defaultValues = propertyDef.getDefaultValues();
          if (defaultValues != null && defaultValues.length > 0) {
              String[] defaultsAsString = new String[defaultValues.length];
  
              for (int i = 0; i < defaultValues.length; i++) {
                  try {
                      defaultsAsString[i] = defaultValues[i].getString();
                  } catch (RepositoryException re) {
                      // Really shouldn't get here as all values are convertible to string
                      throw new IllegalStateException(re);
                  }
              }
              properties.add(propertyFactory.create(JcrLexicon.DEFAULT_VALUES, defaultsAsString));
          }
  
          String[] valueConstraints = propertyDef.getValueConstraints();
          if (valueConstraints.length > 0) {
              properties.add(propertyFactory.create(JcrLexicon.VALUE_CONSTRAINTS, valueConstraints));
          }
  
          // Now either update the existing node or create a new node ..
          if (propDefnNode != null) {
              // Update the properties ...
              propDefnNode.setProperties(system, properties);
          } else {
              // We have to create the node type node ...
              propDefnNode = nodeTypeNode.createChild(system, key, name, properties);
          }
      }