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
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/config/JFunkBaseModule.java
JFunkBaseModule.providePerfLoadVersion
@Provides @Singleton @JFunkVersion protected String providePerfLoadVersion() { ClassLoader loader = Thread.currentThread().getContextClassLoader(); InputStream is = loader.getResourceAsStream("com/mgmtp/jfunk/common/version.txt"); try { return IOUtils.toString(is, "UTF-8"); } catch (IOException ex) { throw new IllegalStateException("Could not read jFunk version.", ex); } finally { IOUtils.closeQuietly(is); } }
java
@Provides @Singleton @JFunkVersion protected String providePerfLoadVersion() { ClassLoader loader = Thread.currentThread().getContextClassLoader(); InputStream is = loader.getResourceAsStream("com/mgmtp/jfunk/common/version.txt"); try { return IOUtils.toString(is, "UTF-8"); } catch (IOException ex) { throw new IllegalStateException("Could not read jFunk version.", ex); } finally { IOUtils.closeQuietly(is); } }
[ "@", "Provides", "@", "Singleton", "@", "JFunkVersion", "protected", "String", "providePerfLoadVersion", "(", ")", "{", "ClassLoader", "loader", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ";", "InputStream", "is", "=",...
Provides the version of perfLoad as specified in the Maven pom. @return the version string
[ "Provides", "the", "version", "of", "perfLoad", "as", "specified", "in", "the", "Maven", "pom", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/config/JFunkBaseModule.java#L151-L164
train
nmdp-bioinformatics/ngs
align/src/main/java/org/nmdp/ngs/align/ParallelBiojavaPairwiseAlignment.java
ParallelBiojavaPairwiseAlignment.create
public static PairwiseAlignment create(final int threads, final SubstitutionMatrix substitutionMatrix) { return new ParallelBiojavaPairwiseAlignment(Executors.newFixedThreadPool(threads), substitutionMatrix); }
java
public static PairwiseAlignment create(final int threads, final SubstitutionMatrix substitutionMatrix) { return new ParallelBiojavaPairwiseAlignment(Executors.newFixedThreadPool(threads), substitutionMatrix); }
[ "public", "static", "PairwiseAlignment", "create", "(", "final", "int", "threads", ",", "final", "SubstitutionMatrix", "substitutionMatrix", ")", "{", "return", "new", "ParallelBiojavaPairwiseAlignment", "(", "Executors", ".", "newFixedThreadPool", "(", "threads", ")", ...
Create and return a new pairwise alignment implementation configured with a fixed thread pool and the specified substitution matrix. @param threads number of threads, must be <code>&gt;= 0</code> @param substitutionMatrix substitution matrix, must not be null @return a new pairwise alignment implementation configured with a fixed thread pool and the specified substitution matrix
[ "Create", "and", "return", "a", "new", "pairwise", "alignment", "implementation", "configured", "with", "a", "fixed", "thread", "pool", "and", "the", "specified", "substitution", "matrix", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/ParallelBiojavaPairwiseAlignment.java#L232-L234
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/shipping/admin/profiles/ShippingStatesUrl.java
ShippingStatesUrl.getStatesUrl
public static MozuUrl getStatesUrl(String profileCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/shippingstates"); formatter.formatUrl("profileCode", profileCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getStatesUrl(String profileCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/shippingstates"); formatter.formatUrl("profileCode", profileCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getStatesUrl", "(", "String", "profileCode", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/shipping/admin/profiles/{profilecode}/shippingstates\"", ")", ";", "formatter", ".", "formatUrl", "(", "\"...
Get Resource Url for GetStates @param profileCode The unique, user-defined code of the profile with which the shipping state is associated. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetStates" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/shipping/admin/profiles/ShippingStatesUrl.java#L21-L26
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/shipping/admin/profiles/ShippingStatesUrl.java
ShippingStatesUrl.updateStatesUrl
public static MozuUrl updateStatesUrl(String profilecode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/shippingstates"); formatter.formatUrl("profilecode", profilecode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl updateStatesUrl(String profilecode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/profiles/{profilecode}/shippingstates"); formatter.formatUrl("profilecode", profilecode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "updateStatesUrl", "(", "String", "profilecode", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/shipping/admin/profiles/{profilecode}/shippingstates\"", ")", ";", "formatter", ".", "formatUrl", "(", ...
Get Resource Url for UpdateStates @param profilecode The unique, user-defined code of the profile with which the shipping state is associated. @return String Resource Url
[ "Get", "Resource", "Url", "for", "UpdateStates" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/shipping/admin/profiles/ShippingStatesUrl.java#L33-L38
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/returns/PackageUrl.java
PackageUrl.getPackageLabelUrl
public static MozuUrl getPackageLabelUrl(String packageId, Boolean returnAsBase64Png, String returnId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/packages/{packageId}/label?returnAsBase64Png={returnAsBase64Png}"); formatter.formatUrl("packageId", packageId); formatter.formatUrl("returnAsBase64Png", returnAsBase64Png); formatter.formatUrl("returnId", returnId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getPackageLabelUrl(String packageId, Boolean returnAsBase64Png, String returnId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/packages/{packageId}/label?returnAsBase64Png={returnAsBase64Png}"); formatter.formatUrl("packageId", packageId); formatter.formatUrl("returnAsBase64Png", returnAsBase64Png); formatter.formatUrl("returnId", returnId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getPackageLabelUrl", "(", "String", "packageId", ",", "Boolean", "returnAsBase64Png", ",", "String", "returnId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/returns/{returnId}/packages/{packageId}/...
Get Resource Url for GetPackageLabel @param packageId Unique identifier of the package for which to retrieve the label. @param returnAsBase64Png Specifies whether to return the RMA label image as Base64-encoded PNG image instead of as a byte array encoded in the original image format. The default is . @param returnId Unique identifier of the return whose items you want to get. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetPackageLabel" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/returns/PackageUrl.java#L23-L30
train
nmdp-bioinformatics/ngs
align/src/main/java/org/nmdp/ngs/align/HspReader.java
HspReader.read
public static Iterable<HighScoringPair> read(final Readable readable) throws IOException { checkNotNull(readable); Collect collect = new Collect(); stream(readable, collect); return collect.hsps(); }
java
public static Iterable<HighScoringPair> read(final Readable readable) throws IOException { checkNotNull(readable); Collect collect = new Collect(); stream(readable, collect); return collect.hsps(); }
[ "public", "static", "Iterable", "<", "HighScoringPair", ">", "read", "(", "final", "Readable", "readable", ")", "throws", "IOException", "{", "checkNotNull", "(", "readable", ")", ";", "Collect", "collect", "=", "new", "Collect", "(", ")", ";", "stream", "("...
Read zero or more high-scoring segment pairs from the specified readable. @param readable to read from, must not be null @return zero or more high-scoring segment pairs read from the specified readable @throws IOException if an I/O error occurs
[ "Read", "zero", "or", "more", "high", "-", "scoring", "segment", "pairs", "from", "the", "specified", "readable", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/HspReader.java#L55-L60
train
nmdp-bioinformatics/ngs
align/src/main/java/org/nmdp/ngs/align/HspReader.java
HspReader.stream
public static void stream(final Readable readable, final HspListener listener) throws IOException { checkNotNull(readable); checkNotNull(listener); HspLineProcessor lineProcessor = new HspLineProcessor(listener); CharStreams.readLines(readable, lineProcessor); }
java
public static void stream(final Readable readable, final HspListener listener) throws IOException { checkNotNull(readable); checkNotNull(listener); HspLineProcessor lineProcessor = new HspLineProcessor(listener); CharStreams.readLines(readable, lineProcessor); }
[ "public", "static", "void", "stream", "(", "final", "Readable", "readable", ",", "final", "HspListener", "listener", ")", "throws", "IOException", "{", "checkNotNull", "(", "readable", ")", ";", "checkNotNull", "(", "listener", ")", ";", "HspLineProcessor", "lin...
Stream zero or more high-scoring segment pairs from the specified readable. @param readable readable to stream from, must not be null @param listener event based listener callback, must not be null @throws IOException if an I/O error occurs
[ "Stream", "zero", "or", "more", "high", "-", "scoring", "segment", "pairs", "from", "the", "specified", "readable", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/HspReader.java#L69-L75
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/DocumentTreeUrl.java
DocumentTreeUrl.getTreeDocumentUrl
public static MozuUrl getTreeDocumentUrl(String documentListName, String documentName, Boolean includeInactive, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}/documentTree/{documentName}?includeInactive={includeInactive}&responseFields={responseFields}"); formatter.formatUrl("documentListName", documentListName); formatter.formatUrl("documentName", documentName); formatter.formatUrl("includeInactive", includeInactive); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getTreeDocumentUrl(String documentListName, String documentName, Boolean includeInactive, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}/documentTree/{documentName}?includeInactive={includeInactive}&responseFields={responseFields}"); formatter.formatUrl("documentListName", documentListName); formatter.formatUrl("documentName", documentName); formatter.formatUrl("includeInactive", includeInactive); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getTreeDocumentUrl", "(", "String", "documentListName", ",", "String", "documentName", ",", "Boolean", "includeInactive", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/c...
Get Resource Url for GetTreeDocument @param documentListName Name of content documentListName to delete @param documentName The name of the document in the site. @param includeInactive Include inactive content. @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", "GetTreeDocument" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/DocumentTreeUrl.java#L66-L74
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/DocumentTreeUrl.java
DocumentTreeUrl.updateTreeDocumentContentUrl
public static MozuUrl updateTreeDocumentContentUrl(String documentListName, String documentName) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}/documentTree/{documentName}/content?folderPath={folderPath}&folderId={folderId}"); formatter.formatUrl("documentListName", documentListName); formatter.formatUrl("documentName", documentName); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl updateTreeDocumentContentUrl(String documentListName, String documentName) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}/documentTree/{documentName}/content?folderPath={folderPath}&folderId={folderId}"); formatter.formatUrl("documentListName", documentListName); formatter.formatUrl("documentName", documentName); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "updateTreeDocumentContentUrl", "(", "String", "documentListName", ",", "String", "documentName", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/content/documentlists/{documentListName}/documentTree/{documentName}/co...
Get Resource Url for UpdateTreeDocumentContent @param documentListName Name of content documentListName to delete @param documentName The name of the document in the site. @return String Resource Url
[ "Get", "Resource", "Url", "for", "UpdateTreeDocumentContent" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/DocumentTreeUrl.java#L82-L88
train
EsupPortail/esup-smsu-api
src/main/java/org/esupportail/smsuapi/services/sms/ackmanagement/AckManagerBusiness.java
AckManagerBusiness.manageAck
public void manageAck(final Acknowledgment acknowledgment) { final int smid = acknowledgment.getSmsId(); final SmsStatus smsStatus = acknowledgment.getSmsStatus(); if (logger.isDebugEnabled()) { logger.debug("Manage ack with : " + " - smid : " + smid + " - ack status : " + smsStatus); } final Sms sms = daoService.getSms(smid); if (sms != null) { manageAck(sms, smsStatus); } else { logger.error("unable to find in db sms with : " + " - sms_id : " + smid + "In order to update is state in DB" + smid); } }
java
public void manageAck(final Acknowledgment acknowledgment) { final int smid = acknowledgment.getSmsId(); final SmsStatus smsStatus = acknowledgment.getSmsStatus(); if (logger.isDebugEnabled()) { logger.debug("Manage ack with : " + " - smid : " + smid + " - ack status : " + smsStatus); } final Sms sms = daoService.getSms(smid); if (sms != null) { manageAck(sms, smsStatus); } else { logger.error("unable to find in db sms with : " + " - sms_id : " + smid + "In order to update is state in DB" + smid); } }
[ "public", "void", "manageAck", "(", "final", "Acknowledgment", "acknowledgment", ")", "{", "final", "int", "smid", "=", "acknowledgment", ".", "getSmsId", "(", ")", ";", "final", "SmsStatus", "smsStatus", "=", "acknowledgment", ".", "getSmsStatus", "(", ")", "...
Business layer to mange ack. @param acknowledgment
[ "Business", "layer", "to", "mange", "ack", "." ]
7b6a4388065adfd84655dbc83f37080874953b20
https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/services/sms/ackmanagement/AckManagerBusiness.java#L30-L50
train
EsupPortail/esup-smsu-api
src/main/java/org/esupportail/smsuapi/services/sms/ackmanagement/AckManagerBusiness.java
AckManagerBusiness.putPhoneNumberInBlackList
private void putPhoneNumberInBlackList(final String phoneNumber, final Application application ) { // if phone number is not already in the bl (it should not append) put the phone number // put the phone number in the black list if (daoService.isPhoneNumberInBlackList(phoneNumber)) return; logger.debug("Adding to black list : \n" + " - Phone number : " + phoneNumber + "\n" + " - Application id : " + application.getId() + "\n"); final Date currentDate = new Date(System.currentTimeMillis()); daoService.addBlacklist(new Blacklist(application, currentDate, phoneNumber)); }
java
private void putPhoneNumberInBlackList(final String phoneNumber, final Application application ) { // if phone number is not already in the bl (it should not append) put the phone number // put the phone number in the black list if (daoService.isPhoneNumberInBlackList(phoneNumber)) return; logger.debug("Adding to black list : \n" + " - Phone number : " + phoneNumber + "\n" + " - Application id : " + application.getId() + "\n"); final Date currentDate = new Date(System.currentTimeMillis()); daoService.addBlacklist(new Blacklist(application, currentDate, phoneNumber)); }
[ "private", "void", "putPhoneNumberInBlackList", "(", "final", "String", "phoneNumber", ",", "final", "Application", "application", ")", "{", "// if phone number is not already in the bl (it should not append) put the phone number\r", "// put the phone number in the black list\r", "if",...
Put a number in black list. @param phoneNumber @param application
[ "Put", "a", "number", "in", "black", "list", "." ]
7b6a4388065adfd84655dbc83f37080874953b20
https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/services/sms/ackmanagement/AckManagerBusiness.java#L69-L79
train
wiibaker/robotframework-rest-java
src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java
JsonPathLibrary.jsonElementShouldMatch
@RobotKeyword public boolean jsonElementShouldMatch(String source, String jsonPath, Object value, String method, String data, String contentType) throws Exception { boolean match = false; if (value == null) { throw new IllegalArgumentException("Given value was null"); } String found = String.valueOf(findJsonElement(source, jsonPath, method, data, contentType)); if (found.equals(value)) { System.out.println("*DEBUG* The values '" + found + "' and '" + value + "' did match"); match = true; } else { System.out.println("*ERROR* The values '" + found + "' and '" + value + "' did not match"); throw new JsonNotEqualException("The found value did not match, found '" + found + "', expected '" + value + "'"); } return match; }
java
@RobotKeyword public boolean jsonElementShouldMatch(String source, String jsonPath, Object value, String method, String data, String contentType) throws Exception { boolean match = false; if (value == null) { throw new IllegalArgumentException("Given value was null"); } String found = String.valueOf(findJsonElement(source, jsonPath, method, data, contentType)); if (found.equals(value)) { System.out.println("*DEBUG* The values '" + found + "' and '" + value + "' did match"); match = true; } else { System.out.println("*ERROR* The values '" + found + "' and '" + value + "' did not match"); throw new JsonNotEqualException("The found value did not match, found '" + found + "', expected '" + value + "'"); } return match; }
[ "@", "RobotKeyword", "public", "boolean", "jsonElementShouldMatch", "(", "String", "source", ",", "String", "jsonPath", ",", "Object", "value", ",", "String", "method", ",", "String", "data", ",", "String", "contentType", ")", "throws", "Exception", "{", "boolea...
Checks if the given value matches the one found by the `jsonPath` from the `source`. Source can be either URI or the actual JSON content You can add optional method (ie GET, POST, PUT), data or content type as parameters. Method defaults to GET. Example: | Json Element Should Match | http://example.com/test.json | $.element.param | hello | | Json Element Should Match | { element: { param:hello } } | $.element.param | hello | | Json Element Should Match | { element: { param:hello } } | $.element.param | hello | POST | {hello: world} | application/json |
[ "Checks", "if", "the", "given", "value", "matches", "the", "one", "found", "by", "the", "jsonPath", "from", "the", "source", "." ]
e30a7e494c143b644ee4282137a5a38e75d9d97b
https://github.com/wiibaker/robotframework-rest-java/blob/e30a7e494c143b644ee4282137a5a38e75d9d97b/src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java#L108-L128
train
wiibaker/robotframework-rest-java
src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java
JsonPathLibrary.jsonShouldBeEqual
@RobotKeyword public boolean jsonShouldBeEqual(String from, String to) throws Exception { return jsonShouldBeEqual(from, to, false); }
java
@RobotKeyword public boolean jsonShouldBeEqual(String from, String to) throws Exception { return jsonShouldBeEqual(from, to, false); }
[ "@", "RobotKeyword", "public", "boolean", "jsonShouldBeEqual", "(", "String", "from", ",", "String", "to", ")", "throws", "Exception", "{", "return", "jsonShouldBeEqual", "(", "from", ",", "to", ",", "false", ")", ";", "}" ]
Checks if the given JSON contents are equal. See `Json Should Be Equal` for more details `from` and `to` can be either URI or the actual JSON content. You can add optional method (ie GET, POST, PUT), data or content type as parameters. Method defaults to GET. Example: | Json Should Be Equal | http://example.com/test.json | http://foobar.com/test.json | | Json Should Be Equal | { element: { param:hello } } | { element: { param:hello } } | | Json Should Be Equal | { element: { param:hello } } | { element: { param:hello } } | POST | {hello: world} | application/json |
[ "Checks", "if", "the", "given", "JSON", "contents", "are", "equal", ".", "See", "Json", "Should", "Be", "Equal", "for", "more", "details" ]
e30a7e494c143b644ee4282137a5a38e75d9d97b
https://github.com/wiibaker/robotframework-rest-java/blob/e30a7e494c143b644ee4282137a5a38e75d9d97b/src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java#L145-L148
train
wiibaker/robotframework-rest-java
src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java
JsonPathLibrary.jsonShouldBeEqual
@RobotKeyword public boolean jsonShouldBeEqual(String from, String to, boolean useExactMatch, String method, String data, String contentType) throws Exception { System.out.println("*DEBUG* Comparing JSON sources"); boolean equal = false; String fromJson = requestUtil.readSource(from, method, data, contentType); String toJson = requestUtil.readSource(to, method, data, contentType); if (StringUtils.isNotBlank(fromJson) && StringUtils.isNotBlank(toJson)) { if (useExactMatch) { if (fromJson.equals(toJson)) { System.out.println("*DEBUG* JSON strings are equal by exact compare"); equal = true; } else { System.out.println("*ERROR* JSON strings are NOT equal by exact compare"); equal = false; throw new JsonNotEqualException("JSON strings are NOT equal by exact compare"); } } else { equal = diff.compare(fromJson, toJson); if (!equal) { throw new JsonNotEqualException("JSON strings are NOT equal by compare"); } } } else { System.out.println("*ERROR* Either from or to JSON was empty"); throw new JsonNotValidException("One of the JSON strings is empty"); } return equal; }
java
@RobotKeyword public boolean jsonShouldBeEqual(String from, String to, boolean useExactMatch, String method, String data, String contentType) throws Exception { System.out.println("*DEBUG* Comparing JSON sources"); boolean equal = false; String fromJson = requestUtil.readSource(from, method, data, contentType); String toJson = requestUtil.readSource(to, method, data, contentType); if (StringUtils.isNotBlank(fromJson) && StringUtils.isNotBlank(toJson)) { if (useExactMatch) { if (fromJson.equals(toJson)) { System.out.println("*DEBUG* JSON strings are equal by exact compare"); equal = true; } else { System.out.println("*ERROR* JSON strings are NOT equal by exact compare"); equal = false; throw new JsonNotEqualException("JSON strings are NOT equal by exact compare"); } } else { equal = diff.compare(fromJson, toJson); if (!equal) { throw new JsonNotEqualException("JSON strings are NOT equal by compare"); } } } else { System.out.println("*ERROR* Either from or to JSON was empty"); throw new JsonNotValidException("One of the JSON strings is empty"); } return equal; }
[ "@", "RobotKeyword", "public", "boolean", "jsonShouldBeEqual", "(", "String", "from", ",", "String", "to", ",", "boolean", "useExactMatch", ",", "String", "method", ",", "String", "data", ",", "String", "contentType", ")", "throws", "Exception", "{", "System", ...
Checks if the given JSON contents are equal. The third parameter specifies whether exact string match should be used or diffing by the JSON objects ie. the order of the attributes does not matter. `from` and `to` can be either URI or the actual JSON content. You can add optional method (ie GET, POST, PUT), data or content type as parameters. Method defaults to GET. Example: | Json Should Be Equal | http://example.com/test.json | http://foobar.com/test.json | true | | Json Should Be Equal | { element: { param:hello, foo:bar } } | { element: { foo:bar, param:hello } } | true | | Json Should Be Equal | { element: { param:hello, foo:bar } } | { element: { foo:bar, param:hello } } | true | POST | {hello: world} | application/json |
[ "Checks", "if", "the", "given", "JSON", "contents", "are", "equal", ".", "The", "third", "parameter", "specifies", "whether", "exact", "string", "match", "should", "be", "used", "or", "diffing", "by", "the", "JSON", "objects", "ie", ".", "the", "order", "o...
e30a7e494c143b644ee4282137a5a38e75d9d97b
https://github.com/wiibaker/robotframework-rest-java/blob/e30a7e494c143b644ee4282137a5a38e75d9d97b/src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java#L181-L212
train
wiibaker/robotframework-rest-java
src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java
JsonPathLibrary.findJsonElement
@RobotKeyword public Object findJsonElement(String source, String jsonPath, String method, String data, String contentType) throws Exception { System.out.println("*DEBUG* Reading jsonPath: " + jsonPath); String json = requestUtil.readSource(source, method, data, contentType); Object value; try { value = JsonPath.read(json, jsonPath); } catch (PathNotFoundException e) { throw new JsonElementNotFoundException("Path '" + jsonPath + "' was not found in JSON"); } return value; }
java
@RobotKeyword public Object findJsonElement(String source, String jsonPath, String method, String data, String contentType) throws Exception { System.out.println("*DEBUG* Reading jsonPath: " + jsonPath); String json = requestUtil.readSource(source, method, data, contentType); Object value; try { value = JsonPath.read(json, jsonPath); } catch (PathNotFoundException e) { throw new JsonElementNotFoundException("Path '" + jsonPath + "' was not found in JSON"); } return value; }
[ "@", "RobotKeyword", "public", "Object", "findJsonElement", "(", "String", "source", ",", "String", "jsonPath", ",", "String", "method", ",", "String", "data", ",", "String", "contentType", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println",...
Find JSON element by `jsonPath` from the `source` and return its value if found. `source` can be either URI or the actual JSON content. You can add optional method (ie GET, POST, PUT), data or content type as parameters. Method defaults to GET. Example: | Find Json Element | http://example.com/test.json | $.foo.bar | | Find Json Element | {element: { param:hello, foo:bar } } | $.element.foo | | Find Json Element | {element: { param:hello, foo:bar } } | $.element.foo | POST | {hello: world} | application/json |
[ "Find", "JSON", "element", "by", "jsonPath", "from", "the", "source", "and", "return", "its", "value", "if", "found", "." ]
e30a7e494c143b644ee4282137a5a38e75d9d97b
https://github.com/wiibaker/robotframework-rest-java/blob/e30a7e494c143b644ee4282137a5a38e75d9d97b/src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java#L243-L258
train
wiibaker/robotframework-rest-java
src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java
JsonPathLibrary.jsonShouldHaveElementCount
@SuppressWarnings("unchecked") @RobotKeyword public boolean jsonShouldHaveElementCount(String source, String jsonPath, Integer count, String method, String data, String contentType) throws Exception { boolean match = false; System.out.println("*DEBUG* Reading jsonPath: " + jsonPath); String json = requestUtil.readSource(source, method, data, contentType); List<Object> elements = null; Object object = null; try { object = JsonPath.read(json, jsonPath); } catch (PathNotFoundException e) { throw new JsonElementNotFoundException("Path '" + jsonPath + "' was not found in JSON"); } if (object != null) { // TODO: Find a way to do this without suppressing the warning if (object instanceof List<?>) { elements = (List<Object>) object; if (CollectionUtils.isNotEmpty(elements)) { match = (elements.size() == count); if (!match) { System.out.println("*ERROR* Element counts did not match. Expected '" + count + "', got '" + elements.size() + "'"); throw new JsonNotEqualException("Element counts did not match. Expected '" + count + "', got '" + elements.size() + "'"); } } else { // In practice, it's impossible to end here. System.out.println("*ERROR* Could not find elements from '" + jsonPath + "'"); throw new JsonElementNotFoundException("Could not find elements from '" + jsonPath + "'"); } } else if (count == 1) { System.out.println("*DEBUG* Found 1 item as expected from '" + jsonPath + "'"); match = true; } else { System.out.println("*ERROR* Found 1 item, but expected '" + count + "'"); throw new JsonElementNotFoundException("Found 1 item, but expected '" + count + "'"); } } else { System.out.println("*ERROR* Could not find elements from '" + jsonPath + "'"); throw new JsonElementNotFoundException("Could not find elements from '" + jsonPath + "'"); } return match; }
java
@SuppressWarnings("unchecked") @RobotKeyword public boolean jsonShouldHaveElementCount(String source, String jsonPath, Integer count, String method, String data, String contentType) throws Exception { boolean match = false; System.out.println("*DEBUG* Reading jsonPath: " + jsonPath); String json = requestUtil.readSource(source, method, data, contentType); List<Object> elements = null; Object object = null; try { object = JsonPath.read(json, jsonPath); } catch (PathNotFoundException e) { throw new JsonElementNotFoundException("Path '" + jsonPath + "' was not found in JSON"); } if (object != null) { // TODO: Find a way to do this without suppressing the warning if (object instanceof List<?>) { elements = (List<Object>) object; if (CollectionUtils.isNotEmpty(elements)) { match = (elements.size() == count); if (!match) { System.out.println("*ERROR* Element counts did not match. Expected '" + count + "', got '" + elements.size() + "'"); throw new JsonNotEqualException("Element counts did not match. Expected '" + count + "', got '" + elements.size() + "'"); } } else { // In practice, it's impossible to end here. System.out.println("*ERROR* Could not find elements from '" + jsonPath + "'"); throw new JsonElementNotFoundException("Could not find elements from '" + jsonPath + "'"); } } else if (count == 1) { System.out.println("*DEBUG* Found 1 item as expected from '" + jsonPath + "'"); match = true; } else { System.out.println("*ERROR* Found 1 item, but expected '" + count + "'"); throw new JsonElementNotFoundException("Found 1 item, but expected '" + count + "'"); } } else { System.out.println("*ERROR* Could not find elements from '" + jsonPath + "'"); throw new JsonElementNotFoundException("Could not find elements from '" + jsonPath + "'"); } return match; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "RobotKeyword", "public", "boolean", "jsonShouldHaveElementCount", "(", "String", "source", ",", "String", "jsonPath", ",", "Integer", "count", ",", "String", "method", ",", "String", "data", ",", "String", ...
Find JSON element by `jsonPath` from the `source` and check if the amount of found elements matches the given `count`. `source` can be either URI or the actual JSON content. You can add optional method (ie GET, POST, PUT), data or content type as parameters. Method defaults to GET. Example: | Json Should Have Element Count | http://example.com/test.json | $.foo[*] | 3 | | Json Should Have Element Count | {element: [ {param:hello}, {foo:bar} ] } | $.element[*] | 2 | | Json Should Have Element Count | {element: [ {param:hello}, {foo:bar} ] } | $.element[*] | 2 | POST | {hello: world} | application/json |
[ "Find", "JSON", "element", "by", "jsonPath", "from", "the", "source", "and", "check", "if", "the", "amount", "of", "found", "elements", "matches", "the", "given", "count", "." ]
e30a7e494c143b644ee4282137a5a38e75d9d97b
https://github.com/wiibaker/robotframework-rest-java/blob/e30a7e494c143b644ee4282137a5a38e75d9d97b/src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java#L332-L382
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/appdev/PackageUrl.java
PackageUrl.getFileUrl
public static MozuUrl getFileUrl(String applicationKey, String fileName) { UrlFormatter formatter = new UrlFormatter("/api/platform/appdev/filebasedpackage/packages/{applicationKey}?fileName={fileName}"); formatter.formatUrl("applicationKey", applicationKey); formatter.formatUrl("fileName", fileName); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ; }
java
public static MozuUrl getFileUrl(String applicationKey, String fileName) { UrlFormatter formatter = new UrlFormatter("/api/platform/appdev/filebasedpackage/packages/{applicationKey}?fileName={fileName}"); formatter.formatUrl("applicationKey", applicationKey); formatter.formatUrl("fileName", fileName); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ; }
[ "public", "static", "MozuUrl", "getFileUrl", "(", "String", "applicationKey", ",", "String", "fileName", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/platform/appdev/filebasedpackage/packages/{applicationKey}?fileName={fileName}\"", ")", ";"...
Get Resource Url for GetFile @param applicationKey The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application Version}.{Package name}. @param fileName @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetFile" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/appdev/PackageUrl.java#L22-L28
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicTokenUrl.java
PublicTokenUrl.executeUrl
public static MozuUrl executeUrl(String cardType, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/payments/tokens/{cardType}/execute?responseFields={responseFields}"); formatter.formatUrl("cardType", cardType); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl executeUrl(String cardType, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/payments/tokens/{cardType}/execute?responseFields={responseFields}"); formatter.formatUrl("cardType", cardType); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "executeUrl", "(", "String", "cardType", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/payments/tokens/{cardType}/execute?responseFields={responseFields}\"", ")", ";", ...
Get Resource Url for Execute @param cardType @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", "Execute" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicTokenUrl.java#L34-L40
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/PublishingScopeUrl.java
PublishingScopeUrl.getPublishSetUrl
public static MozuUrl getPublishSetUrl(String publishSetCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/publishing/publishsets/{publishSetCode}?responseFields={responseFields}"); formatter.formatUrl("publishSetCode", publishSetCode); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getPublishSetUrl(String publishSetCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/publishing/publishsets/{publishSetCode}?responseFields={responseFields}"); formatter.formatUrl("publishSetCode", publishSetCode); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getPublishSetUrl", "(", "String", "publishSetCode", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/publishing/publishsets/{publishSetCode}?responseFields={resp...
Get Resource Url for GetPublishSet @param publishSetCode The unique identifier of the publish 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. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetPublishSet" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/PublishingScopeUrl.java#L22-L28
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/PublishingScopeUrl.java
PublishingScopeUrl.discardDraftsUrl
public static MozuUrl discardDraftsUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/publishing/discarddrafts"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl discardDraftsUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/publishing/discarddrafts"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "discardDraftsUrl", "(", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/publishing/discarddrafts\"", ")", ";", "return", "new", "MozuUrl", "(", "formatter", ".", "getResourceUrl", "("...
Get Resource Url for DiscardDrafts @return String Resource Url
[ "Get", "Resource", "Url", "for", "DiscardDrafts" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/PublishingScopeUrl.java#L46-L50
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/PublishingScopeUrl.java
PublishingScopeUrl.publishDraftsUrl
public static MozuUrl publishDraftsUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/publishing/publishdrafts"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl publishDraftsUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/publishing/publishdrafts"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "publishDraftsUrl", "(", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/publishing/publishdrafts\"", ")", ";", "return", "new", "MozuUrl", "(", "formatter", ".", "getResourceUrl", "("...
Get Resource Url for PublishDrafts @return String Resource Url
[ "Get", "Resource", "Url", "for", "PublishDrafts" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/PublishingScopeUrl.java#L56-L60
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java
OrderItemUrl.getOrderItemViaLineIdUrl
public static MozuUrl getOrderItemViaLineIdUrl(Boolean draft, Integer lineId, String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{lineId}?draft={draft}&responseFields={responseFields}"); formatter.formatUrl("draft", draft); formatter.formatUrl("lineId", lineId); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getOrderItemViaLineIdUrl(Boolean draft, Integer lineId, String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{lineId}?draft={draft}&responseFields={responseFields}"); formatter.formatUrl("draft", draft); formatter.formatUrl("lineId", lineId); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getOrderItemViaLineIdUrl", "(", "Boolean", "draft", ",", "Integer", "lineId", ",", "String", "orderId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/orders/{or...
Get Resource Url for GetOrderItemViaLineId @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its components. @param lineId The specific line id that's associated with the order item. @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", "GetOrderItemViaLineId" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java#L24-L32
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java
OrderItemUrl.createOrderItemUrl
public static MozuUrl createOrderItemUrl(String orderId, String responseFields, Boolean skipInventoryCheck, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items?updatemode={updateMode}&version={version}&skipInventoryCheck={skipInventoryCheck}&responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("skipInventoryCheck", skipInventoryCheck); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl createOrderItemUrl(String orderId, String responseFields, Boolean skipInventoryCheck, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items?updatemode={updateMode}&version={version}&skipInventoryCheck={skipInventoryCheck}&responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("skipInventoryCheck", skipInventoryCheck); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "createOrderItemUrl", "(", "String", "orderId", ",", "String", "responseFields", ",", "Boolean", "skipInventoryCheck", ",", "String", "updateMode", ",", "String", "version", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormat...
Get Resource Url for CreateOrderItem @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 skipInventoryCheck If true, skip the process to validate inventory when creating this product reservation. @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", "CreateOrderItem" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java#L77-L86
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java
OrderItemUrl.updateOrderItemDiscountUrl
public static MozuUrl updateOrderItemDiscountUrl(Integer discountId, String orderId, String orderItemId, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/discounts/{discountId}?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("discountId", discountId); formatter.formatUrl("orderId", orderId); formatter.formatUrl("orderItemId", orderItemId); 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 updateOrderItemDiscountUrl(Integer discountId, String orderId, String orderItemId, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/discounts/{discountId}?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("discountId", discountId); formatter.formatUrl("orderId", orderId); formatter.formatUrl("orderItemId", orderItemId); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "updateOrderItemDiscountUrl", "(", "Integer", "discountId", ",", "String", "orderId", ",", "String", "orderItemId", ",", "String", "responseFields", ",", "String", "updateMode", ",", "String", "version", ")", "{", "UrlFormatter", "form...
Get Resource Url for UpdateOrderItemDiscount @param discountId discountId parameter description DOCUMENT_HERE @param orderId Unique identifier of the order. @param orderItemId Unique identifier of the item to remove from 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", "UpdateOrderItemDiscount" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java#L98-L108
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java
OrderItemUrl.updateItemProductPriceUrl
public static MozuUrl updateItemProductPriceUrl(String orderId, String orderItemId, Double price, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/price/{price}?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("orderItemId", orderItemId); formatter.formatUrl("price", price); 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 updateItemProductPriceUrl(String orderId, String orderItemId, Double price, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/price/{price}?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("orderItemId", orderItemId); formatter.formatUrl("price", price); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "updateItemProductPriceUrl", "(", "String", "orderId", ",", "String", "orderItemId", ",", "Double", "price", ",", "String", "responseFields", ",", "String", "updateMode", ",", "String", "version", ")", "{", "UrlFormatter", "formatter",...
Get Resource Url for UpdateItemProductPrice @param orderId Unique identifier of the order. @param orderItemId Unique identifier of the item to remove from the order. @param price The override price to specify for this item in the specified 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", "UpdateItemProductPrice" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java#L163-L173
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java
OrderItemUrl.updateItemQuantityUrl
public static MozuUrl updateItemQuantityUrl(String orderId, String orderItemId, Integer quantity, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/quantity/{quantity}?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("orderItemId", orderItemId); formatter.formatUrl("quantity", quantity); 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 updateItemQuantityUrl(String orderId, String orderItemId, Integer quantity, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/quantity/{quantity}?updatemode={updateMode}&version={version}&responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("orderItemId", orderItemId); formatter.formatUrl("quantity", quantity); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "updateItemQuantityUrl", "(", "String", "orderId", ",", "String", "orderItemId", ",", "Integer", "quantity", ",", "String", "responseFields", ",", "String", "updateMode", ",", "String", "version", ")", "{", "UrlFormatter", "formatter",...
Get Resource Url for UpdateItemQuantity @param orderId Unique identifier of the order. @param orderItemId Unique identifier of the item to remove from the order. @param quantity The number of cart items in the shopper's active cart. @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", "UpdateItemQuantity" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java#L185-L195
train
nmdp-bioinformatics/ngs
align/src/main/java/org/nmdp/ngs/align/BedWriter.java
BedWriter.write
public static void write(final BedRecord record, final PrintWriter writer) { checkNotNull(record); checkNotNull(writer); writer.println(record.toString()); }
java
public static void write(final BedRecord record, final PrintWriter writer) { checkNotNull(record); checkNotNull(writer); writer.println(record.toString()); }
[ "public", "static", "void", "write", "(", "final", "BedRecord", "record", ",", "final", "PrintWriter", "writer", ")", "{", "checkNotNull", "(", "record", ")", ";", "checkNotNull", "(", "writer", ")", ";", "writer", ".", "println", "(", "record", ".", "toSt...
Write the specified BED record with the specified print writer. @param record BED record to write, must not be null @param writer print writer to write BED record with, must not be null
[ "Write", "the", "specified", "BED", "record", "with", "the", "specified", "print", "writer", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/BedWriter.java#L48-L52
train
nmdp-bioinformatics/ngs
align/src/main/java/org/nmdp/ngs/align/BedWriter.java
BedWriter.write
public static void write(final Iterable<BedRecord> records, final PrintWriter writer) { checkNotNull(records); checkNotNull(writer); for (BedRecord record : records) { writer.println(record.toString()); } }
java
public static void write(final Iterable<BedRecord> records, final PrintWriter writer) { checkNotNull(records); checkNotNull(writer); for (BedRecord record : records) { writer.println(record.toString()); } }
[ "public", "static", "void", "write", "(", "final", "Iterable", "<", "BedRecord", ">", "records", ",", "final", "PrintWriter", "writer", ")", "{", "checkNotNull", "(", "records", ")", ";", "checkNotNull", "(", "writer", ")", ";", "for", "(", "BedRecord", "r...
Write zero or more BED records with the specified print writer. @param records zero or more BED records to write, must not be null @param writer print writer to write BED records with, must not be null
[ "Write", "zero", "or", "more", "BED", "records", "with", "the", "specified", "print", "writer", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/BedWriter.java#L60-L66
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CardUrl.java
CardUrl.updateAccountCardUrl
public static MozuUrl updateAccountCardUrl(Integer accountId, String cardId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/cards/{cardId}?responseFields={responseFields}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("cardId", cardId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl updateAccountCardUrl(Integer accountId, String cardId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/cards/{cardId}?responseFields={responseFields}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("cardId", cardId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "updateAccountCardUrl", "(", "Integer", "accountId", ",", "String", "cardId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/customer/accounts/{accountId}/cards/{cardId...
Get Resource Url for UpdateAccountCard @param accountId Unique identifier of the customer account. @param cardId Unique identifier of the card associated with the customer account billing contact. @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", "UpdateAccountCard" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CardUrl.java#L67-L74
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CardUrl.java
CardUrl.deleteAccountCardUrl
public static MozuUrl deleteAccountCardUrl(Integer accountId, String cardId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/cards/{cardId}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("cardId", cardId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl deleteAccountCardUrl(Integer accountId, String cardId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/cards/{cardId}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("cardId", cardId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "deleteAccountCardUrl", "(", "Integer", "accountId", ",", "String", "cardId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/customer/accounts/{accountId}/cards/{cardId}\"", ")", ";", "formatter", "....
Get Resource Url for DeleteAccountCard @param accountId Unique identifier of the customer account. @param cardId Unique identifier of the card associated with the customer account billing contact. @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteAccountCard" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CardUrl.java#L82-L88
train
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ExecutionMetaData.java
ExecutionMetaData.get
public <T> T get(final Object key) { @SuppressWarnings("unchecked") // cast is not safe but convenient T value = (T) additionalData.get(key); return value; }
java
public <T> T get(final Object key) { @SuppressWarnings("unchecked") // cast is not safe but convenient T value = (T) additionalData.get(key); return value; }
[ "public", "<", "T", ">", "T", "get", "(", "final", "Object", "key", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// cast is not safe but convenient\r", "T", "value", "=", "(", "T", ")", "additionalData", ".", "get", "(", "key", ")", ";", ...
Returns the value stored under the specified key in the internal map of additional meta data. For convenience, the value is internally cast to the generic type. It is the caller's responsibility to make sure the cast is safe. @param key the key @return the value stored under the specified key, or null @see java.util.Map#get(java.lang.Object)
[ "Returns", "the", "value", "stored", "under", "the", "specified", "key", "in", "the", "internal", "map", "of", "additional", "meta", "data", ".", "For", "convenience", "the", "value", "is", "internally", "cast", "to", "the", "generic", "type", ".", "It", "...
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ExecutionMetaData.java#L110-L115
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/returns/OrderNoteUrl.java
OrderNoteUrl.getReturnNoteUrl
public static MozuUrl getReturnNoteUrl(String noteId, String responseFields, String returnId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/notes/{noteId}?responseFields={responseFields}"); formatter.formatUrl("noteId", noteId); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("returnId", returnId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getReturnNoteUrl(String noteId, String responseFields, String returnId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/notes/{noteId}?responseFields={responseFields}"); formatter.formatUrl("noteId", noteId); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("returnId", returnId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getReturnNoteUrl", "(", "String", "noteId", ",", "String", "responseFields", ",", "String", "returnId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/returns/{returnId}/notes/{noteId}?responseFields=...
Get Resource Url for GetReturnNote @param noteId Unique identifier of a particular note 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. @param returnId Unique identifier of the return whose items you want to get. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetReturnNote" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/returns/OrderNoteUrl.java#L35-L42
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/returns/OrderNoteUrl.java
OrderNoteUrl.deleteReturnNoteUrl
public static MozuUrl deleteReturnNoteUrl(String noteId, String returnId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/notes/{noteId}"); formatter.formatUrl("noteId", noteId); formatter.formatUrl("returnId", returnId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl deleteReturnNoteUrl(String noteId, String returnId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/notes/{noteId}"); formatter.formatUrl("noteId", noteId); formatter.formatUrl("returnId", returnId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "deleteReturnNoteUrl", "(", "String", "noteId", ",", "String", "returnId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/returns/{returnId}/notes/{noteId}\"", ")", ";", "formatter", ".", "formatUr...
Get Resource Url for DeleteReturnNote @param noteId Unique identifier of a particular note to retrieve. @param returnId Unique identifier of the return whose items you want to get. @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteReturnNote" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/returns/OrderNoteUrl.java#L80-L86
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/couponsets/AssignedDiscountUrl.java
AssignedDiscountUrl.getAssignedDiscountsUrl
public static MozuUrl getAssignedDiscountsUrl(String couponSetCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}/assigneddiscounts"); formatter.formatUrl("couponSetCode", couponSetCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getAssignedDiscountsUrl(String couponSetCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}/assigneddiscounts"); formatter.formatUrl("couponSetCode", couponSetCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getAssignedDiscountsUrl", "(", "String", "couponSetCode", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/couponsets/{couponSetCode}/assigneddiscounts\"", ")", ";", "formatter", ".", "forma...
Get Resource Url for GetAssignedDiscounts @param couponSetCode The unique identifier of the coupon set. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetAssignedDiscounts" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/couponsets/AssignedDiscountUrl.java#L21-L26
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/couponsets/AssignedDiscountUrl.java
AssignedDiscountUrl.unAssignDiscountUrl
public static MozuUrl unAssignDiscountUrl(String couponSetCode, Integer discountId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}/assigneddiscounts/{discountId}"); formatter.formatUrl("couponSetCode", couponSetCode); formatter.formatUrl("discountId", discountId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl unAssignDiscountUrl(String couponSetCode, Integer discountId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}/assigneddiscounts/{discountId}"); formatter.formatUrl("couponSetCode", couponSetCode); formatter.formatUrl("discountId", discountId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "unAssignDiscountUrl", "(", "String", "couponSetCode", ",", "Integer", "discountId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/couponsets/{couponSetCode}/assigneddiscounts/{discountId}\"",...
Get Resource Url for UnAssignDiscount @param couponSetCode The unique identifier of the coupon set. @param discountId discountId parameter description DOCUMENT_HERE @return String Resource Url
[ "Get", "Resource", "Url", "for", "UnAssignDiscount" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/couponsets/AssignedDiscountUrl.java#L46-L52
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/DiscountUrl.java
DiscountUrl.getDiscountContentUrl
public static MozuUrl getDiscountContentUrl(Integer discountId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/discounts/{discountId}/content?responseFields={responseFields}"); formatter.formatUrl("discountId", discountId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getDiscountContentUrl(Integer discountId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/discounts/{discountId}/content?responseFields={responseFields}"); formatter.formatUrl("discountId", discountId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getDiscountContentUrl", "(", "Integer", "discountId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/discounts/{discountId}/content?responseFields={responseFie...
Get Resource Url for GetDiscountContent @param discountId discountId parameter description DOCUMENT_HERE @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", "GetDiscountContent" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/DiscountUrl.java#L42-L48
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/DiscountUrl.java
DiscountUrl.deleteDiscountUrl
public static MozuUrl deleteDiscountUrl(Integer discountId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/discounts/{discountId}"); formatter.formatUrl("discountId", discountId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl deleteDiscountUrl(Integer discountId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/discounts/{discountId}"); formatter.formatUrl("discountId", discountId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "deleteDiscountUrl", "(", "Integer", "discountId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/discounts/{discountId}\"", ")", ";", "formatter", ".", "formatUrl", "(", "\"discountId\...
Get Resource Url for DeleteDiscount @param discountId discountId parameter description DOCUMENT_HERE @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteDiscount" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/DiscountUrl.java#L121-L126
train
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/GeneratorState.java
GeneratorState.initMathRandom
public long initMathRandom(final Long seed) { if (seed == null) { mathRandom = new MathRandom(); } else { mathRandom = new MathRandom(seed); } return mathRandom.getSeed(); }
java
public long initMathRandom(final Long seed) { if (seed == null) { mathRandom = new MathRandom(); } else { mathRandom = new MathRandom(seed); } return mathRandom.getSeed(); }
[ "public", "long", "initMathRandom", "(", "final", "Long", "seed", ")", "{", "if", "(", "seed", "==", "null", ")", "{", "mathRandom", "=", "new", "MathRandom", "(", ")", ";", "}", "else", "{", "mathRandom", "=", "new", "MathRandom", "(", "seed", ")", ...
Intializes the MathRandom instance.
[ "Intializes", "the", "MathRandom", "instance", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/GeneratorState.java#L39-L46
train
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/Multiplier.java
Multiplier.initValuesImpl
@Override protected String initValuesImpl(final FieldCase c) { double d = 0.0; String v = source.initValues(c); if (v != null && v.length() > 0) { d = 0.0; try { Number n = format.parse(v); d = n.doubleValue(); } catch (ParseException e) { log.debug("Could not parse string " + v + " to a number; setting value 0.0"); } } d *= factor; return format.format(d); }
java
@Override protected String initValuesImpl(final FieldCase c) { double d = 0.0; String v = source.initValues(c); if (v != null && v.length() > 0) { d = 0.0; try { Number n = format.parse(v); d = n.doubleValue(); } catch (ParseException e) { log.debug("Could not parse string " + v + " to a number; setting value 0.0"); } } d *= factor; return format.format(d); }
[ "@", "Override", "protected", "String", "initValuesImpl", "(", "final", "FieldCase", "c", ")", "{", "double", "d", "=", "0.0", ";", "String", "v", "=", "source", ".", "initValues", "(", "c", ")", ";", "if", "(", "v", "!=", "null", "&&", "v", ".", "...
Initializes the source constraint first. Then the source constraint's value is parsed with the format object of this constraint to a double number and this value is subsequently multiplied with the configurable factor. The multiplied value is finally formatted to a string using the the format object again and stored as a value. @return the value just generated
[ "Initializes", "the", "source", "constraint", "first", ".", "Then", "the", "source", "constraint", "s", "value", "is", "parsed", "with", "the", "format", "object", "of", "this", "constraint", "to", "a", "double", "number", "and", "this", "value", "is", "subs...
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/Multiplier.java#L72-L87
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/content/DocumentListTypeUrl.java
DocumentListTypeUrl.getDocumentListTypeUrl
public static MozuUrl getDocumentListTypeUrl(String documentListTypeFQN, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlistTypes/{documentListTypeFQN}?responseFields={responseFields}"); formatter.formatUrl("documentListTypeFQN", documentListTypeFQN); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getDocumentListTypeUrl(String documentListTypeFQN, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlistTypes/{documentListTypeFQN}?responseFields={responseFields}"); formatter.formatUrl("documentListTypeFQN", documentListTypeFQN); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getDocumentListTypeUrl", "(", "String", "documentListTypeFQN", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/content/documentlistTypes/{documentListTypeFQN}?responseFields={response...
Get Resource Url for GetDocumentListType @param documentListTypeFQN @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", "GetDocumentListType" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/content/DocumentListTypeUrl.java#L38-L44
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfWriter.java
VcfWriter.write
public static void write(final VcfHeader header, final List<VcfSample> samples, final List<VcfRecord> records, final PrintWriter writer) { writeHeader(header, writer); writeColumnHeader(samples, writer); writeRecords(samples, records, writer); }
java
public static void write(final VcfHeader header, final List<VcfSample> samples, final List<VcfRecord> records, final PrintWriter writer) { writeHeader(header, writer); writeColumnHeader(samples, writer); writeRecords(samples, records, writer); }
[ "public", "static", "void", "write", "(", "final", "VcfHeader", "header", ",", "final", "List", "<", "VcfSample", ">", "samples", ",", "final", "List", "<", "VcfRecord", ">", "records", ",", "final", "PrintWriter", "writer", ")", "{", "writeHeader", "(", "...
Write VCF with the specified print writer. @param header VCF header, must not be null @param samples zero or more VCF samples, must not be null @param records zero or more VCF records, must not be null @param writer print writer to write VCF with, must not be null
[ "Write", "VCF", "with", "the", "specified", "print", "writer", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfWriter.java#L55-L63
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfWriter.java
VcfWriter.writeHeader
public static void writeHeader(final VcfHeader header, final PrintWriter writer) { checkNotNull(header); checkNotNull(writer); for (String meta : header.getMeta()) { writer.println(meta); } }
java
public static void writeHeader(final VcfHeader header, final PrintWriter writer) { checkNotNull(header); checkNotNull(writer); for (String meta : header.getMeta()) { writer.println(meta); } }
[ "public", "static", "void", "writeHeader", "(", "final", "VcfHeader", "header", ",", "final", "PrintWriter", "writer", ")", "{", "checkNotNull", "(", "header", ")", ";", "checkNotNull", "(", "writer", ")", ";", "for", "(", "String", "meta", ":", "header", ...
Write VCF header with the specified print writer. @param header VCF header, must not be null @param writer print writer to write VCF with, must not be null
[ "Write", "VCF", "header", "with", "the", "specified", "print", "writer", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfWriter.java#L71-L78
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfWriter.java
VcfWriter.writeColumnHeader
public static void writeColumnHeader(final List<VcfSample> samples, final PrintWriter writer) { checkNotNull(samples); checkNotNull(writer); StringBuilder sb = new StringBuilder("#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO"); if (!samples.isEmpty()) { sb.append("\tFORMAT"); } for (VcfSample sample : samples) { sb.append("\t"); sb.append(sample.getId()); } writer.println(sb.toString()); }
java
public static void writeColumnHeader(final List<VcfSample> samples, final PrintWriter writer) { checkNotNull(samples); checkNotNull(writer); StringBuilder sb = new StringBuilder("#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO"); if (!samples.isEmpty()) { sb.append("\tFORMAT"); } for (VcfSample sample : samples) { sb.append("\t"); sb.append(sample.getId()); } writer.println(sb.toString()); }
[ "public", "static", "void", "writeColumnHeader", "(", "final", "List", "<", "VcfSample", ">", "samples", ",", "final", "PrintWriter", "writer", ")", "{", "checkNotNull", "(", "samples", ")", ";", "checkNotNull", "(", "writer", ")", ";", "StringBuilder", "sb", ...
Write VCF column header with the specified print writer. @param samples zero or more VCF samples, must not be null @param writer print writer to write VCF with, must not be null
[ "Write", "VCF", "column", "header", "with", "the", "specified", "print", "writer", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfWriter.java#L86-L99
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfWriter.java
VcfWriter.writeRecords
public static void writeRecords(final List<VcfSample> samples, final List<VcfRecord> records, final PrintWriter writer) { checkNotNull(samples); checkNotNull(records); checkNotNull(writer); for (VcfRecord record : records) { writeRecord(samples, record, writer); } }
java
public static void writeRecords(final List<VcfSample> samples, final List<VcfRecord> records, final PrintWriter writer) { checkNotNull(samples); checkNotNull(records); checkNotNull(writer); for (VcfRecord record : records) { writeRecord(samples, record, writer); } }
[ "public", "static", "void", "writeRecords", "(", "final", "List", "<", "VcfSample", ">", "samples", ",", "final", "List", "<", "VcfRecord", ">", "records", ",", "final", "PrintWriter", "writer", ")", "{", "checkNotNull", "(", "samples", ")", ";", "checkNotNu...
Write VCF records with the specified print writer. @param samples zero or more VCF samples, must not be null @param records zero or more VCF records, must not be null @param writer print writer to write VCF with, must not be null
[ "Write", "VCF", "records", "with", "the", "specified", "print", "writer", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfWriter.java#L108-L118
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfWriter.java
VcfWriter.writeRecord
public static void writeRecord(final List<VcfSample> samples, final VcfRecord record, final PrintWriter writer) { checkNotNull(samples); checkNotNull(record); checkNotNull(writer); StringBuilder sb = new StringBuilder(); sb.append(record.getChrom()); sb.append("\t"); sb.append(record.getPos()); sb.append("\t"); if (record.getId().length == 0) { sb.append("."); } else { sb.append(Joiner.on(";").join(record.getId())); } sb.append("\t"); sb.append(record.getRef()); sb.append("\t"); sb.append(Joiner.on(",").join(record.getAlt())); sb.append("\t"); if (Double.isNaN(record.getQual())) { sb.append("."); } else { sb.append((int) record.getQual()); } sb.append("\t"); sb.append(Joiner.on(";").join(record.getFilter())); sb.append("\t"); if (record.getInfo().isEmpty()) { sb.append("."); } else { sb.append(Joiner.on(";").withKeyValueSeparator("=").join(record.getInfo().asMap())); } if (!samples.isEmpty()) { sb.append("\t"); sb.append(Joiner.on(":").join(record.getFormat())); for (VcfSample sample : samples) { sb.append("\t"); List<String> values = new ArrayList<String>(); for (String formatId : record.getFormat()) { List<String> fieldValues = record.getGenotypes().get(sample.getId()).getFields().get(formatId); values.add(fieldValues.isEmpty() ? "." : Joiner.on(",").join(fieldValues)); } sb.append(Joiner.on(":").join(values)); } } writer.println(sb.toString()); }
java
public static void writeRecord(final List<VcfSample> samples, final VcfRecord record, final PrintWriter writer) { checkNotNull(samples); checkNotNull(record); checkNotNull(writer); StringBuilder sb = new StringBuilder(); sb.append(record.getChrom()); sb.append("\t"); sb.append(record.getPos()); sb.append("\t"); if (record.getId().length == 0) { sb.append("."); } else { sb.append(Joiner.on(";").join(record.getId())); } sb.append("\t"); sb.append(record.getRef()); sb.append("\t"); sb.append(Joiner.on(",").join(record.getAlt())); sb.append("\t"); if (Double.isNaN(record.getQual())) { sb.append("."); } else { sb.append((int) record.getQual()); } sb.append("\t"); sb.append(Joiner.on(";").join(record.getFilter())); sb.append("\t"); if (record.getInfo().isEmpty()) { sb.append("."); } else { sb.append(Joiner.on(";").withKeyValueSeparator("=").join(record.getInfo().asMap())); } if (!samples.isEmpty()) { sb.append("\t"); sb.append(Joiner.on(":").join(record.getFormat())); for (VcfSample sample : samples) { sb.append("\t"); List<String> values = new ArrayList<String>(); for (String formatId : record.getFormat()) { List<String> fieldValues = record.getGenotypes().get(sample.getId()).getFields().get(formatId); values.add(fieldValues.isEmpty() ? "." : Joiner.on(",").join(fieldValues)); } sb.append(Joiner.on(":").join(values)); } } writer.println(sb.toString()); }
[ "public", "static", "void", "writeRecord", "(", "final", "List", "<", "VcfSample", ">", "samples", ",", "final", "VcfRecord", "record", ",", "final", "PrintWriter", "writer", ")", "{", "checkNotNull", "(", "samples", ")", ";", "checkNotNull", "(", "record", ...
Write VCF record with the specified print writer. @param samples zero or more VCF samples, must not be null @param record VCF record, must not be null @param writer print writer to write VCF with, must not be null
[ "Write", "VCF", "record", "with", "the", "specified", "print", "writer", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfWriter.java#L127-L184
train
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/CharacterSet.java
CharacterSet.getInverse
public CharacterSet getInverse() { CharacterSet n = new CharacterSet(); n.forbiddenCharacters = characters; n.characters = forbiddenCharacters; return n; }
java
public CharacterSet getInverse() { CharacterSet n = new CharacterSet(); n.forbiddenCharacters = characters; n.characters = forbiddenCharacters; return n; }
[ "public", "CharacterSet", "getInverse", "(", ")", "{", "CharacterSet", "n", "=", "new", "CharacterSet", "(", ")", ";", "n", ".", "forbiddenCharacters", "=", "characters", ";", "n", ".", "characters", "=", "forbiddenCharacters", ";", "return", "n", ";", "}" ]
Returns a CharacterSet instance whose allowed and forbidden characters are exactly inverse to this instance. @return a CharacterSet instance whose allowed and forbidden characters are exactly inverse to this instance
[ "Returns", "a", "CharacterSet", "instance", "whose", "allowed", "and", "forbidden", "characters", "are", "exactly", "inverse", "to", "this", "instance", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/CharacterSet.java#L132-L137
train
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/CharacterSet.java
CharacterSet.getCharacter
public char getCharacter(final int index) { if (index > characters.length) { throw new IndexOutOfBoundsException(index + "@" + characters.length + " does not fit"); } return characters[index]; }
java
public char getCharacter(final int index) { if (index > characters.length) { throw new IndexOutOfBoundsException(index + "@" + characters.length + " does not fit"); } return characters[index]; }
[ "public", "char", "getCharacter", "(", "final", "int", "index", ")", "{", "if", "(", "index", ">", "characters", ".", "length", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", "index", "+", "\"@\"", "+", "characters", ".", "length", "+", "\" do...
Return the character at index position @return the character at index position
[ "Return", "the", "character", "at", "index", "position" ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/CharacterSet.java#L166-L171
train
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/CharacterSet.java
CharacterSet.createCharacterSet
public static CharacterSet createCharacterSet(final String encoding, final String goodExpression, final String badExpression, final String characterSetId) throws UnsupportedEncodingException { if (characterSets.get().containsKey(characterSetId)) { LOG.info("CharacterSet with id=" + characterSetId + " already created"); return characterSets.get().get(characterSetId); } CharacterSet cs = new CharacterSet(encoding, goodExpression, badExpression, characterSetId); characterSets.get().put(characterSetId, cs); LOG.info("Added " + cs); return cs; }
java
public static CharacterSet createCharacterSet(final String encoding, final String goodExpression, final String badExpression, final String characterSetId) throws UnsupportedEncodingException { if (characterSets.get().containsKey(characterSetId)) { LOG.info("CharacterSet with id=" + characterSetId + " already created"); return characterSets.get().get(characterSetId); } CharacterSet cs = new CharacterSet(encoding, goodExpression, badExpression, characterSetId); characterSets.get().put(characterSetId, cs); LOG.info("Added " + cs); return cs; }
[ "public", "static", "CharacterSet", "createCharacterSet", "(", "final", "String", "encoding", ",", "final", "String", "goodExpression", ",", "final", "String", "badExpression", ",", "final", "String", "characterSetId", ")", "throws", "UnsupportedEncodingException", "{",...
Creates a new CharacterSet. If there is already a CharacterSet with the given ID this will be returned.
[ "Creates", "a", "new", "CharacterSet", ".", "If", "there", "is", "already", "a", "CharacterSet", "with", "the", "given", "ID", "this", "will", "be", "returned", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/CharacterSet.java#L228-L238
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionUrl.java
ProductTypeOptionUrl.getOptionsUrl
public static MozuUrl getOptionsUrl(Integer productTypeId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options"); formatter.formatUrl("productTypeId", productTypeId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getOptionsUrl(Integer productTypeId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options"); formatter.formatUrl("productTypeId", productTypeId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getOptionsUrl", "(", "Integer", "productTypeId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options\"", ")", ";", "formatter", ".", "fo...
Get Resource Url for GetOptions @param productTypeId Identifier of the product type. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetOptions" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionUrl.java#L21-L26
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionUrl.java
ProductTypeOptionUrl.getOptionUrl
public static MozuUrl getOptionUrl(String attributeFQN, Integer productTypeId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options/{attributeFQN}?responseFields={responseFields}"); formatter.formatUrl("attributeFQN", attributeFQN); formatter.formatUrl("productTypeId", productTypeId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getOptionUrl(String attributeFQN, Integer productTypeId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options/{attributeFQN}?responseFields={responseFields}"); formatter.formatUrl("attributeFQN", attributeFQN); formatter.formatUrl("productTypeId", productTypeId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getOptionUrl", "(", "String", "attributeFQN", ",", "Integer", "productTypeId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/attributedefinition/product...
Get Resource Url for GetOption @param attributeFQN Fully qualified name for an attribute. @param productTypeId Identifier of the product 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", "GetOption" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionUrl.java#L35-L42
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionUrl.java
ProductTypeOptionUrl.addOptionUrl
public static MozuUrl addOptionUrl(Integer productTypeId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options?responseFields={responseFields}"); formatter.formatUrl("productTypeId", productTypeId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl addOptionUrl(Integer productTypeId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options?responseFields={responseFields}"); formatter.formatUrl("productTypeId", productTypeId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "addOptionUrl", "(", "Integer", "productTypeId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options?respons...
Get Resource Url for AddOption @param productTypeId Identifier of the product 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", "AddOption" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionUrl.java#L50-L56
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionUrl.java
ProductTypeOptionUrl.deleteOptionUrl
public static MozuUrl deleteOptionUrl(String attributeFQN, Integer productTypeId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options/{attributeFQN}"); formatter.formatUrl("attributeFQN", attributeFQN); formatter.formatUrl("productTypeId", productTypeId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl deleteOptionUrl(String attributeFQN, Integer productTypeId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options/{attributeFQN}"); formatter.formatUrl("attributeFQN", attributeFQN); formatter.formatUrl("productTypeId", productTypeId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "deleteOptionUrl", "(", "String", "attributeFQN", ",", "Integer", "productTypeId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/Options/{attri...
Get Resource Url for DeleteOption @param attributeFQN Fully qualified name for an attribute. @param productTypeId Identifier of the product type. @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteOption" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionUrl.java#L80-L86
train
EsupPortail/esup-smsu-api
src/main/java/org/esupportail/smsuapi/dao/beans/Application.java
Application.addToBlacklists
public void addToBlacklists(final Blacklist blacklist) { if (null == getBlacklists()) { setBlacklists(new java.util.TreeSet<Blacklist>()); } getBlacklists().add(blacklist); }
java
public void addToBlacklists(final Blacklist blacklist) { if (null == getBlacklists()) { setBlacklists(new java.util.TreeSet<Blacklist>()); } getBlacklists().add(blacklist); }
[ "public", "void", "addToBlacklists", "(", "final", "Blacklist", "blacklist", ")", "{", "if", "(", "null", "==", "getBlacklists", "(", ")", ")", "{", "setBlacklists", "(", "new", "java", ".", "util", ".", "TreeSet", "<", "Blacklist", ">", "(", ")", ")", ...
add a blacklist item to the collection of blacklist associated to the application. @param blacklist
[ "add", "a", "blacklist", "item", "to", "the", "collection", "of", "blacklist", "associated", "to", "the", "application", "." ]
7b6a4388065adfd84655dbc83f37080874953b20
https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/dao/beans/Application.java#L315-L320
train
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java
ExtendedProperties.get
public String get(final Object key, final boolean process) { String value = propsMap.get(key); if (process) { value = processPropertyValue(value); } return value == null && defaults != null ? defaults.get(key) : value; }
java
public String get(final Object key, final boolean process) { String value = propsMap.get(key); if (process) { value = processPropertyValue(value); } return value == null && defaults != null ? defaults.get(key) : value; }
[ "public", "String", "get", "(", "final", "Object", "key", ",", "final", "boolean", "process", ")", "{", "String", "value", "=", "propsMap", ".", "get", "(", "key", ")", ";", "if", "(", "process", ")", "{", "value", "=", "processPropertyValue", "(", "va...
Looks up a property. Recursively checks the defaults if necessary. If the property is found as a system property, this value will be used. @param key The property key @param process If {@code true}, the looked-up value is passed to {@link #processPropertyValue(String)}, and the processed result is returned. @return The property value, or {@code null} if the property is not found
[ "Looks", "up", "a", "property", ".", "Recursively", "checks", "the", "defaults", "if", "necessary", ".", "If", "the", "property", "is", "found", "as", "a", "system", "property", "this", "value", "will", "be", "used", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java#L167-L173
train
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java
ExtendedProperties.put
@Override public String put(final String key, final String value) { return propsMap.put(key, value); }
java
@Override public String put(final String key, final String value) { return propsMap.put(key, value); }
[ "@", "Override", "public", "String", "put", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "return", "propsMap", ".", "put", "(", "key", ",", "value", ")", ";", "}" ]
Sets the property with the specified key. @param key The key (may not be {@code null}) @param value The value (may not be {@code null}) @return The previous value of the property, or {@code null} if it did not have one
[ "Sets", "the", "property", "with", "the", "specified", "key", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java#L213-L216
train
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java
ExtendedProperties.entrySet
@Override public Set<Entry<String, String>> entrySet() { if (entrySet == null) { entrySet = new EntrySet(); } return entrySet; }
java
@Override public Set<Entry<String, String>> entrySet() { if (entrySet == null) { entrySet = new EntrySet(); } return entrySet; }
[ "@", "Override", "public", "Set", "<", "Entry", "<", "String", ",", "String", ">", ">", "entrySet", "(", ")", "{", "if", "(", "entrySet", "==", "null", ")", "{", "entrySet", "=", "new", "EntrySet", "(", ")", ";", "}", "return", "entrySet", ";", "}"...
Returns a set of Entries representing property key-value pairs. The returned set is a view to the internal data structures and reflects changes to this instance. Potential defaults are included in the returned set. @return The entry set
[ "Returns", "a", "set", "of", "Entries", "representing", "property", "key", "-", "value", "pairs", ".", "The", "returned", "set", "is", "a", "view", "to", "the", "internal", "data", "structures", "and", "reflects", "changes", "to", "this", "instance", ".", ...
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java#L256-L262
train
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java
ExtendedProperties.remove
@Override public String remove(final Object key) { String result = propsMap.remove(key); if (defaults != null) { String s = defaults.remove(key); if (result == null) { result = s; } } return result; }
java
@Override public String remove(final Object key) { String result = propsMap.remove(key); if (defaults != null) { String s = defaults.remove(key); if (result == null) { result = s; } } return result; }
[ "@", "Override", "public", "String", "remove", "(", "final", "Object", "key", ")", "{", "String", "result", "=", "propsMap", ".", "remove", "(", "key", ")", ";", "if", "(", "defaults", "!=", "null", ")", "{", "String", "s", "=", "defaults", ".", "rem...
Removes the property with the specified key. Defaults are considered. @param key The key @return The previous value associated with the property
[ "Removes", "the", "property", "with", "the", "specified", "key", ".", "Defaults", "are", "considered", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java#L294-L304
train
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java
ExtendedProperties.load
public void load(final InputStream is, final String encoding) throws IOException { load(new InputStreamReader(is, encoding)); }
java
public void load(final InputStream is, final String encoding) throws IOException { load(new InputStreamReader(is, encoding)); }
[ "public", "void", "load", "(", "final", "InputStream", "is", ",", "final", "String", "encoding", ")", "throws", "IOException", "{", "load", "(", "new", "InputStreamReader", "(", "is", ",", "encoding", ")", ")", ";", "}" ]
Loads properties from the specified stream. The caller of this method is responsible for closing the stream. @param is The input stream @param encoding The encoding
[ "Loads", "properties", "from", "the", "specified", "stream", ".", "The", "caller", "of", "this", "method", "is", "responsible", "for", "closing", "the", "stream", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java#L528-L530
train
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java
ExtendedProperties.store
public void store(final OutputStream os, final String comments, final boolean sorted, final boolean process) throws IOException { store(new OutputStreamWriter(os), comments, sorted, process); }
java
public void store(final OutputStream os, final String comments, final boolean sorted, final boolean process) throws IOException { store(new OutputStreamWriter(os), comments, sorted, process); }
[ "public", "void", "store", "(", "final", "OutputStream", "os", ",", "final", "String", "comments", ",", "final", "boolean", "sorted", ",", "final", "boolean", "process", ")", "throws", "IOException", "{", "store", "(", "new", "OutputStreamWriter", "(", "os", ...
Writes the properties to the specified stream using the default encoding, including defaults. @param os The output stream @param comments Header comment that is written to the stream @param sorted If {@code true}, the properties are written sorted by key @param process If {@code true}, place holders are resolved
[ "Writes", "the", "properties", "to", "the", "specified", "stream", "using", "the", "default", "encoding", "including", "defaults", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java#L606-L609
train
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java
ExtendedProperties.store
public void store(final Writer writer, final String comments, final boolean sorted, final boolean process) throws IOException { BufferedWriter bw = writer instanceof BufferedWriter ? (BufferedWriter) writer : new BufferedWriter(writer); if (comments != null) { for (Scanner scanner = new Scanner(comments); scanner.hasNextLine();) { bw.write("#"); bw.write(scanner.nextLine()); bw.newLine(); } } bw.write("#" + new Date()); bw.newLine(); Set<String> keys = keySet(); if (sorted) { keys = Sets.newTreeSet(keys); } for (String key : keys) { /* * No need to escape embedded and trailing spaces for value, hence pass false to flag. */ bw.write(saveConvert(key, true) + "=" + saveConvert(get(key, process), false)); bw.newLine(); } bw.flush(); }
java
public void store(final Writer writer, final String comments, final boolean sorted, final boolean process) throws IOException { BufferedWriter bw = writer instanceof BufferedWriter ? (BufferedWriter) writer : new BufferedWriter(writer); if (comments != null) { for (Scanner scanner = new Scanner(comments); scanner.hasNextLine();) { bw.write("#"); bw.write(scanner.nextLine()); bw.newLine(); } } bw.write("#" + new Date()); bw.newLine(); Set<String> keys = keySet(); if (sorted) { keys = Sets.newTreeSet(keys); } for (String key : keys) { /* * No need to escape embedded and trailing spaces for value, hence pass false to flag. */ bw.write(saveConvert(key, true) + "=" + saveConvert(get(key, process), false)); bw.newLine(); } bw.flush(); }
[ "public", "void", "store", "(", "final", "Writer", "writer", ",", "final", "String", "comments", ",", "final", "boolean", "sorted", ",", "final", "boolean", "process", ")", "throws", "IOException", "{", "BufferedWriter", "bw", "=", "writer", "instanceof", "Buf...
Writes the properties to the specified writer, including defaults. @param writer The writer @param comments The header comment written to the writer @param sorted If {@code true}, the properties are written sorted by key @param process If {@code true}, place holders are resolved
[ "Writes", "the", "properties", "to", "the", "specified", "writer", "including", "defaults", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java#L643-L669
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductExtraUrl.java
ProductExtraUrl.getExtraValueLocalizedDeltaPriceUrl
public static MozuUrl getExtraValueLocalizedDeltaPriceUrl(String attributeFQN, String currencyCode, String productCode, String responseFields, String value) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/Extras/{attributeFQN}/Values/{value}/localizedDeltaPrice/{currencyCode}?responseFields={responseFields}"); formatter.formatUrl("attributeFQN", attributeFQN); formatter.formatUrl("currencyCode", currencyCode); formatter.formatUrl("productCode", productCode); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("value", value); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getExtraValueLocalizedDeltaPriceUrl(String attributeFQN, String currencyCode, String productCode, String responseFields, String value) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/Extras/{attributeFQN}/Values/{value}/localizedDeltaPrice/{currencyCode}?responseFields={responseFields}"); formatter.formatUrl("attributeFQN", attributeFQN); formatter.formatUrl("currencyCode", currencyCode); formatter.formatUrl("productCode", productCode); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("value", value); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getExtraValueLocalizedDeltaPriceUrl", "(", "String", "attributeFQN", ",", "String", "currencyCode", ",", "String", "productCode", ",", "String", "responseFields", ",", "String", "value", ")", "{", "UrlFormatter", "formatter", "=", "new"...
Get Resource Url for GetExtraValueLocalizedDeltaPrice @param attributeFQN Fully qualified name for an attribute. @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 value The value string to create. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetExtraValueLocalizedDeltaPrice" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductExtraUrl.java#L53-L62
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductExtraUrl.java
ProductExtraUrl.getExtraUrl
public static MozuUrl getExtraUrl(String attributeFQN, String productCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/Extras/{attributeFQN}?responseFields={responseFields}"); formatter.formatUrl("attributeFQN", attributeFQN); formatter.formatUrl("productCode", productCode); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getExtraUrl(String attributeFQN, String productCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/Extras/{attributeFQN}?responseFields={responseFields}"); formatter.formatUrl("attributeFQN", attributeFQN); formatter.formatUrl("productCode", productCode); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getExtraUrl", "(", "String", "attributeFQN", ",", "String", "productCode", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/products/{productCode}/Extras/{...
Get Resource Url for GetExtra @param attributeFQN Fully qualified name for an attribute. @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", "GetExtra" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductExtraUrl.java#L71-L78
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CouponSetUrl.java
CouponSetUrl.getCouponSetsUrl
public static MozuUrl getCouponSetsUrl(String filter, Boolean includeCounts, Integer pageSize, String responseFields, String sortBy, Integer startIndex) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&includeCounts={includeCounts}&responseFields={responseFields}"); formatter.formatUrl("filter", filter); formatter.formatUrl("includeCounts", includeCounts); 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 getCouponSetsUrl(String filter, Boolean includeCounts, Integer pageSize, String responseFields, String sortBy, Integer startIndex) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&includeCounts={includeCounts}&responseFields={responseFields}"); formatter.formatUrl("filter", filter); formatter.formatUrl("includeCounts", includeCounts); 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", "getCouponSetsUrl", "(", "String", "filter", ",", "Boolean", "includeCounts", ",", "Integer", "pageSize", ",", "String", "responseFields", ",", "String", "sortBy", ",", "Integer", "startIndex", ")", "{", "UrlFormatter", "formatter", ...
Get Resource Url for GetCouponSets @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 includeCounts Specifies whether to include the number of redeemed coupons, existing coupon codes, and assigned discounts in the response body. @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", "GetCouponSets" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CouponSetUrl.java#L26-L36
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CouponSetUrl.java
CouponSetUrl.getCouponSetUrl
public static MozuUrl getCouponSetUrl(String couponSetCode, Boolean includeCounts, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}?includeCounts={includeCounts}&responseFields={responseFields}"); formatter.formatUrl("couponSetCode", couponSetCode); formatter.formatUrl("includeCounts", includeCounts); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getCouponSetUrl(String couponSetCode, Boolean includeCounts, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}?includeCounts={includeCounts}&responseFields={responseFields}"); formatter.formatUrl("couponSetCode", couponSetCode); formatter.formatUrl("includeCounts", includeCounts); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getCouponSetUrl", "(", "String", "couponSetCode", ",", "Boolean", "includeCounts", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/couponsets/{couponSetCo...
Get Resource Url for GetCouponSet @param couponSetCode The unique identifier of the coupon set. @param includeCounts Specifies whether to include the number of redeemed coupons, existing coupon codes, and assigned discounts in the response body. @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", "GetCouponSet" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CouponSetUrl.java#L45-L52
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CouponSetUrl.java
CouponSetUrl.updateCouponSetUrl
public static MozuUrl updateCouponSetUrl(String couponSetCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}?responseFields={responseFields}"); formatter.formatUrl("couponSetCode", couponSetCode); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl updateCouponSetUrl(String couponSetCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}?responseFields={responseFields}"); formatter.formatUrl("couponSetCode", couponSetCode); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "updateCouponSetUrl", "(", "String", "couponSetCode", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/couponsets/{couponSetCode}?responseFields={responseFields}\...
Get Resource Url for UpdateCouponSet @param couponSetCode The unique identifier of the coupon 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. @return String Resource Url
[ "Get", "Resource", "Url", "for", "UpdateCouponSet" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CouponSetUrl.java#L96-L102
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/content/DocumentListUrl.java
DocumentListUrl.updateDocumentListUrl
public static MozuUrl updateDocumentListUrl(String documentListName, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}?responseFields={responseFields}"); formatter.formatUrl("documentListName", documentListName); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl updateDocumentListUrl(String documentListName, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}?responseFields={responseFields}"); formatter.formatUrl("documentListName", documentListName); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "updateDocumentListUrl", "(", "String", "documentListName", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/content/documentlists/{documentListName}?responseFields={responseFields}\"",...
Get Resource Url for UpdateDocumentList @param documentListName Name of content documentListName to delete @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", "UpdateDocumentList" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/content/DocumentListUrl.java#L64-L70
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/content/DocumentListUrl.java
DocumentListUrl.deleteDocumentListUrl
public static MozuUrl deleteDocumentListUrl(String documentListName) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}"); formatter.formatUrl("documentListName", documentListName); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl deleteDocumentListUrl(String documentListName) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}"); formatter.formatUrl("documentListName", documentListName); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "deleteDocumentListUrl", "(", "String", "documentListName", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/content/documentlists/{documentListName}\"", ")", ";", "formatter", ".", "formatUrl", "(", "\"documen...
Get Resource Url for DeleteDocumentList @param documentListName Name of content documentListName to delete @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteDocumentList" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/content/DocumentListUrl.java#L77-L82
train
spotify/ssh-agent-proxy
src/main/java/com/spotify/sshagentproxy/ByteIterator.java
ByteIterator.s2i
private int s2i(final byte[] bytes) { int num = 0; for (int i = 0; i < 4; i++) { num += (bytes[i] & 0xff) << ((3 - i) * 8); } return num; }
java
private int s2i(final byte[] bytes) { int num = 0; for (int i = 0; i < 4; i++) { num += (bytes[i] & 0xff) << ((3 - i) * 8); } return num; }
[ "private", "int", "s2i", "(", "final", "byte", "[", "]", "bytes", ")", "{", "int", "num", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "4", ";", "i", "++", ")", "{", "num", "+=", "(", "bytes", "[", "i", "]", "&", "0xff"...
Read four bytes off the provided byte string and return the value as a big endian 32 bit unsigned integer. @param bytes Array of bytes. @return int
[ "Read", "four", "bytes", "off", "the", "provided", "byte", "string", "and", "return", "the", "value", "as", "a", "big", "endian", "32", "bit", "unsigned", "integer", "." ]
b678792750c0157bd5ed3fb6a18895ff95effbc4
https://github.com/spotify/ssh-agent-proxy/blob/b678792750c0157bd5ed3fb6a18895ff95effbc4/src/main/java/com/spotify/sshagentproxy/ByteIterator.java#L77-L83
train
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/FormData.java
FormData.getFormEntry
public FormEntry getFormEntry(final String entryKey) { FormEntry entry = entries.get(entryKey); if (entry == null) { entry = addFormEntry(entryKey, null); } return entry; }
java
public FormEntry getFormEntry(final String entryKey) { FormEntry entry = entries.get(entryKey); if (entry == null) { entry = addFormEntry(entryKey, null); } return entry; }
[ "public", "FormEntry", "getFormEntry", "(", "final", "String", "entryKey", ")", "{", "FormEntry", "entry", "=", "entries", ".", "get", "(", "entryKey", ")", ";", "if", "(", "entry", "==", "null", ")", "{", "entry", "=", "addFormEntry", "(", "entryKey", "...
Returns the FormEntry for the given key. If no FormEntry exists yet for the given key, then a new one will be generated if generate == true @return the FormEntry for the key
[ "Returns", "the", "FormEntry", "for", "the", "given", "key", ".", "If", "no", "FormEntry", "exists", "yet", "for", "the", "given", "key", "then", "a", "new", "one", "will", "be", "generated", "if", "generate", "==", "true" ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/FormData.java#L228-L234
train
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/FormData.java
FormData.resetValues
private void resetValues(final Constraint constraintContainer) { log.info("Reset " + key + " form data"); for (FormEntry e : entries.values()) { e.resetValue(); } constraintContainer.resetValues(); }
java
private void resetValues(final Constraint constraintContainer) { log.info("Reset " + key + " form data"); for (FormEntry e : entries.values()) { e.resetValue(); } constraintContainer.resetValues(); }
[ "private", "void", "resetValues", "(", "final", "Constraint", "constraintContainer", ")", "{", "log", ".", "info", "(", "\"Reset \"", "+", "key", "+", "\" form data\"", ")", ";", "for", "(", "FormEntry", "e", ":", "entries", ".", "values", "(", ")", ")", ...
Calls the reset-method on all FormEntry-objects and the constraint-container. This resets all FormEntry-values to the standard value, if there is one, and prepares the generator for a new initialization.
[ "Calls", "the", "reset", "-", "method", "on", "all", "FormEntry", "-", "objects", "and", "the", "constraint", "-", "container", ".", "This", "resets", "all", "FormEntry", "-", "values", "to", "the", "standard", "value", "if", "there", "is", "one", "and", ...
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/FormData.java#L272-L278
train
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/EntityListUrl.java
EntityListUrl.deleteEntityListUrl
public static MozuUrl deleteEntityListUrl(String entityListFullName) { UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}"); formatter.formatUrl("entityListFullName", entityListFullName); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl deleteEntityListUrl(String entityListFullName) { UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}"); formatter.formatUrl("entityListFullName", entityListFullName); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "deleteEntityListUrl", "(", "String", "entityListFullName", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/platform/entitylists/{entityListFullName}\"", ")", ";", "formatter", ".", "formatUrl", "(", "\"entity...
Get Resource Url for DeleteEntityList @param entityListFullName The full name of the EntityList including namespace in name@nameSpace format @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteEntityList" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/EntityListUrl.java#L81-L86
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java
VcfReader.header
public static VcfHeader header(final File file) throws IOException { checkNotNull(file); // could also use Files.asCharSource(file, Charsets.UTF_8).openBufferedStream() try (BufferedReader reader = new BufferedReader(new FileReader(file))) { return header(reader); } }
java
public static VcfHeader header(final File file) throws IOException { checkNotNull(file); // could also use Files.asCharSource(file, Charsets.UTF_8).openBufferedStream() try (BufferedReader reader = new BufferedReader(new FileReader(file))) { return header(reader); } }
[ "public", "static", "VcfHeader", "header", "(", "final", "File", "file", ")", "throws", "IOException", "{", "checkNotNull", "(", "file", ")", ";", "// could also use Files.asCharSource(file, Charsets.UTF_8).openBufferedStream()", "try", "(", "BufferedReader", "reader", "=...
Read the VCF header from the specified file. @param file file to read from, must not be null @return the VCF header read from the specified file @throws IOException if an I/O error occurs
[ "Read", "the", "VCF", "header", "from", "the", "specified", "file", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java#L126-L132
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java
VcfReader.header
public static VcfHeader header(final URL url) throws IOException { checkNotNull(url); try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) { return header(reader); } }
java
public static VcfHeader header(final URL url) throws IOException { checkNotNull(url); try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) { return header(reader); } }
[ "public", "static", "VcfHeader", "header", "(", "final", "URL", "url", ")", "throws", "IOException", "{", "checkNotNull", "(", "url", ")", ";", "try", "(", "BufferedReader", "reader", "=", "Resources", ".", "asCharSource", "(", "url", ",", "Charsets", ".", ...
Read the VCF header from the specified URL. @param url URL to read from, must not be null @return the VCF header read from the specified URL @throws IOException if an I/O error occurs
[ "Read", "the", "VCF", "header", "from", "the", "specified", "URL", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java#L141-L146
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java
VcfReader.header
public static VcfHeader header(final InputStream inputStream) throws IOException { checkNotNull(inputStream); try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { return header(reader); } }
java
public static VcfHeader header(final InputStream inputStream) throws IOException { checkNotNull(inputStream); try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { return header(reader); } }
[ "public", "static", "VcfHeader", "header", "(", "final", "InputStream", "inputStream", ")", "throws", "IOException", "{", "checkNotNull", "(", "inputStream", ")", ";", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "InputStreamRe...
Read the VCF header from the specified input stream. @param inputStream input stream to read from, must not be null @return the VCF header read from the specified input stream @throws IOException if an I/O error occurs
[ "Read", "the", "VCF", "header", "from", "the", "specified", "input", "stream", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java#L155-L160
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java
VcfReader.samples
public static Iterable<VcfSample> samples(final File file) throws IOException { checkNotNull(file); try (BufferedReader reader = new BufferedReader(new FileReader(file))) { return samples(reader); } }
java
public static Iterable<VcfSample> samples(final File file) throws IOException { checkNotNull(file); try (BufferedReader reader = new BufferedReader(new FileReader(file))) { return samples(reader); } }
[ "public", "static", "Iterable", "<", "VcfSample", ">", "samples", "(", "final", "File", "file", ")", "throws", "IOException", "{", "checkNotNull", "(", "file", ")", ";", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "FileR...
Read zero or more VCF samples from the specified file. @param file file to read from, must not be null @return zero or more VCF samples read from the specified file @throws IOException if an I/O error occurs
[ "Read", "zero", "or", "more", "VCF", "samples", "from", "the", "specified", "file", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java#L169-L174
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java
VcfReader.samples
public static Iterable<VcfSample> samples(final URL url) throws IOException { checkNotNull(url); try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) { return samples(reader); } }
java
public static Iterable<VcfSample> samples(final URL url) throws IOException { checkNotNull(url); try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) { return samples(reader); } }
[ "public", "static", "Iterable", "<", "VcfSample", ">", "samples", "(", "final", "URL", "url", ")", "throws", "IOException", "{", "checkNotNull", "(", "url", ")", ";", "try", "(", "BufferedReader", "reader", "=", "Resources", ".", "asCharSource", "(", "url", ...
Read zero or more VCF samples from the specified URL. @param url URL to read from, must not be null @return zero or more VCF samples read from the specified URL @throws IOException if an I/O error occurs
[ "Read", "zero", "or", "more", "VCF", "samples", "from", "the", "specified", "URL", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java#L183-L188
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java
VcfReader.samples
public static Iterable<VcfSample> samples(final InputStream inputStream) throws IOException { checkNotNull(inputStream); try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { return samples(reader); } }
java
public static Iterable<VcfSample> samples(final InputStream inputStream) throws IOException { checkNotNull(inputStream); try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { return samples(reader); } }
[ "public", "static", "Iterable", "<", "VcfSample", ">", "samples", "(", "final", "InputStream", "inputStream", ")", "throws", "IOException", "{", "checkNotNull", "(", "inputStream", ")", ";", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "...
Read zero or more VCF samples from the specified input stream. @param inputStream input stream to read from, must not be null @return zero or more VCF samples read from the specified input stream @throws IOException if an I/O error occurs
[ "Read", "zero", "or", "more", "VCF", "samples", "from", "the", "specified", "input", "stream", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java#L197-L202
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java
VcfReader.records
public static Iterable<VcfRecord> records(final File file) throws IOException { checkNotNull(file); try (BufferedReader reader = new BufferedReader(new FileReader(file))) { return records(reader); } }
java
public static Iterable<VcfRecord> records(final File file) throws IOException { checkNotNull(file); try (BufferedReader reader = new BufferedReader(new FileReader(file))) { return records(reader); } }
[ "public", "static", "Iterable", "<", "VcfRecord", ">", "records", "(", "final", "File", "file", ")", "throws", "IOException", "{", "checkNotNull", "(", "file", ")", ";", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "FileR...
Read zero or more VCF records from the specified file. @param file file to read from, must not be null @return zero or more VCF records read from the specified file @throws IOException if an I/O error occurs
[ "Read", "zero", "or", "more", "VCF", "records", "from", "the", "specified", "file", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java#L211-L216
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java
VcfReader.records
public static Iterable<VcfRecord> records(final URL url) throws IOException { checkNotNull(url); try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) { return records(reader); } }
java
public static Iterable<VcfRecord> records(final URL url) throws IOException { checkNotNull(url); try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) { return records(reader); } }
[ "public", "static", "Iterable", "<", "VcfRecord", ">", "records", "(", "final", "URL", "url", ")", "throws", "IOException", "{", "checkNotNull", "(", "url", ")", ";", "try", "(", "BufferedReader", "reader", "=", "Resources", ".", "asCharSource", "(", "url", ...
Read zero or more VCF records from the specified URL. @param url URL to read from, must not be null @return zero or more VCF records read from the specified URL @throws IOException if an I/O error occurs
[ "Read", "zero", "or", "more", "VCF", "records", "from", "the", "specified", "URL", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java#L225-L230
train
nmdp-bioinformatics/ngs
variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java
VcfReader.records
public static Iterable<VcfRecord> records(final InputStream inputStream) throws IOException { checkNotNull(inputStream); try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { return records(reader); } }
java
public static Iterable<VcfRecord> records(final InputStream inputStream) throws IOException { checkNotNull(inputStream); try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { return records(reader); } }
[ "public", "static", "Iterable", "<", "VcfRecord", ">", "records", "(", "final", "InputStream", "inputStream", ")", "throws", "IOException", "{", "checkNotNull", "(", "inputStream", ")", ";", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "...
Read zero or more VCF records from the specified input stream. @param inputStream input stream to read from, must not be null @return zero or more VCF records read from the specified input stream @throws IOException if an I/O error occurs
[ "Read", "zero", "or", "more", "VCF", "records", "from", "the", "specified", "input", "stream", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfReader.java#L239-L244
train
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/GeneratorDataSource.java
GeneratorDataSource.cleanUp
private void cleanUp(final DataSet ds) { Set<String> indexedKeys = Sets.newHashSet(); for (String key : ds.getDataView().keySet()) { // Search for indexed entries if (key.contains("#")) { // Remember key (without index) indexedKeys.add(key.substring(0, key.indexOf("#"))); } } // Remove all indexes for (String indexedKey : indexedKeys) { ds.removeValue(indexedKey); } }
java
private void cleanUp(final DataSet ds) { Set<String> indexedKeys = Sets.newHashSet(); for (String key : ds.getDataView().keySet()) { // Search for indexed entries if (key.contains("#")) { // Remember key (without index) indexedKeys.add(key.substring(0, key.indexOf("#"))); } } // Remove all indexes for (String indexedKey : indexedKeys) { ds.removeValue(indexedKey); } }
[ "private", "void", "cleanUp", "(", "final", "DataSet", "ds", ")", "{", "Set", "<", "String", ">", "indexedKeys", "=", "Sets", ".", "newHashSet", "(", ")", ";", "for", "(", "String", "key", ":", "ds", ".", "getDataView", "(", ")", ".", "keySet", "(", ...
Check DataSet for indexed entries and remove all keys without index if indexed entries with the same name exist.
[ "Check", "DataSet", "for", "indexed", "entries", "and", "remove", "all", "keys", "without", "index", "if", "indexed", "entries", "with", "the", "same", "name", "exist", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/data/GeneratorDataSource.java#L119-L132
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java
CategoryUrl.getChildCategoriesUrl
public static MozuUrl getChildCategoriesUrl(Integer categoryId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/children?responseFields={responseFields}"); formatter.formatUrl("categoryId", categoryId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getChildCategoriesUrl(Integer categoryId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/children?responseFields={responseFields}"); formatter.formatUrl("categoryId", categoryId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getChildCategoriesUrl", "(", "Integer", "categoryId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/categories/{categoryId}/children?responseFields={responseF...
Get Resource Url for GetChildCategories @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", "GetChildCategories" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java#L42-L48
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java
CategoryUrl.addCategoryUrl
public static MozuUrl addCategoryUrl(Boolean incrementSequence, String responseFields, Boolean useProvidedId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/?incrementSequence={incrementSequence}&useProvidedId={useProvidedId}&responseFields={responseFields}"); formatter.formatUrl("incrementSequence", incrementSequence); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("useProvidedId", useProvidedId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl addCategoryUrl(Boolean incrementSequence, String responseFields, Boolean useProvidedId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/?incrementSequence={incrementSequence}&useProvidedId={useProvidedId}&responseFields={responseFields}"); formatter.formatUrl("incrementSequence", incrementSequence); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("useProvidedId", useProvidedId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "addCategoryUrl", "(", "Boolean", "incrementSequence", ",", "String", "responseFields", ",", "Boolean", "useProvidedId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/categories/?increme...
Get Resource Url for AddCategory @param incrementSequence If true, when adding a new product category, set the sequence number of the new category to an increment of one integer greater than the maximum available sequence number across all product categories. If false, set the sequence number to zero. @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 useProvidedId Optional. If , uses the you specify in the request as the category's id. If , generates an for the category regardless if you specify an id in the request.If you specify an id already in use and set this parameter to , returns an error. @return String Resource Url
[ "Get", "Resource", "Url", "for", "AddCategory" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java#L71-L78
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java
CategoryUrl.addProductsToCategoryUrl
public static MozuUrl addProductsToCategoryUrl(Integer categoryId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/add-products"); formatter.formatUrl("categoryId", categoryId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl addProductsToCategoryUrl(Integer categoryId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/add-products"); formatter.formatUrl("categoryId", categoryId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "addProductsToCategoryUrl", "(", "Integer", "categoryId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/categories/{categoryId}/add-products\"", ")", ";", "formatter", ".", "formatUrl", ...
Get Resource Url for AddProductsToCategory @param categoryId Unique identifier of the category to modify. @return String Resource Url
[ "Get", "Resource", "Url", "for", "AddProductsToCategory" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java#L85-L90
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java
CategoryUrl.updateCategoryUrl
public static MozuUrl updateCategoryUrl(Boolean cascadeVisibility, Integer categoryId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}?cascadeVisibility={cascadeVisibility}&responseFields={responseFields}"); formatter.formatUrl("cascadeVisibility", cascadeVisibility); formatter.formatUrl("categoryId", categoryId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl updateCategoryUrl(Boolean cascadeVisibility, Integer categoryId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}?cascadeVisibility={cascadeVisibility}&responseFields={responseFields}"); formatter.formatUrl("cascadeVisibility", cascadeVisibility); formatter.formatUrl("categoryId", categoryId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "updateCategoryUrl", "(", "Boolean", "cascadeVisibility", ",", "Integer", "categoryId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/categories/{categor...
Get Resource Url for UpdateCategory @param cascadeVisibility If true, when changing the display option for the category, change it for all subcategories also. The default value is false. @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", "UpdateCategory" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java#L135-L142
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java
CategoryUrl.deleteCategoryByIdUrl
public static MozuUrl deleteCategoryByIdUrl(Boolean cascadeDelete, Integer categoryId, Boolean forceDelete, Boolean reassignToParent) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/?cascadeDelete={cascadeDelete}&forceDelete={forceDelete}&reassignToParent={reassignToParent}"); formatter.formatUrl("cascadeDelete", cascadeDelete); formatter.formatUrl("categoryId", categoryId); formatter.formatUrl("forceDelete", forceDelete); formatter.formatUrl("reassignToParent", reassignToParent); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl deleteCategoryByIdUrl(Boolean cascadeDelete, Integer categoryId, Boolean forceDelete, Boolean reassignToParent) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/categories/{categoryId}/?cascadeDelete={cascadeDelete}&forceDelete={forceDelete}&reassignToParent={reassignToParent}"); formatter.formatUrl("cascadeDelete", cascadeDelete); formatter.formatUrl("categoryId", categoryId); formatter.formatUrl("forceDelete", forceDelete); formatter.formatUrl("reassignToParent", reassignToParent); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "deleteCategoryByIdUrl", "(", "Boolean", "cascadeDelete", ",", "Integer", "categoryId", ",", "Boolean", "forceDelete", ",", "Boolean", "reassignToParent", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/co...
Get Resource Url for DeleteCategoryById @param cascadeDelete Specifies whether to also delete all subcategories associated with the specified category.If you set this value is false, only the specified category is deleted.The default value is false. @param categoryId Unique identifier of the category to modify. @param forceDelete Specifies whether the category, and any associated subcategories, are deleted even if there are products that reference them. The default value is false. @param reassignToParent Specifies whether any subcategories of the specified category are reassigned to the parent of the specified category.This field only applies if the cascadeDelete parameter is false.The default value is false. @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteCategoryById" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CategoryUrl.java#L152-L160
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/event/push/subscriptions/EventDeliverySummaryUrl.java
EventDeliverySummaryUrl.getDeliveryAttemptSummaryUrl
public static MozuUrl getDeliveryAttemptSummaryUrl(Integer processId, String responseFields, String subscriptionId) { UrlFormatter formatter = new UrlFormatter("/api/event/push/subscriptions/{subscriptionId}/deliveryattempts/{id}?responseFields={responseFields}"); formatter.formatUrl("processId", processId); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("subscriptionId", subscriptionId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getDeliveryAttemptSummaryUrl(Integer processId, String responseFields, String subscriptionId) { UrlFormatter formatter = new UrlFormatter("/api/event/push/subscriptions/{subscriptionId}/deliveryattempts/{id}?responseFields={responseFields}"); formatter.formatUrl("processId", processId); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("subscriptionId", subscriptionId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getDeliveryAttemptSummaryUrl", "(", "Integer", "processId", ",", "String", "responseFields", ",", "String", "subscriptionId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/event/push/subscriptions/{subscripti...
Get Resource Url for GetDeliveryAttemptSummary @param processId @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 subscriptionId Unique identifier for a subscription, such as subscribing tenants for an event or to receive a notification. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetDeliveryAttemptSummary" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/event/push/subscriptions/EventDeliverySummaryUrl.java#L23-L30
train
nmdp-bioinformatics/ngs
hml/src/main/java/org/nmdp/ngs/hml/HmlWriter.java
HmlWriter.write
public static void write(final Hml data, final Writer writer) throws IOException { checkNotNull(data); checkNotNull(writer); try { JAXBContext context = JAXBContext.newInstance(Hml.class); Marshaller marshaller = context.createMarshaller(); SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); URL schemaURL = HmlReader.class.getResource("/org/nmdp/ngs/hml/xsd/hml-1.0.1.xsd"); Schema schema = schemaFactory.newSchema(schemaURL); marshaller.setSchema(schema); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.marshal(data, writer); } catch (JAXBException | SAXException e) { e.printStackTrace(); throw new IOException("could not marshal HML", e); } }
java
public static void write(final Hml data, final Writer writer) throws IOException { checkNotNull(data); checkNotNull(writer); try { JAXBContext context = JAXBContext.newInstance(Hml.class); Marshaller marshaller = context.createMarshaller(); SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); URL schemaURL = HmlReader.class.getResource("/org/nmdp/ngs/hml/xsd/hml-1.0.1.xsd"); Schema schema = schemaFactory.newSchema(schemaURL); marshaller.setSchema(schema); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.marshal(data, writer); } catch (JAXBException | SAXException e) { e.printStackTrace(); throw new IOException("could not marshal HML", e); } }
[ "public", "static", "void", "write", "(", "final", "Hml", "data", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "checkNotNull", "(", "data", ")", ";", "checkNotNull", "(", "writer", ")", ";", "try", "{", "JAXBContext", "context", "="...
Write the specified HML to the specified writer. @param data HML to write, must not be null @param writer writer to write to, must not be null @throws IOException if an I/O error occurs
[ "Write", "the", "specified", "HML", "to", "the", "specified", "writer", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlWriter.java#L70-L88
train
nmdp-bioinformatics/ngs
hml/src/main/java/org/nmdp/ngs/hml/HmlWriter.java
HmlWriter.write
public static void write(final Hml data, final File file) throws IOException { checkNotNull(data); checkNotNull(file); try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) { write(data, writer); } }
java
public static void write(final Hml data, final File file) throws IOException { checkNotNull(data); checkNotNull(file); try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) { write(data, writer); } }
[ "public", "static", "void", "write", "(", "final", "Hml", "data", ",", "final", "File", "file", ")", "throws", "IOException", "{", "checkNotNull", "(", "data", ")", ";", "checkNotNull", "(", "file", ")", ";", "try", "(", "BufferedWriter", "writer", "=", ...
Write the specified HML to the specified file. @param data HML to write, must not be null @param file file to write to, must not be null @throws IOException if an I/O error occurs
[ "Write", "the", "specified", "HML", "to", "the", "specified", "file", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlWriter.java#L97-L103
train
nmdp-bioinformatics/ngs
hml/src/main/java/org/nmdp/ngs/hml/HmlWriter.java
HmlWriter.write
public static void write(final Hml data, final OutputStream outputStream) throws IOException { checkNotNull(data); checkNotNull(outputStream); try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(outputStream))) { write(data, writer); } }
java
public static void write(final Hml data, final OutputStream outputStream) throws IOException { checkNotNull(data); checkNotNull(outputStream); try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(outputStream))) { write(data, writer); } }
[ "public", "static", "void", "write", "(", "final", "Hml", "data", ",", "final", "OutputStream", "outputStream", ")", "throws", "IOException", "{", "checkNotNull", "(", "data", ")", ";", "checkNotNull", "(", "outputStream", ")", ";", "try", "(", "BufferedWriter...
Write the specified HML to the specified output stream. @param data HML to write, must not be null @param outputStream output stream to write to, must not be null @throws IOException if an I/O error occurs
[ "Write", "the", "specified", "HML", "to", "the", "specified", "output", "stream", "." ]
277627e4311313a80f5dc110b3185b0d7af32bd0
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlWriter.java#L112-L118
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CurrencyLocalizationUrl.java
CurrencyLocalizationUrl.getCurrencyExchangeRateUrl
public static MozuUrl getCurrencyExchangeRateUrl(String currencyCode, String responseFields, String toCurrencyCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/currency/{currencyCode}/exchangerates/{toCurrencyCode}?responseFields={responseFields}"); formatter.formatUrl("currencyCode", currencyCode); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("toCurrencyCode", toCurrencyCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl getCurrencyExchangeRateUrl(String currencyCode, String responseFields, String toCurrencyCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/currency/{currencyCode}/exchangerates/{toCurrencyCode}?responseFields={responseFields}"); formatter.formatUrl("currencyCode", currencyCode); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("toCurrencyCode", toCurrencyCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "getCurrencyExchangeRateUrl", "(", "String", "currencyCode", ",", "String", "responseFields", ",", "String", "toCurrencyCode", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/currency/{cur...
Get Resource Url for GetCurrencyExchangeRate @param currencyCode The three character ISO currency code, such as USD for US Dollars. @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 toCurrencyCode @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetCurrencyExchangeRate" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CurrencyLocalizationUrl.java#L35-L42
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CurrencyLocalizationUrl.java
CurrencyLocalizationUrl.updateCurrencyLocalizationUrl
public static MozuUrl updateCurrencyLocalizationUrl(String currencyCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/currency/{currencyCode}?responseFields={responseFields}"); formatter.formatUrl("currencyCode", currencyCode); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl updateCurrencyLocalizationUrl(String currencyCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/currency/{currencyCode}?responseFields={responseFields}"); formatter.formatUrl("currencyCode", currencyCode); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "updateCurrencyLocalizationUrl", "(", "String", "currencyCode", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/currency/{currencyCode}?responseFields={responseF...
Get Resource Url for UpdateCurrencyLocalization @param currencyCode The three character ISO currency code, such as USD for US Dollars. @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", "UpdateCurrencyLocalization" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CurrencyLocalizationUrl.java#L114-L120
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CurrencyLocalizationUrl.java
CurrencyLocalizationUrl.deleteCurrencyLocalizationUrl
public static MozuUrl deleteCurrencyLocalizationUrl(String currencyCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/currency/{currencyCode}"); formatter.formatUrl("currencyCode", currencyCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl deleteCurrencyLocalizationUrl(String currencyCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/currency/{currencyCode}"); formatter.formatUrl("currencyCode", currencyCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "deleteCurrencyLocalizationUrl", "(", "String", "currencyCode", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/currency/{currencyCode}\"", ")", ";", "formatter", ".", "formatUrl", "(", ...
Get Resource Url for DeleteCurrencyLocalization @param currencyCode The three character ISO currency code, such as USD for US Dollars. @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteCurrencyLocalization" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CurrencyLocalizationUrl.java#L127-L132
train
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CurrencyLocalizationUrl.java
CurrencyLocalizationUrl.deleteCurrencyExchangeRateUrl
public static MozuUrl deleteCurrencyExchangeRateUrl(String currencyCode, String toCurrencyCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/currency/{currencyCode}/exchangerates/{toCurrencyCode}"); formatter.formatUrl("currencyCode", currencyCode); formatter.formatUrl("toCurrencyCode", toCurrencyCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl deleteCurrencyExchangeRateUrl(String currencyCode, String toCurrencyCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/currency/{currencyCode}/exchangerates/{toCurrencyCode}"); formatter.formatUrl("currencyCode", currencyCode); formatter.formatUrl("toCurrencyCode", toCurrencyCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "deleteCurrencyExchangeRateUrl", "(", "String", "currencyCode", ",", "String", "toCurrencyCode", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/currency/{currencyCode}/exchangerates/{toCurrency...
Get Resource Url for DeleteCurrencyExchangeRate @param currencyCode The three character ISO currency code, such as USD for US Dollars. @param toCurrencyCode @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteCurrencyExchangeRate" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/CurrencyLocalizationUrl.java#L140-L146
train
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java
MailAccountManager.reserveMailAccount
public MailAccount reserveMailAccount(final String accountReservationKey, final String pool) { if (pool == null && emailAddressPools.keySet().size() > 1) { throw new IllegalStateException("No pool specified but multiple pools available."); } String poolKey = pool == null ? defaultPool : pool; List<MailAccount> addressPool = newArrayList(emailAddressPools.get(poolKey)); Collections.shuffle(addressPool, random.getRandom()); return reserveAvailableMailAccount(accountReservationKey, addressPool); }
java
public MailAccount reserveMailAccount(final String accountReservationKey, final String pool) { if (pool == null && emailAddressPools.keySet().size() > 1) { throw new IllegalStateException("No pool specified but multiple pools available."); } String poolKey = pool == null ? defaultPool : pool; List<MailAccount> addressPool = newArrayList(emailAddressPools.get(poolKey)); Collections.shuffle(addressPool, random.getRandom()); return reserveAvailableMailAccount(accountReservationKey, addressPool); }
[ "public", "MailAccount", "reserveMailAccount", "(", "final", "String", "accountReservationKey", ",", "final", "String", "pool", ")", "{", "if", "(", "pool", "==", "null", "&&", "emailAddressPools", ".", "keySet", "(", ")", ".", "size", "(", ")", ">", "1", ...
Reserves an available mail account from the specified pool under the specified reservation key. The method blocks until an account is available. @param pool the mail address pool to reserve an account from @param accountReservationKey the key under which to reserve the account @return the reserved mail account
[ "Reserves", "an", "available", "mail", "account", "from", "the", "specified", "pool", "under", "the", "specified", "reservation", "key", ".", "The", "method", "blocks", "until", "an", "account", "is", "available", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java#L177-L187
train
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java
MailAccountManager.lookupUsedMailAccountForCurrentThread
public MailAccount lookupUsedMailAccountForCurrentThread(final String accountReservationKey) { lock.lock(); try { Map<MailAccount, ThreadReservationKeyWrapper> usedAccountsForThread = filterValues(usedAccounts, new CurrentThreadWrapperPredicate()); if (!usedAccountsForThread.isEmpty()) { for (Entry<MailAccount, ThreadReservationKeyWrapper> entry : usedAccountsForThread.entrySet()) { if (entry.getValue().accountReservationKey.equals(accountReservationKey)) { return entry.getKey(); } } } return null; } finally { lock.unlock(); } }
java
public MailAccount lookupUsedMailAccountForCurrentThread(final String accountReservationKey) { lock.lock(); try { Map<MailAccount, ThreadReservationKeyWrapper> usedAccountsForThread = filterValues(usedAccounts, new CurrentThreadWrapperPredicate()); if (!usedAccountsForThread.isEmpty()) { for (Entry<MailAccount, ThreadReservationKeyWrapper> entry : usedAccountsForThread.entrySet()) { if (entry.getValue().accountReservationKey.equals(accountReservationKey)) { return entry.getKey(); } } } return null; } finally { lock.unlock(); } }
[ "public", "MailAccount", "lookupUsedMailAccountForCurrentThread", "(", "final", "String", "accountReservationKey", ")", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "Map", "<", "MailAccount", ",", "ThreadReservationKeyWrapper", ">", "usedAccountsForThread", "=...
Looks up the mail account that is reserved for the current thread under the specified key. @param accountReservationKey the reservation key @return the reserved account, or {@code null} if none is found
[ "Looks", "up", "the", "mail", "account", "that", "is", "reserved", "for", "the", "current", "thread", "under", "the", "specified", "key", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java#L282-L298
train
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java
MailAccountManager.getReservedMailAccountsForCurrentThread
public Set<MailAccount> getReservedMailAccountsForCurrentThread() { lock.lock(); try { Map<MailAccount, ThreadReservationKeyWrapper> accountsForThread = filterValues(usedAccounts, new CurrentThreadWrapperPredicate()); return ImmutableSet.copyOf(accountsForThread.keySet()); } finally { lock.unlock(); } }
java
public Set<MailAccount> getReservedMailAccountsForCurrentThread() { lock.lock(); try { Map<MailAccount, ThreadReservationKeyWrapper> accountsForThread = filterValues(usedAccounts, new CurrentThreadWrapperPredicate()); return ImmutableSet.copyOf(accountsForThread.keySet()); } finally { lock.unlock(); } }
[ "public", "Set", "<", "MailAccount", ">", "getReservedMailAccountsForCurrentThread", "(", ")", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "Map", "<", "MailAccount", ",", "ThreadReservationKeyWrapper", ">", "accountsForThread", "=", "filterValues", "(", ...
Gets the set of reserved mail accounts for the current thread. @return the set of reserved mail accounts
[ "Gets", "the", "set", "of", "reserved", "mail", "accounts", "for", "the", "current", "thread", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java#L314-L322
train
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java
MailAccountManager.getRegisteredAccountReservationKeysForCurrentThread
public Set<String> getRegisteredAccountReservationKeysForCurrentThread() { lock.lock(); try { Map<MailAccount, String> accountsForThread = transformValues(filterValues(usedAccounts, new CurrentThreadWrapperPredicate()), new Function<ThreadReservationKeyWrapper, String>() { @Override public String apply(final ThreadReservationKeyWrapper input) { return input.accountReservationKey; } } ); return ImmutableSet.copyOf(accountsForThread.values()); } finally { lock.unlock(); } }
java
public Set<String> getRegisteredAccountReservationKeysForCurrentThread() { lock.lock(); try { Map<MailAccount, String> accountsForThread = transformValues(filterValues(usedAccounts, new CurrentThreadWrapperPredicate()), new Function<ThreadReservationKeyWrapper, String>() { @Override public String apply(final ThreadReservationKeyWrapper input) { return input.accountReservationKey; } } ); return ImmutableSet.copyOf(accountsForThread.values()); } finally { lock.unlock(); } }
[ "public", "Set", "<", "String", ">", "getRegisteredAccountReservationKeysForCurrentThread", "(", ")", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "Map", "<", "MailAccount", ",", "String", ">", "accountsForThread", "=", "transformValues", "(", "filterVal...
Gets the set of reservation key under which accounts are reserved for the current thread. @return the set of reservation keys
[ "Gets", "the", "set", "of", "reservation", "key", "under", "which", "accounts", "are", "reserved", "for", "the", "current", "thread", "." ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java#L329-L345
train
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java
MailAccountManager.releaseAllMailAccountsForThread
public void releaseAllMailAccountsForThread() { log.info("Releasing all mail accounts for the current thread..."); lock.lock(); try { for (Iterator<Entry<MailAccount, ThreadReservationKeyWrapper>> it = usedAccounts.entrySet().iterator(); it.hasNext(); ) { ThreadReservationKeyWrapper wrapper = it.next().getValue(); if (wrapper.thread == Thread.currentThread()) { it.remove(); } } condition.signalAll(); } finally { lock.unlock(); } }
java
public void releaseAllMailAccountsForThread() { log.info("Releasing all mail accounts for the current thread..."); lock.lock(); try { for (Iterator<Entry<MailAccount, ThreadReservationKeyWrapper>> it = usedAccounts.entrySet().iterator(); it.hasNext(); ) { ThreadReservationKeyWrapper wrapper = it.next().getValue(); if (wrapper.thread == Thread.currentThread()) { it.remove(); } } condition.signalAll(); } finally { lock.unlock(); } }
[ "public", "void", "releaseAllMailAccountsForThread", "(", ")", "{", "log", ".", "info", "(", "\"Releasing all mail accounts for the current thread...\"", ")", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "for", "(", "Iterator", "<", "Entry", "<", "MailAc...
Releases all reserved mail accounts for the current thread so they can be reused by other threads. Threads blocking on an attempt to reserved an account are notified.
[ "Releases", "all", "reserved", "mail", "accounts", "for", "the", "current", "thread", "so", "they", "can", "be", "reused", "by", "other", "threads", ".", "Threads", "blocking", "on", "an", "attempt", "to", "reserved", "an", "account", "are", "notified", "." ...
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java#L362-L376
train
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java
MailAccountManager.releaseMailAccountForThread
public void releaseMailAccountForThread(final MailAccount account) { log.info("Releasing mail account for the current thread: {}", account); lock.lock(); try { ThreadReservationKeyWrapper wrapper = usedAccounts.get(account); if (wrapper != null) { if (wrapper.thread == Thread.currentThread()) { log.debug("Releasing mail account: {}", account); usedAccounts.remove(account); condition.signalAll(); } else { log.warn("Cannot release a mail account reserved by a different thread: {}", account); } } } finally { lock.unlock(); } }
java
public void releaseMailAccountForThread(final MailAccount account) { log.info("Releasing mail account for the current thread: {}", account); lock.lock(); try { ThreadReservationKeyWrapper wrapper = usedAccounts.get(account); if (wrapper != null) { if (wrapper.thread == Thread.currentThread()) { log.debug("Releasing mail account: {}", account); usedAccounts.remove(account); condition.signalAll(); } else { log.warn("Cannot release a mail account reserved by a different thread: {}", account); } } } finally { lock.unlock(); } }
[ "public", "void", "releaseMailAccountForThread", "(", "final", "MailAccount", "account", ")", "{", "log", ".", "info", "(", "\"Releasing mail account for the current thread: {}\"", ",", "account", ")", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "ThreadRe...
Releases the specified mail account for the current thread so it can be reused by another threads. Threads blocking on an attempt to reserved an account are notified. @param account the account to release
[ "Releases", "the", "specified", "mail", "account", "for", "the", "current", "thread", "so", "it", "can", "be", "reused", "by", "another", "threads", ".", "Threads", "blocking", "on", "an", "attempt", "to", "reserved", "an", "account", "are", "notified", "." ...
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccountManager.java#L385-L402
train