We're Hiring!

Querying the external XML file (written by OMERO.editor)

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Re: Querying the external XML file (written by OMERO.editor)

Postby jmoore » Tue Feb 15, 2011 6:35 am

BK,

from that line of code it would like like only exParser could possibly be null. How are you setting it?

~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Querying the external XML file (written by OMERO.editor)

Postby bhcho » Tue Feb 15, 2011 4:15 pm

Hi Josh and everyone,

I realized I forgot to initialize the "exParser" before I use it.
And now, I successfully uploaded my custom bridge and also got successful search query results.

Thank you sooooooo much!

for guys after me who want to do similar things, I attached my java source code.
this code is
- searching attached experiment XML file
- parsing the hierarchy of the XML file
- extracting the keys and values like Key: "A.B.C1", Values: "Glass"
- update Lucene Index

So, later you can query by omero shell like
Code: Select all
import omero
host = "xxx"
port = 4064
user = "yyy"
password = "zzz"

client = omero.client(host, port)
session = client.createSession(user, password)

search = client.sf.createSearchService()
search.onlyType("Image")
search.byFullText("A.B.C1:Glas*")

ids = [x.id.val for x in search.results()]


BK
Attachments
bridges.tar
(23.5 KiB) Downloaded 183 times
Last edited by bhcho on Tue Feb 15, 2011 4:24 pm, edited 1 time in total.
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: Querying the external XML file (written by OMERO.editor)

Postby jmoore » Tue Feb 15, 2011 4:19 pm

You're very welcome, BK. Great to hear!

Cheers,
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Previous

Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 0 guests