idx int64 0 41.2k | question stringlengths 74 4.04k | target stringlengths 7 750 |
|---|---|---|
20,000 | 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 ) . startRefresh ... | Start attribute polling |
20,001 | 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 . getPollingPeriod ( ) == 0 ) { extTrigAt... | Add attribute as polled |
20,002 | 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 ( extTrigAttributeCacheMap . contain... | Remove polling of an attribute |
20,003 | public synchronized void removeAll ( ) { for ( final AttributeCache cache : attributeCacheMap . values ( ) ) { cache . stopRefresh ( ) ; } attributeCacheMap . clear ( ) ; extTrigAttributeCacheMap . clear ( ) ; for ( final CommandCache cache : commandCacheMap . values ( ) ) { cache . stopRefresh ( ) ; } commandCacheMap ... | Remove all polling |
20,004 | 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 ( extTrigCommandCacheMap . containsK... | Remove polling of a command |
20,005 | 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 ) { stateCache . startRefresh ( POLLING... | Start all polling |
20,006 | public synchronized void stop ( ) { for ( final AttributeCache cache : attributeCacheMap . values ( ) ) { cache . stopRefresh ( ) ; } for ( final CommandCache cache : commandCacheMap . values ( ) ) { cache . stopRefresh ( ) ; } if ( stateCache != null ) { stateCache . stopRefresh ( ) ; } if ( statusCache != null ) { st... | Stop all polling |
20,007 | 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 ) ) { return st... | Get cache of an attribute |
20,008 | 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 ) ) { cache = s... | Get cache of a command |
20,009 | public boolean isOver ( ) { if ( ! isOver ) { final long now = System . currentTimeMillis ( ) ; isOver = now - startTime >= duration ; } return isOver ; } | Check if the started duration is over |
20,010 | 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 , attributeN... | Get an attribute property from tango db |
20,011 | public void setAttributePropertyInDB ( final String attributeName , final String propertyName , final String value ) throws DevFailed { xlogger . entry ( propertyName ) ; logger . debug ( "update in DB {}, property {}= {}" , new Object [ ] { attributeName , propertyName , value } ) ; final Map < String , String [ ] > p... | Set attribute property in tango db |
20,012 | 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 [ ] > propInsert = new... | Set attribute properties in tango db |
20,013 | private static Properties getPropertiesFile ( ) { try { final InputStream stream = TangoFactory . class . getClassLoader ( ) . getResourceAsStream ( FACTORY_PROPERTIES ) ; final Properties properties = new Properties ( ) ; if ( stream != null ) { final BufferedInputStream bufStream = new BufferedInputStream ( stream ) ... | We get the properties file which contains default properties |
20,014 | private static Object getObject ( final String className ) { try { final Class < ? > clazz = Class . forName ( className ) ; final Constructor < ? > contructor = clazz . getConstructor ( new Class [ ] { } ) ; return contructor . newInstance ( new Object [ ] { } ) ; } catch ( final Exception e ) { e . printStackTrace ( ... | We instanciate the Component |
20,015 | private void initTangoFactory ( ) { final Properties properties = getPropertiesFile ( ) ; String factoryClassName = properties . getProperty ( TANGO_FACTORY ) ; if ( factoryClassName == null ) { factoryClassName = "fr.esrf.TangoApi.factory.DefaultTangoFactoryImpl" ; } tangoFactory = ( ITangoFactory ) getObject ( factor... | Load properties with impl specification and create instances |
20,016 | 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 - origin: {}" , e . errors [ i ] ... | Convert a DevFailed to a String |
20,017 | public void get_properties ( AttributeConfig conf ) { 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 ; conf . label = label ; conf . description = description ; conf . unit = unit ; conf . standard_u... | Get attribute properties . |
20,018 | 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 ; } | Format the value in one string by adding \ n after each string . |
20,019 | 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 ( ) ; InsertExtractUtils . insert ( argin , c... | execute all commands and read back all errors |
20,020 | 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 ] = ( byte ) 0xd... | Add 8 bytes at beginning for C ++ alignment |
20,021 | 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 ( ) ) ; } finally { os . close ( ) ; } } | Marshall the attribute with a DevFailed object |
20,022 | 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 CDROutputStream os =... | Marshall the ZmqCallInfo object |
20,023 | static double getZmqVersion ( ) { XLOGGER . entry ( ) ; if ( zmqVersion < 0.0 ) { zmqVersion = 0.0 ; try { String strVersion = org . zeromq . ZMQ . getVersionString ( ) ; final StringTokenizer stk = new StringTokenizer ( strVersion , "." ) ; final ArrayList < String > list = new ArrayList < String > ( ) ; while ( stk .... | Return the zmq version as a double like 3 . 22 for 3 . 2 . 2 or 0 . 0 if zmq not available |
20,024 | 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 ) { throw DevFailedUtils . newDevFai... | Get value from an AttrValUnion |
20,025 | 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 ( ) . isAr... | Set a value into an AttrValUnion |
20,026 | 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 ( ! isACommand ) { AttributeImpl att = null ; try { att = Attribu... | Update polling cache |
20,027 | 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 . INI... | Add command polling . Init command cannot be polled . Only command with parameter void can be polled |
20,028 | 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 = AttributeGetterSet... | Add attribute polling |
20,029 | public void removeAttributePolling ( final String attributeName ) throws DevFailed { final AttributeImpl attribute = AttributeGetterSetter . getAttribute ( attributeName , attributeList ) ; attribute . resetPolling ( ) ; cacheManager . removeAttributePolling ( attribute ) ; pollAttributes . remove ( attributeName . toL... | Remove attribute polling |
20,030 | 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 ) || comman... | Remove command polling |
20,031 | public void start ( final AttributeGroupReader valueReader , final long readingPeriod ) { this . valueReader = valueReader ; this . readingPeriod = readingPeriod ; executor = Executors . newScheduledThreadPool ( 1 ) ; future = executor . scheduleAtFixedRate ( valueReader , 0L , readingPeriod , TimeUnit . MILLISECONDS )... | Start the periodic update |
20,032 | public void stop ( ) { if ( future != null ) { future . cancel ( true ) ; } if ( executor != null ) { executor . shutdownNow ( ) ; } } | Stop the refresh |
20,033 | public void updateAttributeGroup ( final TangoGroupAttribute attributeGroup ) { stop ( ) ; final AttributeGroupReader newValueReader = new AttributeGroupReader ( valueReader . getAttributeGroupListener ( ) , attributeGroup , valueReader . isReadWriteValue ( ) , valueReader . isReadQuality ( ) , valueReader . isReadAttr... | Update the group of attributes |
20,034 | 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 . ... | Insert data in DeviceAttribute from an Object |
20,035 | 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 Tang... | Extract data from DeviceAttribute to an Object |
20,036 | 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 . val... | Extract data from DeviceAttribute to a Short |
20,037 | 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 ) { argo... | Extract data from DeviceAttribute to a String |
20,038 | 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 i... | Extract data from DeviceAttribute to an Integer |
20,039 | 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 S... | Extract data from DeviceAttribute to a Long |
20,040 | 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 instanc... | Extract data from DeviceAttribute to a Float |
20,041 | 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 ( ) ; } els... | Extract data from DeviceAttribute to a Boolean . |
20,042 | 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 in... | Extract data from DeviceAttribute to a Double . |
20,043 | 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_... | Insert data in DeviceAttribute from a Integer . |
20,044 | 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 : deviceAttri... | Insert data in DeviceAttribute from a Boolean . |
20,045 | 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 ( ) ) ;... | Insert data in DeviceAttribute from a WAttribute . |
20,046 | 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 : deviceAttributeWri... | Insert data in DeviceAttribute from a DevState . |
20,047 | public final static void fillDbDatumFromDeviceAttribute ( final DbDatum dbDatum , final DeviceAttribute deviceAttribute ) throws DevFailed { switch ( deviceAttribute . getType ( ) ) { case TangoConst . Tango_DEV_VOID : break ; case TangoConst . Tango_DEV_BOOLEAN : dbDatum . insert ( deviceAttribute . extractBoolean ( )... | Fill DbDatum from value of deviceAttribute |
20,048 | public void aroundInvoke ( final InvocationContext ctx ) throws DevFailed { xlogger . entry ( ) ; if ( aroundInvokeMethod != null ) { try { aroundInvokeMethod . invoke ( businessObject , ctx ) ; } catch ( final IllegalArgumentException e ) { throw DevFailedUtils . newDevFailed ( e ) ; } catch ( final IllegalAccessExcep... | Call aroundInvoke implementation |
20,049 | 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 ) ; } } | Check if a field is static |
20,050 | static AttributePropertiesImpl setEnumLabelProperty ( final Class < ? > type , final AttributePropertiesImpl props ) throws DevFailed { if ( AttributeTangoType . getTypeFromClass ( type ) . equals ( AttributeTangoType . DEVENUM ) ) { final Object [ ] enumValues = type . getEnumConstants ( ) ; final String [ ] enumLabel... | Set enum label for Enum types |
20,051 | public DevState updateState ( ) throws DevFailed { xlogger . entry ( ) ; Object getState ; if ( getStateMethod != null ) { try { getState = getStateMethod . invoke ( businessObject ) ; if ( getState != null ) { if ( getState instanceof DeviceState ) { state = ( ( DeviceState ) getState ) . getDevState ( ) ; } else { st... | get the state from the device |
20,052 | 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 . getParameterTypes ( ) [ 0 ] . equals ( DeviceState . class ... | change state of the device |
20,053 | public synchronized void connect_db ( ) { 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 { wait ( _sleep_between_connect * 1000 ) ; } catch ( final Int... | Connect the process to the TANGO database . |
20,054 | public Vector get_device_list ( String pattern ) { final Vector dl = new Vector ( ) ; if ( pattern . indexOf ( '*' ) == - 1 ) { DeviceImpl dev = null ; try { dev = get_device_by_name ( pattern ) ; } catch ( final DevFailed df ) { } if ( dev != null ) { dl . add ( dev ) ; return dl ; } } final Vector dcl = get_class_lis... | 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 |
20,055 | public Vector get_device_list_by_class ( final String class_name ) throws DevFailed { final Vector cl_list = class_list ; final int nb_class = cl_list . size ( ) ; int i ; for ( i = 0 ; i < nb_class ; i ++ ) { if ( ( ( DeviceClass ) cl_list . elementAt ( i ) ) . get_name ( ) . equals ( class_name ) == true ) { break ; ... | Get the list of device references for a given TANGO class . |
20,056 | public DeviceImpl get_device_by_name ( String dev_name ) throws DevFailed { final Vector cl_list = class_list ; dev_name = dev_name . toLowerCase ( ) ; Vector dev_list = get_device_list_by_class ( ( ( DeviceClass ) cl_list . elementAt ( 0 ) ) . get_name ( ) ) ; final int nb_class = cl_list . size ( ) ; int i , j , nb_d... | Get a device reference from its name |
20,057 | public void unregister_server ( ) { Util . out4 . println ( "Entering Tango::unregister_server method" ) ; if ( Util . _UseDb == true ) { try { db . unexport_server ( ds_name . toString ( ) ) ; } catch ( final SystemException e ) { Except . print_exception ( e ) ; System . exit ( - 1 ) ; } catch ( final DevFailed e ) {... | Unregister a device server process from the TANGO database . |
20,058 | public synchronized void execute ( final StateImpl stateImpl , final StatusImpl statusImpl ) { if ( isLazy && ! isInitInProgress ( ) ) { final Callable < Void > initRunnable = new Callable < Void > ( ) { public Void call ( ) throws DevFailed { logger . debug ( "Lazy init in" ) ; MDC . setContextMap ( contextMap ) ; doI... | Execute the init |
20,059 | public PipeBlobBuilder add ( String name , Object value ) { elements . add ( PipeDataElement . newInstance ( name , value ) ) ; return this ; } | Adds a generic array to this PipeBlob |
20,060 | 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 entity = null ; final S... | Splits an entity name into full device name and attribute name . Aliases will be resolved against tango db first . |
20,061 | 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 { final En... | Splits a collection of entity names and group attributes by device . |
20,062 | public static GoogleCredential getApplicationDefaultCredential ( ) { try { GoogleCredential credential = GoogleCredential . getApplicationDefault ( ) ; if ( credential . createScopedRequired ( ) ) { credential = credential . createScoped ( Arrays . asList ( "https://www.googleapis.com/auth/genomics" ) ) ; } return cred... | Obtain the Application Default com . google . api . client . auth . oauth2 . Credential |
20,063 | public static Credential getCredentialFromClientSecrets ( String clientSecretsFile , String credentialId ) { Preconditions . checkArgument ( clientSecretsFile != null ) ; Preconditions . checkArgument ( credentialId != null ) ; HttpTransport httpTransport ; try { httpTransport = GoogleNetHttpTransport . newTrustedTrans... | Creates an OAuth2 credential from client secrets which may require an interactive authorization prompt . |
20,064 | public static boolean isOverlapping ( Variant blockRecord , Variant . Builder variant ) { return blockRecord . getStart ( ) <= variant . getStart ( ) && blockRecord . getEnd ( ) >= variant . getStart ( ) + 1 ; } | Determine whether the first variant overlaps the second variant . |
20,065 | 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 ( ) ; ... | Determine whether two variants occur at the same site in the genome where site is defined by reference name start position and reference bases . |
20,066 | 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 ( ) ) ... | Create a new gRPC channel to the Google Genomics API using the provided credentials for auth . |
20,067 | 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 . |
20,068 | 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 . |
20,069 | 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 ... | Gets ReadGroupSetIds from a given datasetId using the Genomics API . |
20,070 | 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... | Gets the ReferenceSetId for a given readGroupSetId using the Genomics API . |
20,071 | public static List < CoverageBucket > getCoverageBuckets ( String readGroupSetId , OfflineAuth auth ) throws IOException { Genomics genomics = GenomicsFactory . builder ( ) . build ( ) . fromOfflineAuth ( auth ) ; ListCoverageBucketsResponse response = genomics . readgroupsets ( ) . coveragebuckets ( ) . list ( readGro... | Gets the CoverageBuckets for a given readGroupSetId using the Genomics API . |
20,072 | 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 ( ) . setReferenceSet... | Gets the references for a given referenceSetId using the Genomics API . |
20,073 | 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 ( genom... | Gets VariantSetIds from a given datasetId using the Genomics API . |
20,074 | 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 ... | Gets CallSets for a given variantSetId using the Genomics API . |
20,075 | 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... | Gets CallSets Names for a given variantSetId using the Genomics API . |
20,076 | 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 ... | Gets the ReferenceBounds for a given variantSetId using the Genomics API . |
20,077 | public static Iterable < Contig > parseContigsFromCommandLine ( String contigsArgument ) { return Iterables . transform ( Splitter . on ( "," ) . split ( contigsArgument ) , new Function < String , Contig > ( ) { public Contig apply ( String contigString ) { ArrayList < String > contigInfo = newArrayList ( Splitter . o... | Parse the list of Contigs expressed in the string argument . |
20,078 | 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 ,... | being returned to clients . |
20,079 | public StreamVariantsRequest getStreamVariantsRequest ( String variantSetId ) { return StreamVariantsRequest . newBuilder ( ) . setVariantSetId ( variantSetId ) . setReferenceName ( referenceName ) . setStart ( start ) . setEnd ( end ) . build ( ) ; } | Construct a StreamVariantsRequest for the Contig . |
20,080 | public StreamReadsRequest getStreamReadsRequest ( String readGroupSetId ) { return StreamReadsRequest . newBuilder ( ) . setReadGroupSetId ( readGroupSetId ) . setReferenceName ( referenceName ) . setStart ( start ) . setEnd ( end ) . build ( ) ; } | Construct a StreamReadsRequest for the Contig . |
20,081 | public StreamVariantsRequest getStreamVariantsRequest ( StreamVariantsRequest prototype ) { return StreamVariantsRequest . newBuilder ( prototype ) . setReferenceName ( referenceName ) . setStart ( start ) . setEnd ( end ) . build ( ) ; } | Construct a StreamVariantsRequest for the Contig using a prototype using a prototype request . |
20,082 | public StreamReadsRequest getStreamReadsRequest ( StreamReadsRequest prototype ) { return StreamReadsRequest . newBuilder ( prototype ) . setReferenceName ( referenceName ) . setStart ( start ) . setEnd ( end ) . build ( ) ; } | Construct a StreamReadsRequest for the Contig using a prototype request . |
20,083 | public Credential getCredential ( ) { if ( hasStoredCredential ( ) ) { HttpTransport httpTransport ; try { httpTransport = GoogleNetHttpTransport . newTrustedTransport ( ) ; } catch ( IOException | GeneralSecurityException e ) { throw new RuntimeException ( "Could not create HTTPS transport for use in credential creati... | Return the stored user credential if applicable or fall back to the Application Default Credential . |
20,084 | public < T extends AbstractGoogleJsonClient . Builder > T fromApiKey ( T builder , String apiKey ) { Preconditions . checkNotNull ( builder ) ; Preconditions . checkNotNull ( apiKey ) ; return prepareBuilder ( builder , null , new CommonGoogleClientRequestInitializer ( apiKey ) ) ; } | Prepare an AbstractGoogleJsonClient . Builder using an API key . |
20,085 | public < T extends AbstractGoogleJsonClient . Builder > T fromCredential ( T builder , Credential credential ) { Preconditions . checkNotNull ( builder ) ; Preconditions . checkNotNull ( credential ) ; return prepareBuilder ( builder , credential , null ) ; } | Prepare an AbstractGoogleJsonClient . Builder using a credential . |
20,086 | public < T extends AbstractGoogleJsonClient . Builder > T fromApplicationDefaultCredential ( T builder ) { Preconditions . checkNotNull ( builder ) ; return fromCredential ( builder , CredentialFactory . getApplicationDefaultCredential ( ) ) ; } | Prepare an AbstractGoogleJsonClient . Builder using the Application Default Credential . |
20,087 | public Genomics fromOfflineAuth ( OfflineAuth auth ) { Preconditions . checkNotNull ( auth ) ; return fromOfflineAuth ( getGenomicsBuilder ( ) , auth ) . build ( ) ; } | Create a new genomics stub from the given OfflineAuth object . |
20,088 | 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 . ... | Prepare an AbstractGoogleJsonClient . Builder with the given OfflineAuth object . |
20,089 | public static final BiMap < String , String > getCallSetNameMapping ( Iterable < CallSet > callSets ) { BiMap < String , String > idToName = HashBiMap . create ( ) ; for ( CallSet callSet : callSets ) { idToName . put ( callSet . getId ( ) , callSet . getName ( ) ) ; } return idToName . inverse ( ) ; } | Create a bi - directional map of names to ids for a collection of callsets . |
20,090 | public final Iterable < ItemT > search ( final RequestT request ) { return search ( request , DEFAULT_INITIALIZER , RetryPolicy . defaultPolicy ( ) ) ; } | Search for objects . |
20,091 | 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 ( SearchExcep... | 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 . |
20,092 | public final Iterable < ItemT > search ( final RequestT request , final String fields ) { return search ( request , setFieldsInitializer ( fields ) , RetryPolicy . defaultPolicy ( ) ) ; } | Search for objects with a partial response . |
20,093 | public static ImmutableList < StreamReadsRequest > getReadRequests ( final StreamReadsRequest prototype , SexChromosomeFilter sexChromosomeFilter , long numberOfBasesPerShard , OfflineAuth auth ) throws IOException { Iterable < Contig > shards = getAllShardsInReadGroupSet ( prototype . getReadGroupSetId ( ) , sexChromo... | Constructs sharded StreamReadsRequest for the all references in the readGroupSet . |
20,094 | public static ImmutableList < StreamVariantsRequest > getVariantRequests ( final String variantSetId , SexChromosomeFilter sexChromosomeFilter , long numberOfBasesPerShard , OfflineAuth auth ) throws IOException { Iterable < Contig > shards = getAllShardsInVariantSet ( variantSetId , sexChromosomeFilter , numberOfBases... | Constructs sharded StreamVariantsRequests for the all references in the variantSet . |
20,095 | 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 'variants(st... | Predicate expressing the logic for which variants should and should not be included in the shard . |
20,096 | 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 'alignments(ali... | Predicate expressing the logic for which reads should and should not be included in the shard . |
20,097 | private static AmazonWebServiceRequest generateRequest ( ActionContext context , Class < ? > type , RequestModel model , AmazonWebServiceRequest request , Object token ) throws InstantiationException , IllegalAccessException { if ( request == null ) { request = ( AmazonWebServiceRequest ) type . newInstance ( ) ; } req... | Generates a client - level request by extracting the user parameters ( if |
20,098 | 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 ; } | Evaluates the given path expression on the given object and returns the object found . |
20,099 | public static List < Object > getAllByPath ( Object target , List < String > path ) { List < Object > results = new LinkedList < > ( ) ; getAllByPath ( target , path , 0 , results ) ; return results ; } | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.