public List<String> getURIs(String type) { URI uri; try { uri = new URI(type); } catch (URISyntaxException exception) { throw new IllegalStateException("Invalid URI: " + type, exception); } return getURIs(uri); }
public List<String> getURIs(String type) { URI uri; try { uri = new URI(type); } catch (URISyntaxException exception) { throw new IllegalStateException("Invalid URI: " + type, exception); } return getURIs(uri); }
public List<String> getURIs(URI type) { List<String> uris = new ArrayList<>(); List<String> qudtURIs = UnitFactory.getInstance().getURIs(type); for (String qudtString : qudtURIs) { String uoURI = qudt2uo.get(qudtString); if (uoURI != null) { uris.add(uoURI); } } return uris; } }
public List<String> getURIs(URI type) { List<String> uris = new ArrayList<>(); List<String> qudtURIs = UnitFactory.getInstance().getURIs(type); for (String qudtString : qudtURIs) { String uoURI = qudt2uo.get(qudtString); if (uoURI != null) { uris.add(uoURI); } } return uris; } }
private void collect() { for(String newUri : unitTypeClasses) { try { Unit unitType = UnitFactory.getInstance().getUnit(namespace +newUri); if (unitType != null) availableUnitTypes.add(unitType); List<String> uris = UnitFactory.getInstance().getURIs(namespace +newUri); for(String uri : uris) { Unit unit = UnitFactory.getInstance().getUnit(uri); if (unit != null) availableUnits.add(unit); } } catch (Exception e) { LOG.warn("No entry found"); } } }
private void collect() { for(String newUri : unitTypeClasses) { try { Unit unitType = UnitFactory.getInstance().getUnit(namespace +newUri); if (unitType != null) availableUnitTypes.add(unitType); List<String> uris = UnitFactory.getInstance().getURIs(namespace +newUri); for(String uri : uris) { Unit unit = UnitFactory.getInstance().getUnit(uri); if (unit != null) availableUnits.add(unit); } } catch (Exception e) { LOG.warn("No entry found"); } } }