repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/ShippingUrl.java | ShippingUrl.getRatesUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getRatesUrl",
"(",
"Boolean",
"includeRawResponse",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/storefront/shipping/request-rates?responseFields={responseFields}\... | Get Resource Url for GetRates
@param includeRawResponse Set this parameter to to retrieve the full raw JSON response from a shipping carrier (instead of just the shipping rate).
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetRates"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/ShippingUrl.java#L34-L40 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/settings/general/CustomRouteSettingsUrl.java | CustomRouteSettingsUrl.deleteCustomRouteSettingsUrl | public static MozuUrl deleteCustomRouteSettingsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/general/customroutes");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteCustomRouteSettingsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/general/customroutes");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteCustomRouteSettingsUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/settings/general/customroutes\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
... | Get Resource Url for DeleteCustomRouteSettings
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteCustomRouteSettings"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/settings/general/CustomRouteSettingsUrl.java#L56-L60 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java | OrderUrl.getOrderUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getOrderUrl",
"(",
"Boolean",
"draft",
",",
"Boolean",
"includeBin",
",",
"String",
"orderId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{orderId}?dr... | Get Resource Url for GetOrder
@param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components.
@param includeBin
@param orderId Unique identifier of the order.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetOrder"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java#L74-L82 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java | OrderUrl.priceOrderUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"priceOrderUrl",
"(",
"Boolean",
"refreshShipping",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/price?refreshShipping={refreshShipping}&responseFields={responseFiel... | Get Resource Url for PriceOrder
@param refreshShipping Specifies whether shipping rates should be re-evaluated while pricing.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"PriceOrder"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java#L130-L136 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java | OrderUrl.deleteOrderDraftUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deleteOrderDraftUrl",
"(",
"String",
"orderId",
",",
"String",
"version",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{orderId}/draft?version={version}\"",
")",
";",
"formatter",
".",
"f... | Get Resource Url for DeleteOrderDraft
@param orderId Unique identifier of the order.
@param version Determines whether or not to check versioning of items for concurrency purposes.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteOrderDraft"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java#L180-L186 | train |
mgm-tp/jfunk | jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebElementFinder.java | WebElementFinder.find | 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;
} | java | 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;
} | [
"public",
"WebElement",
"find",
"(",
")",
"{",
"checkState",
"(",
"webDriver",
"!=",
"null",
",",
"\"No WebDriver specified.\"",
")",
";",
"checkState",
"(",
"by",
"!=",
"null",
",",
"\"No By instance for locating elements specified.\"",
")",
";",
"if",
"(",
"!",
... | Finds the first element.
@return the element | [
"Finds",
"the",
"first",
"element",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebElementFinder.java#L241-L278 | train |
mgm-tp/jfunk | jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebElementFinder.java | WebElementFinder.findAll | 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);
}
} | java | 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);
}
} | [
"public",
"List",
"<",
"WebElement",
">",
"findAll",
"(",
")",
"{",
"checkState",
"(",
"webDriver",
"!=",
"null",
",",
"\"No WebDriver specified.\"",
")",
";",
"checkState",
"(",
"by",
"!=",
"null",
",",
"\"No By instance for locating elements specified.\"",
")",
... | Finds all elements.
@return the list of elements | [
"Finds",
"all",
"elements",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebElementFinder.java#L285-L325 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java | ReferenceDataUrl.getAddressSchemaUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getAddressSchemaUrl",
"(",
"String",
"countryCode",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/reference/addressschema/{countryCode}?responseFields={responseFields}\"",
... | Get Resource Url for GetAddressSchema
@param countryCode The 2-letter country code used to retrieve a specified address schema.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetAddressSchema"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java#L22-L28 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java | ReferenceDataUrl.getAddressSchemasUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getAddressSchemasUrl",
"(",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/reference/addressschemas?responseFields={responseFields}\"",
")",
";",
"formatter",
".",
"formatUrl... | Get Resource Url for GetAddressSchemas
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetAddressSchemas"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java#L35-L40 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java | ReferenceDataUrl.getBehaviorUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getBehaviorUrl",
"(",
"Integer",
"behaviorId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/reference/behaviors/{behaviorId}?responseFields={responseFields}\"",
")",
"... | Get Resource Url for GetBehavior
@param behaviorId Unique identifier of the behavior.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetBehavior"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java#L48-L54 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java | ReferenceDataUrl.getBehaviorCategoryUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getBehaviorCategoryUrl",
"(",
"Integer",
"categoryId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/reference/behaviors/categories/{categoryId}?responseFields={responseFie... | Get Resource Url for GetBehaviorCategory
@param categoryId Unique identifier of the category to modify.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetBehaviorCategory"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java#L62-L68 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java | ReferenceDataUrl.getBehaviorsUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getBehaviorsUrl",
"(",
"String",
"responseFields",
",",
"String",
"userType",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/reference/behaviors?userType={userType}&responseFields={responseFields}\"",
")"... | Get Resource Url for GetBehaviors
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param userType The user type associated with the behaviors to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetBehaviors"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java#L88-L94 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java | ReferenceDataUrl.getUnitsOfMeasureUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getUnitsOfMeasureUrl",
"(",
"String",
"filter",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/reference/unitsofmeasure?filter={filter}&responseFields={responseFields}\"",
... | Get Resource Url for GetUnitsOfMeasure
@param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetUnitsOfMeasure"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java#L174-L180 | train |
mgm-tp/jfunk | jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java | WebDriverTool.tryClick | 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;
} | java | 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;
} | [
"public",
"boolean",
"tryClick",
"(",
"final",
"By",
"by",
")",
"{",
"LOGGER",
".",
"info",
"(",
"\"Trying to click on {}\"",
",",
"by",
")",
";",
"List",
"<",
"WebElement",
">",
"elements",
"=",
"wef",
".",
"timeout",
"(",
"2L",
")",
".",
"by",
"(",
... | Tries to find and element and clicks on it if found. Uses a timeout of two seconds.
@param by
the {@link By} used to locate the element
@return {@code true} if the element was found and clicked, {@code false} otherwise | [
"Tries",
"to",
"find",
"and",
"element",
"and",
"clicks",
"on",
"it",
"if",
"found",
".",
"Uses",
"a",
"timeout",
"of",
"two",
"seconds",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java#L383-L395 | train |
mgm-tp/jfunk | jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java | WebDriverTool.executeScript | 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);
} | java | 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);
} | [
"public",
"Object",
"executeScript",
"(",
"final",
"String",
"script",
",",
"final",
"Object",
"...",
"args",
")",
"{",
"LOGGER",
".",
"info",
"(",
"\"executeScript: {}\"",
",",
"new",
"ToStringBuilder",
"(",
"this",
",",
"LoggingToStringStyle",
".",
"INSTANCE",... | Execute JavaScript in the context of the currently selected frame or window.
@see JavascriptExecutor#executeScript(String, Object...)
@param script
The JavaScript to execute
@param args
The arguments to the script. May be empty
@return One of Boolean, Long, String, List or WebElement. Or null. | [
"Execute",
"JavaScript",
"in",
"the",
"context",
"of",
"the",
"currently",
"selected",
"frame",
"or",
"window",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java#L733-L736 | train |
mgm-tp/jfunk | jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java | WebDriverTool.openNewWindow | public String openNewWindow(final String url, final long timeoutSeconds) {
String oldHandle = openNewWindow(timeoutSeconds);
get(url);
return oldHandle;
} | java | public String openNewWindow(final String url, final long timeoutSeconds) {
String oldHandle = openNewWindow(timeoutSeconds);
get(url);
return oldHandle;
} | [
"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.
@param url
the url to open
@param timeoutSeconds
the timeout in seconds to wait for the new window to open
@return the handle of the window that opened the new window | [
"Opens",
"a",
"new",
"window",
"switches",
"to",
"it",
"and",
"loads",
"the",
"given",
"URL",
"in",
"the",
"new",
"window",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java#L791-L795 | train |
mgm-tp/jfunk | jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java | WebDriverTool.assertTopmostElement | 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)));
}
} | java | 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)));
}
} | [
"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... | Asserts that the element is not covered by any other element.
@param by
the {@link By} used to locate the element.
@throws WebElementException
if the element cannot be located or moved into the viewport.
@throws AssertionError
if the element is covered by some other element. | [
"Asserts",
"that",
"the",
"element",
"is",
"not",
"covered",
"by",
"any",
"other",
"element",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java#L864-L878 | train |
mgm-tp/jfunk | jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java | WebDriverTool.isTopmostElement | public Boolean isTopmostElement(By by) {
if (!isTopmostElementCheckApplicable(by)) {
return null;
}
WebElement topmostElement = findTopmostElement(by);
WebElement element = findElement(by);
return element.equals(topmostElement);
} | java | public Boolean isTopmostElement(By by) {
if (!isTopmostElementCheckApplicable(by)) {
return null;
}
WebElement topmostElement = findTopmostElement(by);
WebElement element = findElement(by);
return element.equals(topmostElement);
} | [
"public",
"Boolean",
"isTopmostElement",
"(",
"By",
"by",
")",
"{",
"if",
"(",
"!",
"isTopmostElementCheckApplicable",
"(",
"by",
")",
")",
"{",
"return",
"null",
";",
"}",
"WebElement",
"topmostElement",
"=",
"findTopmostElement",
"(",
"by",
")",
";",
"WebE... | Checks if an element is the topmost, i.e. not covered by any other element.
@param by
the {@link By} used to locate the element.
@throws WebElementException
if the element cannot be located or moved into the viewport.
@return {@code true} if the element is the topmost element, {@code false}
if not or {@code null} if the topmostElementCheck is not applicable. | [
"Checks",
"if",
"an",
"element",
"is",
"the",
"topmost",
"i",
".",
"e",
".",
"not",
"covered",
"by",
"any",
"other",
"element",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java#L891-L898 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java | ProductUrl.addProductUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"addProductUrl",
"(",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/products/?responseFields={responseFields}\"",
")",
";",
"formatter",
".",
"formatUrl",
"("... | Get Resource Url for AddProduct
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"AddProduct"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java#L89-L94 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java | ProductUrl.addProductInCatalogUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"addProductInCatalogUrl",
"(",
"String",
"productCode",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/products/{productCode}/ProductInCatalogs?responseFields={... | Get Resource Url for AddProductInCatalog
@param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"AddProductInCatalog"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java#L102-L108 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java | ProductUrl.renameProductCodesUrl | public static MozuUrl renameProductCodesUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/Actions/RenameProductCodes");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl renameProductCodesUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/Actions/RenameProductCodes");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"renameProductCodesUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/products/Actions/RenameProductCodes\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getRes... | Get Resource Url for RenameProductCodes
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"RenameProductCodes"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java#L114-L118 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java | ProductUrl.updateProductInCatalogUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"updateProductInCatalogUrl",
"(",
"Integer",
"catalogId",
",",
"String",
"productCode",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/products/{productCo... | Get Resource Url for UpdateProductInCatalog
@param catalogId Unique identifier for a catalog.
@param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateProductInCatalog"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java#L139-L146 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java | ProductUrl.deleteProductInCatalogUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deleteProductInCatalogUrl",
"(",
"Integer",
"catalogId",
",",
"String",
"productCode",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/products/{productCode}/ProductInCatalogs/{catalogId}\"",
... | Get Resource Url for DeleteProductInCatalog
@param catalogId Unique identifier for a catalog.
@param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteProductInCatalog"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java#L180-L186 | train |
mgm-tp/jfunk | jfunk-data-excel/src/main/java/com/mgmtp/jfunk/data/excel/ExcelDataSource.java | ExcelDataSource.getExcelFiles | 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;
} | java | 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;
} | [
"protected",
"List",
"<",
"ExcelFile",
">",
"getExcelFiles",
"(",
")",
"{",
"if",
"(",
"excelFiles",
"==",
"null",
")",
"{",
"excelFiles",
"=",
"newArrayListWithCapacity",
"(",
"3",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
";",
"++",
"i",
")"... | Loads and cache Excel file contents.
@return a list of {@link ExcelFile} instances | [
"Loads",
"and",
"cache",
"Excel",
"file",
"contents",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-excel/src/main/java/com/mgmtp/jfunk/data/excel/ExcelDataSource.java#L86-L114 | train |
mgm-tp/jfunk | jfunk-data-excel/src/main/java/com/mgmtp/jfunk/data/excel/ExcelDataSource.java | ExcelDataSource.getNextDataSetImpl | @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;
} | java | @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;
} | [
"@",
"Override",
"protected",
"DataSet",
"getNextDataSetImpl",
"(",
"final",
"String",
"dataSetKey",
")",
"{",
"for",
"(",
"ExcelFile",
"excelFile",
":",
"getExcelFiles",
"(",
")",
")",
"{",
"Map",
"<",
"String",
",",
"List",
"<",
"Map",
"<",
"String",
","... | 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. | [
"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",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-excel/src/main/java/com/mgmtp/jfunk/data/excel/ExcelDataSource.java#L120-L149 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Context.java | Context.asConceptLattice | 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;
} | java | 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;
} | [
"public",
"ConceptLattice",
"asConceptLattice",
"(",
"final",
"Graph",
"graph",
")",
"{",
"ConceptLattice",
"lattice",
"=",
"new",
"ConceptLattice",
"(",
"graph",
",",
"attributes",
".",
"size",
"(",
")",
")",
";",
"Iterator",
"it",
"=",
"this",
".",
"asCros... | Get the concept lattice for this context.
@param graph backend
@return concept lattice | [
"Get",
"the",
"concept",
"lattice",
"for",
"this",
"context",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Context.java#L159-L169 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Context.java | Context.down | public static <G extends Relatable<?>> Context down(final CompleteLattice lattice) {
List<Object> elements = Arrays.asList(lattice.toArray());
return new Context(elements, elements, new LessOrEqual());
} | java | public static <G extends Relatable<?>> Context down(final CompleteLattice lattice) {
List<Object> elements = Arrays.asList(lattice.toArray());
return new Context(elements, elements, new LessOrEqual());
} | [
"public",
"static",
"<",
"G",
"extends",
"Relatable",
"<",
"?",
">",
">",
"Context",
"down",
"(",
"final",
"CompleteLattice",
"lattice",
")",
"{",
"List",
"<",
"Object",
">",
"elements",
"=",
"Arrays",
".",
"asList",
"(",
"lattice",
".",
"toArray",
"(",
... | Calculate the isomorphic down lattice.
@param <G> element type
@param lattice of elements
@return the down lattice of the given complete lattice
@see <a href="https://en.wikipedia.org/wiki/Upper_set">upper set</a> | [
"Calculate",
"the",
"isomorphic",
"down",
"lattice",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Context.java#L178-L181 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Context.java | Context.downset | public static <G extends Relatable<?>> Context downset(final CompleteLattice lattice) {
List<Object> elements = Arrays.asList(lattice.toArray());
return new Context(elements, elements, new NotGreaterOrEqual());
} | java | public static <G extends Relatable<?>> Context downset(final CompleteLattice lattice) {
List<Object> elements = Arrays.asList(lattice.toArray());
return new Context(elements, elements, new NotGreaterOrEqual());
} | [
"public",
"static",
"<",
"G",
"extends",
"Relatable",
"<",
"?",
">",
">",
"Context",
"downset",
"(",
"final",
"CompleteLattice",
"lattice",
")",
"{",
"List",
"<",
"Object",
">",
"elements",
"=",
"Arrays",
".",
"asList",
"(",
"lattice",
".",
"toArray",
"(... | Calculate the isomorphic downset lattice.
@param <G> element type
@param lattice of elements
@return the downset lattice of a given complete lattice | [
"Calculate",
"the",
"isomorphic",
"downset",
"lattice",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Context.java#L189-L192 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Context.java | Context.powerset | public static <G extends PartiallyOrdered<?>> Context powerset(final List<G> set) {
return new Context(set, set, new NotEqual());
} | java | public static <G extends PartiallyOrdered<?>> Context powerset(final List<G> set) {
return new Context(set, set, new NotEqual());
} | [
"public",
"static",
"<",
"G",
"extends",
"PartiallyOrdered",
"<",
"?",
">",
">",
"Context",
"powerset",
"(",
"final",
"List",
"<",
"G",
">",
"set",
")",
"{",
"return",
"new",
"Context",
"(",
"set",
",",
"set",
",",
"new",
"NotEqual",
"(",
")",
")",
... | Calculate the powerset lattice.
@param <G> element type
@param set of partially-ordered elements
@return the powerset lattice | [
"Calculate",
"the",
"powerset",
"lattice",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Context.java#L200-L202 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Context.java | Context.antichain | public static <G extends PartiallyOrdered<?>> Context antichain(final List<G> set) {
return new Context(set, set, new Equal());
} | java | public static <G extends PartiallyOrdered<?>> Context antichain(final List<G> set) {
return new Context(set, set, new Equal());
} | [
"public",
"static",
"<",
"G",
"extends",
"PartiallyOrdered",
"<",
"?",
">",
">",
"Context",
"antichain",
"(",
"final",
"List",
"<",
"G",
">",
"set",
")",
"{",
"return",
"new",
"Context",
"(",
"set",
",",
"set",
",",
"new",
"Equal",
"(",
")",
")",
"... | Calculate the antichain lattice.
@param <G> element type
@param set of partially-ordered elements
@return the antichain lattice | [
"Calculate",
"the",
"antichain",
"lattice",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Context.java#L210-L212 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Context.java | Context.indexes | 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;
} | java | 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;
} | [
"public",
"static",
"List",
"<",
"Long",
">",
"indexes",
"(",
"final",
"MutableBitSet",
"bits",
")",
"{",
"List",
"<",
"Long",
">",
"indexes",
"=",
"new",
"ArrayList",
"<>",
"(",
"(",
"int",
")",
"bits",
".",
"cardinality",
"(",
")",
")",
";",
"for",... | Get the indexes of a bitset.
@param bits parameter
@return list of set bits | [
"Get",
"the",
"indexes",
"of",
"a",
"bitset",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Context.java#L219-L227 | train |
mgm-tp/jfunk | jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MessageUtils.java | MessageUtils.messageAsText | 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);
}
} | java | 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);
}
} | [
"public",
"static",
"String",
"messageAsText",
"(",
"final",
"Message",
"message",
",",
"final",
"boolean",
"includeHeaders",
")",
"{",
"try",
"{",
"StrBuilder",
"sb",
"=",
"new",
"StrBuilder",
"(",
"300",
")",
";",
"if",
"(",
"includeHeaders",
")",
"{",
"... | Returns the specified message as text.
@param message
the message
@param includeHeaders
specifies whether message headers are to be included in the returned text
@return the message text | [
"Returns",
"the",
"specified",
"message",
"as",
"text",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MessageUtils.java#L60-L89 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/base/BaseConstraint.java | BaseConstraint.getConstraint | 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);
} | java | 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);
} | [
"protected",
"final",
"Constraint",
"getConstraint",
"(",
"final",
"Element",
"element",
")",
"{",
"Element",
"constraintElement",
"=",
"element",
".",
"getChild",
"(",
"XMLTags",
".",
"CONSTRAINT",
")",
";",
"if",
"(",
"constraintElement",
"!=",
"null",
")",
... | 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.
@return the constraint contained in this element | [
"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"... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/base/BaseConstraint.java#L198-L213 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/base/BaseConstraint.java | BaseConstraint.getValue | 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;
} | java | 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;
} | [
"protected",
"final",
"String",
"getValue",
"(",
"final",
"String",
"key",
",",
"final",
"FieldCase",
"ca",
")",
"throws",
"IdNotFoundException",
"{",
"ConstraintFactory",
"f",
"=",
"generator",
".",
"getConstraintFactory",
"(",
")",
";",
"String",
"value",
"=",... | Method searches the constraint for the given key, initializes it with the passed FieldCase
and returns this value.
@return return the value of the constrain for the passed key. If the value is {@code null}
return an empty string | [
"Method",
"searches",
"the",
"constraint",
"for",
"the",
"given",
"key",
"initializes",
"it",
"with",
"the",
"passed",
"FieldCase",
"and",
"returns",
"this",
"value",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/base/BaseConstraint.java#L222-L229 | train |
nmdp-bioinformatics/ngs | align/src/main/java/org/nmdp/ngs/align/BedRecord.java | BedRecord.valueOf | 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);
}
}
}
} | java | 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);
}
}
}
} | [
"public",
"static",
"BedRecord",
"valueOf",
"(",
"final",
"String",
"value",
")",
"{",
"checkNotNull",
"(",
"value",
")",
";",
"List",
"<",
"String",
">",
"tokens",
"=",
"Splitter",
".",
"on",
"(",
"\"\\t\"",
")",
".",
"trimResults",
"(",
")",
".",
"sp... | Return a new BED record parsed from the specified value.
@param value value to parse
@return a new BED record parsed from the specified value
@throws IllegalArgumentException if the value is not valid BED[3,4,5,6,12] format
@throws NullPointerException if a required field is missing
@throws NumberFormatException if a long valued field cannot be parsed as a long | [
"Return",
"a",
"new",
"BED",
"record",
"parsed",
"from",
"the",
"specified",
"value",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/BedRecord.java#L456-L497 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/pricelists/PriceListEntryUrl.java | PriceListEntryUrl.deletePriceListEntryUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deletePriceListEntryUrl",
"(",
"String",
"currencyCode",
",",
"String",
"priceListCode",
",",
"String",
"productCode",
",",
"DateTime",
"startDate",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerc... | Get Resource Url for DeletePriceListEntry
@param currencyCode The three character ISOÂ currency code, such as USDÂ for US Dollars.
@param priceListCode The code of the specified price list associated with the price list entry.
@param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product.
@param startDate The start date of the price list entry.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeletePriceListEntry"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/pricelists/PriceListEntryUrl.java#L100-L108 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/event/EventNotificationUrl.java | EventNotificationUrl.getEventsUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getEventsUrl",
"(",
"String",
"filter",
",",
"Integer",
"pageSize",
",",
"String",
"responseFields",
",",
"String",
"sortBy",
",",
"Integer",
"startIndex",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\... | Get Resource Url for GetEvents
@param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.
@param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param sortBy The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for more information.
@param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetEvents"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/event/EventNotificationUrl.java#L25-L34 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/event/EventNotificationUrl.java | EventNotificationUrl.getEventUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getEventUrl",
"(",
"String",
"eventId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/event/pull/{eventId}?responseFields={responseFields}\"",
")",
";",
"formatter",
".",
... | Get Resource Url for GetEvent
@param eventId The unique identifier of the event being retrieved. An event is a notification about a create, read, update, or delete on an order, product, discount or category.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetEvent"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/event/EventNotificationUrl.java#L42-L48 | train |
EsupPortail/esup-smsu-api | src/main/java/org/esupportail/smsuapi/dao/beans/Account.java | Account.addToSms | public void addToSms(final Sms sms) {
if (null == getSms()) {
setSms(new java.util.TreeSet<Sms>());
}
getSms().add(sms);
} | java | public void addToSms(final Sms sms) {
if (null == getSms()) {
setSms(new java.util.TreeSet<Sms>());
}
getSms().add(sms);
} | [
"public",
"void",
"addToSms",
"(",
"final",
"Sms",
"sms",
")",
"{",
"if",
"(",
"null",
"==",
"getSms",
"(",
")",
")",
"{",
"setSms",
"(",
"new",
"java",
".",
"util",
".",
"TreeSet",
"<",
"Sms",
">",
"(",
")",
")",
";",
"}",
"getSms",
"(",
")",
... | Add the sms to the collection of sms associated to the account.
@param sms | [
"Add",
"the",
"sms",
"to",
"the",
"collection",
"of",
"sms",
"associated",
"to",
"the",
"account",
"."
] | 7b6a4388065adfd84655dbc83f37080874953b20 | https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/dao/beans/Account.java#L197-L202 | train |
EsupPortail/esup-smsu-api | src/main/java/org/esupportail/smsuapi/dao/beans/Account.java | Account.addToApplications | public void addToApplications(final Application application) {
if (null == getApplications()) {
setApplications(new java.util.TreeSet<Application>());
}
getApplications().add(application);
} | java | public void addToApplications(final Application application) {
if (null == getApplications()) {
setApplications(new java.util.TreeSet<Application>());
}
getApplications().add(application);
} | [
"public",
"void",
"addToApplications",
"(",
"final",
"Application",
"application",
")",
"{",
"if",
"(",
"null",
"==",
"getApplications",
"(",
")",
")",
"{",
"setApplications",
"(",
"new",
"java",
".",
"util",
".",
"TreeSet",
"<",
"Application",
">",
"(",
"... | Add the application to the collection of applications associated to the account.
@param application | [
"Add",
"the",
"application",
"to",
"the",
"collection",
"of",
"applications",
"associated",
"to",
"the",
"account",
"."
] | 7b6a4388065adfd84655dbc83f37080874953b20 | https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/dao/beans/Account.java#L223-L228 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/FulfillmentInfoUrl.java | FulfillmentInfoUrl.setFulFillmentInfoUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"setFulFillmentInfoUrl",
"(",
"String",
"orderId",
",",
"String",
"responseFields",
",",
"String",
"updateMode",
",",
"String",
"version",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{o... | Get Resource Url for SetFulFillmentInfo
@param orderId Unique identifier of the order.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit."
@param version Determines whether or not to check versioning of items for concurrency purposes.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"SetFulFillmentInfo"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/FulfillmentInfoUrl.java#L40-L48 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/content/DocumentDraftSummaryUrl.java | DocumentDraftSummaryUrl.deleteDocumentDraftsUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deleteDocumentDraftsUrl",
"(",
"String",
"documentLists",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/content/documentpublishing/draft?documentLists={documentLists}\"",
")",
";",
"formatter",
".",
"formatUrl"... | Get Resource Url for DeleteDocumentDrafts
@param documentLists List of document lists that contain documents to delete.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteDocumentDrafts"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/DocumentDraftSummaryUrl.java#L39-L44 | train |
nmdp-bioinformatics/ngs | gtr/src/main/java/org/nmdp/ngs/gtr/GtrReader.java | GtrReader.read | 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);
}
} | java | 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);
}
} | [
"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",
"=",
"JAX... | Read GTR public data from the specified reader.
@param reader reader to read from, must not be null
@return the GTR public data read from the specified reader
@throws IOException if an I/O error occurs | [
"Read",
"GTR",
"public",
"data",
"from",
"the",
"specified",
"reader",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/gtr/src/main/java/org/nmdp/ngs/gtr/GtrReader.java#L74-L89 | train |
nmdp-bioinformatics/ngs | gtr/src/main/java/org/nmdp/ngs/gtr/GtrReader.java | GtrReader.read | public static GTRPublicData read(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return read(reader);
}
} | java | public static GTRPublicData read(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return read(reader);
}
} | [
"public",
"static",
"GTRPublicData",
"read",
"(",
"final",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"url",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"Resources",
".",
"asCharSource",
"(",
"url",
",",
"Charsets",
".",... | Read GTR public data from the specified URL.
@param url URL to read from, must not be null
@return the GTR public data read from the specified URL
@throws IOException if an I/O error occurs | [
"Read",
"GTR",
"public",
"data",
"from",
"the",
"specified",
"URL",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/gtr/src/main/java/org/nmdp/ngs/gtr/GtrReader.java#L112-L117 | train |
nmdp-bioinformatics/ngs | gtr/src/main/java/org/nmdp/ngs/gtr/GtrReader.java | GtrReader.read | public static GTRPublicData read(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return read(reader);
}
} | java | public static GTRPublicData read(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return read(reader);
}
} | [
"public",
"static",
"GTRPublicData",
"read",
"(",
"final",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"inputStream",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStream... | Read GTR public data from the specified input stream.
@param inputStream input stream to read from, must not be null
@return the GTR public data read from the specified input stream
@throws IOException if an I/O error occurs | [
"Read",
"GTR",
"public",
"data",
"from",
"the",
"specified",
"input",
"stream",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/gtr/src/main/java/org/nmdp/ngs/gtr/GtrReader.java#L126-L131 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/ShipmentUrl.java | ShipmentUrl.getShipmentUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getShipmentUrl",
"(",
"String",
"orderId",
",",
"String",
"responseFields",
",",
"String",
"shipmentId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{orderId}/shipments/{shipmentId}?response... | Get Resource Url for GetShipment
@param orderId Unique identifier of the order.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param shipmentId Unique identifier of the shipment to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetShipment"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/ShipmentUrl.java#L23-L30 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/ShipmentUrl.java | ShipmentUrl.deleteShipmentUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deleteShipmentUrl",
"(",
"String",
"orderId",
",",
"String",
"shipmentId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{orderId}/shipments/{shipmentId}\"",
")",
";",
"formatter",
".",
"f... | Get Resource Url for DeleteShipment
@param orderId Unique identifier of the order.
@param shipmentId Unique identifier of the shipment to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteShipment"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/ShipmentUrl.java#L64-L70 | train |
nmdp-bioinformatics/ngs | feature/src/main/java/org/nmdp/ngs/feature/Allele.java | Allele.doubleCrossover | 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);
} | java | 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);
} | [
"public",
"Allele",
"doubleCrossover",
"(",
"final",
"Allele",
"right",
")",
"throws",
"IllegalSymbolException",
",",
"IndexOutOfBoundsException",
",",
"IllegalAlphabetException",
"{",
"if",
"(",
"this",
".",
"overlaps",
"(",
"right",
")",
")",
"{",
"//System.out.pr... | 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.
@param right allele
@return a new crossed-over allele. This implementation treats the original alleles as immutable thus favoring programmatic convenience over genetic reality.
@throws IllegalSymbolException
@throws IndexOutOfBoundsException
@throws IllegalAlphabetException | [
"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",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/feature/src/main/java/org/nmdp/ngs/feature/Allele.java#L274-L311 | train |
nmdp-bioinformatics/ngs | feature/src/main/java/org/nmdp/ngs/feature/Allele.java | Allele.merge | 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();
} | java | 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();
} | [
"public",
"Allele",
"merge",
"(",
"final",
"Allele",
"right",
",",
"final",
"long",
"minimumOverlap",
")",
"throws",
"IllegalSymbolException",
",",
"IndexOutOfBoundsException",
",",
"IllegalAlphabetException",
",",
"AlleleException",
"{",
"Allele",
".",
"Builder",
"bu... | A method to simulate merging of two alleles strictly, meaning the sequence in the overlapping regions must be equal.
@param right allele
@param minimumOverlap for the merge to occur
@return new merged allele.
@throws IllegalSymbolException
@throws IndexOutOfBoundsException
@throws IllegalAlphabetException
@throws AlleleException | [
"A",
"method",
"to",
"simulate",
"merging",
"of",
"two",
"alleles",
"strictly",
"meaning",
"the",
"sequence",
"in",
"the",
"overlapping",
"regions",
"must",
"be",
"equal",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/feature/src/main/java/org/nmdp/ngs/feature/Allele.java#L322-L367 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java | CustomerAccountUrl.changePasswordUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"changePasswordUrl",
"(",
"Integer",
"accountId",
",",
"Boolean",
"unlockAccount",
",",
"String",
"userId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/accounts/{accountId}/Change-Password?... | Get Resource Url for ChangePassword
@param accountId Unique identifier of the customer account.
@param unlockAccount Specifies whether to unlock the specified customer account.
@param userId Unique identifier of the user whose tenant scopes you want to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"ChangePassword"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java#L95-L102 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java | CustomerAccountUrl.setPasswordChangeRequiredUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"setPasswordChangeRequiredUrl",
"(",
"Integer",
"accountId",
",",
"String",
"userId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/accounts/{accountId}/Set-Password-Change-Required?userId={userId}... | Get Resource Url for SetPasswordChangeRequired
@param accountId Unique identifier of the customer account.
@param userId Unique identifier of the user whose tenant scopes you want to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"SetPasswordChangeRequired"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java#L150-L156 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java | CustomerAccountUrl.getLoginStateByEmailAddressUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getLoginStateByEmailAddressUrl",
"(",
"String",
"customerSetCode",
",",
"String",
"emailAddress",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/accounts/logi... | Get Resource Url for GetLoginStateByEmailAddress
@param customerSetCode The unique idenfitier of the customer set.
@param emailAddress The email address associated with the customer account.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetLoginStateByEmailAddress"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java#L201-L208 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java | CustomerAccountUrl.getLoginStateByUserNameUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getLoginStateByUserNameUrl",
"(",
"String",
"customerSetCode",
",",
"String",
"responseFields",
",",
"String",
"userName",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/accounts/loginstateby... | Get Resource Url for GetLoginStateByUserName
@param customerSetCode The unique idenfitier of the customer set.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param userName The user name associated with the customer account.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetLoginStateByUserName"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java#L217-L224 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java | CustomerAccountUrl.getCustomersPurchaseOrderAccountsUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getCustomersPurchaseOrderAccountsUrl",
"(",
"String",
"accountType",
",",
"Integer",
"pageSize",
",",
"String",
"responseFields",
",",
"String",
"sortBy",
",",
"Integer",
"startIndex",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
... | Get Resource Url for GetCustomersPurchaseOrderAccounts
@param accountType
@param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param sortBy The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for more information.
@param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetCustomersPurchaseOrderAccounts"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java#L235-L244 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java | CustomerAccountUrl.resetPasswordUrl | public static MozuUrl resetPasswordUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/Reset-Password");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl resetPasswordUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/Reset-Password");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"resetPasswordUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/accounts/Reset-Password\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
"(",
")... | Get Resource Url for ResetPassword
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"ResetPassword"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java#L250-L254 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java | SoftAllocationUrl.getSoftAllocationUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getSoftAllocationUrl",
"(",
"String",
"responseFields",
",",
"Integer",
"softAllocationId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/softallocations/{softAllocationId}?responseFields={re... | Get Resource Url for GetSoftAllocation
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param softAllocationId The unique identifier of the soft allocation.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetSoftAllocation"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java#L42-L48 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java | SoftAllocationUrl.addSoftAllocationsUrl | public static MozuUrl addSoftAllocationsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl addSoftAllocationsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"addSoftAllocationsUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/softallocations/\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
"(",
... | Get Resource Url for AddSoftAllocations
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"AddSoftAllocations"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java#L54-L58 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java | SoftAllocationUrl.convertToProductReservationUrl | public static MozuUrl convertToProductReservationUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/convert");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl convertToProductReservationUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/convert");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"convertToProductReservationUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/softallocations/convert\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResour... | Get Resource Url for ConvertToProductReservation
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"ConvertToProductReservation"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java#L64-L68 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java | SoftAllocationUrl.renewSoftAllocationsUrl | public static MozuUrl renewSoftAllocationsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/renew");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl renewSoftAllocationsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/renew");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"renewSoftAllocationsUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/softallocations/renew\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
... | Get Resource Url for RenewSoftAllocations
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"RenewSoftAllocations"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java#L74-L78 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java | SoftAllocationUrl.updateSoftAllocationsUrl | public static MozuUrl updateSoftAllocationsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl updateSoftAllocationsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateSoftAllocationsUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/softallocations/\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
"("... | Get Resource Url for UpdateSoftAllocations
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateSoftAllocations"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java#L84-L88 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java | SoftAllocationUrl.deleteSoftAllocationUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deleteSoftAllocationUrl",
"(",
"Integer",
"softAllocationId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/softallocations/{softAllocationId}\"",
")",
";",
"formatter",
".",
"formatUrl",... | Get Resource Url for DeleteSoftAllocation
@param softAllocationId The unique identifier of the soft allocation.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteSoftAllocation"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java#L95-L100 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/content/DocumentTypeUrl.java | DocumentTypeUrl.getDocumentTypeUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getDocumentTypeUrl",
"(",
"String",
"documentTypeName",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/content/documenttypes/{documentTypeName}?responseFields={responseFields}\"",
... | Get Resource Url for GetDocumentType
@param documentTypeName The name of the document type to retrieve.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetDocumentType"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/DocumentTypeUrl.java#L38-L44 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/PriceListUrl.java | PriceListUrl.bulkDeletePriceListEntriesUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"bulkDeletePriceListEntriesUrl",
"(",
"Boolean",
"invalidateCache",
",",
"Boolean",
"publishEvents",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/pricelists/bulkdeleteentries?publishEvents={p... | Get Resource Url for BulkDeletePriceListEntries
@param invalidateCache Disable this property if you expect to encounter unacceptable performance hits related to clearing the cache for each product in the price list entries. Otherwise, leave this property enabled.
@param publishEvents Disable this property to prevent publishing the event related to deleting price list entries from the system. Disabling this property helps you prevent performance delays if you expect the event to trigger the re-indexing of a large number of products, or if you want to postpone the operations of other applications and services listening for the event.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"BulkDeletePriceListEntries"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/PriceListUrl.java#L82-L88 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/PriceListUrl.java | PriceListUrl.deletePriceListUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deletePriceListUrl",
"(",
"Boolean",
"cascadeDeleteEntries",
",",
"String",
"priceListCode",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/pricelists/{priceListCode}?cascadeDeleteEntries={cas... | Get Resource Url for DeletePriceList
@param cascadeDeleteEntries Specifies whether to deletes all price list entries associated with the price list.
@param priceListCode The unique, user-defined code of the price list.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeletePriceList"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/PriceListUrl.java#L124-L130 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/entitylists/EntityUrl.java | EntityUrl.getEntityUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getEntityUrl",
"(",
"String",
"entityListFullName",
",",
"String",
"id",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/entitylists/{entityListFullName}/entities/{id}?... | Get Resource Url for GetEntity
@param entityListFullName The full name of the EntityList including namespace in name@nameSpace format
@param id Unique identifier of the customer segment to retrieve.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetEntity"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/entitylists/EntityUrl.java#L23-L30 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/entitylists/EntityUrl.java | EntityUrl.deleteEntityUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deleteEntityUrl",
"(",
"String",
"entityListFullName",
",",
"String",
"id",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/entitylists/{entityListFullName}/entities/{id}\"",
")",
";",
"formatter",
"... | Get Resource Url for DeleteEntity
@param entityListFullName The full name of the EntityList including namespace in name@nameSpace format
@param id Unique identifier of the customer segment to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteEntity"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/entitylists/EntityUrl.java#L90-L96 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/B2BAccountUrl.java | B2BAccountUrl.getB2BAccountAttributeUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getB2BAccountAttributeUrl",
"(",
"Integer",
"accountId",
",",
"String",
"attributeFQN",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/b2baccounts/{accountId}... | Get Resource Url for GetB2BAccountAttribute
@param accountId Unique identifier of the customer account.
@param attributeFQN Fully qualified name for an attribute.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetB2BAccountAttribute"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/B2BAccountUrl.java#L49-L56 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/B2BAccountUrl.java | B2BAccountUrl.getUserRolesAsyncUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getUserRolesAsyncUrl",
"(",
"Integer",
"accountId",
",",
"String",
"responseFields",
",",
"String",
"userId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/b2baccounts/{accountId}/user/{user... | Get Resource Url for GetUserRolesAsync
@param accountId Unique identifier of the customer account.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param userId Unique identifier of the user whose tenant scopes you want to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetUserRolesAsync"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/B2BAccountUrl.java#L87-L94 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/B2BAccountUrl.java | B2BAccountUrl.deleteB2BAccountAttributeUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deleteB2BAccountAttributeUrl",
"(",
"Integer",
"accountId",
",",
"String",
"attributeFQN",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/b2baccounts/{accountId}/attributes/{attributeFQN}\"",
")"... | Get Resource Url for DeleteB2BAccountAttribute
@param accountId Unique identifier of the customer account.
@param attributeFQN Fully qualified name for an attribute.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteB2BAccountAttribute"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/B2BAccountUrl.java#L258-L264 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/B2BAccountUrl.java | B2BAccountUrl.removeUserRoleAsyncUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"removeUserRoleAsyncUrl",
"(",
"Integer",
"accountId",
",",
"Integer",
"roleId",
",",
"String",
"userId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/b2baccounts/{accountId}/user/{userId}/r... | Get Resource Url for RemoveUserRoleAsync
@param accountId Unique identifier of the customer account.
@param roleId
@param userId Unique identifier of the user whose tenant scopes you want to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"RemoveUserRoleAsync"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/B2BAccountUrl.java#L273-L280 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/admin/LocationTypeUrl.java | LocationTypeUrl.getLocationTypesUrl | public static MozuUrl getLocationTypesUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/admin/locationtypes/");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getLocationTypesUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/admin/locationtypes/");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getLocationTypesUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/admin/locationtypes/\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
"(",
")",
",",... | Get Resource Url for GetLocationTypes
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetLocationTypes"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/admin/LocationTypeUrl.java#L20-L24 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/admin/LocationTypeUrl.java | LocationTypeUrl.getLocationTypeUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getLocationTypeUrl",
"(",
"String",
"locationTypeCode",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/admin/locationtypes/{locationTypeCode}?responseFields={responseFields}... | Get Resource Url for GetLocationType
@param locationTypeCode The user-defined code that identifies the location type.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetLocationType"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/admin/LocationTypeUrl.java#L32-L38 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/admin/LocationTypeUrl.java | LocationTypeUrl.deleteLocationTypeUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deleteLocationTypeUrl",
"(",
"String",
"locationTypeCode",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/admin/locationtypes/{locationTypeCode}\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"... | Get Resource Url for DeleteLocationType
@param locationTypeCode The user-defined code that identifies the location type.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteLocationType"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/admin/LocationTypeUrl.java#L71-L76 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/MasterCatalogUrl.java | MasterCatalogUrl.getMasterCatalogUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getMasterCatalogUrl",
"(",
"Integer",
"masterCatalogId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/mastercatalogs/{masterCatalogId}?responseFields={respon... | Get Resource Url for GetMasterCatalog
@param masterCatalogId Unique identifier for the master catalog. The master catalog contains all products accessible per catalogs and the site/tenant.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetMasterCatalog"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/MasterCatalogUrl.java#L34-L40 | train |
nmdp-bioinformatics/ngs | hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java | HmlUtils.createSequence | 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;
} | java | 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;
} | [
"public",
"static",
"Sequence",
"createSequence",
"(",
"final",
"org",
".",
"biojava",
".",
"bio",
".",
"seq",
".",
"Sequence",
"sequence",
")",
"{",
"checkNotNull",
"(",
"sequence",
")",
";",
"Sequence",
"s",
"=",
"new",
"Sequence",
"(",
")",
";",
"if",... | Create and return a new HML Sequence from the specified sequence.
@param sequence sequence, must not be null, and alphabet must be DNA
@return a new HML Sequence created from the specified sequence. | [
"Create",
"and",
"return",
"a",
"new",
"HML",
"Sequence",
"from",
"the",
"specified",
"sequence",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java#L76-L85 | train |
nmdp-bioinformatics/ngs | hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java | HmlUtils.createSequences | 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;
} | java | 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;
} | [
"public",
"static",
"Iterable",
"<",
"Sequence",
">",
"createSequences",
"(",
"final",
"BufferedReader",
"reader",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"reader",
")",
";",
"List",
"<",
"Sequence",
">",
"sequences",
"=",
"new",
"ArrayList",
"... | Create and return zero or more DNA HML Sequences read from the specified reader in FASTA format.
@param reader reader to read from, must not be null
@return zero or more DNA HML Sequences read from the specified reader in FASTA format
@throws IOException if an I/O error occurs | [
"Create",
"and",
"return",
"zero",
"or",
"more",
"DNA",
"HML",
"Sequences",
"read",
"from",
"the",
"specified",
"reader",
"in",
"FASTA",
"format",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java#L94-L106 | train |
nmdp-bioinformatics/ngs | hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java | HmlUtils.createSequences | public static Iterable<Sequence> createSequences(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return createSequences(reader);
}
} | java | public static Iterable<Sequence> createSequences(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return createSequences(reader);
}
} | [
"public",
"static",
"Iterable",
"<",
"Sequence",
">",
"createSequences",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"file",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
... | Create and return zero or more DNA HML Sequences read from the specified file in FASTA format.
@param file file to read from, must not be null
@return zero or more DNA HML Sequences read from the specified file in FASTA format
@throws IOException if an I/O error occurs | [
"Create",
"and",
"return",
"zero",
"or",
"more",
"DNA",
"HML",
"Sequences",
"read",
"from",
"the",
"specified",
"file",
"in",
"FASTA",
"format",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java#L116-L121 | train |
nmdp-bioinformatics/ngs | hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java | HmlUtils.createSequences | 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);
}
} | java | 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);
}
} | [
"public",
"static",
"Iterable",
"<",
"Sequence",
">",
"createSequences",
"(",
"final",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"url",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"Resources",
".",
"asCharSource",
"(",
... | Create and return zero or more DNA HML Sequences read from the specified URL in FASTA format.
@param url URL to read from, must not be null
@return zero or more DNA HML Sequences read from the specified URL in FASTA format
@throws IOException if an I/O error occurs | [
"Create",
"and",
"return",
"zero",
"or",
"more",
"DNA",
"HML",
"Sequences",
"read",
"from",
"the",
"specified",
"URL",
"in",
"FASTA",
"format",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java#L130-L135 | train |
nmdp-bioinformatics/ngs | hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java | HmlUtils.createSequences | public static Iterable<Sequence> createSequences(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return createSequences(reader);
}
} | java | public static Iterable<Sequence> createSequences(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return createSequences(reader);
}
} | [
"public",
"static",
"Iterable",
"<",
"Sequence",
">",
"createSequences",
"(",
"final",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"inputStream",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReade... | Create and return zero or more DNA HML Sequences read from the specified input stream in FASTA format.
@param inputStream input stream to read from, must not be null
@return zero or more DNA HML Sequences read from the specified input stream in FASTA format
@throws IOException if an I/O error occurs | [
"Create",
"and",
"return",
"zero",
"or",
"more",
"DNA",
"HML",
"Sequences",
"read",
"from",
"the",
"specified",
"input",
"stream",
"in",
"FASTA",
"format",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java#L144-L149 | train |
nmdp-bioinformatics/ngs | hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java | HmlUtils.toDnaSymbolList | public static SymbolList toDnaSymbolList(final Sequence sequence) throws IllegalSymbolException {
checkNotNull(sequence);
return DNATools.createDNA(sequence.getValue().replaceAll("\\s+", ""));
} | java | public static SymbolList toDnaSymbolList(final Sequence sequence) throws IllegalSymbolException {
checkNotNull(sequence);
return DNATools.createDNA(sequence.getValue().replaceAll("\\s+", ""));
} | [
"public",
"static",
"SymbolList",
"toDnaSymbolList",
"(",
"final",
"Sequence",
"sequence",
")",
"throws",
"IllegalSymbolException",
"{",
"checkNotNull",
"(",
"sequence",
")",
";",
"return",
"DNATools",
".",
"createDNA",
"(",
"sequence",
".",
"getValue",
"(",
")",
... | Convert the specified HML Sequence element into a DNA symbol list.
@param sequence HML Sequence element, must not be null
@return the specified HML Sequence element converted into a DNA symbol list
@throws IllegalSymbolException if an illegal symbol is found | [
"Convert",
"the",
"specified",
"HML",
"Sequence",
"element",
"into",
"a",
"DNA",
"symbol",
"list",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlUtils.java#L169-L172 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/security/AppAuthenticator.java | AppAuthenticator.refreshAppAuthTicket | 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");
} | java | 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");
} | [
"public",
"void",
"refreshAppAuthTicket",
"(",
")",
"{",
"StringBuilder",
"resourceUrl",
"=",
"new",
"StringBuilder",
"(",
"MozuConfig",
".",
"getBaseUrl",
"(",
")",
")",
".",
"append",
"(",
"AuthTicketUrl",
".",
"refreshAppAuthTicketUrl",
"(",
"null",
")",
".",... | jh the application auth ticket using the refresh token | [
"jh",
"the",
"application",
"auth",
"ticket",
"using",
"the",
"refresh",
"token"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/security/AppAuthenticator.java#L113-L136 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CustomerContactUrl.java | CustomerContactUrl.deleteAccountContactUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"deleteAccountContactUrl",
"(",
"Integer",
"accountId",
",",
"Integer",
"contactId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/accounts/{accountId}/contacts/{contactId}\"",
")",
";",
"for... | Get Resource Url for DeleteAccountContact
@param accountId Unique identifier of the customer account.
@param contactId Unique identifer of the customer account contact being updated.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteAccountContact"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CustomerContactUrl.java#L110-L116 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/Combination.java | Combination.getMaxLength | @Override
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;
} | java | @Override
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;
} | [
"@",
"Override",
"public",
"int",
"getMaxLength",
"(",
")",
"{",
"int",
"max",
"=",
"0",
";",
"boolean",
"found",
"=",
"false",
";",
"for",
"(",
"Constraint",
"c",
":",
"constraints",
")",
"{",
"int",
"cM",
"=",
"c",
".",
"getMaxLength",
"(",
")",
... | Returns the sum of all maximum lengths of the sub-constraints
@return the sum of all maximum lengths of the sub-constraints | [
"Returns",
"the",
"sum",
"of",
"all",
"maximum",
"lengths",
"of",
"the",
"sub",
"-",
"constraints"
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/Combination.java#L74-L86 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/Combination.java | Combination.initValues | @Override
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;
} | java | @Override
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;
} | [
"@",
"Override",
"public",
"String",
"initValues",
"(",
"final",
"FieldCase",
"ca",
")",
"{",
"boolean",
"found",
"=",
"false",
";",
"buffer",
".",
"setLength",
"(",
"0",
")",
";",
"for",
"(",
"Constraint",
"c",
":",
"constraints",
")",
"{",
"String",
... | 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. | [
"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",
... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/Combination.java#L93-L108 | train |
nmdp-bioinformatics/ngs | range/src/main/java/org/nmdp/ngs/range/tree/CenteredRangeTree.java | CenteredRangeTree.createNode | 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);
} | java | 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);
} | [
"private",
"Node",
"createNode",
"(",
"final",
"Iterable",
"<",
"Range",
"<",
"C",
">",
">",
"ranges",
")",
"{",
"Range",
"<",
"C",
">",
"span",
"=",
"Iterables",
".",
"getFirst",
"(",
"ranges",
",",
"null",
")",
";",
"if",
"(",
"span",
"==",
"null... | Create and return a new node for the specified ranges.
@param ranges ranges
@return a new node for the specified ranges | [
"Create",
"and",
"return",
"a",
"new",
"node",
"for",
"the",
"specified",
"ranges",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/range/src/main/java/org/nmdp/ngs/range/tree/CenteredRangeTree.java#L85-L113 | train |
nmdp-bioinformatics/ngs | range/src/main/java/org/nmdp/ngs/range/tree/CenteredRangeTree.java | CenteredRangeTree.depthFirstSearch | 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);
} | java | 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);
} | [
"private",
"void",
"depthFirstSearch",
"(",
"final",
"Range",
"<",
"C",
">",
"query",
",",
"final",
"Node",
"node",
",",
"final",
"List",
"<",
"Range",
"<",
"C",
">",
">",
"result",
",",
"final",
"Set",
"<",
"Node",
">",
"visited",
")",
"{",
"if",
... | Depth first search.
@param query query range
@param node node
@param result list of matching ranges
@param visited set of visited nodes | [
"Depth",
"first",
"search",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/range/src/main/java/org/nmdp/ngs/range/tree/CenteredRangeTree.java#L123-L157 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/LocationInventoryUrl.java | LocationInventoryUrl.updateLocationInventoryUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"updateLocationInventoryUrl",
"(",
"String",
"productCode",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/products/{ProductCode}/LocationInventory\"",
")",
";",
"formatter",
".",
"formatUr... | Get Resource Url for UpdateLocationInventory
@param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateLocationInventory"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/LocationInventoryUrl.java#L73-L78 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductVariationUrl.java | ProductVariationUrl.getProductVariationLocalizedDeltaPricesUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"getProductVariationLocalizedDeltaPricesUrl",
"(",
"String",
"productCode",
",",
"String",
"variationKey",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/products/{productCode}/variations/{vari... | Get Resource Url for GetProductVariationLocalizedDeltaPrices
@param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product.
@param variationKey System-generated key that represents the attribute values that uniquely identify a specific product variation.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetProductVariationLocalizedDeltaPrices"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductVariationUrl.java#L22-L28 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductVariationUrl.java | ProductVariationUrl.addProductVariationLocalizedPriceUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"addProductVariationLocalizedPriceUrl",
"(",
"String",
"productCode",
",",
"String",
"responseFields",
",",
"String",
"variationKey",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/produc... | Get Resource Url for AddProductVariationLocalizedPrice
@param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param variationKey System-generated key that represents the attribute values that uniquely identify a specific product variation.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"AddProductVariationLocalizedPrice"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductVariationUrl.java#L141-L148 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductVariationUrl.java | ProductVariationUrl.updateProductVariationLocalizedDeltaPriceUrl | 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) ;
} | java | 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) ;
} | [
"public",
"static",
"MozuUrl",
"updateProductVariationLocalizedDeltaPriceUrl",
"(",
"String",
"currencyCode",
",",
"String",
"productCode",
",",
"String",
"responseFields",
",",
"String",
"variationKey",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
... | Get Resource Url for UpdateProductVariationLocalizedDeltaPrice
@param currencyCode The three character ISOÂ currency code, such as USDÂ for US Dollars.
@param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param variationKey System-generated key that represents the attribute values that uniquely identify a specific product variation.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateProductVariationLocalizedDeltaPrice"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductVariationUrl.java#L172-L180 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductVariationUrl.java | ProductVariationUrl.deleteProductVariationLocalizedDeltaPriceUrl | public static MozuUrl deleteProductVariationLocalizedDeltaPriceUrl(String currencyCode, String productCode, String variationKey)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedDeltaPrice/{currencyCode}");
formatter.formatUrl("currencyCode", currencyCode);
formatter.formatUrl("productCode", productCode);
formatter.formatUrl("variationKey", variationKey);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteProductVariationLocalizedDeltaPriceUrl(String currencyCode, String productCode, String variationKey)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedDeltaPrice/{currencyCode}");
formatter.formatUrl("currencyCode", currencyCode);
formatter.formatUrl("productCode", productCode);
formatter.formatUrl("variationKey", variationKey);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteProductVariationLocalizedDeltaPriceUrl",
"(",
"String",
"currencyCode",
",",
"String",
"productCode",
",",
"String",
"variationKey",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/... | Get Resource Url for DeleteProductVariationLocalizedDeltaPrice
@param currencyCode The three character ISOÂ currency code, such as USDÂ for US Dollars.
@param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product.
@param variationKey System-generated key that represents the attribute values that uniquely identify a specific product variation.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteProductVariationLocalizedDeltaPrice"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductVariationUrl.java#L265-L272 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/Mapping.java | Mapping.getContainedIds | @Override
public Set<String> getContainedIds() {
Set<String> s = super.getContainedIds();
for (Constraint c : map.values()) {
s.addAll(c.getContainedIds());
}
return s;
} | java | @Override
public Set<String> getContainedIds() {
Set<String> s = super.getContainedIds();
for (Constraint c : map.values()) {
s.addAll(c.getContainedIds());
}
return s;
} | [
"@",
"Override",
"public",
"Set",
"<",
"String",
">",
"getContainedIds",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"s",
"=",
"super",
".",
"getContainedIds",
"(",
")",
";",
"for",
"(",
"Constraint",
"c",
":",
"map",
".",
"values",
"(",
")",
")",
"{... | Returns the set union of all id set of the contained constraints plus its own. | [
"Returns",
"the",
"set",
"union",
"of",
"all",
"id",
"set",
"of",
"the",
"contained",
"constraints",
"plus",
"its",
"own",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/Mapping.java#L173-L180 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/shipping/admin/profiles/ShippingInclusionRuleUrl.java | ShippingInclusionRuleUrl.getShippingInclusionRuleUrl | public static MozuUrl getShippingInclusionRuleUrl(String id, String profilecode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions/{id}?responseFields={responseFields}");
formatter.formatUrl("id", id);
formatter.formatUrl("profilecode", profilecode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getShippingInclusionRuleUrl(String id, String profilecode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions/{id}?responseFields={responseFields}");
formatter.formatUrl("id", id);
formatter.formatUrl("profilecode", profilecode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getShippingInclusionRuleUrl",
"(",
"String",
"id",
",",
"String",
"profilecode",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/shipping/admin/profiles/{profilecode}/r... | Get Resource Url for GetShippingInclusionRule
@param id Unique identifier of the customer segment to retrieve.
@param profilecode The unique, user-defined code of the profile with which the shipping inclusion rule is associated.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetShippingInclusionRule"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/shipping/admin/profiles/ShippingInclusionRuleUrl.java#L23-L30 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/shipping/admin/profiles/ShippingInclusionRuleUrl.java | ShippingInclusionRuleUrl.getShippingInclusionRulesUrl | public static MozuUrl getShippingInclusionRulesUrl(String profilecode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions?responseFields={responseFields}");
formatter.formatUrl("profilecode", profilecode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getShippingInclusionRulesUrl(String profilecode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions?responseFields={responseFields}");
formatter.formatUrl("profilecode", profilecode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getShippingInclusionRulesUrl",
"(",
"String",
"profilecode",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions?re... | Get Resource Url for GetShippingInclusionRules
@param profilecode The unique, user-defined code of the profile with which the shipping inclusion rule is associated.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetShippingInclusionRules"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/shipping/admin/profiles/ShippingInclusionRuleUrl.java#L38-L44 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/shipping/admin/profiles/ShippingInclusionRuleUrl.java | ShippingInclusionRuleUrl.deleteShippingInclusionRuleUrl | public static MozuUrl deleteShippingInclusionRuleUrl(String id, String profilecode)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions/{id}");
formatter.formatUrl("id", id);
formatter.formatUrl("profilecode", profilecode);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteShippingInclusionRuleUrl(String id, String profilecode)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions/{id}");
formatter.formatUrl("id", id);
formatter.formatUrl("profilecode", profilecode);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteShippingInclusionRuleUrl",
"(",
"String",
"id",
",",
"String",
"profilecode",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions/{id}\"",
"... | Get Resource Url for DeleteShippingInclusionRule
@param id Unique identifier of the customer segment to retrieve.
@param profilecode The unique, user-defined code of the profile with which the shipping inclusion rule is associated.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteShippingInclusionRule"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/shipping/admin/profiles/ShippingInclusionRuleUrl.java#L82-L88 | train |
nmdp-bioinformatics/ngs | align/src/main/java/org/nmdp/ngs/align/HspWriter.java | HspWriter.write | public static void write(final HighScoringPair hsp, final PrintWriter writer) {
checkNotNull(hsp);
checkNotNull(writer);
writer.println(hsp.toString());
} | java | public static void write(final HighScoringPair hsp, final PrintWriter writer) {
checkNotNull(hsp);
checkNotNull(writer);
writer.println(hsp.toString());
} | [
"public",
"static",
"void",
"write",
"(",
"final",
"HighScoringPair",
"hsp",
",",
"final",
"PrintWriter",
"writer",
")",
"{",
"checkNotNull",
"(",
"hsp",
")",
";",
"checkNotNull",
"(",
"writer",
")",
";",
"writer",
".",
"println",
"(",
"hsp",
".",
"toStrin... | Write the specified high-scoring segment pair with the specified print writer.
@param hsp high-scoring segment pair to write, must not be null
@param writer print writer to write high-scoring segment pair with, must not be null | [
"Write",
"the",
"specified",
"high",
"-",
"scoring",
"segment",
"pair",
"with",
"the",
"specified",
"print",
"writer",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/HspWriter.java#L48-L52 | train |
nmdp-bioinformatics/ngs | align/src/main/java/org/nmdp/ngs/align/HspWriter.java | HspWriter.write | public static void write(final Iterable<HighScoringPair> hsps, final PrintWriter writer) {
checkNotNull(hsps);
checkNotNull(writer);
for (HighScoringPair hsp : hsps) {
writer.println(hsp.toString());
}
} | java | public static void write(final Iterable<HighScoringPair> hsps, final PrintWriter writer) {
checkNotNull(hsps);
checkNotNull(writer);
for (HighScoringPair hsp : hsps) {
writer.println(hsp.toString());
}
} | [
"public",
"static",
"void",
"write",
"(",
"final",
"Iterable",
"<",
"HighScoringPair",
">",
"hsps",
",",
"final",
"PrintWriter",
"writer",
")",
"{",
"checkNotNull",
"(",
"hsps",
")",
";",
"checkNotNull",
"(",
"writer",
")",
";",
"for",
"(",
"HighScoringPair"... | Write zero or more high-scoring segment pairs with the specified print writer.
@param hsps zero or more high-scoring segment pairs to write, must not be null
@param writer print writer to write high-scoring segment pairs with, must not be null | [
"Write",
"zero",
"or",
"more",
"high",
"-",
"scoring",
"segment",
"pairs",
"with",
"the",
"specified",
"print",
"writer",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/HspWriter.java#L60-L66 | train |
mgm-tp/jfunk | jfunk-data/src/main/java/com/mgmtp/jfunk/data/source/BaseDataSource.java | BaseDataSource.setFixedValue | @Override
public void setFixedValue(final String dataSetKey, final String entryKey, final String value) {
Map<String, String> map = fixedValues.get(dataSetKey);
if (map == null) {
map = Maps.newHashMap();
fixedValues.put(dataSetKey, map);
}
map.put(entryKey, value);
DataSet dataSet = getCurrentDataSet(dataSetKey);
if (dataSet != null) {
dataSet.setFixedValue(entryKey, value);
}
} | java | @Override
public void setFixedValue(final String dataSetKey, final String entryKey, final String value) {
Map<String, String> map = fixedValues.get(dataSetKey);
if (map == null) {
map = Maps.newHashMap();
fixedValues.put(dataSetKey, map);
}
map.put(entryKey, value);
DataSet dataSet = getCurrentDataSet(dataSetKey);
if (dataSet != null) {
dataSet.setFixedValue(entryKey, value);
}
} | [
"@",
"Override",
"public",
"void",
"setFixedValue",
"(",
"final",
"String",
"dataSetKey",
",",
"final",
"String",
"entryKey",
",",
"final",
"String",
"value",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"map",
"=",
"fixedValues",
".",
"get",
"(",
... | Sets a fixed value.
@param dataSetKey
The {@link DataSet} key.
@param entryKey
The entry key.
@param value
The fixed value. | [
"Sets",
"a",
"fixed",
"value",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data/src/main/java/com/mgmtp/jfunk/data/source/BaseDataSource.java#L204-L217 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/PriceListUrl.java | PriceListUrl.getPriceListUrl | public static MozuUrl getPriceListUrl(String priceListCode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/pricelists/{priceListCode}?responseFields={responseFields}");
formatter.formatUrl("priceListCode", priceListCode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getPriceListUrl(String priceListCode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/pricelists/{priceListCode}?responseFields={responseFields}");
formatter.formatUrl("priceListCode", priceListCode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getPriceListUrl",
"(",
"String",
"priceListCode",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/storefront/pricelists/{priceListCode}?responseFields={responseFields... | Get Resource Url for GetPriceList
@param priceListCode The unique code of the price list for which you want to retrieve the details.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetPriceList"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/PriceListUrl.java#L22-L28 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/PriceListUrl.java | PriceListUrl.getResolvedPriceListUrl | public static MozuUrl getResolvedPriceListUrl(Integer customerAccountId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/pricelists/resolved?customerAccountId={customerAccountId}&responseFields={responseFields}");
formatter.formatUrl("customerAccountId", customerAccountId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getResolvedPriceListUrl(Integer customerAccountId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/pricelists/resolved?customerAccountId={customerAccountId}&responseFields={responseFields}");
formatter.formatUrl("customerAccountId", customerAccountId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getResolvedPriceListUrl",
"(",
"Integer",
"customerAccountId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/storefront/pricelists/resolved?customerAccountId={custo... | Get Resource Url for GetResolvedPriceList
@param customerAccountId The unique identifier of the customer account for which to retrieve wish lists.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetResolvedPriceList"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/PriceListUrl.java#L36-L42 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.