Hi Erik, Thanks for quick reply, With the error message, I see we can PATCH only json/XML.
So, to have the PDF linked to current document, I would like to do the following. 1. Load binary document with a URI ( ex: /documents/drivier-license.pdf) 2. Add this uri ( /documents/drivier-license.pdf) to existing document as a patch) When I did the same above, i.e adding a json as part of content {"uri":"/documents/drivier-license.pdf"} as a PATCH, it is coming as 204 unchanged. Please advice. Regards Shiv. On Mon, Aug 22, 2016 at 10:29 PM, <general-requ...@developer.marklogic.com> wrote: > Send General mailing list submissions to > general@developer.marklogic.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://developer.marklogic.com/mailman/listinfo/general > or, via email, send a message with subject or body 'help' to > general-requ...@developer.marklogic.com > > You can reach the person managing the list at > general-ow...@developer.marklogic.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of General digest..." > > > Today's Topics: > > 1. Re: Model Employee-Department relationship into marklogic, > Running Join queries. #CGO# (Ga?l YIMEN YIMGA) > 2. Re: Adding PDF to an existing json document using Patch > (Erik Hennum) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 22 Aug 2016 23:03:40 +0000 > From: Ga?l YIMEN YIMGA <yimeng...@gmail.com> > Subject: Re: [MarkLogic Dev General] Model Employee-Department > relationship into marklogic, Running Join queries. #CGO# > To: "Jain, Abhishek" <abhishek.b.j...@capgemini.com> > Cc: MarkLogic Developer Discussion <general@developer.marklogic.com> > Message-ID: > <CAJmsBn4_e4fHchYM3k6Lw7hvpHzrtQd5U7JuY7 > k2wuacw39...@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello Abhi, > > You definitely need a web application server like Tomcat, it's the one that > I used. > > You could use maven to build the project as a WAR and then deploy that WAR > file in Tomcat. Then the project works as a web service, so You can test it > using a tool like POSTMAN or FIDDLER or simply a command Line tool like > CURL. > > Regards > Gael > On Mon, Aug 22, 2016 at 7:14 AM Jain, Abhishek < > abhishek.b.j...@capgemini.com> wrote: > > > Hi Gael, > > > > > > > > Thanks, I found it so useful but I am new to JAVA, I tried my best to > > install it. however- > > > > > > > > 1. I set up the code through eclipse MVN build fails (MVN clean > > looks good) , do we need any app server ? > > > > 2. Can you please send me quick steps to use it *OR* add some > > description to GitHub repository? > > > > > > > > A few details will help me kick start my project. > > > > > > > > Thanks and Regards, > > > > [image: Email_CBE.gif]Abhishek Jain > > > > Associate Consultant > > > > Capgemini India | Hyderabad > > > > *People matter, results count.* > > > > > > > > *From:* Jain, Abhishek > > *Sent:* Thursday, August 18, 2016 12:19 PM > > *To:* 'Ga?l YIMEN YIMGA' > > *Cc:* MarkLogic Developer Discussion > > *Subject:* RE: [MarkLogic Dev General] Model Employee-Department > > relationship into marklogic, Running Join queries. #CGO# > > > > > > > > Hi Gael, > > > > > > > > Thanks for a quick response, It looks like a solution. I will come up > with > > some queries surely. > > > > > > > > Thanks and Regards, > > > > [image: Email_CBE.gif]Abhishek Jain > > > > Associate Consultant > > > > Capgemini India | Hyderabad > > > > Mob: +91-9030744998 Ext:4028950 > > > > *People matter, results count.* > > > > > > > > *From:* Ga?l YIMEN YIMGA [mailto:yimeng...@gmail.com < > yimeng...@gmail.com>] > > > > > > *Sent:* Wednesday, August 17, 2016 10:43 PM > > *To:* Jain, Abhishek > > > > *Cc:* MarkLogic Developer Discussion > > > > > > *Subject:* Re: [MarkLogic Dev General] Model Employee-Department > > relationship into marklogic, Running Join queries. #CGO# > > > > > > > > Hello Jain, > > > > I had developped a simple application using a simple model > > Employee-Department relationship using Java API of MarkLogic. To give > some > > answers to your reply, Yes sure you could need triples to achieve this > all > > depends on how you need to store your data and how to query them. There > is > > two ways to store and handle triples in Marklogic : UNMANAGED TRIPLES and > > MANAGED TRIPLE, we can discuss much if you want. > > > > Follow the link to see how I developped that small application : > > https://github.com/yimengael/marklogic-dataframework > > > > Gael > > > > > > Ga?l. > > > > -- > > > > > > > > On Wed, Aug 17, 2016 at 1:56 AM, Jain, Abhishek < > > abhishek.b.j...@capgemini.com> wrote: > > > > Hi Forks, > > > > > > > > I am a newbie to marklogic, I just want to migrate all my RDBMS data into > > marklogic. > > > > If anyone can just share with me the idea how to model simple > > Employee-Department > > > > Relationship in Marklogic and run join query . Do we need triples to > > achieve this ? If yes a simple example will do. > > > > Thanks in advance. > > > > > > > > Thanks and Regards, > > > > [image: Email_CBE.gif]Abhishek Jain > > > > Associate Consultant > > > > *People matter, results count.* > > > > > > > > This message contains information that may be privileged or confidential > > and is the property of the Capgemini Group. It is intended only for the > > person to whom it is addressed. If you are not the intended recipient, > you > > are not authorized to read, print, retain, copy, disseminate, distribute, > > or use this message or any part thereof. If you receive this message in > > error, please notify the sender immediately and delete all copies of this > > message. > > > > > > _______________________________________________ > > General mailing list > > General@developer.marklogic.com > > Manage your subscription at: > > http://developer.marklogic.com/mailman/listinfo/general > > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://developer.marklogic.com/pipermail/general/ > attachments/20160822/e09a157c/attachment-0001.html > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: image002.gif > Type: image/gif > Size: 1616 bytes > Desc: not available > Url : http://developer.marklogic.com/pipermail/general/ > attachments/20160822/e09a157c/attachment-0002.gif > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: image002.gif > Type: image/gif > Size: 1616 bytes > Desc: not available > Url : http://developer.marklogic.com/pipermail/general/ > attachments/20160822/e09a157c/attachment-0003.gif > > ------------------------------ > > Message: 2 > Date: Tue, 23 Aug 2016 02:29:33 +0000 > From: Erik Hennum <erik.hen...@marklogic.com> > Subject: Re: [MarkLogic Dev General] Adding PDF to an existing json > document using Patch > To: MarkLogic Developer Discussion <general@developer.marklogic.com> > Message-ID: > <DFDF2FD50BF5AA42ADAF93FF2E3CA1850BD08C9D@EXCHG10-BE01. > marklogic.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, Shiv: > > Sorry, but I don't understand the question. > > You cannot store a PDF document and JSON document in a single document. > > A PDF document is a binary. A JSON document is a structured tree. > > You cannot patch a binary document. It is a black box without addressable > structure. > > What are the uris for the associated PDF and JSON documents? How are they > ingested. > > > Erik Hennum > > > ________________________________ > From: general-boun...@developer.marklogic.com [general-bounces@developer. > marklogic.com] on behalf of Shiv Shankar [shiv.shivshan...@gmail.com] > Sent: Monday, August 22, 2016 11:01 AM > To: general@developer.marklogic.com > Subject: [MarkLogic Dev General] Adding PDF to an existing json document > using Patch > > Hi Erik Hennum > > If I go with PUT, it is replacing the entire document,which is not > acceptable. > > How to add json document+pdf in one document ? > > I used below approach > 1. Added a PDF as a separate document and tried adding that uri as part of > PATCH to referring document, but getting message 204 > > curl --basic --user user:pwd -X POST -d@./patch.json \ > -i -H "Content-type: application/json" \ > -H "X-HTTP-Method-Override: PATCH" \ > 'http://localbox:9004/LATEST/documents?uri=/test/LW88899' > > and patch.json is > > {"pathlang": "jsonpath", > > "patch": [ > > { > > "insert": { > > "context": "$.parent.childe", > > "position": "last-child", > > "content": { > > "image": "/example/scdhhs_fm_300.pdf" > > } > > } > > } > > ] > > } > > Message: > Response: > HTTP/1.1 204 Unchanged > Server: MarkLogic > Content-Length: 0 > Connection: Keep-Alive > Keep-Alive: timeout=5 > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://developer.marklogic.com/pipermail/general/ > attachments/20160823/914da743/attachment.html > > ------------------------------ > > _______________________________________________ > General mailing list > General@developer.marklogic.com > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > > > End of General Digest, Vol 146, Issue 46 > **************************************** >
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general