Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getObject() and getExternalInfo() load externalInfo #453

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Mar 13, 2025

See ome/omero-web#613.

This tweaks the base BlitzObjectWrapper._getQueryString() to include loading externalInfo.

It also adds BlitzObjectWrapper.getExternalInfo() to return the externalInfo and load it if necessary, e.g. for cases where self._obj is NOT the object loaded by getObject().

E.g. for image:

def __loadedHotSwap__(self):
        ctx = self._conn.SERVICE_OPTS.copy()
        ctx.setOmeroGroup(self.getDetails().group.id.val)
        self._obj = self._conn.getContainerService().getImages(
            self.OMERO_CLASS, (self._oid,), None, ctx)[0]

To test:

Set some values for ExternalInfo:
Using this branch:

$ omero obj ext-info-set Image:12 myLsid myEntityType

Since the JSON API uses _getQueryString() to build queries, and omero-marshal already handles externalInfo, you can check the details at E.g. /api/v0/m/images/ID/: (NB: deployed on idr-testing, e.g. /api/v0/m/images/15159664/).

"externalInfo": {
    "@type": "TBD#ExternalInfo",
    "@id": 8,
    "omero:details": {},
    "EntityId": 3,
    "EntityType": "com.glencoesoftware.ngff:multiscales",
    "Lsid": "test_dataset_extinfo"
}

@will-moore
Copy link
Member Author

@jburel I added support for:

$ omero obj ext-info-set Image:12 myLsid myEntityType

so we can set externalInfo on any object now.

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-python-superbuild-push#350. See the console output for more details.
Possible conflicts:

--conflicts

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-python-superbuild-push#351. See the console output for more details.
Possible conflicts:

--conflicts

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-python-superbuild-push#352. See the console output for more details.
Possible conflicts:

--conflicts

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-python-superbuild-push#353. See the console output for more details.
Possible conflicts:

--conflicts

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-python-superbuild-push#354. See the console output for more details.
Possible conflicts:

--conflicts

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-python-superbuild-push#355. See the console output for more details.
Possible conflicts:

--conflicts

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-python-superbuild-push#356. See the console output for more details.
Possible conflicts:

--conflicts

@snoopycrimecop
Copy link
Member

Conflicting PR. Removed from build OMERO-python-superbuild-push#357. See the console output for more details.
Possible conflicts:

--conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants