code: public void addProperty(final FedoraResource resource,
                              final org.apache.jena.rdf.model.Property predicate,
                              final RDFNode value,
                              final Map<String, String> namespaces,
                              final boolean allowRelaxedProperties) throws RepositoryException {
  
          final Node node = getJcrNode(resource);
  
          if ((!allowRelaxedProperties && isManagedPredicate.test(predicate)) || jcrProperties.contains(predicate)) {
  
              throw new ServerManagedPropertyException("Could not persist triple containing predicate "
                      + predicate.toString()
                      + " to node "
                      + node.getPath());
          }
  
          String propertyName =
                  getPropertyNameFromPredicate(node, predicate, namespaces);
  
          // In earlier versions of Fedora the following JCR properties were
          // used for properties.  When the behavior changed such that they could
          // be set explicitly in some cases, we changed the underlying representation
          // such that the "fedora"-namespaced property could be set, and when present
          // would be presented instead of the underlying JCR-managed property.
          if (propertyName.equals(JCR_LASTMODIFIEDBY)) {
              propertyName = FEDORA_LASTMODIFIEDBY;
          } else if (propertyName.equals(JCR_LASTMODIFIED)) {
              propertyName = FEDORA_LASTMODIFIED;
          } else if (propertyName.equals(JCR_CREATEDBY)) {
              propertyName = FEDORA_CREATEDBY;
          } else if (propertyName.equals(JCR_CREATED)) {
              propertyName = FEDORA_CREATED;
          }
  
          if (value.isURIResource()
                  && idTranslator.inDomain(value.asResource())
                  && !isReferenceProperty(node, propertyName)) {
              nodePropertiesTools.addReferencePlaceholders(idTranslator, node, propertyName, value.asResource());
          } else {
              final Value v = createValue(node, value, propertyName);
              nodePropertiesTools.appendOrReplaceNodeProperty(node, propertyName, v);
          }
      }
docs: Add property to a node
  @param resource the fedora resource
  @param predicate the predicate
  @param value the value
  @param namespaces the namespace
  @param allowRelaxedProperties if true, relaxed server managed properties are allowed
  @throws RepositoryException if repository exception occurred