original_docstring: Creates a navigation entry to add to the CSDL schema.
docstring: Creates a navigation entry to add to the CSDL schema.
docstring_tokens: Creates a navigation entry to add to the CSDL schema .
code: def create_navigation(property_name, schema_name="TBD", description=None, longDescription=None, collection=False, **kwargs):
      """Creates a navigation entry to add to the CSDL schema."""
      description = description if description else "A link to {}".format(property_name)
      longDescription = longDescription if longDescription else "This property shall be a link to a resource collection of type {}.".format(property_name)
  
      if collection:
          navegation_entry = etree.Element("NavigationProperty",\
              attrib={"Name": property_name, "Type": "Collection({}.{})".format(schema_name, schema_name), "Nullable": "false"})
      else:
          navegation_entry = etree.Element("NavigationProperty",\
              attrib={"Name": property_name, "Type": "{}.{}".format(schema_name, schema_name), "Nullable": "false"})
  
      etree.SubElement(navegation_entry, "Annotation", 
          attrib={"Term":"OData.Permissions", "EnumMember": "OData.Permission/Read"} )
      etree.SubElement(navegation_entry, "Annotation", attrib={"Term": "OData.Description", "String": description})
      etree.SubElement(navegation_entry, "Annotation", attrib={"Term": "OData.LongDescription", "String": longDescription})
      if collection:
          etree.SubElement(navegation_entry, "Annotation", {'Term':'OData.AutoExpandReferences'})
  
      return navegation_entry
code_tokens: def create_navigation ( property_name , schema_name = "TBD" , description = None , longDescription = None , collection = False , ** kwargs ) : description = description if description else "A link to {}" . format ( property_name ) longDescription = longDescription if longDescription else "This property shall be a link to a resource collection of type {}." . format ( property_name ) if collection : navegation_entry = etree . Element ( "NavigationProperty" , attrib = { "Name" : property_name , "Type" : "Collection({}.{})" . format ( schema_name , schema_name ) , "Nullable" : "false" } ) else : navegation_entry = etree . Element ( "NavigationProperty" , attrib = { "Name" : property_name , "Type" : "{}.{}" . format ( schema_name , schema_name ) , "Nullable" : "false" } ) etree . SubElement ( navegation_entry , "Annotation" , attrib = { "Term" : "OData.Permissions" , "EnumMember" : "OData.Permission/Read" } ) etree . SubElement ( navegation_entry , "Annotation" , attrib = { "Term" : "OData.Description" , "String" : description } ) etree . SubElement ( navegation_entry , "Annotation" , attrib = { "Term" : "OData.LongDescription" , "String" : longDescription } ) if collection : etree . SubElement ( navegation_entry , "Annotation" , { 'Term' : 'OData.AutoExpandReferences' } ) return navegation_entry
short_docstring: Creates a navigation entry to add to the CSDL schema.
short_docstring_tokens: Creates a navigation entry to add to the CSDL schema .
comment: """Creates a navigation entry to add to the CSDL schema."""