idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
142,000
public static MozuUrl getWishlistItemsByWishlistNameUrl ( Integer customerAccountId , String filter , Integer pageSize , String responseFields , String sortBy , Integer startIndex , String wishlistName ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/wishlists/customers/{customerAccountId}/{wishlistName}/items?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}" ) ; formatter . formatUrl ( "customerAccountId" , customerAccountId ) ; formatter . formatUrl ( "filter" , filter ) ; formatter . formatUrl ( "pageSize" , pageSize ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "sortBy" , sortBy ) ; formatter . formatUrl ( "startIndex" , startIndex ) ; formatter . formatUrl ( "wishlistName" , wishlistName ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetWishlistItemsByWishlistName
268
15
142,001
public static MozuUrl updateWishlistItemQuantityUrl ( Integer quantity , String responseFields , String wishlistId , String wishlistItemId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/wishlists/{wishlistId}/items/{wishlistItemId}/{quantity}?responseFields={responseFields}" ) ; formatter . formatUrl ( "quantity" , quantity ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "wishlistId" , wishlistId ) ; formatter . formatUrl ( "wishlistItemId" , wishlistItemId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateWishlistItemQuantity
188
11
142,002
public static MozuUrl removeAllWishlistItemsUrl ( String wishlistId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/wishlists/{wishlistId}/items" ) ; formatter . formatUrl ( "wishlistId" , wishlistId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for RemoveAllWishlistItems
102
11
142,003
public static MozuUrl deleteWishlistItemUrl ( String wishlistId , String wishlistItemId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/wishlists/{wishlistId}/items/{wishlistItemId}" ) ; formatter . formatUrl ( "wishlistId" , wishlistId ) ; formatter . formatUrl ( "wishlistItemId" , wishlistItemId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteWishlistItem
134
10
142,004
public static MozuUrl getCreditUrl ( String code , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/credits/{code}?responseFields={responseFields}" ) ; formatter . formatUrl ( "code" , code ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetCredit
118
7
142,005
public static MozuUrl resendCreditCreatedEmailUrl ( String code , String userId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/credits/{code}/Resend-Email?userId={userId}" ) ; formatter . formatUrl ( "code" , code ) ; formatter . formatUrl ( "userId" , userId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for ResendCreditCreatedEmail
121
10
142,006
public static void main ( final String [ ] args ) { SLF4JBridgeHandler . install ( ) ; boolean exitWithError = true ; StopWatch stopWatch = new StopWatch ( ) ; try { RESULT_LOG . info ( "jFunk started" ) ; stopWatch . start ( ) ; int threadCount = 1 ; boolean parallel = false ; Properties scriptProperties = new Properties ( ) ; List < File > scripts = Lists . newArrayList ( ) ; for ( String arg : args ) { if ( arg . startsWith ( "-threadcount" ) ) { String [ ] split = arg . split ( "=" ) ; Preconditions . checkArgument ( split . length == 2 , "The number of threads must be specified as follows: -threadcount=<value>" ) ; threadCount = Integer . parseInt ( split [ 1 ] ) ; RESULT_LOG . info ( "Using " + threadCount + ( threadCount == 1 ? " thread" : " threads" ) ) ; } else if ( arg . startsWith ( "-S" ) ) { arg = arg . substring ( 2 ) ; String [ ] split = arg . split ( "=" ) ; Preconditions . checkArgument ( split . length == 2 , "Script parameters must be given in the form -S<name>=<value>" ) ; scriptProperties . setProperty ( split [ 0 ] , normalizeScriptParameterValue ( split [ 1 ] ) ) ; RESULT_LOG . info ( "Using script parameter " + split [ 0 ] + " with value " + split [ 1 ] ) ; } else if ( arg . equals ( "-parallel" ) ) { parallel = true ; RESULT_LOG . info ( "Using parallel mode" ) ; } else { scripts . add ( new File ( arg ) ) ; } } if ( scripts . isEmpty ( ) ) { scripts . addAll ( requestScriptsViaGui ( ) ) ; if ( scripts . isEmpty ( ) ) { RESULT_LOG . info ( "Execution finished (took " + stopWatch + " H:mm:ss.SSS)" ) ; System . exit ( 0 ) ; } } String propsFileName = System . getProperty ( "jfunk.props.file" , "jfunk.properties" ) ; Module module = ModulesLoader . loadModulesFromProperties ( new JFunkDefaultModule ( ) , propsFileName ) ; Injector injector = Guice . createInjector ( module ) ; JFunkFactory factory = injector . getInstance ( JFunkFactory . class ) ; JFunkBase jFunk = factory . create ( threadCount , parallel , scripts , scriptProperties ) ; jFunk . execute ( ) ; exitWithError = false ; } catch ( JFunkExecutionException ex ) { // no logging necessary } catch ( Exception ex ) { Logger . getLogger ( JFunk . class ) . error ( "jFunk terminated unexpectedly." , ex ) ; } finally { stopWatch . stop ( ) ; RESULT_LOG . info ( "Execution finished (took " + stopWatch + " H:mm:ss.SSS)" ) ; } System . exit ( exitWithError ? - 1 : 0 ) ; }
Starts jFunk .
703
6
142,007
public Element findElementById ( final Element element ) { Attribute a = element . getAttribute ( idAttributeName ) ; if ( a == null ) { return null ; } return findElementById ( a . getValue ( ) ) ; }
Searches the attribute id in the given element first and using this element searches for the element with the attribute id and the value of this element .
50
30
142,008
public Element findElementById ( final String id ) { Element element = cache . get ( id ) ; if ( element == null ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Search for element with ID {}" , id ) ; } Element root = document . getRootElement ( ) ; element = search ( root , elementName , idAttributeName , id ) ; if ( element != null ) { cache . put ( id , element ) ; } } return element ; }
Searches first in the cache for the given id . If it is found the element saved there will be returned . If it is not found the search - starting at the RootElement - will continue until the first element in the tree hierarchy is found which 1 . has the attribute id and 2 . whose id attribute has the value of the parameter s id . Once found it will be saved in the cache .
105
82
142,009
public static Element search ( final Element root , final String elementName , final String idAttributeName , final String id ) { Element element = null ; @ SuppressWarnings ( "unchecked" ) List < Element > children = root . getChildren ( ) ; for ( Element e : children ) { if ( elementName == null || e . getName ( ) . equals ( elementName ) ) { Attribute a = e . getAttribute ( idAttributeName ) ; if ( a != null && id . equals ( a . getValue ( ) ) ) { element = e ; } else { element = search ( e , elementName , idAttributeName , id ) ; } } if ( element != null ) { break ; } } return element ; }
Searches the ElementBaum starting with the given element for the ChildElement with the respective attribute value
157
21
142,010
public static Element getChild ( final String name , final Element root ) { @ SuppressWarnings ( "unchecked" ) List < Element > allChildren = root . getChildren ( ) ; for ( Element child : allChildren ) { if ( child . getName ( ) . equals ( name ) ) { return child ; } } return null ; }
Searches for the Child with the given name ignoring namespaces
74
13
142,011
public static MozuUrl getVisitUrl ( String responseFields , String visitId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/visits/{visitId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "visitId" , visitId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetVisit
124
7
142,012
public boolean executeScript ( final File script , final Properties scriptProperties ) { checkState ( script . exists ( ) , "Script file does not exist: %s" , script ) ; checkState ( script . canRead ( ) , "Script file is not readable: %s" , script ) ; Reader reader = null ; boolean success = false ; Throwable throwable = null ; scriptScope . enterScope ( ) ; ScriptContext ctx = scriptContextProvider . get ( ) ; try { reader = Files . newReader ( script , charset ) ; ScriptEngine scriptEngine = new ScriptEngineManager ( ) . getEngineByExtension ( "groovy" ) ; ctx . setScript ( script ) ; ctx . load ( JFunkConstants . SCRIPT_PROPERTIES , false ) ; ctx . registerReporter ( new SimpleReporter ( ) ) ; initGroovyCommands ( scriptEngine , ctx ) ; initScriptProperties ( scriptEngine , scriptProperties ) ; ScriptMetaData scriptMetaData = scriptMetaDataProvider . get ( ) ; scriptMetaData . setScriptName ( script . getPath ( ) ) ; Date startDate = new Date ( ) ; scriptMetaData . setStartDate ( startDate ) ; ctx . set ( JFunkConstants . SCRIPT_START_MILLIS , String . valueOf ( startDate . getTime ( ) ) ) ; eventBus . post ( scriptEngine ) ; eventBus . post ( new BeforeScriptEvent ( script . getAbsolutePath ( ) ) ) ; scriptEngine . eval ( reader ) ; success = true ; } catch ( IOException ex ) { throwable = ex ; log . error ( "Error loading script: " + script , ex ) ; } catch ( ScriptException ex ) { throwable = ex ; // Look up the cause hierarchy if we find a ModuleExecutionException. // We only need to log exceptions other than ModuleExecutionException because they // have already been logged and we don't want to pollute the log file any further. // In fact, other exception cannot normally happen. Throwable th = ex ; while ( ! ( th instanceof ModuleExecutionException ) ) { if ( th == null ) { // log original exception log . error ( "Error executing script: " + script , ex ) ; success = false ; break ; } th = th . getCause ( ) ; } } finally { try { ScriptMetaData scriptMetaData = scriptMetaDataProvider . get ( ) ; Date endDate = new Date ( ) ; scriptMetaData . setEndDate ( endDate ) ; ctx . set ( JFunkConstants . SCRIPT_END_MILLIS , String . valueOf ( endDate . getTime ( ) ) ) ; scriptMetaData . setThrowable ( throwable ) ; eventBus . post ( new AfterScriptEvent ( script . getAbsolutePath ( ) , success ) ) ; } finally { scriptScope . exitScope ( ) ; closeQuietly ( reader ) ; } } return success ; }
Executes the specified Groovy script .
645
8
142,013
@ Override public void exitScope ( ) { Map < Key < ? > , Object > scopeMap = checkNotNull ( getScopeMapForCurrentThread ( ) , "No scope map found for the current thread. Forgot to call enterScope()?" ) ; performDisposal ( scopeMap ) ; nonInheritableScopeCache . remove ( ) ; inheritableScopeCache . remove ( ) ; log . debug ( "Exited scope." ) ; }
Exits the scope context for the current thread . Call this method after a thread is done in order to avoid memory leaks and to enable the thread to enter a new scope context again .
95
37
142,014
public static MozuUrl getLocationsInUsageTypeUrl ( String filter , Boolean includeAttributeDefinition , String locationUsageType , Integer pageSize , String responseFields , String sortBy , Integer startIndex ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/storefront/locationUsageTypes/{locationUsageType}/locations?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&includeAttributeDefinition={includeAttributeDefinition}&responseFields={responseFields}" ) ; formatter . formatUrl ( "filter" , filter ) ; formatter . formatUrl ( "includeAttributeDefinition" , includeAttributeDefinition ) ; formatter . formatUrl ( "locationUsageType" , locationUsageType ) ; formatter . formatUrl ( "pageSize" , pageSize ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "sortBy" , sortBy ) ; formatter . formatUrl ( "startIndex" , startIndex ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetLocationsInUsageType
264
11
142,015
public static MozuUrl getDirectShipLocationUrl ( Boolean includeAttributeDefinition , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/storefront/locationUsageTypes/DS/location?includeAttributeDefinition={includeAttributeDefinition}&responseFields={responseFields}" ) ; formatter . formatUrl ( "includeAttributeDefinition" , includeAttributeDefinition ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetDirectShipLocation
136
9
142,016
public static MozuUrl getInStorePickupLocationUrl ( Boolean includeAttributeDefinition , String locationCode , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/storefront/locationUsageTypes/SP/locations/{locationCode}?includeAttributeDefinition={includeAttributeDefinition}&responseFields={responseFields}" ) ; formatter . formatUrl ( "includeAttributeDefinition" , includeAttributeDefinition ) ; formatter . formatUrl ( "locationCode" , locationCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetInStorePickupLocation
163
11
142,017
public static MozuUrl getProductReservationUrl ( Integer productReservationId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/productreservations/{productReservationId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "productReservationId" , productReservationId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetProductReservation
136
9
142,018
public static MozuUrl commitReservationsUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/productreservations/commit" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for CommitReservations
77
9
142,019
public static MozuUrl updateProductReservationsUrl ( Boolean skipInventoryCheck ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/productreservations/?skipInventoryCheck={skipInventoryCheck}" ) ; formatter . formatUrl ( "skipInventoryCheck" , skipInventoryCheck ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateProductReservations
110
10
142,020
public static MozuUrl deleteProductReservationUrl ( Integer productReservationId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/productreservations/{productReservationId}" ) ; formatter . formatUrl ( "productReservationId" , productReservationId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteProductReservation
105
9
142,021
public static MozuUrl getSegmentUrl ( Integer id , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/segments/{id}?responseFields={responseFields}" ) ; formatter . formatUrl ( "id" , id ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetSegment
119
8
142,022
public static MozuUrl addSegmentAccountsUrl ( Integer id ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/segments/{id}/accounts" ) ; formatter . formatUrl ( "id" , id ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for AddSegmentAccounts
94
10
142,023
public static MozuUrl removeSegmentAccountUrl ( Integer accountId , Integer id ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/segments/{id}/accounts/{accountId}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "id" , id ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for RemoveSegmentAccount
116
9
142,024
public static MozuUrl getAvailablePaymentActionsUrl ( String orderId , String paymentId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/payments/{paymentId}/actions" ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "paymentId" , paymentId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetAvailablePaymentActions
121
11
142,025
public static MozuUrl performPaymentActionUrl ( String orderId , String paymentId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/payments/{paymentId}/actions?responseFields={responseFields}" ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "paymentId" , paymentId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for PerformPaymentAction
149
9
142,026
public static MozuUrl getMultiRatesUrl ( Boolean includeRawResponse ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/storefront/shipping/request-multi-rates" ) ; formatter . formatUrl ( "includeRawResponse" , includeRawResponse ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetMultiRates
101
9
142,027
public static MozuUrl getRatesUrl ( Boolean includeRawResponse , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/storefront/shipping/request-rates?responseFields={responseFields}" ) ; formatter . formatUrl ( "includeRawResponse" , includeRawResponse ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetRates
128
8
142,028
public static MozuUrl deleteCustomRouteSettingsUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/settings/general/customroutes" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteCustomRouteSettings
74
9
142,029
public static MozuUrl getOrderUrl ( Boolean draft , Boolean includeBin , String orderId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}?draft={draft}&includeBin={includeBin}&responseFields={responseFields}" ) ; formatter . formatUrl ( "draft" , draft ) ; formatter . formatUrl ( "includeBin" , includeBin ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetOrder
170
7
142,030
public static MozuUrl priceOrderUrl ( Boolean refreshShipping , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/price?refreshShipping={refreshShipping}&responseFields={responseFields}" ) ; formatter . formatUrl ( "refreshShipping" , refreshShipping ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for PriceOrder
125
7
142,031
public static MozuUrl deleteOrderDraftUrl ( String orderId , String version ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/draft?version={version}" ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "version" , version ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteOrderDraft
111
8
142,032
public WebElement find ( ) { checkState ( webDriver != null , "No WebDriver specified." ) ; checkState ( by != null , "No By instance for locating elements specified." ) ; if ( ! noLogging ) { log . info ( toString ( ) ) ; } WebElement element ; if ( timeoutSeconds > 0L ) { WebDriverWait wait = createWebDriverWait ( ) ; element = wait . until ( new Function < WebDriver , WebElement > ( ) { @ Override public WebElement apply ( final WebDriver input ) { WebElement el = input . findElement ( by ) ; checkElement ( el ) ; if ( condition != null && ! condition . apply ( el ) ) { throw new WebElementException ( String . format ( "Condition not met for element %s: %s" , el , condition ) ) ; } return el ; } @ Override public String toString ( ) { return WebElementFinder . this . toString ( ) ; } } ) ; } else { element = webDriver . findElement ( by ) ; checkElement ( element ) ; if ( condition != null && ! condition . apply ( element ) ) { throw new WebElementException ( String . format ( "Condition not met for element %s: %s" , element , condition ) ) ; } } return element ; }
Finds the first element .
282
6
142,033
public List < WebElement > findAll ( ) { checkState ( webDriver != null , "No WebDriver specified." ) ; checkState ( by != null , "No By instance for locating elements specified." ) ; log . info ( toString ( ) ) ; final List < WebElement > result = newArrayList ( ) ; try { if ( timeoutSeconds > 0L ) { WebDriverWait wait = createWebDriverWait ( ) ; wait . until ( new Function < WebDriver , List < WebElement > > ( ) { @ Override public List < WebElement > apply ( final WebDriver input ) { doFindElements ( result , input ) ; if ( result . isEmpty ( ) ) { // this means, we try again until the timeout occurs throw new WebElementException ( "No matching element found." ) ; } return result ; } @ Override public String toString ( ) { return WebElementFinder . this . toString ( ) ; } } ) ; } else { doFindElements ( result , webDriver ) ; } return result ; } catch ( TimeoutException ex ) { Throwable cause = ex . getCause ( ) ; for ( Class < ? extends Throwable > thClass : IGNORED_EXCEPTIONS ) { if ( thClass . isInstance ( cause ) ) { return ImmutableList . of ( ) ; } } throw new WebElementException ( ex ) ; } }
Finds all elements .
298
5
142,034
public static MozuUrl getAddressSchemaUrl ( String countryCode , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/reference/addressschema/{countryCode}?responseFields={responseFields}" ) ; formatter . formatUrl ( "countryCode" , countryCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . HOME_POD ) ; }
Get Resource Url for GetAddressSchema
122
9
142,035
public static MozuUrl getAddressSchemasUrl ( String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/reference/addressschemas?responseFields={responseFields}" ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . HOME_POD ) ; }
Get Resource Url for GetAddressSchemas
99
9
142,036
public static MozuUrl getBehaviorUrl ( Integer behaviorId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/reference/behaviors/{behaviorId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "behaviorId" , behaviorId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . HOME_POD ) ; }
Get Resource Url for GetBehavior
121
8
142,037
public static MozuUrl getBehaviorCategoryUrl ( Integer categoryId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/reference/behaviors/categories/{categoryId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "categoryId" , categoryId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . HOME_POD ) ; }
Get Resource Url for GetBehaviorCategory
125
9
142,038
public static MozuUrl getBehaviorsUrl ( String responseFields , String userType ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/reference/behaviors?userType={userType}&responseFields={responseFields}" ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "userType" , userType ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . HOME_POD ) ; }
Get Resource Url for GetBehaviors
124
9
142,039
public static MozuUrl getUnitsOfMeasureUrl ( String filter , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/reference/unitsofmeasure?filter={filter}&responseFields={responseFields}" ) ; formatter . formatUrl ( "filter" , filter ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . HOME_POD ) ; }
Get Resource Url for GetUnitsOfMeasure
122
10
142,040
public boolean tryClick ( final By by ) { LOGGER . info ( "Trying to click on {}" , by ) ; List < WebElement > elements = wef . timeout ( 2L ) . by ( by ) . findAll ( ) ; if ( elements . size ( ) > 0 ) { WebElement element = elements . get ( 0 ) ; checkTopmostElement ( by ) ; new Actions ( webDriver ) . moveToElement ( element ) . click ( ) . perform ( ) ; LOGGER . info ( "Click successful" ) ; return true ; } LOGGER . info ( "Click not successful" ) ; return false ; }
Tries to find and element and clicks on it if found . Uses a timeout of two seconds .
136
20
142,041
public Object executeScript ( final String script , final Object ... args ) { LOGGER . info ( "executeScript: {}" , new ToStringBuilder ( this , LoggingToStringStyle . INSTANCE ) . append ( "script" , script ) . append ( "args" , args ) ) ; return ( ( JavascriptExecutor ) webDriver ) . executeScript ( script , args ) ; }
Execute JavaScript in the context of the currently selected frame or window .
83
14
142,042
public String openNewWindow ( final String url , final long timeoutSeconds ) { String oldHandle = openNewWindow ( timeoutSeconds ) ; get ( url ) ; return oldHandle ; }
Opens a new window switches to it and loads the given URL in the new window .
40
18
142,043
public void assertTopmostElement ( By by ) { if ( ! isTopmostElementCheckApplicable ( by ) ) { LOGGER . warn ( "The element identified by '{}' is not a leaf node in the " + "document tree. Thus, it cannot be checked if the element is topmost. " + "The topmost element check cannot be performed and is skipped." , by ) ; return ; } LOGGER . info ( "Checking whether the element identified by '{}' is the topmost element." , by ) ; WebElement topmostElement = findTopmostElement ( by ) ; WebElement element = findElement ( by ) ; if ( ! element . equals ( topmostElement ) ) { throw new AssertionError ( format ( "The element '%s' identified by '%s' is covered by '%s'." , outerHtmlPreview ( element ) , by , outerHtmlPreview ( topmostElement ) ) ) ; } }
Asserts that the element is not covered by any other element .
206
14
142,044
public Boolean isTopmostElement ( By by ) { if ( ! isTopmostElementCheckApplicable ( by ) ) { return null ; } WebElement topmostElement = findTopmostElement ( by ) ; WebElement element = findElement ( by ) ; return element . equals ( topmostElement ) ; }
Checks if an element is the topmost i . e . not covered by any other element .
65
20
142,045
public static MozuUrl addProductUrl ( String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/?responseFields={responseFields}" ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for AddProduct
99
7
142,046
public static MozuUrl addProductInCatalogUrl ( String productCode , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{productCode}/ProductInCatalogs?responseFields={responseFields}" ) ; formatter . formatUrl ( "productCode" , productCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for AddProductInCatalog
130
9
142,047
public static MozuUrl renameProductCodesUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/Actions/RenameProductCodes" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for RenameProductCodes
81
10
142,048
public static MozuUrl updateProductInCatalogUrl ( Integer catalogId , String productCode , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{productCode}/ProductInCatalogs/{catalogId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "catalogId" , catalogId ) ; formatter . formatUrl ( "productCode" , productCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateProductInCatalog
156
9
142,049
public static MozuUrl deleteProductInCatalogUrl ( Integer catalogId , String productCode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{productCode}/ProductInCatalogs/{catalogId}" ) ; formatter . formatUrl ( "catalogId" , catalogId ) ; formatter . formatUrl ( "productCode" , productCode ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteProductInCatalog
125
9
142,050
protected List < ExcelFile > getExcelFiles ( ) { if ( excelFiles == null ) { excelFiles = newArrayListWithCapacity ( 3 ) ; for ( int i = 0 ; ; ++ i ) { String baseKey = String . format ( "dataSource.%s.%d" , getName ( ) , i ) ; String path = configuration . get ( baseKey + ".path" ) ; if ( path == null ) { break ; } String doString = configuration . get ( baseKey + ".dataOrientation" , "rowbased" ) ; DataOrientation dataOrientation = DataOrientation . valueOf ( doString ) ; log . info ( "Opening Excel file: {}" , path ) ; ExcelFile file = new ExcelFile ( new File ( path ) , dataOrientation , dataFormatter ) ; try { file . load ( ) ; } catch ( InvalidFormatException ex ) { throw new JFunkException ( ex . getMessage ( ) , ex ) ; } catch ( IOException ex ) { throw new JFunkException ( ex . getMessage ( ) , ex ) ; } excelFiles . add ( file ) ; } } return excelFiles ; }
Loads and cache Excel file contents .
257
8
142,051
@ Override protected DataSet getNextDataSetImpl ( final String dataSetKey ) { for ( ExcelFile excelFile : getExcelFiles ( ) ) { Map < String , List < Map < String , String > > > data = excelFile . getData ( ) ; List < Map < String , String > > dataList = data . get ( dataSetKey ) ; if ( dataList != null ) { MutableInt counter = dataSetIndices . get ( dataSetKey ) ; if ( counter == null ) { counter = new MutableInt ( 0 ) ; dataSetIndices . put ( dataSetKey , counter ) ; } if ( counter . getValue ( ) >= dataList . size ( ) ) { // no more data available return null ; } // turn data map into a data set Map < String , String > dataMap = dataList . get ( counter . getValue ( ) ) ; DataSet dataSet = new DefaultDataSet ( dataMap ) ; // advance the counter for the next dataset counter . increment ( ) ; return dataSet ; } } return null ; }
Goes through all configured Excel files until data for the specified key is found . All sheets of a file a check before the next file is considered .
230
30
142,052
public ConceptLattice asConceptLattice ( final Graph graph ) { ConceptLattice lattice = new ConceptLattice ( graph , attributes . size ( ) ) ; Iterator it = this . asCrossTable ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { CrossTable . Row row = ( CrossTable . Row ) it . next ( ) ; lattice . insert ( row . asConcept ( attributes . size ( ) ) ) ; } return lattice ; }
Get the concept lattice for this context .
108
9
142,053
public static < G extends Relatable < ? > > Context down ( final CompleteLattice lattice ) { List < Object > elements = Arrays . asList ( lattice . toArray ( ) ) ; return new Context ( elements , elements , new LessOrEqual ( ) ) ; }
Calculate the isomorphic down lattice .
62
10
142,054
public static < G extends Relatable < ? > > Context downset ( final CompleteLattice lattice ) { List < Object > elements = Arrays . asList ( lattice . toArray ( ) ) ; return new Context ( elements , elements , new NotGreaterOrEqual ( ) ) ; }
Calculate the isomorphic downset lattice .
65
11
142,055
public static < G extends PartiallyOrdered < ? > > Context powerset ( final List < G > set ) { return new Context ( set , set , new NotEqual ( ) ) ; }
Calculate the powerset lattice .
42
9
142,056
public static < G extends PartiallyOrdered < ? > > Context antichain ( final List < G > set ) { return new Context ( set , set , new Equal ( ) ) ; }
Calculate the antichain lattice .
41
10
142,057
public static List < Long > indexes ( final MutableBitSet bits ) { List < Long > indexes = new ArrayList <> ( ( int ) bits . cardinality ( ) ) ; for ( long i = bits . nextSetBit ( 0 ) ; i >= 0 ; i = bits . nextSetBit ( i + 1 ) ) { indexes . add ( i ) ; } return indexes ; }
Get the indexes of a bitset .
83
8
142,058
public static String messageAsText ( final Message message , final boolean includeHeaders ) { try { StrBuilder sb = new StrBuilder ( 300 ) ; if ( includeHeaders ) { @ SuppressWarnings ( "unchecked" ) Enumeration < Header > headers = message . getAllHeaders ( ) ; while ( headers . hasMoreElements ( ) ) { Header header = headers . nextElement ( ) ; sb . append ( header . getName ( ) ) . append ( ' ' ) . appendln ( header . getValue ( ) ) ; } sb . appendln ( "" ) ; } Object content = message . getContent ( ) ; if ( content instanceof String ) { String body = ( String ) content ; sb . appendln ( body ) ; sb . appendln ( "" ) ; } else if ( content instanceof Multipart ) { parseMultipart ( sb , ( Multipart ) content ) ; } return sb . toString ( ) ; } catch ( MessagingException ex ) { throw new MailException ( "Error getting mail content." , ex ) ; } catch ( IOException ex ) { throw new MailException ( "Error getting mail content." , ex ) ; } }
Returns the specified message as text .
262
7
142,059
protected final Constraint getConstraint ( final Element element ) { Element constraintElement = element . getChild ( XMLTags . CONSTRAINT ) ; if ( constraintElement != null ) { return generator . getConstraintFactory ( ) . createModel ( random , constraintElement ) ; } constraintElement = element . getChild ( XMLTags . CONSTRAINT_REF ) ; if ( constraintElement != null ) { try { return generator . getConstraintFactory ( ) . getModel ( constraintElement ) ; } catch ( IdNotFoundException e ) { log . error ( "Could not find constraint in map. Maybe it has not been initialised;" + " in this case, try rearranging order of constraints in the xml file." , e ) ; } } throw new IllegalStateException ( "No element constraint or constraint_ref could be found for " + this ) ; }
Searches for the constraint child element in the element and gets a constraint from the factory . If there is no constraint child element a constraint_ref element is searched and the constraint is taken from the factory map .
186
43
142,060
protected final String getValue ( final String key , final FieldCase ca ) throws IdNotFoundException { ConstraintFactory f = generator . getConstraintFactory ( ) ; String value = f . getModel ( key ) . initValues ( ca ) ; if ( value == null ) { return "" ; } return value ; }
Method searches the constraint for the given key initializes it with the passed FieldCase and returns this value .
69
21
142,061
public static BedRecord valueOf ( final String value ) { checkNotNull ( value ) ; List < String > tokens = Splitter . on ( "\t" ) . trimResults ( ) . splitToList ( value ) ; if ( tokens . size ( ) < 3 ) { throw new IllegalArgumentException ( "value must have at least three fields (chrom, start, end)" ) ; } String chrom = tokens . get ( 0 ) ; long start = Long . parseLong ( tokens . get ( 1 ) ) ; long end = Long . parseLong ( tokens . get ( 2 ) ) ; if ( tokens . size ( ) == 3 ) { return new BedRecord ( chrom , start , end ) ; } else { String name = tokens . get ( 3 ) ; if ( tokens . size ( ) == 4 ) { return new BedRecord ( chrom , start , end , name ) ; } else { String score = tokens . get ( 4 ) ; if ( tokens . size ( ) == 5 ) { return new BedRecord ( chrom , start , end , name , score ) ; } else { String strand = tokens . get ( 5 ) ; if ( tokens . size ( ) == 6 ) { return new BedRecord ( chrom , start , end , name , score , strand ) ; } if ( tokens . size ( ) != 12 ) { throw new IllegalArgumentException ( "value is not in BED3, BED4, BED5, BED6 or BED12 format" ) ; } long thickStart = Long . parseLong ( tokens . get ( 6 ) ) ; long thickEnd = Long . parseLong ( tokens . get ( 7 ) ) ; String itemRgb = tokens . get ( 8 ) ; int blockCount = Integer . parseInt ( tokens . get ( 9 ) ) ; long [ ] blockSizes = parseLongArray ( tokens . get ( 10 ) ) ; long [ ] blockStarts = parseLongArray ( tokens . get ( 11 ) ) ; return new BedRecord ( chrom , start , end , name , score , strand , thickStart , thickEnd , itemRgb , blockCount , blockSizes , blockStarts ) ; } } } }
Return a new BED record parsed from the specified value .
460
12
142,062
public static MozuUrl deletePriceListEntryUrl ( String currencyCode , String priceListCode , String productCode , DateTime startDate ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/pricelists/{priceListCode}/entries/{productCode}/{currencyCode}?startDate={startDate}" ) ; formatter . formatUrl ( "currencyCode" , currencyCode ) ; formatter . formatUrl ( "priceListCode" , priceListCode ) ; formatter . formatUrl ( "productCode" , productCode ) ; formatter . formatUrl ( "startDate" , startDate ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeletePriceListEntry
179
9
142,063
public static MozuUrl getEventsUrl ( String filter , Integer pageSize , String responseFields , String sortBy , Integer startIndex ) { UrlFormatter formatter = new UrlFormatter ( "/api/event/pull/?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}" ) ; formatter . formatUrl ( "filter" , filter ) ; formatter . formatUrl ( "pageSize" , pageSize ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "sortBy" , sortBy ) ; formatter . formatUrl ( "startIndex" , startIndex ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . HOME_POD ) ; }
Get Resource Url for GetEvents
191
7
142,064
public static MozuUrl getEventUrl ( String eventId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/event/pull/{eventId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "eventId" , eventId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . HOME_POD ) ; }
Get Resource Url for GetEvent
116
7
142,065
public void addToSms ( final Sms sms ) { if ( null == getSms ( ) ) { setSms ( new java . util . TreeSet < Sms > ( ) ) ; } getSms ( ) . add ( sms ) ; }
Add the sms to the collection of sms associated to the account .
58
15
142,066
public void addToApplications ( final Application application ) { if ( null == getApplications ( ) ) { setApplications ( new java . util . TreeSet < Application > ( ) ) ; } getApplications ( ) . add ( application ) ; }
Add the application to the collection of applications associated to the account .
50
13
142,067
public static MozuUrl setFulFillmentInfoUrl ( String orderId , String responseFields , String updateMode , String version ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/fulfillmentinfo?updatemode={updateMode}&version={version}&responseFields={responseFields}" ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "updateMode" , updateMode ) ; formatter . formatUrl ( "version" , version ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for SetFulFillmentInfo
176
11
142,068
public static MozuUrl deleteDocumentDraftsUrl ( String documentLists ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentpublishing/draft?documentLists={documentLists}" ) ; formatter . formatUrl ( "documentLists" , documentLists ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteDocumentDrafts
100
9
142,069
public static GTRPublicData read ( final Reader reader ) throws IOException { checkNotNull ( reader ) ; try { // todo: may want to cache some of this for performance reasons JAXBContext context = JAXBContext . newInstance ( GTRPublicData . class ) ; Unmarshaller unmarshaller = context . createUnmarshaller ( ) ; SchemaFactory schemaFactory = SchemaFactory . newInstance ( XMLConstants . W3C_XML_SCHEMA_NS_URI ) ; URL schemaURL = GtrReader . class . getResource ( "/org/nmdp/ngs/gtr/xsd/GTRPublicData.xsd" ) ; Schema schema = schemaFactory . newSchema ( schemaURL ) ; unmarshaller . setSchema ( schema ) ; return ( GTRPublicData ) unmarshaller . unmarshal ( reader ) ; } catch ( JAXBException | SAXException e ) { throw new IOException ( "could not unmarshal GTRPublicData" , e ) ; } }
Read GTR public data from the specified reader .
238
10
142,070
public static GTRPublicData read ( final URL url ) throws IOException { checkNotNull ( url ) ; try ( BufferedReader reader = Resources . asCharSource ( url , Charsets . UTF_8 ) . openBufferedStream ( ) ) { return read ( reader ) ; } }
Read GTR public data from the specified URL .
63
10
142,071
public static GTRPublicData read ( final InputStream inputStream ) throws IOException { checkNotNull ( inputStream ) ; try ( BufferedReader reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ) { return read ( reader ) ; } }
Read GTR public data from the specified input stream .
57
11
142,072
public static MozuUrl getShipmentUrl ( String orderId , String responseFields , String shipmentId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/shipments/{shipmentId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "shipmentId" , shipmentId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetShipment
148
8
142,073
public static MozuUrl deleteShipmentUrl ( String orderId , String shipmentId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/shipments/{shipmentId}" ) ; formatter . formatUrl ( "orderId" , orderId ) ; formatter . formatUrl ( "shipmentId" , shipmentId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteShipment
117
8
142,074
public Allele doubleCrossover ( final Allele right ) throws IllegalSymbolException , IndexOutOfBoundsException , IllegalAlphabetException { if ( this . overlaps ( right ) ) { //System.out.println("this range" + this.toString() + " sequence = " + this.sequence.seqString() + "sequence length = " + sequence.length()); Locus homologue = intersection ( right ) ; //System.out.println("homologue = " + homologue); SymbolList copy = DNATools . createDNA ( this . sequence . seqString ( ) ) ; int length = homologue . getEnd ( ) - homologue . getStart ( ) ; int target = homologue . getStart ( ) - right . getStart ( ) + 1 ; int from = homologue . getStart ( ) - this . getStart ( ) + 1 ; //System.out.println("length = " + length); //System.out.println("target = " + target); //System.out.println("from = " + from); //System.out.println("copy = " + copy.seqString()); try { SymbolList replace = right . sequence . subList ( target , target + length - 1 ) ; //System.out.println("replace = " + replace.seqString()); copy . edit ( new Edit ( from , length , replace ) ) ; } catch ( ChangeVetoException e ) { //System.out.println("CHANGE VETO EXCEPTON" + e.getMessage()); } //System.out.println("CROSSEDOVER SEQUENCE = " + copy.seqString()); //copy.edit(new Edit()); //Sequence left = this.sequence.subList(0, homologue.getStart()); //Sequence middle = right.sequence.subList(homologue.getStart() - right.getStart(), i1); return new Allele ( this . name , this . contig , this . getStart ( ) , this . getEnd ( ) , copy , Lesion . UNKNOWN ) ; } return new Allele ( this . name , this . contig , this . getStart ( ) , this . getEnd ( ) , this . sequence , Lesion . UNKNOWN ) ; }
A method to simulate double crossover between Allele objects whereby the sequence from one allele is joined to the other within a specific region of overlap .
487
29
142,075
public Allele merge ( final Allele right , final long minimumOverlap ) throws IllegalSymbolException , IndexOutOfBoundsException , IllegalAlphabetException , AlleleException { Allele . Builder builder = Allele . builder ( ) ; Locus overlap = intersection ( right ) ; // System.out.println("overlap = " + overlap); // System.out.println("overlap.length() " + overlap.length() + " < " + startimumOverlap + "??"); if ( overlap . length ( ) < minimumOverlap ) { return builder . reset ( ) . build ( ) ; } Allele bit = builder . withContig ( overlap . getContig ( ) ) . withStart ( overlap . getStart ( ) ) . withEnd ( overlap . getEnd ( ) ) . withSequence ( SymbolList . EMPTY_LIST ) . withLesion ( Lesion . UNKNOWN ) . build ( ) ; // System.out.println("bit = " + bit + " " + bit.sequence.seqString()); Allele a = bit . doubleCrossover ( right ) ; // System.out.println("a = " + a + " " + a.sequence.seqString()); Allele b = bit . doubleCrossover ( this ) ; // System.out.println("b = " + b + " " + b.sequence.seqString()); if ( a . sequence . seqString ( ) . equals ( b . sequence . seqString ( ) ) ) { Locus union = union ( right ) ; return builder . withName ( right . getName ( ) ) . withContig ( union . getContig ( ) ) . withStart ( union . getStart ( ) ) . withEnd ( union . getEnd ( ) ) . withSequence ( SymbolList . EMPTY_LIST ) . withLesion ( Lesion . UNKNOWN ) . build ( ) . doubleCrossover ( right ) . doubleCrossover ( this ) ; } return builder . reset ( ) . build ( ) ; }
A method to simulate merging of two alleles strictly meaning the sequence in the overlapping regions must be equal .
440
21
142,076
public static MozuUrl changePasswordUrl ( Integer accountId , Boolean unlockAccount , String userId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/{accountId}/Change-Password?unlockAccount={unlockAccount}&userId={userId}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "unlockAccount" , unlockAccount ) ; formatter . formatUrl ( "userId" , userId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for ChangePassword
150
7
142,077
public static MozuUrl setPasswordChangeRequiredUrl ( Integer accountId , String userId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/{accountId}/Set-Password-Change-Required?userId={userId}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "userId" , userId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for SetPasswordChangeRequired
127
9
142,078
public static MozuUrl getLoginStateByEmailAddressUrl ( String customerSetCode , String emailAddress , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/loginstatebyemailaddress?emailAddress={emailAddress}&responseFields={responseFields}" ) ; formatter . formatUrl ( "customerSetCode" , customerSetCode ) ; formatter . formatUrl ( "emailAddress" , emailAddress ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetLoginStateByEmailAddress
157
11
142,079
public static MozuUrl getLoginStateByUserNameUrl ( String customerSetCode , String responseFields , String userName ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/loginstatebyusername?userName={userName}&customerSetCode={customerSetCode}&responseFields={responseFields}" ) ; formatter . formatUrl ( "customerSetCode" , customerSetCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "userName" , userName ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetLoginStateByUserName
167
11
142,080
public static MozuUrl getCustomersPurchaseOrderAccountsUrl ( String accountType , Integer pageSize , String responseFields , String sortBy , Integer startIndex ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/purchaseOrderAccounts?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&accountType={accountType}&responseFields={responseFields}" ) ; formatter . formatUrl ( "accountType" , accountType ) ; formatter . formatUrl ( "pageSize" , pageSize ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "sortBy" , sortBy ) ; formatter . formatUrl ( "startIndex" , startIndex ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetCustomersPurchaseOrderAccounts
213
12
142,081
public static MozuUrl resetPasswordUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/Reset-Password" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for ResetPassword
74
7
142,082
public static MozuUrl getSoftAllocationUrl ( String responseFields , Integer softAllocationId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/softallocations/{softAllocationId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "softAllocationId" , softAllocationId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetSoftAllocation
135
9
142,083
public static MozuUrl addSoftAllocationsUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/softallocations/" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for AddSoftAllocations
74
9
142,084
public static MozuUrl convertToProductReservationUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/softallocations/convert" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for ConvertToProductReservation
78
10
142,085
public static MozuUrl renewSoftAllocationsUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/softallocations/renew" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for RenewSoftAllocations
77
9
142,086
public static MozuUrl updateSoftAllocationsUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/softallocations/" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for UpdateSoftAllocations
74
9
142,087
public static MozuUrl deleteSoftAllocationUrl ( Integer softAllocationId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/softallocations/{softAllocationId}" ) ; formatter . formatUrl ( "softAllocationId" , softAllocationId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteSoftAllocation
104
9
142,088
public static MozuUrl getDocumentTypeUrl ( String documentTypeName , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documenttypes/{documentTypeName}?responseFields={responseFields}" ) ; formatter . formatUrl ( "documentTypeName" , documentTypeName ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetDocumentType
124
8
142,089
public static MozuUrl bulkDeletePriceListEntriesUrl ( Boolean invalidateCache , Boolean publishEvents ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/pricelists/bulkdeleteentries?publishEvents={publishEvents}&invalidateCache={invalidateCache}" ) ; formatter . formatUrl ( "invalidateCache" , invalidateCache ) ; formatter . formatUrl ( "publishEvents" , publishEvents ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for BulkDeletePriceListEntries
144
11
142,090
public static MozuUrl deletePriceListUrl ( Boolean cascadeDeleteEntries , String priceListCode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/pricelists/{priceListCode}?cascadeDeleteEntries={cascadeDeleteEntries}" ) ; formatter . formatUrl ( "cascadeDeleteEntries" , cascadeDeleteEntries ) ; formatter . formatUrl ( "priceListCode" , priceListCode ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeletePriceList
139
8
142,091
public static MozuUrl getEntityUrl ( String entityListFullName , String id , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/entitylists/{entityListFullName}/entities/{id}?responseFields={responseFields}" ) ; formatter . formatUrl ( "entityListFullName" , entityListFullName ) ; formatter . formatUrl ( "id" , id ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetEntity
150
7
142,092
public static MozuUrl deleteEntityUrl ( String entityListFullName , String id ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/entitylists/{entityListFullName}/entities/{id}" ) ; formatter . formatUrl ( "entityListFullName" , entityListFullName ) ; formatter . formatUrl ( "id" , id ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteEntity
119
7
142,093
public static MozuUrl getB2BAccountAttributeUrl ( Integer accountId , String attributeFQN , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/b2baccounts/{accountId}/attributes/{attributeFQN}?responseFields={responseFields}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "attributeFQN" , attributeFQN ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetB2BAccountAttribute
165
12
142,094
public static MozuUrl getUserRolesAsyncUrl ( Integer accountId , String responseFields , String userId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/b2baccounts/{accountId}/user/{userId}/roles?responseFields={responseFields}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "userId" , userId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetUserRolesAsync
157
10
142,095
public static MozuUrl deleteB2BAccountAttributeUrl ( Integer accountId , String attributeFQN ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/b2baccounts/{accountId}/attributes/{attributeFQN}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "attributeFQN" , attributeFQN ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteB2BAccountAttribute
134
12
142,096
public static MozuUrl removeUserRoleAsyncUrl ( Integer accountId , Integer roleId , String userId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/b2baccounts/{accountId}/user/{userId}/roles/{roleId}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "roleId" , roleId ) ; formatter . formatUrl ( "userId" , userId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for RemoveUserRoleAsync
149
9
142,097
public static MozuUrl getLocationTypesUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/admin/locationtypes/" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetLocationTypes
69
8
142,098
public static MozuUrl getLocationTypeUrl ( String locationTypeCode , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/admin/locationtypes/{locationTypeCode}?responseFields={responseFields}" ) ; formatter . formatUrl ( "locationTypeCode" , locationTypeCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetLocationType
126
8
142,099
public static MozuUrl deleteLocationTypeUrl ( String locationTypeCode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/admin/locationtypes/{locationTypeCode}" ) ; formatter . formatUrl ( "locationTypeCode" , locationTypeCode ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteLocationType
95
8