TODO use config to set to use id instead of orig source
173718
public URI resolveUri(URI targetUri, URI srcOrigUri, URI srcId) {
        if(targetUri.isAbsolute()) {
            return targetUri;
        } else if(srcOrigUri==null || !srcOrigUri.isAbsolute()) {
            return targetUri;
        } else {
            return srcOrigUri.resolve(targetUri);
        }
    }
640884
private List<String> getIds(ConfigurationAdmin ca, String[] pids) {
        final String methodName = "getIds(): ";
        if (pids == null) {
            return Collections.emptyList();
        }
        List<String> ids = new ArrayList<String>();
        for (String pid : pids) {
            try {
                String filter = "(" + org.osgi.framework.Constants.SERVICE_PID + "=" + pid + ")";
                Configuration[] config = ca.listConfigurations(filter);
                if (config == null) {
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, methodName + "Configuration not found for pid " + pid);
                } else {
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, methodName + "Found config for " + pid);
                    String id = (String) config[0].getProperties().get("id");
                    ids.add(id);
                }
            } catch (IOException e) {
                if (tc.isDebugEnabled())
                    Tr.debug(tc, methodName + "Configuration not found for " + pid, e);
            } catch (InvalidSyntaxException e) {
                if (tc.isDebugEnabled())
                    Tr.debug(tc, methodName + "Configuration not found for " + pid, e);
            }
        }
        return Collections.unmodifiableList(ids);
    }
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." );
	}
465970
def get_configuration_set_by_id(self, id):
        '''

        '''
        for cs in self.configuration_sets:
            if cs.id == id:
                return cs
        return None
498768
public void setUUID(String id) {
		try {
			this.value = (id != null) ? UUID.fromString(id) : null;
		} catch (Throwable exception) {
			assert id != null;
			this.value = UUID.nameUUIDFromBytes(id.getBytes());
		}
		this.type = AttributeType.UUID;
		this.assigned = this.value != null;
	}
1009419
function setEnabledSources(config) {
    for (let source in config) {
        setSourceEnabled(source, config[source]);
    }
    haveSourcesBeenSelected = true;
}
142173
function setConfig (argv) {
    var configLookup = {}

    // expand defaults/aliases, in-case any happen to reference
    // the config.json file.
    applyDefaultsAndAliases(configLookup, flags.aliases, defaults)

    Object.keys(flags.configs).forEach(function (configKey) {
      var configPath = argv[configKey] || configLookup[configKey]
      if (configPath) {
        try {
          var config = null
          var resolvedConfigPath = path.resolve(process.cwd(), configPath)

          if (typeof flags.configs[configKey] === 'function') {
            try {
              config = flags.configs[configKey](resolvedConfigPath)
            } catch (e) {
              config = e
            }
            if (config instanceof Error) {
              error = config
              return
            }
          } else {
            config = require(resolvedConfigPath)
          }

          setConfigObject(config)
        } catch (ex) {
          if (argv[configKey]) error = Error(__('Invalid JSON config file: %s', configPath))
        }
      }
    })
  }
139192
public void setId(String id) {
      if (StringUtils.isNullOrBlank(id)) {
         this.id = UUID.randomUUID().toString();
      } else {
         this.id = id;
      }
   }
1219163
def addSourceId(self, value):
        '''
        '''
        if isinstance(value, Source_Id):
            self.source_ids.append(value)
        else:
            raise (TypeError,
                   'source_id Type should be Source_Id, not %s' % type(source_id))
235664
private void setIdValue(Object target, JsonNode idValue) throws IllegalAccessException {
		Field idField = configuration.getIdField(target.getClass());
		ResourceIdHandler idHandler = configuration.getIdHandler(target.getClass());

		if (idValue != null) {
			idField.set(target, idHandler.fromString(idValue.asText()));
		}
	}
791795
public static function add_config( $config_id, $args = [] ) {
		$config                             = Config::get_instance( $config_id, $args );
		$config_args                        = $config->get_config();
		self::$config[ $config_args['id'] ] = $config_args;
	}
602720
public void setId(java.util.Collection<StringFilter> id) {
        if (id == null) {
            this.id = null;
            return;
        }

        this.id = new java.util.ArrayList<StringFilter>(id);
    }
489993
@SuppressWarnings("unchecked")
    public <T extends XPathBuilder> T setId(final String id) {
        this.id = id;
        return (T) this;
    }
329231
public static void setId(Object document, String id) {
		DocumentAccessor d = getAccessor(document);
		if (d.hasIdMutator()) {
			d.setId(document, id);
		}
	}
899966
def _inject_config_source(self, source_filename, files_to_inject):
        
        # src_path = os.path.join(self.directory.root_dir, source_filename)
        # src_exec = "[ -r %s ] && . %s" % (src_path, src_path)
        src_exec = "[ -r {0} ] && . {0}".format(os.path.join(self.directory.root_dir, source_filename))
        # The ridiculous construction above is necessary to avoid failing tests(!)

        for config_file in files_to_inject:
            config_path = os.path.expanduser(os.path.join("~", config_file))
            if os.path.exists(config_path):
                self.injections.inject(config_path, src_exec)
                break
        else:
            config_file = files_to_inject[0]
            config_path = os.path.expanduser(os.path.join("~", config_file))
            self.logger.info("No config files found to source %s, creating ~/%s!" % (source_filename, config_file))
            self.injections.inject(config_path, src_exec)

        return (config_file, config_path)
740883
def generate(self, id_or_uri):
        
        uri = self._client.build_uri(id_or_uri) + "/generate"
        return self._client.get(uri)
238547
function bundle (ids = []) {
      ids.forEach((id) => {
        if (!muted.has(id)) {
          console.info(chalk.cyan('change:'), path.relative(process.cwd(), id))
          muted.add(id)
        }
      })

      const exampleName = path.basename(path.dirname(file))
      const output = dstPattern.replace('**', exampleName)
      const parentDir = path.dirname(output)

      mkdirp.sync(parentDir)

      console.info(chalk.grey(`⏳ building: ${path.relative(process.cwd(), file)}`))

      b
        .bundle()
        .on('error', onError)
        .pipe(createStream(output))
        .on('finish', () => {
          console.info(chalk.green(`✓ built: ${path.relative(process.cwd(), file)}`))
        })
    }