Registers a CURI link in the Curies instance.

@param curi the CURI
@throws IllegalArgumentException if the link-relation type of the link is not equal to 'curies'
969521
public void register(final Link curi) {
        if (!curi.getRel().equals("curies")) {
            throw new IllegalArgumentException("Link must be a CURI");
        }

        final boolean alreadyRegistered = curies
                .stream()
                .anyMatch(link -> link.getHref().equals(curi.getHref()));
        if (alreadyRegistered) {
            curies.removeIf(link -> link.getName().equals(curi.getName()));
            curies.replaceAll(link -> link.getName().equals(curi.getName()) ? curi : link);
        }
        curies.add(curi);
    }
789004
protected void getLinkForAnnotationType(Content link, LinkInfo linkInfo, Type type) {
		link.addContent(getTypeAnnotationLinks(linkInfo));
		linkInfo.type = type.asAnnotatedType().underlyingType();
		link.addContent(getLink(linkInfo));
	}
172297
private void handleSelfLink(EntityBuilder builder, String resolvedUri) {
        if (StringUtils.isBlank(resolvedUri)) {
            return;
        }
        Link link = LinkBuilder.newInstance().setRelationship(Link.RELATIONSHIP_SELF).setHref(resolvedUri).build();
        builder.addLink(link);
    }
784351
public void registerNamespace(String prefix, String uri)
   {
      try
      {
         namespaceRegistry.getPrefix(uri);
      }
      catch (NamespaceException e)
      {
         try
         {
            namespaceRegistry.registerNamespace(prefix, uri);
         }
         catch (NamespaceException e1)
         {
            throw new RuntimeException(e1);
         }
         catch (RepositoryException e1)
         {
            throw new RuntimeException(e1);
         }
      }
      catch (RepositoryException e)
      {
         throw new RuntimeException(e);
      }

   }
236937
@Override
	public Links findLinksWithRel(LinkRelation relation, String representation) {

		Assert.notNull(relation, "LinkRelation must not be null!");
		Assert.notNull(representation, "Representation must not be null!");

		return relation.isSameAs(IanaLinkRelations.SELF) //
				? addSelfLink(super.findLinksWithRel(relation, representation), representation) //
				: super.findLinksWithRel(relation, representation);
	}
507776
@SuppressWarnings("unchecked")
	private void register(final G gateway, final int attempt, final long timeoutMillis) {
		// eager check for canceling to avoid some unnecessary work
		if (canceled) {
			return;
		}

		try {
			log.info("Registration at {} attempt {} (timeout={}ms)", targetName, attempt, timeoutMillis);
			CompletableFuture<RegistrationResponse> registrationFuture = invokeRegistration(gateway, fencingToken, timeoutMillis);

			// if the registration was successful, let the TaskExecutor know
			CompletableFuture<Void> registrationAcceptFuture = registrationFuture.thenAcceptAsync(
				(RegistrationResponse result) -> {
					if (!isCanceled()) {
						if (result instanceof RegistrationResponse.Success) {
							// registration successful!
							S success = (S) result;
							completionFuture.complete(Tuple2.of(gateway, success));
						}
						else {
							// registration refused or unknown
							if (result instanceof RegistrationResponse.Decline) {
								RegistrationResponse.Decline decline = (RegistrationResponse.Decline) result;
								log.info("Registration at {} was declined: {}", targetName, decline.getReason());
							} else {
								log.error("Received unknown response to registration attempt: {}", result);
							}

							log.info("Pausing and re-attempting registration in {} ms", retryingRegistrationConfiguration.getRefusedDelayMillis());
							registerLater(gateway, 1, retryingRegistrationConfiguration.getInitialRegistrationTimeoutMillis(), retryingRegistrationConfiguration.getRefusedDelayMillis());
						}
					}
				},
				rpcService.getExecutor());

			// upon failure, retry
			registrationAcceptFuture.whenCompleteAsync(
				(Void v, Throwable failure) -> {
					if (failure != null && !isCanceled()) {
						if (ExceptionUtils.stripCompletionException(failure) instanceof TimeoutException) {
							// we simply have not received a response in time. maybe the timeout was
							// very low (initial fast registration attempts), maybe the target endpoint is
							// currently down.
							if (log.isDebugEnabled()) {
								log.debug("Registration at {} ({}) attempt {} timed out after {} ms",
									targetName, targetAddress, attempt, timeoutMillis);
							}

							long newTimeoutMillis = Math.min(2 * timeoutMillis, retryingRegistrationConfiguration.getMaxRegistrationTimeoutMillis());
							register(gateway, attempt + 1, newTimeoutMillis);
						}
						else {
							// a serious failure occurred. we still should not give up, but keep trying
							log.error("Registration at {} failed due to an error", targetName, failure);
							log.info("Pausing and re-attempting registration in {} ms", retryingRegistrationConfiguration.getErrorDelayMillis());

							registerLater(gateway, 1, retryingRegistrationConfiguration.getInitialRegistrationTimeoutMillis(), retryingRegistrationConfiguration.getErrorDelayMillis());
						}
					}
				},
				rpcService.getExecutor());
		}
		catch (Throwable t) {
			completionFuture.completeExceptionally(t);
			cancel();
		}
	}
