Skip to content

Commit

Permalink
Rename getMetadata() method to getMetadataFacility()
Browse files Browse the repository at this point in the history
  • Loading branch information
ppouchin committed Nov 27, 2024
1 parent edddd2a commit 200f0ed
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/main/java/fr/igred/omero/AnnotatableWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public List<TagAnnotationWrapper> getTags(Browser browser)
throws ServiceException, AccessException, ExecutionException {
List<Class<? extends AnnotationData>> types = singletonList(TagAnnotationData.class);

List<AnnotationData> annotations = call(browser.getMetadata(),
List<AnnotationData> annotations = call(browser.getMetadataFacility(),
m -> m.getAnnotations(browser.getCtx(),
data,
types,
Expand Down Expand Up @@ -284,7 +284,7 @@ public List<TagAnnotationWrapper> getTags(Browser browser)
public List<MapAnnotationWrapper> getMapAnnotations(Browser browser)
throws ServiceException, AccessException, ExecutionException {
List<Class<? extends AnnotationData>> types = singletonList(MapAnnotationData.class);
List<AnnotationData> annotations = call(browser.getMetadata(),
List<AnnotationData> annotations = call(browser.getMetadataFacility(),
m -> m.getAnnotations(browser.getCtx(),
data,
types,
Expand Down Expand Up @@ -381,7 +381,7 @@ private List<RatingAnnotationWrapper> getRatings(Browser browser, List<Long> use

List<Class<? extends AnnotationData>> types = singletonList(RatingAnnotationData.class);

List<AnnotationData> annotations = call(browser.getMetadata(),
List<AnnotationData> annotations = call(browser.getMetadataFacility(),
m -> m.getAnnotations(browser.getCtx(),
data,
types,
Expand Down Expand Up @@ -721,7 +721,7 @@ public List<FileAnnotationWrapper> getFileAnnotations(Browser browser)

List<Class<? extends AnnotationData>> types = singletonList(FileAnnotationData.class);

List<AnnotationData> annotations = call(browser.getMetadata(),
List<AnnotationData> annotations = call(browser.getMetadataFacility(),
m -> m.getAnnotations(browser.getCtx(),
data,
types,
Expand Down Expand Up @@ -835,7 +835,7 @@ protected void removeLink(Client client, String linkType, long childId)
*/
private List<AnnotationData> getAnnotationData(Browser browser)
throws AccessException, ServiceException, ExecutionException {
return call(browser.getMetadata(),
return call(browser.getMetadataFacility(),
m -> m.getAnnotations(browser.getCtx(), data),
"Cannot get annotations from " + this);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/igred/omero/client/Browser.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public interface Browser {
*
* @throws ExecutionException If the MetadataFacility can't be retrieved or instantiated.
*/
MetadataFacility getMetadata() throws ExecutionException;
MetadataFacility getMetadataFacility() throws ExecutionException;


/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/igred/omero/client/GatewayWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public IQueryPrx getQueryService()
* @throws ExecutionException If the MetadataFacility can't be retrieved or instantiated.
*/
@Override
public MetadataFacility getMetadata() throws ExecutionException {
public MetadataFacility getMetadataFacility() throws ExecutionException {
return gateway.getFacility(MetadataFacility.class);
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/fr/igred/omero/core/ImageWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ public ImagePlus toImagePlus(Client client, Bounds bounds)
public List<ChannelWrapper> getChannels(Browser browser)
throws ServiceException, AccessException, ExecutionException {
String error = "Cannot get the channel name for " + this;
List<ChannelData> channels = call(browser.getMetadata(),
List<ChannelData> channels = call(browser.getMetadataFacility(),
m -> m.getChannelData(browser.getCtx(),
getId()),
error);
Expand Down Expand Up @@ -956,7 +956,7 @@ public BufferedImage getThumbnail(Client client, int size)
public List<String> getOriginalPaths(Browser browser)
throws ExecutionException, AccessException, ServiceException {
String error = "Cannot get original paths for " + this;
return call(browser.getMetadata(),
return call(browser.getMetadataFacility(),
m -> m.getOriginalPaths(browser.getCtx(), data),
error);
}
Expand All @@ -976,7 +976,7 @@ public List<String> getOriginalPaths(Browser browser)
public List<String> getManagedRepositoriesPaths(Browser browser)
throws ExecutionException, AccessException, ServiceException {
String error = "Cannot get managed repositories paths for " + this;
return call(browser.getMetadata(),
return call(browser.getMetadataFacility(),
m -> m.getManagedRepositoriesPaths(browser.getCtx(), data),
error);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/igred/omero/core/PixelsWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private static int[] checkBounds(int[] bounds, int imageSize) {
*/
public void loadPlanesInfo(Browser browser)
throws ServiceException, AccessException, ExecutionException {
List<PlaneInfoData> planes = call(browser.getMetadata(),
List<PlaneInfoData> planes = call(browser.getMetadataFacility(),
m -> m.getPlaneInfos(browser.getCtx(),
data),
"Cannot retrieve planes info.");
Expand Down

0 comments on commit 200f0ed

Please sign in to comment.