Use this API to add location resources.
971333
public static base_responses add(nitro_service client, location resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			location addresources[] = new location[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new location();
				addresources[i].ipfrom = resources[i].ipfrom;
				addresources[i].ipto = resources[i].ipto;
				addresources[i].preferredlocation = resources[i].preferredlocation;
				addresources[i].longitude = resources[i].longitude;
				addresources[i].latitude = resources[i].latitude;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
271355
public void addOrgUnitResource(String resourceName) {

        if ((m_throwable != null) || (m_orgUnitName == null)) {
            return;
        }
        if (m_orgUnitResources == null) {
            m_orgUnitResources = new HashMap<String, List<String>>();
        }
        List<String> resources = m_orgUnitResources.get(m_orgUnitName);
        if (resources == null) {
            resources = new ArrayList<String>();
            m_orgUnitResources.put(m_orgUnitName, resources);
        }
        resources.add(resourceName);
    }
168492
def add(self, resource, replace=False):
        """"""
        uri = resource.uri
        if (uri in self and not replace):
            raise ResourceListDupeError(
                "Attempt to add resource already in resource_list")
        self[uri] = resource
111784
private void addLocationsToBuilder(Element element, BeanDefinitionBuilder builder) {
        Element locationsElement = DomUtils.getChildElementByTagName(element, LOCATIONS);
        if (locationsElement != null) {
            List<Element> locationElements = DomUtils.getChildElementsByTagName(locationsElement, LOCATION);

            List<String> locations = locationElements.stream()
                    .map(locationElement -> locationElement.getAttribute("path"))
                    .collect(Collectors.toList());

            if (!locations.isEmpty()) {
                builder.addPropertyValue(LOCATIONS, locations);
            }
        }
    }
612679
@Override
    public WsResource addLocation(String fileName, String symbolicName) {
        return new SymbolicRootResource(fileName, symbolicName, commonRoot);
    }
465689
public T setSourceLocation(SourceLocation location) {
    checkState(sourceLocation == null);
    this.sourceLocation = checkNotNull(location);
    return (T) this;
  }
942437
public void addNavButtons()
    {
        ResourceBundle resources = ((BaseApplication)this.getTask().getApplication()).getResources(ResourceConstants.PROGRAM_RESOURCE, true);
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.GROUP, ClassProject.RESOURCE_DETAIL_SCREEN, resources.getString(ClassProject.RESOURCE_DETAIL_SCREEN));
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.DISTRIBUTION, ClassProject.CLASS_DETAIL_SCREEN, resources.getString(ClassProject.CLASS_DETAIL_SCREEN));
        super.addNavButtons();
    }
162762
private void addToClassPool(final Path location) {
        if (!location.toFile().exists())
            throw new IllegalArgumentException("The location '" + location + "' does not exist!");
        try {
            ContextClassReader.addClassPath(location.toUri().toURL());
        } catch (Exception e) {
            throw new IllegalArgumentException("The location '" + location + "' could not be loaded to the class path!", e);
        }
    }
247435
private void updateLocation() {
		try {
			location = getLocationOnScreen();
			location.y += getHeight();
			dialog.setLocation(location);
		} catch (IllegalComponentStateException e) {
			return; // might happen on window creation
		}
	}
870731
def add_resource(mt_file, ref, cache):
    """"""

    if isinstance(mt_file, MetapackDoc):
        doc = mt_file
    else:
        doc = MetapackDoc(mt_file)

    if not 'Resources' in doc:
        doc.new_section('Resources')

    doc['Resources'].args = [e for e in set(doc['Resources'].args + ['Name', 'StartLine', 'HeaderLines', 'Encoding']) if
                             e]

    seen_names = set()

    u = parse_app_url(ref)

    # The web and file URLs don't list the same.

    if u.proto == 'file':
        entries = u.list()
    else:
        entries = [ssu for su in u.list() for ssu in su.list()]

    errors = []

    for e in entries:
        if not add_single_resource(doc, e, cache=cache, seen_names=seen_names):
            errors.append(e)

    if errors:
        prt()
        warn("Found, but failed to add these urls:")
        for e in errors:
            print('    ', e)

    write_doc(doc, mt_file)
520800
private void addResources( final Collection<File> items, final Collection<Resource> resources )
    {
        for ( Resource resource : resources )
        {
            items.add( new File( resource.getDirectory() ) );
        }
    }
559760
def add_file_locations(self, file_locations=[]):
        
        if not hasattr(self, '__file_locations__'):
            self.__file_locations__ = copy.copy(file_locations)
        else:
            self.__file_locations__ += copy.copy(file_locations)
1245746
private void addSource() {

    	// TODO this should be shared between here and IDLReader
    	File generatedSources = new File(getBaseDir(), generatedSourceDir);

        this.getProject().addCompileSourceRoot( generatedSources.getAbsolutePath() );
        this.getLog().debug( "Source directory " + generatedSources + " added." );
	}
1127173
def add(self):
        '''
        '''
        # TODO validation per object type
        submit_attribs = {}
        for attrib in self.ATTRIBUTES:
            val = getattr(self, attrib, None)
            if val:
                submit_attribs[attrib] = val
        path = '/'.join([self.RESOURCE, 'add'])
        result = self.client.request(path, submit_attribs)
        return result
902392
def add(self, resource, replace=False):
        """"""
        uri = resource.uri
        for r in self:
            if (uri == r.uri):
                if (replace):
                    r = resource
                    return
                else:
                    raise ResourceListDupeError(
                        "Attempt to add resource already in resource_list")
        # didn't find it in list, add to end
        self.append(resource)
1096984
public void addLines(Collection<TaintLocation> locations) {
        Objects.requireNonNull(detector, "locations");
        for (TaintLocation location : locations) {
            lines.add(SourceLineAnnotation.fromVisitedInstruction(
                location.getMethodDescriptor(), location.getPosition()));
        }
    }
431330
protected void addPropertySources(ConfigurableEnvironment environment,
			ResourceLoader resourceLoader) {
		RandomValuePropertySource.addToEnvironment(environment);
		new Loader(environment, resourceLoader).load();
	}