/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} * @throws org.openbase.jul.exception.NotAvailableException {@inheritDoc} */ @Override public List<UnitConfig> getLocationConfigs() throws CouldNotPerformException, NotAvailableException { validateData(); return locationUnitConfigRemoteRegistry.getMessages(); }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public Boolean containsLocationConfig(final UnitConfig locationConfig) throws CouldNotPerformException { validateData(); return locationUnitConfigRemoteRegistry.contains(locationConfig); }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public Boolean containsConnectionConfig(UnitConfig connectionConfig) throws CouldNotPerformException { validateData(); return connectionUnitConfigRemoteRegistry.contains(connectionConfig); }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public Boolean containsLocationConfigById(final String locationId) throws CouldNotPerformException { validateData(); return locationUnitConfigRemoteRegistry.contains(locationId); }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public UnitConfig getConnectionConfigById(String connectionId) throws CouldNotPerformException { validateData(); return connectionUnitConfigRemoteRegistry.getMessage(connectionId); }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public UnitConfig getLocationConfigById(final String locationId) throws CouldNotPerformException { validateData(); return locationUnitConfigRemoteRegistry.getMessage(locationId); }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public Boolean containsConnectionConfigById(String connectionId) throws CouldNotPerformException { validateData(); return connectionUnitConfigRemoteRegistry.contains(connectionId); }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} * @throws org.openbase.jul.exception.NotAvailableException {@inheritDoc} */ @Override public List<UnitConfig> getConnectionConfigs() throws CouldNotPerformException { validateData(); List<UnitConfig> messages = connectionUnitConfigRemoteRegistry.getMessages(); return messages; }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public List<UnitConfig> getConnectionConfigsByLabel(String connectionLabel) throws CouldNotPerformException { validateData(); return connectionUnitConfigRemoteRegistry.getMessages().stream() .filter(m -> m.getLabel().equals(connectionLabel)) .collect(Collectors.toCollection(ArrayList::new)); }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public List<UnitConfig> getLocationConfigsByLabel(final String locationLabel) throws CouldNotPerformException { validateData(); return locationUnitConfigRemoteRegistry.getMessages().stream() .filter(m -> m.getLabel().equalsIgnoreCase(locationLabel)) .collect(Collectors.toCollection(ArrayList::new)); }
/** * {@inheritDoc} * * @param pointingRay3DFloat {@inheritDoc} * @return {@inheritDoc} * @throws CouldNotPerformException {@inheritDoc} */ @Override public Future<UnitProbabilityCollection> computeUnitIntersection(PointingRay3DFloatType.PointingRay3DFloat pointingRay3DFloat) throws CouldNotPerformException { try { validateData(); return RPCHelper.callRemoteMethod(pointingRay3DFloat, this, UnitProbabilityCollection.class); } catch (CouldNotPerformException ex) { throw new CouldNotPerformException("Could not compute unit intersection!", ex); } }
/** * {@inheritDoc} * * @param pointingRay3DFloatCollection {@inheritDoc} * @return {@inheritDoc} * @throws CouldNotPerformException {@inheritDoc} */ @Override public Future<UnitProbabilityCollection> computeUnitIntersection(PointingRay3DFloatCollection pointingRay3DFloatCollection) throws CouldNotPerformException { try { validateData(); return RPCHelper.callRemoteMethod(pointingRay3DFloatCollection, this, UnitProbabilityCollection.class); } catch (CouldNotPerformException ex) { throw new CouldNotPerformException("Could not compute unit intersection!", ex); } }
/** * {@inheritDoc} * * @return {@inheritDoc} * @throws CouldNotPerformException {@inheritDoc} */ @Override public Boolean isConnectionConfigRegistryConsistent() throws CouldNotPerformException { try { validateData(); return getData().getConnectionUnitConfigRegistryConsistent(); } catch (CouldNotPerformException ex) { throw new CouldNotPerformException("Could not check consistency!", ex); } }
/** * {@inheritDoc} * * @return {@inheritDoc} * @throws CouldNotPerformException {@inheritDoc} */ @Override public Boolean isLocationConfigRegistryConsistent() throws CouldNotPerformException { try { validateData(); return getData().getLocationUnitConfigRegistryConsistent(); } catch (CouldNotPerformException ex) { throw new CouldNotPerformException("Could not check consistency!", ex); } }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} * @throws org.openbase.jul.exception.NotAvailableException {@inheritDoc} */ @Override public UnitConfig getRootLocationConfig() throws CouldNotPerformException, NotAvailableException { validateData(); for (UnitConfig locationConfig : locationUnitConfigRemoteRegistry.getMessages()) { if (locationConfig.getLocationConfig().hasRoot() && locationConfig.getLocationConfig().getRoot()) { return locationConfig; } } throw new NotAvailableException("rootlocation"); }
validateData(); List<UnitConfig> result = new ArrayList<>();
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public Boolean isLocationConfigRegistryReadOnly() throws CouldNotPerformException { validateData(); try { if (JPService.getProperty(JPReadOnly.class).getValue() || !isConnected()) { return true; } } catch (JPServiceException ex) { ExceptionPrinter.printHistory(new CouldNotPerformException("Could not access java property!", ex), logger); } return getData().getLocationUnitConfigRegistryReadOnly(); }
/** * {@inheritDoc} * * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public Boolean isConnectionConfigRegistryReadOnly() throws CouldNotPerformException { validateData(); try { if (JPService.getProperty(JPReadOnly.class).getValue() || !isConnected()) { return true; } } catch (JPServiceException ex) { ExceptionPrinter.printHistory(new CouldNotPerformException("Could not access java property!", ex), logger); } return getData().getConnectionUnitConfigRegistryReadOnly(); }