25 impl_compile_property_type(
33 impl_object_type_compile(
58 for (iterator = NULL;;) {
60 &iterator, &property_name, xctx);
67 NULL, model->shared, NULL, xctx);
77 impl_compile_property_type(
97 property_name, p, xctx);
107 &afw_s_dataType, xctx);
113 "/dataType is invalid",
123 &afw_s_custom, xctx);
126 custom, model, xctx);
131 &afw_s_allowQuery, &found, xctx);
136 &afw_s_allowRead, &found, xctx);
141 &afw_s_allowWrite, &found, xctx);
146 &afw_s_required, &found, xctx);
151 &afw_s_transitory, &found, xctx);
156 &afw_s_unique, &found, xctx);
161 &afw_s_defaultValue, xctx);
167 s,source_location, NULL, model->shared, NULL, xctx);
172 &afw_s_mappedPropertyName, xctx);
181 &afw_s_onGetProperty, xctx);
187 s, source_location, NULL, model->shared, NULL, xctx);
192 &afw_s_onGetInitialValue, xctx);
198 s, source_location, NULL, model->shared, NULL, xctx);
203 &afw_s_onSetProperty, xctx);
209 s, source_location, NULL, model->shared, NULL, xctx);
234 propertyTypes, property_name, xctx);
237 property, &afw_s_inheritedFrom, xctx);
250 impl_harvest_property_type(
262 embedding_object, property_name, xctx);
264 &afw_s__AdaptiveValueMeta_, xctx);
268 &afw_s_additionalConstraints, xctx);
271 &afw_s_additionalConstraints, value, xctx);
276 &afw_s_allowQuery, xctx);
279 &afw_s_allowQuery, value, xctx);
284 &afw_s_allowWrite, xctx);
287 &afw_s_allowWrite, value, xctx);
292 &afw_s_collectionURIs, p, xctx);
295 &afw_s_collectionURIs, s, xctx);
300 &afw_s_contextType, p, xctx);
303 &afw_s_contextType, s, xctx);
308 &afw_s_dataType, p, xctx);
311 &afw_s_dataType, s, xctx);
316 &afw_s_dataTypeParameter, p, xctx);
319 &afw_s_dataTypeParameter, s, xctx);
324 &afw_s_description, p, xctx);
327 &afw_s_description, s, xctx);
332 &afw_s_label, p, xctx);
335 &afw_s_label, s, xctx);
340 &afw_s_originURI, p, xctx);
343 &afw_s_originURI, s, xctx);
348 &afw_s_referenceURI, p, xctx);
351 &afw_s_referenceURI, s, xctx);
356 &afw_s_required, xctx);
359 &afw_s_required, value, xctx);
364 &afw_s_testDataParameter, p, xctx);
367 &afw_s_testDataParameter, s, xctx);
372 &afw_s_unique, xctx);
375 &afw_s_unique, value, xctx);
382 impl_harvest_object_type(
407 &afw_s__AdaptiveObjectType_,
408 object_type_id, xctx);
418 &afw_s_resolvedParentPaths, xctx);
423 to_parent_paths->internal =
425 for (iterator = NULL;;) {
427 from_parent_paths->internal, &iterator, xctx);
432 (
int)(path->len - model->objectType_path->len),
433 (
char *)(path->s + model->objectType_path->len));
441 &afw_s_parentPaths, (
const afw_value_t *)to_parent_paths, xctx);
446 &afw_s_allowAdd, &found, xctx);
454 &afw_s_allowChange, &found, xctx);
462 &afw_s_allowDelete, &found, xctx);
470 &afw_s_allowEntity, &found, xctx);
478 &afw_s_collectionURIs, p, xctx);
481 &afw_s_collectionURIs, s, xctx);
486 &afw_s_description, p, xctx);
489 &afw_s_description, s, xctx);
494 &afw_s_descriptionPropertyName, p, xctx);
497 &afw_s_descriptionPropertyName, s, xctx);
502 &afw_s_label, p, xctx);
505 &afw_s_label, s, xctx);
510 &afw_s_objectIdPropertyName, p, xctx);
513 &afw_s_objectIdPropertyName, s, xctx);
518 &afw_s_objectType, object_type_id, xctx);
522 &afw_s_originURI, p, xctx);
525 &afw_s_originURI, s, xctx);
530 &afw_s_otherProperties, xctx);
532 impl_harvest_property_type(
533 result, &afw_s_otherProperties,
534 composite, obj, p, xctx);
539 &afw_s_propertyTypes, xctx);
540 if (property_types) {
544 result, &afw_s_propertyTypes, xctx);
546 &afw_s__AdaptivePropertyTypes_, xctx);
550 &afw_s_resolvedParentPaths, xctx);
553 &afw_s_parentPaths, value, xctx);
557 for (iterator = NULL;;) {
559 property_types, &iterator, &property_name, xctx);
561 if (!impl_is_inherited(property_types, property_name, xctx)) {
562 impl_harvest_property_type(
563 propertyTypes, property_name,
564 composite, obj, p, xctx);
571 &afw_s_referenceURI, p, xctx);
574 &afw_s_referenceURI, s, xctx);
583 impl_object_type_compile(
608 adaptor_id, object_type_id,
object,
622 &afw_s_custom, xctx);
625 custom, model, xctx);
633 &afw_s_onGetInitialObjectId, p, xctx);
640 NULL, model->shared, NULL, xctx);
645 &afw_s_mappedObjectType, xctx);
657 &afw_s_descriptionPropertyName, xctx);
665 &afw_s_objectIdPropertyName, xctx);
673 &afw_s_propertyTypes, xctx);
676 for (iterator = NULL;
678 properties, &iterator, &property_name, xctx));
688 for (iterator = NULL,
691 properties, &iterator, &property_name, xctx));
694 *pt = impl_compile_property_type(
695 ot, pt_object, pt_object->meta.
id, xctx);
701 &afw_s_onAddObject, p, xctx);
707 s, source_location, NULL, shared, p, xctx);
712 &afw_s_onDeleteObject, p, xctx);
718 s, source_location, NULL, shared, p, xctx);
723 &afw_s_onGetObject, p, xctx);
729 s, source_location, NULL, shared, p, xctx);
734 &afw_s_onModifyObject, p, xctx);
740 s, source_location, NULL, shared, p, xctx);
745 &afw_s_onReplaceObject, p, xctx);
751 source_location, NULL, shared, p, xctx);
756 &afw_s_onRetrieveObjects, p, xctx);
762 s, source_location, NULL, shared, p, xctx);
767 &afw_s_otherProperties, xctx);
770 impl_compile_property_type(
771 ot, pt_object, pt_object->meta.
id, xctx);
803 model_object, p, xctx);
807 model->model_object = object;
816 &afw_s_custom, xctx);
817 if (model->custom_variables) {
818 model->custom_variables = impl_compile_custom(
819 model->custom_variables, model, xctx);
824 model->model_object, &afw_s_objectTypes, xctx);
827 "Object model must have objectTypes property", xctx);
831 for (iterator = NULL;;) {
833 objectTypes, &iterator, &property_name, xctx);
834 if (!object_type)
break;
835 model_object_type = impl_object_type_compile(model,
836 adaptor_id, property_name, object_type, xctx);
837 apr_hash_set(model->model_object_types,
838 property_name->s, property_name->len, model_object_type);
AFW_DEFINE(const afw_object_t *)
Adaptive Framework Core Internal.
afw_value_create_anyURI(const afw_utf8_t *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for unmanaged data type anyURI value.
afw_data_type_anyURI
Data type struct for anyURI.
afw_list_of_anyURI_add(const afw_list_t *instance, const afw_utf8_t *value, afw_xctx_t *xctx)
Add value from list of anyURI.
afw_object_set_property_as_anyURI(const afw_object_t *object, const afw_utf8_t *property_name, const afw_utf8_t *internal, afw_xctx_t *xctx)
Set property function for data type anyURI values.
#define afw_object_old_get_property_as_boolean(object, property_name, found, xctx)
Get property function for data type boolean value.
afw_value_allocate_list(const afw_pool_t *p, afw_xctx_t *xctx)
Allocate function for unmanaged data type list value.
#define afw_object_old_get_property_as_object(object, property_name, xctx)
Get property function for data type object value.
#define afw_object_old_get_next_property_as_object(object, iterator, property_name, xctx)
Get next property function for data type object value.
afw_value_create_object(const afw_object_t *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for unmanaged data type object value.
afw_value_create_string(const afw_utf8_t *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for unmanaged data type string value.
#define afw_object_old_get_property_as_string(object, property_name, xctx)
Get property function for data type string value.
#define afw_object_old_get_next_property_as_string(object, iterator, property_name, xctx)
Get next property function for data type string value.
afw_object_set_property_as_string(const afw_object_t *object, const afw_utf8_t *property_name, const afw_utf8_t *internal, afw_xctx_t *xctx)
Set property function for data type string values.
afw_value_as_string(const afw_value_t *value, afw_xctx_t *xctx)
Typesafe cast of data type string.
#define AFW_UTF8_FMT_ARG(A_STRING)
Convenience Macro for use with AFW_UTF8_FMT to specify arg.
struct afw_iterator_s afw_iterator_t
struct afw_model_internal_s afw_model_t
#define AFW_UTF8_FMT
Format string specifier used for afw_utf8_t.
apr_size_t afw_size_t
size_t.
const afw_compile_shared_t * afw_compile_shared_create(const afw_pool_t *p, afw_xctx_t *xctx)
Created a struct for sharing resources by multiple compiles.
#define afw_compile_hybrid_source(string, source_location, parent, shared, p, xctx)
Compile hybrid.
const afw_data_type_t * afw_environment_get_data_type(const afw_utf8_t *type, afw_xctx_t *xctx)
Get the data_type associated with configuration entry type.
#define AFW_THROW_ERROR_FZ(code, xctx, format_z,...)
Macro used to set error and 0 rv in xctx and throw it.
#define AFW_THROW_ERROR_Z(code, message_z, xctx)
Macro used to set error and 0 rv in xctx and throw it.
afw_list_of_utf8_get_next(const afw_list_t *instance, const afw_iterator_t **iterator, afw_xctx_t *xctx)
Get next value from list whose data type cType is afw_utf8_t.
#define afw_list_of_create(data_type, p, xctx)
Create an list of a specific data type in memory.
afw_model_compile(const afw_utf8_t *adaptor_id, const afw_object_t *model_object, const afw_pool_t *p, afw_xctx_t *xctx)
Compile a model and add object types to associative array.
#define afw_object_get_property(instance, property_name, xctx)
Call method get_property of interface afw_object.
afw_object_options_composite_inheritedFrom_resolvedParentPaths
Object processing options - composite + inheritance related.
afw_object_view_create(const afw_object_t *instance, const afw_utf8_t *entity_path, const afw_object_options_t *options, const afw_pool_t *p, afw_xctx_t *xctx)
Create an object view of an object in specified pool.
afw_object_create_clone(const afw_object_t *object, const afw_pool_t *p, afw_xctx_t *xctx)
Clone an object to a specified pool.
afw_object_old_get_property_as_utf8(const afw_object_t *instance, const afw_utf8_t *property_name, const afw_pool_t *p, afw_xctx_t *xctx)
Get an object's property value as a string in specified pool.
#define afw_object_create_managed(p, xctx)
Create an empty entity object in its own pool.
#define afw_object_create(p, xctx)
Create an empty unmanaged object in memory.
afw_object_set_property(const afw_object_t *instance, const afw_utf8_t *property_name, const afw_value_t *value, afw_xctx_t *xctx)
Set the value of an object's property.
const afw_object_t * afw_object_create_embedded(const afw_object_t *embedding_object, const afw_utf8_t *property_name, afw_xctx_t *xctx)
Create an empty embedded object in a memory object.
#define afw_pool_malloc(instance, size, xctx)
Call method malloc of interface afw_pool.
#define afw_pool_get_apr_pool(instance)
Call method get_apr_pool of interface afw_pool.
#define afw_pool_calloc_type(instance, type, xctx)
Macro to allocate cleared memory to hold type in pool.
afw_utf8_printf(const afw_pool_t *p, afw_xctx_t *xctx, const afw_utf8_z_t *format,...)
Create a utf-8 string using a c format string in specified pool.
afw_boolean_t afw_utf8_starts_with(const afw_utf8_t *string, const afw_utf8_t *starts_with)
Check to see if a string starts with another string.
afw_value_false
Adaptive value false.
#define afw_value_for_boolean(variable)
Value for boolean variable.
#define AFW_VALUE_ASSERT_IS_DATA_TYPE(A_VALUE, A_DATA_TYPE, A_SCOPE)
Throw and error if A_VALUE is not evaluated data type A_DATA_TYPE.
Resources that can be shared by multiple compiles.
Struct for afw_model_object_type_t property_type_other member.
const afw_value_t * object_id_property_name_value
objectIdPropertyName value.
const afw_value_t * onGetObject
onGetObject or NULL.
const afw_utf8_t * object_type_id
Object type id.
const afw_model_property_type_t ** property_type
NULL terminated list of property types for this object type.
const afw_model_t * model
Model containing this object type.
const afw_value_t * mapped_object_type_id_value
mappedObjectType value.
const afw_value_t * description_property_name_value
descriptionPropertyName value.
const afw_object_t * object_type_object
Property type object.
const afw_value_t * object_type_path_value
Object type path value.
const afw_utf8_t * object_id_property_name
objectIdPropertyName.
const afw_utf8_t * object_type_path
Object type path.
const afw_value_t * onReplaceObject
onReplaceObject or NULL.
const afw_value_t * onGetInitialObjectId
onGetInitialObjectId or NULL.
const afw_value_t * onDeleteObject
onDeleteObject or NULL.
const afw_value_t * onAddObject
onAddObject or NULL.
const afw_value_t * object_type_object_value
Property type object value.
const afw_value_t * onModifyObject
onModifyObject or NULL.
const afw_value_t * onRetrieveObjects
onRetrieveObjects or NULL.
const afw_object_t * custom_variables
Custom variables.
const afw_model_property_type_t * property_type_other
Property type for other properties.
const afw_utf8_t * mapped_object_type_id
mapped object type.
const afw_utf8_t * description_property_name
descriptionPropertyName.
const afw_value_t * object_type_id_value
Object type id value.
const afw_value_t * onSetProperty
onSetProperty value or NULL if value from object used asis.
const afw_value_t * onGetProperty
onGetProperty value or NULL if value from object used asis.
afw_boolean_t allow_query
allowQuery.
afw_boolean_t allow_write
allowRead.
const afw_value_t * onGetInitialValue
initial value or NULL if value from object used asis.
const afw_value_t * default_value
defaultValue or NULL.
const afw_value_t * property_name_value
Property name as adaptive value.
const afw_value_t * property_type_path_value
Property type path value.
const afw_utf8_t * property_name
Property name or regular expression if other.
const afw_data_type_t * data_type
Data type or NULL if not restricted.
const afw_utf8_t * property_type_path
Property type path.
afw_boolean_t unique
unique.
const afw_utf8_t * mapped_property_name
Mapped property name.
const afw_object_t * custom_variables
constraint.
afw_boolean_t transitory
transitory.
const afw_object_t * property_type_object
Property type object.
const afw_value_t * mapped_property_name_value
Mapped property name as adaptive value.
const afw_value_t * property_type_object_value
Property type object value.
afw_boolean_t required
required.
Interface afw_object public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
struct for data type list values.
Interface afw_value public struct.
Interface afw_xctx public struct.