idx int64 0 41.2k | question stringlengths 83 4.15k | target stringlengths 5 715 |
|---|---|---|
18,600 | 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 |
18,601 | 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 |
18,602 | 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 |
18,603 | 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 |
18,604 | 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 |
18,605 | 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 |
18,606 | 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 |
18,607 | 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 |
18,608 | 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 |
18,609 | 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 |
18,610 | 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 |
18,611 | 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 |
18,612 | 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 |
18,613 | 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 |
18,614 | 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 |
18,615 | 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 > ( ) { 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 ; } 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 . |
18,616 | 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 > > ( ) { public List < WebElement > apply ( final WebDriver input ) { doFindElements ( result , input ) ; if ( result . isEmpty ( ) ) { throw new WebElementException ( "No matching element found." ) ; } return result ; } 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 . |
18,617 | 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 |
18,618 | 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 |
18,619 | 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 |
18,620 | 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 |
18,621 | 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 |
18,622 | 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 |
18,623 | 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 . |
18,624 | 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 . |
18,625 | 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 . |
18,626 | 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 . |
18,627 | 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 . |
18,628 | 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 |
18,629 | 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 |
18,630 | 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 |
18,631 | 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 |
18,632 | 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 |
18,633 | 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 . |
18,634 | 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 ( ) ) { return null ; } Map < String , String > dataMap = dataList . get ( counter . getValue ( ) ) ; DataSet dataSet = new DefaultDataSet ( dataMap ) ; 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 . |
18,635 | 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 . |
18,636 | 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 . |
18,637 | 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 . |
18,638 | public static < G extends PartiallyOrdered < ? > > Context powerset ( final List < G > set ) { return new Context ( set , set , new NotEqual ( ) ) ; } | Calculate the powerset lattice . |
18,639 | public static < G extends PartiallyOrdered < ? > > Context antichain ( final List < G > set ) { return new Context ( set , set , new Equal ( ) ) ; } | Calculate the antichain lattice . |
18,640 | 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 . |
18,641 | 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 . |
18,642 | 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 . |
18,643 | 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 . |
18,644 | 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 . |
18,645 | 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 |
18,646 | 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 |
18,647 | 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 |
18,648 | 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 . |
18,649 | 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 . |
18,650 | 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 |
18,651 | 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 |
18,652 | public static GTRPublicData read ( final Reader reader ) throws IOException { checkNotNull ( reader ) ; try { 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 . |
18,653 | 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 . |
18,654 | 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 . |
18,655 | 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 |
18,656 | 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 |
18,657 | public Allele doubleCrossover ( final Allele right ) throws IllegalSymbolException , IndexOutOfBoundsException , IllegalAlphabetException { if ( this . overlaps ( right ) ) { Locus homologue = intersection ( right ) ; 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 ; try { SymbolList replace = right . sequence . subList ( target , target + length - 1 ) ; copy . edit ( new Edit ( from , length , replace ) ) ; } catch ( ChangeVetoException e ) { } 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 . |
18,658 | public Allele merge ( final Allele right , final long minimumOverlap ) throws IllegalSymbolException , IndexOutOfBoundsException , IllegalAlphabetException , AlleleException { Allele . Builder builder = Allele . builder ( ) ; Locus overlap = intersection ( right ) ; 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 ( ) ; Allele a = bit . doubleCrossover ( right ) ; Allele b = bit . doubleCrossover ( this ) ; 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 . |
18,659 | 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 |
18,660 | 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 |
18,661 | 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 |
18,662 | 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 |
18,663 | 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 |
18,664 | 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 |
18,665 | 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 |
18,666 | 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 |
18,667 | 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 |
18,668 | 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 |
18,669 | 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 |
18,670 | 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 |
18,671 | 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 |
18,672 | 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 |
18,673 | 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 |
18,674 | 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 |
18,675 | 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 |
18,676 | 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 |
18,677 | 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 |
18,678 | 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 |
18,679 | 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 |
18,680 | 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 |
18,681 | 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 |
18,682 | 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 |
18,683 | public static MozuUrl getMasterCatalogUrl ( Integer masterCatalogId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/mastercatalogs/{masterCatalogId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "masterCatalogId" , masterCatalogId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; } | Get Resource Url for GetMasterCatalog |
18,684 | public static Sequence createSequence ( final org . biojava . bio . seq . Sequence sequence ) { checkNotNull ( sequence ) ; Sequence s = new Sequence ( ) ; if ( ! DNATools . getDNA ( ) . equals ( sequence . getAlphabet ( ) ) ) { throw new IllegalArgumentException ( "alphabet must be DNA" ) ; } s . setValue ( sequence . seqString ( ) ) ; return s ; } | Create and return a new HML Sequence from the specified sequence . |
18,685 | public static Iterable < Sequence > createSequences ( final BufferedReader reader ) throws IOException { checkNotNull ( reader ) ; List < Sequence > sequences = new ArrayList < Sequence > ( ) ; for ( SequenceIterator it = SeqIOTools . readFastaDNA ( reader ) ; it . hasNext ( ) ; ) { try { sequences . add ( createSequence ( it . nextSequence ( ) ) ) ; } catch ( BioException e ) { throw new IOException ( "could not read DNA sequences" , e ) ; } } return sequences ; } | Create and return zero or more DNA HML Sequences read from the specified reader in FASTA format . |
18,686 | public static Iterable < Sequence > createSequences ( final File file ) throws IOException { checkNotNull ( file ) ; try ( BufferedReader reader = new BufferedReader ( new FileReader ( file ) ) ) { return createSequences ( reader ) ; } } | Create and return zero or more DNA HML Sequences read from the specified file in FASTA format . |
18,687 | public static Iterable < Sequence > createSequences ( final URL url ) throws IOException { checkNotNull ( url ) ; try ( BufferedReader reader = Resources . asCharSource ( url , Charsets . UTF_8 ) . openBufferedStream ( ) ) { return createSequences ( reader ) ; } } | Create and return zero or more DNA HML Sequences read from the specified URL in FASTA format . |
18,688 | public static Iterable < Sequence > createSequences ( final InputStream inputStream ) throws IOException { checkNotNull ( inputStream ) ; try ( BufferedReader reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ) { return createSequences ( reader ) ; } } | Create and return zero or more DNA HML Sequences read from the specified input stream in FASTA format . |
18,689 | public static SymbolList toDnaSymbolList ( final Sequence sequence ) throws IllegalSymbolException { checkNotNull ( sequence ) ; return DNATools . createDNA ( sequence . getValue ( ) . replaceAll ( "\\s+" , "" ) ) ; } | Convert the specified HML Sequence element into a DNA symbol list . |
18,690 | public void refreshAppAuthTicket ( ) { StringBuilder resourceUrl = new StringBuilder ( MozuConfig . getBaseUrl ( ) ) . append ( AuthTicketUrl . refreshAppAuthTicketUrl ( null ) . getUrl ( ) ) ; try { @ SuppressWarnings ( "unchecked" ) MozuClient < AuthTicket > client = ( MozuClient < AuthTicket > ) MozuClientFactory . getInstance ( AuthTicket . class ) ; AuthTicketRequest authTicketRequest = new AuthTicketRequest ( ) ; authTicketRequest . setRefreshToken ( appAuthTicket . getRefreshToken ( ) ) ; appAuthTicket = client . executePutRequest ( authTicketRequest , resourceUrl . toString ( ) , null ) ; } catch ( ApiException e ) { logger . warn ( e . getMessage ( ) , e ) ; throw e ; } catch ( Exception e ) { logger . warn ( e . getMessage ( ) , e ) ; throw new ApiException ( "Exception getting Mozu client: " + e . getMessage ( ) ) ; } logger . info ( "Setting app token refresh intervals" ) ; setRefreshIntervals ( false ) ; logger . info ( "App Authentication Done" ) ; } | jh the application auth ticket using the refresh token |
18,691 | public static MozuUrl deleteAccountContactUrl ( Integer accountId , Integer contactId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/{accountId}/contacts/{contactId}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "contactId" , contactId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; } | Get Resource Url for DeleteAccountContact |
18,692 | public int getMaxLength ( ) { int max = 0 ; boolean found = false ; for ( Constraint c : constraints ) { int cM = c . getMaxLength ( ) ; if ( cM != - 1 ) { max += cM ; found = true ; } } return found ? max : - 1 ; } | Returns the sum of all maximum lengths of the sub - constraints |
18,693 | public String initValues ( final FieldCase ca ) { boolean found = false ; buffer . setLength ( 0 ) ; for ( Constraint c : constraints ) { String cV = c . initValues ( ca ) ; if ( cV != null ) { found = true ; buffer . append ( cV ) ; } } if ( found ) { return buffer . toString ( ) ; } return null ; } | Initializes all sub - constraints . Returns a character string composed of all character strings of the constraints contained in it . If all sub - constraints return null null is returned . |
18,694 | private Node createNode ( final Iterable < Range < C > > ranges ) { Range < C > span = Iterables . getFirst ( ranges , null ) ; if ( span == null ) { return null ; } for ( Range < C > range : ranges ) { checkNotNull ( range , "ranges must not contain null ranges" ) ; span = range . span ( span ) ; } if ( span . isEmpty ( ) ) { return null ; } C center = Ranges . center ( span ) ; List < Range < C > > left = Lists . newArrayList ( ) ; List < Range < C > > right = Lists . newArrayList ( ) ; List < Range < C > > overlap = Lists . newArrayList ( ) ; for ( Range < C > range : ranges ) { if ( Ranges . isLessThan ( range , center ) ) { left . add ( range ) ; } else if ( Ranges . isGreaterThan ( range , center ) ) { right . add ( range ) ; } else { overlap . add ( range ) ; } } return new Node ( center , createNode ( left ) , createNode ( right ) , overlap ) ; } | Create and return a new node for the specified ranges . |
18,695 | private void depthFirstSearch ( final Range < C > query , final Node node , final List < Range < C > > result , final Set < Node > visited ) { if ( node == null || visited . contains ( node ) || query . isEmpty ( ) ) { return ; } if ( node . left ( ) != null && Ranges . isLessThan ( query , node . center ( ) ) ) { depthFirstSearch ( query , node . left ( ) , result , visited ) ; } else if ( node . right ( ) != null && Ranges . isGreaterThan ( query , node . center ( ) ) ) { depthFirstSearch ( query , node . right ( ) , result , visited ) ; } if ( Ranges . isGreaterThan ( query , node . center ( ) ) ) { for ( Range < C > range : node . overlapByUpperEndpoint ( ) ) { if ( Ranges . intersect ( range , query ) ) { result . add ( range ) ; } if ( Ranges . isGreaterThan ( query , range . upperEndpoint ( ) ) ) { break ; } } } else if ( Ranges . isLessThan ( query , node . center ( ) ) ) { for ( Range < C > range : node . overlapByLowerEndpoint ( ) ) { if ( Ranges . intersect ( range , query ) ) { result . add ( range ) ; } if ( Ranges . isLessThan ( query , range . lowerEndpoint ( ) ) ) { break ; } } } else { result . addAll ( node . overlapByLowerEndpoint ( ) ) ; } visited . add ( node ) ; } | Depth first search . |
18,696 | public static MozuUrl updateLocationInventoryUrl ( String productCode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{ProductCode}/LocationInventory" ) ; formatter . formatUrl ( "productCode" , productCode ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; } | Get Resource Url for UpdateLocationInventory |
18,697 | public static MozuUrl getProductVariationLocalizedDeltaPricesUrl ( String productCode , String variationKey ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedDeltaPrice" ) ; formatter . formatUrl ( "productCode" , productCode ) ; formatter . formatUrl ( "variationKey" , variationKey ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; } | Get Resource Url for GetProductVariationLocalizedDeltaPrices |
18,698 | public static MozuUrl addProductVariationLocalizedPriceUrl ( String productCode , String responseFields , String variationKey ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedPrice?responseFields={responseFields}" ) ; formatter . formatUrl ( "productCode" , productCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "variationKey" , variationKey ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; } | Get Resource Url for AddProductVariationLocalizedPrice |
18,699 | public static MozuUrl updateProductVariationLocalizedDeltaPriceUrl ( String currencyCode , String productCode , String responseFields , String variationKey ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedDeltaPrice/{currencyCode}?responseFields={responseFields}" ) ; formatter . formatUrl ( "currencyCode" , currencyCode ) ; formatter . formatUrl ( "productCode" , productCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "variationKey" , variationKey ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; } | Get Resource Url for UpdateProductVariationLocalizedDeltaPrice |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.