default to accessScheme=private and publishScheme=private
Bugfix: EDOZWO-387 - LDAP connection is closed properly
Implements POST /resource/:namespace
- solves EDOZWO-391
- !!! ATTENTION - POST /resource/:pid is not longer supported,
please use PUT /resource/:pid instead !!!!
- implementation details are identical to PUT /resource/:pid.
In opposite to PUT /resource a new pid in the given namespace
will be created. content-type must be application/json. A minimal
curl call must involve at least a type definition in the body.

Request:

curl -XPOST edoweb-admin:admin@api.localhost/resource/edoweb \
 -d '{"type":"monograph"}' \
-H"content-type:application/json" \
-i

Response:

HTTP/1.1 201 Created
Date: Thu, 09 Oct 2014 09:14:41 GMT
Server: Apache/2.4.7 (Ubuntu)
Location: http://api.localhost/resource/edoweb:5456706
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization, X-Auth-Token
Access-Control-Allow-Methods: POST, GET, PUT, DELETE
Access-Control-Allow-Credentials: true
Content-Type: application/json; charset=utf-8
Access-Control-Max-Age: 3600
Content-Length: 952

{
  "@graph" : [ {
    "@id" : "edoweb:5456706",
    "http://hbz-nrw.de/regal#accessScheme" : [ {
      "@value" : "private"
    } ],
    "contentType" : [ {
      "@value" : "monograph"
    } ],
    "http://hbz-nrw.de/regal#publishScheme" : [ {
      "@value" : "private"
    } ],
    "isDescribedBy" : [ {
      "@value" : "edoweb:5456706.rdf"
    } ],
    "similarTo" : [ [ {
      "@value" : "http://klio.hbz-nrw.de:1801/webclient/MetadataManager?pid=5456706"
    } ], [ {
      "@value" : "http://localhost:8080/fedora/objects/edoweb:5456706"
    } ] ]
  }, {
    "@id" : "edoweb:5456706.rdf",
    "created" : {
      "@type" : "xsd:dateTime",
      "@value" : "2014-10-09T11:14:48.511+02:00"
    },
    "modified" : {
      "@type" : "xsd:dateTime",
      "@value" : "2014-10-09T11:14:48.992+02:00"
    },
    "describes" : [ {
      "@value" : "edoweb:5456706"
    } ]
  } ],
  "@context" : "http://localhost:9000/public/edoweb-resources.json"