id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
49,200 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.updateWorkspace | public ServiceCall<Workspace> updateWorkspace(UpdateWorkspaceOptions updateWorkspaceOptions) {
Validator.notNull(updateWorkspaceOptions, "updateWorkspaceOptions cannot be null");
String[] pathSegments = { "v1/workspaces" };
String[] pathParameters = { updateWorkspaceOptions.workspaceId() };
RequestBuild... | java | public ServiceCall<Workspace> updateWorkspace(UpdateWorkspaceOptions updateWorkspaceOptions) {
Validator.notNull(updateWorkspaceOptions, "updateWorkspaceOptions cannot be null");
String[] pathSegments = { "v1/workspaces" };
String[] pathParameters = { updateWorkspaceOptions.workspaceId() };
RequestBuild... | [
"public",
"ServiceCall",
"<",
"Workspace",
">",
"updateWorkspace",
"(",
"UpdateWorkspaceOptions",
"updateWorkspaceOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"updateWorkspaceOptions",
",",
"\"updateWorkspaceOptions cannot be null\"",
")",
";",
"String",
"[",
"]"... | Update workspace.
Update an existing workspace with new or modified data. You must provide component objects defining the content of
the updated workspace.
This operation is limited to 30 request per 30 minutes. For more information, see **Rate limiting**.
@param updateWorkspaceOptions the {@link UpdateWorkspaceOpti... | [
"Update",
"workspace",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L394-L442 |
49,201 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.createIntent | public ServiceCall<Intent> createIntent(CreateIntentOptions createIntentOptions) {
Validator.notNull(createIntentOptions, "createIntentOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents" };
String[] pathParameters = { createIntentOptions.workspaceId() };
RequestBuilder builder... | java | public ServiceCall<Intent> createIntent(CreateIntentOptions createIntentOptions) {
Validator.notNull(createIntentOptions, "createIntentOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents" };
String[] pathParameters = { createIntentOptions.workspaceId() };
RequestBuilder builder... | [
"public",
"ServiceCall",
"<",
"Intent",
">",
"createIntent",
"(",
"CreateIntentOptions",
"createIntentOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"createIntentOptions",
",",
"\"createIntentOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments"... | Create intent.
Create a new intent.
This operation is limited to 2000 requests per 30 minutes. For more information, see **Rate limiting**.
@param createIntentOptions the {@link CreateIntentOptions} containing the options for the call
@return a {@link ServiceCall} with a response type of {@link Intent} | [
"Create",
"intent",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L454-L476 |
49,202 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.getIntent | public ServiceCall<Intent> getIntent(GetIntentOptions getIntentOptions) {
Validator.notNull(getIntentOptions, "getIntentOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents" };
String[] pathParameters = { getIntentOptions.workspaceId(), getIntentOptions.intent() };
RequestBuilde... | java | public ServiceCall<Intent> getIntent(GetIntentOptions getIntentOptions) {
Validator.notNull(getIntentOptions, "getIntentOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents" };
String[] pathParameters = { getIntentOptions.workspaceId(), getIntentOptions.intent() };
RequestBuilde... | [
"public",
"ServiceCall",
"<",
"Intent",
">",
"getIntent",
"(",
"GetIntentOptions",
"getIntentOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"getIntentOptions",
",",
"\"getIntentOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"=",
"{",... | Get intent.
Get information about an intent, optionally including all intent content.
With **export**=`false`, this operation is limited to 6000 requests per 5 minutes. With **export**=`true`, the
limit is 400 requests per 30 minutes. For more information, see **Rate limiting**.
@param getIntentOptions the {@link Ge... | [
"Get",
"intent",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L514-L533 |
49,203 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.listIntents | public ServiceCall<IntentCollection> listIntents(ListIntentsOptions listIntentsOptions) {
Validator.notNull(listIntentsOptions, "listIntentsOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents" };
String[] pathParameters = { listIntentsOptions.workspaceId() };
RequestBuilder bui... | java | public ServiceCall<IntentCollection> listIntents(ListIntentsOptions listIntentsOptions) {
Validator.notNull(listIntentsOptions, "listIntentsOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents" };
String[] pathParameters = { listIntentsOptions.workspaceId() };
RequestBuilder bui... | [
"public",
"ServiceCall",
"<",
"IntentCollection",
">",
"listIntents",
"(",
"ListIntentsOptions",
"listIntentsOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"listIntentsOptions",
",",
"\"listIntentsOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegm... | List intents.
List the intents for a workspace.
With **export**=`false`, this operation is limited to 2000 requests per 30 minutes. With **export**=`true`, the
limit is 400 requests per 30 minutes. For more information, see **Rate limiting**.
@param listIntentsOptions the {@link ListIntentsOptions} containing the op... | [
"List",
"intents",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L546-L577 |
49,204 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.updateIntent | public ServiceCall<Intent> updateIntent(UpdateIntentOptions updateIntentOptions) {
Validator.notNull(updateIntentOptions, "updateIntentOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents" };
String[] pathParameters = { updateIntentOptions.workspaceId(), updateIntentOptions.intent()... | java | public ServiceCall<Intent> updateIntent(UpdateIntentOptions updateIntentOptions) {
Validator.notNull(updateIntentOptions, "updateIntentOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents" };
String[] pathParameters = { updateIntentOptions.workspaceId(), updateIntentOptions.intent()... | [
"public",
"ServiceCall",
"<",
"Intent",
">",
"updateIntent",
"(",
"UpdateIntentOptions",
"updateIntentOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"updateIntentOptions",
",",
"\"updateIntentOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments"... | Update intent.
Update an existing intent with new or modified data. You must provide component objects defining the content of the
updated intent.
This operation is limited to 2000 requests per 30 minutes. For more information, see **Rate limiting**.
@param updateIntentOptions the {@link UpdateIntentOptions} contain... | [
"Update",
"intent",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L590-L614 |
49,205 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.createExample | public ServiceCall<Example> createExample(CreateExampleOptions createExampleOptions) {
Validator.notNull(createExampleOptions, "createExampleOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents", "examples" };
String[] pathParameters = { createExampleOptions.workspaceId(), createExa... | java | public ServiceCall<Example> createExample(CreateExampleOptions createExampleOptions) {
Validator.notNull(createExampleOptions, "createExampleOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents", "examples" };
String[] pathParameters = { createExampleOptions.workspaceId(), createExa... | [
"public",
"ServiceCall",
"<",
"Example",
">",
"createExample",
"(",
"CreateExampleOptions",
"createExampleOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"createExampleOptions",
",",
"\"createExampleOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSeg... | Create user input example.
Add a new user input example to an intent.
This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**.
@param createExampleOptions the {@link CreateExampleOptions} containing the options for the call
@return a {@link ServiceCall} with a response ... | [
"Create",
"user",
"input",
"example",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L626-L645 |
49,206 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.getExample | public ServiceCall<Example> getExample(GetExampleOptions getExampleOptions) {
Validator.notNull(getExampleOptions, "getExampleOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents", "examples" };
String[] pathParameters = { getExampleOptions.workspaceId(), getExampleOptions.intent(),... | java | public ServiceCall<Example> getExample(GetExampleOptions getExampleOptions) {
Validator.notNull(getExampleOptions, "getExampleOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents", "examples" };
String[] pathParameters = { getExampleOptions.workspaceId(), getExampleOptions.intent(),... | [
"public",
"ServiceCall",
"<",
"Example",
">",
"getExample",
"(",
"GetExampleOptions",
"getExampleOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"getExampleOptions",
",",
"\"getExampleOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"=",
... | Get user input example.
Get information about a user input example.
This operation is limited to 6000 requests per 5 minutes. For more information, see **Rate limiting**.
@param getExampleOptions the {@link GetExampleOptions} containing the options for the call
@return a {@link ServiceCall} with a response type of {... | [
"Get",
"user",
"input",
"example",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L683-L699 |
49,207 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.listExamples | public ServiceCall<ExampleCollection> listExamples(ListExamplesOptions listExamplesOptions) {
Validator.notNull(listExamplesOptions, "listExamplesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents", "examples" };
String[] pathParameters = { listExamplesOptions.workspaceId(), listE... | java | public ServiceCall<ExampleCollection> listExamples(ListExamplesOptions listExamplesOptions) {
Validator.notNull(listExamplesOptions, "listExamplesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "intents", "examples" };
String[] pathParameters = { listExamplesOptions.workspaceId(), listE... | [
"public",
"ServiceCall",
"<",
"ExampleCollection",
">",
"listExamples",
"(",
"ListExamplesOptions",
"listExamplesOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"listExamplesOptions",
",",
"\"listExamplesOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pa... | List user input examples.
List the user input examples for an intent, optionally including contextual entity mentions.
This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate limiting**.
@param listExamplesOptions the {@link ListExamplesOptions} containing the options for the call... | [
"List",
"user",
"input",
"examples",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L711-L739 |
49,208 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.getCounterexample | public ServiceCall<Counterexample> getCounterexample(GetCounterexampleOptions getCounterexampleOptions) {
Validator.notNull(getCounterexampleOptions, "getCounterexampleOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "counterexamples" };
String[] pathParameters = { getCounterexampleOptio... | java | public ServiceCall<Counterexample> getCounterexample(GetCounterexampleOptions getCounterexampleOptions) {
Validator.notNull(getCounterexampleOptions, "getCounterexampleOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "counterexamples" };
String[] pathParameters = { getCounterexampleOptio... | [
"public",
"ServiceCall",
"<",
"Counterexample",
">",
"getCounterexample",
"(",
"GetCounterexampleOptions",
"getCounterexampleOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"getCounterexampleOptions",
",",
"\"getCounterexampleOptions cannot be null\"",
")",
";",
"String... | Get counterexample.
Get information about a counterexample. Counterexamples are examples that have been marked as irrelevant input.
This operation is limited to 6000 requests per 5 minutes. For more information, see **Rate limiting**.
@param getCounterexampleOptions the {@link GetCounterexampleOptions} containing th... | [
"Get",
"counterexample",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L838-L854 |
49,209 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.listCounterexamples | public ServiceCall<CounterexampleCollection> listCounterexamples(
ListCounterexamplesOptions listCounterexamplesOptions) {
Validator.notNull(listCounterexamplesOptions, "listCounterexamplesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "counterexamples" };
String[] pathParameters... | java | public ServiceCall<CounterexampleCollection> listCounterexamples(
ListCounterexamplesOptions listCounterexamplesOptions) {
Validator.notNull(listCounterexamplesOptions, "listCounterexamplesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "counterexamples" };
String[] pathParameters... | [
"public",
"ServiceCall",
"<",
"CounterexampleCollection",
">",
"listCounterexamples",
"(",
"ListCounterexamplesOptions",
"listCounterexamplesOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"listCounterexamplesOptions",
",",
"\"listCounterexamplesOptions cannot be null\"",
"... | List counterexamples.
List the counterexamples for a workspace. Counterexamples are examples that have been marked as irrelevant input.
This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate limiting**.
@param listCounterexamplesOptions the {@link ListCounterexamplesOptions} cont... | [
"List",
"counterexamples",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L866-L895 |
49,210 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.updateCounterexample | public ServiceCall<Counterexample> updateCounterexample(UpdateCounterexampleOptions updateCounterexampleOptions) {
Validator.notNull(updateCounterexampleOptions, "updateCounterexampleOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "counterexamples" };
String[] pathParameters = { updateC... | java | public ServiceCall<Counterexample> updateCounterexample(UpdateCounterexampleOptions updateCounterexampleOptions) {
Validator.notNull(updateCounterexampleOptions, "updateCounterexampleOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "counterexamples" };
String[] pathParameters = { updateC... | [
"public",
"ServiceCall",
"<",
"Counterexample",
">",
"updateCounterexample",
"(",
"UpdateCounterexampleOptions",
"updateCounterexampleOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"updateCounterexampleOptions",
",",
"\"updateCounterexampleOptions cannot be null\"",
")",
... | Update counterexample.
Update the text of a counterexample. Counterexamples are examples that have been marked as irrelevant input.
This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**.
@param updateCounterexampleOptions the {@link UpdateCounterexampleOptions} contai... | [
"Update",
"counterexample",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L907-L925 |
49,211 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.createEntity | public ServiceCall<Entity> createEntity(CreateEntityOptions createEntityOptions) {
Validator.notNull(createEntityOptions, "createEntityOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities" };
String[] pathParameters = { createEntityOptions.workspaceId() };
RequestBuilder builde... | java | public ServiceCall<Entity> createEntity(CreateEntityOptions createEntityOptions) {
Validator.notNull(createEntityOptions, "createEntityOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities" };
String[] pathParameters = { createEntityOptions.workspaceId() };
RequestBuilder builde... | [
"public",
"ServiceCall",
"<",
"Entity",
">",
"createEntity",
"(",
"CreateEntityOptions",
"createEntityOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"createEntityOptions",
",",
"\"createEntityOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments"... | Create entity.
Create a new entity, or enable a system entity.
This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**.
@param createEntityOptions the {@link CreateEntityOptions} containing the options for the call
@return a {@link ServiceCall} with a response type of {... | [
"Create",
"entity",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L937-L965 |
49,212 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.getEntity | public ServiceCall<Entity> getEntity(GetEntityOptions getEntityOptions) {
Validator.notNull(getEntityOptions, "getEntityOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities" };
String[] pathParameters = { getEntityOptions.workspaceId(), getEntityOptions.entity() };
RequestBuild... | java | public ServiceCall<Entity> getEntity(GetEntityOptions getEntityOptions) {
Validator.notNull(getEntityOptions, "getEntityOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities" };
String[] pathParameters = { getEntityOptions.workspaceId(), getEntityOptions.entity() };
RequestBuild... | [
"public",
"ServiceCall",
"<",
"Entity",
">",
"getEntity",
"(",
"GetEntityOptions",
"getEntityOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"getEntityOptions",
",",
"\"getEntityOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"=",
"{",... | Get entity.
Get information about an entity, optionally including all entity content.
With **export**=`false`, this operation is limited to 6000 requests per 5 minutes. With **export**=`true`, the
limit is 200 requests per 30 minutes. For more information, see **Rate limiting**.
@param getEntityOptions the {@link Ge... | [
"Get",
"entity",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1003-L1022 |
49,213 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.listEntities | public ServiceCall<EntityCollection> listEntities(ListEntitiesOptions listEntitiesOptions) {
Validator.notNull(listEntitiesOptions, "listEntitiesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities" };
String[] pathParameters = { listEntitiesOptions.workspaceId() };
RequestBuil... | java | public ServiceCall<EntityCollection> listEntities(ListEntitiesOptions listEntitiesOptions) {
Validator.notNull(listEntitiesOptions, "listEntitiesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities" };
String[] pathParameters = { listEntitiesOptions.workspaceId() };
RequestBuil... | [
"public",
"ServiceCall",
"<",
"EntityCollection",
">",
"listEntities",
"(",
"ListEntitiesOptions",
"listEntitiesOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"listEntitiesOptions",
",",
"\"listEntitiesOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pat... | List entities.
List the entities for a workspace.
With **export**=`false`, this operation is limited to 1000 requests per 30 minutes. With **export**=`true`, the
limit is 200 requests per 30 minutes. For more information, see **Rate limiting**.
@param listEntitiesOptions the {@link ListEntitiesOptions} containing th... | [
"List",
"entities",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1035-L1066 |
49,214 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.updateEntity | public ServiceCall<Entity> updateEntity(UpdateEntityOptions updateEntityOptions) {
Validator.notNull(updateEntityOptions, "updateEntityOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities" };
String[] pathParameters = { updateEntityOptions.workspaceId(), updateEntityOptions.entity(... | java | public ServiceCall<Entity> updateEntity(UpdateEntityOptions updateEntityOptions) {
Validator.notNull(updateEntityOptions, "updateEntityOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities" };
String[] pathParameters = { updateEntityOptions.workspaceId(), updateEntityOptions.entity(... | [
"public",
"ServiceCall",
"<",
"Entity",
">",
"updateEntity",
"(",
"UpdateEntityOptions",
"updateEntityOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"updateEntityOptions",
",",
"\"updateEntityOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments"... | Update entity.
Update an existing entity with new or modified data. You must provide component objects defining the content of the
updated entity.
This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**.
@param updateEntityOptions the {@link UpdateEntityOptions} contain... | [
"Update",
"entity",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1079-L1109 |
49,215 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.createValue | public ServiceCall<Value> createValue(CreateValueOptions createValueOptions) {
Validator.notNull(createValueOptions, "createValueOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values" };
String[] pathParameters = { createValueOptions.workspaceId(), createValueOptions.entit... | java | public ServiceCall<Value> createValue(CreateValueOptions createValueOptions) {
Validator.notNull(createValueOptions, "createValueOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values" };
String[] pathParameters = { createValueOptions.workspaceId(), createValueOptions.entit... | [
"public",
"ServiceCall",
"<",
"Value",
">",
"createValue",
"(",
"CreateValueOptions",
"createValueOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"createValueOptions",
",",
"\"createValueOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"=... | Create entity value.
Create a new value for an entity.
This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**.
@param createValueOptions the {@link CreateValueOptions} containing the options for the call
@return a {@link ServiceCall} with a response type of {@link Valu... | [
"Create",
"entity",
"value",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1153-L1181 |
49,216 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.deleteValue | public ServiceCall<Void> deleteValue(DeleteValueOptions deleteValueOptions) {
Validator.notNull(deleteValueOptions, "deleteValueOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values" };
String[] pathParameters = { deleteValueOptions.workspaceId(), deleteValueOptions.entity... | java | public ServiceCall<Void> deleteValue(DeleteValueOptions deleteValueOptions) {
Validator.notNull(deleteValueOptions, "deleteValueOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values" };
String[] pathParameters = { deleteValueOptions.workspaceId(), deleteValueOptions.entity... | [
"public",
"ServiceCall",
"<",
"Void",
">",
"deleteValue",
"(",
"DeleteValueOptions",
"deleteValueOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"deleteValueOptions",
",",
"\"deleteValueOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"="... | Delete entity value.
Delete a value from an entity.
This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**.
@param deleteValueOptions the {@link DeleteValueOptions} containing the options for the call
@return a {@link ServiceCall} with a response type of Void | [
"Delete",
"entity",
"value",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1193-L1207 |
49,217 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.getValue | public ServiceCall<Value> getValue(GetValueOptions getValueOptions) {
Validator.notNull(getValueOptions, "getValueOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values" };
String[] pathParameters = { getValueOptions.workspaceId(), getValueOptions.entity(), getValueOptions.... | java | public ServiceCall<Value> getValue(GetValueOptions getValueOptions) {
Validator.notNull(getValueOptions, "getValueOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values" };
String[] pathParameters = { getValueOptions.workspaceId(), getValueOptions.entity(), getValueOptions.... | [
"public",
"ServiceCall",
"<",
"Value",
">",
"getValue",
"(",
"GetValueOptions",
"getValueOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"getValueOptions",
",",
"\"getValueOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"=",
"{",
"\"... | Get entity value.
Get information about an entity value.
This operation is limited to 6000 requests per 5 minutes. For more information, see **Rate limiting**.
@param getValueOptions the {@link GetValueOptions} containing the options for the call
@return a {@link ServiceCall} with a response type of {@link Value} | [
"Get",
"entity",
"value",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1219-L1238 |
49,218 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.listValues | public ServiceCall<ValueCollection> listValues(ListValuesOptions listValuesOptions) {
Validator.notNull(listValuesOptions, "listValuesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values" };
String[] pathParameters = { listValuesOptions.workspaceId(), listValuesOptions.en... | java | public ServiceCall<ValueCollection> listValues(ListValuesOptions listValuesOptions) {
Validator.notNull(listValuesOptions, "listValuesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values" };
String[] pathParameters = { listValuesOptions.workspaceId(), listValuesOptions.en... | [
"public",
"ServiceCall",
"<",
"ValueCollection",
">",
"listValues",
"(",
"ListValuesOptions",
"listValuesOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"listValuesOptions",
",",
"\"listValuesOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",... | List entity values.
List the values for an entity.
This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate limiting**.
@param listValuesOptions the {@link ListValuesOptions} containing the options for the call
@return a {@link ServiceCall} with a response type of {@link ValueColle... | [
"List",
"entity",
"values",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1250-L1281 |
49,219 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.updateValue | public ServiceCall<Value> updateValue(UpdateValueOptions updateValueOptions) {
Validator.notNull(updateValueOptions, "updateValueOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values" };
String[] pathParameters = { updateValueOptions.workspaceId(), updateValueOptions.entit... | java | public ServiceCall<Value> updateValue(UpdateValueOptions updateValueOptions) {
Validator.notNull(updateValueOptions, "updateValueOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values" };
String[] pathParameters = { updateValueOptions.workspaceId(), updateValueOptions.entit... | [
"public",
"ServiceCall",
"<",
"Value",
">",
"updateValue",
"(",
"UpdateValueOptions",
"updateValueOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"updateValueOptions",
",",
"\"updateValueOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"=... | Update entity value.
Update an existing entity value with new or modified data. You must provide component objects defining the content
of the updated entity value.
This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**.
@param updateValueOptions the {@link UpdateValue... | [
"Update",
"entity",
"value",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1294-L1325 |
49,220 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.getSynonym | public ServiceCall<Synonym> getSynonym(GetSynonymOptions getSynonymOptions) {
Validator.notNull(getSynonymOptions, "getSynonymOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values", "synonyms" };
String[] pathParameters = { getSynonymOptions.workspaceId(), getSynonymOption... | java | public ServiceCall<Synonym> getSynonym(GetSynonymOptions getSynonymOptions) {
Validator.notNull(getSynonymOptions, "getSynonymOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values", "synonyms" };
String[] pathParameters = { getSynonymOptions.workspaceId(), getSynonymOption... | [
"public",
"ServiceCall",
"<",
"Synonym",
">",
"getSynonym",
"(",
"GetSynonymOptions",
"getSynonymOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"getSynonymOptions",
",",
"\"getSynonymOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"=",
... | Get entity value synonym.
Get information about a synonym of an entity value.
This operation is limited to 6000 requests per 5 minutes. For more information, see **Rate limiting**.
@param getSynonymOptions the {@link GetSynonymOptions} containing the options for the call
@return a {@link ServiceCall} with a response... | [
"Get",
"entity",
"value",
"synonym",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1392-L1409 |
49,221 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.listSynonyms | public ServiceCall<SynonymCollection> listSynonyms(ListSynonymsOptions listSynonymsOptions) {
Validator.notNull(listSynonymsOptions, "listSynonymsOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values", "synonyms" };
String[] pathParameters = { listSynonymsOptions.workspace... | java | public ServiceCall<SynonymCollection> listSynonyms(ListSynonymsOptions listSynonymsOptions) {
Validator.notNull(listSynonymsOptions, "listSynonymsOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values", "synonyms" };
String[] pathParameters = { listSynonymsOptions.workspace... | [
"public",
"ServiceCall",
"<",
"SynonymCollection",
">",
"listSynonyms",
"(",
"ListSynonymsOptions",
"listSynonymsOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"listSynonymsOptions",
",",
"\"listSynonymsOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pa... | List entity value synonyms.
List the synonyms for an entity value.
This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate limiting**.
@param listSynonymsOptions the {@link ListSynonymsOptions} containing the options for the call
@return a {@link ServiceCall} with a response type ... | [
"List",
"entity",
"value",
"synonyms",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1421-L1450 |
49,222 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.updateSynonym | public ServiceCall<Synonym> updateSynonym(UpdateSynonymOptions updateSynonymOptions) {
Validator.notNull(updateSynonymOptions, "updateSynonymOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values", "synonyms" };
String[] pathParameters = { updateSynonymOptions.workspaceId()... | java | public ServiceCall<Synonym> updateSynonym(UpdateSynonymOptions updateSynonymOptions) {
Validator.notNull(updateSynonymOptions, "updateSynonymOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "entities", "values", "synonyms" };
String[] pathParameters = { updateSynonymOptions.workspaceId()... | [
"public",
"ServiceCall",
"<",
"Synonym",
">",
"updateSynonym",
"(",
"UpdateSynonymOptions",
"updateSynonymOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"updateSynonymOptions",
",",
"\"updateSynonymOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSeg... | Update entity value synonym.
Update an existing entity value synonym with new text.
This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**.
@param updateSynonymOptions the {@link UpdateSynonymOptions} containing the options for the call
@return a {@link ServiceCall} wi... | [
"Update",
"entity",
"value",
"synonym",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1462-L1481 |
49,223 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.getDialogNode | public ServiceCall<DialogNode> getDialogNode(GetDialogNodeOptions getDialogNodeOptions) {
Validator.notNull(getDialogNodeOptions, "getDialogNodeOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "dialog_nodes" };
String[] pathParameters = { getDialogNodeOptions.workspaceId(), getDialogNode... | java | public ServiceCall<DialogNode> getDialogNode(GetDialogNodeOptions getDialogNodeOptions) {
Validator.notNull(getDialogNodeOptions, "getDialogNodeOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "dialog_nodes" };
String[] pathParameters = { getDialogNodeOptions.workspaceId(), getDialogNode... | [
"public",
"ServiceCall",
"<",
"DialogNode",
">",
"getDialogNode",
"(",
"GetDialogNodeOptions",
"getDialogNodeOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"getDialogNodeOptions",
",",
"\"getDialogNodeOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"path... | Get dialog node.
Get information about a dialog node.
This operation is limited to 6000 requests per 5 minutes. For more information, see **Rate limiting**.
@param getDialogNodeOptions the {@link GetDialogNodeOptions} containing the options for the call
@return a {@link ServiceCall} with a response type of {@link Di... | [
"Get",
"dialog",
"node",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1597-L1613 |
49,224 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.listDialogNodes | public ServiceCall<DialogNodeCollection> listDialogNodes(ListDialogNodesOptions listDialogNodesOptions) {
Validator.notNull(listDialogNodesOptions, "listDialogNodesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "dialog_nodes" };
String[] pathParameters = { listDialogNodesOptions.worksp... | java | public ServiceCall<DialogNodeCollection> listDialogNodes(ListDialogNodesOptions listDialogNodesOptions) {
Validator.notNull(listDialogNodesOptions, "listDialogNodesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "dialog_nodes" };
String[] pathParameters = { listDialogNodesOptions.worksp... | [
"public",
"ServiceCall",
"<",
"DialogNodeCollection",
">",
"listDialogNodes",
"(",
"ListDialogNodesOptions",
"listDialogNodesOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"listDialogNodesOptions",
",",
"\"listDialogNodesOptions cannot be null\"",
")",
";",
"String",
... | List dialog nodes.
List the dialog nodes for a workspace.
This operation is limited to 2500 requests per 30 minutes. For more information, see **Rate limiting**.
@param listDialogNodesOptions the {@link ListDialogNodesOptions} containing the options for the call
@return a {@link ServiceCall} with a response type of ... | [
"List",
"dialog",
"nodes",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1625-L1653 |
49,225 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.listAllLogs | public ServiceCall<LogCollection> listAllLogs(ListAllLogsOptions listAllLogsOptions) {
Validator.notNull(listAllLogsOptions, "listAllLogsOptions cannot be null");
String[] pathSegments = { "v1/logs" };
RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));... | java | public ServiceCall<LogCollection> listAllLogs(ListAllLogsOptions listAllLogsOptions) {
Validator.notNull(listAllLogsOptions, "listAllLogsOptions cannot be null");
String[] pathSegments = { "v1/logs" };
RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));... | [
"public",
"ServiceCall",
"<",
"LogCollection",
">",
"listAllLogs",
"(",
"ListAllLogsOptions",
"listAllLogsOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"listAllLogsOptions",
",",
"\"listAllLogsOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegment... | List log events in all workspaces.
List the events from the logs of all workspaces in the service instance.
If **cursor** is not specified, this operation is limited to 40 requests per 30 minutes. If **cursor** is
specified, the limit is 120 requests per minute. For more information, see **Rate limiting**.
@param li... | [
"List",
"log",
"events",
"in",
"all",
"workspaces",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1747-L1768 |
49,226 | watson-developer-cloud/java-sdk | assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java | Assistant.listLogs | public ServiceCall<LogCollection> listLogs(ListLogsOptions listLogsOptions) {
Validator.notNull(listLogsOptions, "listLogsOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "logs" };
String[] pathParameters = { listLogsOptions.workspaceId() };
RequestBuilder builder = RequestBuilder.ge... | java | public ServiceCall<LogCollection> listLogs(ListLogsOptions listLogsOptions) {
Validator.notNull(listLogsOptions, "listLogsOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "logs" };
String[] pathParameters = { listLogsOptions.workspaceId() };
RequestBuilder builder = RequestBuilder.ge... | [
"public",
"ServiceCall",
"<",
"LogCollection",
">",
"listLogs",
"(",
"ListLogsOptions",
"listLogsOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"listLogsOptions",
",",
"\"listLogsOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"=",
"{... | List log events in a workspace.
List the events from the log of a specific workspace.
If **cursor** is not specified, this operation is limited to 40 requests per 30 minutes. If **cursor** is
specified, the limit is 120 requests per minute. For more information, see **Rate limiting**.
@param listLogsOptions the {@li... | [
"List",
"log",
"events",
"in",
"a",
"workspace",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java#L1781-L1806 |
49,227 | watson-developer-cloud/java-sdk | tone-analyzer/src/main/java/com/ibm/watson/tone_analyzer/v3/ToneAnalyzer.java | ToneAnalyzer.tone | public ServiceCall<ToneAnalysis> tone(ToneOptions toneOptions) {
Validator.notNull(toneOptions, "toneOptions cannot be null");
String[] pathSegments = { "v3/tone" };
RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));
builder.query("version", versi... | java | public ServiceCall<ToneAnalysis> tone(ToneOptions toneOptions) {
Validator.notNull(toneOptions, "toneOptions cannot be null");
String[] pathSegments = { "v3/tone" };
RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));
builder.query("version", versi... | [
"public",
"ServiceCall",
"<",
"ToneAnalysis",
">",
"tone",
"(",
"ToneOptions",
"toneOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"toneOptions",
",",
"\"toneOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"=",
"{",
"\"v3/tone\"",
... | Analyze general tone.
Use the general purpose endpoint to analyze the tone of your input content. The service analyzes the content for
emotional and language tones. The method always analyzes the tone of the full document; by default, it also
analyzes the tone of each individual sentence of the content.
You can submi... | [
"Analyze",
"general",
"tone",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/tone-analyzer/src/main/java/com/ibm/watson/tone_analyzer/v3/ToneAnalyzer.java#L121-L148 |
49,228 | watson-developer-cloud/java-sdk | tone-analyzer/src/main/java/com/ibm/watson/tone_analyzer/v3/ToneAnalyzer.java | ToneAnalyzer.toneChat | public ServiceCall<UtteranceAnalyses> toneChat(ToneChatOptions toneChatOptions) {
Validator.notNull(toneChatOptions, "toneChatOptions cannot be null");
String[] pathSegments = { "v3/tone_chat" };
RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));
... | java | public ServiceCall<UtteranceAnalyses> toneChat(ToneChatOptions toneChatOptions) {
Validator.notNull(toneChatOptions, "toneChatOptions cannot be null");
String[] pathSegments = { "v3/tone_chat" };
RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));
... | [
"public",
"ServiceCall",
"<",
"UtteranceAnalyses",
">",
"toneChat",
"(",
"ToneChatOptions",
"toneChatOptions",
")",
"{",
"Validator",
".",
"notNull",
"(",
"toneChatOptions",
",",
"\"toneChatOptions cannot be null\"",
")",
";",
"String",
"[",
"]",
"pathSegments",
"=",
... | Analyze customer engagement tone.
Use the customer engagement endpoint to analyze the tone of customer service and customer support conversations.
For each utterance of a conversation, the method reports the most prevalent subset of the following seven tones:
sad, frustrated, satisfied, excited, polite, impolite, and ... | [
"Analyze",
"customer",
"engagement",
"tone",
"."
] | c926117afd20e2002b69942537720ab733a914f3 | https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/tone-analyzer/src/main/java/com/ibm/watson/tone_analyzer/v3/ToneAnalyzer.java#L170-L190 |
49,229 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/UniqueNamer.java | UniqueNamer.getName | public String getName(String oldName) {
if (oldName != null && this.existing.containsKey(oldName)) {
return this.existing.get(oldName);
}
final String name = this.prefix + this.counter;
this.counter++;
if (oldName != null) {
this.existing.put(oldName, na... | java | public String getName(String oldName) {
if (oldName != null && this.existing.containsKey(oldName)) {
return this.existing.get(oldName);
}
final String name = this.prefix + this.counter;
this.counter++;
if (oldName != null) {
this.existing.put(oldName, na... | [
"public",
"String",
"getName",
"(",
"String",
"oldName",
")",
"{",
"if",
"(",
"oldName",
"!=",
"null",
"&&",
"this",
".",
"existing",
".",
"containsKey",
"(",
"oldName",
")",
")",
"{",
"return",
"this",
".",
"existing",
".",
"get",
"(",
"oldName",
")",... | Gets the new name for the given old name, where if no old name is given a
new name will be generated.
@param oldName
the old name to get the new name for.
@return the new name. | [
"Gets",
"the",
"new",
"name",
"for",
"the",
"given",
"old",
"name",
"where",
"if",
"no",
"old",
"name",
"is",
"given",
"a",
"new",
"name",
"will",
"be",
"generated",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/UniqueNamer.java#L46-L59 |
49,230 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java | JsonLdUtils.isNode | static boolean isNode(Object v) {
// Note: A value is a subject if all of these hold true:
// 1. It is an Object.
// 2. It is not a @value, @set, or @list.
// 3. It has more than 1 key OR any existing key is not @id.
if (v instanceof Map && !(((Map) v).containsKey("@value") || ((... | java | static boolean isNode(Object v) {
// Note: A value is a subject if all of these hold true:
// 1. It is an Object.
// 2. It is not a @value, @set, or @list.
// 3. It has more than 1 key OR any existing key is not @id.
if (v instanceof Map && !(((Map) v).containsKey("@value") || ((... | [
"static",
"boolean",
"isNode",
"(",
"Object",
"v",
")",
"{",
"// Note: A value is a subject if all of these hold true:",
"// 1. It is an Object.",
"// 2. It is not a @value, @set, or @list.",
"// 3. It has more than 1 key OR any existing key is not @id.",
"if",
"(",
"v",
"instanceof",
... | Returns true if the given value is a subject with properties.
@param v
the value to check.
@return true if the value is a subject with properties, false if not. | [
"Returns",
"true",
"if",
"the",
"given",
"value",
"is",
"a",
"subject",
"with",
"properties",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java#L150-L160 |
49,231 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java | JsonLdUtils.isNodeReference | static boolean isNodeReference(Object v) {
// Note: A value is a subject reference if all of these hold true:
// 1. It is an Object.
// 2. It has a single key: @id.
return (v instanceof Map && ((Map<String, Object>) v).size() == 1
&& ((Map<String, Object>) v).containsKey(... | java | static boolean isNodeReference(Object v) {
// Note: A value is a subject reference if all of these hold true:
// 1. It is an Object.
// 2. It has a single key: @id.
return (v instanceof Map && ((Map<String, Object>) v).size() == 1
&& ((Map<String, Object>) v).containsKey(... | [
"static",
"boolean",
"isNodeReference",
"(",
"Object",
"v",
")",
"{",
"// Note: A value is a subject reference if all of these hold true:",
"// 1. It is an Object.",
"// 2. It has a single key: @id.",
"return",
"(",
"v",
"instanceof",
"Map",
"&&",
"(",
"(",
"Map",
"<",
"Str... | Returns true if the given value is a subject reference.
@param v
the value to check.
@return true if the value is a subject reference, false if not. | [
"Returns",
"true",
"if",
"the",
"given",
"value",
"is",
"a",
"subject",
"reference",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java#L170-L176 |
49,232 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java | JsonLdUtils.fillNodesToPrune | static void fillNodesToPrune(Object input, final Map<String, Object> toPrune) {
// recurse through arrays
if (isArray(input)) {
for (final Object i : (List<Object>) input) {
fillNodesToPrune(i, toPrune);
}
} else if (isObject(input)) {
// skip ... | java | static void fillNodesToPrune(Object input, final Map<String, Object> toPrune) {
// recurse through arrays
if (isArray(input)) {
for (final Object i : (List<Object>) input) {
fillNodesToPrune(i, toPrune);
}
} else if (isObject(input)) {
// skip ... | [
"static",
"void",
"fillNodesToPrune",
"(",
"Object",
"input",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"toPrune",
")",
"{",
"// recurse through arrays",
"if",
"(",
"isArray",
"(",
"input",
")",
")",
"{",
"for",
"(",
"final",
"Object",
"i",
... | Gets the objects on which we'll prune the blank node ID
@param input
the framed output before compaction
@param toPrune
the resulting object. | [
"Gets",
"the",
"objects",
"on",
"which",
"we",
"ll",
"prune",
"the",
"blank",
"node",
"ID"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java#L275-L322 |
49,233 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java | JsonLdUtils.isBlankNode | static boolean isBlankNode(Object v) {
// Note: A value is a blank node if all of these hold true:
// 1. It is an Object.
// 2. If it has an @id key its value begins with '_:'.
// 3. It has no keys OR is not a @value, @set, or @list.
if (v instanceof Map) {
final Map<... | java | static boolean isBlankNode(Object v) {
// Note: A value is a blank node if all of these hold true:
// 1. It is an Object.
// 2. If it has an @id key its value begins with '_:'.
// 3. It has no keys OR is not a @value, @set, or @list.
if (v instanceof Map) {
final Map<... | [
"static",
"boolean",
"isBlankNode",
"(",
"Object",
"v",
")",
"{",
"// Note: A value is a blank node if all of these hold true:",
"// 1. It is an Object.",
"// 2. If it has an @id key its value begins with '_:'.",
"// 3. It has no keys OR is not a @value, @set, or @list.",
"if",
"(",
"v",... | Returns true if the given value is a blank node.
@param v
the value to check.
@return true if the value is a blank node, false if not. | [
"Returns",
"true",
"if",
"the",
"given",
"value",
"is",
"a",
"blank",
"node",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java#L393-L408 |
49,234 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java | JsonLdUtils.isList | static Boolean isList(Object v) {
return (v instanceof Map && ((Map<String, Object>) v).containsKey("@list"));
} | java | static Boolean isList(Object v) {
return (v instanceof Map && ((Map<String, Object>) v).containsKey("@list"));
} | [
"static",
"Boolean",
"isList",
"(",
"Object",
"v",
")",
"{",
"return",
"(",
"v",
"instanceof",
"Map",
"&&",
"(",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"v",
")",
".",
"containsKey",
"(",
"\"@list\"",
")",
")",
";",
"}"
] | Returns true if the given value is a JSON-LD List
@param v
the value to check.
@return | [
"Returns",
"true",
"if",
"the",
"given",
"value",
"is",
"a",
"JSON",
"-",
"LD",
"List"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java#L457-L459 |
49,235 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java | JsonLdUtils.isValue | static Boolean isValue(Object v) {
return (v instanceof Map && ((Map<String, Object>) v).containsKey("@value"));
} | java | static Boolean isValue(Object v) {
return (v instanceof Map && ((Map<String, Object>) v).containsKey("@value"));
} | [
"static",
"Boolean",
"isValue",
"(",
"Object",
"v",
")",
"{",
"return",
"(",
"v",
"instanceof",
"Map",
"&&",
"(",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"v",
")",
".",
"containsKey",
"(",
"\"@value\"",
")",
")",
";",
"}"
] | Returns true if the given value is a JSON-LD value
@param v
the value to check.
@return | [
"Returns",
"true",
"if",
"the",
"given",
"value",
"is",
"a",
"JSON",
"-",
"LD",
"value"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdUtils.java#L479-L481 |
49,236 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/utils/JsonLdUrl.java | JsonLdUrl.removeDotSegments | public static String removeDotSegments(String path, boolean hasAuthority) {
String rval = "";
if (path.indexOf("/") == 0) {
rval = "/";
}
// RFC 3986 5.2.4 (reworked)
final List<String> input = new ArrayList<String>(Arrays.asList(path.split("/")));
if (path.... | java | public static String removeDotSegments(String path, boolean hasAuthority) {
String rval = "";
if (path.indexOf("/") == 0) {
rval = "/";
}
// RFC 3986 5.2.4 (reworked)
final List<String> input = new ArrayList<String>(Arrays.asList(path.split("/")));
if (path.... | [
"public",
"static",
"String",
"removeDotSegments",
"(",
"String",
"path",
",",
"boolean",
"hasAuthority",
")",
"{",
"String",
"rval",
"=",
"\"\"",
";",
"if",
"(",
"path",
".",
"indexOf",
"(",
"\"/\"",
")",
"==",
"0",
")",
"{",
"rval",
"=",
"\"/\"",
";"... | Removes dot segments from a JsonLdUrl path.
@param path
the path to remove dot segments from.
@param hasAuthority
true if the JsonLdUrl has an authority, false if not.
@return The URL without the dot segments | [
"Removes",
"dot",
"segments",
"from",
"a",
"JsonLdUrl",
"path",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/utils/JsonLdUrl.java#L114-L159 |
49,237 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/utils/JsonLdUrl.java | JsonLdUrl.parseAuthority | private static void parseAuthority(JsonLdUrl parsed) {
// parse authority for unparsed relative network-path reference
if (parsed.href.indexOf(":") == -1 && parsed.href.indexOf("//") == 0
&& "".equals(parsed.host)) {
// must parse authority from pathname
parsed.pa... | java | private static void parseAuthority(JsonLdUrl parsed) {
// parse authority for unparsed relative network-path reference
if (parsed.href.indexOf(":") == -1 && parsed.href.indexOf("//") == 0
&& "".equals(parsed.host)) {
// must parse authority from pathname
parsed.pa... | [
"private",
"static",
"void",
"parseAuthority",
"(",
"JsonLdUrl",
"parsed",
")",
"{",
"// parse authority for unparsed relative network-path reference",
"if",
"(",
"parsed",
".",
"href",
".",
"indexOf",
"(",
"\":\"",
")",
"==",
"-",
"1",
"&&",
"parsed",
".",
"href"... | Parses the authority for the pre-parsed given JsonLdUrl.
@param parsed
the pre-parsed JsonLdUrl. | [
"Parses",
"the",
"authority",
"for",
"the",
"pre",
"-",
"parsed",
"given",
"JsonLdUrl",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/utils/JsonLdUrl.java#L293-L314 |
49,238 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/RDFDatasetUtils.java | RDFDatasetUtils.escape | public static void escape(String str, StringBuilder rval) {
for (int i = 0; i < str.length(); i++) {
final char hi = str.charAt(i);
if (hi <= 0x8 || hi == 0xB || hi == 0xC || (hi >= 0xE && hi <= 0x1F)
|| (hi >= 0x7F && hi <= 0xA0) || // 0xA0 is end of
... | java | public static void escape(String str, StringBuilder rval) {
for (int i = 0; i < str.length(); i++) {
final char hi = str.charAt(i);
if (hi <= 0x8 || hi == 0xB || hi == 0xC || (hi >= 0xE && hi <= 0x1F)
|| (hi >= 0x7F && hi <= 0xA0) || // 0xA0 is end of
... | [
"public",
"static",
"void",
"escape",
"(",
"String",
"str",
",",
"StringBuilder",
"rval",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"str",
".",
"length",
"(",
")",
";",
"i",
"++",
")",
"{",
"final",
"char",
"hi",
"=",
"str",
".... | Escapes the given string according to the N-Quads escape rules
@param str
The string to escape
@param rval
The {@link StringBuilder} to append to. | [
"Escapes",
"the",
"given",
"string",
"according",
"to",
"the",
"N",
"-",
"Quads",
"escape",
"rules"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/RDFDatasetUtils.java#L203-L258 |
49,239 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/RDFDataset.java | RDFDataset.getContext | public Map<String, Object> getContext() {
final Map<String, Object> rval = newMap();
rval.putAll(context);
// replace "" with "@vocab"
if (rval.containsKey("")) {
rval.put("@vocab", rval.remove(""));
}
return rval;
} | java | public Map<String, Object> getContext() {
final Map<String, Object> rval = newMap();
rval.putAll(context);
// replace "" with "@vocab"
if (rval.containsKey("")) {
rval.put("@vocab", rval.remove(""));
}
return rval;
} | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getContext",
"(",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"rval",
"=",
"newMap",
"(",
")",
";",
"rval",
".",
"putAll",
"(",
"context",
")",
";",
"// replace \"\" with \"@vocab\"",
... | Returns a valid context containing any namespaces set
@return The context map | [
"Returns",
"a",
"valid",
"context",
"containing",
"any",
"namespaces",
"set"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/RDFDataset.java#L412-L420 |
49,240 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/RDFDataset.java | RDFDataset.parseContext | public void parseContext(Object contextLike) throws JsonLdError {
Context context;
if (api != null) {
context = new Context(api.opts);
} else {
context = new Context();
}
// Context will do our recursive parsing and initial IRI resolution
context =... | java | public void parseContext(Object contextLike) throws JsonLdError {
Context context;
if (api != null) {
context = new Context(api.opts);
} else {
context = new Context();
}
// Context will do our recursive parsing and initial IRI resolution
context =... | [
"public",
"void",
"parseContext",
"(",
"Object",
"contextLike",
")",
"throws",
"JsonLdError",
"{",
"Context",
"context",
";",
"if",
"(",
"api",
"!=",
"null",
")",
"{",
"context",
"=",
"new",
"Context",
"(",
"api",
".",
"opts",
")",
";",
"}",
"else",
"{... | parses a context object and sets any namespaces found within it
@param contextLike
The context to parse
@throws JsonLdError
If the context can't be parsed | [
"parses",
"a",
"context",
"object",
"and",
"sets",
"any",
"namespaces",
"found",
"within",
"it"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/RDFDataset.java#L430-L456 |
49,241 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/RDFDataset.java | RDFDataset.addTriple | public void addTriple(final String subject, final String predicate, final String object) {
addQuad(subject, predicate, object, "@default");
} | java | public void addTriple(final String subject, final String predicate, final String object) {
addQuad(subject, predicate, object, "@default");
} | [
"public",
"void",
"addTriple",
"(",
"final",
"String",
"subject",
",",
"final",
"String",
"predicate",
",",
"final",
"String",
"object",
")",
"{",
"addQuad",
"(",
"subject",
",",
"predicate",
",",
"object",
",",
"\"@default\"",
")",
";",
"}"
] | Adds a triple to the default graph of this dataset
@param subject
the subject for the triple
@param predicate
the predicate for the triple
@param object
the object for the triple | [
"Adds",
"a",
"triple",
"to",
"the",
"default",
"graph",
"of",
"this",
"dataset"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/RDFDataset.java#L516-L518 |
49,242 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/RDFDataset.java | RDFDataset.objectToRDF | private Node objectToRDF(Object item) {
// convert value object to RDF
if (isValue(item)) {
final Object value = ((Map<String, Object>) item).get("@value");
final Object datatype = ((Map<String, Object>) item).get("@type");
// convert to XSD datatypes as appropriate
... | java | private Node objectToRDF(Object item) {
// convert value object to RDF
if (isValue(item)) {
final Object value = ((Map<String, Object>) item).get("@value");
final Object datatype = ((Map<String, Object>) item).get("@type");
// convert to XSD datatypes as appropriate
... | [
"private",
"Node",
"objectToRDF",
"(",
"Object",
"item",
")",
"{",
"// convert value object to RDF",
"if",
"(",
"isValue",
"(",
"item",
")",
")",
"{",
"final",
"Object",
"value",
"=",
"(",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"item",
")",
... | Converts a JSON-LD value object to an RDF literal or a JSON-LD string or
node object to an RDF resource.
@param item
the JSON-LD value or node object.
@return the RDF literal or RDF resource. | [
"Converts",
"a",
"JSON",
"-",
"LD",
"value",
"object",
"to",
"an",
"RDF",
"literal",
"or",
"a",
"JSON",
"-",
"LD",
"string",
"or",
"node",
"object",
"to",
"an",
"RDF",
"resource",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/RDFDataset.java#L647-L706 |
49,243 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/DocumentLoader.java | DocumentLoader.addInjectedDoc | public DocumentLoader addInjectedDoc(String url, String doc) throws JsonLdError {
try {
m_injectedDocs.put(url, JsonUtils.fromString(doc));
return this;
} catch (final Exception e) {
throw new JsonLdError(JsonLdError.Error.LOADING_INJECTED_CONTEXT_FAILED, url, e);
... | java | public DocumentLoader addInjectedDoc(String url, String doc) throws JsonLdError {
try {
m_injectedDocs.put(url, JsonUtils.fromString(doc));
return this;
} catch (final Exception e) {
throw new JsonLdError(JsonLdError.Error.LOADING_INJECTED_CONTEXT_FAILED, url, e);
... | [
"public",
"DocumentLoader",
"addInjectedDoc",
"(",
"String",
"url",
",",
"String",
"doc",
")",
"throws",
"JsonLdError",
"{",
"try",
"{",
"m_injectedDocs",
".",
"put",
"(",
"url",
",",
"JsonUtils",
".",
"fromString",
"(",
"doc",
")",
")",
";",
"return",
"th... | Avoid resolving a document by instead using the given serialised
representation.
@param url
The URL this document represents.
@param doc
The serialised document as a String
@return This object for fluent addition of other injected documents.
@throws JsonLdError
If loading of the document failed for any reason. | [
"Avoid",
"resolving",
"a",
"document",
"by",
"instead",
"using",
"the",
"given",
"serialised",
"representation",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/DocumentLoader.java#L37-L44 |
49,244 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/DocumentLoader.java | DocumentLoader.loadDocument | public RemoteDocument loadDocument(String url) throws JsonLdError {
if (m_injectedDocs.containsKey(url)) {
try {
return new RemoteDocument(url, m_injectedDocs.get(url));
} catch (final Exception e) {
throw new JsonLdError(JsonLdError.Error.LOADING_INJECTED... | java | public RemoteDocument loadDocument(String url) throws JsonLdError {
if (m_injectedDocs.containsKey(url)) {
try {
return new RemoteDocument(url, m_injectedDocs.get(url));
} catch (final Exception e) {
throw new JsonLdError(JsonLdError.Error.LOADING_INJECTED... | [
"public",
"RemoteDocument",
"loadDocument",
"(",
"String",
"url",
")",
"throws",
"JsonLdError",
"{",
"if",
"(",
"m_injectedDocs",
".",
"containsKey",
"(",
"url",
")",
")",
"{",
"try",
"{",
"return",
"new",
"RemoteDocument",
"(",
"url",
",",
"m_injectedDocs",
... | Loads the URL if possible, returning it as a RemoteDocument.
@param url
The URL to load
@return The resolved URL as a RemoteDocument
@throws JsonLdError
If there are errors loading or remote context loading has
been disallowed. | [
"Loads",
"the",
"URL",
"if",
"possible",
"returning",
"it",
"as",
"a",
"RemoteDocument",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/DocumentLoader.java#L56-L77 |
49,245 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/utils/JsonUtils.java | JsonUtils.toPrettyString | public static String toPrettyString(Object jsonObject)
throws JsonGenerationException, IOException {
final StringWriter sw = new StringWriter();
writePrettyPrint(sw, jsonObject);
return sw.toString();
} | java | public static String toPrettyString(Object jsonObject)
throws JsonGenerationException, IOException {
final StringWriter sw = new StringWriter();
writePrettyPrint(sw, jsonObject);
return sw.toString();
} | [
"public",
"static",
"String",
"toPrettyString",
"(",
"Object",
"jsonObject",
")",
"throws",
"JsonGenerationException",
",",
"IOException",
"{",
"final",
"StringWriter",
"sw",
"=",
"new",
"StringWriter",
"(",
")",
";",
"writePrettyPrint",
"(",
"sw",
",",
"jsonObjec... | Writes the given JSON-LD Object out to a String, using indentation and
new lines to improve readability.
@param jsonObject
The JSON-LD Object to serialize.
@return A JSON document serialised to a String.
@throws JsonGenerationException
If there is a JSON error during serialization.
@throws IOException
If there is an I... | [
"Writes",
"the",
"given",
"JSON",
"-",
"LD",
"Object",
"out",
"to",
"a",
"String",
"using",
"indentation",
"and",
"new",
"lines",
"to",
"improve",
"readability",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/utils/JsonUtils.java#L256-L261 |
49,246 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/utils/JsonUtils.java | JsonUtils.write | public static void write(Writer writer, Object jsonObject)
throws JsonGenerationException, IOException {
final JsonGenerator jw = JSON_FACTORY.createGenerator(writer);
jw.writeObject(jsonObject);
} | java | public static void write(Writer writer, Object jsonObject)
throws JsonGenerationException, IOException {
final JsonGenerator jw = JSON_FACTORY.createGenerator(writer);
jw.writeObject(jsonObject);
} | [
"public",
"static",
"void",
"write",
"(",
"Writer",
"writer",
",",
"Object",
"jsonObject",
")",
"throws",
"JsonGenerationException",
",",
"IOException",
"{",
"final",
"JsonGenerator",
"jw",
"=",
"JSON_FACTORY",
".",
"createGenerator",
"(",
"writer",
")",
";",
"j... | Writes the given JSON-LD Object out to the given Writer.
@param writer
The writer that is to receive the serialized JSON-LD object.
@param jsonObject
The JSON-LD Object to serialize.
@throws JsonGenerationException
If there is a JSON error during serialization.
@throws IOException
If there is an IO error during serial... | [
"Writes",
"the",
"given",
"JSON",
"-",
"LD",
"Object",
"out",
"to",
"the",
"given",
"Writer",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/utils/JsonUtils.java#L292-L296 |
49,247 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/utils/JsonUtils.java | JsonUtils.writePrettyPrint | public static void writePrettyPrint(Writer writer, Object jsonObject)
throws JsonGenerationException, IOException {
final JsonGenerator jw = JSON_FACTORY.createGenerator(writer);
jw.useDefaultPrettyPrinter();
jw.writeObject(jsonObject);
} | java | public static void writePrettyPrint(Writer writer, Object jsonObject)
throws JsonGenerationException, IOException {
final JsonGenerator jw = JSON_FACTORY.createGenerator(writer);
jw.useDefaultPrettyPrinter();
jw.writeObject(jsonObject);
} | [
"public",
"static",
"void",
"writePrettyPrint",
"(",
"Writer",
"writer",
",",
"Object",
"jsonObject",
")",
"throws",
"JsonGenerationException",
",",
"IOException",
"{",
"final",
"JsonGenerator",
"jw",
"=",
"JSON_FACTORY",
".",
"createGenerator",
"(",
"writer",
")",
... | Writes the given JSON-LD Object out to the given Writer, using
indentation and new lines to improve readability.
@param writer
The writer that is to receive the serialized JSON-LD object.
@param jsonObject
The JSON-LD Object to serialize.
@throws JsonGenerationException
If there is a JSON error during serialization.
@... | [
"Writes",
"the",
"given",
"JSON",
"-",
"LD",
"Object",
"out",
"to",
"the",
"given",
"Writer",
"using",
"indentation",
"and",
"new",
"lines",
"to",
"improve",
"readability",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/utils/JsonUtils.java#L311-L316 |
49,248 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/utils/Obj.java | Obj.newMap | public static Map<String, Object> newMap(String key, Object value) {
final Map<String, Object> result = newMap();
result.put(key, value);
return result;
} | java | public static Map<String, Object> newMap(String key, Object value) {
final Map<String, Object> result = newMap();
result.put(key, value);
return result;
} | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"newMap",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"newMap",
"(",
")",
";",
"result",
".",
"put",
"(",
"k... | Helper function for creating maps and tuning them as necessary.
@param key
A key to add to the map on creation.
@param value
A value to attach to the key in the new map.
@return A new {@link Map} instance. | [
"Helper",
"function",
"for",
"creating",
"maps",
"and",
"tuning",
"them",
"as",
"necessary",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/utils/Obj.java#L26-L30 |
49,249 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java | JsonLdProcessor.fromRDF | public static Object fromRDF(Object dataset, JsonLdOptions options) throws JsonLdError {
// handle non specified serializer case
RDFParser parser = null;
if (options.format == null && dataset instanceof String) {
// attempt to parse the input as nquads
options.format = ... | java | public static Object fromRDF(Object dataset, JsonLdOptions options) throws JsonLdError {
// handle non specified serializer case
RDFParser parser = null;
if (options.format == null && dataset instanceof String) {
// attempt to parse the input as nquads
options.format = ... | [
"public",
"static",
"Object",
"fromRDF",
"(",
"Object",
"dataset",
",",
"JsonLdOptions",
"options",
")",
"throws",
"JsonLdError",
"{",
"// handle non specified serializer case",
"RDFParser",
"parser",
"=",
"null",
";",
"if",
"(",
"options",
".",
"format",
"==",
"n... | Converts an RDF dataset to JSON-LD.
@param dataset
a serialized string of RDF in a format specified by the format
option or an RDF dataset to convert.
@param options
the options to use: [format] the format if input is not an
array: 'application/nquads' for N-Quads (default).
[useRdfType] true to use rdf:type, false to... | [
"Converts",
"an",
"RDF",
"dataset",
"to",
"JSON",
"-",
"LD",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java#L384-L402 |
49,250 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java | JsonLdProcessor.normalize | public static Object normalize(Object input, JsonLdOptions options) throws JsonLdError {
final JsonLdOptions opts = options.copy();
opts.format = null;
final RDFDataset dataset = (RDFDataset) toRDF(input, opts);
return new JsonLdApi(options).normalize(dataset);
} | java | public static Object normalize(Object input, JsonLdOptions options) throws JsonLdError {
final JsonLdOptions opts = options.copy();
opts.format = null;
final RDFDataset dataset = (RDFDataset) toRDF(input, opts);
return new JsonLdApi(options).normalize(dataset);
} | [
"public",
"static",
"Object",
"normalize",
"(",
"Object",
"input",
",",
"JsonLdOptions",
"options",
")",
"throws",
"JsonLdError",
"{",
"final",
"JsonLdOptions",
"opts",
"=",
"options",
".",
"copy",
"(",
")",
";",
"opts",
".",
"format",
"=",
"null",
";",
"f... | Performs RDF dataset normalization on the given JSON-LD input. The output
is an RDF dataset unless the 'format' option is used.
@param input
the JSON-LD input to normalize.
@param options
the options to use: [base] the base IRI to use. [format] the
format if output is a string: 'application/nquads' for
N-Quads. [loadC... | [
"Performs",
"RDF",
"dataset",
"normalization",
"on",
"the",
"given",
"JSON",
"-",
"LD",
"input",
".",
"The",
"output",
"is",
"an",
"RDF",
"dataset",
"unless",
"the",
"format",
"option",
"is",
"used",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java#L604-L611 |
49,251 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/Context.java | Context.compactValue | public Object compactValue(String activeProperty, Map<String, Object> value) {
// 1)
int numberMembers = value.size();
// 2)
if (value.containsKey(JsonLdConsts.INDEX)
&& JsonLdConsts.INDEX.equals(this.getContainer(activeProperty))) {
numberMembers--;
}... | java | public Object compactValue(String activeProperty, Map<String, Object> value) {
// 1)
int numberMembers = value.size();
// 2)
if (value.containsKey(JsonLdConsts.INDEX)
&& JsonLdConsts.INDEX.equals(this.getContainer(activeProperty))) {
numberMembers--;
}... | [
"public",
"Object",
"compactValue",
"(",
"String",
"activeProperty",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"value",
")",
"{",
"// 1)",
"int",
"numberMembers",
"=",
"value",
".",
"size",
"(",
")",
";",
"// 2)",
"if",
"(",
"value",
".",
"containsK... | Value Compaction Algorithm
http://json-ld.org/spec/latest/json-ld-api/#value-compaction
@param activeProperty
The Active Property
@param value
The value to compact
@return The compacted value | [
"Value",
"Compaction",
"Algorithm"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/Context.java#L78-L129 |
49,252 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/Context.java | Context.parse | @SuppressWarnings("unchecked")
public Context parse(Object localContext, List<String> remoteContexts) throws JsonLdError {
return parse(localContext, remoteContexts, false);
} | java | @SuppressWarnings("unchecked")
public Context parse(Object localContext, List<String> remoteContexts) throws JsonLdError {
return parse(localContext, remoteContexts, false);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"Context",
"parse",
"(",
"Object",
"localContext",
",",
"List",
"<",
"String",
">",
"remoteContexts",
")",
"throws",
"JsonLdError",
"{",
"return",
"parse",
"(",
"localContext",
",",
"remoteContexts",
... | Context Processing Algorithm
http://json-ld.org/spec/latest/json-ld-api/#context-processing-algorithms
@param localContext
The Local Context object.
@param remoteContexts
The list of Strings denoting the remote Context URLs.
@return The parsed and merged Context.
@throws JsonLdError
If there is an error parsing the c... | [
"Context",
"Processing",
"Algorithm"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/Context.java#L144-L147 |
49,253 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/Context.java | Context.expandIri | String expandIri(String value, boolean relative, boolean vocab, Map<String, Object> context,
Map<String, Boolean> defined) throws JsonLdError {
// 1)
if (value == null || JsonLdUtils.isKeyword(value)) {
return value;
}
// 2)
if (context != null && context.... | java | String expandIri(String value, boolean relative, boolean vocab, Map<String, Object> context,
Map<String, Boolean> defined) throws JsonLdError {
// 1)
if (value == null || JsonLdUtils.isKeyword(value)) {
return value;
}
// 2)
if (context != null && context.... | [
"String",
"expandIri",
"(",
"String",
"value",
",",
"boolean",
"relative",
",",
"boolean",
"vocab",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"context",
",",
"Map",
"<",
"String",
",",
"Boolean",
">",
"defined",
")",
"throws",
"JsonLdError",
"{",
"/... | IRI Expansion Algorithm
http://json-ld.org/spec/latest/json-ld-api/#iri-expansion
@param value
@param relative
@param vocab
@param context
@param defined
@return
@throws JsonLdError | [
"IRI",
"Expansion",
"Algorithm"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/Context.java#L506-L561 |
49,254 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/Context.java | Context.getContainer | public String getContainer(String property) {
if (property == null) {
return null;
}
if (JsonLdConsts.GRAPH.equals(property)) {
return JsonLdConsts.SET;
}
if (!property.equals(JsonLdConsts.TYPE) && JsonLdUtils.isKeyword(property)) {
return prop... | java | public String getContainer(String property) {
if (property == null) {
return null;
}
if (JsonLdConsts.GRAPH.equals(property)) {
return JsonLdConsts.SET;
}
if (!property.equals(JsonLdConsts.TYPE) && JsonLdUtils.isKeyword(property)) {
return prop... | [
"public",
"String",
"getContainer",
"(",
"String",
"property",
")",
"{",
"if",
"(",
"property",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"JsonLdConsts",
".",
"GRAPH",
".",
"equals",
"(",
"property",
")",
")",
"{",
"return",
"JsonL... | Retrieve container mapping.
@param property
The Property to get a container mapping for.
@return The container mapping if any, else null | [
"Retrieve",
"container",
"mapping",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/Context.java#L1065-L1080 |
49,255 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/NormalizeUtils.java | NormalizeUtils.hashQuads | private static String hashQuads(String id, Map<String, Object> bnodes, UniqueNamer namer) {
// return cached hash
if (((Map<String, Object>) bnodes.get(id)).containsKey("hash")) {
return (String) ((Map<String, Object>) bnodes.get(id)).get("hash");
}
// serialize all of bnode... | java | private static String hashQuads(String id, Map<String, Object> bnodes, UniqueNamer namer) {
// return cached hash
if (((Map<String, Object>) bnodes.get(id)).containsKey("hash")) {
return (String) ((Map<String, Object>) bnodes.get(id)).get("hash");
}
// serialize all of bnode... | [
"private",
"static",
"String",
"hashQuads",
"(",
"String",
"id",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"bnodes",
",",
"UniqueNamer",
"namer",
")",
"{",
"// return cached hash",
"if",
"(",
"(",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
... | Hashes all of the quads about a blank node.
@param id
the ID of the bnode to hash quads for.
@param bnodes
the mapping of bnodes to quads.
@param namer
the canonical bnode namer.
@return the new hash. | [
"Hashes",
"all",
"of",
"the",
"quads",
"about",
"a",
"blank",
"node",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/NormalizeUtils.java#L427-L450 |
49,256 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/NormalizeUtils.java | NormalizeUtils.sha1hash | private static String sha1hash(Collection<String> nquads) {
try {
// create SHA-1 digest
final MessageDigest md = MessageDigest.getInstance("SHA-1");
for (final String nquad : nquads) {
md.update(nquad.getBytes("UTF-8"));
}
return encod... | java | private static String sha1hash(Collection<String> nquads) {
try {
// create SHA-1 digest
final MessageDigest md = MessageDigest.getInstance("SHA-1");
for (final String nquad : nquads) {
md.update(nquad.getBytes("UTF-8"));
}
return encod... | [
"private",
"static",
"String",
"sha1hash",
"(",
"Collection",
"<",
"String",
">",
"nquads",
")",
"{",
"try",
"{",
"// create SHA-1 digest",
"final",
"MessageDigest",
"md",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"SHA-1\"",
")",
";",
"for",
"(",
"final... | A helper class to sha1 hash all the strings in a collection
@param nquads
@return | [
"A",
"helper",
"class",
"to",
"sha1",
"hash",
"all",
"the",
"strings",
"in",
"a",
"collection"
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/NormalizeUtils.java#L458-L471 |
49,257 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdOptions.java | JsonLdOptions.copy | public JsonLdOptions copy() {
final JsonLdOptions copy = new JsonLdOptions(base);
copy.setCompactArrays(compactArrays);
copy.setExpandContext(expandContext);
copy.setProcessingMode(processingMode);
copy.setDocumentLoader(documentLoader);
copy.setEmbed(embed);
cop... | java | public JsonLdOptions copy() {
final JsonLdOptions copy = new JsonLdOptions(base);
copy.setCompactArrays(compactArrays);
copy.setExpandContext(expandContext);
copy.setProcessingMode(processingMode);
copy.setDocumentLoader(documentLoader);
copy.setEmbed(embed);
cop... | [
"public",
"JsonLdOptions",
"copy",
"(",
")",
"{",
"final",
"JsonLdOptions",
"copy",
"=",
"new",
"JsonLdOptions",
"(",
"base",
")",
";",
"copy",
".",
"setCompactArrays",
"(",
"compactArrays",
")",
";",
"copy",
".",
"setExpandContext",
"(",
"expandContext",
")",... | Creates a shallow copy of this JsonLdOptions object.
It will share the same DocumentLoader unless that is overridden, and
other mutable objects, so it isn't immutable.
@return A copy of this JsonLdOptions object. | [
"Creates",
"a",
"shallow",
"copy",
"of",
"this",
"JsonLdOptions",
"object",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdOptions.java#L46-L69 |
49,258 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java | JsonLdApi.removeEmbed | private static void removeEmbed(FramingContext state, String id) {
// get existing embed
final Map<String, EmbedNode> links = state.uniqueEmbeds;
final EmbedNode embed = links.get(id);
final Object parent = embed.parent;
final String property = embed.property;
// create ... | java | private static void removeEmbed(FramingContext state, String id) {
// get existing embed
final Map<String, EmbedNode> links = state.uniqueEmbeds;
final EmbedNode embed = links.get(id);
final Object parent = embed.parent;
final String property = embed.property;
// create ... | [
"private",
"static",
"void",
"removeEmbed",
"(",
"FramingContext",
"state",
",",
"String",
"id",
")",
"{",
"// get existing embed",
"final",
"Map",
"<",
"String",
",",
"EmbedNode",
">",
"links",
"=",
"state",
".",
"uniqueEmbeds",
";",
"final",
"EmbedNode",
"em... | Removes an existing embed.
@param state
the current framing state.
@param id
the @id of the embed to remove. | [
"Removes",
"an",
"existing",
"embed",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java#L1651-L1679 |
49,259 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java | JsonLdApi.addFrameOutput | private static void addFrameOutput(FramingContext state, Object parent, String property,
Object output) {
if (parent instanceof Map) {
List<Object> prop = (List<Object>) ((Map<String, Object>) parent).get(property);
if (prop == null) {
prop = new ArrayList<Obj... | java | private static void addFrameOutput(FramingContext state, Object parent, String property,
Object output) {
if (parent instanceof Map) {
List<Object> prop = (List<Object>) ((Map<String, Object>) parent).get(property);
if (prop == null) {
prop = new ArrayList<Obj... | [
"private",
"static",
"void",
"addFrameOutput",
"(",
"FramingContext",
"state",
",",
"Object",
"parent",
",",
"String",
"property",
",",
"Object",
"output",
")",
"{",
"if",
"(",
"parent",
"instanceof",
"Map",
")",
"{",
"List",
"<",
"Object",
">",
"prop",
"=... | Adds framing output to the given parent.
@param state
the current framing state.
@param parent
the parent to add to.
@param property
the parent property.
@param output
the output to add. | [
"Adds",
"framing",
"output",
"to",
"the",
"given",
"parent",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java#L1822-L1834 |
49,260 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java | JsonLdApi.toRDF | public RDFDataset toRDF() throws JsonLdError {
// TODO: make the default generateNodeMap call (i.e. without a
// graphName) create and return the nodeMap
final Map<String, Object> nodeMap = newMap();
nodeMap.put(JsonLdConsts.DEFAULT, newMap());
generateNodeMap(this.value, nodeMap... | java | public RDFDataset toRDF() throws JsonLdError {
// TODO: make the default generateNodeMap call (i.e. without a
// graphName) create and return the nodeMap
final Map<String, Object> nodeMap = newMap();
nodeMap.put(JsonLdConsts.DEFAULT, newMap());
generateNodeMap(this.value, nodeMap... | [
"public",
"RDFDataset",
"toRDF",
"(",
")",
"throws",
"JsonLdError",
"{",
"// TODO: make the default generateNodeMap call (i.e. without a",
"// graphName) create and return the nodeMap",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"nodeMap",
"=",
"newMap",
"(",
")",
... | Adds RDF triples for each graph in the current node map to an RDF
dataset.
@return the RDF dataset.
@throws JsonLdError
If there was an error converting from JSON-LD to RDF. | [
"Adds",
"RDF",
"triples",
"for",
"each",
"graph",
"in",
"the",
"current",
"node",
"map",
"to",
"an",
"RDF",
"dataset",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java#L2146-L2165 |
49,261 | jsonld-java/jsonld-java | core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java | JsonLdApi.normalize | public Object normalize(Map<String, Object> dataset) throws JsonLdError {
// create quads and map bnodes to their associated quads
final List<Object> quads = new ArrayList<Object>();
final Map<String, Object> bnodes = newMap();
for (String graphName : dataset.keySet()) {
fina... | java | public Object normalize(Map<String, Object> dataset) throws JsonLdError {
// create quads and map bnodes to their associated quads
final List<Object> quads = new ArrayList<Object>();
final Map<String, Object> bnodes = newMap();
for (String graphName : dataset.keySet()) {
fina... | [
"public",
"Object",
"normalize",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"dataset",
")",
"throws",
"JsonLdError",
"{",
"// create quads and map bnodes to their associated quads",
"final",
"List",
"<",
"Object",
">",
"quads",
"=",
"new",
"ArrayList",
"<",
"O... | Performs RDF normalization on the given JSON-LD input.
@param dataset
the expanded JSON-LD object to normalize.
@return The normalized JSON-LD object
@throws JsonLdError
If there was an error while normalizing. | [
"Performs",
"RDF",
"normalization",
"on",
"the",
"given",
"JSON",
"-",
"LD",
"input",
"."
] | efeef6ee96029a0011649633457035fa6be42da1 | https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java#L2186-L2236 |
49,262 | stagemonitor/stagemonitor | stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/profiler/CallStackElement.java | CallStackElement.create | public static CallStackElement create(CallStackElement parent, String signature, long startTimestamp) {
CallStackElement cse;
if (useObjectPooling) {
cse = objectPool.poll();
if (cse == null) {
cse = new CallStackElement();
}
} else {
cse = new CallStackElement();
}
cse.executionTime = startT... | java | public static CallStackElement create(CallStackElement parent, String signature, long startTimestamp) {
CallStackElement cse;
if (useObjectPooling) {
cse = objectPool.poll();
if (cse == null) {
cse = new CallStackElement();
}
} else {
cse = new CallStackElement();
}
cse.executionTime = startT... | [
"public",
"static",
"CallStackElement",
"create",
"(",
"CallStackElement",
"parent",
",",
"String",
"signature",
",",
"long",
"startTimestamp",
")",
"{",
"CallStackElement",
"cse",
";",
"if",
"(",
"useObjectPooling",
")",
"{",
"cse",
"=",
"objectPool",
".",
"pol... | This static factory method also sets the parent-child relationships.
@param parent the parent
@param startTimestamp the timestamp at the beginning of the method | [
"This",
"static",
"factory",
"method",
"also",
"sets",
"the",
"parent",
"-",
"child",
"relationships",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/profiler/CallStackElement.java#L55-L73 |
49,263 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/instrument/StagemonitorByteBuddyTransformer.java | StagemonitorByteBuddyTransformer.beforeTransformation | public void beforeTransformation(TypeDescription typeDescription, ClassLoader classLoader) {
if (isPreventDuplicateTransformation()) {
Dispatcher.put(getClassAlreadyTransformedKey(typeDescription, classLoader), Boolean.TRUE);
}
if (DEBUG_INSTRUMENTATION && logger.isDebugEnabled()) {
logger.debug("TRANSFORM... | java | public void beforeTransformation(TypeDescription typeDescription, ClassLoader classLoader) {
if (isPreventDuplicateTransformation()) {
Dispatcher.put(getClassAlreadyTransformedKey(typeDescription, classLoader), Boolean.TRUE);
}
if (DEBUG_INSTRUMENTATION && logger.isDebugEnabled()) {
logger.debug("TRANSFORM... | [
"public",
"void",
"beforeTransformation",
"(",
"TypeDescription",
"typeDescription",
",",
"ClassLoader",
"classLoader",
")",
"{",
"if",
"(",
"isPreventDuplicateTransformation",
"(",
")",
")",
"{",
"Dispatcher",
".",
"put",
"(",
"getClassAlreadyTransformedKey",
"(",
"t... | This method is called before the transformation.
You can stop the transformation from happening by returning false from this method.
@param typeDescription The type that is being transformed.
@param classLoader The class loader which is loading this type. | [
"This",
"method",
"is",
"called",
"before",
"the",
"transformation",
".",
"You",
"can",
"stop",
"the",
"transformation",
"from",
"happening",
"by",
"returning",
"false",
"from",
"this",
"method",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/instrument/StagemonitorByteBuddyTransformer.java#L226-L234 |
49,264 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/instrument/CallerUtil.java | CallerUtil.getCallerSignature | public static String getCallerSignature() {
if (Stagemonitor.getPlugin(CorePlugin.class).getIncludePackages().isEmpty()) {
return null;
}
if (javaLangAccessObject != null) {
return getCallerSignatureSharedSecrets();
} else {
return getCallerSignatureGetStackTrace();
}
} | java | public static String getCallerSignature() {
if (Stagemonitor.getPlugin(CorePlugin.class).getIncludePackages().isEmpty()) {
return null;
}
if (javaLangAccessObject != null) {
return getCallerSignatureSharedSecrets();
} else {
return getCallerSignatureGetStackTrace();
}
} | [
"public",
"static",
"String",
"getCallerSignature",
"(",
")",
"{",
"if",
"(",
"Stagemonitor",
".",
"getPlugin",
"(",
"CorePlugin",
".",
"class",
")",
".",
"getIncludePackages",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"if... | Returns the signature of the method inside the monitored codebase which was last executed. | [
"Returns",
"the",
"signature",
"of",
"the",
"method",
"inside",
"the",
"monitored",
"codebase",
"which",
"was",
"last",
"executed",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/instrument/CallerUtil.java#L28-L37 |
49,265 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/Stagemonitor.java | Stagemonitor.reset | @Deprecated
public static void reset(MeasurementSession measurementSession) {
started = false;
disabled = false;
if (configuration == null) {
reloadPluginsAndConfiguration();
}
if (measurementSession == null) {
CorePlugin corePlugin = getPlugin(CorePlugin.class);
measurementSession = new Measurement... | java | @Deprecated
public static void reset(MeasurementSession measurementSession) {
started = false;
disabled = false;
if (configuration == null) {
reloadPluginsAndConfiguration();
}
if (measurementSession == null) {
CorePlugin corePlugin = getPlugin(CorePlugin.class);
measurementSession = new Measurement... | [
"@",
"Deprecated",
"public",
"static",
"void",
"reset",
"(",
"MeasurementSession",
"measurementSession",
")",
"{",
"started",
"=",
"false",
";",
"disabled",
"=",
"false",
";",
"if",
"(",
"configuration",
"==",
"null",
")",
"{",
"reloadPluginsAndConfiguration",
"... | Should only be used outside of this class by the internal unit tests | [
"Should",
"only",
"be",
"used",
"outside",
"of",
"this",
"class",
"by",
"the",
"internal",
"unit",
"tests"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/Stagemonitor.java#L303-L329 |
49,266 | stagemonitor/stagemonitor | stagemonitor-web-servlet/src/main/java/org/stagemonitor/web/servlet/configuration/ConfigurationPasswordChecker.java | ConfigurationPasswordChecker.isPasswordCorrect | public boolean isPasswordCorrect(String password) {
final String actualPassword = configurationRegistry.getString(updateConfigPasswordKey);
return "".equals(actualPassword) || actualPassword != null && actualPassword.equals(password);
} | java | public boolean isPasswordCorrect(String password) {
final String actualPassword = configurationRegistry.getString(updateConfigPasswordKey);
return "".equals(actualPassword) || actualPassword != null && actualPassword.equals(password);
} | [
"public",
"boolean",
"isPasswordCorrect",
"(",
"String",
"password",
")",
"{",
"final",
"String",
"actualPassword",
"=",
"configurationRegistry",
".",
"getString",
"(",
"updateConfigPasswordKey",
")",
";",
"return",
"\"\"",
".",
"equals",
"(",
"actualPassword",
")",... | Validates a password.
@param password the provided password to validate
@return <code>true</code>, if the password is correct, <code>false</code> otherwise | [
"Validates",
"a",
"password",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-web-servlet/src/main/java/org/stagemonitor/web/servlet/configuration/ConfigurationPasswordChecker.java#L21-L24 |
49,267 | stagemonitor/stagemonitor | stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/converter/EnumValueConverter.java | EnumValueConverter.convert | @Override
public T convert(String name) throws IllegalArgumentException {
if (name == null) {
throw new IllegalArgumentException("Cant convert 'null' to " + enumClass.getSimpleName());
}
try {
return Enum.valueOf(enumClass, name);
} catch (IllegalArgumentException e) {
// ignore
}
try {
return ... | java | @Override
public T convert(String name) throws IllegalArgumentException {
if (name == null) {
throw new IllegalArgumentException("Cant convert 'null' to " + enumClass.getSimpleName());
}
try {
return Enum.valueOf(enumClass, name);
} catch (IllegalArgumentException e) {
// ignore
}
try {
return ... | [
"@",
"Override",
"public",
"T",
"convert",
"(",
"String",
"name",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Cant convert 'null' to \"",
"+",
"enumClass",
".",
"g... | Converts a String into an Enum.
@param name The Enum's name. May be in the form THE_ENUM, the_enum or the-enum.
@return The Enum
@throws IllegalArgumentException if there is no such Enum constant | [
"Converts",
"a",
"String",
"into",
"an",
"Enum",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/converter/EnumValueConverter.java#L21-L43 |
49,268 | stagemonitor/stagemonitor | stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/AlerterTypeServlet.java | AlerterTypeServlet.doGet | @Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
if (alertingPlugin.getAlertSender() != null) {
JsonUtils.writeJsonToOutputStream(alertingPlugin.getAlertSender().getAvailableAlerters(),
resp.getOutputStream());
} else {
JsonUtils.wri... | java | @Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
if (alertingPlugin.getAlertSender() != null) {
JsonUtils.writeJsonToOutputStream(alertingPlugin.getAlertSender().getAvailableAlerters(),
resp.getOutputStream());
} else {
JsonUtils.wri... | [
"@",
"Override",
"protected",
"void",
"doGet",
"(",
"HttpServletRequest",
"req",
",",
"HttpServletResponse",
"resp",
")",
"throws",
"ServletException",
",",
"IOException",
"{",
"if",
"(",
"alertingPlugin",
".",
"getAlertSender",
"(",
")",
"!=",
"null",
")",
"{",... | Returns all available alerters | [
"Returns",
"all",
"available",
"alerters"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/AlerterTypeServlet.java#L33-L41 |
49,269 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/StagemonitorCoreConfigurationSourceInitializer.java | StagemonitorCoreConfigurationSourceInitializer.addRemotePropertiesConfigurationSources | private void addRemotePropertiesConfigurationSources(ConfigurationRegistry configuration, CorePlugin corePlugin) {
final List<URL> configurationUrls = corePlugin.getRemotePropertiesConfigUrls();
if (corePlugin.isDeactivateStagemonitorIfRemotePropertyServerIsDown()) {
assertRemotePropertiesServerIsAvailable(confi... | java | private void addRemotePropertiesConfigurationSources(ConfigurationRegistry configuration, CorePlugin corePlugin) {
final List<URL> configurationUrls = corePlugin.getRemotePropertiesConfigUrls();
if (corePlugin.isDeactivateStagemonitorIfRemotePropertyServerIsDown()) {
assertRemotePropertiesServerIsAvailable(confi... | [
"private",
"void",
"addRemotePropertiesConfigurationSources",
"(",
"ConfigurationRegistry",
"configuration",
",",
"CorePlugin",
"corePlugin",
")",
"{",
"final",
"List",
"<",
"URL",
">",
"configurationUrls",
"=",
"corePlugin",
".",
"getRemotePropertiesConfigUrls",
"(",
")"... | Creates and registers a RemotePropertiesConfigurationSource for each configuration url | [
"Creates",
"and",
"registers",
"a",
"RemotePropertiesConfigurationSource",
"for",
"each",
"configuration",
"url"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/StagemonitorCoreConfigurationSourceInitializer.java#L79-L95 |
49,270 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/StagemonitorCoreConfigurationSourceInitializer.java | StagemonitorCoreConfigurationSourceInitializer.assertRemotePropertiesServerIsAvailable | private void assertRemotePropertiesServerIsAvailable(final URL configUrl) {
new HttpClient().send(
"HEAD",
configUrl.toExternalForm(),
new HashMap<String, String>(),
null,
new HttpClient.ResponseHandler<Void>() {
@Override
public Void handleResponse(HttpRequest<?> httpRequest, InputStrea... | java | private void assertRemotePropertiesServerIsAvailable(final URL configUrl) {
new HttpClient().send(
"HEAD",
configUrl.toExternalForm(),
new HashMap<String, String>(),
null,
new HttpClient.ResponseHandler<Void>() {
@Override
public Void handleResponse(HttpRequest<?> httpRequest, InputStrea... | [
"private",
"void",
"assertRemotePropertiesServerIsAvailable",
"(",
"final",
"URL",
"configUrl",
")",
"{",
"new",
"HttpClient",
"(",
")",
".",
"send",
"(",
"\"HEAD\"",
",",
"configUrl",
".",
"toExternalForm",
"(",
")",
",",
"new",
"HashMap",
"<",
"String",
",",... | Does a simple HEAD request to a configuration endpoint to check if it's reachable. If not an
IllegalStateException is thrown
@param configUrl Full qualified configuration url | [
"Does",
"a",
"simple",
"HEAD",
"request",
"to",
"a",
"configuration",
"endpoint",
"to",
"check",
"if",
"it",
"s",
"reachable",
".",
"If",
"not",
"an",
"IllegalStateException",
"is",
"thrown"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/StagemonitorCoreConfigurationSourceInitializer.java#L103-L120 |
49,271 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/prometheus/StagemonitorPrometheusCollector.java | StagemonitorPrometheusCollector.fromCounter | private CounterMetricFamily fromCounter(List<Map.Entry<MetricName, Counter>> countersWithSameName) {
final Map.Entry<MetricName, Counter> first = countersWithSameName.get(0);
final MetricName firstName = first.getKey();
final CounterMetricFamily metricFamily = new CounterMetricFamily(firstName.getName(), getHelpM... | java | private CounterMetricFamily fromCounter(List<Map.Entry<MetricName, Counter>> countersWithSameName) {
final Map.Entry<MetricName, Counter> first = countersWithSameName.get(0);
final MetricName firstName = first.getKey();
final CounterMetricFamily metricFamily = new CounterMetricFamily(firstName.getName(), getHelpM... | [
"private",
"CounterMetricFamily",
"fromCounter",
"(",
"List",
"<",
"Map",
".",
"Entry",
"<",
"MetricName",
",",
"Counter",
">",
">",
"countersWithSameName",
")",
"{",
"final",
"Map",
".",
"Entry",
"<",
"MetricName",
",",
"Counter",
">",
"first",
"=",
"counte... | Export counter as prometheus counter. | [
"Export",
"counter",
"as",
"prometheus",
"counter",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/prometheus/StagemonitorPrometheusCollector.java#L75-L83 |
49,272 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/prometheus/StagemonitorPrometheusCollector.java | StagemonitorPrometheusCollector.fromTimer | private MetricFamilySamples fromTimer(List<Map.Entry<MetricName, Timer>> histogramsWithSameName) {
final SummaryMetricFamily summaryMetricFamily = getSummaryMetricFamily(histogramsWithSameName, "_seconds");
for (Map.Entry<MetricName, Timer> entry : histogramsWithSameName) {
addSummaryMetric(summaryMetricFamily, ... | java | private MetricFamilySamples fromTimer(List<Map.Entry<MetricName, Timer>> histogramsWithSameName) {
final SummaryMetricFamily summaryMetricFamily = getSummaryMetricFamily(histogramsWithSameName, "_seconds");
for (Map.Entry<MetricName, Timer> entry : histogramsWithSameName) {
addSummaryMetric(summaryMetricFamily, ... | [
"private",
"MetricFamilySamples",
"fromTimer",
"(",
"List",
"<",
"Map",
".",
"Entry",
"<",
"MetricName",
",",
"Timer",
">",
">",
"histogramsWithSameName",
")",
"{",
"final",
"SummaryMetricFamily",
"summaryMetricFamily",
"=",
"getSummaryMetricFamily",
"(",
"histogramsW... | Export dropwizard Timer as a histogram. Use TIME_UNIT as time unit. | [
"Export",
"dropwizard",
"Timer",
"as",
"a",
"histogram",
".",
"Use",
"TIME_UNIT",
"as",
"time",
"unit",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/prometheus/StagemonitorPrometheusCollector.java#L127-L133 |
49,273 | stagemonitor/stagemonitor | stagemonitor-dispatcher/src/main/java/__redirected/org/stagemonitor/dispatcher/Dispatcher.java | Dispatcher.get | @SuppressWarnings("unchecked")
public static <T> T get(String key, Class<T> valueClass) {
return (T) values.get(key);
} | java | @SuppressWarnings("unchecked")
public static <T> T get(String key, Class<T> valueClass) {
return (T) values.get(key);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"get",
"(",
"String",
"key",
",",
"Class",
"<",
"T",
">",
"valueClass",
")",
"{",
"return",
"(",
"T",
")",
"values",
".",
"get",
"(",
"key",
")",
";",
"}"
] | Gets a shared value by it's key
<p> Automatically casts the value to the desired type </p>
@param key the key
@param valueClass the class of the value
@param <T> the type of the value
@return the shared value | [
"Gets",
"a",
"shared",
"value",
"by",
"it",
"s",
"key"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-dispatcher/src/main/java/__redirected/org/stagemonitor/dispatcher/Dispatcher.java#L55-L58 |
49,274 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/instrument/AgentAttacher.java | AgentAttacher.performRuntimeAttachment | public static synchronized Runnable performRuntimeAttachment() {
if (runtimeAttached || !corePlugin.isStagemonitorActive() || !corePlugin.isAttachAgentAtRuntime()) {
return NOOP_ON_SHUTDOWN_ACTION;
}
runtimeAttached = true;
final List<ClassFileTransformer> classFileTransformers = new ArrayList<ClassFileTran... | java | public static synchronized Runnable performRuntimeAttachment() {
if (runtimeAttached || !corePlugin.isStagemonitorActive() || !corePlugin.isAttachAgentAtRuntime()) {
return NOOP_ON_SHUTDOWN_ACTION;
}
runtimeAttached = true;
final List<ClassFileTransformer> classFileTransformers = new ArrayList<ClassFileTran... | [
"public",
"static",
"synchronized",
"Runnable",
"performRuntimeAttachment",
"(",
")",
"{",
"if",
"(",
"runtimeAttached",
"||",
"!",
"corePlugin",
".",
"isStagemonitorActive",
"(",
")",
"||",
"!",
"corePlugin",
".",
"isAttachAgentAtRuntime",
"(",
")",
")",
"{",
"... | Attaches the profiler and other instrumenters at runtime so that it is not necessary to add the -javaagent
command line argument.
@return A runnable that should be called on shutdown to unregister this class file transformer | [
"Attaches",
"the",
"profiler",
"and",
"other",
"instrumenters",
"at",
"runtime",
"so",
"that",
"it",
"is",
"not",
"necessary",
"to",
"add",
"the",
"-",
"javaagent",
"command",
"line",
"argument",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/instrument/AgentAttacher.java#L75-L101 |
49,275 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/util/MBeanUtils.java | MBeanUtils.registerMBean | public static void registerMBean(final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry) {
metricRegistry.register(metricName, new Gauge<Object>() {
@Override
public Object getValue() {
return getValueFromMBean(objectInstance, mBeanAttribu... | java | public static void registerMBean(final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry) {
metricRegistry.register(metricName, new Gauge<Object>() {
@Override
public Object getValue() {
return getValueFromMBean(objectInstance, mBeanAttribu... | [
"public",
"static",
"void",
"registerMBean",
"(",
"final",
"ObjectInstance",
"objectInstance",
",",
"final",
"String",
"mBeanAttributeName",
",",
"MetricName",
"metricName",
",",
"Metric2Registry",
"metricRegistry",
")",
"{",
"metricRegistry",
".",
"register",
"(",
"m... | Registers a MBean into the MetricRegistry
@param objectInstance The ObjectInstance
@param mBeanAttributeName The attribute name of the MBean that should be collected
@param metricName The name of the metric in the MetricRegistry
@param metricRegistry The metric registry the values of the mbean should b... | [
"Registers",
"a",
"MBean",
"into",
"the",
"MetricRegistry"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/util/MBeanUtils.java#L84-L91 |
49,276 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/metrics2/Metric2Registry.java | Metric2Registry.registerAll | public void registerAll(Metric2Set metrics) throws IllegalArgumentException {
for (Map.Entry<MetricName, Metric> entry : metrics.getMetrics().entrySet()) {
register(entry.getKey(), entry.getValue());
}
} | java | public void registerAll(Metric2Set metrics) throws IllegalArgumentException {
for (Map.Entry<MetricName, Metric> entry : metrics.getMetrics().entrySet()) {
register(entry.getKey(), entry.getValue());
}
} | [
"public",
"void",
"registerAll",
"(",
"Metric2Set",
"metrics",
")",
"throws",
"IllegalArgumentException",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"MetricName",
",",
"Metric",
">",
"entry",
":",
"metrics",
".",
"getMetrics",
"(",
")",
".",
"entrySet",
"(",... | Given a metric set, registers them.
@param metrics a set of metrics
@throws IllegalArgumentException if any of the names are already registered | [
"Given",
"a",
"metric",
"set",
"registers",
"them",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/metrics2/Metric2Registry.java#L77-L81 |
49,277 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/metrics2/Metric2Registry.java | Metric2Registry.registerAny | public void registerAny(Metric2Set metrics) {
for (Map.Entry<MetricName, Metric> entry : metrics.getMetrics().entrySet()) {
registerNewMetrics(entry.getKey(), entry.getValue());
}
} | java | public void registerAny(Metric2Set metrics) {
for (Map.Entry<MetricName, Metric> entry : metrics.getMetrics().entrySet()) {
registerNewMetrics(entry.getKey(), entry.getValue());
}
} | [
"public",
"void",
"registerAny",
"(",
"Metric2Set",
"metrics",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"MetricName",
",",
"Metric",
">",
"entry",
":",
"metrics",
".",
"getMetrics",
"(",
")",
".",
"entrySet",
"(",
")",
")",
"{",
"registerNewMetric... | Given a metric set, registers the ones not already registered.
This method prevents IllegalArgumentException
@param metrics a set of metrics | [
"Given",
"a",
"metric",
"set",
"registers",
"the",
"ones",
"not",
"already",
"registered",
".",
"This",
"method",
"prevents",
"IllegalArgumentException"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/metrics2/Metric2Registry.java#L88-L92 |
49,278 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/metrics2/Metric2Registry.java | Metric2Registry.registerNewMetrics | public void registerNewMetrics(MetricName name, Metric metric) {
final Set<MetricName> registeredNames = getNames();
if (!registeredNames.contains(name)) {
try {
register(name, metric);
} catch (IllegalArgumentException e){/* exception due to race condition*/}
}
} | java | public void registerNewMetrics(MetricName name, Metric metric) {
final Set<MetricName> registeredNames = getNames();
if (!registeredNames.contains(name)) {
try {
register(name, metric);
} catch (IllegalArgumentException e){/* exception due to race condition*/}
}
} | [
"public",
"void",
"registerNewMetrics",
"(",
"MetricName",
"name",
",",
"Metric",
"metric",
")",
"{",
"final",
"Set",
"<",
"MetricName",
">",
"registeredNames",
"=",
"getNames",
"(",
")",
";",
"if",
"(",
"!",
"registeredNames",
".",
"contains",
"(",
"name",
... | Only registers the metric if it is not already registered
@param name the name of the metric
@param metric the metric | [
"Only",
"registers",
"the",
"metric",
"if",
"it",
"is",
"not",
"already",
"registered"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/metrics2/Metric2Registry.java#L99-L106 |
49,279 | stagemonitor/stagemonitor | stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/MailRequest.java | MailRequest.createMimeMessage | public MimeMessage createMimeMessage(Session session) throws MessagingException {
if (isEmpty(htmlPart) && isEmpty(textPart)) {
throw new IllegalArgumentException("Missing email content");
}
final MimeMessage msg = new MimeMessage(session);
msg.setSubject(subject);
msg.setFrom(new InternetAddress(from));
... | java | public MimeMessage createMimeMessage(Session session) throws MessagingException {
if (isEmpty(htmlPart) && isEmpty(textPart)) {
throw new IllegalArgumentException("Missing email content");
}
final MimeMessage msg = new MimeMessage(session);
msg.setSubject(subject);
msg.setFrom(new InternetAddress(from));
... | [
"public",
"MimeMessage",
"createMimeMessage",
"(",
"Session",
"session",
")",
"throws",
"MessagingException",
"{",
"if",
"(",
"isEmpty",
"(",
"htmlPart",
")",
"&&",
"isEmpty",
"(",
"textPart",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Mi... | Creates a MimeMessage containing given Multipart.
Subject, sender and content and session will be set.
@param session current mail session
@return MimeMessage without recipients
@throws MessagingException | [
"Creates",
"a",
"MimeMessage",
"containing",
"given",
"Multipart",
".",
"Subject",
"sender",
"and",
"content",
"and",
"session",
"will",
"be",
"set",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/MailRequest.java#L78-L88 |
49,280 | stagemonitor/stagemonitor | stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/MailRequest.java | MailRequest.createMultiPart | private Multipart createMultiPart() throws MessagingException {
Multipart multipart = new MimeMultipart("alternative");
if (textPart != null) {
// add text first, to give priority to html
multipart.addBodyPart((BodyPart) createTextMimePart());
}
if (htmlPart != null) {
multipart.addBodyPart((BodyPart) ... | java | private Multipart createMultiPart() throws MessagingException {
Multipart multipart = new MimeMultipart("alternative");
if (textPart != null) {
// add text first, to give priority to html
multipart.addBodyPart((BodyPart) createTextMimePart());
}
if (htmlPart != null) {
multipart.addBodyPart((BodyPart) ... | [
"private",
"Multipart",
"createMultiPart",
"(",
")",
"throws",
"MessagingException",
"{",
"Multipart",
"multipart",
"=",
"new",
"MimeMultipart",
"(",
"\"alternative\"",
")",
";",
"if",
"(",
"textPart",
"!=",
"null",
")",
"{",
"// add text first, to give priority to ht... | Creates a Multipart from present parts.
@return multipart with all present parts
@throws MessagingException | [
"Creates",
"a",
"Multipart",
"from",
"present",
"parts",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/MailRequest.java#L95-L105 |
49,281 | stagemonitor/stagemonitor | stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/MailRequest.java | MailRequest.createHtmlMimePart | private MimePart createHtmlMimePart() throws MessagingException {
MimePart bodyPart = new MimeBodyPart();
bodyPart.setContent(htmlPart, "text/html; charset=utf-8");
return bodyPart;
} | java | private MimePart createHtmlMimePart() throws MessagingException {
MimePart bodyPart = new MimeBodyPart();
bodyPart.setContent(htmlPart, "text/html; charset=utf-8");
return bodyPart;
} | [
"private",
"MimePart",
"createHtmlMimePart",
"(",
")",
"throws",
"MessagingException",
"{",
"MimePart",
"bodyPart",
"=",
"new",
"MimeBodyPart",
"(",
")",
";",
"bodyPart",
".",
"setContent",
"(",
"htmlPart",
",",
"\"text/html; charset=utf-8\"",
")",
";",
"return",
... | Creates a MimePart from HTML part.
@return mimePart from HTML part
@throws MessagingException | [
"Creates",
"a",
"MimePart",
"from",
"HTML",
"part",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/MailRequest.java#L113-L117 |
49,282 | stagemonitor/stagemonitor | stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/MailRequest.java | MailRequest.createTextMimePart | private MimePart createTextMimePart() throws MessagingException {
MimePart bodyPart = new MimeBodyPart();
bodyPart.setText(textPart);
return bodyPart;
} | java | private MimePart createTextMimePart() throws MessagingException {
MimePart bodyPart = new MimeBodyPart();
bodyPart.setText(textPart);
return bodyPart;
} | [
"private",
"MimePart",
"createTextMimePart",
"(",
")",
"throws",
"MessagingException",
"{",
"MimePart",
"bodyPart",
"=",
"new",
"MimeBodyPart",
"(",
")",
";",
"bodyPart",
".",
"setText",
"(",
"textPart",
")",
";",
"return",
"bodyPart",
";",
"}"
] | Creates a MimePart from text part.
@return mimePart from HTML string
@throws MessagingException | [
"Creates",
"a",
"MimePart",
"from",
"text",
"part",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/MailRequest.java#L125-L129 |
49,283 | stagemonitor/stagemonitor | stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/sampling/PreExecutionInterceptorContext.java | PreExecutionInterceptorContext.mustCollectCallTree | public PreExecutionInterceptorContext mustCollectCallTree(String reason) {
logger.debug("Must collect call tree because {}", reason);
mustCollectCallTree = true;
collectCallTree = true;
return this;
} | java | public PreExecutionInterceptorContext mustCollectCallTree(String reason) {
logger.debug("Must collect call tree because {}", reason);
mustCollectCallTree = true;
collectCallTree = true;
return this;
} | [
"public",
"PreExecutionInterceptorContext",
"mustCollectCallTree",
"(",
"String",
"reason",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Must collect call tree because {}\"",
",",
"reason",
")",
";",
"mustCollectCallTree",
"=",
"true",
";",
"collectCallTree",
"=",
"true",
... | Makes sure, that a call tree is collected for the current request. In other words, profiles this request.
@param reason the reason why a call tree should always be collected (debug message)
@return <code>this</code> for chaining | [
"Makes",
"sure",
"that",
"a",
"call",
"tree",
"is",
"collected",
"for",
"the",
"current",
"request",
".",
"In",
"other",
"words",
"profiles",
"this",
"request",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/sampling/PreExecutionInterceptorContext.java#L24-L29 |
49,284 | stagemonitor/stagemonitor | stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/sampling/PreExecutionInterceptorContext.java | PreExecutionInterceptorContext.shouldNotCollectCallTree | public PreExecutionInterceptorContext shouldNotCollectCallTree(String reason) {
if (!mustCollectCallTree) {
logger.debug("Should not collect call tree because {}", reason);
collectCallTree = false;
}
return this;
} | java | public PreExecutionInterceptorContext shouldNotCollectCallTree(String reason) {
if (!mustCollectCallTree) {
logger.debug("Should not collect call tree because {}", reason);
collectCallTree = false;
}
return this;
} | [
"public",
"PreExecutionInterceptorContext",
"shouldNotCollectCallTree",
"(",
"String",
"reason",
")",
"{",
"if",
"(",
"!",
"mustCollectCallTree",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Should not collect call tree because {}\"",
",",
"reason",
")",
";",
"collectCallT... | Requests that this request should not be profiled
@param reason the reason why no call tree should be collected (debug message)
@return <code>this</code> for chaining | [
"Requests",
"that",
"this",
"request",
"should",
"not",
"be",
"profiled"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/sampling/PreExecutionInterceptorContext.java#L37-L43 |
49,285 | stagemonitor/stagemonitor | stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/check/Check.java | Check.check | public List<CheckResult> check(MetricName actualTarget, Map<String, Number> currentValuesByMetric) {
SortedMap<CheckResult.Status, List<Threshold>> sortedThresholds = new TreeMap<CheckResult.Status, List<Threshold>>(thresholds);
for (Map.Entry<CheckResult.Status, List<Threshold>> entry : sortedThresholds.entrySet()... | java | public List<CheckResult> check(MetricName actualTarget, Map<String, Number> currentValuesByMetric) {
SortedMap<CheckResult.Status, List<Threshold>> sortedThresholds = new TreeMap<CheckResult.Status, List<Threshold>>(thresholds);
for (Map.Entry<CheckResult.Status, List<Threshold>> entry : sortedThresholds.entrySet()... | [
"public",
"List",
"<",
"CheckResult",
">",
"check",
"(",
"MetricName",
"actualTarget",
",",
"Map",
"<",
"String",
",",
"Number",
">",
"currentValuesByMetric",
")",
"{",
"SortedMap",
"<",
"CheckResult",
".",
"Status",
",",
"List",
"<",
"Threshold",
">",
">",
... | Performs threshold checks for the whole check group
@param currentValuesByMetric the values of the target
@param actualTarget the actual target that matched the {@link #target} pattern
@return a list of check results (results with OK statuses are omitted) | [
"Performs",
"threshold",
"checks",
"for",
"the",
"whole",
"check",
"group"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/check/Check.java#L49-L58 |
49,286 | stagemonitor/stagemonitor | stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationRegistry.java | ConfigurationRegistry.getNamesOfConfigurationSources | public Map<String, Boolean> getNamesOfConfigurationSources() {
final Map<String, Boolean> result = new LinkedHashMap<String, Boolean>();
for (ConfigurationSource configurationSource : configurationSources) {
result.put(configurationSource.getName(), configurationSource.isSavingPossible());
}
return result;
... | java | public Map<String, Boolean> getNamesOfConfigurationSources() {
final Map<String, Boolean> result = new LinkedHashMap<String, Boolean>();
for (ConfigurationSource configurationSource : configurationSources) {
result.put(configurationSource.getName(), configurationSource.isSavingPossible());
}
return result;
... | [
"public",
"Map",
"<",
"String",
",",
"Boolean",
">",
"getNamesOfConfigurationSources",
"(",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Boolean",
">",
"result",
"=",
"new",
"LinkedHashMap",
"<",
"String",
",",
"Boolean",
">",
"(",
")",
";",
"for",
"("... | Returns a map with the names of all configuration sources as key and a boolean indicating whether the configuration
source supports saving as value
@return the names of all configuration sources | [
"Returns",
"a",
"map",
"with",
"the",
"names",
"of",
"all",
"configuration",
"sources",
"as",
"key",
"and",
"a",
"boolean",
"indicating",
"whether",
"the",
"configuration",
"source",
"supports",
"saving",
"as",
"value"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationRegistry.java#L237-L243 |
49,287 | stagemonitor/stagemonitor | stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationRegistry.java | ConfigurationRegistry.reload | public void reload(String key) {
if (configurationOptionsByKey.containsKey(key)) {
configurationOptionsByKey.get(key).reload(false);
}
} | java | public void reload(String key) {
if (configurationOptionsByKey.containsKey(key)) {
configurationOptionsByKey.get(key).reload(false);
}
} | [
"public",
"void",
"reload",
"(",
"String",
"key",
")",
"{",
"if",
"(",
"configurationOptionsByKey",
".",
"containsKey",
"(",
"key",
")",
")",
"{",
"configurationOptionsByKey",
".",
"get",
"(",
"key",
")",
".",
"reload",
"(",
"false",
")",
";",
"}",
"}"
] | Reloads a specific dynamic configuration option.
@param key the key of the configuration option | [
"Reloads",
"a",
"specific",
"dynamic",
"configuration",
"option",
"."
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationRegistry.java#L294-L298 |
49,288 | stagemonitor/stagemonitor | stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationRegistry.java | ConfigurationRegistry.getString | public String getString(String key) {
if (key == null || key.isEmpty()) {
return null;
}
String property = null;
for (ConfigurationSource configurationSource : configurationSources) {
property = configurationSource.getValue(key);
if (property != null) {
break;
}
}
return property;
} | java | public String getString(String key) {
if (key == null || key.isEmpty()) {
return null;
}
String property = null;
for (ConfigurationSource configurationSource : configurationSources) {
property = configurationSource.getValue(key);
if (property != null) {
break;
}
}
return property;
} | [
"public",
"String",
"getString",
"(",
"String",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
"||",
"key",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"String",
"property",
"=",
"null",
";",
"for",
"(",
"ConfigurationSource",
"... | Gets the value of a configuration key as string
@param key the configuration key
@return the value of this configuration key | [
"Gets",
"the",
"value",
"of",
"a",
"configuration",
"key",
"as",
"string"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationRegistry.java#L428-L440 |
49,289 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/CorePlugin.java | CorePlugin.getElasticsearchUrl | public URL getElasticsearchUrl() {
final List<URL> urls = elasticsearchUrls.getValue();
if (urls.isEmpty()) {
return null;
}
final int index = accessesToElasticsearchUrl.getAndIncrement() % urls.size();
URL elasticsearchURL = urls.get(index);
final String defaultUsernameValue = elasticsearchDefaultUsern... | java | public URL getElasticsearchUrl() {
final List<URL> urls = elasticsearchUrls.getValue();
if (urls.isEmpty()) {
return null;
}
final int index = accessesToElasticsearchUrl.getAndIncrement() % urls.size();
URL elasticsearchURL = urls.get(index);
final String defaultUsernameValue = elasticsearchDefaultUsern... | [
"public",
"URL",
"getElasticsearchUrl",
"(",
")",
"{",
"final",
"List",
"<",
"URL",
">",
"urls",
"=",
"elasticsearchUrls",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"urls",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"final",
"in... | Cycles through all provided Elasticsearch URLs and returns one
@return One of the provided Elasticsearch URLs | [
"Cycles",
"through",
"all",
"provided",
"Elasticsearch",
"URLs",
"and",
"returns",
"one"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/CorePlugin.java#L702-L739 |
49,290 | stagemonitor/stagemonitor | stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationOption.java | ConfigurationOption.update | public void update(T newValue, String configurationSourceName) throws IOException {
final String newValueAsString = valueConverter.toString(newValue);
configuration.save(key, newValueAsString, configurationSourceName);
} | java | public void update(T newValue, String configurationSourceName) throws IOException {
final String newValueAsString = valueConverter.toString(newValue);
configuration.save(key, newValueAsString, configurationSourceName);
} | [
"public",
"void",
"update",
"(",
"T",
"newValue",
",",
"String",
"configurationSourceName",
")",
"throws",
"IOException",
"{",
"final",
"String",
"newValueAsString",
"=",
"valueConverter",
".",
"toString",
"(",
"newValue",
")",
";",
"configuration",
".",
"save",
... | Updates the existing value with a new one
@param newValue the new value
@param configurationSourceName the name of the configuration source that the value should be saved to
@throws IOException if there was an error saving the key to the source
@throws IllegalArgumentException if ... | [
"Updates",
"the",
"existing",
"value",
"with",
"a",
"new",
"one"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationOption.java#L560-L563 |
49,291 | stagemonitor/stagemonitor | stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationOption.java | ConfigurationOption.isDefault | public boolean isDefault() {
return (valueAsString != null && valueAsString.equals(defaultValueAsString)) ||
(valueAsString == null && defaultValueAsString == null);
} | java | public boolean isDefault() {
return (valueAsString != null && valueAsString.equals(defaultValueAsString)) ||
(valueAsString == null && defaultValueAsString == null);
} | [
"public",
"boolean",
"isDefault",
"(",
")",
"{",
"return",
"(",
"valueAsString",
"!=",
"null",
"&&",
"valueAsString",
".",
"equals",
"(",
"defaultValueAsString",
")",
")",
"||",
"(",
"valueAsString",
"==",
"null",
"&&",
"defaultValueAsString",
"==",
"null",
")... | Returns true if the current value is equal to the default value
@return true if the current value is equal to the default value | [
"Returns",
"true",
"if",
"the",
"current",
"value",
"is",
"equal",
"to",
"the",
"default",
"value"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationOption.java#L580-L583 |
49,292 | stagemonitor/stagemonitor | stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/metrics2/MetricName.java | MetricName.toGraphiteName | public String toGraphiteName() {
StringBuilder sb = new StringBuilder(GraphiteSanitizer.sanitizeGraphiteMetricSegment(name));
for (String value : tags.values()) {
sb.append('.').append(GraphiteSanitizer.sanitizeGraphiteMetricSegment(value));
}
return sb.toString();
} | java | public String toGraphiteName() {
StringBuilder sb = new StringBuilder(GraphiteSanitizer.sanitizeGraphiteMetricSegment(name));
for (String value : tags.values()) {
sb.append('.').append(GraphiteSanitizer.sanitizeGraphiteMetricSegment(value));
}
return sb.toString();
} | [
"public",
"String",
"toGraphiteName",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"GraphiteSanitizer",
".",
"sanitizeGraphiteMetricSegment",
"(",
"name",
")",
")",
";",
"for",
"(",
"String",
"value",
":",
"tags",
".",
"values",
"(",... | Converts a metrics 2.0 name into a graphite compliant name by appending all tag values to the metric name
@return A graphite compliant name | [
"Converts",
"a",
"metrics",
"2",
".",
"0",
"name",
"into",
"a",
"graphite",
"compliant",
"name",
"by",
"appending",
"all",
"tag",
"values",
"to",
"the",
"metric",
"name"
] | 7a1bf6848906f816aa465983f602ea1f1e8f2b7b | https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/metrics2/MetricName.java#L107-L113 |
49,293 | bluelinelabs/Conductor | conductor/src/main/java/com/bluelinelabs/conductor/Controller.java | Controller.getChildRouters | @NonNull
public final List<Router> getChildRouters() {
List<Router> routers = new ArrayList<>(childRouters.size());
routers.addAll(childRouters);
return routers;
} | java | @NonNull
public final List<Router> getChildRouters() {
List<Router> routers = new ArrayList<>(childRouters.size());
routers.addAll(childRouters);
return routers;
} | [
"@",
"NonNull",
"public",
"final",
"List",
"<",
"Router",
">",
"getChildRouters",
"(",
")",
"{",
"List",
"<",
"Router",
">",
"routers",
"=",
"new",
"ArrayList",
"<>",
"(",
"childRouters",
".",
"size",
"(",
")",
")",
";",
"routers",
".",
"addAll",
"(",
... | Returns all of this Controller's child Routers | [
"Returns",
"all",
"of",
"this",
"Controller",
"s",
"child",
"Routers"
] | 94c9121bb16f93b481954513a8e3905846829fb2 | https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/conductor/src/main/java/com/bluelinelabs/conductor/Controller.java#L355-L360 |
49,294 | bluelinelabs/Conductor | conductor/src/main/java/com/bluelinelabs/conductor/Controller.java | Controller.handleBack | public boolean handleBack() {
List<RouterTransaction> childTransactions = new ArrayList<>();
for (ControllerHostedRouter childRouter : childRouters) {
childTransactions.addAll(childRouter.getBackstack());
}
Collections.sort(childTransactions, new Comparator<RouterTransactio... | java | public boolean handleBack() {
List<RouterTransaction> childTransactions = new ArrayList<>();
for (ControllerHostedRouter childRouter : childRouters) {
childTransactions.addAll(childRouter.getBackstack());
}
Collections.sort(childTransactions, new Comparator<RouterTransactio... | [
"public",
"boolean",
"handleBack",
"(",
")",
"{",
"List",
"<",
"RouterTransaction",
">",
"childTransactions",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"ControllerHostedRouter",
"childRouter",
":",
"childRouters",
")",
"{",
"childTransactions",
"... | Should be overridden if this Controller needs to handle the back button being pressed.
@return True if this Controller has consumed the back button press, otherwise false | [
"Should",
"be",
"overridden",
"if",
"this",
"Controller",
"needs",
"to",
"handle",
"the",
"back",
"button",
"being",
"pressed",
"."
] | 94c9121bb16f93b481954513a8e3905846829fb2 | https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/conductor/src/main/java/com/bluelinelabs/conductor/Controller.java#L596-L619 |
49,295 | bluelinelabs/Conductor | conductor/src/main/java/com/bluelinelabs/conductor/Router.java | Router.getBackstack | @NonNull
public List<RouterTransaction> getBackstack() {
List<RouterTransaction> list = new ArrayList<>(backstack.size());
Iterator<RouterTransaction> backstackIterator = backstack.reverseIterator();
while (backstackIterator.hasNext()) {
list.add(backstackIterator.next());
... | java | @NonNull
public List<RouterTransaction> getBackstack() {
List<RouterTransaction> list = new ArrayList<>(backstack.size());
Iterator<RouterTransaction> backstackIterator = backstack.reverseIterator();
while (backstackIterator.hasNext()) {
list.add(backstackIterator.next());
... | [
"@",
"NonNull",
"public",
"List",
"<",
"RouterTransaction",
">",
"getBackstack",
"(",
")",
"{",
"List",
"<",
"RouterTransaction",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
"backstack",
".",
"size",
"(",
")",
")",
";",
"Iterator",
"<",
"RouterTransac... | Returns the current backstack, ordered from root to most recently pushed. | [
"Returns",
"the",
"current",
"backstack",
"ordered",
"from",
"root",
"to",
"most",
"recently",
"pushed",
"."
] | 94c9121bb16f93b481954513a8e3905846829fb2 | https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/conductor/src/main/java/com/bluelinelabs/conductor/Router.java#L387-L395 |
49,296 | bluelinelabs/Conductor | conductor/src/main/java/com/bluelinelabs/conductor/Router.java | Router.rebindIfNeeded | @UiThread
public void rebindIfNeeded() {
ThreadUtils.ensureMainThread();
Iterator<RouterTransaction> backstackIterator = backstack.reverseIterator();
while (backstackIterator.hasNext()) {
RouterTransaction transaction = backstackIterator.next();
if (transaction.cont... | java | @UiThread
public void rebindIfNeeded() {
ThreadUtils.ensureMainThread();
Iterator<RouterTransaction> backstackIterator = backstack.reverseIterator();
while (backstackIterator.hasNext()) {
RouterTransaction transaction = backstackIterator.next();
if (transaction.cont... | [
"@",
"UiThread",
"public",
"void",
"rebindIfNeeded",
"(",
")",
"{",
"ThreadUtils",
".",
"ensureMainThread",
"(",
")",
";",
"Iterator",
"<",
"RouterTransaction",
">",
"backstackIterator",
"=",
"backstack",
".",
"reverseIterator",
"(",
")",
";",
"while",
"(",
"b... | Attaches this Router's existing backstack to its container if one exists. | [
"Attaches",
"this",
"Router",
"s",
"existing",
"backstack",
"to",
"its",
"container",
"if",
"one",
"exists",
"."
] | 94c9121bb16f93b481954513a8e3905846829fb2 | https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/conductor/src/main/java/com/bluelinelabs/conductor/Router.java#L544-L558 |
49,297 | bluelinelabs/Conductor | conductor/src/main/java/com/bluelinelabs/conductor/Router.java | Router.ensureOrderedTransactionIndices | private void ensureOrderedTransactionIndices(List<RouterTransaction> backstack) {
List<Integer> indices = new ArrayList<>(backstack.size());
for (RouterTransaction transaction : backstack) {
transaction.ensureValidIndex(getTransactionIndexer());
indices.add(transaction.transactio... | java | private void ensureOrderedTransactionIndices(List<RouterTransaction> backstack) {
List<Integer> indices = new ArrayList<>(backstack.size());
for (RouterTransaction transaction : backstack) {
transaction.ensureValidIndex(getTransactionIndexer());
indices.add(transaction.transactio... | [
"private",
"void",
"ensureOrderedTransactionIndices",
"(",
"List",
"<",
"RouterTransaction",
">",
"backstack",
")",
"{",
"List",
"<",
"Integer",
">",
"indices",
"=",
"new",
"ArrayList",
"<>",
"(",
"backstack",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"... | developer rearranging the backstack at runtime. | [
"developer",
"rearranging",
"the",
"backstack",
"at",
"runtime",
"."
] | 94c9121bb16f93b481954513a8e3905846829fb2 | https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/conductor/src/main/java/com/bluelinelabs/conductor/Router.java#L895-L907 |
49,298 | bluelinelabs/Conductor | conductor/src/main/java/com/bluelinelabs/conductor/RouterTransaction.java | RouterTransaction.saveInstanceState | @NonNull
public Bundle saveInstanceState() {
Bundle bundle = new Bundle();
bundle.putBundle(KEY_VIEW_CONTROLLER_BUNDLE, controller.saveInstanceState());
if (pushControllerChangeHandler != null) {
bundle.putBundle(KEY_PUSH_TRANSITION, pushControllerChangeHandler.toBundle());
... | java | @NonNull
public Bundle saveInstanceState() {
Bundle bundle = new Bundle();
bundle.putBundle(KEY_VIEW_CONTROLLER_BUNDLE, controller.saveInstanceState());
if (pushControllerChangeHandler != null) {
bundle.putBundle(KEY_PUSH_TRANSITION, pushControllerChangeHandler.toBundle());
... | [
"@",
"NonNull",
"public",
"Bundle",
"saveInstanceState",
"(",
")",
"{",
"Bundle",
"bundle",
"=",
"new",
"Bundle",
"(",
")",
";",
"bundle",
".",
"putBundle",
"(",
"KEY_VIEW_CONTROLLER_BUNDLE",
",",
"controller",
".",
"saveInstanceState",
"(",
")",
")",
";",
"... | Used to serialize this transaction into a Bundle | [
"Used",
"to",
"serialize",
"this",
"transaction",
"into",
"a",
"Bundle"
] | 94c9121bb16f93b481954513a8e3905846829fb2 | https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/conductor/src/main/java/com/bluelinelabs/conductor/RouterTransaction.java#L120-L138 |
49,299 | bluelinelabs/Conductor | demo/src/main/java/com/bluelinelabs/conductor/demo/controllers/base/BaseController.java | BaseController.getActionBar | protected ActionBar getActionBar() {
ActionBarProvider actionBarProvider = ((ActionBarProvider)getActivity());
return actionBarProvider != null ? actionBarProvider.getSupportActionBar() : null;
} | java | protected ActionBar getActionBar() {
ActionBarProvider actionBarProvider = ((ActionBarProvider)getActivity());
return actionBarProvider != null ? actionBarProvider.getSupportActionBar() : null;
} | [
"protected",
"ActionBar",
"getActionBar",
"(",
")",
"{",
"ActionBarProvider",
"actionBarProvider",
"=",
"(",
"(",
"ActionBarProvider",
")",
"getActivity",
"(",
")",
")",
";",
"return",
"actionBarProvider",
"!=",
"null",
"?",
"actionBarProvider",
".",
"getSupportActi... | be accessed. In a production app, this would use Dagger instead. | [
"be",
"accessed",
".",
"In",
"a",
"production",
"app",
"this",
"would",
"use",
"Dagger",
"instead",
"."
] | 94c9121bb16f93b481954513a8e3905846829fb2 | https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/demo/src/main/java/com/bluelinelabs/conductor/demo/controllers/base/BaseController.java#L21-L24 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.