code: private function documentClassProperties(\ML\HydraBundle\Mapping\ClassMetadata $class)
      {
          $result = array();
          $propertyDomain = $this->getTypeReferenceIri($class->getName());
  
          foreach ($class->getProperties() as $property) {
              if (0 === strncmp('@', $property->getExposeAs(), 1)) {
                  continue;  // ignore properties that are mapped to keywords
              }
  
              $result[] = array(
                  'property' => ($property->isExternalReference())
                      ? $property->getIri()
                      : array(
                          '@id' => 'vocab:' . $property->getIri(),
                          '@type' => ($property->getRoute())
                              ? 'hydra:Link'
                              : 'rdf:Property',
                          'label' => $property->getTitle(),
                          'description' => $property->getDescription(),
                          'domain' => $propertyDomain,
                          'range' => $this->getTypeReferenceIri($property->getType()),
                          'supportedOperation' => $this->documentOperations($property->getOperations())
                      ),
                  'hydra:title' => $property->getTitle(),
                  'hydra:description' => $property->getDescription(),
                  'required' => $property->getRequired(),
                  'readonly' => $property->isReadOnly(),
                  'writeonly' => $property->isWriteOnly()
              );
          }
  
          return $result;
      }
docs: Documents the properties of the passed ClassMetadata object
  
  @param ML\HydraBundle\Mapping\ClassMetadata $class The class metadata
  
  @return array The JSON-LD serialization of the class' properties.