andy_bu
andy_bu

Reputation: 123

Self-defined id's and order structure in Fedora 4

I have a json-ld files with following structure:

{
  "@context": {
    "books_id":"http://schema.org/identifier",
    "comment":"http://schema.org/Comment",
    "date":"http://schema.org/Date",
    "responsibility":"http://www.loc.gov/standards/mods/modsrdf-primer.html#note",
    "spatial":"http://schema.org/spatial",
    "temporal":"http://schema.org/temporal",
    "edition":"http://schema.org/bookEdition",
    "url":"http://schema.org/url",
    "xsd": "http://www.w3.org/2001/XMLSchema#",
    "books":"http://schema.org/Book",
    "dc": "http://purl.org/dc/elements/1.1/",
    "series_titles":"http://schema.org/Series",
    "creator_transcription":"http://ndl.go.jp/dcndl/terms/creatorTranscription",
    "title_transcription":"http://ndl.go.jp/dcndl/terms/alternativeVolumeTitleTranscription",
    "physicalDescription":"http://www.loc.gov/standards/mods/modsrdf-primer.html#physicalDescription",
    "latitude": "http://schema.org/latitude",
    "longitude": "http://schema.org/longitude",
    "fedora": "info:fedora/fedora-system:def/model#",
     "ldp":"http://www.w3.org/ns/ldp#"

  },

  "books": [
    {
      "fedora:hasModel": "Book",
      "books_id": 201,
      "dc:title": "甕安縣志 21卷",
      "title_transcription": "weng an xian zhi 瓮安县志",
      "series_titles": "中國方志庫初集. 爱如生数字化技术研究中心, 北京",
      "dc:creator": "(民國)李退谷 (民國)朱勛 null",
      "creator_transcription": "li tui gu zhu xun null 李退谷 朱勋",
      "physical_description": "电子文献 electronic",
      "dc:issued": 1913,
      "date": 1913,
      "edition": "民國二年鉛印本",
      "temporal": "民國 (1911-1949)",
      "admin_level_1": "貴州",
      "admin_level_2": "黔南",
      "admin_type": "縣",
      "spatial": "甕安縣",
      "chgis": "hvd_122651",
      "latitude": 27.073069,
      "longitude": 107.482826,
      "dc:language": "chi",
      "comment": ""
    }
    ]
}

the same structure i have for pages. I try to use apache-camel to move data from file or from Activemq to Fedora 4. The transfer work fine, but there are some problems:

  1. I can't create my order structure in Fedora 4. All data saved under following order: ../fcrepo-webapp-4.7.4/rest/.well-known/genid
    I want to have a following structure:fcrepo/rest/collection/book/page. Book is a parent and page is a child. Book contains many pages.

  2. Fedora 4 creates his own url id's. I know that it is possible to define own id's from json-ld file. Example: enter image description here

  3. Create self defined hasParent and change already existing. The code routine looks following:

            from("file:data2")
                    .setHeader(Exchange.HTTP_METHOD, constant("POST"))
                    .setHeader(Exchange.CONTENT_TYPE, constant("application/ld+json"))
                    .to("fcrepo:localhost:8080/fcrepo-webapp-4.7.4/rest/test");
        }
    });
    
    context.start();
    Thread.sleep(10000);
    context.stop();
    

Upvotes: 1

Views: 49

Answers (0)

Related Questions