Adds a reference.

@param referenceSource the source of the reference
@param referenceName the referenceName of the reference
@param referenceUrl the url of the reference
540899
public void addReference(String referenceSource, String referenceName, String referenceUrl) {
        final Reference ref = new Reference();
        ref.setSource(referenceSource);
        ref.setName(referenceName);
        ref.setUrl(referenceUrl);
        this.references.add(ref);
    }
503948
def addReferenceSet(self):
        
        self._openRepo()
        name = self._args.name
        filePath = self._getFilePath(self._args.filePath,
                                     self._args.relativePath)
        if name is None:
            name = getNameFromPath(self._args.filePath)
        referenceSet = references.HtslibReferenceSet(name)
        referenceSet.populateFromFile(filePath)
        referenceSet.setDescription(self._args.description)
        if self._args.species is not None:
            referenceSet.setSpeciesFromJson(self._args.species)
        referenceSet.setIsDerived(self._args.isDerived)
        referenceSet.setAssemblyId(self._args.assemblyId)
        referenceSet.setAttributes(json.loads(self._args.attributes))
        sourceAccessions = []
        if self._args.sourceAccessions is not None:
            sourceAccessions = self._args.sourceAccessions.split(",")
        referenceSet.setSourceAccessions(sourceAccessions)
        referenceSet.setSourceUri(self._args.sourceUri)
        self._updateRepo(self._repo.insertReferenceSet, referenceSet)
268327
public synchronized void addDeferredReferenceData(DeferredReferenceData refData) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "addDeferredReferenceData", "this=" + this, refData);
        }

        if (deferredReferenceDatas == null) {
            deferredReferenceDatas = new LinkedHashMap<DeferredReferenceData, Boolean>();
            if (parent != null && deferredReferenceDataEnabled) {
                parent.addDeferredReferenceData(this);
            }
        }
        deferredReferenceDatas.put(refData, null);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "addDeferredReferenceData");
        }
    }
6636
@Reference(name = REFERENCE_ADMIN_OBJECT_SERVICES,
               service = AdminObjectService.class,
               policy = ReferencePolicy.DYNAMIC,
               cardinality = ReferenceCardinality.MULTIPLE)
    protected synchronized void addAdminObjectService(ServiceReference<AdminObjectService> reference) {
        String id = (String) reference.getProperty(ADMIN_OBJECT_CFG_ID);
        if (id != null) {
            String jndiName = (String) reference.getProperty(ADMIN_OBJECT_CFG_JNDI_NAME);

            addAdminObjectService(reference, id, false);
            if (jndiName != null && !jndiName.equals(id)) {
                addAdminObjectService(reference, jndiName, true);
            }
        }
    }
246562
public SourceUnit addSource(URL url) {
        return addSource(new SourceUnit(url, configuration, classLoader, getErrorCollector()));
    }
129558
@Override
    void findReferencedClassNames(final Set<String> referencedClassNames) {
        if (value != null) {
            value.findReferencedClassNames(referencedClassNames);
        }
    }
24733
@SuppressWarnings("unchecked")
  public T getReferenceTargetElement(ModelElementInstance referenceSourceElement) {
    String identifier = getReferenceIdentifier(referenceSourceElement);
    ModelElementInstance referenceTargetElement = referenceSourceElement.getModelInstance().getModelElementById(identifier);
    if (referenceTargetElement != null) {
      try {
        return (T) referenceTargetElement;

      } catch(ClassCastException e) {
        throw new ModelReferenceException("Element " + referenceSourceElement + " references element " + referenceTargetElement + " of wrong type. "
          + "Expecting " + referenceTargetAttribute.getOwningElementType() + " got " + referenceTargetElement.getElementType());
      }
    }
    else {
      return null;
    }
  }
1308124
public boolean addReference(ServiceReference<T> reference) {
        if (reference == null)
            return false;

        ConcurrentServiceReferenceElement<T> element = new ConcurrentServiceReferenceElement<T>(referenceName, reference);

        synchronized (elementMap) {
            ConcurrentServiceReferenceElement<T> oldElement = elementMap.put(reference, element);
            if (oldElement != null) {
                if (!element.getRanking().equals(oldElement.getRanking())) {
                    elementSetUnsorted = true;
                }
                return true;
            }

            elementSet.add(element);
        }
        return false;
    }
1245763
public void createTags(Reference reference, Collection<String> tags) {
		getResourceFactory()
				.getApiResource("/tag/" + reference.toURLFragment())
				.entity(tags, MediaType.APPLICATION_JSON_TYPE).post();
	}
1138291
def add_source(self, url, **kwargs):
        
        self['sources'].append(dict(url=url, **kwargs))
796990
public static void addSource(SourceBuilder code, AnnotationMirror annotation) {
    new ValueSourceAdder(code).visitAnnotation(annotation, null);
  }
861673
public void addReferenceListener(ReferenceListener listener) {
		if (this.listeners == null) {
			this.listeners = new LinkedList<>();
		}
		final List<ReferenceListener> list = this.listeners;
		synchronized (list) {
			list.add(listener);
		}
	}
837785
protected void addURL(final URL url) {
    final URL[] newUrls = new URL[this.urls.length + 1];
    System.arraycopy(url, 0, newUrls, 0, this.urls.length);
    newUrls[this.urls.length] = url;
    this.urls = newUrls;
  }
1345996
@Nonnull
    public BugInstance addUnknownSourceLine(String className, String sourceFile) {
        SourceLineAnnotation sourceLineAnnotation = SourceLineAnnotation.createUnknown(className, sourceFile);
        if (sourceLineAnnotation != null) {
            add(sourceLineAnnotation);
        }
        return this;
    }
1144994
public void addLinkRef(final String key, final LinkRef linkRef)
    {
        this.linkRefs.put(key.toLowerCase(), linkRef);
    }
775534
public void add(Object source) {
		if(source instanceof InputStream) {
			add((InputStream)source);
		} else if(source instanceof URL) {
			add((URL)source);
		} else if(source instanceof String) {
			add((String)source);
		} else {
			throw new JclException("Unknown Resource type");
		}

	}
619693
public Aliases add(String alias,String reference){
		if (aliases.get(alias) == null){
			aliases.put(alias,reference);
		} else {
			throw new IllegalArgumentException("Alias '" + alias + "' already exists");
		}

		return this;
	}