1364092
public HalResource addLinks(String relation, Link... links) {
    return addResources(HalResourceType.LINKS, relation, true, links);
  }
1366093
public void register(FoxHttpInterceptorType interceptorType, FoxHttpInterceptor foxHttpInterceptor) throws FoxHttpException {
        FoxHttpInterceptorType.verifyInterceptor(interceptorType, foxHttpInterceptor);
        if (foxHttpInterceptors.containsKey(interceptorType)) {
            foxHttpInterceptors.get(interceptorType).add(foxHttpInterceptor);
        } else {
            foxHttpInterceptors.put(interceptorType, new ArrayList<>(Arrays.asList(foxHttpInterceptor)));
        }
    }
586630
public static URI toURI(String strURI){
		try {
			return new URI(strURI.trim());
		}
		catch (Exception e) {
			throw new IllegalArgumentException(e);
		}
	}
923770
public final void registerConfiguration(URL nextLocation) {
        
        BindingConfiguration configuration = BindingXmlLoader.load(nextLocation);

        for (Provider nextProvider : configuration.getProviders()) {
            
            try {
                registerConverterProvider(nextProvider.getProviderClass().newInstance());
            } catch (InstantiationException e) {
                throw new IllegalStateException("Cannot instantiate binding provider class: " + nextProvider.getProviderClass().getName());
            } catch (IllegalAccessException e) {
                throw new IllegalStateException("Cannot access binding provider class: " + nextProvider.getProviderClass().getName());
            }
        }
        
        registerBindingConfigurationEntries(configuration.getBindingEntries());
    }
874308
public function addLink( $uri, $relation, $type = NULL ){
		$this->links[]	= array(
			'uri'		=> $uri,
			'rel'		=> $relation,
			'type'		=> $type
		);
	}
1270359
public static void register() {
        try {
            Class<? extends List<Object>> listObjectClass;
            listObjectClass = (Class<List<Object>>) NumberedListConverter.class
                                .getMethod("getString", List.class).getParameterTypes()[0];
            NumberedListConverter converter = new NumberedListConverter();
            ConverterRegistry.addConverter(listObjectClass, converter);
            ConverterRegistry.addConverter(ArrayList.class, new NumberedArrayListConverter(converter));
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
1052445
@Override
	public Optional<Link> findLinkWithRel(LinkRelation relation, String representation) {

		Assert.notNull(relation, "LinkRelation must not be null!");
		Assert.notNull(representation, "Representation must not be null!");

		return relation.isSameAs(IanaLinkRelations.SELF) //
				? findSelfLink(representation) //
				: super.findLinkWithRel(relation, representation);
	}
676197
@Override
	public Links findLinksWithRel(LinkRelation relation, InputStream representation) {

		return relation.isSameAs(IanaLinkRelations.SELF) //
				? addSelfLink(super.findLinksWithRel(relation, representation), representation) //
				: super.findLinksWithRel(relation, representation);

	}
361305
def register(linter):
    '''
    
    '''
    linter.register_checker(ResourceLeakageChecker(linter))
    linter.register_checker(BlacklistedImportsChecker(linter))
    linter.register_checker(MovedTestCaseClassChecker(linter))
    linter.register_checker(BlacklistedLoaderModulesUsageChecker(linter))
    linter.register_checker(BlacklistedFunctionsChecker(linter))
396532
public void registerCallback(UOWCallback callback)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "registerCallback", callback);

        if (!_callbacks.contains(callback))
        {
            _callbacks.add(callback);

            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "Number of registered Callbacks: "+_callbacks.size());
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.exit(tc, "registerCallback");
    }
665319
public void register(InternalIndex index) {
        String[] components = index.getComponents();
        String attribute = components == null ? index.getName() : components[0];

        Record record = registry.get(attribute);
        if (record == null) {
            record = new Record();
            registry.put(attribute, record);
        }

        if (index.isOrdered()) {
            if (record.orderedWorseThan(index)) {
                record.ordered = components == null ? index : new FirstComponentDecorator(index);
            }
        } else {
            if (record.unorderedWorseThan(index)) {
                record.unordered = index;
            }
        }
    }