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
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/errors/AuthenticationError.java
AuthenticationError.getMessage
public String getMessage(Context context) { if (customMessage != null) { return customMessage; } return context.getResources().getString(message); }
java
public String getMessage(Context context) { if (customMessage != null) { return customMessage; } return context.getResources().getString(message); }
[ "public", "String", "getMessage", "(", "Context", "context", ")", "{", "if", "(", "customMessage", "!=", "null", ")", "{", "return", "customMessage", ";", "}", "return", "context", ".", "getResources", "(", ")", ".", "getString", "(", "message", ")", ";", ...
Getter for the error message. @param context a valid context. @return the user friendly message
[ "Getter", "for", "the", "error", "message", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/errors/AuthenticationError.java#L52-L57
train
auth0/Lock.Android
app/src/main/java/com/auth0/android/lock/app/DemoActivity.java
DemoActivity.showResult
@SuppressWarnings("ConstantConditions") private void showResult(String message) { Snackbar.make(rootLayout, message, Snackbar.LENGTH_LONG).show(); }
java
@SuppressWarnings("ConstantConditions") private void showResult(String message) { Snackbar.make(rootLayout, message, Snackbar.LENGTH_LONG).show(); }
[ "@", "SuppressWarnings", "(", "\"ConstantConditions\"", ")", "private", "void", "showResult", "(", "String", "message", ")", "{", "Snackbar", ".", "make", "(", "rootLayout", ",", "message", ",", "Snackbar", ".", "LENGTH_LONG", ")", ".", "show", "(", ")", ";"...
Shows a Snackbar on the bottom of the layout @param message the text to show.
[ "Shows", "a", "Snackbar", "on", "the", "bottom", "of", "the", "layout" ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/app/src/main/java/com/auth0/android/lock/app/DemoActivity.java#L281-L284
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/ViewUtils.java
ViewUtils.dipToPixels
static float dipToPixels(Resources resources, int dip) { return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dip, resources.getDisplayMetrics()); }
java
static float dipToPixels(Resources resources, int dip) { return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dip, resources.getDisplayMetrics()); }
[ "static", "float", "dipToPixels", "(", "Resources", "resources", ",", "int", "dip", ")", "{", "return", "TypedValue", ".", "applyDimension", "(", "TypedValue", ".", "COMPLEX_UNIT_DIP", ",", "dip", ",", "resources", ".", "getDisplayMetrics", "(", ")", ")", ";",...
Converts dp into px. @param resources the context's current resources. @param dip the dp value to convert to px. @return the result px value.
[ "Converts", "dp", "into", "px", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/ViewUtils.java#L75-L77
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/AuthenticationCallback.java
AuthenticationCallback.parseAuthentication
private void parseAuthentication(Intent data) { String idToken = data.getStringExtra(Constants.ID_TOKEN_EXTRA); String accessToken = data.getStringExtra(Constants.ACCESS_TOKEN_EXTRA); String tokenType = data.getStringExtra(Constants.TOKEN_TYPE_EXTRA); String refreshToken = data.getString...
java
private void parseAuthentication(Intent data) { String idToken = data.getStringExtra(Constants.ID_TOKEN_EXTRA); String accessToken = data.getStringExtra(Constants.ACCESS_TOKEN_EXTRA); String tokenType = data.getStringExtra(Constants.TOKEN_TYPE_EXTRA); String refreshToken = data.getString...
[ "private", "void", "parseAuthentication", "(", "Intent", "data", ")", "{", "String", "idToken", "=", "data", ".", "getStringExtra", "(", "Constants", ".", "ID_TOKEN_EXTRA", ")", ";", "String", "accessToken", "=", "data", ".", "getStringExtra", "(", "Constants", ...
Extracts the Authentication data from the intent data. @param data the intent received at the end of the login process.
[ "Extracts", "the", "Authentication", "data", "from", "the", "intent", "data", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/AuthenticationCallback.java#L73-L83
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/events/PasswordlessLoginEvent.java
PasswordlessLoginEvent.getCodeRequest
public ParameterizableRequest<Void, AuthenticationException> getCodeRequest(AuthenticationAPIClient apiClient, String connectionName) { Log.d(TAG, String.format("Generating Passwordless Code/Link request for connection %s", connectionName)); ParameterizableRequest<Void, AuthenticationException> request;...
java
public ParameterizableRequest<Void, AuthenticationException> getCodeRequest(AuthenticationAPIClient apiClient, String connectionName) { Log.d(TAG, String.format("Generating Passwordless Code/Link request for connection %s", connectionName)); ParameterizableRequest<Void, AuthenticationException> request;...
[ "public", "ParameterizableRequest", "<", "Void", ",", "AuthenticationException", ">", "getCodeRequest", "(", "AuthenticationAPIClient", "apiClient", ",", "String", "connectionName", ")", "{", "Log", ".", "d", "(", "TAG", ",", "String", ".", "format", "(", "\"Gener...
Creates the ParameterizableRequest that will initiate the Passwordless Authentication flow. @param apiClient the API Client instance @param connectionName the name of the passwordless connection to request the login with. Only 'sms' and 'email' connections are allowed here. @return the Passwordless code request r...
[ "Creates", "the", "ParameterizableRequest", "that", "will", "initiate", "the", "Passwordless", "Authentication", "flow", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/events/PasswordlessLoginEvent.java#L96-L109
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/events/PasswordlessLoginEvent.java
PasswordlessLoginEvent.getLoginRequest
public AuthenticationRequest getLoginRequest(AuthenticationAPIClient apiClient, String emailOrNumber) { Log.d(TAG, String.format("Generating Passwordless Login request for identity %s", emailOrNumber)); if (getMode() == PasswordlessMode.EMAIL_CODE || getMode() == PasswordlessMode.EMAIL_LINK) { ...
java
public AuthenticationRequest getLoginRequest(AuthenticationAPIClient apiClient, String emailOrNumber) { Log.d(TAG, String.format("Generating Passwordless Login request for identity %s", emailOrNumber)); if (getMode() == PasswordlessMode.EMAIL_CODE || getMode() == PasswordlessMode.EMAIL_LINK) { ...
[ "public", "AuthenticationRequest", "getLoginRequest", "(", "AuthenticationAPIClient", "apiClient", ",", "String", "emailOrNumber", ")", "{", "Log", ".", "d", "(", "TAG", ",", "String", ".", "format", "(", "\"Generating Passwordless Login request for identity %s\"", ",", ...
Creates the AuthenticationRequest that will finish the Passwordless Authentication flow. @param apiClient the API Client instance @param emailOrNumber the email or phone number used on the code request. @return the Passwordless login request.
[ "Creates", "the", "AuthenticationRequest", "that", "will", "finish", "the", "Passwordless", "Authentication", "flow", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/events/PasswordlessLoginEvent.java#L118-L125
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/PasswordStrengthView.java
PasswordStrengthView.isValid
public boolean isValid(String password) { if (password == null) { return false; } boolean length = hasMinimumLength(password, getMinimumLength()); boolean other = true; switch (complexity.getPasswordPolicy()) { case PasswordStrength.EXCELLENT: ...
java
public boolean isValid(String password) { if (password == null) { return false; } boolean length = hasMinimumLength(password, getMinimumLength()); boolean other = true; switch (complexity.getPasswordPolicy()) { case PasswordStrength.EXCELLENT: ...
[ "public", "boolean", "isValid", "(", "String", "password", ")", "{", "if", "(", "password", "==", "null", ")", "{", "return", "false", ";", "}", "boolean", "length", "=", "hasMinimumLength", "(", "password", ",", "getMinimumLength", "(", ")", ")", ";", "...
Checks that all the requirements are meet. @param password the current password to validate @return whether the given password complies with this password policy or not.
[ "Checks", "that", "all", "the", "requirements", "are", "meet", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/PasswordStrengthView.java#L210-L232
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/ClassicLockView.java
ClassicLockView.showProgress
public void showProgress(boolean show) { if (actionButton != null) { actionButton.showProgress(show); } if (formLayout != null) { formLayout.setEnabled(!show); } }
java
public void showProgress(boolean show) { if (actionButton != null) { actionButton.showProgress(show); } if (formLayout != null) { formLayout.setEnabled(!show); } }
[ "public", "void", "showProgress", "(", "boolean", "show", ")", "{", "if", "(", "actionButton", "!=", "null", ")", "{", "actionButton", ".", "showProgress", "(", "show", ")", ";", "}", "if", "(", "formLayout", "!=", "null", ")", "{", "formLayout", ".", ...
Displays a progress bar on top of the action button. This will also enable or disable the action button. @param show whether to show or hide the action bar.
[ "Displays", "a", "progress", "bar", "on", "top", "of", "the", "action", "button", ".", "This", "will", "also", "enable", "or", "disable", "the", "action", "button", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/ClassicLockView.java#L294-L301
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/ActionButton.java
ActionButton.showProgress
public void showProgress(boolean show) { Log.v(TAG, show ? "Disabling the button while showing progress" : "Enabling the button and hiding progress"); setEnabled(!show); progress.setVisibility(show ? VISIBLE : GONE); if (show) { icon.setVisibility(INVISIBLE); labe...
java
public void showProgress(boolean show) { Log.v(TAG, show ? "Disabling the button while showing progress" : "Enabling the button and hiding progress"); setEnabled(!show); progress.setVisibility(show ? VISIBLE : GONE); if (show) { icon.setVisibility(INVISIBLE); labe...
[ "public", "void", "showProgress", "(", "boolean", "show", ")", "{", "Log", ".", "v", "(", "TAG", ",", "show", "?", "\"Disabling the button while showing progress\"", ":", "\"Enabling the button and hiding progress\"", ")", ";", "setEnabled", "(", "!", "show", ")", ...
Used to display a progress bar and disable the button. @param show whether to show the progress bar or not.
[ "Used", "to", "display", "a", "progress", "bar", "and", "disable", "the", "button", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/ActionButton.java#L109-L120
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/ActionButton.java
ActionButton.showLabel
public void showLabel(boolean showLabel) { shouldShowLabel = showLabel; labeledLayout.setVisibility(showLabel ? VISIBLE : GONE); icon.setVisibility(!showLabel ? VISIBLE : GONE); }
java
public void showLabel(boolean showLabel) { shouldShowLabel = showLabel; labeledLayout.setVisibility(showLabel ? VISIBLE : GONE); icon.setVisibility(!showLabel ? VISIBLE : GONE); }
[ "public", "void", "showLabel", "(", "boolean", "showLabel", ")", "{", "shouldShowLabel", "=", "showLabel", ";", "labeledLayout", ".", "setVisibility", "(", "showLabel", "?", "VISIBLE", ":", "GONE", ")", ";", "icon", ".", "setVisibility", "(", "!", "showLabel",...
Whether to show an icon or a label with the current selected mode. By default, it will show the icon. @param showLabel whether to show an icon or a label.
[ "Whether", "to", "show", "an", "icon", "or", "a", "label", "with", "the", "current", "selected", "mode", ".", "By", "default", "it", "will", "show", "the", "icon", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/ActionButton.java#L137-L141
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/PasswordlessFormLayout.java
PasswordlessFormLayout.codeSent
public void codeSent(String emailOrNumber) { Log.d(TAG, "Now showing the Code Input Form"); if (passwordlessRequestCodeLayout != null) { removeView(passwordlessRequestCodeLayout); if (socialLayout != null) { socialLayout.setVisibility(GONE); } ...
java
public void codeSent(String emailOrNumber) { Log.d(TAG, "Now showing the Code Input Form"); if (passwordlessRequestCodeLayout != null) { removeView(passwordlessRequestCodeLayout); if (socialLayout != null) { socialLayout.setVisibility(GONE); } ...
[ "public", "void", "codeSent", "(", "String", "emailOrNumber", ")", "{", "Log", ".", "d", "(", "TAG", ",", "\"Now showing the Code Input Form\"", ")", ";", "if", "(", "passwordlessRequestCodeLayout", "!=", "null", ")", "{", "removeView", "(", "passwordlessRequestCo...
Notifies the form that the code was correctly sent and it should now wait for the user to input the valid code. @param emailOrNumber the email or phone number to which the code was sent.
[ "Notifies", "the", "form", "that", "the", "code", "was", "correctly", "sent", "and", "it", "should", "now", "wait", "for", "the", "user", "to", "input", "the", "valid", "code", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/PasswordlessFormLayout.java#L156-L169
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/WebProvider.java
WebProvider.resume
public boolean resume(int requestCode, int resultCode, Intent intent) { return WebAuthProvider.resume(requestCode, resultCode, intent); }
java
public boolean resume(int requestCode, int resultCode, Intent intent) { return WebAuthProvider.resume(requestCode, resultCode, intent); }
[ "public", "boolean", "resume", "(", "int", "requestCode", ",", "int", "resultCode", ",", "Intent", "intent", ")", "{", "return", "WebAuthProvider", ".", "resume", "(", "requestCode", ",", "resultCode", ",", "intent", ")", ";", "}" ]
Finishes the authentication flow in the WebAuthProvider @param requestCode the request code received on the onActivityResult method @param resultCode the result code received on the onActivityResult method @param intent the intent received in the onActivityResult method. @return true if a result was expected and...
[ "Finishes", "the", "authentication", "flow", "in", "the", "WebAuthProvider" ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/WebProvider.java#L92-L94
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/ValidatedInputView.java
ValidatedInputView.updateBorder
@CallSuper protected void updateBorder() { boolean isFocused = input.hasFocus() && !input.isInTouchMode(); ViewUtils.setBackground(outline, hasValidInput ? (isFocused ? focusedOutlineBackground : normalOutlineBackground) : errorOutlineBackground); errorDescription.setVisibility(hasValidInput...
java
@CallSuper protected void updateBorder() { boolean isFocused = input.hasFocus() && !input.isInTouchMode(); ViewUtils.setBackground(outline, hasValidInput ? (isFocused ? focusedOutlineBackground : normalOutlineBackground) : errorOutlineBackground); errorDescription.setVisibility(hasValidInput...
[ "@", "CallSuper", "protected", "void", "updateBorder", "(", ")", "{", "boolean", "isFocused", "=", "input", ".", "hasFocus", "(", ")", "&&", "!", "input", ".", "isInTouchMode", "(", ")", ";", "ViewUtils", ".", "setBackground", "(", "outline", ",", "hasVali...
Updates the view knowing if the input is valid or not.
[ "Updates", "the", "view", "knowing", "if", "the", "input", "is", "valid", "or", "not", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/ValidatedInputView.java#L314-L320
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/ValidatedInputView.java
ValidatedInputView.validate
protected boolean validate(boolean validateEmptyFields) { boolean isValid = false; String value = dataType == PASSWORD ? getText() : getText().trim(); if (!validateEmptyFields && value.isEmpty()) { return true; } switch (dataType) { case TEXT_NAME: ...
java
protected boolean validate(boolean validateEmptyFields) { boolean isValid = false; String value = dataType == PASSWORD ? getText() : getText().trim(); if (!validateEmptyFields && value.isEmpty()) { return true; } switch (dataType) { case TEXT_NAME: ...
[ "protected", "boolean", "validate", "(", "boolean", "validateEmptyFields", ")", "{", "boolean", "isValid", "=", "false", ";", "String", "value", "=", "dataType", "==", "PASSWORD", "?", "getText", "(", ")", ":", "getText", "(", ")", ".", "trim", "(", ")", ...
Validates the input data and updates the icon. DataType must be set. @param validateEmptyFields if an empty input should be considered invalid. @return whether the data is valid or not.
[ "Validates", "the", "input", "data", "and", "updates", "the", "icon", ".", "DataType", "must", "be", "set", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/ValidatedInputView.java#L370-L406
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/ValidatedInputView.java
ValidatedInputView.setText
public void setText(String text) { input.setText(""); if (text != null) { input.append(text); } }
java
public void setText(String text) { input.setText(""); if (text != null) { input.append(text); } }
[ "public", "void", "setText", "(", "String", "text", ")", "{", "input", ".", "setText", "(", "\"\"", ")", ";", "if", "(", "text", "!=", "null", ")", "{", "input", ".", "append", "(", "text", ")", ";", "}", "}" ]
Updates the input field text. @param text the new text to set.
[ "Updates", "the", "input", "field", "text", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/ValidatedInputView.java#L422-L427
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/ValidatedInputView.java
ValidatedInputView.clearInput
public void clearInput() { Log.v(TAG, "Input cleared and validation errors removed"); input.setText(""); hasValidInput = true; updateBorder(); showPasswordToggle.setChecked(false); }
java
public void clearInput() { Log.v(TAG, "Input cleared and validation errors removed"); input.setText(""); hasValidInput = true; updateBorder(); showPasswordToggle.setChecked(false); }
[ "public", "void", "clearInput", "(", ")", "{", "Log", ".", "v", "(", "TAG", ",", "\"Input cleared and validation errors removed\"", ")", ";", "input", ".", "setText", "(", "\"\"", ")", ";", "hasValidInput", "=", "true", ";", "updateBorder", "(", ")", ";", ...
Removes any text present on the input field and clears any validation error, if present.
[ "Removes", "any", "text", "present", "on", "the", "input", "field", "and", "clears", "any", "validation", "error", "if", "present", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/ValidatedInputView.java#L483-L489
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/AuthConfig.java
AuthConfig.styleForStrategy
@StyleRes public static int styleForStrategy(String strategyName) { int style = R.style.Lock_Theme_AuthStyle; switch (strategyName) { case "amazon": style = R.style.Lock_Theme_AuthStyle_Amazon; break; case "aol": style = R.style...
java
@StyleRes public static int styleForStrategy(String strategyName) { int style = R.style.Lock_Theme_AuthStyle; switch (strategyName) { case "amazon": style = R.style.Lock_Theme_AuthStyle_Amazon; break; case "aol": style = R.style...
[ "@", "StyleRes", "public", "static", "int", "styleForStrategy", "(", "String", "strategyName", ")", "{", "int", "style", "=", "R", ".", "style", ".", "Lock_Theme_AuthStyle", ";", "switch", "(", "strategyName", ")", "{", "case", "\"amazon\"", ":", "style", "=...
It will resolve the given Strategy Name to a valid Style. @param strategyName to search for. @return a valid Lock.Theme.AuthStyle
[ "It", "will", "resolve", "the", "given", "Strategy", "Name", "to", "a", "valid", "Style", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/AuthConfig.java#L79-L197
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/PasswordlessLock.java
PasswordlessLock.newIntent
@SuppressWarnings("unused") public Intent newIntent(Context context) { Intent lockIntent = new Intent(context, PasswordlessLockActivity.class); lockIntent.putExtra(Constants.OPTIONS_EXTRA, options); lockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); return lockIntent; }
java
@SuppressWarnings("unused") public Intent newIntent(Context context) { Intent lockIntent = new Intent(context, PasswordlessLockActivity.class); lockIntent.putExtra(Constants.OPTIONS_EXTRA, options); lockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); return lockIntent; }
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "Intent", "newIntent", "(", "Context", "context", ")", "{", "Intent", "lockIntent", "=", "new", "Intent", "(", "context", ",", "PasswordlessLockActivity", ".", "class", ")", ";", "lockIntent", ".", "pu...
Builds a new intent to launch LockActivity with the previously configured options @param context a valid Context @return the intent to which the user has to call startActivity or startActivityForResult
[ "Builds", "a", "new", "intent", "to", "launch", "LockActivity", "with", "the", "previously", "configured", "options" ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/PasswordlessLock.java#L119-L125
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/utils/EnterpriseConnectionMatcher.java
EnterpriseConnectionMatcher.parse
@Nullable public OAuthConnection parse(String email) { String domain = extractDomain(email); if (domain == null) { return null; } domain = domain.toLowerCase(); for (OAuthConnection c : connections) { String mainDomain = domainForConnection(c); ...
java
@Nullable public OAuthConnection parse(String email) { String domain = extractDomain(email); if (domain == null) { return null; } domain = domain.toLowerCase(); for (OAuthConnection c : connections) { String mainDomain = domainForConnection(c); ...
[ "@", "Nullable", "public", "OAuthConnection", "parse", "(", "String", "email", ")", "{", "String", "domain", "=", "extractDomain", "(", "email", ")", ";", "if", "(", "domain", "==", "null", ")", "{", "return", "null", ";", "}", "domain", "=", "domain", ...
Tries to find a valid domain with the given input. @param email to search the Domain for. @return a Connection if found, null otherwise.
[ "Tries", "to", "find", "a", "valid", "domain", "with", "the", "given", "input", "." ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/utils/EnterpriseConnectionMatcher.java#L59-L83
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/utils/EnterpriseConnectionMatcher.java
EnterpriseConnectionMatcher.extractUsername
@Nullable public String extractUsername(String email) { int indexAt = email.indexOf(AT_SYMBOL); if (indexAt == -1) { return null; } return email.substring(0, indexAt); }
java
@Nullable public String extractUsername(String email) { int indexAt = email.indexOf(AT_SYMBOL); if (indexAt == -1) { return null; } return email.substring(0, indexAt); }
[ "@", "Nullable", "public", "String", "extractUsername", "(", "String", "email", ")", "{", "int", "indexAt", "=", "email", ".", "indexOf", "(", "AT_SYMBOL", ")", ";", "if", "(", "indexAt", "==", "-", "1", ")", "{", "return", "null", ";", "}", "return", ...
Extracts the username part from the email @param email to parse @return the username String if found, an empty String otherwise
[ "Extracts", "the", "username", "part", "from", "the", "email" ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/utils/EnterpriseConnectionMatcher.java#L91-L98
train
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/utils/EnterpriseConnectionMatcher.java
EnterpriseConnectionMatcher.extractDomain
@Nullable private String extractDomain(String email) { int indexAt = email.indexOf(AT_SYMBOL) + 1; if (indexAt == 0) { return null; } String domain = email.substring(indexAt); if (domain.isEmpty()) { return null; } return domain; }
java
@Nullable private String extractDomain(String email) { int indexAt = email.indexOf(AT_SYMBOL) + 1; if (indexAt == 0) { return null; } String domain = email.substring(indexAt); if (domain.isEmpty()) { return null; } return domain; }
[ "@", "Nullable", "private", "String", "extractDomain", "(", "String", "email", ")", "{", "int", "indexAt", "=", "email", ".", "indexOf", "(", "AT_SYMBOL", ")", "+", "1", ";", "if", "(", "indexAt", "==", "0", ")", "{", "return", "null", ";", "}", "Str...
Extracts the domain part from the email @param email to parse @return the domain String if found, an empty String otherwise
[ "Extracts", "the", "domain", "part", "from", "the", "email" ]
8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/utils/EnterpriseConnectionMatcher.java#L106-L117
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/SAMLCredentialPersonAttributeDao.java
SAMLCredentialPersonAttributeDao.extractStringValue
private String extractStringValue(XMLObject xmlo) { if (xmlo instanceof XSString) { return ((XSString)xmlo).getValue(); } else if (xmlo instanceof XSAnyImpl) { return ((XSAnyImpl)xmlo).getTextContent(); } logger.warn("Unable to map attribute class {} to String. Un...
java
private String extractStringValue(XMLObject xmlo) { if (xmlo instanceof XSString) { return ((XSString)xmlo).getValue(); } else if (xmlo instanceof XSAnyImpl) { return ((XSAnyImpl)xmlo).getTextContent(); } logger.warn("Unable to map attribute class {} to String. Un...
[ "private", "String", "extractStringValue", "(", "XMLObject", "xmlo", ")", "{", "if", "(", "xmlo", "instanceof", "XSString", ")", "{", "return", "(", "(", "XSString", ")", "xmlo", ")", ".", "getValue", "(", ")", ";", "}", "else", "if", "(", "xmlo", "ins...
Extracts the string value of the XMLObject depending upon its type. @param xmlo XMLObject @return String value of object. Null if unable to convert object to string.
[ "Extracts", "the", "string", "value", "of", "the", "XMLObject", "depending", "upon", "its", "type", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/SAMLCredentialPersonAttributeDao.java#L139-L148
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/MultivaluedPersonAttributeUtils.java
MultivaluedPersonAttributeUtils.parseAttributeToAttributeMapping
public static Map<String, Set<String>> parseAttributeToAttributeMapping(final Map<String, ? extends Object> mapping) { //null is assumed to be an empty map if (mapping == null) { return new HashMap<>(); } final Map<String, Set<String>> mappedAttributesBuilder = new LinkedHas...
java
public static Map<String, Set<String>> parseAttributeToAttributeMapping(final Map<String, ? extends Object> mapping) { //null is assumed to be an empty map if (mapping == null) { return new HashMap<>(); } final Map<String, Set<String>> mappedAttributesBuilder = new LinkedHas...
[ "public", "static", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "parseAttributeToAttributeMapping", "(", "final", "Map", "<", "String", ",", "?", "extends", "Object", ">", "mapping", ")", "{", "//null is assumed to be an empty map", "if", "(", "...
Translate from a more flexible Attribute to Attribute mapping format to a Map from String to Set of Strings. The point of the map is to map from attribute names in the underlying data store (e.g., JDBC column names, LDAP attribute names) to uPortal attribute names. Any given underlying data store attribute might map t...
[ "Translate", "from", "a", "more", "flexible", "Attribute", "to", "Attribute", "mapping", "format", "to", "a", "Map", "from", "String", "to", "Set", "of", "Strings", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/MultivaluedPersonAttributeUtils.java#L71-L118
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LdaptivePersonAttributeDao.java
LdaptivePersonAttributeDao.initialize
@PostConstruct public void initialize() { for (final SearchScope scope : SearchScope.values()) { if (scope.ordinal() == this.searchControls.getSearchScope()) { this.searchScope = scope; } } }
java
@PostConstruct public void initialize() { for (final SearchScope scope : SearchScope.values()) { if (scope.ordinal() == this.searchControls.getSearchScope()) { this.searchScope = scope; } } }
[ "@", "PostConstruct", "public", "void", "initialize", "(", ")", "{", "for", "(", "final", "SearchScope", "scope", ":", "SearchScope", ".", "values", "(", ")", ")", "{", "if", "(", "scope", ".", "ordinal", "(", ")", "==", "this", ".", "searchControls", ...
Initializes the object after properties are set.
[ "Initializes", "the", "object", "after", "properties", "are", "set", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LdaptivePersonAttributeDao.java#L134-L141
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LdaptivePersonAttributeDao.java
LdaptivePersonAttributeDao.createRequest
private SearchRequest createRequest(final SearchFilter filter) { final SearchRequest request = new SearchRequest(); request.setBaseDn(this.baseDN); request.setSearchFilter(filter); /** LDAP attributes to fetch from search results. */ if (getResultAttributeMapping() != null && !g...
java
private SearchRequest createRequest(final SearchFilter filter) { final SearchRequest request = new SearchRequest(); request.setBaseDn(this.baseDN); request.setSearchFilter(filter); /** LDAP attributes to fetch from search results. */ if (getResultAttributeMapping() != null && !g...
[ "private", "SearchRequest", "createRequest", "(", "final", "SearchFilter", "filter", ")", "{", "final", "SearchRequest", "request", "=", "new", "SearchRequest", "(", ")", ";", "request", ".", "setBaseDn", "(", "this", ".", "baseDN", ")", ";", "request", ".", ...
Creates a search request from a search filter. @param filter LDAP search filter. @return ldaptive search request.
[ "Creates", "a", "search", "request", "from", "a", "search", "filter", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LdaptivePersonAttributeDao.java#L204-L223
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/merger/BaseAdditiveAttributeMerger.java
BaseAdditiveAttributeMerger.buildMutableAttributeMap
protected Map<String, List<Object>> buildMutableAttributeMap(final Map<String, List<Object>> attributes) { final Map<String, List<Object>> mutableValuesBuilder = this.createMutableAttributeMap(attributes.size()); for (final Map.Entry<String, List<Object>> attrEntry : attributes.entrySet()) { ...
java
protected Map<String, List<Object>> buildMutableAttributeMap(final Map<String, List<Object>> attributes) { final Map<String, List<Object>> mutableValuesBuilder = this.createMutableAttributeMap(attributes.size()); for (final Map.Entry<String, List<Object>> attrEntry : attributes.entrySet()) { ...
[ "protected", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "buildMutableAttributeMap", "(", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "attributes", ")", "{", "final", "Map", "<", "String", ",", "List", "<", "Obj...
Do a deep clone of an attribute Map to ensure it is completley mutable. @param attributes Attribute map @return Mutable attribute map
[ "Do", "a", "deep", "clone", "of", "an", "attribute", "Map", "to", "ensure", "it", "is", "completley", "mutable", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/merger/BaseAdditiveAttributeMerger.java#L102-L117
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/ScriptEnginePersonAttributeDao.java
ScriptEnginePersonAttributeDao.setScriptFile
public void setScriptFile(final String scriptFile) { this.scriptFile = scriptFile; this.scriptType = determineScriptType(scriptFile); if (scriptType != SCRIPT_TYPE.CONTENTS) { // assume that if adjusting the file, engine name should also be re-calc'd // if scriptType is C...
java
public void setScriptFile(final String scriptFile) { this.scriptFile = scriptFile; this.scriptType = determineScriptType(scriptFile); if (scriptType != SCRIPT_TYPE.CONTENTS) { // assume that if adjusting the file, engine name should also be re-calc'd // if scriptType is C...
[ "public", "void", "setScriptFile", "(", "final", "String", "scriptFile", ")", "{", "this", ".", "scriptFile", "=", "scriptFile", ";", "this", ".", "scriptType", "=", "determineScriptType", "(", "scriptFile", ")", ";", "if", "(", "scriptType", "!=", "SCRIPT_TYP...
this object would be better if engineName and scriptFile couldn't change
[ "this", "object", "would", "be", "better", "if", "engineName", "and", "scriptFile", "couldn", "t", "change" ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ScriptEnginePersonAttributeDao.java#L70-L78
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/ScriptEnginePersonAttributeDao.java
ScriptEnginePersonAttributeDao.getScriptEngineName
public static String getScriptEngineName(String filename) { String extension = FilenameUtils.getExtension(filename); if (StringUtils.isBlank(extension)) { logger.warn("Can't determine engine name based on filename without extension {}",filename); return null; } Sc...
java
public static String getScriptEngineName(String filename) { String extension = FilenameUtils.getExtension(filename); if (StringUtils.isBlank(extension)) { logger.warn("Can't determine engine name based on filename without extension {}",filename); return null; } Sc...
[ "public", "static", "String", "getScriptEngineName", "(", "String", "filename", ")", "{", "String", "extension", "=", "FilenameUtils", ".", "getExtension", "(", "filename", ")", ";", "if", "(", "StringUtils", ".", "isBlank", "(", "extension", ")", ")", "{", ...
This method is static is available as utility for users that are passing the contents of a script and want to set the engineName property based on a filename. @param filename the filename @return script engine name
[ "This", "method", "is", "static", "is", "available", "as", "utility", "for", "users", "that", "are", "passing", "the", "contents", "of", "a", "script", "and", "want", "to", "set", "the", "engineName", "property", "based", "on", "a", "filename", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ScriptEnginePersonAttributeDao.java#L277-L296
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/CachingPersonAttributeDaoImpl.java
CachingPersonAttributeDaoImpl.setUserInfoCache
@JsonIgnore public void setUserInfoCache(final Map<Serializable, Set<IPersonAttributes>> userInfoCache) { if (userInfoCache == null) { throw new IllegalArgumentException("userInfoCache may not be null"); } this.userInfoCache = userInfoCache; }
java
@JsonIgnore public void setUserInfoCache(final Map<Serializable, Set<IPersonAttributes>> userInfoCache) { if (userInfoCache == null) { throw new IllegalArgumentException("userInfoCache may not be null"); } this.userInfoCache = userInfoCache; }
[ "@", "JsonIgnore", "public", "void", "setUserInfoCache", "(", "final", "Map", "<", "Serializable", ",", "Set", "<", "IPersonAttributes", ">", ">", "userInfoCache", ")", "{", "if", "(", "userInfoCache", "==", "null", ")", "{", "throw", "new", "IllegalArgumentEx...
The Map to use for caching results. Only get, put and remove are used so the Map may be backed by a real caching implementation. @param userInfoCache The userInfoCache to set.
[ "The", "Map", "to", "use", "for", "caching", "results", ".", "Only", "get", "put", "and", "remove", "are", "used", "so", "the", "Map", "may", "be", "backed", "by", "a", "real", "caching", "implementation", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/CachingPersonAttributeDaoImpl.java#L210-L217
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/CachingPersonAttributeDaoImpl.java
CachingPersonAttributeDaoImpl.setNullResultsObject
@JsonIgnore public void setNullResultsObject(final Set<IPersonAttributes> nullResultsObject) { if (nullResultsObject == null) { throw new IllegalArgumentException("nullResultsObject may not be null"); } this.nullResultsObject = nullResultsObject; }
java
@JsonIgnore public void setNullResultsObject(final Set<IPersonAttributes> nullResultsObject) { if (nullResultsObject == null) { throw new IllegalArgumentException("nullResultsObject may not be null"); } this.nullResultsObject = nullResultsObject; }
[ "@", "JsonIgnore", "public", "void", "setNullResultsObject", "(", "final", "Set", "<", "IPersonAttributes", ">", "nullResultsObject", ")", "{", "if", "(", "nullResultsObject", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"nullResultsObj...
Used to specify the placeholder object to put in the cache for null results. Defaults to a minimal Set. Most installations will not need to set this. @param nullResultsObject the nullResultsObject to set
[ "Used", "to", "specify", "the", "placeholder", "object", "to", "put", "in", "the", "cache", "for", "null", "results", ".", "Defaults", "to", "a", "minimal", "Set", ".", "Most", "installations", "will", "not", "need", "to", "set", "this", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/CachingPersonAttributeDaoImpl.java#L248-L255
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/ComplexStubPersonAttributeDao.java
ComplexStubPersonAttributeDao.setBackingMap
public void setBackingMap(final Map<String, Map<String, List<Object>>> backingMap) { if (backingMap == null) { this.backingMap = new HashMap<>(); this.possibleUserAttributeNames = new HashSet<>(); } else { this.backingMap = new LinkedHashMap<>(backingMap); ...
java
public void setBackingMap(final Map<String, Map<String, List<Object>>> backingMap) { if (backingMap == null) { this.backingMap = new HashMap<>(); this.possibleUserAttributeNames = new HashSet<>(); } else { this.backingMap = new LinkedHashMap<>(backingMap); ...
[ "public", "void", "setBackingMap", "(", "final", "Map", "<", "String", ",", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", ">", "backingMap", ")", "{", "if", "(", "backingMap", "==", "null", ")", "{", "this", ".", "backingMap", "=", "new...
The backing Map to use for queries, the outer map is keyed on the query attribute. The inner Map is the set of user attributes to be returned for the query attribute. @param backingMap backing map
[ "The", "backing", "Map", "to", "use", "for", "queries", "the", "outer", "map", "is", "keyed", "on", "the", "query", "attribute", ".", "The", "inner", "Map", "is", "the", "set", "of", "user", "attributes", "to", "be", "returned", "for", "the", "query", ...
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ComplexStubPersonAttributeDao.java#L124-L132
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/ComplexStubPersonAttributeDao.java
ComplexStubPersonAttributeDao.initializePossibleAttributeNames
private void initializePossibleAttributeNames() { final Set<String> possibleAttribNames = new LinkedHashSet<>(); for (final Map<String, List<Object>> attributeMapForSomeUser : this.backingMap.values()) { final Set<String> keySet = attributeMapForSomeUser.keySet(); possibleAttrib...
java
private void initializePossibleAttributeNames() { final Set<String> possibleAttribNames = new LinkedHashSet<>(); for (final Map<String, List<Object>> attributeMapForSomeUser : this.backingMap.values()) { final Set<String> keySet = attributeMapForSomeUser.keySet(); possibleAttrib...
[ "private", "void", "initializePossibleAttributeNames", "(", ")", "{", "final", "Set", "<", "String", ">", "possibleAttribNames", "=", "new", "LinkedHashSet", "<>", "(", ")", ";", "for", "(", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", "...
Compute the set of attribute names that map to a value for at least one user in our backing map and store it as the instance variable possibleUserAttributeNames.
[ "Compute", "the", "set", "of", "attribute", "names", "that", "map", "to", "a", "value", "for", "at", "least", "one", "user", "in", "our", "backing", "map", "and", "store", "it", "as", "the", "instance", "variable", "possibleUserAttributeNames", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ComplexStubPersonAttributeDao.java#L250-L259
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/EchoPersonAttributeDaoImpl.java
EchoPersonAttributeDaoImpl.getPeopleWithMultivaluedAttributes
@Override public Set<IPersonAttributes> getPeopleWithMultivaluedAttributes(final Map<String, List<Object>> query, final IPersonAttributeDaoFilter filter) { if (query == null) { throw new IllegalArgumentException("seed may not b...
java
@Override public Set<IPersonAttributes> getPeopleWithMultivaluedAttributes(final Map<String, List<Object>> query, final IPersonAttributeDaoFilter filter) { if (query == null) { throw new IllegalArgumentException("seed may not b...
[ "@", "Override", "public", "Set", "<", "IPersonAttributes", ">", "getPeopleWithMultivaluedAttributes", "(", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "query", ",", "final", "IPersonAttributeDaoFilter", "filter", ")", "{", "if", "(", ...
Returns a duplicate of the seed it is passed. @return a Map equal to but not the same reference as the seed. @see IPersonAttributeDao#getPeopleWithMultivaluedAttributes(java.util.Map, org.apereo.services.persondir.IPersonAttributeDaoFilter)
[ "Returns", "a", "duplicate", "of", "the", "seed", "it", "is", "passed", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/EchoPersonAttributeDaoImpl.java#L45-L54
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/jdbc/AbstractJdbcPersonAttributeDao.java
AbstractJdbcPersonAttributeDao.canonicalizeDataAttributeForSql
protected String canonicalizeDataAttributeForSql(final String dataAttribute) { if (this.caseInsensitiveDataAttributes == null || this.caseInsensitiveDataAttributes.isEmpty() || !(this.caseInsensitiveDataAttributes.containsKey(dataAttribute))) { return dataAttribute; } if (this.dataAt...
java
protected String canonicalizeDataAttributeForSql(final String dataAttribute) { if (this.caseInsensitiveDataAttributes == null || this.caseInsensitiveDataAttributes.isEmpty() || !(this.caseInsensitiveDataAttributes.containsKey(dataAttribute))) { return dataAttribute; } if (this.dataAt...
[ "protected", "String", "canonicalizeDataAttributeForSql", "(", "final", "String", "dataAttribute", ")", "{", "if", "(", "this", ".", "caseInsensitiveDataAttributes", "==", "null", "||", "this", ".", "caseInsensitiveDataAttributes", ".", "isEmpty", "(", ")", "||", "!...
Canonicalize the data-layer attribute column with the given name via SQL function. This is as opposed to canonicalizing query attributes or application attributes passed into or mapped out of the data layer. Canonicalization of a data-layer column should only be necessary if the data layer if you require case-insensiti...
[ "Canonicalize", "the", "data", "-", "layer", "attribute", "column", "with", "the", "given", "name", "via", "SQL", "function", ".", "This", "is", "as", "opposed", "to", "canonicalizing", "query", "attributes", "or", "application", "attributes", "passed", "into", ...
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/jdbc/AbstractJdbcPersonAttributeDao.java#L192-L208
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/BasePersonImpl.java
BasePersonImpl.buildImmutableAttributeMap
protected Map<String, List<Object>> buildImmutableAttributeMap(final Map<String, List<Object>> attributes) { final Map<String, List<Object>> immutableValuesBuilder = this.createImmutableAttributeMap(attributes.size()); final Pattern arrayPattern = Pattern.compile("\\{(.*)\\}"); for (final Map.En...
java
protected Map<String, List<Object>> buildImmutableAttributeMap(final Map<String, List<Object>> attributes) { final Map<String, List<Object>> immutableValuesBuilder = this.createImmutableAttributeMap(attributes.size()); final Pattern arrayPattern = Pattern.compile("\\{(.*)\\}"); for (final Map.En...
[ "protected", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "buildImmutableAttributeMap", "(", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "attributes", ")", "{", "final", "Map", "<", "String", ",", "List", "<", "O...
Take the constructor argument and convert the Map and List values into read-only form. @param attributes Map of attributes @return Read-only map of attributes
[ "Take", "the", "constructor", "argument", "and", "convert", "the", "Map", "and", "List", "values", "into", "read", "-", "only", "form", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/BasePersonImpl.java#L66-L103
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractQueryPersonAttributeDao.java
AbstractQueryPersonAttributeDao.mapPersonAttributes
protected final IPersonAttributes mapPersonAttributes(final IPersonAttributes person) { final Map<String, List<Object>> personAttributes = person.getAttributes(); final Map<String, List<Object>> mappedAttributes; //If no mapping just use the attributes as-is if (this.resultAttributeMapp...
java
protected final IPersonAttributes mapPersonAttributes(final IPersonAttributes person) { final Map<String, List<Object>> personAttributes = person.getAttributes(); final Map<String, List<Object>> mappedAttributes; //If no mapping just use the attributes as-is if (this.resultAttributeMapp...
[ "protected", "final", "IPersonAttributes", "mapPersonAttributes", "(", "final", "IPersonAttributes", "person", ")", "{", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "personAttributes", "=", "person", ".", "getAttributes", "(", ")", ";", ...
Uses resultAttributeMapping to return a copy of the IPersonAttributes with only the attributes specified in resultAttributeMapping mapped to their result attribute names. @param person The IPersonAttributes to map attributes for @return A copy of the IPersonAttributes with mapped attributes, the original IPersonAttrib...
[ "Uses", "resultAttributeMapping", "to", "return", "a", "copy", "of", "the", "IPersonAttributes", "with", "only", "the", "attributes", "specified", "in", "resultAttributeMapping", "mapped", "to", "their", "result", "attribute", "names", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractQueryPersonAttributeDao.java#L406-L468
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractQueryPersonAttributeDao.java
AbstractQueryPersonAttributeDao.canonicalizeAttribute
protected List<Object> canonicalizeAttribute(final String key, final List<Object> value, final Map<String, CaseCanonicalizationMode> config) { if (value == null || value.isEmpty() || config == null || !(config.containsKey(key))) { return value; } CaseCanonicalizationMode canonicaliza...
java
protected List<Object> canonicalizeAttribute(final String key, final List<Object> value, final Map<String, CaseCanonicalizationMode> config) { if (value == null || value.isEmpty() || config == null || !(config.containsKey(key))) { return value; } CaseCanonicalizationMode canonicaliza...
[ "protected", "List", "<", "Object", ">", "canonicalizeAttribute", "(", "final", "String", "key", ",", "final", "List", "<", "Object", ">", "value", ",", "final", "Map", "<", "String", ",", "CaseCanonicalizationMode", ">", "config", ")", "{", "if", "(", "va...
Canonicalize the attribute values if they are present in the config map. @param key attribute key @param value list of attribute values @param config map of attribute names to canonicalization key for the attribute @return if configured to do so, returns a canonicalized list of values.
[ "Canonicalize", "the", "attribute", "values", "if", "they", "are", "present", "in", "the", "config", "map", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractQueryPersonAttributeDao.java#L477-L498
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/CascadingPersonAttributeDao.java
CascadingPersonAttributeDao.getAttributesFromDao
@Override protected Set<IPersonAttributes> getAttributesFromDao(final Map<String, List<Object>> seed, final boolean isFirstQuery, final IPersonAttributeDao currentlyConsidering, final Set<IPersonAttributes> resultPeople, final IPersonAttributeDaoFilter filter) { if (isFirstQuery || (!stopIfFirstDaoReturnsNu...
java
@Override protected Set<IPersonAttributes> getAttributesFromDao(final Map<String, List<Object>> seed, final boolean isFirstQuery, final IPersonAttributeDao currentlyConsidering, final Set<IPersonAttributes> resultPeople, final IPersonAttributeDaoFilter filter) { if (isFirstQuery || (!stopIfFirstDaoReturnsNu...
[ "@", "Override", "protected", "Set", "<", "IPersonAttributes", ">", "getAttributesFromDao", "(", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "seed", ",", "final", "boolean", "isFirstQuery", ",", "final", "IPersonAttributeDao", "currently...
If this is the first call, or there are no results in the resultPeople Set and stopIfFirstDaoReturnsNull=false, the seed map is used. If not the attributes of the first user in the resultPeople Set are used for each child dao. If stopIfFirstDaoReturnsNull=true and the first query returned no results in the resultPeopl...
[ "If", "this", "is", "the", "first", "call", "or", "there", "are", "no", "results", "in", "the", "resultPeople", "Set", "and", "stopIfFirstDaoReturnsNull", "=", "false", "the", "seed", "map", "is", "used", ".", "If", "not", "the", "attributes", "of", "the",...
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/CascadingPersonAttributeDao.java#L96-L132
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/MergingPersonAttributeDaoImpl.java
MergingPersonAttributeDaoImpl.getAttributesFromDao
@Override protected Set<IPersonAttributes> getAttributesFromDao(final Map<String, List<Object>> seed, final boolean isFirstQuery, final IPersonAttributeDao currentlyConsidering, final Set<IPersonAttributes> resultPeople, final IPersonAttributeDaoFilter filter) { return currentlyConsidering.getPeopleWithMult...
java
@Override protected Set<IPersonAttributes> getAttributesFromDao(final Map<String, List<Object>> seed, final boolean isFirstQuery, final IPersonAttributeDao currentlyConsidering, final Set<IPersonAttributes> resultPeople, final IPersonAttributeDaoFilter filter) { return currentlyConsidering.getPeopleWithMult...
[ "@", "Override", "protected", "Set", "<", "IPersonAttributes", ">", "getAttributesFromDao", "(", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "seed", ",", "final", "boolean", "isFirstQuery", ",", "final", "IPersonAttributeDao", "currently...
Calls the current IPersonAttributeDao from using the seed. @see AbstractAggregatingDefaultQueryPersonAttributeDao#getAttributesFromDao(java.util.Map, boolean, IPersonAttributeDao, java.util.Set, IPersonAttributeDaoFilter)
[ "Calls", "the", "current", "IPersonAttributeDao", "from", "using", "the", "seed", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/MergingPersonAttributeDaoImpl.java#L51-L54
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/MediatingAdditionalDescriptors.java
MediatingAdditionalDescriptors.removeAttribute
@Override public List<Object> removeAttribute(final String name) { List<Object> removedValues = null; for (final IAdditionalDescriptors additionalDescriptors : this.delegateDescriptors) { final List<Object> values = additionalDescriptors.removeAttribute(name); if (values != ...
java
@Override public List<Object> removeAttribute(final String name) { List<Object> removedValues = null; for (final IAdditionalDescriptors additionalDescriptors : this.delegateDescriptors) { final List<Object> values = additionalDescriptors.removeAttribute(name); if (values != ...
[ "@", "Override", "public", "List", "<", "Object", ">", "removeAttribute", "(", "final", "String", "name", ")", "{", "List", "<", "Object", ">", "removedValues", "=", "null", ";", "for", "(", "final", "IAdditionalDescriptors", "additionalDescriptors", ":", "thi...
Returns list of all removed values @see IAdditionalDescriptors#removeAttribute(java.lang.String)
[ "Returns", "list", "of", "all", "removed", "values" ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/MediatingAdditionalDescriptors.java#L62-L78
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/MediatingAdditionalDescriptors.java
MediatingAdditionalDescriptors.setAttributeValues
@Override public List<Object> setAttributeValues(final String name, final List<Object> values) { List<Object> replacedValues = null; for (final IAdditionalDescriptors additionalDescriptors : delegateDescriptors) { final List<Object> oldValues = additionalDescriptors.setAttributeValues(n...
java
@Override public List<Object> setAttributeValues(final String name, final List<Object> values) { List<Object> replacedValues = null; for (final IAdditionalDescriptors additionalDescriptors : delegateDescriptors) { final List<Object> oldValues = additionalDescriptors.setAttributeValues(n...
[ "@", "Override", "public", "List", "<", "Object", ">", "setAttributeValues", "(", "final", "String", "name", ",", "final", "List", "<", "Object", ">", "values", ")", "{", "List", "<", "Object", ">", "replacedValues", "=", "null", ";", "for", "(", "final"...
Returns list of all replaced values @see IAdditionalDescriptors#setAttributeValues(java.lang.String, java.util.List)
[ "Returns", "list", "of", "all", "replaced", "values" ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/MediatingAdditionalDescriptors.java#L85-L101
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java
RequestAttributeSourceFilter.addRequestProperties
protected void addRequestProperties(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) { if (this.remoteUserAttribute != null) { final String remoteUser = httpServletRequest.getRemoteUser(); attributes.put(this.remoteUserAttribute, list(remoteUser));...
java
protected void addRequestProperties(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) { if (this.remoteUserAttribute != null) { final String remoteUser = httpServletRequest.getRemoteUser(); attributes.put(this.remoteUserAttribute, list(remoteUser));...
[ "protected", "void", "addRequestProperties", "(", "final", "HttpServletRequest", "httpServletRequest", ",", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "attributes", ")", "{", "if", "(", "this", ".", "remoteUserAttribute", "!=", "null", ...
Add other properties from the request to the attributes map. @param httpServletRequest Http Servlet Request @param attributes Map of attributes to add additional attributes to from the Http Request
[ "Add", "other", "properties", "from", "the", "request", "to", "the", "attributes", "map", "." ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java#L407-L428
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java
RequestAttributeSourceFilter.addRequestCookies
protected void addRequestCookies(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) { final Cookie[] cookies = httpServletRequest.getCookies(); if (cookies == null) { return; } for (final Cookie cookie : cookies) { final Stri...
java
protected void addRequestCookies(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) { final Cookie[] cookies = httpServletRequest.getCookies(); if (cookies == null) { return; } for (final Cookie cookie : cookies) { final Stri...
[ "protected", "void", "addRequestCookies", "(", "final", "HttpServletRequest", "httpServletRequest", ",", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "attributes", ")", "{", "final", "Cookie", "[", "]", "cookies", "=", "httpServletRequest...
Add request cookies to the attributes map @param httpServletRequest Http Servlet Request @param attributes Map of attributes to add additional attributes to from the Http Request
[ "Add", "request", "cookies", "to", "the", "attributes", "map" ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java#L436-L450
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java
RequestAttributeSourceFilter.addRequestHeaders
protected void addRequestHeaders(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) { for (final Map.Entry<String, Set<String>> headerAttributeEntry : this.headerAttributeMapping.entrySet()) { final String headerName = headerAttributeEntry.getKey(); ...
java
protected void addRequestHeaders(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) { for (final Map.Entry<String, Set<String>> headerAttributeEntry : this.headerAttributeMapping.entrySet()) { final String headerName = headerAttributeEntry.getKey(); ...
[ "protected", "void", "addRequestHeaders", "(", "final", "HttpServletRequest", "httpServletRequest", ",", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "attributes", ")", "{", "for", "(", "final", "Map", ".", "Entry", "<", "String", ","...
Add request headers to the attributes map @param httpServletRequest Http Servlet Request @param attributes Map of attributes to add additional attributes to from the Http Request
[ "Add", "request", "headers", "to", "the", "attributes", "map" ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java#L458-L472
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LogicalFilterWrapper.java
LogicalFilterWrapper.append
public void append(final Filter query) { switch (this.queryType) { case OR: { this.orFilter.or(query); } break; default: case AND: { this.andFilter.and(query); } break; } }
java
public void append(final Filter query) { switch (this.queryType) { case OR: { this.orFilter.or(query); } break; default: case AND: { this.andFilter.and(query); } break; } }
[ "public", "void", "append", "(", "final", "Filter", "query", ")", "{", "switch", "(", "this", ".", "queryType", ")", "{", "case", "OR", ":", "{", "this", ".", "orFilter", ".", "or", "(", "query", ")", ";", "}", "break", ";", "default", ":", "case",...
Append the query Filter to the underlying logical Filter
[ "Append", "the", "query", "Filter", "to", "the", "underlying", "logical", "Filter" ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LogicalFilterWrapper.java#L64-L77
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/xml/CachingJaxbLoaderImpl.java
CachingJaxbLoaderImpl.isCacheValid
protected boolean isCacheValid(final Long lastModified) { return (lastModified != null && lastModified <= this.lastModifiedTime) || (lastModified == null && (this.lastModifiedTime + this.noLastModifiedReloadPeriod) <= System.currentTimeMillis()); }
java
protected boolean isCacheValid(final Long lastModified) { return (lastModified != null && lastModified <= this.lastModifiedTime) || (lastModified == null && (this.lastModifiedTime + this.noLastModifiedReloadPeriod) <= System.currentTimeMillis()); }
[ "protected", "boolean", "isCacheValid", "(", "final", "Long", "lastModified", ")", "{", "return", "(", "lastModified", "!=", "null", "&&", "lastModified", "<=", "this", ".", "lastModifiedTime", ")", "||", "(", "lastModified", "==", "null", "&&", "(", "this", ...
Determines if the cached unmarshalled object is still valid @param lastModified last modified timestamp of the resource, null if not known. @return true if the cached object should be used
[ "Determines", "if", "the", "cached", "unmarshalled", "object", "is", "still", "valid" ]
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/xml/CachingJaxbLoaderImpl.java#L143-L146
train
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/BasePersonAttributeDao.java
BasePersonAttributeDao.flattenResults
@Deprecated protected Map<String, Object> flattenResults(final Map<String, List<Object>> multivaluedUserAttributes) { if (!this.enabled) { return null; } if (multivaluedUserAttributes == null) { return null; } //Convert the <String, List<Object> resu...
java
@Deprecated protected Map<String, Object> flattenResults(final Map<String, List<Object>> multivaluedUserAttributes) { if (!this.enabled) { return null; } if (multivaluedUserAttributes == null) { return null; } //Convert the <String, List<Object> resu...
[ "@", "Deprecated", "protected", "Map", "<", "String", ",", "Object", ">", "flattenResults", "(", "final", "Map", "<", "String", ",", "List", "<", "Object", ">", ">", "multivaluedUserAttributes", ")", "{", "if", "(", "!", "this", ".", "enabled", ")", "{",...
Takes a &lt;String, List&lt;Object&gt;&gt; Map and coverts it to a &lt;String, Object&gt; Map. This implementation takes the first value of each List to use as the value for the new Map. @param multivaluedUserAttributes The attribute map to flatten. @return A flattened version of the Map, null if the argument was null...
[ "Takes", "a", "&lt", ";", "String", "List&lt", ";", "Object&gt", ";", "&gt", ";", "Map", "and", "coverts", "it", "to", "a", "&lt", ";", "String", "Object&gt", ";", "Map", ".", "This", "implementation", "takes", "the", "first", "value", "of", "each", "L...
331200c0878aec202b8aff12a732402d6ba7681f
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/BasePersonAttributeDao.java#L132-L162
train
scoverage/scoverage-maven-plugin
src/main/java/org/scoverage/plugin/SCoveragePackageMojo.java
SCoveragePackageMojo.execute
@Override public void execute() { if ( "pom".equals( project.getPackaging() ) ) { getLog().info( "Skipping SCoverage execution for project with packaging type 'pom'" ); return; } if ( skip ) { getLog().info( "Skipping Scoverage executi...
java
@Override public void execute() { if ( "pom".equals( project.getPackaging() ) ) { getLog().info( "Skipping SCoverage execution for project with packaging type 'pom'" ); return; } if ( skip ) { getLog().info( "Skipping Scoverage executi...
[ "@", "Override", "public", "void", "execute", "(", ")", "{", "if", "(", "\"pom\"", ".", "equals", "(", "project", ".", "getPackaging", "(", ")", ")", ")", "{", "getLog", "(", ")", ".", "info", "(", "\"Skipping SCoverage execution for project with packaging typ...
Creates artifact file containing instrumented classes.
[ "Creates", "artifact", "file", "containing", "instrumented", "classes", "." ]
b1c874aba521a65c85bcccfa8bff2213b5639c78
https://github.com/scoverage/scoverage-maven-plugin/blob/b1c874aba521a65c85bcccfa8bff2213b5639c78/src/main/java/org/scoverage/plugin/SCoveragePackageMojo.java#L69-L90
train
scoverage/scoverage-maven-plugin
src/main/java/org/scoverage/plugin/SCoveragePostCompileMojo.java
SCoveragePostCompileMojo.execute
@Override public void execute() { if ( "pom".equals( project.getPackaging() ) ) { return; } if ( skip ) { return; } long ts = System.currentTimeMillis(); Properties projectProperties = project.getProperties(); ...
java
@Override public void execute() { if ( "pom".equals( project.getPackaging() ) ) { return; } if ( skip ) { return; } long ts = System.currentTimeMillis(); Properties projectProperties = project.getProperties(); ...
[ "@", "Override", "public", "void", "execute", "(", ")", "{", "if", "(", "\"pom\"", ".", "equals", "(", "project", ".", "getPackaging", "(", ")", ")", ")", "{", "return", ";", "}", "if", "(", "skip", ")", "{", "return", ";", "}", "long", "ts", "="...
Restores project original configuration after compilation with SCoverage instrumentation.
[ "Restores", "project", "original", "configuration", "after", "compilation", "with", "SCoverage", "instrumentation", "." ]
b1c874aba521a65c85bcccfa8bff2213b5639c78
https://github.com/scoverage/scoverage-maven-plugin/blob/b1c874aba521a65c85bcccfa8bff2213b5639c78/src/main/java/org/scoverage/plugin/SCoveragePostCompileMojo.java#L66-L91
train
scoverage/scoverage-maven-plugin
src/main/java/org/scoverage/plugin/SCoveragePreCompileMojo.java
SCoveragePreCompileMojo.addScoverageDependenciesToClasspath
private void addScoverageDependenciesToClasspath( Artifact scalaScoveragePluginArtifact ) throws MojoExecutionException { @SuppressWarnings( "unchecked" ) Set<Artifact> set = new LinkedHashSet<Artifact>( project.getDependencyArtifacts() ); set.add( scalaScoveragePluginArtifact ); ...
java
private void addScoverageDependenciesToClasspath( Artifact scalaScoveragePluginArtifact ) throws MojoExecutionException { @SuppressWarnings( "unchecked" ) Set<Artifact> set = new LinkedHashSet<Artifact>( project.getDependencyArtifacts() ); set.add( scalaScoveragePluginArtifact ); ...
[ "private", "void", "addScoverageDependenciesToClasspath", "(", "Artifact", "scalaScoveragePluginArtifact", ")", "throws", "MojoExecutionException", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "Set", "<", "Artifact", ">", "set", "=", "new", "LinkedHashSet", ...
We need to tweak our test classpath for Scoverage. @throws MojoExecutionException
[ "We", "need", "to", "tweak", "our", "test", "classpath", "for", "Scoverage", "." ]
b1c874aba521a65c85bcccfa8bff2213b5639c78
https://github.com/scoverage/scoverage-maven-plugin/blob/b1c874aba521a65c85bcccfa8bff2213b5639c78/src/main/java/org/scoverage/plugin/SCoveragePreCompileMojo.java#L496-L503
train
scoverage/scoverage-maven-plugin
src/main/java/org/scoverage/plugin/SCoverageReportMojo.java
SCoverageReportMojo.execute
@Override public void execute() throws MojoExecutionException { if ( !canGenerateReport() ) { getLog().info( "Skipping SCoverage report generation" ); return; } try { RenderingContext context = new RenderingContext( outputDirec...
java
@Override public void execute() throws MojoExecutionException { if ( !canGenerateReport() ) { getLog().info( "Skipping SCoverage report generation" ); return; } try { RenderingContext context = new RenderingContext( outputDirec...
[ "@", "Override", "public", "void", "execute", "(", ")", "throws", "MojoExecutionException", "{", "if", "(", "!", "canGenerateReport", "(", ")", ")", "{", "getLog", "(", ")", ".", "info", "(", "\"Skipping SCoverage report generation\"", ")", ";", "return", ";",...
Generates SCoverage report. @throws MojoExecutionException if unexpected problem occurs
[ "Generates", "SCoverage", "report", "." ]
b1c874aba521a65c85bcccfa8bff2213b5639c78
https://github.com/scoverage/scoverage-maven-plugin/blob/b1c874aba521a65c85bcccfa8bff2213b5639c78/src/main/java/org/scoverage/plugin/SCoverageReportMojo.java#L369-L391
train
nebula-plugins/nebula-dependency-recommender-plugin
src/main/groovy/netflix/nebula/dependency/recommender/DependencyRecommendationsPlugin.java
DependencyRecommendationsPlugin.getRecommendedVersionRecursive
protected String getRecommendedVersionRecursive(Project project, ModuleVersionSelector mvSelector) { String version = project.getExtensions().getByType(RecommendationProviderContainer.class) .getRecommendedVersion(mvSelector.getGroup(), mvSelector.getName()); if (version != null) ...
java
protected String getRecommendedVersionRecursive(Project project, ModuleVersionSelector mvSelector) { String version = project.getExtensions().getByType(RecommendationProviderContainer.class) .getRecommendedVersion(mvSelector.getGroup(), mvSelector.getName()); if (version != null) ...
[ "protected", "String", "getRecommendedVersionRecursive", "(", "Project", "project", ",", "ModuleVersionSelector", "mvSelector", ")", "{", "String", "version", "=", "project", ".", "getExtensions", "(", ")", ".", "getByType", "(", "RecommendationProviderContainer", ".", ...
Look for recommended versions in a project and each of its ancestors in order until one is found or the root is reached @param project the gradle <code>Project</code> @param mvSelector the module to lookup @return the recommended version or <code>null</code>
[ "Look", "for", "recommended", "versions", "in", "a", "project", "and", "each", "of", "its", "ancestors", "in", "order", "until", "one", "is", "found", "or", "the", "root", "is", "reached" ]
7cd008bd202641cf4abb0a7a470dbe5c8c3a67dc
https://github.com/nebula-plugins/nebula-dependency-recommender-plugin/blob/7cd008bd202641cf4abb0a7a470dbe5c8c3a67dc/src/main/groovy/netflix/nebula/dependency/recommender/DependencyRecommendationsPlugin.java#L217-L225
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getAccountsCount
public Integer getAccountsCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(Accounts.ACCOUNTS_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
java
public Integer getAccountsCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(Accounts.ACCOUNTS_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
[ "public", "Integer", "getAccountsCount", "(", "final", "QueryParams", "params", ")", "{", "FluentCaseInsensitiveStringsMap", "map", "=", "doHEAD", "(", "Accounts", ".", "ACCOUNTS_RESOURCE", ",", "params", ")", ";", "return", "Integer", ".", "parseInt", "(", "map",...
Get number of Accounts matching the query params @param params {@link QueryParams} @return Integer on success, null otherwise
[ "Get", "number", "of", "Accounts", "matching", "the", "query", "params" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L262-L265
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getCouponsCount
public Integer getCouponsCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(Coupons.COUPONS_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
java
public Integer getCouponsCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(Coupons.COUPONS_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
[ "public", "Integer", "getCouponsCount", "(", "final", "QueryParams", "params", ")", "{", "FluentCaseInsensitiveStringsMap", "map", "=", "doHEAD", "(", "Coupons", ".", "COUPONS_RESOURCE", ",", "params", ")", ";", "return", "Integer", ".", "parseInt", "(", "map", ...
Get number of Coupons matching the query params @param params {@link QueryParams} @return Integer on success, null otherwise
[ "Get", "number", "of", "Coupons", "matching", "the", "query", "params" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L296-L299
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getSubscriptionsCount
public Integer getSubscriptionsCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(Subscription.SUBSCRIPTION_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
java
public Integer getSubscriptionsCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(Subscription.SUBSCRIPTION_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
[ "public", "Integer", "getSubscriptionsCount", "(", "final", "QueryParams", "params", ")", "{", "FluentCaseInsensitiveStringsMap", "map", "=", "doHEAD", "(", "Subscription", ".", "SUBSCRIPTION_RESOURCE", ",", "params", ")", ";", "return", "Integer", ".", "parseInt", ...
Get number of Subscriptions matching the query params @param params {@link QueryParams} @return Integer on success, null otherwise
[ "Get", "number", "of", "Subscriptions", "matching", "the", "query", "params" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L675-L678
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getTransactionsCount
public Integer getTransactionsCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(Transactions.TRANSACTIONS_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
java
public Integer getTransactionsCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(Transactions.TRANSACTIONS_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
[ "public", "Integer", "getTransactionsCount", "(", "final", "QueryParams", "params", ")", "{", "FluentCaseInsensitiveStringsMap", "map", "=", "doHEAD", "(", "Transactions", ".", "TRANSACTIONS_RESOURCE", ",", "params", ")", ";", "return", "Integer", ".", "parseInt", "...
Get number of Transactions matching the query params @param params {@link QueryParams} @return Integer on success, null otherwise
[ "Get", "number", "of", "Transactions", "matching", "the", "query", "params" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L921-L924
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getTransaction
public Transaction getTransaction(final String transactionId) { if (transactionId == null || transactionId.isEmpty()) throw new RuntimeException("transactionId cannot be empty!"); return doGET(Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId, Transaction.class);...
java
public Transaction getTransaction(final String transactionId) { if (transactionId == null || transactionId.isEmpty()) throw new RuntimeException("transactionId cannot be empty!"); return doGET(Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId, Transaction.class);...
[ "public", "Transaction", "getTransaction", "(", "final", "String", "transactionId", ")", "{", "if", "(", "transactionId", "==", "null", "||", "transactionId", ".", "isEmpty", "(", ")", ")", "throw", "new", "RuntimeException", "(", "\"transactionId cannot be empty!\"...
Lookup a transaction @param transactionId recurly transaction id @return the transaction if found, null otherwise
[ "Lookup", "a", "transaction" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L932-L938
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.refundTransaction
public void refundTransaction(final String transactionId, @Nullable final BigDecimal amount) { String url = Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId; if (amount != null) { url = url + "?amount_in_cents=" + (amount.intValue() * 100); } doDELETE(url); }
java
public void refundTransaction(final String transactionId, @Nullable final BigDecimal amount) { String url = Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId; if (amount != null) { url = url + "?amount_in_cents=" + (amount.intValue() * 100); } doDELETE(url); }
[ "public", "void", "refundTransaction", "(", "final", "String", "transactionId", ",", "@", "Nullable", "final", "BigDecimal", "amount", ")", "{", "String", "url", "=", "Transactions", ".", "TRANSACTIONS_RESOURCE", "+", "\"/\"", "+", "transactionId", ";", "if", "(...
Refund a transaction @param transactionId recurly transaction id @param amount amount to refund, null for full refund
[ "Refund", "a", "transaction" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L956-L962
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getInvoice
public Invoice getInvoice(final String invoiceId) { if (invoiceId == null || invoiceId.isEmpty()) throw new RuntimeException("invoiceId cannot be empty!"); return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId, Invoice.class); }
java
public Invoice getInvoice(final String invoiceId) { if (invoiceId == null || invoiceId.isEmpty()) throw new RuntimeException("invoiceId cannot be empty!"); return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId, Invoice.class); }
[ "public", "Invoice", "getInvoice", "(", "final", "String", "invoiceId", ")", "{", "if", "(", "invoiceId", "==", "null", "||", "invoiceId", ".", "isEmpty", "(", ")", ")", "throw", "new", "RuntimeException", "(", "\"invoiceId cannot be empty!\"", ")", ";", "retu...
Lookup an invoice given an invoice id <p> Returns the invoice given a string id. The invoice may or may not have acountry code prefix (ex: IE1023). For more information on invoicing and prefixes, see: https://docs.recurly.com/docs/site-settings#section-invoice-prefixing @param invoiceId String Recurly Invoice ID @ret...
[ "Lookup", "an", "invoice", "given", "an", "invoice", "id" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L994-L999
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.markInvoiceSuccessful
public Invoice markInvoiceSuccessful(final String invoiceId) { return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/mark_successful", null, Invoice.class); }
java
public Invoice markInvoiceSuccessful(final String invoiceId) { return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/mark_successful", null, Invoice.class); }
[ "public", "Invoice", "markInvoiceSuccessful", "(", "final", "String", "invoiceId", ")", "{", "return", "doPUT", "(", "Invoices", ".", "INVOICES_RESOURCE", "+", "\"/\"", "+", "invoiceId", "+", "\"/mark_successful\"", ",", "null", ",", "Invoice", ".", "class", ")"...
Mark an invoice as paid successfully - Recurly Enterprise Feature @param invoiceId String Recurly Invoice ID
[ "Mark", "an", "invoice", "as", "paid", "successfully", "-", "Recurly", "Enterprise", "Feature" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1280-L1282
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.markInvoiceFailed
public InvoiceCollection markInvoiceFailed(final String invoiceId) { return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/mark_failed", null, InvoiceCollection.class); }
java
public InvoiceCollection markInvoiceFailed(final String invoiceId) { return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/mark_failed", null, InvoiceCollection.class); }
[ "public", "InvoiceCollection", "markInvoiceFailed", "(", "final", "String", "invoiceId", ")", "{", "return", "doPUT", "(", "Invoices", ".", "INVOICES_RESOURCE", "+", "\"/\"", "+", "invoiceId", "+", "\"/mark_failed\"", ",", "null", ",", "InvoiceCollection", ".", "c...
Mark an invoice as failed collection @param invoiceId String Recurly Invoice ID
[ "Mark", "an", "invoice", "as", "failed", "collection" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1301-L1303
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.forceCollectInvoice
public Invoice forceCollectInvoice(final String invoiceId) { return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/collect", null, Invoice.class); }
java
public Invoice forceCollectInvoice(final String invoiceId) { return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/collect", null, Invoice.class); }
[ "public", "Invoice", "forceCollectInvoice", "(", "final", "String", "invoiceId", ")", "{", "return", "doPUT", "(", "Invoices", ".", "INVOICES_RESOURCE", "+", "\"/\"", "+", "invoiceId", "+", "\"/collect\"", ",", "null", ",", "Invoice", ".", "class", ")", ";", ...
Force collect an invoice @param invoiceId String Recurly Invoice ID
[ "Force", "collect", "an", "invoice" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1310-L1312
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getPlansCount
public Integer getPlansCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(Plans.PLANS_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
java
public Integer getPlansCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(Plans.PLANS_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
[ "public", "Integer", "getPlansCount", "(", "final", "QueryParams", "params", ")", "{", "FluentCaseInsensitiveStringsMap", "map", "=", "doHEAD", "(", "Plans", ".", "PLANS_RESOURCE", ",", "params", ")", ";", "return", "Integer", ".", "parseInt", "(", "map", ".", ...
Get number of Plans matching the query params @param params {@link QueryParams} @return Integer on success, null otherwise
[ "Get", "number", "of", "Plans", "matching", "the", "query", "params" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1411-L1414
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getCouponRedemptionByAccount
public Redemption getCouponRedemptionByAccount(final String accountCode) { return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTION_RESOURCE, Redemption.class); }
java
public Redemption getCouponRedemptionByAccount(final String accountCode) { return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTION_RESOURCE, Redemption.class); }
[ "public", "Redemption", "getCouponRedemptionByAccount", "(", "final", "String", "accountCode", ")", "{", "return", "doGET", "(", "Accounts", ".", "ACCOUNTS_RESOURCE", "+", "\"/\"", "+", "accountCode", "+", "Redemption", ".", "REDEMPTION_RESOURCE", ",", "Redemption", ...
Lookup the first coupon redemption on an account. @param accountCode recurly account id @return the coupon redemption for this account on success, null otherwise
[ "Lookup", "the", "first", "coupon", "redemption", "on", "an", "account", "." ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1592-L1595
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getCouponRedemptionsByAccount
public Redemptions getCouponRedemptionsByAccount(final String accountCode) { return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE, Redemptions.class, new QueryParams()); }
java
public Redemptions getCouponRedemptionsByAccount(final String accountCode) { return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE, Redemptions.class, new QueryParams()); }
[ "public", "Redemptions", "getCouponRedemptionsByAccount", "(", "final", "String", "accountCode", ")", "{", "return", "doGET", "(", "Accounts", ".", "ACCOUNTS_RESOURCE", "+", "\"/\"", "+", "accountCode", "+", "Redemption", ".", "REDEMPTIONS_RESOURCE", ",", "Redemptions...
Lookup all coupon redemptions on an account. @param accountCode recurly account id @return the coupon redemptions for this account on success, null otherwise
[ "Lookup", "all", "coupon", "redemptions", "on", "an", "account", "." ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1603-L1606
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getCouponRedemptionByInvoice
public Redemption getCouponRedemptionByInvoice(final String invoiceId) { return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId + Redemption.REDEMPTION_RESOURCE, Redemption.class); }
java
public Redemption getCouponRedemptionByInvoice(final String invoiceId) { return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId + Redemption.REDEMPTION_RESOURCE, Redemption.class); }
[ "public", "Redemption", "getCouponRedemptionByInvoice", "(", "final", "String", "invoiceId", ")", "{", "return", "doGET", "(", "Invoices", ".", "INVOICES_RESOURCE", "+", "\"/\"", "+", "invoiceId", "+", "Redemption", ".", "REDEMPTION_RESOURCE", ",", "Redemption", "."...
Lookup the first coupon redemption on an invoice. @param invoiceId String invoice id @return the coupon redemption for this invoice on success, null otherwise
[ "Lookup", "the", "first", "coupon", "redemption", "on", "an", "invoice", "." ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1639-L1642
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getCouponRedemptionsBySubscription
public Redemptions getCouponRedemptionsBySubscription(final String subscriptionUuid, final QueryParams params) { return doGET(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscriptionUuid + Redemptions.REDEMPTIONS_RESOURCE, Redemptions.class, params); }
java
public Redemptions getCouponRedemptionsBySubscription(final String subscriptionUuid, final QueryParams params) { return doGET(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscriptionUuid + Redemptions.REDEMPTIONS_RESOURCE, Redemptions.class, params); }
[ "public", "Redemptions", "getCouponRedemptionsBySubscription", "(", "final", "String", "subscriptionUuid", ",", "final", "QueryParams", "params", ")", "{", "return", "doGET", "(", "Subscription", ".", "SUBSCRIPTION_RESOURCE", "+", "\"/\"", "+", "subscriptionUuid", "+", ...
Lookup all coupon redemptions on a subscription given query params. @param subscriptionUuid String subscription uuid @param params {@link QueryParams} @return the coupon redemptions for this subscription on success, null otherwise
[ "Lookup", "all", "coupon", "redemptions", "on", "a", "subscription", "given", "query", "params", "." ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1701-L1704
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.deleteCouponRedemption
public void deleteCouponRedemption(final String accountCode, final String redemptionUuid) { doDELETE(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE + "/" + redemptionUuid); }
java
public void deleteCouponRedemption(final String accountCode, final String redemptionUuid) { doDELETE(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE + "/" + redemptionUuid); }
[ "public", "void", "deleteCouponRedemption", "(", "final", "String", "accountCode", ",", "final", "String", "redemptionUuid", ")", "{", "doDELETE", "(", "Accounts", ".", "ACCOUNTS_RESOURCE", "+", "\"/\"", "+", "accountCode", "+", "Redemption", ".", "REDEMPTIONS_RESOU...
Deletes a specific redemption. @param accountCode recurly account id @param redemptionUuid recurly coupon redemption uuid
[ "Deletes", "a", "specific", "redemption", "." ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1721-L1723
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.generateUniqueCodes
public void generateUniqueCodes(final String couponCode, final Coupon coupon) { doPOST(Coupon.COUPON_RESOURCE + "/" + couponCode + Coupon.GENERATE_RESOURCE, coupon, null); }
java
public void generateUniqueCodes(final String couponCode, final Coupon coupon) { doPOST(Coupon.COUPON_RESOURCE + "/" + couponCode + Coupon.GENERATE_RESOURCE, coupon, null); }
[ "public", "void", "generateUniqueCodes", "(", "final", "String", "couponCode", ",", "final", "Coupon", "coupon", ")", "{", "doPOST", "(", "Coupon", ".", "COUPON_RESOURCE", "+", "\"/\"", "+", "couponCode", "+", "Coupon", ".", "GENERATE_RESOURCE", ",", "coupon", ...
Generates unique codes for a bulk coupon. @param couponCode recurly coupon code (must have been created as type: bulk) @param coupon A coupon with number of unique codes set
[ "Generates", "unique", "codes", "for", "a", "bulk", "coupon", "." ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1731-L1734
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getUniqueCouponCodes
public Coupons getUniqueCouponCodes(final String couponCode, final QueryParams params) { return doGET(Coupon.COUPON_RESOURCE + "/" + couponCode + Coupon.UNIQUE_CODES_RESOURCE, Coupons.class, params); }
java
public Coupons getUniqueCouponCodes(final String couponCode, final QueryParams params) { return doGET(Coupon.COUPON_RESOURCE + "/" + couponCode + Coupon.UNIQUE_CODES_RESOURCE, Coupons.class, params); }
[ "public", "Coupons", "getUniqueCouponCodes", "(", "final", "String", "couponCode", ",", "final", "QueryParams", "params", ")", "{", "return", "doGET", "(", "Coupon", ".", "COUPON_RESOURCE", "+", "\"/\"", "+", "couponCode", "+", "Coupon", ".", "UNIQUE_CODES_RESOURC...
Lookup all unique codes for a bulk coupon given query params. @param couponCode String coupon code @param params {@link QueryParams} @return the unique coupon codes for the coupon code on success, null otherwise
[ "Lookup", "all", "unique", "codes", "for", "a", "bulk", "coupon", "given", "query", "params", "." ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1743-L1746
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getGiftCardsCount
public Integer getGiftCardsCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(GiftCards.GIFT_CARDS_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
java
public Integer getGiftCardsCount(final QueryParams params) { FluentCaseInsensitiveStringsMap map = doHEAD(GiftCards.GIFT_CARDS_RESOURCE, params); return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME)); }
[ "public", "Integer", "getGiftCardsCount", "(", "final", "QueryParams", "params", ")", "{", "FluentCaseInsensitiveStringsMap", "map", "=", "doHEAD", "(", "GiftCards", ".", "GIFT_CARDS_RESOURCE", ",", "params", ")", ";", "return", "Integer", ".", "parseInt", "(", "m...
Get number of GiftCards matching the query params @param params {@link QueryParams} @return Integer on success, null otherwise
[ "Get", "number", "of", "GiftCards", "matching", "the", "query", "params" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1819-L1822
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/model/push/Notification.java
Notification.detect
public static Type detect(final String payload) { final Matcher m = ROOT_NAME.matcher(payload); if (m.find() && m.groupCount() >= 1) { final String root = m.group(1); try { return Type.valueOf(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, root)); ...
java
public static Type detect(final String payload) { final Matcher m = ROOT_NAME.matcher(payload); if (m.find() && m.groupCount() >= 1) { final String root = m.group(1); try { return Type.valueOf(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, root)); ...
[ "public", "static", "Type", "detect", "(", "final", "String", "payload", ")", "{", "final", "Matcher", "m", "=", "ROOT_NAME", ".", "matcher", "(", "payload", ")", ";", "if", "(", "m", ".", "find", "(", ")", "&&", "m", ".", "groupCount", "(", ")", "...
Detect notification type based on the xml root name. @param payload @return notification type or null if root name is not found or if there is no type corresponding to the root name
[ "Detect", "notification", "type", "based", "on", "the", "xml", "root", "name", "." ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/model/push/Notification.java#L127-L140
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/model/GiftCard.java
GiftCard.createRedemption
public static GiftCard.Redemption createRedemption(String accountCode) { Redemption redemption = new Redemption(); redemption.setAccountCode(accountCode); return redemption; }
java
public static GiftCard.Redemption createRedemption(String accountCode) { Redemption redemption = new Redemption(); redemption.setAccountCode(accountCode); return redemption; }
[ "public", "static", "GiftCard", ".", "Redemption", "createRedemption", "(", "String", "accountCode", ")", "{", "Redemption", "redemption", "=", "new", "Redemption", "(", ")", ";", "redemption", ".", "setAccountCode", "(", "accountCode", ")", ";", "return", "rede...
Builds a redemption request @param accountCode Account code to redeem @return gift card redemption data for an account
[ "Builds", "a", "redemption", "request" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/model/GiftCard.java#L171-L175
train
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/model/Invoice.java
Invoice.getOriginalInvoice
public Invoice getOriginalInvoice() { if (originalInvoice != null && originalInvoice.getHref() != null && !originalInvoice.getHref().isEmpty()) { originalInvoice = fetch(originalInvoice, Invoice.class); } return originalInvoice; }
java
public Invoice getOriginalInvoice() { if (originalInvoice != null && originalInvoice.getHref() != null && !originalInvoice.getHref().isEmpty()) { originalInvoice = fetch(originalInvoice, Invoice.class); } return originalInvoice; }
[ "public", "Invoice", "getOriginalInvoice", "(", ")", "{", "if", "(", "originalInvoice", "!=", "null", "&&", "originalInvoice", ".", "getHref", "(", ")", "!=", "null", "&&", "!", "originalInvoice", ".", "getHref", "(", ")", ".", "isEmpty", "(", ")", ")", ...
Fetches the original invoice if the href is populated, otherwise return the current original invoice. @return fully loaded original invoice
[ "Fetches", "the", "original", "invoice", "if", "the", "href", "is", "populated", "otherwise", "return", "the", "current", "original", "invoice", "." ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/model/Invoice.java#L169-L174
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_AsWKT.java
ST_AsWKT.asWKT
public static String asWKT(Geometry geometry) { if(geometry==null) { return null; } WKTWriter wktWriter = new WKTWriter(); return wktWriter.write(geometry); }
java
public static String asWKT(Geometry geometry) { if(geometry==null) { return null; } WKTWriter wktWriter = new WKTWriter(); return wktWriter.write(geometry); }
[ "public", "static", "String", "asWKT", "(", "Geometry", "geometry", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "WKTWriter", "wktWriter", "=", "new", "WKTWriter", "(", ")", ";", "return", "wktWriter", ".", "write"...
Convert a Geometry value into a Well Known Text value. @param geometry Geometry instance @return The String representation
[ "Convert", "a", "Geometry", "value", "into", "a", "Well", "Known", "Text", "value", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_AsWKT.java#L49-L55
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_MultiplyZ.java
ST_MultiplyZ.multiplyZ
public static Geometry multiplyZ(Geometry geometry, double z) throws SQLException { if(geometry == null){ return null; } geometry.apply(new MultiplyZCoordinateSequenceFilter(z)); return geometry; }
java
public static Geometry multiplyZ(Geometry geometry, double z) throws SQLException { if(geometry == null){ return null; } geometry.apply(new MultiplyZCoordinateSequenceFilter(z)); return geometry; }
[ "public", "static", "Geometry", "multiplyZ", "(", "Geometry", "geometry", ",", "double", "z", ")", "throws", "SQLException", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "geometry", ".", "apply", "(", "new", "MultiplyZCoo...
Multiply the z values of the geometry by another double value. NaN values are not updated. @param geometry @param z @return @throws java.sql.SQLException
[ "Multiply", "the", "z", "values", "of", "the", "geometry", "by", "another", "double", "value", ".", "NaN", "values", "are", "not", "updated", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_MultiplyZ.java#L56-L62
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/SHPDriver.java
SHPDriver.insertRow
@Override public void insertRow(Object[] values) throws IOException { if(!(values[geometryFieldIndex] instanceof Geometry)) { if(values[geometryFieldIndex]==null) { throw new IOException("Shape files do not support NULL Geometry values."); } else { thr...
java
@Override public void insertRow(Object[] values) throws IOException { if(!(values[geometryFieldIndex] instanceof Geometry)) { if(values[geometryFieldIndex]==null) { throw new IOException("Shape files do not support NULL Geometry values."); } else { thr...
[ "@", "Override", "public", "void", "insertRow", "(", "Object", "[", "]", "values", ")", "throws", "IOException", "{", "if", "(", "!", "(", "values", "[", "geometryFieldIndex", "]", "instanceof", "Geometry", ")", ")", "{", "if", "(", "values", "[", "geome...
Insert values in the row @param values @throws IOException
[ "Insert", "values", "in", "the", "row" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/SHPDriver.java#L71-L93
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/SHPDriver.java
SHPDriver.initDriver
public void initDriver(File shpFile, ShapeType shapeType, DbaseFileHeader dbaseHeader) throws IOException { String path = shpFile.getAbsolutePath(); String nameWithoutExt = path.substring(0,path.lastIndexOf('.')); this.shpFile = new File(nameWithoutExt+".shp"); this.shxFile = new File(na...
java
public void initDriver(File shpFile, ShapeType shapeType, DbaseFileHeader dbaseHeader) throws IOException { String path = shpFile.getAbsolutePath(); String nameWithoutExt = path.substring(0,path.lastIndexOf('.')); this.shpFile = new File(nameWithoutExt+".shp"); this.shxFile = new File(na...
[ "public", "void", "initDriver", "(", "File", "shpFile", ",", "ShapeType", "shapeType", ",", "DbaseFileHeader", "dbaseHeader", ")", "throws", "IOException", "{", "String", "path", "=", "shpFile", ".", "getAbsolutePath", "(", ")", ";", "String", "nameWithoutExt", ...
Init Driver for Write mode @param shpFile @param shapeType @param dbaseHeader @throws IOException
[ "Init", "Driver", "for", "Write", "mode" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/SHPDriver.java#L109-L121
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java
ST_CollectionExtract.getPunctualGeometry
private static void getPunctualGeometry(ArrayList<Point> points, Geometry geometry) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if(subGeom instanceof Point){ points.add((Point) subGeom); } ...
java
private static void getPunctualGeometry(ArrayList<Point> points, Geometry geometry) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if(subGeom instanceof Point){ points.add((Point) subGeom); } ...
[ "private", "static", "void", "getPunctualGeometry", "(", "ArrayList", "<", "Point", ">", "points", ",", "Geometry", "geometry", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "geometry", ".", "getNumGeometries", "(", ")", ";", "i", "++", ")...
Filter point from a geometry @param points @param geometry
[ "Filter", "point", "from", "a", "geometry" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java#L106-L116
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java
ST_CollectionExtract.getLinealGeometry
private static void getLinealGeometry(ArrayList<LineString> lines, Geometry geometry) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if(subGeom instanceof LineString){ lines.add((LineString) subGeom); } ...
java
private static void getLinealGeometry(ArrayList<LineString> lines, Geometry geometry) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if(subGeom instanceof LineString){ lines.add((LineString) subGeom); } ...
[ "private", "static", "void", "getLinealGeometry", "(", "ArrayList", "<", "LineString", ">", "lines", ",", "Geometry", "geometry", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "geometry", ".", "getNumGeometries", "(", ")", ";", "i", "++", ...
Filter line from a geometry @param lines @param geometry
[ "Filter", "line", "from", "a", "geometry" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java#L123-L133
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java
ST_CollectionExtract.getArealGeometry
private static void getArealGeometry(ArrayList<Polygon> polygones, Geometry geometry) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if(subGeom instanceof Polygon){ polygones.add((Polygon) subGeom); } ...
java
private static void getArealGeometry(ArrayList<Polygon> polygones, Geometry geometry) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if(subGeom instanceof Polygon){ polygones.add((Polygon) subGeom); } ...
[ "private", "static", "void", "getArealGeometry", "(", "ArrayList", "<", "Polygon", ">", "polygones", ",", "Geometry", "geometry", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "geometry", ".", "getNumGeometries", "(", ")", ";", "i", "++", ...
Filter polygon from a geometry @param polygones @param geometry
[ "Filter", "polygon", "from", "a", "geometry" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java#L140-L150
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_AsGML.java
ST_AsGML.toGML
public static String toGML(Geometry geom) { if (geom == null) { return null; } int srid = geom.getSRID(); GMLWriter gmlw = new GMLWriter(); if (srid != -1 || srid != 0) { gmlw.setSrsName("EPSG:" + geom.getSRID()); } return gmlw.write(geom);...
java
public static String toGML(Geometry geom) { if (geom == null) { return null; } int srid = geom.getSRID(); GMLWriter gmlw = new GMLWriter(); if (srid != -1 || srid != 0) { gmlw.setSrsName("EPSG:" + geom.getSRID()); } return gmlw.write(geom);...
[ "public", "static", "String", "toGML", "(", "Geometry", "geom", ")", "{", "if", "(", "geom", "==", "null", ")", "{", "return", "null", ";", "}", "int", "srid", "=", "geom", ".", "getSRID", "(", ")", ";", "GMLWriter", "gmlw", "=", "new", "GMLWriter", ...
Write the GML @param geom @return
[ "Write", "the", "GML" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_AsGML.java#L48-L58
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ProjectPoint.java
ST_ProjectPoint.projectPoint
public static Point projectPoint(Geometry point, Geometry geometry) { if (point == null || geometry==null) { return null; } if (point.getDimension()==0 && geometry.getDimension() == 1) { LengthIndexedLine ll = new LengthIndexedLine(geometry); double index = ll...
java
public static Point projectPoint(Geometry point, Geometry geometry) { if (point == null || geometry==null) { return null; } if (point.getDimension()==0 && geometry.getDimension() == 1) { LengthIndexedLine ll = new LengthIndexedLine(geometry); double index = ll...
[ "public", "static", "Point", "projectPoint", "(", "Geometry", "point", ",", "Geometry", "geometry", ")", "{", "if", "(", "point", "==", "null", "||", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "point", ".", "getDimension",...
Project a point on a linestring or multilinestring @param point @param geometry @return
[ "Project", "a", "point", "on", "a", "linestring", "or", "multilinestring" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ProjectPoint.java#L52-L63
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_TriangleContouring.java
ST_TriangleContouring.triangleContouring
public static ResultSet triangleContouring(Connection connection, String tableName, Value... varArgs) throws SQLException { if (connection.getMetaData().getURL().equals(HACK_URL)) { return new ExplodeResultSet(connection,tableName, Collections.singletonList(0.0)).getResultSet(); } Ex...
java
public static ResultSet triangleContouring(Connection connection, String tableName, Value... varArgs) throws SQLException { if (connection.getMetaData().getURL().equals(HACK_URL)) { return new ExplodeResultSet(connection,tableName, Collections.singletonList(0.0)).getResultSet(); } Ex...
[ "public", "static", "ResultSet", "triangleContouring", "(", "Connection", "connection", ",", "String", "tableName", ",", "Value", "...", "varArgs", ")", "throws", "SQLException", "{", "if", "(", "connection", ".", "getMetaData", "(", ")", ".", "getURL", "(", "...
Iso contouring using Z,M attributes of geometries @param connection Active connection @param tableName Table name @param varArgs Iso levels @return Result Set @throws SQLException
[ "Iso", "contouring", "using", "Z", "M", "attributes", "of", "geometries" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_TriangleContouring.java#L83-L117
train
orbisgis/h2gis
h2gis-network/src/main/java/org/h2gis/network/functions/ST_ConnectedComponents.java
ST_ConnectedComponents.getConnectedComponents
public static boolean getConnectedComponents(Connection connection, String inputTable, String orientation) throws SQLException { KeyedGraph graph = prepareGraph(connection, inputTable, orientation, null, ...
java
public static boolean getConnectedComponents(Connection connection, String inputTable, String orientation) throws SQLException { KeyedGraph graph = prepareGraph(connection, inputTable, orientation, null, ...
[ "public", "static", "boolean", "getConnectedComponents", "(", "Connection", "connection", ",", "String", "inputTable", ",", "String", "orientation", ")", "throws", "SQLException", "{", "KeyedGraph", "graph", "=", "prepareGraph", "(", "connection", ",", "inputTable", ...
Calculate the node and edge connected component tables. @param connection Connection @param inputTable Edges table produced by ST_Graph @param orientation Orientation string @return True if the calculation was successful @throws SQLException
[ "Calculate", "the", "node", "and", "edge", "connected", "component", "tables", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-network/src/main/java/org/h2gis/network/functions/ST_ConnectedComponents.java#L91-L111
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakeLine.java
ST_MakeLine.createLine
public static LineString createLine(Geometry pointA, Geometry... optionalPoints) throws SQLException { if( pointA == null || optionalPoints.length > 0 && optionalPoints[0] == null) { return null; } if (pointA.getNumGeometries() == 1 && !atLeastTwoPoints(optionalPoints, countPoints(po...
java
public static LineString createLine(Geometry pointA, Geometry... optionalPoints) throws SQLException { if( pointA == null || optionalPoints.length > 0 && optionalPoints[0] == null) { return null; } if (pointA.getNumGeometries() == 1 && !atLeastTwoPoints(optionalPoints, countPoints(po...
[ "public", "static", "LineString", "createLine", "(", "Geometry", "pointA", ",", "Geometry", "...", "optionalPoints", ")", "throws", "SQLException", "{", "if", "(", "pointA", "==", "null", "||", "optionalPoints", ".", "length", ">", "0", "&&", "optionalPoints", ...
Constructs a LINESTRING from the given POINTs or MULTIPOINTs @param pointA The first POINT or MULTIPOINT @param optionalPoints Optional POINTs or MULTIPOINTs @return The LINESTRING constructed from the given POINTs or MULTIPOINTs @throws SQLException
[ "Constructs", "a", "LINESTRING", "from", "the", "given", "POINTs", "or", "MULTIPOINTs" ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakeLine.java#L57-L71
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserRte.java
AbstractGpxParserRte.initialise
public void initialise(XMLReader reader, AbstractGpxParserDefault parent) { setReader(reader); setParent(parent); setContentBuffer(parent.getContentBuffer()); setRtePreparedStmt(parent.getRtePreparedStmt()); setRteptPreparedStmt(parent.getRteptPreparedStmt()); setElementN...
java
public void initialise(XMLReader reader, AbstractGpxParserDefault parent) { setReader(reader); setParent(parent); setContentBuffer(parent.getContentBuffer()); setRtePreparedStmt(parent.getRtePreparedStmt()); setRteptPreparedStmt(parent.getRteptPreparedStmt()); setElementN...
[ "public", "void", "initialise", "(", "XMLReader", "reader", ",", "AbstractGpxParserDefault", "parent", ")", "{", "setReader", "(", "reader", ")", ";", "setParent", "(", "parent", ")", ";", "setContentBuffer", "(", "parent", ".", "getContentBuffer", "(", ")", "...
Create a new specific parser. It has in memory the default parser, the contentBuffer, the elementNames, the currentLine and the rteID. @param reader The XMLReader used in the default class @param parent The parser used in the default class
[ "Create", "a", "new", "specific", "parser", ".", "It", "has", "in", "memory", "the", "default", "parser", "the", "contentBuffer", "the", "elementNames", "the", "currentLine", "and", "the", "rteID", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserRte.java#L58-L67
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXCoordinate.java
GPXCoordinate.createCoordinate
public static Coordinate createCoordinate(Attributes attributes) throws NumberFormatException { // Associate a latitude and a longitude to the point double lat; double lon; try { lat = Double.parseDouble(attributes.getValue(GPXTags.LAT)); } catch (NumberFormatExceptio...
java
public static Coordinate createCoordinate(Attributes attributes) throws NumberFormatException { // Associate a latitude and a longitude to the point double lat; double lon; try { lat = Double.parseDouble(attributes.getValue(GPXTags.LAT)); } catch (NumberFormatExceptio...
[ "public", "static", "Coordinate", "createCoordinate", "(", "Attributes", "attributes", ")", "throws", "NumberFormatException", "{", "// Associate a latitude and a longitude to the point", "double", "lat", ";", "double", "lon", ";", "try", "{", "lat", "=", "Double", ".",...
General method to create a coordinate from a gpx point. @param attributes Attributes of the point. Here it is latitude and longitude @throws NumberFormatException @return a coordinate
[ "General", "method", "to", "create", "a", "coordinate", "from", "a", "gpx", "point", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXCoordinate.java#L40-L65
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_XMin.java
ST_XMin.getMinX
public static Double getMinX(Geometry geom) { if (geom != null) { return geom.getEnvelopeInternal().getMinX(); } else { return null; } }
java
public static Double getMinX(Geometry geom) { if (geom != null) { return geom.getEnvelopeInternal().getMinX(); } else { return null; } }
[ "public", "static", "Double", "getMinX", "(", "Geometry", "geom", ")", "{", "if", "(", "geom", "!=", "null", ")", "{", "return", "geom", ".", "getEnvelopeInternal", "(", ")", ".", "getMinX", "(", ")", ";", "}", "else", "{", "return", "null", ";", "}"...
Returns the minimal x-value of the given geometry. @param geom Geometry @return The minimal x-value of the given geometry, or null if the geometry is null.
[ "Returns", "the", "minimal", "x", "-", "value", "of", "the", "given", "geometry", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_XMin.java#L48-L54
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePoint.java
ST_MakePoint.createPoint
public static Point createPoint(double x, double y) throws SQLException { return createPoint(x, y, Coordinate.NULL_ORDINATE); }
java
public static Point createPoint(double x, double y) throws SQLException { return createPoint(x, y, Coordinate.NULL_ORDINATE); }
[ "public", "static", "Point", "createPoint", "(", "double", "x", ",", "double", "y", ")", "throws", "SQLException", "{", "return", "createPoint", "(", "x", ",", "y", ",", "Coordinate", ".", "NULL_ORDINATE", ")", ";", "}" ]
Constructs POINT from two doubles. @param x X-coordinate @param y Y-coordinate @return The POINT constructed from the given coordinatesk @throws java.sql.SQLException
[ "Constructs", "POINT", "from", "two", "doubles", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePoint.java#L56-L58
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePoint.java
ST_MakePoint.createPoint
public static Point createPoint(double x, double y, double z) throws SQLException { return GF.createPoint(new Coordinate(x, y, z)); }
java
public static Point createPoint(double x, double y, double z) throws SQLException { return GF.createPoint(new Coordinate(x, y, z)); }
[ "public", "static", "Point", "createPoint", "(", "double", "x", ",", "double", "y", ",", "double", "z", ")", "throws", "SQLException", "{", "return", "GF", ".", "createPoint", "(", "new", "Coordinate", "(", "x", ",", "y", ",", "z", ")", ")", ";", "}"...
Constructs POINT from three doubles. @param x X-coordinate @param y Y-coordinate @param z Z-coordinate @return The POINT constructed from the given coordinates @throws SQLException
[ "Constructs", "POINT", "from", "three", "doubles", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePoint.java#L69-L71
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java
GPXPoint.setAttribute
public final void setAttribute(String currentElement, StringBuilder contentBuffer) { if (currentElement.equalsIgnoreCase(GPXTags.TIME)) { setTime(contentBuffer); } else if (currentElement.equalsIgnoreCase(GPXTags.MAGVAR)) { setMagvar(contentBuffer); } else if (currentElem...
java
public final void setAttribute(String currentElement, StringBuilder contentBuffer) { if (currentElement.equalsIgnoreCase(GPXTags.TIME)) { setTime(contentBuffer); } else if (currentElement.equalsIgnoreCase(GPXTags.MAGVAR)) { setMagvar(contentBuffer); } else if (currentElem...
[ "public", "final", "void", "setAttribute", "(", "String", "currentElement", ",", "StringBuilder", "contentBuffer", ")", "{", "if", "(", "currentElement", ".", "equalsIgnoreCase", "(", "GPXTags", ".", "TIME", ")", ")", "{", "setTime", "(", "contentBuffer", ")", ...
Set an attribute for a point. The String currentElement gives the information of which attribute have to be setted. The attribute to set is given by the StringBuilder contentBuffer. @param currentElement a string presenting the text of the current markup. @param contentBuffer it contains all informations about the cur...
[ "Set", "an", "attribute", "for", "a", "point", ".", "The", "String", "currentElement", "gives", "the", "information", "of", "which", "attribute", "have", "to", "be", "setted", ".", "The", "attribute", "to", "set", "is", "given", "by", "the", "StringBuilder",...
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L61-L97
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java
GPXPoint.setLink
public final void setLink(Attributes attributes) { ptValues[GpxMetadata.PTLINK] = attributes.getValue(GPXTags.HREF); }
java
public final void setLink(Attributes attributes) { ptValues[GpxMetadata.PTLINK] = attributes.getValue(GPXTags.HREF); }
[ "public", "final", "void", "setLink", "(", "Attributes", "attributes", ")", "{", "ptValues", "[", "GpxMetadata", ".", "PTLINK", "]", "=", "attributes", ".", "getValue", "(", "GPXTags", ".", "HREF", ")", ";", "}" ]
Set a link to additional information about the point. @param attributes The current attributes being parsed
[ "Set", "a", "link", "to", "additional", "information", "about", "the", "point", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L180-L182
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java
GPXPoint.setSat
public final void setSat(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTSAT] = Integer.parseInt(contentBuffer.toString()); }
java
public final void setSat(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTSAT] = Integer.parseInt(contentBuffer.toString()); }
[ "public", "final", "void", "setSat", "(", "StringBuilder", "contentBuffer", ")", "{", "ptValues", "[", "GpxMetadata", ".", "PTSAT", "]", "=", "Integer", ".", "parseInt", "(", "contentBuffer", ".", "toString", "(", ")", ")", ";", "}" ]
Set the number of satellites used to calculate the GPX fix for a point. @param contentBuffer Contains the information to put in the table
[ "Set", "the", "number", "of", "satellites", "used", "to", "calculate", "the", "GPX", "fix", "for", "a", "point", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L234-L236
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java
GPXPoint.setHdop
public final void setHdop(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTHDOP] = Double.parseDouble(contentBuffer.toString()); }
java
public final void setHdop(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTHDOP] = Double.parseDouble(contentBuffer.toString()); }
[ "public", "final", "void", "setHdop", "(", "StringBuilder", "contentBuffer", ")", "{", "ptValues", "[", "GpxMetadata", ".", "PTHDOP", "]", "=", "Double", ".", "parseDouble", "(", "contentBuffer", ".", "toString", "(", ")", ")", ";", "}" ]
Set the horizontal dilution of precision of a point. @param contentBuffer Contains the information to put in the table
[ "Set", "the", "horizontal", "dilution", "of", "precision", "of", "a", "point", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L243-L245
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java
GPXPoint.setVdop
public final void setVdop(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTVDOP] = Double.parseDouble(contentBuffer.toString()); }
java
public final void setVdop(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTVDOP] = Double.parseDouble(contentBuffer.toString()); }
[ "public", "final", "void", "setVdop", "(", "StringBuilder", "contentBuffer", ")", "{", "ptValues", "[", "GpxMetadata", ".", "PTVDOP", "]", "=", "Double", ".", "parseDouble", "(", "contentBuffer", ".", "toString", "(", ")", ")", ";", "}" ]
Set the vertical dilution of precision of a point. @param contentBuffer Contains the information to put in the table
[ "Set", "the", "vertical", "dilution", "of", "precision", "of", "a", "point", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L252-L254
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java
GPXPoint.setPdop
public final void setPdop(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTPDOP] = Double.parseDouble(contentBuffer.toString()); }
java
public final void setPdop(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTPDOP] = Double.parseDouble(contentBuffer.toString()); }
[ "public", "final", "void", "setPdop", "(", "StringBuilder", "contentBuffer", ")", "{", "ptValues", "[", "GpxMetadata", ".", "PTPDOP", "]", "=", "Double", ".", "parseDouble", "(", "contentBuffer", ".", "toString", "(", ")", ")", ";", "}" ]
Set the position dilution of precision of a point. @param contentBuffer Contains the information to put in the table
[ "Set", "the", "position", "dilution", "of", "precision", "of", "a", "point", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L261-L263
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java
GPXPoint.setAgeofdgpsdata
public final void setAgeofdgpsdata(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTAGEOFDGPSDATA] = Double.parseDouble(contentBuffer.toString()); }
java
public final void setAgeofdgpsdata(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTAGEOFDGPSDATA] = Double.parseDouble(contentBuffer.toString()); }
[ "public", "final", "void", "setAgeofdgpsdata", "(", "StringBuilder", "contentBuffer", ")", "{", "ptValues", "[", "GpxMetadata", ".", "PTAGEOFDGPSDATA", "]", "=", "Double", ".", "parseDouble", "(", "contentBuffer", ".", "toString", "(", ")", ")", ";", "}" ]
Set number of seconds since last DGPS update for a point. @param contentBuffer Contains the information to put in the table
[ "Set", "number", "of", "seconds", "since", "last", "DGPS", "update", "for", "a", "point", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L270-L272
train
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java
GPXPoint.setDgpsid
public final void setDgpsid(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTDGPSID] = Integer.parseInt(contentBuffer.toString()); }
java
public final void setDgpsid(StringBuilder contentBuffer) { ptValues[GpxMetadata.PTDGPSID] = Integer.parseInt(contentBuffer.toString()); }
[ "public", "final", "void", "setDgpsid", "(", "StringBuilder", "contentBuffer", ")", "{", "ptValues", "[", "GpxMetadata", ".", "PTDGPSID", "]", "=", "Integer", ".", "parseInt", "(", "contentBuffer", ".", "toString", "(", ")", ")", ";", "}" ]
Set ID of DGPS station used in differential correction for a point. @param contentBuffer Contains the information to put in the table
[ "Set", "ID", "of", "DGPS", "station", "used", "in", "differential", "correction", "for", "a", "point", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L279-L281
train
orbisgis/h2gis
h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java
GraphFunctionParser.parseGlobalOrientation
protected static Orientation parseGlobalOrientation(String v) { if (v == null) { return null; } if (isDirectedString(v)) { return Orientation.DIRECTED; } else if (isReversedString(v)) { return Orientation.REVERSED; } else if (isUndirectedString...
java
protected static Orientation parseGlobalOrientation(String v) { if (v == null) { return null; } if (isDirectedString(v)) { return Orientation.DIRECTED; } else if (isReversedString(v)) { return Orientation.REVERSED; } else if (isUndirectedString...
[ "protected", "static", "Orientation", "parseGlobalOrientation", "(", "String", "v", ")", "{", "if", "(", "v", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "isDirectedString", "(", "v", ")", ")", "{", "return", "Orientation", ".", "DIREC...
Recovers the global orientation from a string. @param v String @return The global orientation
[ "Recovers", "the", "global", "orientation", "from", "a", "string", "." ]
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-network/src/main/java/org/h2gis/network/functions/GraphFunctionParser.java#L71-L84
train