public static Uri getDefaultInstance(String defaultValue) { return new Uri(defaultValue); }
/** * Return a string configured in the given URI. * * @param uri An {@link Uri} instance. * @return A string configured in the given URI. * Note that {@code null} is returned if {@code uri} is * {@code null}. */ public static String getValue(Uri uri) { return (uri == null) ? null : uri.getValue(); }
private Uuid getQosEntryUuid(List<QosEntries> operQosEntries, Uri qosId) { if (operQosEntries != null && !operQosEntries.isEmpty()) { for (QosEntries qosEntry : operQosEntries) { if (qosEntry.getQosId().equals(qosId)) { return qosEntry.getQosUuid(); } } } return null; }
private String getQueueUuid(OvsdbQueueRef queueRef, OvsdbNodeAugmentation operNode) { QueuesKey queueKey = queueRef.getValue().firstKeyOf(Queues.class); if (operNode.getQueues() != null && !operNode.getQueues().isEmpty()) { for (Queues queue : operNode.getQueues()) { if (queue.getQueueId().equals(queueKey.getQueueId())) { return queue.getQueueUuid().getValue(); } } } return SouthboundConstants.QUEUE_NAMED_UUID_PREFIX + TransactUtils.bytesToHexString(queueKey.getQueueId().getValue().getBytes()); }
public static Uri getDefaultInstance(String defaultValue) { return new Uri(defaultValue); }
/** * Determine whether the given two URIs are identical or not. * * <p> * Note that this method compares only strings configured in the given * URIs. The type of classes are never compared. * * </p> * * @param u1 The first instance to be compared. * @param u2 The second instance to be compared. * @return {@code true} only if {@code vh1} and {@code vh2} are identical. */ public static boolean equalsUri(Uri u1, Uri u2) { if (u1 == null) { return (u2 == null); } else if (u2 == null) { return false; } return Objects.equals(u1.getValue(), u2.getValue()); }
private Uuid getQueueUuid(List<Queues> operQueues, Uri queueId) { if (operQueues != null && !operQueues.isEmpty()) { for (Queues queueEntry : operQueues) { if (queueEntry.getQueueId().equals(queueId)) { return queueEntry.getQueueUuid(); } } } return null; }
public static Uri getDefaultInstance(String defaultValue) { return new Uri(defaultValue); }
private void processOutputAction(OutputActionCase action, FlowTableLookUpResult result) { Uri nodeConnector = action.getOutputAction().getOutputNodeConnector(); if (nodeConnector.getValue().matches("\\d+")) { result.outputNodeConnectors.add(nodeConnector); } else if (nodeConnector.getValue().matches("CONTROLLER")) { result.sendToController = true; } }
private Uuid getAutoAttachUuid(List<Autoattach> currentAutoAttach, Uri autoattachId) { if (currentAutoAttach != null && !currentAutoAttach.isEmpty()) { for (final Autoattach autoAttach : currentAutoAttach) { if (autoAttach.getAutoattachId().equals(autoattachId)) { return autoAttach.getAutoattachUuid(); } } } return null; } }
public static Location getDefaultInstance(String defaultValue) { return defaultValue.equals("NETCONF") ? new Location(Location.Enumeration.NETCONF) : new Location(new Uri( defaultValue)); }
@XmlElement(name = "namespace") public String getNamespace() { return schema.getNamespace().getValue().toString(); }
private Uuid getQueueEntryUuid(List<Queues> operQueues, Uri queueId) { if (operQueues != null && !operQueues.isEmpty()) { for (Queues queueEntry : operQueues) { if (queueEntry.getQueueId().equals(queueId)) { return queueEntry.getQueueUuid(); } } } return null; } }
private Map<Uri, Manager> getUriManagerMap(Map<UUID,Manager> uuidManagerMap) { Map<Uri, Manager> uriManagerMap = new HashMap<>(); for (Map.Entry<UUID, Manager> uuidManagerMapEntry : uuidManagerMap.entrySet()) { uriManagerMap.put( new Uri(uuidManagerMapEntry.getValue().getTargetColumn().getData()), uuidManagerMapEntry.getValue()); } return uriManagerMap; } }
public char[] getValue() { if (_value == null) { if (_enumeration != null) { _value = _enumeration.toString().toCharArray(); } else if (_uri != null) { _value = _uri.getValue().toString().toCharArray(); } } return _value == null ? null : _value.clone(); }
private Uuid getQosEntryUuid(List<QosEntries> operQosEntries, Uri qosId) { if (operQosEntries != null && !operQosEntries.isEmpty()) { for (QosEntries qosEntry : operQosEntries) { if (qosEntry.getQosId().equals(qosId)) { return qosEntry.getQosUuid(); } } } return null; } }
/** * Create a MD-SAL transaction URI for the given flow entryu. * * @param vfent A {@link VtnFlowEntry} instance. * @param prefix Prefix of the URI. * @return An {@link Uri} instance. */ public static Uri createTxUri(VtnFlowEntry vfent, String prefix) { StringBuilder builder = new StringBuilder(prefix); BigInteger cookie = vfent.getCookie().getValue(); builder.append(Long.toHexString(cookie.longValue())). append('-').append(vfent.getOrder()); return new Uri(builder.toString()); }
@Override protected void setRestUriList(DataObject dataObject) { ServiceFunctionGroup obj = (ServiceFunctionGroup) dataObject; if (obj.getRestUri() != null) { String restUri = obj.getRestUri().getValue() + SFG_REST_URI + obj.getName(); this.restUriList = new ArrayList<>(); this.restUriList.add(restUri); LOG.info("SFG will be send to REST URI {}", restUri); } else { this.restUriList = null; } } }
private Uuid getAutoAttachUuid(List<Autoattach> currentAutoAttach, Uri autoAttachId) { if (currentAutoAttach != null && !currentAutoAttach.isEmpty()) { for (final Autoattach autoAttach : currentAutoAttach) { if (autoAttach.getAutoattachId().equals(autoAttachId)) { return autoAttach.getAutoattachUuid(); } } } return null; }