code: SchemaProperty createDatabaseSchema(final App app, final AbstractSchemaNode schemaNode) throws FrameworkException {
  
  		final PropertyMap getOrCreateProperties = new PropertyMap();
  		final PropertyMap updateProperties      = new PropertyMap();
  
  		getOrCreateProperties.put(SchemaProperty.name, getName());
  		getOrCreateProperties.put(SchemaProperty.schemaNode, schemaNode);
  
  		SchemaProperty property = app.nodeQuery(SchemaProperty.class).and(getOrCreateProperties).getFirst();
  		if (property == null) {
  
  			getOrCreateProperties.put(SchemaProperty.compound, isCompoundUnique());
  			getOrCreateProperties.put(SchemaProperty.unique, isUnique());
  			getOrCreateProperties.put(SchemaProperty.indexed, isIndexed());
  			getOrCreateProperties.put(SchemaProperty.notNull, isRequired());
  			getOrCreateProperties.put(SchemaProperty.readOnly, isReadOnly());
  			getOrCreateProperties.put(SchemaProperty.format, getFormat());
  			getOrCreateProperties.put(SchemaProperty.hint, getHint());
  			getOrCreateProperties.put(SchemaProperty.category, getCategory());
  			getOrCreateProperties.put(SchemaProperty.validators, validators.toArray(new String[0]));
  			getOrCreateProperties.put(SchemaProperty.transformers, transformers.toArray(new String[0]));
  			getOrCreateProperties.put(SchemaProperty.defaultValue, defaultValue);
  
  			property = app.create(SchemaProperty.class, getOrCreateProperties);
  		}
  
  		if (parent != null) {
  
  			final JsonSchema root = parent.getSchema();
  			if (root != null) {
  
  				if (SchemaService.DynamicSchemaRootURI.equals(root.getId())) {
  
  					updateProperties.put(SchemaProperty.isPartOfBuiltInSchema, true);
  				}
  			}
  		}
  
  		// update properties
  		property.setProperties(SecurityContext.getSuperUserInstance(), updateProperties);
  
  		// return modified property
  		return property;
  	}
docs: ----- package methods -----