     # Converts property definition to JSON Schema entry.
     #
     # @param [Object] property raw definition of property
-    # @return [Object] JSON Schema definition
+    # @param [Object] ctx context for property
+    # @return [Object] property context JSON Schema definition
     #
-    processProperty: (property) -> property
+    processAttribute: (property, ctx={}) ->
+        # Add property to context and return context
+        utils.addAsObjectMember(ctx, 'properties', property.attribute.name, property.attribute)
+        ctx
 
     #
     # Converts relation definition to JSON Schema entry.
     #
     # @param [Object] relation raw definition of relation
-    # @return [Object] JSON Schema definition
+    # @param [Object] ctx context for relation
+    # @return [Object] relation context JSON Schema definition
     #
-    processRelation: (relation) -> relation
+    processRelation: (relation, ctx={}) ->
+        # Add relation to context and return context
+        utils.addAsObjectMember(ctx, 'relations', relation.attribute.name, relation)
+        ctx
 
     #
     # Converts link definition to JSON Schema entry.
     #
     # @param [Object] link raw definition of link
-    # @return [Object] JSON Schema definition
+    # @param [Object] ctx context for link
+    # @return [Object] link context JSON Schema definition
     #
-    processLink: (link) -> link
+    processLink: (link, ctx={}) ->
+        # Add link to context and return context
+        utils.addAsObjectMember(ctx, 'links', link.attribute.name, link)
+        ctx
 
 
 module.exports = Postprocessor

        index.key = index.key.map (field) =>
            # Save keys as properties if they specified in extended format
            if field.type?
                utils.addAsObjectMember(ctx, 'properties', field.name, @processProperty(field))
            # We need only attribute names here
            field.name


# @class Postprocessor
#
class Postprocessor
    @supportedRules = ['definition', 'enumeration', 'index', 'attribute', 'relation', 'link']

    #
    # @param [Object] parser
    #
