repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
tango-controls/JTango | server/src/main/java/org/tango/server/cache/TangoCacheManager.java | TangoCacheManager.startAttributePolling | public synchronized void startAttributePolling(final AttributeImpl attr) throws DevFailed {
addAttributePolling(attr);
LOGGER.debug("starting attribute {} for polling on device {}", attr.getName(), deviceName);
if (attr.getPollingPeriod() != 0) {
attributeCacheMap.get(attr).startRefr... | java | public synchronized void startAttributePolling(final AttributeImpl attr) throws DevFailed {
addAttributePolling(attr);
LOGGER.debug("starting attribute {} for polling on device {}", attr.getName(), deviceName);
if (attr.getPollingPeriod() != 0) {
attributeCacheMap.get(attr).startRefr... | [
"public",
"synchronized",
"void",
"startAttributePolling",
"(",
"final",
"AttributeImpl",
"attr",
")",
"throws",
"DevFailed",
"{",
"addAttributePolling",
"(",
"attr",
")",
";",
"LOGGER",
".",
"debug",
"(",
"\"starting attribute {} for polling on device {}\"",
",",
"attr... | Start attribute polling
@param attr
The attribute to poll
@throws DevFailed | [
"Start",
"attribute",
"polling"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/TangoCacheManager.java#L249-L255 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/TangoCacheManager.java | TangoCacheManager.addAttributePolling | private void addAttributePolling(final AttributeImpl attr) throws DevFailed {
if (MANAGER == null) {
startCache();
}
removeAttributePolling(attr);
final AttributeCache cache = new AttributeCache(MANAGER, attr, deviceName, deviceLock, aroundInvoke);
if (attr.getPolling... | java | private void addAttributePolling(final AttributeImpl attr) throws DevFailed {
if (MANAGER == null) {
startCache();
}
removeAttributePolling(attr);
final AttributeCache cache = new AttributeCache(MANAGER, attr, deviceName, deviceLock, aroundInvoke);
if (attr.getPolling... | [
"private",
"void",
"addAttributePolling",
"(",
"final",
"AttributeImpl",
"attr",
")",
"throws",
"DevFailed",
"{",
"if",
"(",
"MANAGER",
"==",
"null",
")",
"{",
"startCache",
"(",
")",
";",
"}",
"removeAttributePolling",
"(",
"attr",
")",
";",
"final",
"Attri... | Add attribute as polled
@param attr
@throws DevFailed | [
"Add",
"attribute",
"as",
"polled"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/TangoCacheManager.java#L263-L275 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/TangoCacheManager.java | TangoCacheManager.removeAttributePolling | public synchronized void removeAttributePolling(final AttributeImpl attr) throws DevFailed {
if (attributeCacheMap.containsKey(attr)) {
final AttributeCache cache = attributeCacheMap.get(attr);
cache.stopRefresh();
attributeCacheMap.remove(attr);
} else if (extTrigAtt... | java | public synchronized void removeAttributePolling(final AttributeImpl attr) throws DevFailed {
if (attributeCacheMap.containsKey(attr)) {
final AttributeCache cache = attributeCacheMap.get(attr);
cache.stopRefresh();
attributeCacheMap.remove(attr);
} else if (extTrigAtt... | [
"public",
"synchronized",
"void",
"removeAttributePolling",
"(",
"final",
"AttributeImpl",
"attr",
")",
"throws",
"DevFailed",
"{",
"if",
"(",
"attributeCacheMap",
".",
"containsKey",
"(",
"attr",
")",
")",
"{",
"final",
"AttributeCache",
"cache",
"=",
"attributeC... | Remove polling of an attribute
@param attr
@throws DevFailed | [
"Remove",
"polling",
"of",
"an",
"attribute"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/TangoCacheManager.java#L283-L297 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/TangoCacheManager.java | TangoCacheManager.removeAll | public synchronized void removeAll() {
for (final AttributeCache cache : attributeCacheMap.values()) {
cache.stopRefresh();
}
attributeCacheMap.clear();
extTrigAttributeCacheMap.clear();
for (final CommandCache cache : commandCacheMap.values()) {
cache.sto... | java | public synchronized void removeAll() {
for (final AttributeCache cache : attributeCacheMap.values()) {
cache.stopRefresh();
}
attributeCacheMap.clear();
extTrigAttributeCacheMap.clear();
for (final CommandCache cache : commandCacheMap.values()) {
cache.sto... | [
"public",
"synchronized",
"void",
"removeAll",
"(",
")",
"{",
"for",
"(",
"final",
"AttributeCache",
"cache",
":",
"attributeCacheMap",
".",
"values",
"(",
")",
")",
"{",
"cache",
".",
"stopRefresh",
"(",
")",
";",
"}",
"attributeCacheMap",
".",
"clear",
"... | Remove all polling | [
"Remove",
"all",
"polling"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/TangoCacheManager.java#L302-L322 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/TangoCacheManager.java | TangoCacheManager.removeCommandPolling | public synchronized void removeCommandPolling(final CommandImpl command) throws DevFailed {
if (commandCacheMap.containsKey(command)) {
final CommandCache cache = commandCacheMap.get(command);
cache.stopRefresh();
commandCacheMap.remove(command);
} else if (extTrigCom... | java | public synchronized void removeCommandPolling(final CommandImpl command) throws DevFailed {
if (commandCacheMap.containsKey(command)) {
final CommandCache cache = commandCacheMap.get(command);
cache.stopRefresh();
commandCacheMap.remove(command);
} else if (extTrigCom... | [
"public",
"synchronized",
"void",
"removeCommandPolling",
"(",
"final",
"CommandImpl",
"command",
")",
"throws",
"DevFailed",
"{",
"if",
"(",
"commandCacheMap",
".",
"containsKey",
"(",
"command",
")",
")",
"{",
"final",
"CommandCache",
"cache",
"=",
"commandCache... | Remove polling of a command
@param command
@throws DevFailed | [
"Remove",
"polling",
"of",
"a",
"command"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/TangoCacheManager.java#L330-L344 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/TangoCacheManager.java | TangoCacheManager.start | public synchronized void start() {
for (final AttributeCache cache : attributeCacheMap.values()) {
cache.startRefresh(POLLING_POOL);
}
for (final CommandCache cache : commandCacheMap.values()) {
cache.startRefresh(POLLING_POOL);
}
if (stateCache != null) {... | java | public synchronized void start() {
for (final AttributeCache cache : attributeCacheMap.values()) {
cache.startRefresh(POLLING_POOL);
}
for (final CommandCache cache : commandCacheMap.values()) {
cache.startRefresh(POLLING_POOL);
}
if (stateCache != null) {... | [
"public",
"synchronized",
"void",
"start",
"(",
")",
"{",
"for",
"(",
"final",
"AttributeCache",
"cache",
":",
"attributeCacheMap",
".",
"values",
"(",
")",
")",
"{",
"cache",
".",
"startRefresh",
"(",
"POLLING_POOL",
")",
";",
"}",
"for",
"(",
"final",
... | Start all polling | [
"Start",
"all",
"polling"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/TangoCacheManager.java#L349-L362 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/TangoCacheManager.java | TangoCacheManager.stop | public synchronized void stop() {
for (final AttributeCache cache : attributeCacheMap.values()) {
cache.stopRefresh();
}
for (final CommandCache cache : commandCacheMap.values()) {
cache.stopRefresh();
}
if (stateCache != null) {
stateCache.sto... | java | public synchronized void stop() {
for (final AttributeCache cache : attributeCacheMap.values()) {
cache.stopRefresh();
}
for (final CommandCache cache : commandCacheMap.values()) {
cache.stopRefresh();
}
if (stateCache != null) {
stateCache.sto... | [
"public",
"synchronized",
"void",
"stop",
"(",
")",
"{",
"for",
"(",
"final",
"AttributeCache",
"cache",
":",
"attributeCacheMap",
".",
"values",
"(",
")",
")",
"{",
"cache",
".",
"stopRefresh",
"(",
")",
";",
"}",
"for",
"(",
"final",
"CommandCache",
"c... | Stop all polling | [
"Stop",
"all",
"polling"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/TangoCacheManager.java#L367-L384 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/TangoCacheManager.java | TangoCacheManager.getAttributeCache | public synchronized SelfPopulatingCache getAttributeCache(final AttributeImpl attr) throws NoCacheFoundException {
if (attr.getName().equalsIgnoreCase(DeviceImpl.STATE_NAME)) {
return stateCache.getCache();
} else if (attr.getName().equalsIgnoreCase(DeviceImpl.STATUS_NAME)) {
ret... | java | public synchronized SelfPopulatingCache getAttributeCache(final AttributeImpl attr) throws NoCacheFoundException {
if (attr.getName().equalsIgnoreCase(DeviceImpl.STATE_NAME)) {
return stateCache.getCache();
} else if (attr.getName().equalsIgnoreCase(DeviceImpl.STATUS_NAME)) {
ret... | [
"public",
"synchronized",
"SelfPopulatingCache",
"getAttributeCache",
"(",
"final",
"AttributeImpl",
"attr",
")",
"throws",
"NoCacheFoundException",
"{",
"if",
"(",
"attr",
".",
"getName",
"(",
")",
".",
"equalsIgnoreCase",
"(",
"DeviceImpl",
".",
"STATE_NAME",
")",... | Get cache of an attribute
@param attr
the attribute
@return the attribute cache
@throws NoCacheFoundException if cache for the attribute is not found | [
"Get",
"cache",
"of",
"an",
"attribute"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/TangoCacheManager.java#L394-L402 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/TangoCacheManager.java | TangoCacheManager.getCommandCache | public synchronized SelfPopulatingCache getCommandCache(final CommandImpl cmd) {
SelfPopulatingCache cache = null;
if (cmd.getName().equalsIgnoreCase(DeviceImpl.STATE_NAME)) {
cache = stateCache.getCache();
} else if (cmd.getName().equalsIgnoreCase(DeviceImpl.STATUS_NAME)) {
... | java | public synchronized SelfPopulatingCache getCommandCache(final CommandImpl cmd) {
SelfPopulatingCache cache = null;
if (cmd.getName().equalsIgnoreCase(DeviceImpl.STATE_NAME)) {
cache = stateCache.getCache();
} else if (cmd.getName().equalsIgnoreCase(DeviceImpl.STATUS_NAME)) {
... | [
"public",
"synchronized",
"SelfPopulatingCache",
"getCommandCache",
"(",
"final",
"CommandImpl",
"cmd",
")",
"{",
"SelfPopulatingCache",
"cache",
"=",
"null",
";",
"if",
"(",
"cmd",
".",
"getName",
"(",
")",
".",
"equalsIgnoreCase",
"(",
"DeviceImpl",
".",
"STAT... | Get cache of a command
@param cmd
The command
@return The command cache | [
"Get",
"cache",
"of",
"a",
"command"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/TangoCacheManager.java#L421-L435 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/Chronometer.java | Chronometer.isOver | public boolean isOver() {
if (!isOver) {
final long now = System.currentTimeMillis();
isOver = now - startTime >= duration;
}
return isOver;
} | java | public boolean isOver() {
if (!isOver) {
final long now = System.currentTimeMillis();
isOver = now - startTime >= duration;
}
return isOver;
} | [
"public",
"boolean",
"isOver",
"(",
")",
"{",
"if",
"(",
"!",
"isOver",
")",
"{",
"final",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"isOver",
"=",
"now",
"-",
"startTime",
">=",
"duration",
";",
"}",
"return",
"isOver",
... | Check if the started duration is over
@return true if over | [
"Check",
"if",
"the",
"started",
"duration",
"is",
"over"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/Chronometer.java#L79-L85 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/properties/AttributePropertiesManager.java | AttributePropertiesManager.getAttributePropertyFromDB | public String getAttributePropertyFromDB(final String attributeName, final String propertyName) throws DevFailed {
xlogger.entry(propertyName);
String[] result = new String[] {};
final Map<String, String[]> prop = DatabaseFactory.getDatabase().getAttributeProperties(deviceName,
a... | java | public String getAttributePropertyFromDB(final String attributeName, final String propertyName) throws DevFailed {
xlogger.entry(propertyName);
String[] result = new String[] {};
final Map<String, String[]> prop = DatabaseFactory.getDatabase().getAttributeProperties(deviceName,
a... | [
"public",
"String",
"getAttributePropertyFromDB",
"(",
"final",
"String",
"attributeName",
",",
"final",
"String",
"propertyName",
")",
"throws",
"DevFailed",
"{",
"xlogger",
".",
"entry",
"(",
"propertyName",
")",
";",
"String",
"[",
"]",
"result",
"=",
"new",
... | Get an attribute property from tango db
@param attributeName
@param propertyName
@return The property
@throws DevFailed | [
"Get",
"an",
"attribute",
"property",
"from",
"tango",
"db"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/properties/AttributePropertiesManager.java#L108-L124 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/properties/AttributePropertiesManager.java | AttributePropertiesManager.setAttributePropertyInDB | public void setAttributePropertyInDB(final String attributeName, final String propertyName, final String value)
throws DevFailed {
xlogger.entry(propertyName);
// insert value in db only if input value is different and not a
// default value
// if (checkCurrentValue) {
... | java | public void setAttributePropertyInDB(final String attributeName, final String propertyName, final String value)
throws DevFailed {
xlogger.entry(propertyName);
// insert value in db only if input value is different and not a
// default value
// if (checkCurrentValue) {
... | [
"public",
"void",
"setAttributePropertyInDB",
"(",
"final",
"String",
"attributeName",
",",
"final",
"String",
"propertyName",
",",
"final",
"String",
"value",
")",
"throws",
"DevFailed",
"{",
"xlogger",
".",
"entry",
"(",
"propertyName",
")",
";",
"// insert valu... | Set attribute property in tango db
@param attributeName
@param propertyName
@param value
@throws DevFailed | [
"Set",
"attribute",
"property",
"in",
"tango",
"db"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/properties/AttributePropertiesManager.java#L134-L160 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/properties/AttributePropertiesManager.java | AttributePropertiesManager.setAttributePropertiesInDB | public void setAttributePropertiesInDB(final String attributeName, final Map<String, String[]> properties)
throws DevFailed {
xlogger.entry(properties);
final Map<String, String> currentValues = getAttributePropertiesFromDBSingle(attributeName);
final Map<String, String[]> propInser... | java | public void setAttributePropertiesInDB(final String attributeName, final Map<String, String[]> properties)
throws DevFailed {
xlogger.entry(properties);
final Map<String, String> currentValues = getAttributePropertiesFromDBSingle(attributeName);
final Map<String, String[]> propInser... | [
"public",
"void",
"setAttributePropertiesInDB",
"(",
"final",
"String",
"attributeName",
",",
"final",
"Map",
"<",
"String",
",",
"String",
"[",
"]",
">",
"properties",
")",
"throws",
"DevFailed",
"{",
"xlogger",
".",
"entry",
"(",
"properties",
")",
";",
"f... | Set attribute properties in tango db
@param attributeName
@param properties
@throws DevFailed | [
"Set",
"attribute",
"properties",
"in",
"tango",
"db"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/properties/AttributePropertiesManager.java#L169-L206 | train |
tango-controls/JTango | common/src/main/java/fr/esrf/Tango/factory/TangoFactory.java | TangoFactory.getPropertiesFile | private static Properties getPropertiesFile() {
try {
// We use the class loader to load the properties file.
// This compatible with unix and windows.
final InputStream stream = TangoFactory.class.getClassLoader().getResourceAsStream(
FACTORY_PROPERTIES)... | java | private static Properties getPropertiesFile() {
try {
// We use the class loader to load the properties file.
// This compatible with unix and windows.
final InputStream stream = TangoFactory.class.getClassLoader().getResourceAsStream(
FACTORY_PROPERTIES)... | [
"private",
"static",
"Properties",
"getPropertiesFile",
"(",
")",
"{",
"try",
"{",
"// We use the class loader to load the properties file.",
"// This compatible with unix and windows.",
"final",
"InputStream",
"stream",
"=",
"TangoFactory",
".",
"class",
".",
"getClassLoader",... | We get the properties file which contains default properties
@return Properties | [
"We",
"get",
"the",
"properties",
"file",
"which",
"contains",
"default",
"properties"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/fr/esrf/Tango/factory/TangoFactory.java#L84-L105 | train |
tango-controls/JTango | common/src/main/java/fr/esrf/Tango/factory/TangoFactory.java | TangoFactory.getObject | private static Object getObject(final String className) {
try {
// we get the class coresponding to the life cycle name
final Class<?> clazz = Class.forName(className);
// we get the default constructor (with no parameter)
final Constructor<?> contructor = clazz.... | java | private static Object getObject(final String className) {
try {
// we get the class coresponding to the life cycle name
final Class<?> clazz = Class.forName(className);
// we get the default constructor (with no parameter)
final Constructor<?> contructor = clazz.... | [
"private",
"static",
"Object",
"getObject",
"(",
"final",
"String",
"className",
")",
"{",
"try",
"{",
"// we get the class coresponding to the life cycle name",
"final",
"Class",
"<",
"?",
">",
"clazz",
"=",
"Class",
".",
"forName",
"(",
"className",
")",
";",
... | We instanciate the Component
@param className
@return Object | [
"We",
"instanciate",
"the",
"Component"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/fr/esrf/Tango/factory/TangoFactory.java#L113-L128 | train |
tango-controls/JTango | common/src/main/java/fr/esrf/Tango/factory/TangoFactory.java | TangoFactory.initTangoFactory | private void initTangoFactory() {
// we get the properties with instance of objects
final Properties properties = getPropertiesFile();
// if(properties == null || properties.size() == 0 ||
// !properties.containsKey(TANGO_FACTORY))
// {
// //tangoFactory = new DefaultTang... | java | private void initTangoFactory() {
// we get the properties with instance of objects
final Properties properties = getPropertiesFile();
// if(properties == null || properties.size() == 0 ||
// !properties.containsKey(TANGO_FACTORY))
// {
// //tangoFactory = new DefaultTang... | [
"private",
"void",
"initTangoFactory",
"(",
")",
"{",
"// we get the properties with instance of objects",
"final",
"Properties",
"properties",
"=",
"getPropertiesFile",
"(",
")",
";",
"// if(properties == null || properties.size() == 0 ||",
"// !properties.containsKey(TANGO_FACTORY)... | Load properties with impl specification and create instances | [
"Load",
"properties",
"with",
"impl",
"specification",
"and",
"create",
"instances"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/fr/esrf/Tango/factory/TangoFactory.java#L134-L157 | train |
tango-controls/JTango | common/src/main/java/org/tango/utils/DevFailedUtils.java | DevFailedUtils.logDevFailed | public static void logDevFailed(final DevFailed e, final Logger logger) {
if (e.errors != null) {
for (int i = 0; i < e.errors.length; i++) {
logger.error("Error Level {} :", i);
logger.error("\t - desc: {}", e.errors[i].desc);
logger.error("\t - origi... | java | public static void logDevFailed(final DevFailed e, final Logger logger) {
if (e.errors != null) {
for (int i = 0; i < e.errors.length; i++) {
logger.error("Error Level {} :", i);
logger.error("\t - desc: {}", e.errors[i].desc);
logger.error("\t - origi... | [
"public",
"static",
"void",
"logDevFailed",
"(",
"final",
"DevFailed",
"e",
",",
"final",
"Logger",
"logger",
")",
"{",
"if",
"(",
"e",
".",
"errors",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"e",
".",
"errors",
".... | Convert a DevFailed to a String
@param e
@return | [
"Convert",
"a",
"DevFailed",
"to",
"a",
"String"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/org/tango/utils/DevFailedUtils.java#L124-L144 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoDs/Attribute.java | Attribute.get_properties | public void get_properties(AttributeConfig conf)
{
//
// Copy mandatory properties
//
conf.writable = writable;
conf.data_format = data_format;
conf.max_dim_x = max_x;
conf.max_dim_y = max_y;
conf.data_type = data_type;
conf.name = name;
//
// Copy optional properties
//
conf.label = label;
conf.de... | java | public void get_properties(AttributeConfig conf)
{
//
// Copy mandatory properties
//
conf.writable = writable;
conf.data_format = data_format;
conf.max_dim_x = max_x;
conf.max_dim_y = max_y;
conf.data_type = data_type;
conf.name = name;
//
// Copy optional properties
//
conf.label = label;
conf.de... | [
"public",
"void",
"get_properties",
"(",
"AttributeConfig",
"conf",
")",
"{",
"//",
"// Copy mandatory properties",
"//",
"conf",
".",
"writable",
"=",
"writable",
";",
"conf",
".",
"data_format",
"=",
"data_format",
";",
"conf",
".",
"max_dim_x",
"=",
"max_x",
... | Get attribute properties.
This method initialise the fields of a AttributeConfig object with the
attribute properties value
@param conf A AttributeConfig object. | [
"Get",
"attribute",
"properties",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/Attribute.java#L686-L721 | train |
tango-controls/JTango | common/src/main/java/fr/esrf/TangoApi/DbHistory.java | DbHistory.formatValue | private String formatValue(String[] value) {
String ret = "";
for(int i=0;i<value.length;i++) {
ret += value[i];
if(i<value.length-1) ret+="\n";
}
return ret;
} | java | private String formatValue(String[] value) {
String ret = "";
for(int i=0;i<value.length;i++) {
ret += value[i];
if(i<value.length-1) ret+="\n";
}
return ret;
} | [
"private",
"String",
"formatValue",
"(",
"String",
"[",
"]",
"value",
")",
"{",
"String",
"ret",
"=",
"\"\"",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"value",
".",
"length",
";",
"i",
"++",
")",
"{",
"ret",
"+=",
"value",
"[",
"i"... | Format the value in one string by adding "\n" after each string.
@param value value to convert. | [
"Format",
"the",
"value",
"in",
"one",
"string",
"by",
"adding",
"\\",
"n",
"after",
"each",
"string",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/fr/esrf/TangoApi/DbHistory.java#L121-L130 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/dynamic/command/GroupCommand.java | GroupCommand.execute | @Override
public Object execute(final Object arg) throws DevFailed {
errorReportMap.clear();
String tmpReplyName = "";
boolean hasFailed = false;
final List<DevError[]> errors = new ArrayList<DevError[]>();
int size = 0;
final DeviceData argin = new DeviceData();
... | java | @Override
public Object execute(final Object arg) throws DevFailed {
errorReportMap.clear();
String tmpReplyName = "";
boolean hasFailed = false;
final List<DevError[]> errors = new ArrayList<DevError[]>();
int size = 0;
final DeviceData argin = new DeviceData();
... | [
"@",
"Override",
"public",
"Object",
"execute",
"(",
"final",
"Object",
"arg",
")",
"throws",
"DevFailed",
"{",
"errorReportMap",
".",
"clear",
"(",
")",
";",
"String",
"tmpReplyName",
"=",
"\"\"",
";",
"boolean",
"hasFailed",
"=",
"false",
";",
"final",
"... | execute all commands and read back all errors | [
"execute",
"all",
"commands",
"and",
"read",
"back",
"all",
"errors"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/dynamic/command/GroupCommand.java#L113-L154 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/events/EventUtilities.java | EventUtilities.cppAlignmentAdd8 | static byte[] cppAlignmentAdd8(final byte[] data) {
XLOGGER.entry();
final byte[] buffer = new byte[data.length + 8];
buffer[0] = (byte) 0xc0;
buffer[1] = (byte) 0xde;
buffer[2] = (byte) 0xc0;
buffer[3] = (byte) 0xde;
buffer[4] = (byte) 0xc0;
buffer[5] = (... | java | static byte[] cppAlignmentAdd8(final byte[] data) {
XLOGGER.entry();
final byte[] buffer = new byte[data.length + 8];
buffer[0] = (byte) 0xc0;
buffer[1] = (byte) 0xde;
buffer[2] = (byte) 0xc0;
buffer[3] = (byte) 0xde;
buffer[4] = (byte) 0xc0;
buffer[5] = (... | [
"static",
"byte",
"[",
"]",
"cppAlignmentAdd8",
"(",
"final",
"byte",
"[",
"]",
"data",
")",
"{",
"XLOGGER",
".",
"entry",
"(",
")",
";",
"final",
"byte",
"[",
"]",
"buffer",
"=",
"new",
"byte",
"[",
"data",
".",
"length",
"+",
"8",
"]",
";",
"bu... | Add 8 bytes at beginning for C++ alignment
@param data buffer to be aligned
@return buffer after c++ alignment. | [
"Add",
"8",
"bytes",
"at",
"beginning",
"for",
"C",
"++",
"alignment"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/events/EventUtilities.java#L137-L151 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/events/EventUtilities.java | EventUtilities.marshall | static byte[] marshall(final DevFailed devFailed) throws DevFailed {
XLOGGER.entry();
final CDROutputStream os = new CDROutputStream();
try {
DevErrorListHelper.write(os, devFailed.errors);
XLOGGER.exit();
return cppAlignment(os.getBufferCopy());
} fin... | java | static byte[] marshall(final DevFailed devFailed) throws DevFailed {
XLOGGER.entry();
final CDROutputStream os = new CDROutputStream();
try {
DevErrorListHelper.write(os, devFailed.errors);
XLOGGER.exit();
return cppAlignment(os.getBufferCopy());
} fin... | [
"static",
"byte",
"[",
"]",
"marshall",
"(",
"final",
"DevFailed",
"devFailed",
")",
"throws",
"DevFailed",
"{",
"XLOGGER",
".",
"entry",
"(",
")",
";",
"final",
"CDROutputStream",
"os",
"=",
"new",
"CDROutputStream",
"(",
")",
";",
"try",
"{",
"DevErrorLi... | Marshall the attribute with a DevFailed object
@param devFailed DevFailed object to marshall
@return result of the marshall action
@throws DevFailed if marshall action failed | [
"Marshall",
"the",
"attribute",
"with",
"a",
"DevFailed",
"object"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/events/EventUtilities.java#L309-L319 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/events/EventUtilities.java | EventUtilities.marshall | static byte[] marshall(final int counter, final boolean isException) throws DevFailed {
XLOGGER.entry();
final ZmqCallInfo zmqCallInfo = new ZmqCallInfo(EventConstants.ZMQ_RELEASE, counter,
EventConstants.EXECUTE_METHOD, EventConstants.OBJECT_IDENTIFIER, isException);
final CDROu... | java | static byte[] marshall(final int counter, final boolean isException) throws DevFailed {
XLOGGER.entry();
final ZmqCallInfo zmqCallInfo = new ZmqCallInfo(EventConstants.ZMQ_RELEASE, counter,
EventConstants.EXECUTE_METHOD, EventConstants.OBJECT_IDENTIFIER, isException);
final CDROu... | [
"static",
"byte",
"[",
"]",
"marshall",
"(",
"final",
"int",
"counter",
",",
"final",
"boolean",
"isException",
")",
"throws",
"DevFailed",
"{",
"XLOGGER",
".",
"entry",
"(",
")",
";",
"final",
"ZmqCallInfo",
"zmqCallInfo",
"=",
"new",
"ZmqCallInfo",
"(",
... | Marshall the ZmqCallInfo object
@param counter event counter
@param isException true if the attribute has failed
@return result of the marshall action
@throws DevFailed if marshall action failed | [
"Marshall",
"the",
"ZmqCallInfo",
"object"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/events/EventUtilities.java#L329-L342 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/events/EventUtilities.java | EventUtilities.getZmqVersion | static double getZmqVersion() {
XLOGGER.entry();
if (zmqVersion < 0.0) { // Not already checked.
zmqVersion = 0.0;
try {
String strVersion = org.zeromq.ZMQ.getVersionString();
final StringTokenizer stk = new StringTokenizer(strVersion, ".");
... | java | static double getZmqVersion() {
XLOGGER.entry();
if (zmqVersion < 0.0) { // Not already checked.
zmqVersion = 0.0;
try {
String strVersion = org.zeromq.ZMQ.getVersionString();
final StringTokenizer stk = new StringTokenizer(strVersion, ".");
... | [
"static",
"double",
"getZmqVersion",
"(",
")",
"{",
"XLOGGER",
".",
"entry",
"(",
")",
";",
"if",
"(",
"zmqVersion",
"<",
"0.0",
")",
"{",
"// Not already checked.",
"zmqVersion",
"=",
"0.0",
";",
"try",
"{",
"String",
"strVersion",
"=",
"org",
".",
"zer... | Return the zmq version as a double like
3.22 for "3.2.2" or 0.0 if zmq not available
@return the TangORB version as a String | [
"Return",
"the",
"zmq",
"version",
"as",
"a",
"double",
"like",
"3",
".",
"22",
"for",
"3",
".",
"2",
".",
"2",
"or",
"0",
".",
"0",
"if",
"zmq",
"not",
"available"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/events/EventUtilities.java#L376-L402 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/idl/CleverAttrValUnion.java | CleverAttrValUnion.get | public static Object get(final AttrValUnion union, final AttrDataFormat format) throws DevFailed {
Object result = null;
if (union != null) {
final AttributeDataType discriminator = union.discriminator();
if (discriminator.value() == AttributeDataType._ATT_NO_DATA) {
... | java | public static Object get(final AttrValUnion union, final AttrDataFormat format) throws DevFailed {
Object result = null;
if (union != null) {
final AttributeDataType discriminator = union.discriminator();
if (discriminator.value() == AttributeDataType._ATT_NO_DATA) {
... | [
"public",
"static",
"Object",
"get",
"(",
"final",
"AttrValUnion",
"union",
",",
"final",
"AttrDataFormat",
"format",
")",
"throws",
"DevFailed",
"{",
"Object",
"result",
"=",
"null",
";",
"if",
"(",
"union",
"!=",
"null",
")",
"{",
"final",
"AttributeDataTy... | Get value from an AttrValUnion
@param union
@param format
@return The value
@throws DevFailed | [
"Get",
"value",
"from",
"an",
"AttrValUnion"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/idl/CleverAttrValUnion.java#L102-L129 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/idl/CleverAttrValUnion.java | CleverAttrValUnion.set | public static AttrValUnion set(final int tangoType, final Object value) throws DevFailed {
final AttributeDataType discriminator = AttributeTangoType.getTypeFromTango(tangoType).getAttributeDataType();
final AttrValUnion union = new AttrValUnion();
Object array = null;
if (value.getClass... | java | public static AttrValUnion set(final int tangoType, final Object value) throws DevFailed {
final AttributeDataType discriminator = AttributeTangoType.getTypeFromTango(tangoType).getAttributeDataType();
final AttrValUnion union = new AttrValUnion();
Object array = null;
if (value.getClass... | [
"public",
"static",
"AttrValUnion",
"set",
"(",
"final",
"int",
"tangoType",
",",
"final",
"Object",
"value",
")",
"throws",
"DevFailed",
"{",
"final",
"AttributeDataType",
"discriminator",
"=",
"AttributeTangoType",
".",
"getTypeFromTango",
"(",
"tangoType",
")",
... | Set a value into an AttrValUnion
@param tangoType
@param value
@return The union
@throws DevFailed | [
"Set",
"a",
"value",
"into",
"an",
"AttrValUnion"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/idl/CleverAttrValUnion.java#L139-L173 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/PollingManager.java | PollingManager.triggerPolling | public void triggerPolling(final String objectName) throws DevFailed {
boolean isACommand = false;
CommandImpl cmd = null;
try {
cmd = CommandGetter.getCommand(objectName, commandList);
isACommand = true;
} catch (final DevFailed e) {
}
if ... | java | public void triggerPolling(final String objectName) throws DevFailed {
boolean isACommand = false;
CommandImpl cmd = null;
try {
cmd = CommandGetter.getCommand(objectName, commandList);
isACommand = true;
} catch (final DevFailed e) {
}
if ... | [
"public",
"void",
"triggerPolling",
"(",
"final",
"String",
"objectName",
")",
"throws",
"DevFailed",
"{",
"boolean",
"isACommand",
"=",
"false",
";",
"CommandImpl",
"cmd",
"=",
"null",
";",
"try",
"{",
"cmd",
"=",
"CommandGetter",
".",
"getCommand",
"(",
"o... | Update polling cache
@param objectName The command or attribute to update
@throws DevFailed | [
"Update",
"polling",
"cache"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/PollingManager.java#L177-L219 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/PollingManager.java | PollingManager.addCommandPolling | public void addCommandPolling(final String commandName, final int pollingPeriod) throws DevFailed {
checkPollingLimits(commandName, pollingPeriod, minCommandPolling);
final CommandImpl command = CommandGetter.getCommand(commandName, commandList);
if (!command.getName().equals(DeviceImpl.INIT_... | java | public void addCommandPolling(final String commandName, final int pollingPeriod) throws DevFailed {
checkPollingLimits(commandName, pollingPeriod, minCommandPolling);
final CommandImpl command = CommandGetter.getCommand(commandName, commandList);
if (!command.getName().equals(DeviceImpl.INIT_... | [
"public",
"void",
"addCommandPolling",
"(",
"final",
"String",
"commandName",
",",
"final",
"int",
"pollingPeriod",
")",
"throws",
"DevFailed",
"{",
"checkPollingLimits",
"(",
"commandName",
",",
"pollingPeriod",
",",
"minCommandPolling",
")",
";",
"final",
"Command... | Add command polling. Init command cannot be polled. Only command with
parameter void can be polled
@param commandName the command to poll
@param pollingPeriod the polling period
@throws DevFailed | [
"Add",
"command",
"polling",
".",
"Init",
"command",
"cannot",
"be",
"polled",
".",
"Only",
"command",
"with",
"parameter",
"void",
"can",
"be",
"polled"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/PollingManager.java#L239-L257 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/PollingManager.java | PollingManager.addAttributePolling | public void addAttributePolling(final String attributeName, final int pollingPeriod) throws DevFailed {
logger.debug("add {} polling with period {}", attributeName, pollingPeriod);
checkPollingLimits(attributeName, pollingPeriod, minAttributePolling);
final AttributeImpl attribute = Attribu... | java | public void addAttributePolling(final String attributeName, final int pollingPeriod) throws DevFailed {
logger.debug("add {} polling with period {}", attributeName, pollingPeriod);
checkPollingLimits(attributeName, pollingPeriod, minAttributePolling);
final AttributeImpl attribute = Attribu... | [
"public",
"void",
"addAttributePolling",
"(",
"final",
"String",
"attributeName",
",",
"final",
"int",
"pollingPeriod",
")",
"throws",
"DevFailed",
"{",
"logger",
".",
"debug",
"(",
"\"add {} polling with period {}\"",
",",
"attributeName",
",",
"pollingPeriod",
")",
... | Add attribute polling
@param attributeName the attribute to poll
@param pollingPeriod the polling period
@throws DevFailed | [
"Add",
"attribute",
"polling"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/PollingManager.java#L293-L312 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/PollingManager.java | PollingManager.removeAttributePolling | public void removeAttributePolling(final String attributeName) throws DevFailed {
// jive sends value with lower case, so manage it
final AttributeImpl attribute = AttributeGetterSetter.getAttribute(attributeName, attributeList);
attribute.resetPolling();
cacheManager.removeAttribute... | java | public void removeAttributePolling(final String attributeName) throws DevFailed {
// jive sends value with lower case, so manage it
final AttributeImpl attribute = AttributeGetterSetter.getAttribute(attributeName, attributeList);
attribute.resetPolling();
cacheManager.removeAttribute... | [
"public",
"void",
"removeAttributePolling",
"(",
"final",
"String",
"attributeName",
")",
"throws",
"DevFailed",
"{",
"// jive sends value with lower case, so manage it\r",
"final",
"AttributeImpl",
"attribute",
"=",
"AttributeGetterSetter",
".",
"getAttribute",
"(",
"attribu... | Remove attribute polling
@param attributeName the attribute
@throws DevFailed | [
"Remove",
"attribute",
"polling"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/PollingManager.java#L320-L333 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/cache/PollingManager.java | PollingManager.removeCommandPolling | public void removeCommandPolling(final String commandName) throws DevFailed {
final CommandImpl command = CommandGetter.getCommand(commandName, commandList);
command.resetPolling();
cacheManager.removeCommandPolling(command);
if (command.getName().equals(DeviceImpl.STATE_NAME) || com... | java | public void removeCommandPolling(final String commandName) throws DevFailed {
final CommandImpl command = CommandGetter.getCommand(commandName, commandList);
command.resetPolling();
cacheManager.removeCommandPolling(command);
if (command.getName().equals(DeviceImpl.STATE_NAME) || com... | [
"public",
"void",
"removeCommandPolling",
"(",
"final",
"String",
"commandName",
")",
"throws",
"DevFailed",
"{",
"final",
"CommandImpl",
"command",
"=",
"CommandGetter",
".",
"getCommand",
"(",
"commandName",
",",
"commandList",
")",
";",
"command",
".",
"resetPo... | Remove command polling
@param commandName the command
@throws DevFailed | [
"Remove",
"command",
"polling"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/cache/PollingManager.java#L341-L353 | train |
tango-controls/JTango | client/src/main/java/fr/soleil/tango/attributecomposer/AttributeGroupScheduler.java | AttributeGroupScheduler.start | public void start(final AttributeGroupReader valueReader, final long readingPeriod) {
this.valueReader = valueReader;
this.readingPeriod = readingPeriod;
// create a timer to read attributes
executor = Executors.newScheduledThreadPool(1);
future = executor.scheduleAtFixedRat... | java | public void start(final AttributeGroupReader valueReader, final long readingPeriod) {
this.valueReader = valueReader;
this.readingPeriod = readingPeriod;
// create a timer to read attributes
executor = Executors.newScheduledThreadPool(1);
future = executor.scheduleAtFixedRat... | [
"public",
"void",
"start",
"(",
"final",
"AttributeGroupReader",
"valueReader",
",",
"final",
"long",
"readingPeriod",
")",
"{",
"this",
".",
"valueReader",
"=",
"valueReader",
";",
"this",
".",
"readingPeriod",
"=",
"readingPeriod",
";",
"// create a timer to read ... | Start the periodic update
@param valueReader the group reader
@param readingPeriod the period in milliseconds | [
"Start",
"the",
"periodic",
"update"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/soleil/tango/attributecomposer/AttributeGroupScheduler.java#L29-L35 | train |
tango-controls/JTango | client/src/main/java/fr/soleil/tango/attributecomposer/AttributeGroupScheduler.java | AttributeGroupScheduler.stop | public void stop() {
if (future != null) {
future.cancel(true);
}
if (executor != null) {
executor.shutdownNow();
}
} | java | public void stop() {
if (future != null) {
future.cancel(true);
}
if (executor != null) {
executor.shutdownNow();
}
} | [
"public",
"void",
"stop",
"(",
")",
"{",
"if",
"(",
"future",
"!=",
"null",
")",
"{",
"future",
".",
"cancel",
"(",
"true",
")",
";",
"}",
"if",
"(",
"executor",
"!=",
"null",
")",
"{",
"executor",
".",
"shutdownNow",
"(",
")",
";",
"}",
"}"
] | Stop the refresh | [
"Stop",
"the",
"refresh"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/soleil/tango/attributecomposer/AttributeGroupScheduler.java#L40-L47 | train |
tango-controls/JTango | client/src/main/java/fr/soleil/tango/attributecomposer/AttributeGroupScheduler.java | AttributeGroupScheduler.updateAttributeGroup | public void updateAttributeGroup(final TangoGroupAttribute attributeGroup) {
stop();
final AttributeGroupReader newValueReader = new AttributeGroupReader(valueReader.getAttributeGroupListener(),
attributeGroup, valueReader.isReadWriteValue(), valueReader.isReadQuality(),
... | java | public void updateAttributeGroup(final TangoGroupAttribute attributeGroup) {
stop();
final AttributeGroupReader newValueReader = new AttributeGroupReader(valueReader.getAttributeGroupListener(),
attributeGroup, valueReader.isReadWriteValue(), valueReader.isReadQuality(),
... | [
"public",
"void",
"updateAttributeGroup",
"(",
"final",
"TangoGroupAttribute",
"attributeGroup",
")",
"{",
"stop",
"(",
")",
";",
"final",
"AttributeGroupReader",
"newValueReader",
"=",
"new",
"AttributeGroupReader",
"(",
"valueReader",
".",
"getAttributeGroupListener",
... | Update the group of attributes
@param attributeGroup | [
"Update",
"the",
"group",
"of",
"attributes"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/soleil/tango/attributecomposer/AttributeGroupScheduler.java#L54-L60 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.insert | public static void insert(final Object value, final DeviceAttribute deviceAttributeWritten,
final int dimX, final int dimY) throws DevFailed {
if (value instanceof Short) {
AttributeHelper.insertFromShort((Short) value, deviceAttributeWritten);
} else if (value instanceof String) {
AttributeHelper.ins... | java | public static void insert(final Object value, final DeviceAttribute deviceAttributeWritten,
final int dimX, final int dimY) throws DevFailed {
if (value instanceof Short) {
AttributeHelper.insertFromShort((Short) value, deviceAttributeWritten);
} else if (value instanceof String) {
AttributeHelper.ins... | [
"public",
"static",
"void",
"insert",
"(",
"final",
"Object",
"value",
",",
"final",
"DeviceAttribute",
"deviceAttributeWritten",
",",
"final",
"int",
"dimX",
",",
"final",
"int",
"dimY",
")",
"throws",
"DevFailed",
"{",
"if",
"(",
"value",
"instanceof",
"Shor... | Insert data in DeviceAttribute from an Object
@param value
the value to write on DeviceAttribute, possibles Class :
Short, String, Long, Float, Boolean, Integer, Double, DevState
or Vector.
@param deviceAttributeWritten
the DeviceAttribute attribute to write
@param dimX
the custom X dimension of the attribute to write... | [
"Insert",
"data",
"in",
"DeviceAttribute",
"from",
"an",
"Object"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L299-L328 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.extract | public static Object extract(final DeviceAttribute deviceAttributeRead) throws DevFailed {
Object argout = null;
if (deviceAttributeRead.getDimX() != 1 || deviceAttributeRead.getDimY() != 0) {
argout = extractArray(deviceAttributeRead);
} else {
switch (deviceAttributeRead.getType()) {
case TangoCons... | java | public static Object extract(final DeviceAttribute deviceAttributeRead) throws DevFailed {
Object argout = null;
if (deviceAttributeRead.getDimX() != 1 || deviceAttributeRead.getDimY() != 0) {
argout = extractArray(deviceAttributeRead);
} else {
switch (deviceAttributeRead.getType()) {
case TangoCons... | [
"public",
"static",
"Object",
"extract",
"(",
"final",
"DeviceAttribute",
"deviceAttributeRead",
")",
"throws",
"DevFailed",
"{",
"Object",
"argout",
"=",
"null",
";",
"if",
"(",
"deviceAttributeRead",
".",
"getDimX",
"(",
")",
"!=",
"1",
"||",
"deviceAttributeR... | Extract data from DeviceAttribute to an Object
@param deviceAttributeRead
the DeviceAttribute to read
@return Object possibles Class : Short, String, Long, Float, Boolean,
Integer, Double, DevState or Vector.
@throws DevFailed | [
"Extract",
"data",
"from",
"DeviceAttribute",
"to",
"an",
"Object"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L339-L400 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.extractToShort | public static Short extractToShort(final DeviceAttribute deviceAttributeRead) throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
Short argout = null;
if (value instanceof Short) {
argout = (Short) value;
} else if (value instanceof String) {
try {
argout = Short.valueO... | java | public static Short extractToShort(final DeviceAttribute deviceAttributeRead) throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
Short argout = null;
if (value instanceof Short) {
argout = (Short) value;
} else if (value instanceof String) {
try {
argout = Short.valueO... | [
"public",
"static",
"Short",
"extractToShort",
"(",
"final",
"DeviceAttribute",
"deviceAttributeRead",
")",
"throws",
"DevFailed",
"{",
"final",
"Object",
"value",
"=",
"AttributeHelper",
".",
"extract",
"(",
"deviceAttributeRead",
")",
";",
"Short",
"argout",
"=",
... | Extract data from DeviceAttribute to a Short
@param deviceAttributeRead
the DeviceAttribute attribute to read
@return Short, the result in Short format
@throws DevFailed | [
"Extract",
"data",
"from",
"DeviceAttribute",
"to",
"a",
"Short"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L684-L720 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.extractToString | public static String extractToString(final DeviceAttribute deviceAttributeRead)
throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
String argout = null;
if (value instanceof Short) {
argout = ((Short) value).toString();
} else if (value instanceof String) {
argout =... | java | public static String extractToString(final DeviceAttribute deviceAttributeRead)
throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
String argout = null;
if (value instanceof Short) {
argout = ((Short) value).toString();
} else if (value instanceof String) {
argout =... | [
"public",
"static",
"String",
"extractToString",
"(",
"final",
"DeviceAttribute",
"deviceAttributeRead",
")",
"throws",
"DevFailed",
"{",
"final",
"Object",
"value",
"=",
"AttributeHelper",
".",
"extract",
"(",
"deviceAttributeRead",
")",
";",
"String",
"argout",
"=... | Extract data from DeviceAttribute to a String
@param deviceAttributeRead
the DeviceAttribute attribute to read
@return String, the result in String format
@throws DevFailed | [
"Extract",
"data",
"from",
"DeviceAttribute",
"to",
"a",
"String"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L730-L757 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.extractToInteger | public static Integer extractToInteger(final DeviceAttribute deviceAttributeRead)
throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
Integer argout = null;
if (value instanceof Short) {
argout = Integer.valueOf(((Short) value).intValue());
} else if (value instanceof Str... | java | public static Integer extractToInteger(final DeviceAttribute deviceAttributeRead)
throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
Integer argout = null;
if (value instanceof Short) {
argout = Integer.valueOf(((Short) value).intValue());
} else if (value instanceof Str... | [
"public",
"static",
"Integer",
"extractToInteger",
"(",
"final",
"DeviceAttribute",
"deviceAttributeRead",
")",
"throws",
"DevFailed",
"{",
"final",
"Object",
"value",
"=",
"AttributeHelper",
".",
"extract",
"(",
"deviceAttributeRead",
")",
";",
"Integer",
"argout",
... | Extract data from DeviceAttribute to an Integer
@param deviceAttributeRead
the DeviceAttribute attribute to read
@return Integer, the result in Integer format
@throws DevFailed | [
"Extract",
"data",
"from",
"DeviceAttribute",
"to",
"an",
"Integer"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L767-L804 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.extractToLong | public static Long extractToLong(final DeviceAttribute deviceAttributeRead) throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
Long argout = null;
if (value instanceof Short) {
argout = Long.valueOf(((Short) value).longValue());
} else if (value instanceof String) {
try ... | java | public static Long extractToLong(final DeviceAttribute deviceAttributeRead) throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
Long argout = null;
if (value instanceof Short) {
argout = Long.valueOf(((Short) value).longValue());
} else if (value instanceof String) {
try ... | [
"public",
"static",
"Long",
"extractToLong",
"(",
"final",
"DeviceAttribute",
"deviceAttributeRead",
")",
"throws",
"DevFailed",
"{",
"final",
"Object",
"value",
"=",
"AttributeHelper",
".",
"extract",
"(",
"deviceAttributeRead",
")",
";",
"Long",
"argout",
"=",
"... | Extract data from DeviceAttribute to a Long
@param deviceAttributeRead
the DeviceAttribute attribute to read
@return Long, the result in Long format
@throws DevFailed | [
"Extract",
"data",
"from",
"DeviceAttribute",
"to",
"a",
"Long"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L814-L850 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.extractToFloat | public static Float extractToFloat(final DeviceAttribute deviceAttributeRead) throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
Float argout = null;
if (value instanceof Short) {
argout = Float.valueOf(((Short) value).floatValue());
} else if (value instanceof String) {
... | java | public static Float extractToFloat(final DeviceAttribute deviceAttributeRead) throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
Float argout = null;
if (value instanceof Short) {
argout = Float.valueOf(((Short) value).floatValue());
} else if (value instanceof String) {
... | [
"public",
"static",
"Float",
"extractToFloat",
"(",
"final",
"DeviceAttribute",
"deviceAttributeRead",
")",
"throws",
"DevFailed",
"{",
"final",
"Object",
"value",
"=",
"AttributeHelper",
".",
"extract",
"(",
"deviceAttributeRead",
")",
";",
"Float",
"argout",
"=",
... | Extract data from DeviceAttribute to a Float
@param deviceAttributeRead
the DeviceAttribute attribute to read
@return Float the result in Float format
@throws DevFailed | [
"Extract",
"data",
"from",
"DeviceAttribute",
"to",
"a",
"Float"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L860-L896 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.extractToBoolean | public static Boolean extractToBoolean(final DeviceAttribute deviceAttributeRead)
throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
int boolValue = 0;
Boolean argout = Boolean.FALSE;
;
if (value instanceof Short) {
boolValue = ((Short) value).intValue();
} else if (v... | java | public static Boolean extractToBoolean(final DeviceAttribute deviceAttributeRead)
throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
int boolValue = 0;
Boolean argout = Boolean.FALSE;
;
if (value instanceof Short) {
boolValue = ((Short) value).intValue();
} else if (v... | [
"public",
"static",
"Boolean",
"extractToBoolean",
"(",
"final",
"DeviceAttribute",
"deviceAttributeRead",
")",
"throws",
"DevFailed",
"{",
"final",
"Object",
"value",
"=",
"AttributeHelper",
".",
"extract",
"(",
"deviceAttributeRead",
")",
";",
"int",
"boolValue",
... | Extract data from DeviceAttribute to a Boolean.
@param deviceAttributeRead
the DeviceAttribute attribute to read
@return Boolean the result in Boolean format
@throws DevFailed | [
"Extract",
"data",
"from",
"DeviceAttribute",
"to",
"a",
"Boolean",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L906-L950 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.extractToDouble | public static Double extractToDouble(final DeviceAttribute deviceAttributeRead)
throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
Double argout = null;
if (value instanceof Short) {
argout = Double.valueOf(((Short) value).doubleValue());
} else if (value instanceof Stri... | java | public static Double extractToDouble(final DeviceAttribute deviceAttributeRead)
throws DevFailed {
final Object value = AttributeHelper.extract(deviceAttributeRead);
Double argout = null;
if (value instanceof Short) {
argout = Double.valueOf(((Short) value).doubleValue());
} else if (value instanceof Stri... | [
"public",
"static",
"Double",
"extractToDouble",
"(",
"final",
"DeviceAttribute",
"deviceAttributeRead",
")",
"throws",
"DevFailed",
"{",
"final",
"Object",
"value",
"=",
"AttributeHelper",
".",
"extract",
"(",
"deviceAttributeRead",
")",
";",
"Double",
"argout",
"=... | Extract data from DeviceAttribute to a Double.
@param deviceAttributeRead
the DeviceAttribute attribute to read
@return Double the result in Double format
@throws DevFailed | [
"Extract",
"data",
"from",
"DeviceAttribute",
"to",
"a",
"Double",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L960-L997 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.insertFromInteger | public static void insertFromInteger(final Integer integerValue,
final DeviceAttribute deviceAttributeWritten) throws DevFailed {
switch (deviceAttributeWritten.getType()) {
case TangoConst.Tango_DEV_SHORT:
deviceAttributeWritten.insert(integerValue.shortValue());
break;
case TangoConst.Tango_DEV_USH... | java | public static void insertFromInteger(final Integer integerValue,
final DeviceAttribute deviceAttributeWritten) throws DevFailed {
switch (deviceAttributeWritten.getType()) {
case TangoConst.Tango_DEV_SHORT:
deviceAttributeWritten.insert(integerValue.shortValue());
break;
case TangoConst.Tango_DEV_USH... | [
"public",
"static",
"void",
"insertFromInteger",
"(",
"final",
"Integer",
"integerValue",
",",
"final",
"DeviceAttribute",
"deviceAttributeWritten",
")",
"throws",
"DevFailed",
"{",
"switch",
"(",
"deviceAttributeWritten",
".",
"getType",
"(",
")",
")",
"{",
"case",... | Insert data in DeviceAttribute from a Integer.
@param integerValue
the value to insert on DeviceAttribute
@param deviceAttributeWritten
the DeviceAttribute attribute to write
@throws DevFailed | [
"Insert",
"data",
"in",
"DeviceAttribute",
"from",
"a",
"Integer",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L3460-L3526 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.insertFromBoolean | public static void insertFromBoolean(final Boolean booleanValue,
final DeviceAttribute deviceAttributeWritten) throws DevFailed {
Integer integerValue = 0;
if (booleanValue.booleanValue()) {
integerValue = 1;
}
switch (deviceAttributeWritten.getType()) {
case TangoConst.Tango_DEV_SHORT:
deviceAttr... | java | public static void insertFromBoolean(final Boolean booleanValue,
final DeviceAttribute deviceAttributeWritten) throws DevFailed {
Integer integerValue = 0;
if (booleanValue.booleanValue()) {
integerValue = 1;
}
switch (deviceAttributeWritten.getType()) {
case TangoConst.Tango_DEV_SHORT:
deviceAttr... | [
"public",
"static",
"void",
"insertFromBoolean",
"(",
"final",
"Boolean",
"booleanValue",
",",
"final",
"DeviceAttribute",
"deviceAttributeWritten",
")",
"throws",
"DevFailed",
"{",
"Integer",
"integerValue",
"=",
"0",
";",
"if",
"(",
"booleanValue",
".",
"booleanVa... | Insert data in DeviceAttribute from a Boolean.
@param booleanValue
the value to insert on DeviceAttribute
@param deviceAttributeWritten
the DeviceAttribute attribute to write
@throws DevFailed | [
"Insert",
"data",
"in",
"DeviceAttribute",
"from",
"a",
"Boolean",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L3691-L3752 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.insertFromWAttribute | public static void insertFromWAttribute(final WAttribute wAttributeValue,
final DeviceAttribute deviceAttributeWritten) throws DevFailed {
Object value = null;
switch (wAttributeValue.get_data_type()) {
case TangoConst.Tango_DEV_SHORT:
value = Short.valueOf(wAttributeValue.getShortWriteValue());
brea... | java | public static void insertFromWAttribute(final WAttribute wAttributeValue,
final DeviceAttribute deviceAttributeWritten) throws DevFailed {
Object value = null;
switch (wAttributeValue.get_data_type()) {
case TangoConst.Tango_DEV_SHORT:
value = Short.valueOf(wAttributeValue.getShortWriteValue());
brea... | [
"public",
"static",
"void",
"insertFromWAttribute",
"(",
"final",
"WAttribute",
"wAttributeValue",
",",
"final",
"DeviceAttribute",
"deviceAttributeWritten",
")",
"throws",
"DevFailed",
"{",
"Object",
"value",
"=",
"null",
";",
"switch",
"(",
"wAttributeValue",
".",
... | Insert data in DeviceAttribute from a WAttribute.
@param wAttributeValue
the value to insert on DeviceAttribute
@param deviceAttributeWritten
the DeviceAttribute attribute to write
@throws DevFailed | [
"Insert",
"data",
"in",
"DeviceAttribute",
"from",
"a",
"WAttribute",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L3843-L3904 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.insertFromDevState | public static void insertFromDevState(final DevState devStateValue,
final DeviceAttribute deviceAttributeWritten) throws DevFailed {
final Integer integerValue = Integer.valueOf(devStateValue.value());
switch (deviceAttributeWritten.getType()) {
case TangoConst.Tango_DEV_SHORT:
deviceAttributeWritten.inse... | java | public static void insertFromDevState(final DevState devStateValue,
final DeviceAttribute deviceAttributeWritten) throws DevFailed {
final Integer integerValue = Integer.valueOf(devStateValue.value());
switch (deviceAttributeWritten.getType()) {
case TangoConst.Tango_DEV_SHORT:
deviceAttributeWritten.inse... | [
"public",
"static",
"void",
"insertFromDevState",
"(",
"final",
"DevState",
"devStateValue",
",",
"final",
"DeviceAttribute",
"deviceAttributeWritten",
")",
"throws",
"DevFailed",
"{",
"final",
"Integer",
"integerValue",
"=",
"Integer",
".",
"valueOf",
"(",
"devStateV... | Insert data in DeviceAttribute from a DevState.
@param devStateValue
the value to insert on DeviceAttribute
@param deviceAttributeWritten
the DeviceAttribute attribute to write
@throws DevFailed | [
"Insert",
"data",
"in",
"DeviceAttribute",
"from",
"a",
"DevState",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L3915-L3976 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java | AttributeHelper.fillDbDatumFromDeviceAttribute | public final static void fillDbDatumFromDeviceAttribute(final DbDatum dbDatum,
final DeviceAttribute deviceAttribute) throws DevFailed {
switch (deviceAttribute.getType()) {
case TangoConst.Tango_DEV_VOID:
// nothing to do
break;
case TangoConst.Tango_DEV_BOOLEAN:
dbDatum.insert(deviceAttribute... | java | public final static void fillDbDatumFromDeviceAttribute(final DbDatum dbDatum,
final DeviceAttribute deviceAttribute) throws DevFailed {
switch (deviceAttribute.getType()) {
case TangoConst.Tango_DEV_VOID:
// nothing to do
break;
case TangoConst.Tango_DEV_BOOLEAN:
dbDatum.insert(deviceAttribute... | [
"public",
"final",
"static",
"void",
"fillDbDatumFromDeviceAttribute",
"(",
"final",
"DbDatum",
"dbDatum",
",",
"final",
"DeviceAttribute",
"deviceAttribute",
")",
"throws",
"DevFailed",
"{",
"switch",
"(",
"deviceAttribute",
".",
"getType",
"(",
")",
")",
"{",
"c... | Fill DbDatum from value of deviceAttribute
Doesn't work for case TangoConst.Tango_DEVVAR_CHARARRAY: case
TangoConst.Tango_DEVVAR_ULONGARRAY: case TangoConst.Tango_DEV_LONG: case
TangoConst.Tango_DEV_ULONG:
@param dbDatum
the DbDatum to fill
@param deviceAttribute
the DeviceAttribute that contains value
@throws DevFai... | [
"Fill",
"DbDatum",
"from",
"value",
"of",
"deviceAttribute"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/AttributeHelper.java#L4062-L4151 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/device/AroundInvokeImpl.java | AroundInvokeImpl.aroundInvoke | public void aroundInvoke(final InvocationContext ctx) throws DevFailed {
xlogger.entry();
if (aroundInvokeMethod != null) {
try {
aroundInvokeMethod.invoke(businessObject, ctx);
} catch (final IllegalArgumentException e) {
throw DevFailedUtils.newD... | java | public void aroundInvoke(final InvocationContext ctx) throws DevFailed {
xlogger.entry();
if (aroundInvokeMethod != null) {
try {
aroundInvokeMethod.invoke(businessObject, ctx);
} catch (final IllegalArgumentException e) {
throw DevFailedUtils.newD... | [
"public",
"void",
"aroundInvoke",
"(",
"final",
"InvocationContext",
"ctx",
")",
"throws",
"DevFailed",
"{",
"xlogger",
".",
"entry",
"(",
")",
";",
"if",
"(",
"aroundInvokeMethod",
"!=",
"null",
")",
"{",
"try",
"{",
"aroundInvokeMethod",
".",
"invoke",
"("... | Call aroundInvoke implementation
@param ctx
invocation context
@throws DevFailed | [
"Call",
"aroundInvoke",
"implementation"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/device/AroundInvokeImpl.java#L73-L91 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/build/BuilderUtils.java | BuilderUtils.checkStatic | static void checkStatic(final Field field) throws DevFailed {
if (Modifier.isStatic(field.getModifiers())) {
throw DevFailedUtils.newDevFailed(DevFailedUtils.TANGO_BUILD_FAILED, field + MUST_NOT_BE_STATIC);
}
} | java | static void checkStatic(final Field field) throws DevFailed {
if (Modifier.isStatic(field.getModifiers())) {
throw DevFailedUtils.newDevFailed(DevFailedUtils.TANGO_BUILD_FAILED, field + MUST_NOT_BE_STATIC);
}
} | [
"static",
"void",
"checkStatic",
"(",
"final",
"Field",
"field",
")",
"throws",
"DevFailed",
"{",
"if",
"(",
"Modifier",
".",
"isStatic",
"(",
"field",
".",
"getModifiers",
"(",
")",
")",
")",
"{",
"throw",
"DevFailedUtils",
".",
"newDevFailed",
"(",
"DevF... | Check if a field is static
@param field
@throws DevFailed
if static | [
"Check",
"if",
"a",
"field",
"is",
"static"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/build/BuilderUtils.java#L109-L113 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/build/BuilderUtils.java | BuilderUtils.setEnumLabelProperty | static AttributePropertiesImpl setEnumLabelProperty(final Class<?> type, final AttributePropertiesImpl props)
throws DevFailed {
// if is is an enum set enum values in properties
if (AttributeTangoType.getTypeFromClass(type).equals(AttributeTangoType.DEVENUM)) {
// final Class<En... | java | static AttributePropertiesImpl setEnumLabelProperty(final Class<?> type, final AttributePropertiesImpl props)
throws DevFailed {
// if is is an enum set enum values in properties
if (AttributeTangoType.getTypeFromClass(type).equals(AttributeTangoType.DEVENUM)) {
// final Class<En... | [
"static",
"AttributePropertiesImpl",
"setEnumLabelProperty",
"(",
"final",
"Class",
"<",
"?",
">",
"type",
",",
"final",
"AttributePropertiesImpl",
"props",
")",
"throws",
"DevFailed",
"{",
"// if is is an enum set enum values in properties",
"if",
"(",
"AttributeTangoType"... | Set enum label for Enum types
@param type
@param props
@throws DevFailed | [
"Set",
"enum",
"label",
"for",
"Enum",
"types"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/build/BuilderUtils.java#L174-L187 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/device/StateImpl.java | StateImpl.updateState | public DevState updateState() throws DevFailed {
xlogger.entry();
Object getState;
if (getStateMethod != null) {
try {
getState = getStateMethod.invoke(businessObject);
if (getState != null) {
if (getState instanceof DeviceState) {
... | java | public DevState updateState() throws DevFailed {
xlogger.entry();
Object getState;
if (getStateMethod != null) {
try {
getState = getStateMethod.invoke(businessObject);
if (getState != null) {
if (getState instanceof DeviceState) {
... | [
"public",
"DevState",
"updateState",
"(",
")",
"throws",
"DevFailed",
"{",
"xlogger",
".",
"entry",
"(",
")",
";",
"Object",
"getState",
";",
"if",
"(",
"getStateMethod",
"!=",
"null",
")",
"{",
"try",
"{",
"getState",
"=",
"getStateMethod",
".",
"invoke",... | get the state from the device
@return the state
@throws DevFailed | [
"get",
"the",
"state",
"from",
"the",
"device"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/device/StateImpl.java#L89-L119 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/device/StateImpl.java | StateImpl.stateMachine | public synchronized void stateMachine(final DeviceState state) throws DevFailed {
if (state != null) {
this.state = state.getDevState();
if (setStateMethod != null) {
logger.debug("Changing state to {}", state);
try {
if (setStateMethod... | java | public synchronized void stateMachine(final DeviceState state) throws DevFailed {
if (state != null) {
this.state = state.getDevState();
if (setStateMethod != null) {
logger.debug("Changing state to {}", state);
try {
if (setStateMethod... | [
"public",
"synchronized",
"void",
"stateMachine",
"(",
"final",
"DeviceState",
"state",
")",
"throws",
"DevFailed",
"{",
"if",
"(",
"state",
"!=",
"null",
")",
"{",
"this",
".",
"state",
"=",
"state",
".",
"getDevState",
"(",
")",
";",
"if",
"(",
"setSta... | change state of the device
@param state
@throws DevFailed | [
"change",
"state",
"of",
"the",
"device"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/device/StateImpl.java#L136-L160 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoDs/Util.java | Util.connect_db | public synchronized void connect_db() {
//
// Try to connect to the database
//
if (_daemon == true) {
boolean connected = false;
while (connected == false) {
try {
db = ApiUtil.get_db_obj();
if (db == null) {
Util.out4.println("Can't contact db server, will try later");
try {
... | java | public synchronized void connect_db() {
//
// Try to connect to the database
//
if (_daemon == true) {
boolean connected = false;
while (connected == false) {
try {
db = ApiUtil.get_db_obj();
if (db == null) {
Util.out4.println("Can't contact db server, will try later");
try {
... | [
"public",
"synchronized",
"void",
"connect_db",
"(",
")",
"{",
"//",
"// Try to connect to the database",
"//",
"if",
"(",
"_daemon",
"==",
"true",
")",
"{",
"boolean",
"connected",
"=",
"false",
";",
"while",
"(",
"connected",
"==",
"false",
")",
"{",
"try"... | Connect the process to the TANGO database.
If the connection to the database failed, a message is displayed on the
screen and the process is aborted | [
"Connect",
"the",
"process",
"to",
"the",
"TANGO",
"database",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/Util.java#L848-L892 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoDs/Util.java | Util.get_device_list | public Vector get_device_list(String pattern) {
// - The returned list
final Vector dl = new Vector();
// ------------------------------------------------------------------
// CASE I: pattern does not contain any '*' char - it's a device name
if (pattern.indexOf('*') == -1) {
DeviceImpl dev = null;
try ... | java | public Vector get_device_list(String pattern) {
// - The returned list
final Vector dl = new Vector();
// ------------------------------------------------------------------
// CASE I: pattern does not contain any '*' char - it's a device name
if (pattern.indexOf('*') == -1) {
DeviceImpl dev = null;
try ... | [
"public",
"Vector",
"get_device_list",
"(",
"String",
"pattern",
")",
"{",
"// - The returned list",
"final",
"Vector",
"dl",
"=",
"new",
"Vector",
"(",
")",
";",
"// ------------------------------------------------------------------",
"// CASE I: pattern does not contain any '... | Get the list of device references which name name match the specified
pattern Returns a null vector in case there is no device matching the
pattern
@param pattern
The device name pattern | [
"Get",
"the",
"list",
"of",
"device",
"references",
"which",
"name",
"name",
"match",
"the",
"specified",
"pattern",
"Returns",
"a",
"null",
"vector",
"in",
"case",
"there",
"is",
"no",
"device",
"matching",
"the",
"pattern"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/Util.java#L1027-L1091 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoDs/Util.java | Util.get_device_list_by_class | public Vector get_device_list_by_class(final String class_name) throws DevFailed {
//
// Retrieve class list. Don't use the get_dserver_device() method
// followed by
// the get_class_list(). In case of several classes embedded within
// the same server and the use of this method in the object creation, it
// wi... | java | public Vector get_device_list_by_class(final String class_name) throws DevFailed {
//
// Retrieve class list. Don't use the get_dserver_device() method
// followed by
// the get_class_list(). In case of several classes embedded within
// the same server and the use of this method in the object creation, it
// wi... | [
"public",
"Vector",
"get_device_list_by_class",
"(",
"final",
"String",
"class_name",
")",
"throws",
"DevFailed",
"{",
"//",
"// Retrieve class list. Don't use the get_dserver_device() method",
"// followed by",
"// the get_class_list(). In case of several classes embedded within",
"//... | Get the list of device references for a given TANGO class.
Return the list of references for all devices served by one
implementation of the TANGO device pattern implemented in the process
@param class_name
The TANGO device class name
@return The device reference list
@exception DevFailed
If in the device server proc... | [
"Get",
"the",
"list",
"of",
"device",
"references",
"for",
"a",
"given",
"TANGO",
"class",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/Util.java#L1110-L1149 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoDs/Util.java | Util.get_device_by_name | public DeviceImpl get_device_by_name(String dev_name) throws DevFailed {
//
// Retrieve class list. Don't use the get_dserver_device() method
// followed by
// the get_class_list(). In case of several classes embedded within
// the same server and the use of this method in the object creation, it
// will fail bec... | java | public DeviceImpl get_device_by_name(String dev_name) throws DevFailed {
//
// Retrieve class list. Don't use the get_dserver_device() method
// followed by
// the get_class_list(). In case of several classes embedded within
// the same server and the use of this method in the object creation, it
// will fail bec... | [
"public",
"DeviceImpl",
"get_device_by_name",
"(",
"String",
"dev_name",
")",
"throws",
"DevFailed",
"{",
"//",
"// Retrieve class list. Don't use the get_dserver_device() method",
"// followed by",
"// the get_class_list(). In case of several classes embedded within",
"// the same serve... | Get a device reference from its name
@param dev_name
The TANGO device name
@return The device reference
@exception DevFailed
If in the device is not served by one device pattern
implemented in this process. Click <a
href="../../tango_basic/idl_html/Tango.html#DevFailed"
>here</a> to read <b>DevFailed</b> exception spe... | [
"Get",
"a",
"device",
"reference",
"from",
"its",
"name"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/Util.java#L1164-L1229 | train |
tango-controls/JTango | dao/src/main/java/fr/esrf/TangoDs/Util.java | Util.unregister_server | public void unregister_server() {
Util.out4.println("Entering Tango::unregister_server method");
if (Util._UseDb == true) {
//
// Mark all the devices belonging to this server as unexported
//
try {
db.unexport_server(ds_name.toString());
} catch (final SystemException e) {
Except.pri... | java | public void unregister_server() {
Util.out4.println("Entering Tango::unregister_server method");
if (Util._UseDb == true) {
//
// Mark all the devices belonging to this server as unexported
//
try {
db.unexport_server(ds_name.toString());
} catch (final SystemException e) {
Except.pri... | [
"public",
"void",
"unregister_server",
"(",
")",
"{",
"Util",
".",
"out4",
".",
"println",
"(",
"\"Entering Tango::unregister_server method\"",
")",
";",
"if",
"(",
"Util",
".",
"_UseDb",
"==",
"true",
")",
"{",
"//",
"// Mark all the devices belonging to this serve... | Unregister a device server process from the TANGO database.
If the database call fails, a message is displayed on the screen and the
process is aborted | [
"Unregister",
"a",
"device",
"server",
"process",
"from",
"the",
"TANGO",
"database",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/Util.java#L1249-L1273 | train |
tango-controls/JTango | server/src/main/java/org/tango/server/device/InitImpl.java | InitImpl.execute | public synchronized void execute(final StateImpl stateImpl, final StatusImpl statusImpl) {
if (isLazy && !isInitInProgress()) {
final Callable<Void> initRunnable = new Callable<Void>() {
@Override
public Void call() throws DevFailed {
logger.debug(... | java | public synchronized void execute(final StateImpl stateImpl, final StatusImpl statusImpl) {
if (isLazy && !isInitInProgress()) {
final Callable<Void> initRunnable = new Callable<Void>() {
@Override
public Void call() throws DevFailed {
logger.debug(... | [
"public",
"synchronized",
"void",
"execute",
"(",
"final",
"StateImpl",
"stateImpl",
",",
"final",
"StatusImpl",
"statusImpl",
")",
"{",
"if",
"(",
"isLazy",
"&&",
"!",
"isInitInProgress",
"(",
")",
")",
"{",
"final",
"Callable",
"<",
"Void",
">",
"initRunna... | Execute the init
@param stateImpl
@param statusImpl
@throws DevFailed | [
"Execute",
"the",
"init"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/device/InitImpl.java#L117-L134 | train |
tango-controls/JTango | common/src/main/java/fr/esrf/TangoApi/PipeBlobBuilder.java | PipeBlobBuilder.add | public PipeBlobBuilder add(String name, Object value){
elements.add(PipeDataElement.newInstance(name, value));
return this;
} | java | public PipeBlobBuilder add(String name, Object value){
elements.add(PipeDataElement.newInstance(name, value));
return this;
} | [
"public",
"PipeBlobBuilder",
"add",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"elements",
".",
"add",
"(",
"PipeDataElement",
".",
"newInstance",
"(",
"name",
",",
"value",
")",
")",
";",
"return",
"this",
";",
"}"
] | Adds a generic array to this PipeBlob
@throws IllegalArgumentException if value is not an array | [
"Adds",
"a",
"generic",
"array",
"to",
"this",
"PipeBlob"
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/fr/esrf/TangoApi/PipeBlobBuilder.java#L138-L141 | train |
tango-controls/JTango | common/src/main/java/org/tango/utils/TangoUtil.java | TangoUtil.splitDeviceEntity | public static final Entry<String, String> splitDeviceEntity(final String entityName) throws DevFailed {
Entry<String, String> result = null;
final Matcher matcher = ENTITY_SPLIT_PATTERN.matcher(entityName.trim());
if (matcher.matches()) {
String device = null;
String ent... | java | public static final Entry<String, String> splitDeviceEntity(final String entityName) throws DevFailed {
Entry<String, String> result = null;
final Matcher matcher = ENTITY_SPLIT_PATTERN.matcher(entityName.trim());
if (matcher.matches()) {
String device = null;
String ent... | [
"public",
"static",
"final",
"Entry",
"<",
"String",
",",
"String",
">",
"splitDeviceEntity",
"(",
"final",
"String",
"entityName",
")",
"throws",
"DevFailed",
"{",
"Entry",
"<",
"String",
",",
"String",
">",
"result",
"=",
"null",
";",
"final",
"Matcher",
... | Splits an entity name into full device name and attribute name. Aliases will be resolved against tango db first.
@param entityName the entity name to split. It can contain aliases for device or attribute
@return a Map.Entry containing the full device name as key and the attribute name as value, or null if split was
no... | [
"Splits",
"an",
"entity",
"name",
"into",
"full",
"device",
"name",
"and",
"attribute",
"name",
".",
"Aliases",
"will",
"be",
"resolved",
"against",
"tango",
"db",
"first",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/org/tango/utils/TangoUtil.java#L173-L219 | train |
tango-controls/JTango | common/src/main/java/org/tango/utils/TangoUtil.java | TangoUtil.splitDeviceEntities | public static Map<String, Collection<String>> splitDeviceEntities(final Collection<String> entityNames) {
final Map<String, Collection<String>> result = new HashMap<String, Collection<String>>();
String device;
String entity;
for (final String entityName : entityNames) {
try... | java | public static Map<String, Collection<String>> splitDeviceEntities(final Collection<String> entityNames) {
final Map<String, Collection<String>> result = new HashMap<String, Collection<String>>();
String device;
String entity;
for (final String entityName : entityNames) {
try... | [
"public",
"static",
"Map",
"<",
"String",
",",
"Collection",
"<",
"String",
">",
">",
"splitDeviceEntities",
"(",
"final",
"Collection",
"<",
"String",
">",
"entityNames",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Collection",
"<",
"String",
">",
">",... | Splits a collection of entity names and group attributes by device.
@param entityNames a list of entity names to split
@return a map containing a list of attributes for each device. | [
"Splits",
"a",
"collection",
"of",
"entity",
"names",
"and",
"group",
"attributes",
"by",
"device",
"."
] | 1ccc9dcb83e6de2359a9f1906d170571cacf1345 | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/org/tango/utils/TangoUtil.java#L227-L253 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/CredentialFactory.java | CredentialFactory.getApplicationDefaultCredential | public static GoogleCredential getApplicationDefaultCredential() {
try {
GoogleCredential credential = GoogleCredential.getApplicationDefault();
if (credential.createScopedRequired()) {
credential =
credential.createScoped(Arrays.asList("https://www.googleapis.com/auth/genomics"));
... | java | public static GoogleCredential getApplicationDefaultCredential() {
try {
GoogleCredential credential = GoogleCredential.getApplicationDefault();
if (credential.createScopedRequired()) {
credential =
credential.createScoped(Arrays.asList("https://www.googleapis.com/auth/genomics"));
... | [
"public",
"static",
"GoogleCredential",
"getApplicationDefaultCredential",
"(",
")",
"{",
"try",
"{",
"GoogleCredential",
"credential",
"=",
"GoogleCredential",
".",
"getApplicationDefault",
"(",
")",
";",
"if",
"(",
"credential",
".",
"createScopedRequired",
"(",
")"... | Obtain the Application Default com.google.api.client.auth.oauth2.Credential
@return the Application Default Credential | [
"Obtain",
"the",
"Application",
"Default",
"com",
".",
"google",
".",
"api",
".",
"client",
".",
"auth",
".",
"oauth2",
".",
"Credential"
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/CredentialFactory.java#L79-L90 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/CredentialFactory.java | CredentialFactory.getCredentialFromClientSecrets | public static Credential getCredentialFromClientSecrets(String clientSecretsFile,
String credentialId) {
Preconditions.checkArgument(clientSecretsFile != null);
Preconditions.checkArgument(credentialId != null);
HttpTransport httpTransport;
try {
httpTransport = GoogleNetHttpTransport.newTr... | java | public static Credential getCredentialFromClientSecrets(String clientSecretsFile,
String credentialId) {
Preconditions.checkArgument(clientSecretsFile != null);
Preconditions.checkArgument(credentialId != null);
HttpTransport httpTransport;
try {
httpTransport = GoogleNetHttpTransport.newTr... | [
"public",
"static",
"Credential",
"getCredentialFromClientSecrets",
"(",
"String",
"clientSecretsFile",
",",
"String",
"credentialId",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"clientSecretsFile",
"!=",
"null",
")",
";",
"Preconditions",
".",
"checkArgument... | Creates an OAuth2 credential from client secrets, which may require an interactive authorization prompt.
Use this method when the Application Default Credential is not sufficient.
@param clientSecretsFile The {@code client_secrets.json} file path.
@param credentialId The credentialId for use in identifying the creden... | [
"Creates",
"an",
"OAuth2",
"credential",
"from",
"client",
"secrets",
"which",
"may",
"require",
"an",
"interactive",
"authorization",
"prompt",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/CredentialFactory.java#L117-L167 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/grpc/VariantUtils.java | VariantUtils.isOverlapping | public static boolean isOverlapping(Variant blockRecord, Variant.Builder variant) {
return blockRecord.getStart() <= variant.getStart()
&& blockRecord.getEnd() >= variant.getStart() + 1;
} | java | public static boolean isOverlapping(Variant blockRecord, Variant.Builder variant) {
return blockRecord.getStart() <= variant.getStart()
&& blockRecord.getEnd() >= variant.getStart() + 1;
} | [
"public",
"static",
"boolean",
"isOverlapping",
"(",
"Variant",
"blockRecord",
",",
"Variant",
".",
"Builder",
"variant",
")",
"{",
"return",
"blockRecord",
".",
"getStart",
"(",
")",
"<=",
"variant",
".",
"getStart",
"(",
")",
"&&",
"blockRecord",
".",
"get... | Determine whether the first variant overlaps the second variant.
This is particularly useful when determining whether a non-variant segment overlaps a variant.
@param blockRecord
@param variant
@return true, if the first variant overlaps the second variant | [
"Determine",
"whether",
"the",
"first",
"variant",
"overlaps",
"the",
"second",
"variant",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/grpc/VariantUtils.java#L246-L249 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/grpc/VariantUtils.java | VariantUtils.isSameVariantSite | public static final boolean isSameVariantSite(Variant.Builder variant1, Variant variant2) {
return variant1.getReferenceName().equals(variant2.getReferenceName())
&& variant1.getReferenceBases().equals(variant2.getReferenceBases())
&& variant1.getStart() == variant2.getStart();
} | java | public static final boolean isSameVariantSite(Variant.Builder variant1, Variant variant2) {
return variant1.getReferenceName().equals(variant2.getReferenceName())
&& variant1.getReferenceBases().equals(variant2.getReferenceBases())
&& variant1.getStart() == variant2.getStart();
} | [
"public",
"static",
"final",
"boolean",
"isSameVariantSite",
"(",
"Variant",
".",
"Builder",
"variant1",
",",
"Variant",
"variant2",
")",
"{",
"return",
"variant1",
".",
"getReferenceName",
"(",
")",
".",
"equals",
"(",
"variant2",
".",
"getReferenceName",
"(",
... | Determine whether two variants occur at the same site in the genome, where "site"
is defined by reference name, start position, and reference bases.
The reference bases are taken into account particularly for indels.
@param variant1
@param variant2
@return true, if they occur at the same site | [
"Determine",
"whether",
"two",
"variants",
"occur",
"at",
"the",
"same",
"site",
"in",
"the",
"genome",
"where",
"site",
"is",
"defined",
"by",
"reference",
"name",
"start",
"position",
"and",
"reference",
"bases",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/grpc/VariantUtils.java#L261-L265 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/grpc/GenomicsChannel.java | GenomicsChannel.fromCreds | public static ManagedChannel fromCreds(GoogleCredentials creds, String fields) throws SSLException {
List<ClientInterceptor> interceptors = new ArrayList();
interceptors.add(new ClientAuthInterceptor(creds.createScoped(Arrays.asList(GENOMICS_SCOPE)),
Executors.newSingleThreadExecutor()));
if (!Strin... | java | public static ManagedChannel fromCreds(GoogleCredentials creds, String fields) throws SSLException {
List<ClientInterceptor> interceptors = new ArrayList();
interceptors.add(new ClientAuthInterceptor(creds.createScoped(Arrays.asList(GENOMICS_SCOPE)),
Executors.newSingleThreadExecutor()));
if (!Strin... | [
"public",
"static",
"ManagedChannel",
"fromCreds",
"(",
"GoogleCredentials",
"creds",
",",
"String",
"fields",
")",
"throws",
"SSLException",
"{",
"List",
"<",
"ClientInterceptor",
">",
"interceptors",
"=",
"new",
"ArrayList",
"(",
")",
";",
"interceptors",
".",
... | Create a new gRPC channel to the Google Genomics API, using the provided credentials for auth.
@param creds The credential.
@param fields Which fields to return in the partial response, or null for none.
@return The ManagedChannel.
@throws SSLException | [
"Create",
"a",
"new",
"gRPC",
"channel",
"to",
"the",
"Google",
"Genomics",
"API",
"using",
"the",
"provided",
"credentials",
"for",
"auth",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/grpc/GenomicsChannel.java#L74-L86 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/grpc/GenomicsChannel.java | GenomicsChannel.fromDefaultCreds | public static ManagedChannel fromDefaultCreds(String fields) throws SSLException, IOException {
return fromCreds(CredentialFactory.getApplicationDefaultCredentials(), fields);
} | java | public static ManagedChannel fromDefaultCreds(String fields) throws SSLException, IOException {
return fromCreds(CredentialFactory.getApplicationDefaultCredentials(), fields);
} | [
"public",
"static",
"ManagedChannel",
"fromDefaultCreds",
"(",
"String",
"fields",
")",
"throws",
"SSLException",
",",
"IOException",
"{",
"return",
"fromCreds",
"(",
"CredentialFactory",
".",
"getApplicationDefaultCredentials",
"(",
")",
",",
"fields",
")",
";",
"}... | Create a new gRPC channel to the Google Genomics API, using the application default credentials
for auth.
@param fields Which fields to return in the partial response, or null for none.
@return The ManagedChannel.
@throws SSLException
@throws IOException | [
"Create",
"a",
"new",
"gRPC",
"channel",
"to",
"the",
"Google",
"Genomics",
"API",
"using",
"the",
"application",
"default",
"credentials",
"for",
"auth",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/grpc/GenomicsChannel.java#L109-L111 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/grpc/GenomicsChannel.java | GenomicsChannel.fromOfflineAuth | public static ManagedChannel fromOfflineAuth(OfflineAuth auth, String fields)
throws IOException, GeneralSecurityException {
return fromCreds(auth.getCredentials(), fields);
} | java | public static ManagedChannel fromOfflineAuth(OfflineAuth auth, String fields)
throws IOException, GeneralSecurityException {
return fromCreds(auth.getCredentials(), fields);
} | [
"public",
"static",
"ManagedChannel",
"fromOfflineAuth",
"(",
"OfflineAuth",
"auth",
",",
"String",
"fields",
")",
"throws",
"IOException",
",",
"GeneralSecurityException",
"{",
"return",
"fromCreds",
"(",
"auth",
".",
"getCredentials",
"(",
")",
",",
"fields",
")... | Create a new gRPC channel to the Google Genomics API, using either OfflineAuth
or the application default credentials.
This library will work with both the newer and older versions of OAuth2 client-side support.
https://developers.google.com/identity/protocols/application-default-credentials
@param auth The OfflineA... | [
"Create",
"a",
"new",
"gRPC",
"channel",
"to",
"the",
"Google",
"Genomics",
"API",
"using",
"either",
"OfflineAuth",
"or",
"the",
"application",
"default",
"credentials",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/grpc/GenomicsChannel.java#L145-L148 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java | GenomicsUtils.getReadGroupSetIds | public static List<String> getReadGroupSetIds(String datasetId, OfflineAuth auth) throws IOException {
List<String> output = Lists.newArrayList();
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
Iterable<ReadGroupSet> rgs = Paginator.ReadGroupSets.create(genomics)
.searc... | java | public static List<String> getReadGroupSetIds(String datasetId, OfflineAuth auth) throws IOException {
List<String> output = Lists.newArrayList();
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
Iterable<ReadGroupSet> rgs = Paginator.ReadGroupSets.create(genomics)
.searc... | [
"public",
"static",
"List",
"<",
"String",
">",
"getReadGroupSetIds",
"(",
"String",
"datasetId",
",",
"OfflineAuth",
"auth",
")",
"throws",
"IOException",
"{",
"List",
"<",
"String",
">",
"output",
"=",
"Lists",
".",
"newArrayList",
"(",
")",
";",
"Genomics... | Gets ReadGroupSetIds from a given datasetId using the Genomics API.
@param datasetId The id of the dataset to query.
@param auth The OfflineAuth for the API request.
@return The list of readGroupSetIds in the dataset.
@throws IOException If dataset does not contain any readGroupSets. | [
"Gets",
"ReadGroupSetIds",
"from",
"a",
"given",
"datasetId",
"using",
"the",
"Genomics",
"API",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java#L47-L60 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java | GenomicsUtils.getReferenceSetId | public static String getReferenceSetId(String readGroupSetId, OfflineAuth auth)
throws IOException {
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
ReadGroupSet readGroupSet = genomics.readgroupsets().get(readGroupSetId)
.setFields("referenceSetId").execute();
ret... | java | public static String getReferenceSetId(String readGroupSetId, OfflineAuth auth)
throws IOException {
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
ReadGroupSet readGroupSet = genomics.readgroupsets().get(readGroupSetId)
.setFields("referenceSetId").execute();
ret... | [
"public",
"static",
"String",
"getReferenceSetId",
"(",
"String",
"readGroupSetId",
",",
"OfflineAuth",
"auth",
")",
"throws",
"IOException",
"{",
"Genomics",
"genomics",
"=",
"GenomicsFactory",
".",
"builder",
"(",
")",
".",
"build",
"(",
")",
".",
"fromOffline... | Gets the ReferenceSetId for a given readGroupSetId using the Genomics API.
@param readGroupSetId The id of the readGroupSet to query.
@param auth The OfflineAuth for the API request.
@return The referenceSetId for the redGroupSet (which may be null).
@throws IOException | [
"Gets",
"the",
"ReferenceSetId",
"for",
"a",
"given",
"readGroupSetId",
"using",
"the",
"Genomics",
"API",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java#L70-L76 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java | GenomicsUtils.getCoverageBuckets | public static List<CoverageBucket> getCoverageBuckets(String readGroupSetId, OfflineAuth auth)
throws IOException {
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
ListCoverageBucketsResponse response =
genomics.readgroupsets().coveragebuckets().list(readGroupSetId).ex... | java | public static List<CoverageBucket> getCoverageBuckets(String readGroupSetId, OfflineAuth auth)
throws IOException {
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
ListCoverageBucketsResponse response =
genomics.readgroupsets().coveragebuckets().list(readGroupSetId).ex... | [
"public",
"static",
"List",
"<",
"CoverageBucket",
">",
"getCoverageBuckets",
"(",
"String",
"readGroupSetId",
",",
"OfflineAuth",
"auth",
")",
"throws",
"IOException",
"{",
"Genomics",
"genomics",
"=",
"GenomicsFactory",
".",
"builder",
"(",
")",
".",
"build",
... | Gets the CoverageBuckets for a given readGroupSetId using the Genomics API.
@param readGroupSetId The id of the readGroupSet to query.
@param auth The OfflineAuth for the API request.
@return The list of reference bounds in the variantSet.
@throws IOException | [
"Gets",
"the",
"CoverageBuckets",
"for",
"a",
"given",
"readGroupSetId",
"using",
"the",
"Genomics",
"API",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java#L86-L98 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java | GenomicsUtils.getReferences | public static Iterable<Reference> getReferences(String referenceSetId, OfflineAuth auth)
throws IOException {
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
return Paginator.References.create(
genomics).search(new SearchReferencesRequest().setReferenceSetId(referenceS... | java | public static Iterable<Reference> getReferences(String referenceSetId, OfflineAuth auth)
throws IOException {
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
return Paginator.References.create(
genomics).search(new SearchReferencesRequest().setReferenceSetId(referenceS... | [
"public",
"static",
"Iterable",
"<",
"Reference",
">",
"getReferences",
"(",
"String",
"referenceSetId",
",",
"OfflineAuth",
"auth",
")",
"throws",
"IOException",
"{",
"Genomics",
"genomics",
"=",
"GenomicsFactory",
".",
"builder",
"(",
")",
".",
"build",
"(",
... | Gets the references for a given referenceSetId using the Genomics API.
@param referenceSetId The id of the referenceSet to query.
@param auth The OfflineAuth for the API request.
@return The list of references in the referenceSet.
@throws IOException | [
"Gets",
"the",
"references",
"for",
"a",
"given",
"referenceSetId",
"using",
"the",
"Genomics",
"API",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java#L109-L114 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java | GenomicsUtils.getVariantSetIds | public static List<String> getVariantSetIds(String datasetId, OfflineAuth auth)
throws IOException {
List<String> output = Lists.newArrayList();
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
Iterable<VariantSet> vs = Paginator.Variantsets.create(genomics)
.search... | java | public static List<String> getVariantSetIds(String datasetId, OfflineAuth auth)
throws IOException {
List<String> output = Lists.newArrayList();
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
Iterable<VariantSet> vs = Paginator.Variantsets.create(genomics)
.search... | [
"public",
"static",
"List",
"<",
"String",
">",
"getVariantSetIds",
"(",
"String",
"datasetId",
",",
"OfflineAuth",
"auth",
")",
"throws",
"IOException",
"{",
"List",
"<",
"String",
">",
"output",
"=",
"Lists",
".",
"newArrayList",
"(",
")",
";",
"Genomics",... | Gets VariantSetIds from a given datasetId using the Genomics API.
@param datasetId The id of the dataset to query.
@param auth The OfflineAuth for the API request.
@return The list of variantSetIds in the dataset.
@throws IOException If dataset does not contain any variantSets. | [
"Gets",
"VariantSetIds",
"from",
"a",
"given",
"datasetId",
"using",
"the",
"Genomics",
"API",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java#L124-L138 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java | GenomicsUtils.getCallSets | public static Iterable<CallSet> getCallSets(String variantSetId, OfflineAuth auth)
throws IOException {
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
return Paginator.Callsets.create(genomics)
.search(new SearchCallSetsRequest().setVariantSetIds(Lists.newArrayList(va... | java | public static Iterable<CallSet> getCallSets(String variantSetId, OfflineAuth auth)
throws IOException {
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
return Paginator.Callsets.create(genomics)
.search(new SearchCallSetsRequest().setVariantSetIds(Lists.newArrayList(va... | [
"public",
"static",
"Iterable",
"<",
"CallSet",
">",
"getCallSets",
"(",
"String",
"variantSetId",
",",
"OfflineAuth",
"auth",
")",
"throws",
"IOException",
"{",
"Genomics",
"genomics",
"=",
"GenomicsFactory",
".",
"builder",
"(",
")",
".",
"build",
"(",
")",
... | Gets CallSets for a given variantSetId using the Genomics API.
@param variantSetId The id of the variantSet to query.
@param auth The OfflineAuth for the API request.
@return The list of callSet names in the variantSet.
@throws IOException If variantSet does not contain any CallSets. | [
"Gets",
"CallSets",
"for",
"a",
"given",
"variantSetId",
"using",
"the",
"Genomics",
"API",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java#L148-L154 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java | GenomicsUtils.getCallSetsNames | public static List<String> getCallSetsNames(String variantSetId, OfflineAuth auth)
throws IOException {
List<String> output = Lists.newArrayList();
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
Iterable<CallSet> cs = Paginator.Callsets.create(genomics)
.search(ne... | java | public static List<String> getCallSetsNames(String variantSetId, OfflineAuth auth)
throws IOException {
List<String> output = Lists.newArrayList();
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
Iterable<CallSet> cs = Paginator.Callsets.create(genomics)
.search(ne... | [
"public",
"static",
"List",
"<",
"String",
">",
"getCallSetsNames",
"(",
"String",
"variantSetId",
",",
"OfflineAuth",
"auth",
")",
"throws",
"IOException",
"{",
"List",
"<",
"String",
">",
"output",
"=",
"Lists",
".",
"newArrayList",
"(",
")",
";",
"Genomic... | Gets CallSets Names for a given variantSetId using the Genomics API.
@param variantSetId The id of the variantSet to query.
@param auth The OfflineAuth for the API request.
@return The list of callSet names in the variantSet.
@throws IOException If variantSet does not contain any CallSets. | [
"Gets",
"CallSets",
"Names",
"for",
"a",
"given",
"variantSetId",
"using",
"the",
"Genomics",
"API",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java#L164-L178 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java | GenomicsUtils.getReferenceBounds | public static List<ReferenceBound> getReferenceBounds(String variantSetId, OfflineAuth auth)
throws IOException {
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
VariantSet variantSet = genomics.variantsets().get(variantSetId).execute();
return variantSet.getReferenceBound... | java | public static List<ReferenceBound> getReferenceBounds(String variantSetId, OfflineAuth auth)
throws IOException {
Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth);
VariantSet variantSet = genomics.variantsets().get(variantSetId).execute();
return variantSet.getReferenceBound... | [
"public",
"static",
"List",
"<",
"ReferenceBound",
">",
"getReferenceBounds",
"(",
"String",
"variantSetId",
",",
"OfflineAuth",
"auth",
")",
"throws",
"IOException",
"{",
"Genomics",
"genomics",
"=",
"GenomicsFactory",
".",
"builder",
"(",
")",
".",
"build",
"(... | Gets the ReferenceBounds for a given variantSetId using the Genomics API.
@param variantSetId The id of the variantSet to query.
@param auth The OfflineAuth for the API request.
@return The list of reference bounds in the variantSet.
@throws IOException | [
"Gets",
"the",
"ReferenceBounds",
"for",
"a",
"given",
"variantSetId",
"using",
"the",
"Genomics",
"API",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java#L188-L193 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/Contig.java | Contig.parseContigsFromCommandLine | public static Iterable<Contig> parseContigsFromCommandLine(String contigsArgument) {
return Iterables.transform(Splitter.on(",").split(contigsArgument),
new Function<String, Contig>() {
@Override
public Contig apply(String contigString) {
ArrayList<String> contigInfo = newArr... | java | public static Iterable<Contig> parseContigsFromCommandLine(String contigsArgument) {
return Iterables.transform(Splitter.on(",").split(contigsArgument),
new Function<String, Contig>() {
@Override
public Contig apply(String contigString) {
ArrayList<String> contigInfo = newArr... | [
"public",
"static",
"Iterable",
"<",
"Contig",
">",
"parseContigsFromCommandLine",
"(",
"String",
"contigsArgument",
")",
"{",
"return",
"Iterables",
".",
"transform",
"(",
"Splitter",
".",
"on",
"(",
"\",\"",
")",
".",
"split",
"(",
"contigsArgument",
")",
",... | Parse the list of Contigs expressed in the string argument.
The common use case is to parse the value of a command line parameter.
@param contigsArgument - a string expressing the specified contiguous region(s) of the genome.
The format is chromosome:start:end[,chromosome:start:end]
@return a list of Contig objects | [
"Parse",
"the",
"list",
"of",
"Contigs",
"expressed",
"in",
"the",
"string",
"argument",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/Contig.java#L80-L93 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/Contig.java | Contig.getShards | List<Contig> getShards(long numberOfBasesPerShard) {
double shardCount = (end - start) / (double) numberOfBasesPerShard;
List<Contig> shards = Lists.newArrayList();
for (int i = 0; i < shardCount; i++) {
long shardStart = start + (i * numberOfBasesPerShard);
long shardEnd = Math.min(end, shardSt... | java | List<Contig> getShards(long numberOfBasesPerShard) {
double shardCount = (end - start) / (double) numberOfBasesPerShard;
List<Contig> shards = Lists.newArrayList();
for (int i = 0; i < shardCount; i++) {
long shardStart = start + (i * numberOfBasesPerShard);
long shardEnd = Math.min(end, shardSt... | [
"List",
"<",
"Contig",
">",
"getShards",
"(",
"long",
"numberOfBasesPerShard",
")",
"{",
"double",
"shardCount",
"=",
"(",
"end",
"-",
"start",
")",
"/",
"(",
"double",
")",
"numberOfBasesPerShard",
";",
"List",
"<",
"Contig",
">",
"shards",
"=",
"Lists",
... | being returned to clients. | [
"being",
"returned",
"to",
"clients",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/Contig.java#L98-L108 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/Contig.java | Contig.getStreamVariantsRequest | @Deprecated
public StreamVariantsRequest getStreamVariantsRequest(String variantSetId) {
return StreamVariantsRequest.newBuilder()
.setVariantSetId(variantSetId)
.setReferenceName(referenceName)
.setStart(start)
.setEnd(end)
.build();
} | java | @Deprecated
public StreamVariantsRequest getStreamVariantsRequest(String variantSetId) {
return StreamVariantsRequest.newBuilder()
.setVariantSetId(variantSetId)
.setReferenceName(referenceName)
.setStart(start)
.setEnd(end)
.build();
} | [
"@",
"Deprecated",
"public",
"StreamVariantsRequest",
"getStreamVariantsRequest",
"(",
"String",
"variantSetId",
")",
"{",
"return",
"StreamVariantsRequest",
".",
"newBuilder",
"(",
")",
".",
"setVariantSetId",
"(",
"variantSetId",
")",
".",
"setReferenceName",
"(",
"... | Construct a StreamVariantsRequest for the Contig.
@param variantSetId
@return the request object | [
"Construct",
"a",
"StreamVariantsRequest",
"for",
"the",
"Contig",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/Contig.java#L115-L123 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/Contig.java | Contig.getStreamReadsRequest | @Deprecated
public StreamReadsRequest getStreamReadsRequest(String readGroupSetId) {
return StreamReadsRequest.newBuilder()
.setReadGroupSetId(readGroupSetId)
.setReferenceName(referenceName)
.setStart(start)
.setEnd(end)
.build();
} | java | @Deprecated
public StreamReadsRequest getStreamReadsRequest(String readGroupSetId) {
return StreamReadsRequest.newBuilder()
.setReadGroupSetId(readGroupSetId)
.setReferenceName(referenceName)
.setStart(start)
.setEnd(end)
.build();
} | [
"@",
"Deprecated",
"public",
"StreamReadsRequest",
"getStreamReadsRequest",
"(",
"String",
"readGroupSetId",
")",
"{",
"return",
"StreamReadsRequest",
".",
"newBuilder",
"(",
")",
".",
"setReadGroupSetId",
"(",
"readGroupSetId",
")",
".",
"setReferenceName",
"(",
"ref... | Construct a StreamReadsRequest for the Contig.
@param readGroupSetId
@return the request object | [
"Construct",
"a",
"StreamReadsRequest",
"for",
"the",
"Contig",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/Contig.java#L130-L138 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/Contig.java | Contig.getStreamVariantsRequest | public StreamVariantsRequest getStreamVariantsRequest(StreamVariantsRequest prototype) {
return StreamVariantsRequest.newBuilder(prototype)
.setReferenceName(referenceName)
.setStart(start)
.setEnd(end)
.build();
} | java | public StreamVariantsRequest getStreamVariantsRequest(StreamVariantsRequest prototype) {
return StreamVariantsRequest.newBuilder(prototype)
.setReferenceName(referenceName)
.setStart(start)
.setEnd(end)
.build();
} | [
"public",
"StreamVariantsRequest",
"getStreamVariantsRequest",
"(",
"StreamVariantsRequest",
"prototype",
")",
"{",
"return",
"StreamVariantsRequest",
".",
"newBuilder",
"(",
"prototype",
")",
".",
"setReferenceName",
"(",
"referenceName",
")",
".",
"setStart",
"(",
"st... | Construct a StreamVariantsRequest for the Contig using a prototype using a prototype request.
@param prototype A partially filled in request object.
@return the request object | [
"Construct",
"a",
"StreamVariantsRequest",
"for",
"the",
"Contig",
"using",
"a",
"prototype",
"using",
"a",
"prototype",
"request",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/Contig.java#L146-L152 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/Contig.java | Contig.getStreamReadsRequest | public StreamReadsRequest getStreamReadsRequest(StreamReadsRequest prototype) {
return StreamReadsRequest.newBuilder(prototype)
.setReferenceName(referenceName)
.setStart(start)
.setEnd(end)
.build();
} | java | public StreamReadsRequest getStreamReadsRequest(StreamReadsRequest prototype) {
return StreamReadsRequest.newBuilder(prototype)
.setReferenceName(referenceName)
.setStart(start)
.setEnd(end)
.build();
} | [
"public",
"StreamReadsRequest",
"getStreamReadsRequest",
"(",
"StreamReadsRequest",
"prototype",
")",
"{",
"return",
"StreamReadsRequest",
".",
"newBuilder",
"(",
"prototype",
")",
".",
"setReferenceName",
"(",
"referenceName",
")",
".",
"setStart",
"(",
"start",
")",... | Construct a StreamReadsRequest for the Contig using a prototype request.
@param prototype A partially filled in request object.
@return the request object | [
"Construct",
"a",
"StreamReadsRequest",
"for",
"the",
"Contig",
"using",
"a",
"prototype",
"request",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/Contig.java#L160-L166 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/OfflineAuth.java | OfflineAuth.getCredential | public Credential getCredential() {
if (hasStoredCredential()) {
HttpTransport httpTransport;
try {
httpTransport = GoogleNetHttpTransport.newTrustedTransport();
} catch (IOException | GeneralSecurityException e) {
throw new RuntimeException("Could not create HTTPS transport for us... | java | public Credential getCredential() {
if (hasStoredCredential()) {
HttpTransport httpTransport;
try {
httpTransport = GoogleNetHttpTransport.newTrustedTransport();
} catch (IOException | GeneralSecurityException e) {
throw new RuntimeException("Could not create HTTPS transport for us... | [
"public",
"Credential",
"getCredential",
"(",
")",
"{",
"if",
"(",
"hasStoredCredential",
"(",
")",
")",
"{",
"HttpTransport",
"httpTransport",
";",
"try",
"{",
"httpTransport",
"=",
"GoogleNetHttpTransport",
".",
"newTrustedTransport",
"(",
")",
";",
"}",
"catc... | Return the stored user credential, if applicable, or fall back to the Application Default Credential.
@return The com.google.api.client.auth.oauth2.Credential object. | [
"Return",
"the",
"stored",
"user",
"credential",
"if",
"applicable",
"or",
"fall",
"back",
"to",
"the",
"Application",
"Default",
"Credential",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/OfflineAuth.java#L141-L158 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java | GenomicsFactory.fromApiKey | public <T extends AbstractGoogleJsonClient.Builder> T fromApiKey(T builder, String apiKey) {
Preconditions.checkNotNull(builder);
Preconditions.checkNotNull(apiKey);
return prepareBuilder(builder, null, new CommonGoogleClientRequestInitializer(apiKey));
} | java | public <T extends AbstractGoogleJsonClient.Builder> T fromApiKey(T builder, String apiKey) {
Preconditions.checkNotNull(builder);
Preconditions.checkNotNull(apiKey);
return prepareBuilder(builder, null, new CommonGoogleClientRequestInitializer(apiKey));
} | [
"public",
"<",
"T",
"extends",
"AbstractGoogleJsonClient",
".",
"Builder",
">",
"T",
"fromApiKey",
"(",
"T",
"builder",
",",
"String",
"apiKey",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"builder",
")",
";",
"Preconditions",
".",
"checkNotNull",
"("... | Prepare an AbstractGoogleJsonClient.Builder using an API key.
@param builder The builder to be prepared.
@param apiKey The API key of the Google Cloud Platform project.
@return The passed in builder, for easy chaining. | [
"Prepare",
"an",
"AbstractGoogleJsonClient",
".",
"Builder",
"using",
"an",
"API",
"key",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java#L353-L357 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java | GenomicsFactory.fromCredential | public <T extends AbstractGoogleJsonClient.Builder> T fromCredential(T builder, Credential credential) {
Preconditions.checkNotNull(builder);
Preconditions.checkNotNull(credential);
return prepareBuilder(builder, credential, null);
} | java | public <T extends AbstractGoogleJsonClient.Builder> T fromCredential(T builder, Credential credential) {
Preconditions.checkNotNull(builder);
Preconditions.checkNotNull(credential);
return prepareBuilder(builder, credential, null);
} | [
"public",
"<",
"T",
"extends",
"AbstractGoogleJsonClient",
".",
"Builder",
">",
"T",
"fromCredential",
"(",
"T",
"builder",
",",
"Credential",
"credential",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"builder",
")",
";",
"Preconditions",
".",
"checkNot... | Prepare an AbstractGoogleJsonClient.Builder using a credential.
@param builder The builder to be prepared.
@param credential The credential to be used for requests.
@return The passed in builder, for easy chaining. | [
"Prepare",
"an",
"AbstractGoogleJsonClient",
".",
"Builder",
"using",
"a",
"credential",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java#L405-L409 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java | GenomicsFactory.fromApplicationDefaultCredential | public <T extends AbstractGoogleJsonClient.Builder> T fromApplicationDefaultCredential(T builder) {
Preconditions.checkNotNull(builder);
return fromCredential(builder, CredentialFactory.getApplicationDefaultCredential());
} | java | public <T extends AbstractGoogleJsonClient.Builder> T fromApplicationDefaultCredential(T builder) {
Preconditions.checkNotNull(builder);
return fromCredential(builder, CredentialFactory.getApplicationDefaultCredential());
} | [
"public",
"<",
"T",
"extends",
"AbstractGoogleJsonClient",
".",
"Builder",
">",
"T",
"fromApplicationDefaultCredential",
"(",
"T",
"builder",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"builder",
")",
";",
"return",
"fromCredential",
"(",
"builder",
",",... | Prepare an AbstractGoogleJsonClient.Builder using the Application Default Credential.
@param builder The builder to be prepared.
@return The passed in builder, for easy chaining. | [
"Prepare",
"an",
"AbstractGoogleJsonClient",
".",
"Builder",
"using",
"the",
"Application",
"Default",
"Credential",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java#L426-L429 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java | GenomicsFactory.fromOfflineAuth | public Genomics fromOfflineAuth(OfflineAuth auth) {
Preconditions.checkNotNull(auth);
return fromOfflineAuth(getGenomicsBuilder(), auth).build();
} | java | public Genomics fromOfflineAuth(OfflineAuth auth) {
Preconditions.checkNotNull(auth);
return fromOfflineAuth(getGenomicsBuilder(), auth).build();
} | [
"public",
"Genomics",
"fromOfflineAuth",
"(",
"OfflineAuth",
"auth",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"auth",
")",
";",
"return",
"fromOfflineAuth",
"(",
"getGenomicsBuilder",
"(",
")",
",",
"auth",
")",
".",
"build",
"(",
")",
";",
"}"
] | Create a new genomics stub from the given OfflineAuth object.
@param auth The OfflineAuth
@return The new {@code Genomics} stub | [
"Create",
"a",
"new",
"genomics",
"stub",
"from",
"the",
"given",
"OfflineAuth",
"object",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java#L478-L481 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java | GenomicsFactory.fromOfflineAuth | public <T extends AbstractGoogleJsonClient.Builder> T fromOfflineAuth(T builder, OfflineAuth auth) {
Preconditions.checkNotNull(builder);
Preconditions.checkNotNull(auth);
if(auth.hasApiKey()) {
return fromApiKey(builder, auth.getApiKey());
}
return fromCredential(builder, auth.getCredential()... | java | public <T extends AbstractGoogleJsonClient.Builder> T fromOfflineAuth(T builder, OfflineAuth auth) {
Preconditions.checkNotNull(builder);
Preconditions.checkNotNull(auth);
if(auth.hasApiKey()) {
return fromApiKey(builder, auth.getApiKey());
}
return fromCredential(builder, auth.getCredential()... | [
"public",
"<",
"T",
"extends",
"AbstractGoogleJsonClient",
".",
"Builder",
">",
"T",
"fromOfflineAuth",
"(",
"T",
"builder",
",",
"OfflineAuth",
"auth",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"builder",
")",
";",
"Preconditions",
".",
"checkNotNull... | Prepare an AbstractGoogleJsonClient.Builder with the given OfflineAuth object.
@param builder The builder to be prepared.
@param auth The OfflineAuth
@return The passed in builder, for easy chaining. | [
"Prepare",
"an",
"AbstractGoogleJsonClient",
".",
"Builder",
"with",
"the",
"given",
"OfflineAuth",
"object",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsFactory.java#L490-L497 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/CallSetUtils.java | CallSetUtils.getCallSetNameMapping | public static final BiMap<String, String> getCallSetNameMapping(Iterable<CallSet> callSets) {
BiMap<String, String> idToName = HashBiMap.create();
for(CallSet callSet : callSets) {
// Dev Note: Be sure to keep this map loading as id -> name since it ensures that
// the values are unique.
idToN... | java | public static final BiMap<String, String> getCallSetNameMapping(Iterable<CallSet> callSets) {
BiMap<String, String> idToName = HashBiMap.create();
for(CallSet callSet : callSets) {
// Dev Note: Be sure to keep this map loading as id -> name since it ensures that
// the values are unique.
idToN... | [
"public",
"static",
"final",
"BiMap",
"<",
"String",
",",
"String",
">",
"getCallSetNameMapping",
"(",
"Iterable",
"<",
"CallSet",
">",
"callSets",
")",
"{",
"BiMap",
"<",
"String",
",",
"String",
">",
"idToName",
"=",
"HashBiMap",
".",
"create",
"(",
")",... | Create a bi-directional map of names to ids for a collection of callsets.
As a side effect, this will throw an IllegalArgumentException when the collection of callsets
is malformed due to multiple is mapping to the same name.
@param callSets
@return the bi-directional map | [
"Create",
"a",
"bi",
"-",
"directional",
"map",
"of",
"names",
"to",
"ids",
"for",
"a",
"collection",
"of",
"callsets",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/CallSetUtils.java#L58-L66 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/Paginator.java | Paginator.search | public final Iterable<ItemT> search(final RequestT request) {
return search(request, DEFAULT_INITIALIZER, RetryPolicy.defaultPolicy());
} | java | public final Iterable<ItemT> search(final RequestT request) {
return search(request, DEFAULT_INITIALIZER, RetryPolicy.defaultPolicy());
} | [
"public",
"final",
"Iterable",
"<",
"ItemT",
">",
"search",
"(",
"final",
"RequestT",
"request",
")",
"{",
"return",
"search",
"(",
"request",
",",
"DEFAULT_INITIALIZER",
",",
"RetryPolicy",
".",
"defaultPolicy",
"(",
")",
")",
";",
"}"
] | Search for objects.
@param request The search request.
@return the stream of search results. | [
"Search",
"for",
"objects",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/Paginator.java#L1017-L1019 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/Paginator.java | Paginator.search | public final <F> F search(
RequestT request,
GenomicsRequestInitializer<? super RequestSubT> initializer,
Callback<ItemT, ? extends F> callback,
RetryPolicy retryPolicy) throws IOException {
try {
return callback.consumeResponses(search(request, initializer, retryPolicy));
} catch ... | java | public final <F> F search(
RequestT request,
GenomicsRequestInitializer<? super RequestSubT> initializer,
Callback<ItemT, ? extends F> callback,
RetryPolicy retryPolicy) throws IOException {
try {
return callback.consumeResponses(search(request, initializer, retryPolicy));
} catch ... | [
"public",
"final",
"<",
"F",
">",
"F",
"search",
"(",
"RequestT",
"request",
",",
"GenomicsRequestInitializer",
"<",
"?",
"super",
"RequestSubT",
">",
"initializer",
",",
"Callback",
"<",
"ItemT",
",",
"?",
"extends",
"F",
">",
"callback",
",",
"RetryPolicy"... | An exception safe way of consuming search results. Client code supplies a callback which is
used to consume the result stream and accumulate a value, which becomes the value returned from
this method.
@param request The search request.
@param initializer The {@link GenomicsRequestInitializer} with which to initialize ... | [
"An",
"exception",
"safe",
"way",
"of",
"consuming",
"search",
"results",
".",
"Client",
"code",
"supplies",
"a",
"callback",
"which",
"is",
"used",
"to",
"consume",
"the",
"result",
"stream",
"and",
"accumulate",
"a",
"value",
"which",
"becomes",
"the",
"va... | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/Paginator.java#L1104-L1114 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/Paginator.java | Paginator.search | public final Iterable<ItemT> search(final RequestT request, final String fields) {
return search(request, setFieldsInitializer(fields), RetryPolicy.defaultPolicy());
} | java | public final Iterable<ItemT> search(final RequestT request, final String fields) {
return search(request, setFieldsInitializer(fields), RetryPolicy.defaultPolicy());
} | [
"public",
"final",
"Iterable",
"<",
"ItemT",
">",
"search",
"(",
"final",
"RequestT",
"request",
",",
"final",
"String",
"fields",
")",
"{",
"return",
"search",
"(",
"request",
",",
"setFieldsInitializer",
"(",
"fields",
")",
",",
"RetryPolicy",
".",
"defaul... | Search for objects with a partial response.
A convenience method that allows the client code to specify the value of
{@link GenomicsRequest#setFields} using a {@link GenomicsRequestInitializer}.
@param request The search request.
@param fields The fields to set.
@return the stream of search results. | [
"Search",
"for",
"objects",
"with",
"a",
"partial",
"response",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/Paginator.java#L1126-L1128 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/ShardUtils.java | ShardUtils.getReadRequests | public static ImmutableList<StreamReadsRequest> getReadRequests(final StreamReadsRequest prototype,
SexChromosomeFilter sexChromosomeFilter, long numberOfBasesPerShard,
OfflineAuth auth) throws IOException {
Iterable<Contig> shards = getAllShardsInReadGroupSet(prototype.getReadGroupSetId(), sexChromosom... | java | public static ImmutableList<StreamReadsRequest> getReadRequests(final StreamReadsRequest prototype,
SexChromosomeFilter sexChromosomeFilter, long numberOfBasesPerShard,
OfflineAuth auth) throws IOException {
Iterable<Contig> shards = getAllShardsInReadGroupSet(prototype.getReadGroupSetId(), sexChromosom... | [
"public",
"static",
"ImmutableList",
"<",
"StreamReadsRequest",
">",
"getReadRequests",
"(",
"final",
"StreamReadsRequest",
"prototype",
",",
"SexChromosomeFilter",
"sexChromosomeFilter",
",",
"long",
"numberOfBasesPerShard",
",",
"OfflineAuth",
"auth",
")",
"throws",
"IO... | Constructs sharded StreamReadsRequest for the all references in the readGroupSet.
@param prototype The prototype request.
@param sexChromosomeFilter An enum value indicating how sex chromosomes should be
handled in the result.
@param numberOfBasesPerShard The maximum number of bases to include per shard.
@param auth T... | [
"Constructs",
"sharded",
"StreamReadsRequest",
"for",
"the",
"all",
"references",
"in",
"the",
"readGroupSet",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/ShardUtils.java#L163-L175 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/ShardUtils.java | ShardUtils.getVariantRequests | @Deprecated
public static ImmutableList<StreamVariantsRequest> getVariantRequests(final String variantSetId,
SexChromosomeFilter sexChromosomeFilter, long numberOfBasesPerShard,
OfflineAuth auth) throws IOException {
Iterable<Contig> shards = getAllShardsInVariantSet(variantSetId,
sexChromosom... | java | @Deprecated
public static ImmutableList<StreamVariantsRequest> getVariantRequests(final String variantSetId,
SexChromosomeFilter sexChromosomeFilter, long numberOfBasesPerShard,
OfflineAuth auth) throws IOException {
Iterable<Contig> shards = getAllShardsInVariantSet(variantSetId,
sexChromosom... | [
"@",
"Deprecated",
"public",
"static",
"ImmutableList",
"<",
"StreamVariantsRequest",
">",
"getVariantRequests",
"(",
"final",
"String",
"variantSetId",
",",
"SexChromosomeFilter",
"sexChromosomeFilter",
",",
"long",
"numberOfBasesPerShard",
",",
"OfflineAuth",
"auth",
")... | Constructs sharded StreamVariantsRequests for the all references in the variantSet.
@param variantSetId The variantSetId.
@param sexChromosomeFilter An enum value indicating how sex chromosomes should be
handled in the result.
@param numberOfBasesPerShard The maximum number of bases to include per shard.
@param auth T... | [
"Constructs",
"sharded",
"StreamVariantsRequests",
"for",
"the",
"all",
"references",
"in",
"the",
"variantSet",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/ShardUtils.java#L209-L222 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/ShardBoundary.java | ShardBoundary.getStrictVariantPredicate | public static Predicate<Variant> getStrictVariantPredicate(final long start, String fields) {
Preconditions
.checkArgument(Strings.isNullOrEmpty(fields)
|| VARIANT_FIELD_PATTERN.matcher(fields).matches(),
"Insufficient fields requested in partial response. At a minimum "
+ "include '... | java | public static Predicate<Variant> getStrictVariantPredicate(final long start, String fields) {
Preconditions
.checkArgument(Strings.isNullOrEmpty(fields)
|| VARIANT_FIELD_PATTERN.matcher(fields).matches(),
"Insufficient fields requested in partial response. At a minimum "
+ "include '... | [
"public",
"static",
"Predicate",
"<",
"Variant",
">",
"getStrictVariantPredicate",
"(",
"final",
"long",
"start",
",",
"String",
"fields",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"Strings",
".",
"isNullOrEmpty",
"(",
"fields",
")",
"||",
"VARIANT_F... | Predicate expressing the logic for which variants should and should not be included in the shard.
@param start The start position of the shard.
@return Whether the variant would be included in a strict shard boundary. | [
"Predicate",
"expressing",
"the",
"logic",
"for",
"which",
"variants",
"should",
"and",
"should",
"not",
"be",
"included",
"in",
"the",
"shard",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/ShardBoundary.java#L54-L66 | train |
googlegenomics/utils-java | src/main/java/com/google/cloud/genomics/utils/ShardBoundary.java | ShardBoundary.getStrictReadPredicate | public static Predicate<Read> getStrictReadPredicate(final long start, final String fields) {
Preconditions
.checkArgument(Strings.isNullOrEmpty(fields)
|| READ_FIELD_PATTERN.matcher(fields).matches(),
"Insufficient fields requested in partial response. At a minimum "
+ "include 'ali... | java | public static Predicate<Read> getStrictReadPredicate(final long start, final String fields) {
Preconditions
.checkArgument(Strings.isNullOrEmpty(fields)
|| READ_FIELD_PATTERN.matcher(fields).matches(),
"Insufficient fields requested in partial response. At a minimum "
+ "include 'ali... | [
"public",
"static",
"Predicate",
"<",
"Read",
">",
"getStrictReadPredicate",
"(",
"final",
"long",
"start",
",",
"final",
"String",
"fields",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"Strings",
".",
"isNullOrEmpty",
"(",
"fields",
")",
"||",
"READ... | Predicate expressing the logic for which reads should and should not be included in the shard.
@param start The start position of the shard.
@return Whether the read would be included in a strict shard boundary. | [
"Predicate",
"expressing",
"the",
"logic",
"for",
"which",
"reads",
"should",
"and",
"should",
"not",
"be",
"included",
"in",
"the",
"shard",
"."
] | 7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612 | https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/ShardBoundary.java#L74-L86 | train |
amazon-archives/aws-sdk-java-resources | aws-resources-core/src/main/java/com/amazonaws/resources/internal/ActionUtils.java | ActionUtils.generateRequest | private static AmazonWebServiceRequest generateRequest(
ActionContext context,
Class<?> type,
RequestModel model,
AmazonWebServiceRequest request,
Object token)
throws InstantiationException, IllegalAccessException {
if (request ==... | java | private static AmazonWebServiceRequest generateRequest(
ActionContext context,
Class<?> type,
RequestModel model,
AmazonWebServiceRequest request,
Object token)
throws InstantiationException, IllegalAccessException {
if (request ==... | [
"private",
"static",
"AmazonWebServiceRequest",
"generateRequest",
"(",
"ActionContext",
"context",
",",
"Class",
"<",
"?",
">",
"type",
",",
"RequestModel",
"model",
",",
"AmazonWebServiceRequest",
"request",
",",
"Object",
"token",
")",
"throws",
"InstantiationExcep... | Generates a client-level request by extracting the user parameters (if | [
"Generates",
"a",
"client",
"-",
"level",
"request",
"by",
"extracting",
"the",
"user",
"parameters",
"(",
"if"
] | 0f4fef2615d9687997b70a36eed1d62dd42df035 | https://github.com/amazon-archives/aws-sdk-java-resources/blob/0f4fef2615d9687997b70a36eed1d62dd42df035/aws-resources-core/src/main/java/com/amazonaws/resources/internal/ActionUtils.java#L147-L201 | train |
amazon-archives/aws-sdk-java-resources | aws-resources-core/src/main/java/com/amazonaws/resources/internal/ReflectionUtils.java | ReflectionUtils.getByPath | public static Object getByPath(Object target, List<String> path) {
Object obj = target;
for (String field : path) {
if (obj == null) {
return null;
}
obj = evaluate(obj, trimType(field));
}
return obj;
} | java | public static Object getByPath(Object target, List<String> path) {
Object obj = target;
for (String field : path) {
if (obj == null) {
return null;
}
obj = evaluate(obj, trimType(field));
}
return obj;
} | [
"public",
"static",
"Object",
"getByPath",
"(",
"Object",
"target",
",",
"List",
"<",
"String",
">",
"path",
")",
"{",
"Object",
"obj",
"=",
"target",
";",
"for",
"(",
"String",
"field",
":",
"path",
")",
"{",
"if",
"(",
"obj",
"==",
"null",
")",
"... | Evaluates the given path expression on the given object and returns the
object found.
@param target the object to reflect on
@param path the path to evaluate
@return the result of evaluating the path against the given object | [
"Evaluates",
"the",
"given",
"path",
"expression",
"on",
"the",
"given",
"object",
"and",
"returns",
"the",
"object",
"found",
"."
] | 0f4fef2615d9687997b70a36eed1d62dd42df035 | https://github.com/amazon-archives/aws-sdk-java-resources/blob/0f4fef2615d9687997b70a36eed1d62dd42df035/aws-resources-core/src/main/java/com/amazonaws/resources/internal/ReflectionUtils.java#L112-L123 | train |
amazon-archives/aws-sdk-java-resources | aws-resources-core/src/main/java/com/amazonaws/resources/internal/ReflectionUtils.java | ReflectionUtils.getAllByPath | public static List<Object> getAllByPath(Object target, List<String> path) {
List<Object> results = new LinkedList<>();
// TODO: Can we unroll this and do it iteratively?
getAllByPath(target, path, 0, results);
return results;
} | java | public static List<Object> getAllByPath(Object target, List<String> path) {
List<Object> results = new LinkedList<>();
// TODO: Can we unroll this and do it iteratively?
getAllByPath(target, path, 0, results);
return results;
} | [
"public",
"static",
"List",
"<",
"Object",
">",
"getAllByPath",
"(",
"Object",
"target",
",",
"List",
"<",
"String",
">",
"path",
")",
"{",
"List",
"<",
"Object",
">",
"results",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"// TODO: Can we unroll this a... | Evaluates the given path expression and returns the list of all matching
objects. If the path expression does not contain any wildcards, this
will return a list of at most one item. If the path contains one or more
wildcards, the returned list will include the full set of values
obtained by evaluating the expression wi... | [
"Evaluates",
"the",
"given",
"path",
"expression",
"and",
"returns",
"the",
"list",
"of",
"all",
"matching",
"objects",
".",
"If",
"the",
"path",
"expression",
"does",
"not",
"contain",
"any",
"wildcards",
"this",
"will",
"return",
"a",
"list",
"of",
"at",
... | 0f4fef2615d9687997b70a36eed1d62dd42df035 | https://github.com/amazon-archives/aws-sdk-java-resources/blob/0f4fef2615d9687997b70a36eed1d62dd42df035/aws-resources-core/src/main/java/com/amazonaws/resources/internal/ReflectionUtils.java#L137-L144 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.