repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/protocol/protocolhttp_stats.java
protocolhttp_stats.get
public static protocolhttp_stats get(nitro_service service, options option) throws Exception{ protocolhttp_stats obj = new protocolhttp_stats(); protocolhttp_stats[] response = (protocolhttp_stats[])obj.stat_resources(service,option); return response[0]; }
java
public static protocolhttp_stats get(nitro_service service, options option) throws Exception{ protocolhttp_stats obj = new protocolhttp_stats(); protocolhttp_stats[] response = (protocolhttp_stats[])obj.stat_resources(service,option); return response[0]; }
[ "public", "static", "protocolhttp_stats", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "protocolhttp_stats", "obj", "=", "new", "protocolhttp_stats", "(", ")", ";", "protocolhttp_stats", "[", "]", "response", "=", "(", "protocolhttp_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ",", "option", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch the statistics of all protocolhttp_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "protocolhttp_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/protocol/protocolhttp_stats.java#L610-L614
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.add
public static base_response add(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver addresource = new dnsnameserver(); addresource.ip = resource.ip; addresource.dnsvservername = resource.dnsvservername; addresource.local = resource.local; addresource.state = resource.state; addresource.type = resource.type; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver addresource = new dnsnameserver(); addresource.ip = resource.ip; addresource.dnsvservername = resource.dnsvservername; addresource.local = resource.local; addresource.state = resource.state; addresource.type = resource.type; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "dnsnameserver", "resource", ")", "throws", "Exception", "{", "dnsnameserver", "addresource", "=", "new", "dnsnameserver", "(", ")", ";", "addresource", ".", "ip", "=", "resource", ".", "ip", ";", "addresource", ".", "dnsvservername", "=", "resource", ".", "dnsvservername", ";", "addresource", ".", "local", "=", "resource", ".", "local", ";", "addresource", ".", "state", "=", "resource", ".", "state", ";", "addresource", ".", "type", "=", "resource", ".", "type", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add dnsnameserver.
[ "Use", "this", "API", "to", "add", "dnsnameserver", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L237-L245
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.add
public static base_responses add(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver addresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnsnameserver(); addresources[i].ip = resources[i].ip; addresources[i].dnsvservername = resources[i].dnsvservername; addresources[i].local = resources[i].local; addresources[i].state = resources[i].state; addresources[i].type = resources[i].type; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver addresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnsnameserver(); addresources[i].ip = resources[i].ip; addresources[i].dnsvservername = resources[i].dnsvservername; addresources[i].local = resources[i].local; addresources[i].state = resources[i].state; addresources[i].type = resources[i].type; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "dnsnameserver", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "dnsnameserver", "addresources", "[", "]", "=", "new", "dnsnameserver", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "dnsnameserver", "(", ")", ";", "addresources", "[", "i", "]", ".", "ip", "=", "resources", "[", "i", "]", ".", "ip", ";", "addresources", "[", "i", "]", ".", "dnsvservername", "=", "resources", "[", "i", "]", ".", "dnsvservername", ";", "addresources", "[", "i", "]", ".", "local", "=", "resources", "[", "i", "]", ".", "local", ";", "addresources", "[", "i", "]", ".", "state", "=", "resources", "[", "i", "]", ".", "state", ";", "addresources", "[", "i", "]", ".", "type", "=", "resources", "[", "i", "]", ".", "type", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add dnsnameserver resources.
[ "Use", "this", "API", "to", "add", "dnsnameserver", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L250-L265
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.delete
public static base_response delete(nitro_service client, String ip) throws Exception { dnsnameserver deleteresource = new dnsnameserver(); deleteresource.ip = ip; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, String ip) throws Exception { dnsnameserver deleteresource = new dnsnameserver(); deleteresource.ip = ip; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "String", "ip", ")", "throws", "Exception", "{", "dnsnameserver", "deleteresource", "=", "new", "dnsnameserver", "(", ")", ";", "deleteresource", ".", "ip", "=", "ip", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete dnsnameserver of given name.
[ "Use", "this", "API", "to", "delete", "dnsnameserver", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L270-L274
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.delete
public static base_response delete(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver deleteresource = new dnsnameserver(); deleteresource.ip = resource.ip; deleteresource.dnsvservername = resource.dnsvservername; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver deleteresource = new dnsnameserver(); deleteresource.ip = resource.ip; deleteresource.dnsvservername = resource.dnsvservername; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "dnsnameserver", "resource", ")", "throws", "Exception", "{", "dnsnameserver", "deleteresource", "=", "new", "dnsnameserver", "(", ")", ";", "deleteresource", ".", "ip", "=", "resource", ".", "ip", ";", "deleteresource", ".", "dnsvservername", "=", "resource", ".", "dnsvservername", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete dnsnameserver.
[ "Use", "this", "API", "to", "delete", "dnsnameserver", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L279-L284
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.delete
public static base_responses delete(nitro_service client, String ip[]) throws Exception { base_responses result = null; if (ip != null && ip.length > 0) { dnsnameserver deleteresources[] = new dnsnameserver[ip.length]; for (int i=0;i<ip.length;i++){ deleteresources[i] = new dnsnameserver(); deleteresources[i].ip = ip[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
java
public static base_responses delete(nitro_service client, String ip[]) throws Exception { base_responses result = null; if (ip != null && ip.length > 0) { dnsnameserver deleteresources[] = new dnsnameserver[ip.length]; for (int i=0;i<ip.length;i++){ deleteresources[i] = new dnsnameserver(); deleteresources[i].ip = ip[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "public", "static", "base_responses", "delete", "(", "nitro_service", "client", ",", "String", "ip", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "ip", "!=", "null", "&&", "ip", ".", "length", ">", "0", ")", "{", "dnsnameserver", "deleteresources", "[", "]", "=", "new", "dnsnameserver", "[", "ip", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ip", ".", "length", ";", "i", "++", ")", "{", "deleteresources", "[", "i", "]", "=", "new", "dnsnameserver", "(", ")", ";", "deleteresources", "[", "i", "]", ".", "ip", "=", "ip", "[", "i", "]", ";", "}", "result", "=", "delete_bulk_request", "(", "client", ",", "deleteresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to delete dnsnameserver resources of given names.
[ "Use", "this", "API", "to", "delete", "dnsnameserver", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L289-L300
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.delete
public static base_responses delete(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver deleteresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new dnsnameserver(); deleteresources[i].ip = resources[i].ip; deleteresources[i].dnsvservername = resources[i].dnsvservername; } result = delete_bulk_request(client, deleteresources); } return result; }
java
public static base_responses delete(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver deleteresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new dnsnameserver(); deleteresources[i].ip = resources[i].ip; deleteresources[i].dnsvservername = resources[i].dnsvservername; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "public", "static", "base_responses", "delete", "(", "nitro_service", "client", ",", "dnsnameserver", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "dnsnameserver", "deleteresources", "[", "]", "=", "new", "dnsnameserver", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "deleteresources", "[", "i", "]", "=", "new", "dnsnameserver", "(", ")", ";", "deleteresources", "[", "i", "]", ".", "ip", "=", "resources", "[", "i", "]", ".", "ip", ";", "deleteresources", "[", "i", "]", ".", "dnsvservername", "=", "resources", "[", "i", "]", ".", "dnsvservername", ";", "}", "result", "=", "delete_bulk_request", "(", "client", ",", "deleteresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to delete dnsnameserver resources.
[ "Use", "this", "API", "to", "delete", "dnsnameserver", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L305-L317
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.enable
public static base_response enable(nitro_service client, String ip) throws Exception { dnsnameserver enableresource = new dnsnameserver(); enableresource.ip = ip; return enableresource.perform_operation(client,"enable"); }
java
public static base_response enable(nitro_service client, String ip) throws Exception { dnsnameserver enableresource = new dnsnameserver(); enableresource.ip = ip; return enableresource.perform_operation(client,"enable"); }
[ "public", "static", "base_response", "enable", "(", "nitro_service", "client", ",", "String", "ip", ")", "throws", "Exception", "{", "dnsnameserver", "enableresource", "=", "new", "dnsnameserver", "(", ")", ";", "enableresource", ".", "ip", "=", "ip", ";", "return", "enableresource", ".", "perform_operation", "(", "client", ",", "\"enable\"", ")", ";", "}" ]
Use this API to enable dnsnameserver of given name.
[ "Use", "this", "API", "to", "enable", "dnsnameserver", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L322-L326
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.enable
public static base_response enable(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver enableresource = new dnsnameserver(); enableresource.ip = resource.ip; enableresource.dnsvservername = resource.dnsvservername; return enableresource.perform_operation(client,"enable"); }
java
public static base_response enable(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver enableresource = new dnsnameserver(); enableresource.ip = resource.ip; enableresource.dnsvservername = resource.dnsvservername; return enableresource.perform_operation(client,"enable"); }
[ "public", "static", "base_response", "enable", "(", "nitro_service", "client", ",", "dnsnameserver", "resource", ")", "throws", "Exception", "{", "dnsnameserver", "enableresource", "=", "new", "dnsnameserver", "(", ")", ";", "enableresource", ".", "ip", "=", "resource", ".", "ip", ";", "enableresource", ".", "dnsvservername", "=", "resource", ".", "dnsvservername", ";", "return", "enableresource", ".", "perform_operation", "(", "client", ",", "\"enable\"", ")", ";", "}" ]
Use this API to enable dnsnameserver.
[ "Use", "this", "API", "to", "enable", "dnsnameserver", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L331-L336
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.enable
public static base_responses enable(nitro_service client, String ip[]) throws Exception { base_responses result = null; if (ip != null && ip.length > 0) { dnsnameserver enableresources[] = new dnsnameserver[ip.length]; for (int i=0;i<ip.length;i++){ enableresources[i] = new dnsnameserver(); enableresources[i].ip = ip[i]; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
java
public static base_responses enable(nitro_service client, String ip[]) throws Exception { base_responses result = null; if (ip != null && ip.length > 0) { dnsnameserver enableresources[] = new dnsnameserver[ip.length]; for (int i=0;i<ip.length;i++){ enableresources[i] = new dnsnameserver(); enableresources[i].ip = ip[i]; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
[ "public", "static", "base_responses", "enable", "(", "nitro_service", "client", ",", "String", "ip", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "ip", "!=", "null", "&&", "ip", ".", "length", ">", "0", ")", "{", "dnsnameserver", "enableresources", "[", "]", "=", "new", "dnsnameserver", "[", "ip", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ip", ".", "length", ";", "i", "++", ")", "{", "enableresources", "[", "i", "]", "=", "new", "dnsnameserver", "(", ")", ";", "enableresources", "[", "i", "]", ".", "ip", "=", "ip", "[", "i", "]", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "enableresources", ",", "\"enable\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to enable dnsnameserver resources of given names.
[ "Use", "this", "API", "to", "enable", "dnsnameserver", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L341-L352
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.enable
public static base_responses enable(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver enableresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ enableresources[i] = new dnsnameserver(); enableresources[i].ip = resources[i].ip; enableresources[i].dnsvservername = resources[i].dnsvservername; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
java
public static base_responses enable(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver enableresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ enableresources[i] = new dnsnameserver(); enableresources[i].ip = resources[i].ip; enableresources[i].dnsvservername = resources[i].dnsvservername; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
[ "public", "static", "base_responses", "enable", "(", "nitro_service", "client", ",", "dnsnameserver", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "dnsnameserver", "enableresources", "[", "]", "=", "new", "dnsnameserver", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "enableresources", "[", "i", "]", "=", "new", "dnsnameserver", "(", ")", ";", "enableresources", "[", "i", "]", ".", "ip", "=", "resources", "[", "i", "]", ".", "ip", ";", "enableresources", "[", "i", "]", ".", "dnsvservername", "=", "resources", "[", "i", "]", ".", "dnsvservername", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "enableresources", ",", "\"enable\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to enable dnsnameserver resources.
[ "Use", "this", "API", "to", "enable", "dnsnameserver", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L357-L369
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.disable
public static base_response disable(nitro_service client, String ip) throws Exception { dnsnameserver disableresource = new dnsnameserver(); disableresource.ip = ip; return disableresource.perform_operation(client,"disable"); }
java
public static base_response disable(nitro_service client, String ip) throws Exception { dnsnameserver disableresource = new dnsnameserver(); disableresource.ip = ip; return disableresource.perform_operation(client,"disable"); }
[ "public", "static", "base_response", "disable", "(", "nitro_service", "client", ",", "String", "ip", ")", "throws", "Exception", "{", "dnsnameserver", "disableresource", "=", "new", "dnsnameserver", "(", ")", ";", "disableresource", ".", "ip", "=", "ip", ";", "return", "disableresource", ".", "perform_operation", "(", "client", ",", "\"disable\"", ")", ";", "}" ]
Use this API to disable dnsnameserver of given name.
[ "Use", "this", "API", "to", "disable", "dnsnameserver", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L374-L378
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.disable
public static base_response disable(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver disableresource = new dnsnameserver(); disableresource.ip = resource.ip; disableresource.dnsvservername = resource.dnsvservername; return disableresource.perform_operation(client,"disable"); }
java
public static base_response disable(nitro_service client, dnsnameserver resource) throws Exception { dnsnameserver disableresource = new dnsnameserver(); disableresource.ip = resource.ip; disableresource.dnsvservername = resource.dnsvservername; return disableresource.perform_operation(client,"disable"); }
[ "public", "static", "base_response", "disable", "(", "nitro_service", "client", ",", "dnsnameserver", "resource", ")", "throws", "Exception", "{", "dnsnameserver", "disableresource", "=", "new", "dnsnameserver", "(", ")", ";", "disableresource", ".", "ip", "=", "resource", ".", "ip", ";", "disableresource", ".", "dnsvservername", "=", "resource", ".", "dnsvservername", ";", "return", "disableresource", ".", "perform_operation", "(", "client", ",", "\"disable\"", ")", ";", "}" ]
Use this API to disable dnsnameserver.
[ "Use", "this", "API", "to", "disable", "dnsnameserver", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L383-L388
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.disable
public static base_responses disable(nitro_service client, String ip[]) throws Exception { base_responses result = null; if (ip != null && ip.length > 0) { dnsnameserver disableresources[] = new dnsnameserver[ip.length]; for (int i=0;i<ip.length;i++){ disableresources[i] = new dnsnameserver(); disableresources[i].ip = ip[i]; } result = perform_operation_bulk_request(client, disableresources,"disable"); } return result; }
java
public static base_responses disable(nitro_service client, String ip[]) throws Exception { base_responses result = null; if (ip != null && ip.length > 0) { dnsnameserver disableresources[] = new dnsnameserver[ip.length]; for (int i=0;i<ip.length;i++){ disableresources[i] = new dnsnameserver(); disableresources[i].ip = ip[i]; } result = perform_operation_bulk_request(client, disableresources,"disable"); } return result; }
[ "public", "static", "base_responses", "disable", "(", "nitro_service", "client", ",", "String", "ip", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "ip", "!=", "null", "&&", "ip", ".", "length", ">", "0", ")", "{", "dnsnameserver", "disableresources", "[", "]", "=", "new", "dnsnameserver", "[", "ip", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ip", ".", "length", ";", "i", "++", ")", "{", "disableresources", "[", "i", "]", "=", "new", "dnsnameserver", "(", ")", ";", "disableresources", "[", "i", "]", ".", "ip", "=", "ip", "[", "i", "]", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "disableresources", ",", "\"disable\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to disable dnsnameserver resources of given names.
[ "Use", "this", "API", "to", "disable", "dnsnameserver", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L393-L404
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.disable
public static base_responses disable(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver disableresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ disableresources[i] = new dnsnameserver(); disableresources[i].ip = resources[i].ip; disableresources[i].dnsvservername = resources[i].dnsvservername; } result = perform_operation_bulk_request(client, disableresources,"disable"); } return result; }
java
public static base_responses disable(nitro_service client, dnsnameserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsnameserver disableresources[] = new dnsnameserver[resources.length]; for (int i=0;i<resources.length;i++){ disableresources[i] = new dnsnameserver(); disableresources[i].ip = resources[i].ip; disableresources[i].dnsvservername = resources[i].dnsvservername; } result = perform_operation_bulk_request(client, disableresources,"disable"); } return result; }
[ "public", "static", "base_responses", "disable", "(", "nitro_service", "client", ",", "dnsnameserver", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "dnsnameserver", "disableresources", "[", "]", "=", "new", "dnsnameserver", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "disableresources", "[", "i", "]", "=", "new", "dnsnameserver", "(", ")", ";", "disableresources", "[", "i", "]", ".", "ip", "=", "resources", "[", "i", "]", ".", "ip", ";", "disableresources", "[", "i", "]", ".", "dnsvservername", "=", "resources", "[", "i", "]", ".", "dnsvservername", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "disableresources", ",", "\"disable\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to disable dnsnameserver resources.
[ "Use", "this", "API", "to", "disable", "dnsnameserver", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L409-L421
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java
dnsnameserver.get
public static dnsnameserver[] get(nitro_service service) throws Exception{ dnsnameserver obj = new dnsnameserver(); dnsnameserver[] response = (dnsnameserver[])obj.get_resources(service); return response; }
java
public static dnsnameserver[] get(nitro_service service) throws Exception{ dnsnameserver obj = new dnsnameserver(); dnsnameserver[] response = (dnsnameserver[])obj.get_resources(service); return response; }
[ "public", "static", "dnsnameserver", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "dnsnameserver", "obj", "=", "new", "dnsnameserver", "(", ")", ";", "dnsnameserver", "[", "]", "response", "=", "(", "dnsnameserver", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the dnsnameserver resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "dnsnameserver", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnameserver.java#L426-L430
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationnegotiatepolicy_authenticationvserver_binding.java
authenticationnegotiatepolicy_authenticationvserver_binding.get
public static authenticationnegotiatepolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationnegotiatepolicy_authenticationvserver_binding obj = new authenticationnegotiatepolicy_authenticationvserver_binding(); obj.set_name(name); authenticationnegotiatepolicy_authenticationvserver_binding response[] = (authenticationnegotiatepolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
java
public static authenticationnegotiatepolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationnegotiatepolicy_authenticationvserver_binding obj = new authenticationnegotiatepolicy_authenticationvserver_binding(); obj.set_name(name); authenticationnegotiatepolicy_authenticationvserver_binding response[] = (authenticationnegotiatepolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "authenticationnegotiatepolicy_authenticationvserver_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authenticationnegotiatepolicy_authenticationvserver_binding", "obj", "=", "new", "authenticationnegotiatepolicy_authenticationvserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "authenticationnegotiatepolicy_authenticationvserver_binding", "response", "[", "]", "=", "(", "authenticationnegotiatepolicy_authenticationvserver_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch authenticationnegotiatepolicy_authenticationvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "authenticationnegotiatepolicy_authenticationvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationnegotiatepolicy_authenticationvserver_binding.java#L132-L137
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicylabel_policybinding_binding.java
transformpolicylabel_policybinding_binding.get
public static transformpolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{ transformpolicylabel_policybinding_binding obj = new transformpolicylabel_policybinding_binding(); obj.set_labelname(labelname); transformpolicylabel_policybinding_binding response[] = (transformpolicylabel_policybinding_binding[]) obj.get_resources(service); return response; }
java
public static transformpolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{ transformpolicylabel_policybinding_binding obj = new transformpolicylabel_policybinding_binding(); obj.set_labelname(labelname); transformpolicylabel_policybinding_binding response[] = (transformpolicylabel_policybinding_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "transformpolicylabel_policybinding_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "transformpolicylabel_policybinding_binding", "obj", "=", "new", "transformpolicylabel_policybinding_binding", "(", ")", ";", "obj", ".", "set_labelname", "(", "labelname", ")", ";", "transformpolicylabel_policybinding_binding", "response", "[", "]", "=", "(", "transformpolicylabel_policybinding_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch transformpolicylabel_policybinding_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "transformpolicylabel_policybinding_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicylabel_policybinding_binding.java#L229-L234
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyhttpcallout.java
policyhttpcallout.update
public static base_response update(nitro_service client, policyhttpcallout resource) throws Exception { policyhttpcallout updateresource = new policyhttpcallout(); updateresource.name = resource.name; updateresource.ipaddress = resource.ipaddress; updateresource.port = resource.port; updateresource.vserver = resource.vserver; updateresource.returntype = resource.returntype; updateresource.httpmethod = resource.httpmethod; updateresource.hostexpr = resource.hostexpr; updateresource.urlstemexpr = resource.urlstemexpr; updateresource.headers = resource.headers; updateresource.parameters = resource.parameters; updateresource.bodyexpr = resource.bodyexpr; updateresource.fullreqexpr = resource.fullreqexpr; updateresource.scheme = resource.scheme; updateresource.resultexpr = resource.resultexpr; updateresource.cacheforsecs = resource.cacheforsecs; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, policyhttpcallout resource) throws Exception { policyhttpcallout updateresource = new policyhttpcallout(); updateresource.name = resource.name; updateresource.ipaddress = resource.ipaddress; updateresource.port = resource.port; updateresource.vserver = resource.vserver; updateresource.returntype = resource.returntype; updateresource.httpmethod = resource.httpmethod; updateresource.hostexpr = resource.hostexpr; updateresource.urlstemexpr = resource.urlstemexpr; updateresource.headers = resource.headers; updateresource.parameters = resource.parameters; updateresource.bodyexpr = resource.bodyexpr; updateresource.fullreqexpr = resource.fullreqexpr; updateresource.scheme = resource.scheme; updateresource.resultexpr = resource.resultexpr; updateresource.cacheforsecs = resource.cacheforsecs; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "policyhttpcallout", "resource", ")", "throws", "Exception", "{", "policyhttpcallout", "updateresource", "=", "new", "policyhttpcallout", "(", ")", ";", "updateresource", ".", "name", "=", "resource", ".", "name", ";", "updateresource", ".", "ipaddress", "=", "resource", ".", "ipaddress", ";", "updateresource", ".", "port", "=", "resource", ".", "port", ";", "updateresource", ".", "vserver", "=", "resource", ".", "vserver", ";", "updateresource", ".", "returntype", "=", "resource", ".", "returntype", ";", "updateresource", ".", "httpmethod", "=", "resource", ".", "httpmethod", ";", "updateresource", ".", "hostexpr", "=", "resource", ".", "hostexpr", ";", "updateresource", ".", "urlstemexpr", "=", "resource", ".", "urlstemexpr", ";", "updateresource", ".", "headers", "=", "resource", ".", "headers", ";", "updateresource", ".", "parameters", "=", "resource", ".", "parameters", ";", "updateresource", ".", "bodyexpr", "=", "resource", ".", "bodyexpr", ";", "updateresource", ".", "fullreqexpr", "=", "resource", ".", "fullreqexpr", ";", "updateresource", ".", "scheme", "=", "resource", ".", "scheme", ";", "updateresource", ".", "resultexpr", "=", "resource", ".", "resultexpr", ";", "updateresource", ".", "cacheforsecs", "=", "resource", ".", "cacheforsecs", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update policyhttpcallout.
[ "Use", "this", "API", "to", "update", "policyhttpcallout", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyhttpcallout.java#L524-L542
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyhttpcallout.java
policyhttpcallout.update
public static base_responses update(nitro_service client, policyhttpcallout resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { policyhttpcallout updateresources[] = new policyhttpcallout[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new policyhttpcallout(); updateresources[i].name = resources[i].name; updateresources[i].ipaddress = resources[i].ipaddress; updateresources[i].port = resources[i].port; updateresources[i].vserver = resources[i].vserver; updateresources[i].returntype = resources[i].returntype; updateresources[i].httpmethod = resources[i].httpmethod; updateresources[i].hostexpr = resources[i].hostexpr; updateresources[i].urlstemexpr = resources[i].urlstemexpr; updateresources[i].headers = resources[i].headers; updateresources[i].parameters = resources[i].parameters; updateresources[i].bodyexpr = resources[i].bodyexpr; updateresources[i].fullreqexpr = resources[i].fullreqexpr; updateresources[i].scheme = resources[i].scheme; updateresources[i].resultexpr = resources[i].resultexpr; updateresources[i].cacheforsecs = resources[i].cacheforsecs; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, policyhttpcallout resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { policyhttpcallout updateresources[] = new policyhttpcallout[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new policyhttpcallout(); updateresources[i].name = resources[i].name; updateresources[i].ipaddress = resources[i].ipaddress; updateresources[i].port = resources[i].port; updateresources[i].vserver = resources[i].vserver; updateresources[i].returntype = resources[i].returntype; updateresources[i].httpmethod = resources[i].httpmethod; updateresources[i].hostexpr = resources[i].hostexpr; updateresources[i].urlstemexpr = resources[i].urlstemexpr; updateresources[i].headers = resources[i].headers; updateresources[i].parameters = resources[i].parameters; updateresources[i].bodyexpr = resources[i].bodyexpr; updateresources[i].fullreqexpr = resources[i].fullreqexpr; updateresources[i].scheme = resources[i].scheme; updateresources[i].resultexpr = resources[i].resultexpr; updateresources[i].cacheforsecs = resources[i].cacheforsecs; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "policyhttpcallout", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "policyhttpcallout", "updateresources", "[", "]", "=", "new", "policyhttpcallout", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "policyhttpcallout", "(", ")", ";", "updateresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "updateresources", "[", "i", "]", ".", "ipaddress", "=", "resources", "[", "i", "]", ".", "ipaddress", ";", "updateresources", "[", "i", "]", ".", "port", "=", "resources", "[", "i", "]", ".", "port", ";", "updateresources", "[", "i", "]", ".", "vserver", "=", "resources", "[", "i", "]", ".", "vserver", ";", "updateresources", "[", "i", "]", ".", "returntype", "=", "resources", "[", "i", "]", ".", "returntype", ";", "updateresources", "[", "i", "]", ".", "httpmethod", "=", "resources", "[", "i", "]", ".", "httpmethod", ";", "updateresources", "[", "i", "]", ".", "hostexpr", "=", "resources", "[", "i", "]", ".", "hostexpr", ";", "updateresources", "[", "i", "]", ".", "urlstemexpr", "=", "resources", "[", "i", "]", ".", "urlstemexpr", ";", "updateresources", "[", "i", "]", ".", "headers", "=", "resources", "[", "i", "]", ".", "headers", ";", "updateresources", "[", "i", "]", ".", "parameters", "=", "resources", "[", "i", "]", ".", "parameters", ";", "updateresources", "[", "i", "]", ".", "bodyexpr", "=", "resources", "[", "i", "]", ".", "bodyexpr", ";", "updateresources", "[", "i", "]", ".", "fullreqexpr", "=", "resources", "[", "i", "]", ".", "fullreqexpr", ";", "updateresources", "[", "i", "]", ".", "scheme", "=", "resources", "[", "i", "]", ".", "scheme", ";", "updateresources", "[", "i", "]", ".", "resultexpr", "=", "resources", "[", "i", "]", ".", "resultexpr", ";", "updateresources", "[", "i", "]", ".", "cacheforsecs", "=", "resources", "[", "i", "]", ".", "cacheforsecs", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update policyhttpcallout resources.
[ "Use", "this", "API", "to", "update", "policyhttpcallout", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyhttpcallout.java#L547-L572
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyhttpcallout.java
policyhttpcallout.get
public static policyhttpcallout[] get(nitro_service service) throws Exception{ policyhttpcallout obj = new policyhttpcallout(); policyhttpcallout[] response = (policyhttpcallout[])obj.get_resources(service); return response; }
java
public static policyhttpcallout[] get(nitro_service service) throws Exception{ policyhttpcallout obj = new policyhttpcallout(); policyhttpcallout[] response = (policyhttpcallout[])obj.get_resources(service); return response; }
[ "public", "static", "policyhttpcallout", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "policyhttpcallout", "obj", "=", "new", "policyhttpcallout", "(", ")", ";", "policyhttpcallout", "[", "]", "response", "=", "(", "policyhttpcallout", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the policyhttpcallout resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "policyhttpcallout", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyhttpcallout.java#L621-L625
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyhttpcallout.java
policyhttpcallout.get
public static policyhttpcallout get(nitro_service service, String name) throws Exception{ policyhttpcallout obj = new policyhttpcallout(); obj.set_name(name); policyhttpcallout response = (policyhttpcallout) obj.get_resource(service); return response; }
java
public static policyhttpcallout get(nitro_service service, String name) throws Exception{ policyhttpcallout obj = new policyhttpcallout(); obj.set_name(name); policyhttpcallout response = (policyhttpcallout) obj.get_resource(service); return response; }
[ "public", "static", "policyhttpcallout", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "policyhttpcallout", "obj", "=", "new", "policyhttpcallout", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "policyhttpcallout", "response", "=", "(", "policyhttpcallout", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch policyhttpcallout resource of given name .
[ "Use", "this", "API", "to", "fetch", "policyhttpcallout", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyhttpcallout.java#L637-L642
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/DiskTreebank.java
DiskTreebank.loadPath
@Override public void loadPath(File path, FileFilter filt) { if(path.exists()) { filePaths.add(path); fileFilters.add(filt); } else { System.err.printf("%s: File/path %s does not exist. Skipping.\n" , this.getClass().getName(), path.getPath()); } }
java
@Override public void loadPath(File path, FileFilter filt) { if(path.exists()) { filePaths.add(path); fileFilters.add(filt); } else { System.err.printf("%s: File/path %s does not exist. Skipping.\n" , this.getClass().getName(), path.getPath()); } }
[ "@", "Override", "public", "void", "loadPath", "(", "File", "path", ",", "FileFilter", "filt", ")", "{", "if", "(", "path", ".", "exists", "(", ")", ")", "{", "filePaths", ".", "add", "(", "path", ")", ";", "fileFilters", ".", "add", "(", "filt", ")", ";", "}", "else", "{", "System", ".", "err", ".", "printf", "(", "\"%s: File/path %s does not exist. Skipping.\\n\"", ",", "this", ".", "getClass", "(", ")", ".", "getName", "(", ")", ",", "path", ".", "getPath", "(", ")", ")", ";", "}", "}" ]
Load trees from given directory. This version just records the paths to be processed, and actually processes them at apply time. @param path file or directory to load from @param filt a FilenameFilter of files to load
[ "Load", "trees", "from", "given", "directory", ".", "This", "version", "just", "records", "the", "paths", "to", "be", "processed", "and", "actually", "processes", "them", "at", "apply", "time", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/DiskTreebank.java#L112-L120
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsview_gslbservice_binding.java
dnsview_gslbservice_binding.get
public static dnsview_gslbservice_binding[] get(nitro_service service, String viewname) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); dnsview_gslbservice_binding response[] = (dnsview_gslbservice_binding[]) obj.get_resources(service); return response; }
java
public static dnsview_gslbservice_binding[] get(nitro_service service, String viewname) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); dnsview_gslbservice_binding response[] = (dnsview_gslbservice_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "dnsview_gslbservice_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "viewname", ")", "throws", "Exception", "{", "dnsview_gslbservice_binding", "obj", "=", "new", "dnsview_gslbservice_binding", "(", ")", ";", "obj", ".", "set_viewname", "(", "viewname", ")", ";", "dnsview_gslbservice_binding", "response", "[", "]", "=", "(", "dnsview_gslbservice_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch dnsview_gslbservice_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "dnsview_gslbservice_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsview_gslbservice_binding.java#L122-L127
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsview_gslbservice_binding.java
dnsview_gslbservice_binding.count
public static long count(nitro_service service, String viewname) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); options option = new options(); option.set_count(true); dnsview_gslbservice_binding response[] = (dnsview_gslbservice_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
java
public static long count(nitro_service service, String viewname) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); options option = new options(); option.set_count(true); dnsview_gslbservice_binding response[] = (dnsview_gslbservice_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
[ "public", "static", "long", "count", "(", "nitro_service", "service", ",", "String", "viewname", ")", "throws", "Exception", "{", "dnsview_gslbservice_binding", "obj", "=", "new", "dnsview_gslbservice_binding", "(", ")", ";", "obj", ".", "set_viewname", "(", "viewname", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_count", "(", "true", ")", ";", "dnsview_gslbservice_binding", "response", "[", "]", "=", "(", "dnsview_gslbservice_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "if", "(", "response", "!=", "null", ")", "{", "return", "response", "[", "0", "]", ".", "__count", ";", "}", "return", "0", ";", "}" ]
Use this API to count dnsview_gslbservice_binding resources configued on NetScaler.
[ "Use", "this", "API", "to", "count", "dnsview_gslbservice_binding", "resources", "configued", "on", "NetScaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsview_gslbservice_binding.java#L158-L168
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/objectbank/LineIterator.java
LineIterator.getFactory
public static <X> IteratorFromReaderFactory<X> getFactory(Function<String,X> op) { return new LineIteratorFactory<X>(op); }
java
public static <X> IteratorFromReaderFactory<X> getFactory(Function<String,X> op) { return new LineIteratorFactory<X>(op); }
[ "public", "static", "<", "X", ">", "IteratorFromReaderFactory", "<", "X", ">", "getFactory", "(", "Function", "<", "String", ",", "X", ">", "op", ")", "{", "return", "new", "LineIteratorFactory", "<", "X", ">", "(", "op", ")", ";", "}" ]
Returns a factory that vends LineIterators that read the contents of the given Reader, splitting on newlines. @param op A function to be applied to each line before it is returned @return An iterator over the lines of a file
[ "Returns", "a", "factory", "that", "vends", "LineIterators", "that", "read", "the", "contents", "of", "the", "given", "Reader", "splitting", "on", "newlines", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/objectbank/LineIterator.java#L85-L87
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.add
public static base_response add(nitro_service client, vpnclientlessaccessprofile resource) throws Exception { vpnclientlessaccessprofile addresource = new vpnclientlessaccessprofile(); addresource.profilename = resource.profilename; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, vpnclientlessaccessprofile resource) throws Exception { vpnclientlessaccessprofile addresource = new vpnclientlessaccessprofile(); addresource.profilename = resource.profilename; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "vpnclientlessaccessprofile", "resource", ")", "throws", "Exception", "{", "vpnclientlessaccessprofile", "addresource", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "addresource", ".", "profilename", "=", "resource", ".", "profilename", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add vpnclientlessaccessprofile.
[ "Use", "this", "API", "to", "add", "vpnclientlessaccessprofile", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L361-L365
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.add
public static base_responses add(nitro_service client, vpnclientlessaccessprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnclientlessaccessprofile addresources[] = new vpnclientlessaccessprofile[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new vpnclientlessaccessprofile(); addresources[i].profilename = resources[i].profilename; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, vpnclientlessaccessprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnclientlessaccessprofile addresources[] = new vpnclientlessaccessprofile[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new vpnclientlessaccessprofile(); addresources[i].profilename = resources[i].profilename; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "vpnclientlessaccessprofile", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "vpnclientlessaccessprofile", "addresources", "[", "]", "=", "new", "vpnclientlessaccessprofile", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "addresources", "[", "i", "]", ".", "profilename", "=", "resources", "[", "i", "]", ".", "profilename", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add vpnclientlessaccessprofile resources.
[ "Use", "this", "API", "to", "add", "vpnclientlessaccessprofile", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L370-L381
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.delete
public static base_response delete(nitro_service client, String profilename) throws Exception { vpnclientlessaccessprofile deleteresource = new vpnclientlessaccessprofile(); deleteresource.profilename = profilename; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, String profilename) throws Exception { vpnclientlessaccessprofile deleteresource = new vpnclientlessaccessprofile(); deleteresource.profilename = profilename; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "String", "profilename", ")", "throws", "Exception", "{", "vpnclientlessaccessprofile", "deleteresource", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "deleteresource", ".", "profilename", "=", "profilename", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete vpnclientlessaccessprofile of given name.
[ "Use", "this", "API", "to", "delete", "vpnclientlessaccessprofile", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L386-L390
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.delete
public static base_responses delete(nitro_service client, String profilename[]) throws Exception { base_responses result = null; if (profilename != null && profilename.length > 0) { vpnclientlessaccessprofile deleteresources[] = new vpnclientlessaccessprofile[profilename.length]; for (int i=0;i<profilename.length;i++){ deleteresources[i] = new vpnclientlessaccessprofile(); deleteresources[i].profilename = profilename[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
java
public static base_responses delete(nitro_service client, String profilename[]) throws Exception { base_responses result = null; if (profilename != null && profilename.length > 0) { vpnclientlessaccessprofile deleteresources[] = new vpnclientlessaccessprofile[profilename.length]; for (int i=0;i<profilename.length;i++){ deleteresources[i] = new vpnclientlessaccessprofile(); deleteresources[i].profilename = profilename[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "public", "static", "base_responses", "delete", "(", "nitro_service", "client", ",", "String", "profilename", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "profilename", "!=", "null", "&&", "profilename", ".", "length", ">", "0", ")", "{", "vpnclientlessaccessprofile", "deleteresources", "[", "]", "=", "new", "vpnclientlessaccessprofile", "[", "profilename", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "profilename", ".", "length", ";", "i", "++", ")", "{", "deleteresources", "[", "i", "]", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "deleteresources", "[", "i", "]", ".", "profilename", "=", "profilename", "[", "i", "]", ";", "}", "result", "=", "delete_bulk_request", "(", "client", ",", "deleteresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to delete vpnclientlessaccessprofile resources of given names.
[ "Use", "this", "API", "to", "delete", "vpnclientlessaccessprofile", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L404-L415
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.update
public static base_response update(nitro_service client, vpnclientlessaccessprofile resource) throws Exception { vpnclientlessaccessprofile updateresource = new vpnclientlessaccessprofile(); updateresource.profilename = resource.profilename; updateresource.urlrewritepolicylabel = resource.urlrewritepolicylabel; updateresource.javascriptrewritepolicylabel = resource.javascriptrewritepolicylabel; updateresource.reqhdrrewritepolicylabel = resource.reqhdrrewritepolicylabel; updateresource.reshdrrewritepolicylabel = resource.reshdrrewritepolicylabel; updateresource.regexforfindingurlinjavascript = resource.regexforfindingurlinjavascript; updateresource.regexforfindingurlincss = resource.regexforfindingurlincss; updateresource.regexforfindingurlinxcomponent = resource.regexforfindingurlinxcomponent; updateresource.regexforfindingurlinxml = resource.regexforfindingurlinxml; updateresource.regexforfindingcustomurls = resource.regexforfindingcustomurls; updateresource.clientconsumedcookies = resource.clientconsumedcookies; updateresource.requirepersistentcookie = resource.requirepersistentcookie; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, vpnclientlessaccessprofile resource) throws Exception { vpnclientlessaccessprofile updateresource = new vpnclientlessaccessprofile(); updateresource.profilename = resource.profilename; updateresource.urlrewritepolicylabel = resource.urlrewritepolicylabel; updateresource.javascriptrewritepolicylabel = resource.javascriptrewritepolicylabel; updateresource.reqhdrrewritepolicylabel = resource.reqhdrrewritepolicylabel; updateresource.reshdrrewritepolicylabel = resource.reshdrrewritepolicylabel; updateresource.regexforfindingurlinjavascript = resource.regexforfindingurlinjavascript; updateresource.regexforfindingurlincss = resource.regexforfindingurlincss; updateresource.regexforfindingurlinxcomponent = resource.regexforfindingurlinxcomponent; updateresource.regexforfindingurlinxml = resource.regexforfindingurlinxml; updateresource.regexforfindingcustomurls = resource.regexforfindingcustomurls; updateresource.clientconsumedcookies = resource.clientconsumedcookies; updateresource.requirepersistentcookie = resource.requirepersistentcookie; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "vpnclientlessaccessprofile", "resource", ")", "throws", "Exception", "{", "vpnclientlessaccessprofile", "updateresource", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "updateresource", ".", "profilename", "=", "resource", ".", "profilename", ";", "updateresource", ".", "urlrewritepolicylabel", "=", "resource", ".", "urlrewritepolicylabel", ";", "updateresource", ".", "javascriptrewritepolicylabel", "=", "resource", ".", "javascriptrewritepolicylabel", ";", "updateresource", ".", "reqhdrrewritepolicylabel", "=", "resource", ".", "reqhdrrewritepolicylabel", ";", "updateresource", ".", "reshdrrewritepolicylabel", "=", "resource", ".", "reshdrrewritepolicylabel", ";", "updateresource", ".", "regexforfindingurlinjavascript", "=", "resource", ".", "regexforfindingurlinjavascript", ";", "updateresource", ".", "regexforfindingurlincss", "=", "resource", ".", "regexforfindingurlincss", ";", "updateresource", ".", "regexforfindingurlinxcomponent", "=", "resource", ".", "regexforfindingurlinxcomponent", ";", "updateresource", ".", "regexforfindingurlinxml", "=", "resource", ".", "regexforfindingurlinxml", ";", "updateresource", ".", "regexforfindingcustomurls", "=", "resource", ".", "regexforfindingcustomurls", ";", "updateresource", ".", "clientconsumedcookies", "=", "resource", ".", "clientconsumedcookies", ";", "updateresource", ".", "requirepersistentcookie", "=", "resource", ".", "requirepersistentcookie", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update vpnclientlessaccessprofile.
[ "Use", "this", "API", "to", "update", "vpnclientlessaccessprofile", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L436-L451
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.update
public static base_responses update(nitro_service client, vpnclientlessaccessprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnclientlessaccessprofile updateresources[] = new vpnclientlessaccessprofile[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new vpnclientlessaccessprofile(); updateresources[i].profilename = resources[i].profilename; updateresources[i].urlrewritepolicylabel = resources[i].urlrewritepolicylabel; updateresources[i].javascriptrewritepolicylabel = resources[i].javascriptrewritepolicylabel; updateresources[i].reqhdrrewritepolicylabel = resources[i].reqhdrrewritepolicylabel; updateresources[i].reshdrrewritepolicylabel = resources[i].reshdrrewritepolicylabel; updateresources[i].regexforfindingurlinjavascript = resources[i].regexforfindingurlinjavascript; updateresources[i].regexforfindingurlincss = resources[i].regexforfindingurlincss; updateresources[i].regexforfindingurlinxcomponent = resources[i].regexforfindingurlinxcomponent; updateresources[i].regexforfindingurlinxml = resources[i].regexforfindingurlinxml; updateresources[i].regexforfindingcustomurls = resources[i].regexforfindingcustomurls; updateresources[i].clientconsumedcookies = resources[i].clientconsumedcookies; updateresources[i].requirepersistentcookie = resources[i].requirepersistentcookie; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, vpnclientlessaccessprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnclientlessaccessprofile updateresources[] = new vpnclientlessaccessprofile[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new vpnclientlessaccessprofile(); updateresources[i].profilename = resources[i].profilename; updateresources[i].urlrewritepolicylabel = resources[i].urlrewritepolicylabel; updateresources[i].javascriptrewritepolicylabel = resources[i].javascriptrewritepolicylabel; updateresources[i].reqhdrrewritepolicylabel = resources[i].reqhdrrewritepolicylabel; updateresources[i].reshdrrewritepolicylabel = resources[i].reshdrrewritepolicylabel; updateresources[i].regexforfindingurlinjavascript = resources[i].regexforfindingurlinjavascript; updateresources[i].regexforfindingurlincss = resources[i].regexforfindingurlincss; updateresources[i].regexforfindingurlinxcomponent = resources[i].regexforfindingurlinxcomponent; updateresources[i].regexforfindingurlinxml = resources[i].regexforfindingurlinxml; updateresources[i].regexforfindingcustomurls = resources[i].regexforfindingcustomurls; updateresources[i].clientconsumedcookies = resources[i].clientconsumedcookies; updateresources[i].requirepersistentcookie = resources[i].requirepersistentcookie; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "vpnclientlessaccessprofile", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "vpnclientlessaccessprofile", "updateresources", "[", "]", "=", "new", "vpnclientlessaccessprofile", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "updateresources", "[", "i", "]", ".", "profilename", "=", "resources", "[", "i", "]", ".", "profilename", ";", "updateresources", "[", "i", "]", ".", "urlrewritepolicylabel", "=", "resources", "[", "i", "]", ".", "urlrewritepolicylabel", ";", "updateresources", "[", "i", "]", ".", "javascriptrewritepolicylabel", "=", "resources", "[", "i", "]", ".", "javascriptrewritepolicylabel", ";", "updateresources", "[", "i", "]", ".", "reqhdrrewritepolicylabel", "=", "resources", "[", "i", "]", ".", "reqhdrrewritepolicylabel", ";", "updateresources", "[", "i", "]", ".", "reshdrrewritepolicylabel", "=", "resources", "[", "i", "]", ".", "reshdrrewritepolicylabel", ";", "updateresources", "[", "i", "]", ".", "regexforfindingurlinjavascript", "=", "resources", "[", "i", "]", ".", "regexforfindingurlinjavascript", ";", "updateresources", "[", "i", "]", ".", "regexforfindingurlincss", "=", "resources", "[", "i", "]", ".", "regexforfindingurlincss", ";", "updateresources", "[", "i", "]", ".", "regexforfindingurlinxcomponent", "=", "resources", "[", "i", "]", ".", "regexforfindingurlinxcomponent", ";", "updateresources", "[", "i", "]", ".", "regexforfindingurlinxml", "=", "resources", "[", "i", "]", ".", "regexforfindingurlinxml", ";", "updateresources", "[", "i", "]", ".", "regexforfindingcustomurls", "=", "resources", "[", "i", "]", ".", "regexforfindingcustomurls", ";", "updateresources", "[", "i", "]", ".", "clientconsumedcookies", "=", "resources", "[", "i", "]", ".", "clientconsumedcookies", ";", "updateresources", "[", "i", "]", ".", "requirepersistentcookie", "=", "resources", "[", "i", "]", ".", "requirepersistentcookie", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update vpnclientlessaccessprofile resources.
[ "Use", "this", "API", "to", "update", "vpnclientlessaccessprofile", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L456-L478
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.unset
public static base_response unset(nitro_service client, vpnclientlessaccessprofile resource, String[] args) throws Exception{ vpnclientlessaccessprofile unsetresource = new vpnclientlessaccessprofile(); unsetresource.profilename = resource.profilename; return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, vpnclientlessaccessprofile resource, String[] args) throws Exception{ vpnclientlessaccessprofile unsetresource = new vpnclientlessaccessprofile(); unsetresource.profilename = resource.profilename; return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "vpnclientlessaccessprofile", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "vpnclientlessaccessprofile", "unsetresource", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "unsetresource", ".", "profilename", "=", "resource", ".", "profilename", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of vpnclientlessaccessprofile resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "vpnclientlessaccessprofile", "resource", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L494-L498
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.unset
public static base_responses unset(nitro_service client, vpnclientlessaccessprofile resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnclientlessaccessprofile unsetresources[] = new vpnclientlessaccessprofile[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new vpnclientlessaccessprofile(); unsetresources[i].profilename = resources[i].profilename; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
public static base_responses unset(nitro_service client, vpnclientlessaccessprofile resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpnclientlessaccessprofile unsetresources[] = new vpnclientlessaccessprofile[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new vpnclientlessaccessprofile(); unsetresources[i].profilename = resources[i].profilename; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "public", "static", "base_responses", "unset", "(", "nitro_service", "client", ",", "vpnclientlessaccessprofile", "resources", "[", "]", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "vpnclientlessaccessprofile", "unsetresources", "[", "]", "=", "new", "vpnclientlessaccessprofile", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "unsetresources", "[", "i", "]", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "unsetresources", "[", "i", "]", ".", "profilename", "=", "resources", "[", "i", "]", ".", "profilename", ";", "}", "result", "=", "unset_bulk_request", "(", "client", ",", "unsetresources", ",", "args", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to unset the properties of vpnclientlessaccessprofile resources. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "vpnclientlessaccessprofile", "resources", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L521-L532
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.get
public static vpnclientlessaccessprofile[] get(nitro_service service) throws Exception{ vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile(); vpnclientlessaccessprofile[] response = (vpnclientlessaccessprofile[])obj.get_resources(service); return response; }
java
public static vpnclientlessaccessprofile[] get(nitro_service service) throws Exception{ vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile(); vpnclientlessaccessprofile[] response = (vpnclientlessaccessprofile[])obj.get_resources(service); return response; }
[ "public", "static", "vpnclientlessaccessprofile", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "vpnclientlessaccessprofile", "obj", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "vpnclientlessaccessprofile", "[", "]", "response", "=", "(", "vpnclientlessaccessprofile", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the vpnclientlessaccessprofile resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "vpnclientlessaccessprofile", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L537-L541
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.get
public static vpnclientlessaccessprofile get(nitro_service service, String profilename) throws Exception{ vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile(); obj.set_profilename(profilename); vpnclientlessaccessprofile response = (vpnclientlessaccessprofile) obj.get_resource(service); return response; }
java
public static vpnclientlessaccessprofile get(nitro_service service, String profilename) throws Exception{ vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile(); obj.set_profilename(profilename); vpnclientlessaccessprofile response = (vpnclientlessaccessprofile) obj.get_resource(service); return response; }
[ "public", "static", "vpnclientlessaccessprofile", "get", "(", "nitro_service", "service", ",", "String", "profilename", ")", "throws", "Exception", "{", "vpnclientlessaccessprofile", "obj", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "obj", ".", "set_profilename", "(", "profilename", ")", ";", "vpnclientlessaccessprofile", "response", "=", "(", "vpnclientlessaccessprofile", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch vpnclientlessaccessprofile resource of given name .
[ "Use", "this", "API", "to", "fetch", "vpnclientlessaccessprofile", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L553-L558
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.get
public static vpnclientlessaccessprofile[] get(nitro_service service, String profilename[]) throws Exception{ if (profilename !=null && profilename.length>0) { vpnclientlessaccessprofile response[] = new vpnclientlessaccessprofile[profilename.length]; vpnclientlessaccessprofile obj[] = new vpnclientlessaccessprofile[profilename.length]; for (int i=0;i<profilename.length;i++) { obj[i] = new vpnclientlessaccessprofile(); obj[i].set_profilename(profilename[i]); response[i] = (vpnclientlessaccessprofile) obj[i].get_resource(service); } return response; } return null; }
java
public static vpnclientlessaccessprofile[] get(nitro_service service, String profilename[]) throws Exception{ if (profilename !=null && profilename.length>0) { vpnclientlessaccessprofile response[] = new vpnclientlessaccessprofile[profilename.length]; vpnclientlessaccessprofile obj[] = new vpnclientlessaccessprofile[profilename.length]; for (int i=0;i<profilename.length;i++) { obj[i] = new vpnclientlessaccessprofile(); obj[i].set_profilename(profilename[i]); response[i] = (vpnclientlessaccessprofile) obj[i].get_resource(service); } return response; } return null; }
[ "public", "static", "vpnclientlessaccessprofile", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "profilename", "[", "]", ")", "throws", "Exception", "{", "if", "(", "profilename", "!=", "null", "&&", "profilename", ".", "length", ">", "0", ")", "{", "vpnclientlessaccessprofile", "response", "[", "]", "=", "new", "vpnclientlessaccessprofile", "[", "profilename", ".", "length", "]", ";", "vpnclientlessaccessprofile", "obj", "[", "]", "=", "new", "vpnclientlessaccessprofile", "[", "profilename", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "profilename", ".", "length", ";", "i", "++", ")", "{", "obj", "[", "i", "]", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "obj", "[", "i", "]", ".", "set_profilename", "(", "profilename", "[", "i", "]", ")", ";", "response", "[", "i", "]", "=", "(", "vpnclientlessaccessprofile", ")", "obj", "[", "i", "]", ".", "get_resource", "(", "service", ")", ";", "}", "return", "response", ";", "}", "return", "null", ";", "}" ]
Use this API to fetch vpnclientlessaccessprofile resources of given names .
[ "Use", "this", "API", "to", "fetch", "vpnclientlessaccessprofile", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L563-L575
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java
vpnclientlessaccessprofile.get_filtered
public static vpnclientlessaccessprofile[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile(); options option = new options(); option.set_filter(filter); vpnclientlessaccessprofile[] response = (vpnclientlessaccessprofile[]) obj.getfiltered(service, option); return response; }
java
public static vpnclientlessaccessprofile[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile(); options option = new options(); option.set_filter(filter); vpnclientlessaccessprofile[] response = (vpnclientlessaccessprofile[]) obj.getfiltered(service, option); return response; }
[ "public", "static", "vpnclientlessaccessprofile", "[", "]", "get_filtered", "(", "nitro_service", "service", ",", "filtervalue", "[", "]", "filter", ")", "throws", "Exception", "{", "vpnclientlessaccessprofile", "obj", "=", "new", "vpnclientlessaccessprofile", "(", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_filter", "(", "filter", ")", ";", "vpnclientlessaccessprofile", "[", "]", "response", "=", "(", "vpnclientlessaccessprofile", "[", "]", ")", "obj", ".", "getfiltered", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch filtered set of vpnclientlessaccessprofile resources. set the filter parameter values in filtervalue object.
[ "Use", "this", "API", "to", "fetch", "filtered", "set", "of", "vpnclientlessaccessprofile", "resources", ".", "set", "the", "filter", "parameter", "values", "in", "filtervalue", "object", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L592-L598
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrMtasResult.java
MtasSolrMtasResult.getFullKeyList
public Set<String> getFullKeyList() throws IOException { if (dataCollector.getCollectorType() .equals(DataCollector.COLLECTOR_TYPE_LIST)) { return dataCollector.getKeyList(); } else { throw new IOException( "only allowed for " + DataCollector.COLLECTOR_TYPE_LIST); } }
java
public Set<String> getFullKeyList() throws IOException { if (dataCollector.getCollectorType() .equals(DataCollector.COLLECTOR_TYPE_LIST)) { return dataCollector.getKeyList(); } else { throw new IOException( "only allowed for " + DataCollector.COLLECTOR_TYPE_LIST); } }
[ "public", "Set", "<", "String", ">", "getFullKeyList", "(", ")", "throws", "IOException", "{", "if", "(", "dataCollector", ".", "getCollectorType", "(", ")", ".", "equals", "(", "DataCollector", ".", "COLLECTOR_TYPE_LIST", ")", ")", "{", "return", "dataCollector", ".", "getKeyList", "(", ")", ";", "}", "else", "{", "throw", "new", "IOException", "(", "\"only allowed for \"", "+", "DataCollector", ".", "COLLECTOR_TYPE_LIST", ")", ";", "}", "}" ]
Gets the full key list. @return the full key list @throws IOException Signals that an I/O exception has occurred.
[ "Gets", "the", "full", "key", "list", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrMtasResult.java#L289-L297
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/FactorTable.java
FactorTable.conditionalLogProbGivenPrevious
public double conditionalLogProbGivenPrevious(int[] given, int of) { if (given.length != windowSize - 1) { throw new IllegalArgumentException("conditionalLogProbGivenPrevious requires given one less than clique size (" + windowSize + ") but was " + Arrays.toString(given)); } // Note: other similar methods could be optimized like this one, but this is the one the CRF uses.... /* int startIndex = indicesFront(given); int numCellsToSum = SloppyMath.intPow(numClasses, windowSize - given.length); double z = ArrayMath.logSum(table, startIndex, startIndex + numCellsToSum); int i = indexOf(given, of); System.err.printf("startIndex is %d, numCellsToSum is %d, i is %d (of is %d)%n", startIndex, numCellsToSum, i, of); */ int startIndex = indicesFront(given); double z = ArrayMath.logSum(table, startIndex, startIndex + numClasses); int i = startIndex + of; // System.err.printf("startIndex is %d, numCellsToSum is %d, i is %d (of is %d)%n", startIndex, numClasses, i, of); return table[i] - z; }
java
public double conditionalLogProbGivenPrevious(int[] given, int of) { if (given.length != windowSize - 1) { throw new IllegalArgumentException("conditionalLogProbGivenPrevious requires given one less than clique size (" + windowSize + ") but was " + Arrays.toString(given)); } // Note: other similar methods could be optimized like this one, but this is the one the CRF uses.... /* int startIndex = indicesFront(given); int numCellsToSum = SloppyMath.intPow(numClasses, windowSize - given.length); double z = ArrayMath.logSum(table, startIndex, startIndex + numCellsToSum); int i = indexOf(given, of); System.err.printf("startIndex is %d, numCellsToSum is %d, i is %d (of is %d)%n", startIndex, numCellsToSum, i, of); */ int startIndex = indicesFront(given); double z = ArrayMath.logSum(table, startIndex, startIndex + numClasses); int i = startIndex + of; // System.err.printf("startIndex is %d, numCellsToSum is %d, i is %d (of is %d)%n", startIndex, numClasses, i, of); return table[i] - z; }
[ "public", "double", "conditionalLogProbGivenPrevious", "(", "int", "[", "]", "given", ",", "int", "of", ")", "{", "if", "(", "given", ".", "length", "!=", "windowSize", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"conditionalLogProbGivenPrevious requires given one less than clique size (\"", "+", "windowSize", "+", "\") but was \"", "+", "Arrays", ".", "toString", "(", "given", ")", ")", ";", "}", "// Note: other similar methods could be optimized like this one, but this is the one the CRF uses....\r", "/*\r\n int startIndex = indicesFront(given);\r\n int numCellsToSum = SloppyMath.intPow(numClasses, windowSize - given.length);\r\n double z = ArrayMath.logSum(table, startIndex, startIndex + numCellsToSum);\r\n int i = indexOf(given, of);\r\n System.err.printf(\"startIndex is %d, numCellsToSum is %d, i is %d (of is %d)%n\", startIndex, numCellsToSum, i, of);\r\n */", "int", "startIndex", "=", "indicesFront", "(", "given", ")", ";", "double", "z", "=", "ArrayMath", ".", "logSum", "(", "table", ",", "startIndex", ",", "startIndex", "+", "numClasses", ")", ";", "int", "i", "=", "startIndex", "+", "of", ";", "// System.err.printf(\"startIndex is %d, numCellsToSum is %d, i is %d (of is %d)%n\", startIndex, numClasses, i, of);\r", "return", "table", "[", "i", "]", "-", "z", ";", "}" ]
Computes the probability of the tag OF being at the end of the table given that the previous tag sequence in table is GIVEN. given is at the beginning, of is at the end. @return the probability of the tag OF being at the end of the table
[ "Computes", "the", "probability", "of", "the", "tag", "OF", "being", "at", "the", "end", "of", "the", "table", "given", "that", "the", "previous", "tag", "sequence", "in", "table", "is", "GIVEN", ".", "given", "is", "at", "the", "beginning", "of", "is", "at", "the", "end", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/FactorTable.java#L213-L232
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/FactorTable.java
FactorTable.conditionalLogProbsGivenPrevious
public double[] conditionalLogProbsGivenPrevious(int[] given) { if (given.length != windowSize - 1) { throw new IllegalArgumentException("conditionalLogProbsGivenPrevious requires given one less than clique size (" + windowSize + ") but was " + Arrays.toString(given)); } double[] result = new double[numClasses]; for (int i = 0; i < numClasses; i++) { int index = indexOf(given, i); result[i] = table[index]; } ArrayMath.logNormalize(result); return result; }
java
public double[] conditionalLogProbsGivenPrevious(int[] given) { if (given.length != windowSize - 1) { throw new IllegalArgumentException("conditionalLogProbsGivenPrevious requires given one less than clique size (" + windowSize + ") but was " + Arrays.toString(given)); } double[] result = new double[numClasses]; for (int i = 0; i < numClasses; i++) { int index = indexOf(given, i); result[i] = table[index]; } ArrayMath.logNormalize(result); return result; }
[ "public", "double", "[", "]", "conditionalLogProbsGivenPrevious", "(", "int", "[", "]", "given", ")", "{", "if", "(", "given", ".", "length", "!=", "windowSize", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"conditionalLogProbsGivenPrevious requires given one less than clique size (\"", "+", "windowSize", "+", "\") but was \"", "+", "Arrays", ".", "toString", "(", "given", ")", ")", ";", "}", "double", "[", "]", "result", "=", "new", "double", "[", "numClasses", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "numClasses", ";", "i", "++", ")", "{", "int", "index", "=", "indexOf", "(", "given", ",", "i", ")", ";", "result", "[", "i", "]", "=", "table", "[", "index", "]", ";", "}", "ArrayMath", ".", "logNormalize", "(", "result", ")", ";", "return", "result", ";", "}" ]
Computes the probabilities of the tag at the end of the table given that the previous tag sequence in table is GIVEN. given is at the beginning, position in question is at the end @return the probabilities of the tag at the end of the table
[ "Computes", "the", "probabilities", "of", "the", "tag", "at", "the", "end", "of", "the", "table", "given", "that", "the", "previous", "tag", "sequence", "in", "table", "is", "GIVEN", ".", "given", "is", "at", "the", "beginning", "position", "in", "question", "is", "at", "the", "end" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/FactorTable.java#L262-L274
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/FactorTable.java
FactorTable.conditionalLogProbGivenFirst
public double conditionalLogProbGivenFirst(int given, int[] of) { if (of.length != windowSize - 1) { throw new IllegalArgumentException("conditionalLogProbGivenFirst requires of one less than clique size (" + windowSize + ") but was " + Arrays.toString(of)); } // compute P(given, of) int[] labels = new int[windowSize]; labels[0] = given; System.arraycopy(of, 0, labels, 1, windowSize - 1); // double probAll = logProb(labels); double probAll = unnormalizedLogProb(labels); // compute P(given) // double probGiven = logProbFront(given); double probGiven = unnormalizedLogProbFront(given); // compute P(given, of) / P(given) return probAll - probGiven; }
java
public double conditionalLogProbGivenFirst(int given, int[] of) { if (of.length != windowSize - 1) { throw new IllegalArgumentException("conditionalLogProbGivenFirst requires of one less than clique size (" + windowSize + ") but was " + Arrays.toString(of)); } // compute P(given, of) int[] labels = new int[windowSize]; labels[0] = given; System.arraycopy(of, 0, labels, 1, windowSize - 1); // double probAll = logProb(labels); double probAll = unnormalizedLogProb(labels); // compute P(given) // double probGiven = logProbFront(given); double probGiven = unnormalizedLogProbFront(given); // compute P(given, of) / P(given) return probAll - probGiven; }
[ "public", "double", "conditionalLogProbGivenFirst", "(", "int", "given", ",", "int", "[", "]", "of", ")", "{", "if", "(", "of", ".", "length", "!=", "windowSize", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"conditionalLogProbGivenFirst requires of one less than clique size (\"", "+", "windowSize", "+", "\") but was \"", "+", "Arrays", ".", "toString", "(", "of", ")", ")", ";", "}", "// compute P(given, of)\r", "int", "[", "]", "labels", "=", "new", "int", "[", "windowSize", "]", ";", "labels", "[", "0", "]", "=", "given", ";", "System", ".", "arraycopy", "(", "of", ",", "0", ",", "labels", ",", "1", ",", "windowSize", "-", "1", ")", ";", "// double probAll = logProb(labels);\r", "double", "probAll", "=", "unnormalizedLogProb", "(", "labels", ")", ";", "// compute P(given)\r", "// double probGiven = logProbFront(given);\r", "double", "probGiven", "=", "unnormalizedLogProbFront", "(", "given", ")", ";", "// compute P(given, of) / P(given)\r", "return", "probAll", "-", "probGiven", ";", "}" ]
Computes the probability of the sequence OF being at the end of the table given that the first tag in table is GIVEN. given is at the beginning, of is at the end @return the probability of the sequence of being at the end of the table
[ "Computes", "the", "probability", "of", "the", "sequence", "OF", "being", "at", "the", "end", "of", "the", "table", "given", "that", "the", "first", "tag", "in", "table", "is", "GIVEN", ".", "given", "is", "at", "the", "beginning", "of", "is", "at", "the", "end" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/FactorTable.java#L283-L301
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/FactorTable.java
FactorTable.unnormalizedConditionalLogProbGivenFirst
public double unnormalizedConditionalLogProbGivenFirst(int given, int[] of) { if (of.length != windowSize - 1) { throw new IllegalArgumentException("unnormalizedConditionalLogProbGivenFirst requires of one less than clique size (" + windowSize + ") but was " + Arrays.toString(of)); } // compute P(given, of) int[] labels = new int[windowSize]; labels[0] = given; System.arraycopy(of, 0, labels, 1, windowSize - 1); // double probAll = logProb(labels); double probAll = unnormalizedLogProb(labels); // compute P(given) // double probGiven = logProbFront(given); // double probGiven = unnormalizedLogProbFront(given); // compute P(given, of) / P(given) // return probAll - probGiven; return probAll; }
java
public double unnormalizedConditionalLogProbGivenFirst(int given, int[] of) { if (of.length != windowSize - 1) { throw new IllegalArgumentException("unnormalizedConditionalLogProbGivenFirst requires of one less than clique size (" + windowSize + ") but was " + Arrays.toString(of)); } // compute P(given, of) int[] labels = new int[windowSize]; labels[0] = given; System.arraycopy(of, 0, labels, 1, windowSize - 1); // double probAll = logProb(labels); double probAll = unnormalizedLogProb(labels); // compute P(given) // double probGiven = logProbFront(given); // double probGiven = unnormalizedLogProbFront(given); // compute P(given, of) / P(given) // return probAll - probGiven; return probAll; }
[ "public", "double", "unnormalizedConditionalLogProbGivenFirst", "(", "int", "given", ",", "int", "[", "]", "of", ")", "{", "if", "(", "of", ".", "length", "!=", "windowSize", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"unnormalizedConditionalLogProbGivenFirst requires of one less than clique size (\"", "+", "windowSize", "+", "\") but was \"", "+", "Arrays", ".", "toString", "(", "of", ")", ")", ";", "}", "// compute P(given, of)\r", "int", "[", "]", "labels", "=", "new", "int", "[", "windowSize", "]", ";", "labels", "[", "0", "]", "=", "given", ";", "System", ".", "arraycopy", "(", "of", ",", "0", ",", "labels", ",", "1", ",", "windowSize", "-", "1", ")", ";", "// double probAll = logProb(labels);\r", "double", "probAll", "=", "unnormalizedLogProb", "(", "labels", ")", ";", "// compute P(given)\r", "// double probGiven = logProbFront(given);\r", "// double probGiven = unnormalizedLogProbFront(given);\r", "// compute P(given, of) / P(given)\r", "// return probAll - probGiven;\r", "return", "probAll", ";", "}" ]
Computes the probability of the sequence OF being at the end of the table given that the first tag in table is GIVEN. given is at the beginning, of is at the end. @return the probability of the sequence of being at the end of the table
[ "Computes", "the", "probability", "of", "the", "sequence", "OF", "being", "at", "the", "end", "of", "the", "table", "given", "that", "the", "first", "tag", "in", "table", "is", "GIVEN", ".", "given", "is", "at", "the", "beginning", "of", "is", "at", "the", "end", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/FactorTable.java#L310-L329
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.get_object_type
protected String get_object_type() { String name = this.getClass().getName(); int index = name.lastIndexOf("."); if(index > 0) name = name.substring(index+1); index = name.lastIndexOf("_stats"); if (index > 0) { name = name.substring(0, index); } return name; }
java
protected String get_object_type() { String name = this.getClass().getName(); int index = name.lastIndexOf("."); if(index > 0) name = name.substring(index+1); index = name.lastIndexOf("_stats"); if (index > 0) { name = name.substring(0, index); } return name; }
[ "protected", "String", "get_object_type", "(", ")", "{", "String", "name", "=", "this", ".", "getClass", "(", ")", ".", "getName", "(", ")", ";", "int", "index", "=", "name", ".", "lastIndexOf", "(", "\".\"", ")", ";", "if", "(", "index", ">", "0", ")", "name", "=", "name", ".", "substring", "(", "index", "+", "1", ")", ";", "index", "=", "name", ".", "lastIndexOf", "(", "\"_stats\"", ")", ";", "if", "(", "index", ">", "0", ")", "{", "name", "=", "name", ".", "substring", "(", "0", ",", "index", ")", ";", "}", "return", "name", ";", "}" ]
Gets the resource type. @return Resource Type. eg:lbvserver, csvserver.
[ "Gets", "the", "resource", "type", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L45-L56
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.unset_string
protected String unset_string(nitro_service service, String id, options option, String args[]) throws Exception { Boolean warning = service.get_warning(); String result = service.get_payload_formatter().unset_string(this, id, option, args, warning); return result; }
java
protected String unset_string(nitro_service service, String id, options option, String args[]) throws Exception { Boolean warning = service.get_warning(); String result = service.get_payload_formatter().unset_string(this, id, option, args, warning); return result; }
[ "protected", "String", "unset_string", "(", "nitro_service", "service", ",", "String", "id", ",", "options", "option", ",", "String", "args", "[", "]", ")", "throws", "Exception", "{", "Boolean", "warning", "=", "service", ".", "get_warning", "(", ")", ";", "String", "result", "=", "service", ".", "get_payload_formatter", "(", ")", ".", "unset_string", "(", "this", ",", "id", ",", "option", ",", "args", ",", "warning", ")", ";", "return", "result", ";", "}" ]
forms a String for unset operation on a resource. @param service nitro_service object. @param id session id. @param option Options object. @param args Array of args that are to be unset. @return string in Json format. @throws Exception if invalid input is given.
[ "forms", "a", "String", "for", "unset", "operation", "on", "a", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L93-L98
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.post_requestEx
private base_resource post_requestEx(nitro_service service, options option) throws Exception { String sessionid = service.get_sessionid(); String request = resource_to_string(service, sessionid, option); return post_dataEx(service, request); }
java
private base_resource post_requestEx(nitro_service service, options option) throws Exception { String sessionid = service.get_sessionid(); String request = resource_to_string(service, sessionid, option); return post_dataEx(service, request); }
[ "private", "base_resource", "post_requestEx", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "String", "sessionid", "=", "service", ".", "get_sessionid", "(", ")", ";", "String", "request", "=", "resource_to_string", "(", "service", ",", "sessionid", ",", "option", ")", ";", "return", "post_dataEx", "(", "service", ",", "request", ")", ";", "}" ]
Use this method to perform a POST operation on netscaler resource. @param service nitro_service object. @param option Options class object. @return requested resource. @throws Exception if invalid input is given.
[ "Use", "this", "method", "to", "perform", "a", "POST", "operation", "on", "netscaler", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L108-L113
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.add_resource
protected base_response add_resource(nitro_service service,options option) throws Exception { if (!service.isLogin() && !this.get_object_type().equals("login")) service.login(); String sessionid = service.get_sessionid(); String request = resource_to_string(service, sessionid, option); return post_data(service,request); }
java
protected base_response add_resource(nitro_service service,options option) throws Exception { if (!service.isLogin() && !this.get_object_type().equals("login")) service.login(); String sessionid = service.get_sessionid(); String request = resource_to_string(service, sessionid, option); return post_data(service,request); }
[ "protected", "base_response", "add_resource", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", "&&", "!", "this", ".", "get_object_type", "(", ")", ".", "equals", "(", "\"login\"", ")", ")", "service", ".", "login", "(", ")", ";", "String", "sessionid", "=", "service", ".", "get_sessionid", "(", ")", ";", "String", "request", "=", "resource_to_string", "(", "service", ",", "sessionid", ",", "option", ")", ";", "return", "post_data", "(", "service", ",", "request", ")", ";", "}" ]
Use this method to perform a add operation on netscaler resource. @param service nitro_service object. @param option options class object. @return status of the operation performed. @throws Exception
[ "Use", "this", "method", "to", "perform", "a", "add", "operation", "on", "netscaler", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L163-L170
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.update_resource
protected base_response update_resource(nitro_service service,options option) throws Exception { if (!service.isLogin() && !this.get_object_type().equals("login")) service.login(); String sessionid = service.get_sessionid(); String request = resource_to_string(service, sessionid, option); return put_data(service,request); }
java
protected base_response update_resource(nitro_service service,options option) throws Exception { if (!service.isLogin() && !this.get_object_type().equals("login")) service.login(); String sessionid = service.get_sessionid(); String request = resource_to_string(service, sessionid, option); return put_data(service,request); }
[ "protected", "base_response", "update_resource", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", "&&", "!", "this", ".", "get_object_type", "(", ")", ".", "equals", "(", "\"login\"", ")", ")", "service", ".", "login", "(", ")", ";", "String", "sessionid", "=", "service", ".", "get_sessionid", "(", ")", ";", "String", "request", "=", "resource_to_string", "(", "service", ",", "sessionid", ",", "option", ")", ";", "return", "put_data", "(", "service", ",", "request", ")", ";", "}" ]
Use this method to perform a modify operation on netscaler resource. @param service nitro_service object. @param option options class object. @return status of the operation performed. @throws Exception
[ "Use", "this", "method", "to", "perform", "a", "modify", "operation", "on", "netscaler", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L190-L197
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.delete_resource
protected base_response delete_resource(nitro_service service) throws Exception { base_response response; if (!service.isLogin()) service.login(); String str = nitro_util.object_to_string_withoutquotes(this); response = delete_request(service, str); return response; }
java
protected base_response delete_resource(nitro_service service) throws Exception { base_response response; if (!service.isLogin()) service.login(); String str = nitro_util.object_to_string_withoutquotes(this); response = delete_request(service, str); return response; }
[ "protected", "base_response", "delete_resource", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "base_response", "response", ";", "if", "(", "!", "service", ".", "isLogin", "(", ")", ")", "service", ".", "login", "(", ")", ";", "String", "str", "=", "nitro_util", ".", "object_to_string_withoutquotes", "(", "this", ")", ";", "response", "=", "delete_request", "(", "service", ",", "str", ")", ";", "return", "response", ";", "}" ]
Use this method to perform a delete operation on netscaler resource. @param service nitro_service object @return status of the operation performed. @throws Exception nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "delete", "operation", "on", "netscaler", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L205-L214
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.getfiltered
protected base_resource[] getfiltered(nitro_service service,options option) throws Exception { if (!service.isLogin()) service.login(); base_resource[] response = get_request(service, option); return response; }
java
protected base_resource[] getfiltered(nitro_service service,options option) throws Exception { if (!service.isLogin()) service.login(); base_resource[] response = get_request(service, option); return response; }
[ "protected", "base_resource", "[", "]", "getfiltered", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", ")", "service", ".", "login", "(", ")", ";", "base_resource", "[", "]", "response", "=", "get_request", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this method to perform a filtered get operation on netscaler resource. @param service nitro_service object. @param option options class object. @return Array of nitro resources of given resource type. @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "filtered", "get", "operation", "on", "netscaler", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L223-L229
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.get_resource
protected base_resource get_resource(nitro_service service,options option) throws Exception { if (!service.isLogin()) service.login(); base_resource[] response = get_request(service, option); if (response != null) { return response[0]; } return null; }
java
protected base_resource get_resource(nitro_service service,options option) throws Exception { if (!service.isLogin()) service.login(); base_resource[] response = get_request(service, option); if (response != null) { return response[0]; } return null; }
[ "protected", "base_resource", "get_resource", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", ")", "service", ".", "login", "(", ")", ";", "base_resource", "[", "]", "response", "=", "get_request", "(", "service", ",", "option", ")", ";", "if", "(", "response", "!=", "null", ")", "{", "return", "response", "[", "0", "]", ";", "}", "return", "null", ";", "}" ]
Use this method to perform a get operation on netscaler resource. @param service nitro_service object. @param option options class object. @return Array of nitro resources of specified type. @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "get", "operation", "on", "netscaler", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L266-L276
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.stat_resources
protected base_resource[] stat_resources(nitro_service service,options option) throws Exception { if (!service.isLogin()) service.login(); base_resource[] response = stat_request(service, option); return response; }
java
protected base_resource[] stat_resources(nitro_service service,options option) throws Exception { if (!service.isLogin()) service.login(); base_resource[] response = stat_request(service, option); return response; }
[ "protected", "base_resource", "[", "]", "stat_resources", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", ")", "service", ".", "login", "(", ")", ";", "base_resource", "[", "]", "response", "=", "stat_request", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this method to perform a stat operation on netscaler resources. @param service nitro_service object. @param option options class object. @return Array of nitro stat resources of specified type. @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "stat", "operation", "on", "netscaler", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L296-L303
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.stat_resource
protected base_resource stat_resource(nitro_service service,options option) throws Exception { if (!service.isLogin()) service.login(); base_resource[] response = stat_request(service, option); if (response != null && response.length > 0) { return response[0]; } return null; }
java
protected base_resource stat_resource(nitro_service service,options option) throws Exception { if (!service.isLogin()) service.login(); base_resource[] response = stat_request(service, option); if (response != null && response.length > 0) { return response[0]; } return null; }
[ "protected", "base_resource", "stat_resource", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", ")", "service", ".", "login", "(", ")", ";", "base_resource", "[", "]", "response", "=", "stat_request", "(", "service", ",", "option", ")", ";", "if", "(", "response", "!=", "null", "&&", "response", ".", "length", ">", "0", ")", "{", "return", "response", "[", "0", "]", ";", "}", "return", "null", ";", "}" ]
Use this method to perform a stat operation on a netscaler resource. @param service nitro_service object. @param option options class object. @return Requested Nitro stat resource. @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "stat", "operation", "on", "a", "netscaler", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L323-L334
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.perform_operationEx
public base_resource perform_operationEx(nitro_service service, String action) throws Exception { if (!service.isLogin() && !get_object_type().equals("login")) service.login(); options option = new options(); option.set_action(action); base_resource response = post_requestEx(service, option); return response; }
java
public base_resource perform_operationEx(nitro_service service, String action) throws Exception { if (!service.isLogin() && !get_object_type().equals("login")) service.login(); options option = new options(); option.set_action(action); base_resource response = post_requestEx(service, option); return response; }
[ "public", "base_resource", "perform_operationEx", "(", "nitro_service", "service", ",", "String", "action", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", "&&", "!", "get_object_type", "(", ")", ".", "equals", "(", "\"login\"", ")", ")", "service", ".", "login", "(", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_action", "(", "action", ")", ";", "base_resource", "response", "=", "post_requestEx", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this method to perform a POST operation that returns a resource ...etc operation on netscaler resource. @param service nitro_service object. @param action action needs to be taken on resource. @return requested resource @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "POST", "operation", "that", "returns", "a", "resource", "...", "etc", "operation", "on", "netscaler", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L374-L382
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.rename_resource
protected base_response rename_resource(nitro_service service, String newname) throws Exception { if (!service.isLogin() && !get_object_type().equals("login")) service.login(); options option = new options(); option.set_action("rename"); this.set_newname(newname); base_response response = post_request(service, option); return response; }
java
protected base_response rename_resource(nitro_service service, String newname) throws Exception { if (!service.isLogin() && !get_object_type().equals("login")) service.login(); options option = new options(); option.set_action("rename"); this.set_newname(newname); base_response response = post_request(service, option); return response; }
[ "protected", "base_response", "rename_resource", "(", "nitro_service", "service", ",", "String", "newname", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", "&&", "!", "get_object_type", "(", ")", ".", "equals", "(", "\"login\"", ")", ")", "service", ".", "login", "(", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_action", "(", "\"rename\"", ")", ";", "this", ".", "set_newname", "(", "newname", ")", ";", "base_response", "response", "=", "post_request", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this method to perform a rename operation on netscaler resource. @param service nitro_service object. @param newname new name to be set to the specified resource. @return status of the operation performed. @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "rename", "operation", "on", "netscaler", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L458-L468
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.update_bulk_request
protected static base_responses update_bulk_request(nitro_service service,base_resource resources[]) throws Exception { if (!service.isLogin()) service.login(); String id = service.get_sessionid(); Boolean warning = service.get_warning(); String onerror = service.get_onerror(); String request = service.get_payload_formatter().resource_to_string(resources, id, null, warning, onerror); base_responses result = put_bulk_data(service, request); return result; }
java
protected static base_responses update_bulk_request(nitro_service service,base_resource resources[]) throws Exception { if (!service.isLogin()) service.login(); String id = service.get_sessionid(); Boolean warning = service.get_warning(); String onerror = service.get_onerror(); String request = service.get_payload_formatter().resource_to_string(resources, id, null, warning, onerror); base_responses result = put_bulk_data(service, request); return result; }
[ "protected", "static", "base_responses", "update_bulk_request", "(", "nitro_service", "service", ",", "base_resource", "resources", "[", "]", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", ")", "service", ".", "login", "(", ")", ";", "String", "id", "=", "service", ".", "get_sessionid", "(", ")", ";", "Boolean", "warning", "=", "service", ".", "get_warning", "(", ")", ";", "String", "onerror", "=", "service", ".", "get_onerror", "(", ")", ";", "String", "request", "=", "service", ".", "get_payload_formatter", "(", ")", ".", "resource_to_string", "(", "resources", ",", "id", ",", "null", ",", "warning", ",", "onerror", ")", ";", "base_responses", "result", "=", "put_bulk_data", "(", "service", ",", "request", ")", ";", "return", "result", ";", "}" ]
Use this method to perform an update operation on netscaler resources. @param service nitro_service object. @param resources Array of nitro resources to be updated. @param option options class object @return status of the operation performed. @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "an", "update", "operation", "on", "netscaler", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L496-L507
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.delete_bulk_request
protected static base_responses delete_bulk_request(nitro_service service,base_resource resources[]) throws Exception { if (!service.isLogin()) service.login(); options option = new options(); option.set_action("rm"); String type = resources[0].get_object_type(); if (type.indexOf("_binding") > 0) { option.set_action("unbind"); } String id = service.get_sessionid(); String onerror = service.get_onerror(); Boolean warning = service.get_warning(); String request = service.get_payload_formatter().resource_to_string(resources, id, option,warning, onerror); base_responses result = post_bulk_data(service,request); return result; }
java
protected static base_responses delete_bulk_request(nitro_service service,base_resource resources[]) throws Exception { if (!service.isLogin()) service.login(); options option = new options(); option.set_action("rm"); String type = resources[0].get_object_type(); if (type.indexOf("_binding") > 0) { option.set_action("unbind"); } String id = service.get_sessionid(); String onerror = service.get_onerror(); Boolean warning = service.get_warning(); String request = service.get_payload_formatter().resource_to_string(resources, id, option,warning, onerror); base_responses result = post_bulk_data(service,request); return result; }
[ "protected", "static", "base_responses", "delete_bulk_request", "(", "nitro_service", "service", ",", "base_resource", "resources", "[", "]", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", ")", "service", ".", "login", "(", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_action", "(", "\"rm\"", ")", ";", "String", "type", "=", "resources", "[", "0", "]", ".", "get_object_type", "(", ")", ";", "if", "(", "type", ".", "indexOf", "(", "\"_binding\"", ")", ">", "0", ")", "{", "option", ".", "set_action", "(", "\"unbind\"", ")", ";", "}", "String", "id", "=", "service", ".", "get_sessionid", "(", ")", ";", "String", "onerror", "=", "service", ".", "get_onerror", "(", ")", ";", "Boolean", "warning", "=", "service", ".", "get_warning", "(", ")", ";", "String", "request", "=", "service", ".", "get_payload_formatter", "(", ")", ".", "resource_to_string", "(", "resources", ",", "id", ",", "option", ",", "warning", ",", "onerror", ")", ";", "base_responses", "result", "=", "post_bulk_data", "(", "service", ",", "request", ")", ";", "return", "result", ";", "}" ]
Use this method to perform a delete operation on netscaler resources. @param service nitro_service object. @param resources Nitro resources to be deleted on netscaler. @param option options class object. @return status of the performed operation. @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "delete", "operation", "on", "netscaler", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L552-L571
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource._put
private static String _put(nitro_service service, String request) throws Exception { HttpURLConnection httpURLConnection; StringBuilder responseStr = new StringBuilder(); try { String urlstr; String ipaddress = service.get_ipaddress(); String version = service.get_version(); String protocol = service.get_protocol(); urlstr = protocol+"://" + ipaddress + "/nitro/" + version + "/config/"; URL url = new URL(urlstr); httpURLConnection = (HttpURLConnection) url.openConnection(); httpURLConnection.setRequestMethod("PUT"); if (httpURLConnection instanceof HttpsURLConnection) { if (service.get_certvalidation()) { SocketFactory sslSocketFactory = SSLSocketFactory.getDefault(); HttpsURLConnection secured = (HttpsURLConnection) httpURLConnection; secured.setSSLSocketFactory((SSLSocketFactory)sslSocketFactory); if (!service.get_hostnameverification()) { /* * override defualt hostNameverifier's verify method * with EmptyHostnameVerifier's verify method to ignore hostname verification check. */ secured.setHostnameVerifier(new EmptyHostnameVerifier()); } } else { SSLContext sslContext = SSLContext.getInstance("SSL"); //we are using an empty trust manager, because NetScaler currently presents //a test certificate not issued by any signing authority, so we need to bypass //the credentials check sslContext.init(null, new TrustManager[]{new EmptyTrustManager()}, null); SocketFactory sslSocketFactory = sslContext.getSocketFactory(); HttpsURLConnection secured = (HttpsURLConnection) httpURLConnection; secured.setSSLSocketFactory((SSLSocketFactory)sslSocketFactory); if (!service.get_hostnameverification()) { /* * overriding defualt hostNameverifier's verify method * with EmptyHostnameVerifier's verify method to bypass hostname check. */ secured.setHostnameVerifier(new EmptyHostnameVerifier()); } } } httpURLConnection.setDoInput(true); httpURLConnection.setDoOutput(true); httpURLConnection.setUseCaches(false); httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); httpURLConnection.setDoOutput(true); OutputStreamWriter ouput = new OutputStreamWriter(httpURLConnection.getOutputStream()); ouput.write(request); ouput.flush(); ouput.close(); InputStream input; try { input = httpURLConnection.getInputStream(); } catch (Exception e) { input = httpURLConnection.getErrorStream(); } String contentEncoding = httpURLConnection.getContentEncoding(); // get correct input stream for compressed data: if (contentEncoding != null) { if(contentEncoding.equalsIgnoreCase("gzip")) input = new GZIPInputStream(input); //reads 2 bytes to determine GZIP stream! else if(contentEncoding.equalsIgnoreCase("deflate")) input = new InflaterInputStream(input); } int numOfTotalBytesRead; byte [] buffer = new byte[1024]; while ((numOfTotalBytesRead = input.read(buffer, 0, buffer.length)) != -1) { responseStr.append(new String(buffer, 0, numOfTotalBytesRead)); } httpURLConnection.disconnect(); input.close(); } catch (MalformedURLException mue) { throw mue; } catch (IOException ioe) { throw ioe; } catch(Exception e) { throw e; } return responseStr.toString(); }
java
private static String _put(nitro_service service, String request) throws Exception { HttpURLConnection httpURLConnection; StringBuilder responseStr = new StringBuilder(); try { String urlstr; String ipaddress = service.get_ipaddress(); String version = service.get_version(); String protocol = service.get_protocol(); urlstr = protocol+"://" + ipaddress + "/nitro/" + version + "/config/"; URL url = new URL(urlstr); httpURLConnection = (HttpURLConnection) url.openConnection(); httpURLConnection.setRequestMethod("PUT"); if (httpURLConnection instanceof HttpsURLConnection) { if (service.get_certvalidation()) { SocketFactory sslSocketFactory = SSLSocketFactory.getDefault(); HttpsURLConnection secured = (HttpsURLConnection) httpURLConnection; secured.setSSLSocketFactory((SSLSocketFactory)sslSocketFactory); if (!service.get_hostnameverification()) { /* * override defualt hostNameverifier's verify method * with EmptyHostnameVerifier's verify method to ignore hostname verification check. */ secured.setHostnameVerifier(new EmptyHostnameVerifier()); } } else { SSLContext sslContext = SSLContext.getInstance("SSL"); //we are using an empty trust manager, because NetScaler currently presents //a test certificate not issued by any signing authority, so we need to bypass //the credentials check sslContext.init(null, new TrustManager[]{new EmptyTrustManager()}, null); SocketFactory sslSocketFactory = sslContext.getSocketFactory(); HttpsURLConnection secured = (HttpsURLConnection) httpURLConnection; secured.setSSLSocketFactory((SSLSocketFactory)sslSocketFactory); if (!service.get_hostnameverification()) { /* * overriding defualt hostNameverifier's verify method * with EmptyHostnameVerifier's verify method to bypass hostname check. */ secured.setHostnameVerifier(new EmptyHostnameVerifier()); } } } httpURLConnection.setDoInput(true); httpURLConnection.setDoOutput(true); httpURLConnection.setUseCaches(false); httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); httpURLConnection.setDoOutput(true); OutputStreamWriter ouput = new OutputStreamWriter(httpURLConnection.getOutputStream()); ouput.write(request); ouput.flush(); ouput.close(); InputStream input; try { input = httpURLConnection.getInputStream(); } catch (Exception e) { input = httpURLConnection.getErrorStream(); } String contentEncoding = httpURLConnection.getContentEncoding(); // get correct input stream for compressed data: if (contentEncoding != null) { if(contentEncoding.equalsIgnoreCase("gzip")) input = new GZIPInputStream(input); //reads 2 bytes to determine GZIP stream! else if(contentEncoding.equalsIgnoreCase("deflate")) input = new InflaterInputStream(input); } int numOfTotalBytesRead; byte [] buffer = new byte[1024]; while ((numOfTotalBytesRead = input.read(buffer, 0, buffer.length)) != -1) { responseStr.append(new String(buffer, 0, numOfTotalBytesRead)); } httpURLConnection.disconnect(); input.close(); } catch (MalformedURLException mue) { throw mue; } catch (IOException ioe) { throw ioe; } catch(Exception e) { throw e; } return responseStr.toString(); }
[ "private", "static", "String", "_put", "(", "nitro_service", "service", ",", "String", "request", ")", "throws", "Exception", "{", "HttpURLConnection", "httpURLConnection", ";", "StringBuilder", "responseStr", "=", "new", "StringBuilder", "(", ")", ";", "try", "{", "String", "urlstr", ";", "String", "ipaddress", "=", "service", ".", "get_ipaddress", "(", ")", ";", "String", "version", "=", "service", ".", "get_version", "(", ")", ";", "String", "protocol", "=", "service", ".", "get_protocol", "(", ")", ";", "urlstr", "=", "protocol", "+", "\"://\"", "+", "ipaddress", "+", "\"/nitro/\"", "+", "version", "+", "\"/config/\"", ";", "URL", "url", "=", "new", "URL", "(", "urlstr", ")", ";", "httpURLConnection", "=", "(", "HttpURLConnection", ")", "url", ".", "openConnection", "(", ")", ";", "httpURLConnection", ".", "setRequestMethod", "(", "\"PUT\"", ")", ";", "if", "(", "httpURLConnection", "instanceof", "HttpsURLConnection", ")", "{", "if", "(", "service", ".", "get_certvalidation", "(", ")", ")", "{", "SocketFactory", "sslSocketFactory", "=", "SSLSocketFactory", ".", "getDefault", "(", ")", ";", "HttpsURLConnection", "secured", "=", "(", "HttpsURLConnection", ")", "httpURLConnection", ";", "secured", ".", "setSSLSocketFactory", "(", "(", "SSLSocketFactory", ")", "sslSocketFactory", ")", ";", "if", "(", "!", "service", ".", "get_hostnameverification", "(", ")", ")", "{", "/*\n\t\t\t\t\t\t * override defualt hostNameverifier's verify method\n\t\t\t\t\t\t * with EmptyHostnameVerifier's verify method to ignore hostname verification check.\n\t\t\t\t\t\t */", "secured", ".", "setHostnameVerifier", "(", "new", "EmptyHostnameVerifier", "(", ")", ")", ";", "}", "}", "else", "{", "SSLContext", "sslContext", "=", "SSLContext", ".", "getInstance", "(", "\"SSL\"", ")", ";", "//we are using an empty trust manager, because NetScaler currently presents", "//a test certificate not issued by any signing authority, so we need to bypass", "//the credentials check", "sslContext", ".", "init", "(", "null", ",", "new", "TrustManager", "[", "]", "{", "new", "EmptyTrustManager", "(", ")", "}", ",", "null", ")", ";", "SocketFactory", "sslSocketFactory", "=", "sslContext", ".", "getSocketFactory", "(", ")", ";", "HttpsURLConnection", "secured", "=", "(", "HttpsURLConnection", ")", "httpURLConnection", ";", "secured", ".", "setSSLSocketFactory", "(", "(", "SSLSocketFactory", ")", "sslSocketFactory", ")", ";", "if", "(", "!", "service", ".", "get_hostnameverification", "(", ")", ")", "{", "/*\n\t\t\t\t\t\t * overriding defualt hostNameverifier's verify method\n\t\t\t\t\t\t * with EmptyHostnameVerifier's verify method to bypass hostname check.\n\t\t\t\t\t\t */", "secured", ".", "setHostnameVerifier", "(", "new", "EmptyHostnameVerifier", "(", ")", ")", ";", "}", "}", "}", "httpURLConnection", ".", "setDoInput", "(", "true", ")", ";", "httpURLConnection", ".", "setDoOutput", "(", "true", ")", ";", "httpURLConnection", ".", "setUseCaches", "(", "false", ")", ";", "httpURLConnection", ".", "setRequestProperty", "(", "\"Content-Type\"", ",", "\"application/x-www-form-urlencoded\"", ")", ";", "httpURLConnection", ".", "setDoOutput", "(", "true", ")", ";", "OutputStreamWriter", "ouput", "=", "new", "OutputStreamWriter", "(", "httpURLConnection", ".", "getOutputStream", "(", ")", ")", ";", "ouput", ".", "write", "(", "request", ")", ";", "ouput", ".", "flush", "(", ")", ";", "ouput", ".", "close", "(", ")", ";", "InputStream", "input", ";", "try", "{", "input", "=", "httpURLConnection", ".", "getInputStream", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "input", "=", "httpURLConnection", ".", "getErrorStream", "(", ")", ";", "}", "String", "contentEncoding", "=", "httpURLConnection", ".", "getContentEncoding", "(", ")", ";", "//\tget correct input stream for compressed data:", "if", "(", "contentEncoding", "!=", "null", ")", "{", "if", "(", "contentEncoding", ".", "equalsIgnoreCase", "(", "\"gzip\"", ")", ")", "input", "=", "new", "GZIPInputStream", "(", "input", ")", ";", "//reads 2 bytes to determine GZIP stream!", "else", "if", "(", "contentEncoding", ".", "equalsIgnoreCase", "(", "\"deflate\"", ")", ")", "input", "=", "new", "InflaterInputStream", "(", "input", ")", ";", "}", "int", "numOfTotalBytesRead", ";", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "1024", "]", ";", "while", "(", "(", "numOfTotalBytesRead", "=", "input", ".", "read", "(", "buffer", ",", "0", ",", "buffer", ".", "length", ")", ")", "!=", "-", "1", ")", "{", "responseStr", ".", "append", "(", "new", "String", "(", "buffer", ",", "0", ",", "numOfTotalBytesRead", ")", ")", ";", "}", "httpURLConnection", ".", "disconnect", "(", ")", ";", "input", ".", "close", "(", ")", ";", "}", "catch", "(", "MalformedURLException", "mue", ")", "{", "throw", "mue", ";", "}", "catch", "(", "IOException", "ioe", ")", "{", "throw", "ioe", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "e", ";", "}", "return", "responseStr", ".", "toString", "(", ")", ";", "}" ]
This method, forms the http PUT request, applies on the netscaler. Reads the response from the netscaler and converts it to base response. @param service nitro_service object. @param request Json request. @return status of the operation performed. @throws Exception nitro exception is thrown.
[ "This", "method", "forms", "the", "http", "PUT", "request", "applies", "on", "the", "netscaler", ".", "Reads", "the", "response", "from", "the", "netscaler", "and", "converts", "it", "to", "base", "response", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L581-L679
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsevents.java
nsevents.get
public static nsevents[] get(nitro_service service, options option) throws Exception{ nsevents obj = new nsevents(); nsevents[] response = (nsevents[])obj.get_resources(service,option); return response; }
java
public static nsevents[] get(nitro_service service, options option) throws Exception{ nsevents obj = new nsevents(); nsevents[] response = (nsevents[])obj.get_resources(service,option); return response; }
[ "public", "static", "nsevents", "[", "]", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "nsevents", "obj", "=", "new", "nsevents", "(", ")", ";", "nsevents", "[", "]", "response", "=", "(", "nsevents", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the nsevents resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nsevents", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsevents.java#L203-L207
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsevents.java
nsevents.get
public static nsevents[] get(nitro_service service, nsevents_args args) throws Exception{ nsevents obj = new nsevents(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); nsevents[] response = (nsevents[])obj.get_resources(service, option); return response; }
java
public static nsevents[] get(nitro_service service, nsevents_args args) throws Exception{ nsevents obj = new nsevents(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); nsevents[] response = (nsevents[])obj.get_resources(service, option); return response; }
[ "public", "static", "nsevents", "[", "]", "get", "(", "nitro_service", "service", ",", "nsevents_args", "args", ")", "throws", "Exception", "{", "nsevents", "obj", "=", "new", "nsevents", "(", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_args", "(", "nitro_util", ".", "object_to_string_withoutquotes", "(", "args", ")", ")", ";", "nsevents", "[", "]", "response", "=", "(", "nsevents", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the nsevents resources that are configured on netscaler. This uses nsevents_args which is a way to provide additional arguments while fetching the resources.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nsevents", "resources", "that", "are", "configured", "on", "netscaler", ".", "This", "uses", "nsevents_args", "which", "is", "a", "way", "to", "provide", "additional", "arguments", "while", "fetching", "the", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsevents.java#L212-L218
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicy_sslservice_binding.java
sslpolicy_sslservice_binding.get
public static sslpolicy_sslservice_binding[] get(nitro_service service, String name) throws Exception{ sslpolicy_sslservice_binding obj = new sslpolicy_sslservice_binding(); obj.set_name(name); sslpolicy_sslservice_binding response[] = (sslpolicy_sslservice_binding[]) obj.get_resources(service); return response; }
java
public static sslpolicy_sslservice_binding[] get(nitro_service service, String name) throws Exception{ sslpolicy_sslservice_binding obj = new sslpolicy_sslservice_binding(); obj.set_name(name); sslpolicy_sslservice_binding response[] = (sslpolicy_sslservice_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "sslpolicy_sslservice_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "sslpolicy_sslservice_binding", "obj", "=", "new", "sslpolicy_sslservice_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "sslpolicy_sslservice_binding", "response", "[", "]", "=", "(", "sslpolicy_sslservice_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch sslpolicy_sslservice_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "sslpolicy_sslservice_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicy_sslservice_binding.java#L162-L167
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java
lbroute6.add
public static base_response add(nitro_service client, lbroute6 resource) throws Exception { lbroute6 addresource = new lbroute6(); addresource.network = resource.network; addresource.gatewayname = resource.gatewayname; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, lbroute6 resource) throws Exception { lbroute6 addresource = new lbroute6(); addresource.network = resource.network; addresource.gatewayname = resource.gatewayname; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "lbroute6", "resource", ")", "throws", "Exception", "{", "lbroute6", "addresource", "=", "new", "lbroute6", "(", ")", ";", "addresource", ".", "network", "=", "resource", ".", "network", ";", "addresource", ".", "gatewayname", "=", "resource", ".", "gatewayname", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add lbroute6.
[ "Use", "this", "API", "to", "add", "lbroute6", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java#L125-L130
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java
lbroute6.add
public static base_responses add(nitro_service client, lbroute6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { lbroute6 addresources[] = new lbroute6[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new lbroute6(); addresources[i].network = resources[i].network; addresources[i].gatewayname = resources[i].gatewayname; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, lbroute6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { lbroute6 addresources[] = new lbroute6[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new lbroute6(); addresources[i].network = resources[i].network; addresources[i].gatewayname = resources[i].gatewayname; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "lbroute6", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "lbroute6", "addresources", "[", "]", "=", "new", "lbroute6", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "lbroute6", "(", ")", ";", "addresources", "[", "i", "]", ".", "network", "=", "resources", "[", "i", "]", ".", "network", ";", "addresources", "[", "i", "]", ".", "gatewayname", "=", "resources", "[", "i", "]", ".", "gatewayname", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add lbroute6 resources.
[ "Use", "this", "API", "to", "add", "lbroute6", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java#L135-L147
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java
lbroute6.get
public static lbroute6[] get(nitro_service service) throws Exception{ lbroute6 obj = new lbroute6(); lbroute6[] response = (lbroute6[])obj.get_resources(service); return response; }
java
public static lbroute6[] get(nitro_service service) throws Exception{ lbroute6 obj = new lbroute6(); lbroute6[] response = (lbroute6[])obj.get_resources(service); return response; }
[ "public", "static", "lbroute6", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "lbroute6", "obj", "=", "new", "lbroute6", "(", ")", ";", "lbroute6", "[", "]", "response", "=", "(", "lbroute6", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the lbroute6 resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "lbroute6", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java#L202-L206
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java
lbroute6.get
public static lbroute6 get(nitro_service service, String network) throws Exception{ lbroute6 obj = new lbroute6(); obj.set_network(network); lbroute6 response = (lbroute6) obj.get_resource(service); return response; }
java
public static lbroute6 get(nitro_service service, String network) throws Exception{ lbroute6 obj = new lbroute6(); obj.set_network(network); lbroute6 response = (lbroute6) obj.get_resource(service); return response; }
[ "public", "static", "lbroute6", "get", "(", "nitro_service", "service", ",", "String", "network", ")", "throws", "Exception", "{", "lbroute6", "obj", "=", "new", "lbroute6", "(", ")", ";", "obj", ".", "set_network", "(", "network", ")", ";", "lbroute6", "response", "=", "(", "lbroute6", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch lbroute6 resource of given name .
[ "Use", "this", "API", "to", "fetch", "lbroute6", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java#L218-L223
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java
lbroute6.get
public static lbroute6[] get(nitro_service service, String network[]) throws Exception{ if (network !=null && network.length>0) { lbroute6 response[] = new lbroute6[network.length]; lbroute6 obj[] = new lbroute6[network.length]; for (int i=0;i<network.length;i++) { obj[i] = new lbroute6(); obj[i].set_network(network[i]); response[i] = (lbroute6) obj[i].get_resource(service); } return response; } return null; }
java
public static lbroute6[] get(nitro_service service, String network[]) throws Exception{ if (network !=null && network.length>0) { lbroute6 response[] = new lbroute6[network.length]; lbroute6 obj[] = new lbroute6[network.length]; for (int i=0;i<network.length;i++) { obj[i] = new lbroute6(); obj[i].set_network(network[i]); response[i] = (lbroute6) obj[i].get_resource(service); } return response; } return null; }
[ "public", "static", "lbroute6", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "network", "[", "]", ")", "throws", "Exception", "{", "if", "(", "network", "!=", "null", "&&", "network", ".", "length", ">", "0", ")", "{", "lbroute6", "response", "[", "]", "=", "new", "lbroute6", "[", "network", ".", "length", "]", ";", "lbroute6", "obj", "[", "]", "=", "new", "lbroute6", "[", "network", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "network", ".", "length", ";", "i", "++", ")", "{", "obj", "[", "i", "]", "=", "new", "lbroute6", "(", ")", ";", "obj", "[", "i", "]", ".", "set_network", "(", "network", "[", "i", "]", ")", ";", "response", "[", "i", "]", "=", "(", "lbroute6", ")", "obj", "[", "i", "]", ".", "get_resource", "(", "service", ")", ";", "}", "return", "response", ";", "}", "return", "null", ";", "}" ]
Use this API to fetch lbroute6 resources of given names .
[ "Use", "this", "API", "to", "fetch", "lbroute6", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute6.java#L228-L240
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/l2param.java
l2param.update
public static base_response update(nitro_service client, l2param resource) throws Exception { l2param updateresource = new l2param(); updateresource.mbfpeermacupdate = resource.mbfpeermacupdate; updateresource.maxbridgecollision = resource.maxbridgecollision; updateresource.bdggrpproxyarp = resource.bdggrpproxyarp; updateresource.bdgsetting = resource.bdgsetting; updateresource.garponvridintf = resource.garponvridintf; updateresource.macmodefwdmypkt = resource.macmodefwdmypkt; updateresource.usemymac = resource.usemymac; updateresource.proxyarp = resource.proxyarp; updateresource.garpreply = resource.garpreply; updateresource.mbfinstlearning = resource.mbfinstlearning; updateresource.rstintfonhafo = resource.rstintfonhafo; updateresource.skipproxyingbsdtraffic = resource.skipproxyingbsdtraffic; updateresource.returntoethernetsender = resource.returntoethernetsender; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, l2param resource) throws Exception { l2param updateresource = new l2param(); updateresource.mbfpeermacupdate = resource.mbfpeermacupdate; updateresource.maxbridgecollision = resource.maxbridgecollision; updateresource.bdggrpproxyarp = resource.bdggrpproxyarp; updateresource.bdgsetting = resource.bdgsetting; updateresource.garponvridintf = resource.garponvridintf; updateresource.macmodefwdmypkt = resource.macmodefwdmypkt; updateresource.usemymac = resource.usemymac; updateresource.proxyarp = resource.proxyarp; updateresource.garpreply = resource.garpreply; updateresource.mbfinstlearning = resource.mbfinstlearning; updateresource.rstintfonhafo = resource.rstintfonhafo; updateresource.skipproxyingbsdtraffic = resource.skipproxyingbsdtraffic; updateresource.returntoethernetsender = resource.returntoethernetsender; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "l2param", "resource", ")", "throws", "Exception", "{", "l2param", "updateresource", "=", "new", "l2param", "(", ")", ";", "updateresource", ".", "mbfpeermacupdate", "=", "resource", ".", "mbfpeermacupdate", ";", "updateresource", ".", "maxbridgecollision", "=", "resource", ".", "maxbridgecollision", ";", "updateresource", ".", "bdggrpproxyarp", "=", "resource", ".", "bdggrpproxyarp", ";", "updateresource", ".", "bdgsetting", "=", "resource", ".", "bdgsetting", ";", "updateresource", ".", "garponvridintf", "=", "resource", ".", "garponvridintf", ";", "updateresource", ".", "macmodefwdmypkt", "=", "resource", ".", "macmodefwdmypkt", ";", "updateresource", ".", "usemymac", "=", "resource", ".", "usemymac", ";", "updateresource", ".", "proxyarp", "=", "resource", ".", "proxyarp", ";", "updateresource", ".", "garpreply", "=", "resource", ".", "garpreply", ";", "updateresource", ".", "mbfinstlearning", "=", "resource", ".", "mbfinstlearning", ";", "updateresource", ".", "rstintfonhafo", "=", "resource", ".", "rstintfonhafo", ";", "updateresource", ".", "skipproxyingbsdtraffic", "=", "resource", ".", "skipproxyingbsdtraffic", ";", "updateresource", ".", "returntoethernetsender", "=", "resource", ".", "returntoethernetsender", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update l2param.
[ "Use", "this", "API", "to", "update", "l2param", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/l2param.java#L340-L356
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/l2param.java
l2param.unset
public static base_response unset(nitro_service client, l2param resource, String[] args) throws Exception{ l2param unsetresource = new l2param(); return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, l2param resource, String[] args) throws Exception{ l2param unsetresource = new l2param(); return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "l2param", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "l2param", "unsetresource", "=", "new", "l2param", "(", ")", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of l2param resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "l2param", "resource", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/l2param.java#L362-L365
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/l2param.java
l2param.get
public static l2param get(nitro_service service) throws Exception{ l2param obj = new l2param(); l2param[] response = (l2param[])obj.get_resources(service); return response[0]; }
java
public static l2param get(nitro_service service) throws Exception{ l2param obj = new l2param(); l2param[] response = (l2param[])obj.get_resources(service); return response[0]; }
[ "public", "static", "l2param", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "l2param", "obj", "=", "new", "l2param", "(", ")", ";", "l2param", "[", "]", "response", "=", "(", "l2param", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the l2param resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "l2param", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/l2param.java#L370-L374
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/MetaClass.java
MetaClass.createFactory
public <E> ClassFactory<E> createFactory(String... classes) { try { return new ClassFactory<E>(classname, classes); } catch (ClassCreationException e){ throw e; } catch (Exception e) { throw new ClassCreationException(e); } }
java
public <E> ClassFactory<E> createFactory(String... classes) { try { return new ClassFactory<E>(classname, classes); } catch (ClassCreationException e){ throw e; } catch (Exception e) { throw new ClassCreationException(e); } }
[ "public", "<", "E", ">", "ClassFactory", "<", "E", ">", "createFactory", "(", "String", "...", "classes", ")", "{", "try", "{", "return", "new", "ClassFactory", "<", "E", ">", "(", "classname", ",", "classes", ")", ";", "}", "catch", "(", "ClassCreationException", "e", ")", "{", "throw", "e", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "ClassCreationException", "(", "e", ")", ";", "}", "}" ]
Creates a factory for producing instances of this class from a constructor taking the given types as arguments @param <E> The type of the objects to be produced @param classes The types used in the constructor @return A ClassFactory of the given type
[ "Creates", "a", "factory", "for", "producing", "instances", "of", "this", "class", "from", "a", "constructor", "taking", "the", "given", "types", "as", "arguments" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/MetaClass.java#L327-L335
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/MetaClass.java
MetaClass.createFactory
public <E> ClassFactory<E> createFactory(Object... objects) { try { return new ClassFactory<E>(classname, objects); } catch (ClassCreationException e){ throw e; } catch (Exception e) { throw new ClassCreationException(e); } }
java
public <E> ClassFactory<E> createFactory(Object... objects) { try { return new ClassFactory<E>(classname, objects); } catch (ClassCreationException e){ throw e; } catch (Exception e) { throw new ClassCreationException(e); } }
[ "public", "<", "E", ">", "ClassFactory", "<", "E", ">", "createFactory", "(", "Object", "...", "objects", ")", "{", "try", "{", "return", "new", "ClassFactory", "<", "E", ">", "(", "classname", ",", "objects", ")", ";", "}", "catch", "(", "ClassCreationException", "e", ")", "{", "throw", "e", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "ClassCreationException", "(", "e", ")", ";", "}", "}" ]
Creates a factory for producing instances of this class from a constructor taking objects of the types given @param <E> The type of the objects to be produced @param objects Instances of the types used in the constructor @return A ClassFactory of the given type
[ "Creates", "a", "factory", "for", "producing", "instances", "of", "this", "class", "from", "a", "constructor", "taking", "objects", "of", "the", "types", "given" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/MetaClass.java#L347-L355
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/MetaClass.java
MetaClass.type2class
private static Class <?> type2class(Type type){ if(type instanceof Class <?>){ return (Class <?>) type; //base case }else if(type instanceof ParameterizedType){ return type2class( ((ParameterizedType) type).getRawType() ); }else if(type instanceof TypeVariable<?>){ return type2class( ((TypeVariable<?>) type).getBounds()[0] ); }else if(type instanceof WildcardType){ return type2class( ((WildcardType) type).getUpperBounds()[0] ); }else{ throw new IllegalArgumentException("Cannot convert type to class: " + type); } }
java
private static Class <?> type2class(Type type){ if(type instanceof Class <?>){ return (Class <?>) type; //base case }else if(type instanceof ParameterizedType){ return type2class( ((ParameterizedType) type).getRawType() ); }else if(type instanceof TypeVariable<?>){ return type2class( ((TypeVariable<?>) type).getBounds()[0] ); }else if(type instanceof WildcardType){ return type2class( ((WildcardType) type).getUpperBounds()[0] ); }else{ throw new IllegalArgumentException("Cannot convert type to class: " + type); } }
[ "private", "static", "Class", "<", "?", ">", "type2class", "(", "Type", "type", ")", "{", "if", "(", "type", "instanceof", "Class", "<", "?", ">", ")", "{", "return", "(", "Class", "<", "?", ">", ")", "type", ";", "//base case\r", "}", "else", "if", "(", "type", "instanceof", "ParameterizedType", ")", "{", "return", "type2class", "(", "(", "(", "ParameterizedType", ")", "type", ")", ".", "getRawType", "(", ")", ")", ";", "}", "else", "if", "(", "type", "instanceof", "TypeVariable", "<", "?", ">", ")", "{", "return", "type2class", "(", "(", "(", "TypeVariable", "<", "?", ">", ")", "type", ")", ".", "getBounds", "(", ")", "[", "0", "]", ")", ";", "}", "else", "if", "(", "type", "instanceof", "WildcardType", ")", "{", "return", "type2class", "(", "(", "(", "WildcardType", ")", "type", ")", ".", "getUpperBounds", "(", ")", "[", "0", "]", ")", ";", "}", "else", "{", "throw", "new", "IllegalArgumentException", "(", "\"Cannot convert type to class: \"", "+", "type", ")", ";", "}", "}" ]
Utility method for cast @param type The type to cast into a class @return The class corresponding to the passed in type
[ "Utility", "method", "for", "cast" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/MetaClass.java#L453-L465
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/MetaClass.java
MetaClass.decodeArray
private static final String[] decodeArray(String encoded){ char[] chars = encoded.trim().toCharArray(); //--Parse the String //(state) char quoteCloseChar = (char) 0; List<StringBuilder> terms = new LinkedList<StringBuilder>(); StringBuilder current = new StringBuilder(); //(start/stop overhead) int start = 0; int end = chars.length; if(chars[0] == '('){ start += 1; end -= 1; if(chars[end] != ')') throw new IllegalArgumentException("Unclosed paren in encoded array: " + encoded); } if(chars[0] == '['){ start += 1; end -= 1; if(chars[end] != ']') throw new IllegalArgumentException("Unclosed bracket in encoded array: " + encoded); } //(finite state automata) for(int i=start; i<end; i++){ if(chars[i] == '\\'){ //(case: escaped character) if(i == chars.length - 1) throw new IllegalArgumentException("Last character of encoded pair is escape character: " + encoded); current.append(chars[i+1]); i += 1; } else if(quoteCloseChar != 0){ //(case: in quotes) if(chars[i] == quoteCloseChar){ quoteCloseChar = (char) 0; }else{ current.append(chars[i]); } }else{ //(case: normal) if(chars[i] == '"'){ quoteCloseChar = '"'; } else if(chars[i] == '\''){ quoteCloseChar = '\''; } else if(chars[i] == ','){ //break terms.add(current); current = new StringBuilder(); }else{ current.append(chars[i]); } } } //--Return if(current.length() > 0) terms.add(current); String[] rtn = new String[terms.size()]; int i=0; for(StringBuilder b : terms){ rtn[i] = b.toString().trim(); i += 1; } return rtn; }
java
private static final String[] decodeArray(String encoded){ char[] chars = encoded.trim().toCharArray(); //--Parse the String //(state) char quoteCloseChar = (char) 0; List<StringBuilder> terms = new LinkedList<StringBuilder>(); StringBuilder current = new StringBuilder(); //(start/stop overhead) int start = 0; int end = chars.length; if(chars[0] == '('){ start += 1; end -= 1; if(chars[end] != ')') throw new IllegalArgumentException("Unclosed paren in encoded array: " + encoded); } if(chars[0] == '['){ start += 1; end -= 1; if(chars[end] != ']') throw new IllegalArgumentException("Unclosed bracket in encoded array: " + encoded); } //(finite state automata) for(int i=start; i<end; i++){ if(chars[i] == '\\'){ //(case: escaped character) if(i == chars.length - 1) throw new IllegalArgumentException("Last character of encoded pair is escape character: " + encoded); current.append(chars[i+1]); i += 1; } else if(quoteCloseChar != 0){ //(case: in quotes) if(chars[i] == quoteCloseChar){ quoteCloseChar = (char) 0; }else{ current.append(chars[i]); } }else{ //(case: normal) if(chars[i] == '"'){ quoteCloseChar = '"'; } else if(chars[i] == '\''){ quoteCloseChar = '\''; } else if(chars[i] == ','){ //break terms.add(current); current = new StringBuilder(); }else{ current.append(chars[i]); } } } //--Return if(current.length() > 0) terms.add(current); String[] rtn = new String[terms.size()]; int i=0; for(StringBuilder b : terms){ rtn[i] = b.toString().trim(); i += 1; } return rtn; }
[ "private", "static", "final", "String", "[", "]", "decodeArray", "(", "String", "encoded", ")", "{", "char", "[", "]", "chars", "=", "encoded", ".", "trim", "(", ")", ".", "toCharArray", "(", ")", ";", "//--Parse the String\r", "//(state)\r", "char", "quoteCloseChar", "=", "(", "char", ")", "0", ";", "List", "<", "StringBuilder", ">", "terms", "=", "new", "LinkedList", "<", "StringBuilder", ">", "(", ")", ";", "StringBuilder", "current", "=", "new", "StringBuilder", "(", ")", ";", "//(start/stop overhead)\r", "int", "start", "=", "0", ";", "int", "end", "=", "chars", ".", "length", ";", "if", "(", "chars", "[", "0", "]", "==", "'", "'", ")", "{", "start", "+=", "1", ";", "end", "-=", "1", ";", "if", "(", "chars", "[", "end", "]", "!=", "'", "'", ")", "throw", "new", "IllegalArgumentException", "(", "\"Unclosed paren in encoded array: \"", "+", "encoded", ")", ";", "}", "if", "(", "chars", "[", "0", "]", "==", "'", "'", ")", "{", "start", "+=", "1", ";", "end", "-=", "1", ";", "if", "(", "chars", "[", "end", "]", "!=", "'", "'", ")", "throw", "new", "IllegalArgumentException", "(", "\"Unclosed bracket in encoded array: \"", "+", "encoded", ")", ";", "}", "//(finite state automata)\r", "for", "(", "int", "i", "=", "start", ";", "i", "<", "end", ";", "i", "++", ")", "{", "if", "(", "chars", "[", "i", "]", "==", "'", "'", ")", "{", "//(case: escaped character)\r", "if", "(", "i", "==", "chars", ".", "length", "-", "1", ")", "throw", "new", "IllegalArgumentException", "(", "\"Last character of encoded pair is escape character: \"", "+", "encoded", ")", ";", "current", ".", "append", "(", "chars", "[", "i", "+", "1", "]", ")", ";", "i", "+=", "1", ";", "}", "else", "if", "(", "quoteCloseChar", "!=", "0", ")", "{", "//(case: in quotes)\r", "if", "(", "chars", "[", "i", "]", "==", "quoteCloseChar", ")", "{", "quoteCloseChar", "=", "(", "char", ")", "0", ";", "}", "else", "{", "current", ".", "append", "(", "chars", "[", "i", "]", ")", ";", "}", "}", "else", "{", "//(case: normal)\r", "if", "(", "chars", "[", "i", "]", "==", "'", "'", ")", "{", "quoteCloseChar", "=", "'", "'", ";", "}", "else", "if", "(", "chars", "[", "i", "]", "==", "'", "'", ")", "{", "quoteCloseChar", "=", "'", "'", ";", "}", "else", "if", "(", "chars", "[", "i", "]", "==", "'", "'", ")", "{", "//break\r", "terms", ".", "add", "(", "current", ")", ";", "current", "=", "new", "StringBuilder", "(", ")", ";", "}", "else", "{", "current", ".", "append", "(", "chars", "[", "i", "]", ")", ";", "}", "}", "}", "//--Return\r", "if", "(", "current", ".", "length", "(", ")", ">", "0", ")", "terms", ".", "add", "(", "current", ")", ";", "String", "[", "]", "rtn", "=", "new", "String", "[", "terms", ".", "size", "(", ")", "]", ";", "int", "i", "=", "0", ";", "for", "(", "StringBuilder", "b", ":", "terms", ")", "{", "rtn", "[", "i", "]", "=", "b", ".", "toString", "(", ")", ".", "trim", "(", ")", ";", "i", "+=", "1", ";", "}", "return", "rtn", ";", "}" ]
Decode an array encoded as a String. This entails a comma separated value enclosed in brackets or parentheses @param encoded The String encoded array @return A String array corresponding to the encoded array
[ "Decode", "an", "array", "encoded", "as", "a", "String", ".", "This", "entails", "a", "comma", "separated", "value", "enclosed", "in", "brackets", "or", "parentheses" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/MetaClass.java#L472-L521
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/linkset_binding.java
linkset_binding.get
public static linkset_binding get(nitro_service service, String id) throws Exception{ linkset_binding obj = new linkset_binding(); obj.set_id(id); linkset_binding response = (linkset_binding) obj.get_resource(service); return response; }
java
public static linkset_binding get(nitro_service service, String id) throws Exception{ linkset_binding obj = new linkset_binding(); obj.set_id(id); linkset_binding response = (linkset_binding) obj.get_resource(service); return response; }
[ "public", "static", "linkset_binding", "get", "(", "nitro_service", "service", ",", "String", "id", ")", "throws", "Exception", "{", "linkset_binding", "obj", "=", "new", "linkset_binding", "(", ")", ";", "obj", ".", "set_id", "(", "id", ")", ";", "linkset_binding", "response", "=", "(", "linkset_binding", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch linkset_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "linkset_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/linkset_binding.java#L114-L119
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslfipssimtarget.java
sslfipssimtarget.enable
public static base_response enable(nitro_service client, sslfipssimtarget resource) throws Exception { sslfipssimtarget enableresource = new sslfipssimtarget(); enableresource.keyvector = resource.keyvector; enableresource.sourcesecret = resource.sourcesecret; return enableresource.perform_operation(client,"enable"); }
java
public static base_response enable(nitro_service client, sslfipssimtarget resource) throws Exception { sslfipssimtarget enableresource = new sslfipssimtarget(); enableresource.keyvector = resource.keyvector; enableresource.sourcesecret = resource.sourcesecret; return enableresource.perform_operation(client,"enable"); }
[ "public", "static", "base_response", "enable", "(", "nitro_service", "client", ",", "sslfipssimtarget", "resource", ")", "throws", "Exception", "{", "sslfipssimtarget", "enableresource", "=", "new", "sslfipssimtarget", "(", ")", ";", "enableresource", ".", "keyvector", "=", "resource", ".", "keyvector", ";", "enableresource", ".", "sourcesecret", "=", "resource", ".", "sourcesecret", ";", "return", "enableresource", ".", "perform_operation", "(", "client", ",", "\"enable\"", ")", ";", "}" ]
Use this API to enable sslfipssimtarget.
[ "Use", "this", "API", "to", "enable", "sslfipssimtarget", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslfipssimtarget.java#L151-L156
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslfipssimtarget.java
sslfipssimtarget.init
public static base_response init(nitro_service client, sslfipssimtarget resource) throws Exception { sslfipssimtarget initresource = new sslfipssimtarget(); initresource.certfile = resource.certfile; initresource.keyvector = resource.keyvector; initresource.targetsecret = resource.targetsecret; return initresource.perform_operation(client,"init"); }
java
public static base_response init(nitro_service client, sslfipssimtarget resource) throws Exception { sslfipssimtarget initresource = new sslfipssimtarget(); initresource.certfile = resource.certfile; initresource.keyvector = resource.keyvector; initresource.targetsecret = resource.targetsecret; return initresource.perform_operation(client,"init"); }
[ "public", "static", "base_response", "init", "(", "nitro_service", "client", ",", "sslfipssimtarget", "resource", ")", "throws", "Exception", "{", "sslfipssimtarget", "initresource", "=", "new", "sslfipssimtarget", "(", ")", ";", "initresource", ".", "certfile", "=", "resource", ".", "certfile", ";", "initresource", ".", "keyvector", "=", "resource", ".", "keyvector", ";", "initresource", ".", "targetsecret", "=", "resource", ".", "targetsecret", ";", "return", "initresource", ".", "perform_operation", "(", "client", ",", "\"init\"", ")", ";", "}" ]
Use this API to init sslfipssimtarget.
[ "Use", "this", "API", "to", "init", "sslfipssimtarget", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslfipssimtarget.java#L161-L167
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicy_stats.java
rewritepolicy_stats.get
public static rewritepolicy_stats[] get(nitro_service service, options option) throws Exception{ rewritepolicy_stats obj = new rewritepolicy_stats(); rewritepolicy_stats[] response = (rewritepolicy_stats[])obj.stat_resources(service,option); return response; }
java
public static rewritepolicy_stats[] get(nitro_service service, options option) throws Exception{ rewritepolicy_stats obj = new rewritepolicy_stats(); rewritepolicy_stats[] response = (rewritepolicy_stats[])obj.stat_resources(service,option); return response; }
[ "public", "static", "rewritepolicy_stats", "[", "]", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "rewritepolicy_stats", "obj", "=", "new", "rewritepolicy_stats", "(", ")", ";", "rewritepolicy_stats", "[", "]", "response", "=", "(", "rewritepolicy_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch the statistics of all rewritepolicy_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "rewritepolicy_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicy_stats.java#L160-L164
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicy_stats.java
rewritepolicy_stats.get
public static rewritepolicy_stats get(nitro_service service, String name) throws Exception{ rewritepolicy_stats obj = new rewritepolicy_stats(); obj.set_name(name); rewritepolicy_stats response = (rewritepolicy_stats) obj.stat_resource(service); return response; }
java
public static rewritepolicy_stats get(nitro_service service, String name) throws Exception{ rewritepolicy_stats obj = new rewritepolicy_stats(); obj.set_name(name); rewritepolicy_stats response = (rewritepolicy_stats) obj.stat_resource(service); return response; }
[ "public", "static", "rewritepolicy_stats", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "rewritepolicy_stats", "obj", "=", "new", "rewritepolicy_stats", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "rewritepolicy_stats", "response", "=", "(", "rewritepolicy_stats", ")", "obj", ".", "stat_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch statistics of rewritepolicy_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "rewritepolicy_stats", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicy_stats.java#L169-L174
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/rewrite/rewritepolicylabel_binding.java
rewritepolicylabel_binding.get
public static rewritepolicylabel_binding get(nitro_service service, String labelname) throws Exception{ rewritepolicylabel_binding obj = new rewritepolicylabel_binding(); obj.set_labelname(labelname); rewritepolicylabel_binding response = (rewritepolicylabel_binding) obj.get_resource(service); return response; }
java
public static rewritepolicylabel_binding get(nitro_service service, String labelname) throws Exception{ rewritepolicylabel_binding obj = new rewritepolicylabel_binding(); obj.set_labelname(labelname); rewritepolicylabel_binding response = (rewritepolicylabel_binding) obj.get_resource(service); return response; }
[ "public", "static", "rewritepolicylabel_binding", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "rewritepolicylabel_binding", "obj", "=", "new", "rewritepolicylabel_binding", "(", ")", ";", "obj", ".", "set_labelname", "(", "labelname", ")", ";", "rewritepolicylabel_binding", "response", "=", "(", "rewritepolicylabel_binding", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch rewritepolicylabel_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "rewritepolicylabel_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/rewrite/rewritepolicylabel_binding.java#L114-L119
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmsessionpolicy_authenticationvserver_binding.java
tmsessionpolicy_authenticationvserver_binding.get
public static tmsessionpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ tmsessionpolicy_authenticationvserver_binding obj = new tmsessionpolicy_authenticationvserver_binding(); obj.set_name(name); tmsessionpolicy_authenticationvserver_binding response[] = (tmsessionpolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
java
public static tmsessionpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ tmsessionpolicy_authenticationvserver_binding obj = new tmsessionpolicy_authenticationvserver_binding(); obj.set_name(name); tmsessionpolicy_authenticationvserver_binding response[] = (tmsessionpolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "tmsessionpolicy_authenticationvserver_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "tmsessionpolicy_authenticationvserver_binding", "obj", "=", "new", "tmsessionpolicy_authenticationvserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "tmsessionpolicy_authenticationvserver_binding", "response", "[", "]", "=", "(", "tmsessionpolicy_authenticationvserver_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch tmsessionpolicy_authenticationvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "tmsessionpolicy_authenticationvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmsessionpolicy_authenticationvserver_binding.java#L132-L137
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_authenticationsamlpolicy_binding.java
authenticationvserver_authenticationsamlpolicy_binding.get
public static authenticationvserver_authenticationsamlpolicy_binding[] get(nitro_service service, String name) throws Exception{ authenticationvserver_authenticationsamlpolicy_binding obj = new authenticationvserver_authenticationsamlpolicy_binding(); obj.set_name(name); authenticationvserver_authenticationsamlpolicy_binding response[] = (authenticationvserver_authenticationsamlpolicy_binding[]) obj.get_resources(service); return response; }
java
public static authenticationvserver_authenticationsamlpolicy_binding[] get(nitro_service service, String name) throws Exception{ authenticationvserver_authenticationsamlpolicy_binding obj = new authenticationvserver_authenticationsamlpolicy_binding(); obj.set_name(name); authenticationvserver_authenticationsamlpolicy_binding response[] = (authenticationvserver_authenticationsamlpolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "authenticationvserver_authenticationsamlpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authenticationvserver_authenticationsamlpolicy_binding", "obj", "=", "new", "authenticationvserver_authenticationsamlpolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "authenticationvserver_authenticationsamlpolicy_binding", "response", "[", "]", "=", "(", "authenticationvserver_authenticationsamlpolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch authenticationvserver_authenticationsamlpolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "authenticationvserver_authenticationsamlpolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_authenticationsamlpolicy_binding.java#L264-L269
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java
hanode.add
public static base_response add(nitro_service client, hanode resource) throws Exception { hanode addresource = new hanode(); addresource.id = resource.id; addresource.ipaddress = resource.ipaddress; addresource.inc = resource.inc; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, hanode resource) throws Exception { hanode addresource = new hanode(); addresource.id = resource.id; addresource.ipaddress = resource.ipaddress; addresource.inc = resource.inc; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "hanode", "resource", ")", "throws", "Exception", "{", "hanode", "addresource", "=", "new", "hanode", "(", ")", ";", "addresource", ".", "id", "=", "resource", ".", "id", ";", "addresource", ".", "ipaddress", "=", "resource", ".", "ipaddress", ";", "addresource", ".", "inc", "=", "resource", ".", "inc", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add hanode.
[ "Use", "this", "API", "to", "add", "hanode", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java#L524-L530
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java
hanode.add
public static base_responses add(nitro_service client, hanode resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { hanode addresources[] = new hanode[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new hanode(); addresources[i].id = resources[i].id; addresources[i].ipaddress = resources[i].ipaddress; addresources[i].inc = resources[i].inc; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, hanode resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { hanode addresources[] = new hanode[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new hanode(); addresources[i].id = resources[i].id; addresources[i].ipaddress = resources[i].ipaddress; addresources[i].inc = resources[i].inc; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "hanode", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "hanode", "addresources", "[", "]", "=", "new", "hanode", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "hanode", "(", ")", ";", "addresources", "[", "i", "]", ".", "id", "=", "resources", "[", "i", "]", ".", "id", ";", "addresources", "[", "i", "]", ".", "ipaddress", "=", "resources", "[", "i", "]", ".", "ipaddress", ";", "addresources", "[", "i", "]", ".", "inc", "=", "resources", "[", "i", "]", ".", "inc", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add hanode resources.
[ "Use", "this", "API", "to", "add", "hanode", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java#L535-L548
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java
hanode.update
public static base_response update(nitro_service client, hanode resource) throws Exception { hanode updateresource = new hanode(); updateresource.id = resource.id; updateresource.hastatus = resource.hastatus; updateresource.hasync = resource.hasync; updateresource.haprop = resource.haprop; updateresource.hellointerval = resource.hellointerval; updateresource.deadinterval = resource.deadinterval; updateresource.failsafe = resource.failsafe; updateresource.maxflips = resource.maxflips; updateresource.maxfliptime = resource.maxfliptime; updateresource.syncvlan = resource.syncvlan; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, hanode resource) throws Exception { hanode updateresource = new hanode(); updateresource.id = resource.id; updateresource.hastatus = resource.hastatus; updateresource.hasync = resource.hasync; updateresource.haprop = resource.haprop; updateresource.hellointerval = resource.hellointerval; updateresource.deadinterval = resource.deadinterval; updateresource.failsafe = resource.failsafe; updateresource.maxflips = resource.maxflips; updateresource.maxfliptime = resource.maxfliptime; updateresource.syncvlan = resource.syncvlan; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "hanode", "resource", ")", "throws", "Exception", "{", "hanode", "updateresource", "=", "new", "hanode", "(", ")", ";", "updateresource", ".", "id", "=", "resource", ".", "id", ";", "updateresource", ".", "hastatus", "=", "resource", ".", "hastatus", ";", "updateresource", ".", "hasync", "=", "resource", ".", "hasync", ";", "updateresource", ".", "haprop", "=", "resource", ".", "haprop", ";", "updateresource", ".", "hellointerval", "=", "resource", ".", "hellointerval", ";", "updateresource", ".", "deadinterval", "=", "resource", ".", "deadinterval", ";", "updateresource", ".", "failsafe", "=", "resource", ".", "failsafe", ";", "updateresource", ".", "maxflips", "=", "resource", ".", "maxflips", ";", "updateresource", ".", "maxfliptime", "=", "resource", ".", "maxfliptime", ";", "updateresource", ".", "syncvlan", "=", "resource", ".", "syncvlan", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update hanode.
[ "Use", "this", "API", "to", "update", "hanode", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java#L603-L616
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java
hanode.update
public static base_responses update(nitro_service client, hanode resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { hanode updateresources[] = new hanode[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new hanode(); updateresources[i].id = resources[i].id; updateresources[i].hastatus = resources[i].hastatus; updateresources[i].hasync = resources[i].hasync; updateresources[i].haprop = resources[i].haprop; updateresources[i].hellointerval = resources[i].hellointerval; updateresources[i].deadinterval = resources[i].deadinterval; updateresources[i].failsafe = resources[i].failsafe; updateresources[i].maxflips = resources[i].maxflips; updateresources[i].maxfliptime = resources[i].maxfliptime; updateresources[i].syncvlan = resources[i].syncvlan; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, hanode resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { hanode updateresources[] = new hanode[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new hanode(); updateresources[i].id = resources[i].id; updateresources[i].hastatus = resources[i].hastatus; updateresources[i].hasync = resources[i].hasync; updateresources[i].haprop = resources[i].haprop; updateresources[i].hellointerval = resources[i].hellointerval; updateresources[i].deadinterval = resources[i].deadinterval; updateresources[i].failsafe = resources[i].failsafe; updateresources[i].maxflips = resources[i].maxflips; updateresources[i].maxfliptime = resources[i].maxfliptime; updateresources[i].syncvlan = resources[i].syncvlan; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "hanode", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "hanode", "updateresources", "[", "]", "=", "new", "hanode", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "hanode", "(", ")", ";", "updateresources", "[", "i", "]", ".", "id", "=", "resources", "[", "i", "]", ".", "id", ";", "updateresources", "[", "i", "]", ".", "hastatus", "=", "resources", "[", "i", "]", ".", "hastatus", ";", "updateresources", "[", "i", "]", ".", "hasync", "=", "resources", "[", "i", "]", ".", "hasync", ";", "updateresources", "[", "i", "]", ".", "haprop", "=", "resources", "[", "i", "]", ".", "haprop", ";", "updateresources", "[", "i", "]", ".", "hellointerval", "=", "resources", "[", "i", "]", ".", "hellointerval", ";", "updateresources", "[", "i", "]", ".", "deadinterval", "=", "resources", "[", "i", "]", ".", "deadinterval", ";", "updateresources", "[", "i", "]", ".", "failsafe", "=", "resources", "[", "i", "]", ".", "failsafe", ";", "updateresources", "[", "i", "]", ".", "maxflips", "=", "resources", "[", "i", "]", ".", "maxflips", ";", "updateresources", "[", "i", "]", ".", "maxfliptime", "=", "resources", "[", "i", "]", ".", "maxfliptime", ";", "updateresources", "[", "i", "]", ".", "syncvlan", "=", "resources", "[", "i", "]", ".", "syncvlan", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update hanode resources.
[ "Use", "this", "API", "to", "update", "hanode", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java#L621-L641
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java
hanode.unset
public static base_responses unset(nitro_service client, hanode resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { hanode unsetresources[] = new hanode[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new hanode(); unsetresources[i].id = resources[i].id; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
public static base_responses unset(nitro_service client, hanode resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { hanode unsetresources[] = new hanode[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new hanode(); unsetresources[i].id = resources[i].id; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "public", "static", "base_responses", "unset", "(", "nitro_service", "client", ",", "hanode", "resources", "[", "]", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "hanode", "unsetresources", "[", "]", "=", "new", "hanode", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "unsetresources", "[", "i", "]", "=", "new", "hanode", "(", ")", ";", "unsetresources", "[", "i", "]", ".", "id", "=", "resources", "[", "i", "]", ".", "id", ";", "}", "result", "=", "unset_bulk_request", "(", "client", ",", "unsetresources", ",", "args", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to unset the properties of hanode resources. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "hanode", "resources", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java#L674-L685
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java
hanode.get
public static hanode[] get(nitro_service service) throws Exception{ hanode obj = new hanode(); hanode[] response = (hanode[])obj.get_resources(service); return response; }
java
public static hanode[] get(nitro_service service) throws Exception{ hanode obj = new hanode(); hanode[] response = (hanode[])obj.get_resources(service); return response; }
[ "public", "static", "hanode", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "hanode", "obj", "=", "new", "hanode", "(", ")", ";", "hanode", "[", "]", "response", "=", "(", "hanode", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the hanode resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "hanode", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java#L690-L694
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java
hanode.get
public static hanode get(nitro_service service, Long id) throws Exception{ hanode obj = new hanode(); obj.set_id(id); hanode response = (hanode) obj.get_resource(service); return response; }
java
public static hanode get(nitro_service service, Long id) throws Exception{ hanode obj = new hanode(); obj.set_id(id); hanode response = (hanode) obj.get_resource(service); return response; }
[ "public", "static", "hanode", "get", "(", "nitro_service", "service", ",", "Long", "id", ")", "throws", "Exception", "{", "hanode", "obj", "=", "new", "hanode", "(", ")", ";", "obj", ".", "set_id", "(", "id", ")", ";", "hanode", "response", "=", "(", "hanode", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch hanode resource of given name .
[ "Use", "this", "API", "to", "fetch", "hanode", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java#L706-L711
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java
hanode.get
public static hanode[] get(nitro_service service, Long id[]) throws Exception{ if (id !=null && id.length>0) { hanode response[] = new hanode[id.length]; hanode obj[] = new hanode[id.length]; for (int i=0;i<id.length;i++) { obj[i] = new hanode(); obj[i].set_id(id[i]); response[i] = (hanode) obj[i].get_resource(service); } return response; } return null; }
java
public static hanode[] get(nitro_service service, Long id[]) throws Exception{ if (id !=null && id.length>0) { hanode response[] = new hanode[id.length]; hanode obj[] = new hanode[id.length]; for (int i=0;i<id.length;i++) { obj[i] = new hanode(); obj[i].set_id(id[i]); response[i] = (hanode) obj[i].get_resource(service); } return response; } return null; }
[ "public", "static", "hanode", "[", "]", "get", "(", "nitro_service", "service", ",", "Long", "id", "[", "]", ")", "throws", "Exception", "{", "if", "(", "id", "!=", "null", "&&", "id", ".", "length", ">", "0", ")", "{", "hanode", "response", "[", "]", "=", "new", "hanode", "[", "id", ".", "length", "]", ";", "hanode", "obj", "[", "]", "=", "new", "hanode", "[", "id", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "id", ".", "length", ";", "i", "++", ")", "{", "obj", "[", "i", "]", "=", "new", "hanode", "(", ")", ";", "obj", "[", "i", "]", ".", "set_id", "(", "id", "[", "i", "]", ")", ";", "response", "[", "i", "]", "=", "(", "hanode", ")", "obj", "[", "i", "]", ".", "get_resource", "(", "service", ")", ";", "}", "return", "response", ";", "}", "return", "null", ";", "}" ]
Use this API to fetch hanode resources of given names .
[ "Use", "this", "API", "to", "fetch", "hanode", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hanode.java#L716-L728
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaaradiusparams.java
aaaradiusparams.update
public static base_response update(nitro_service client, aaaradiusparams resource) throws Exception { aaaradiusparams updateresource = new aaaradiusparams(); updateresource.serverip = resource.serverip; updateresource.serverport = resource.serverport; updateresource.authtimeout = resource.authtimeout; updateresource.radkey = resource.radkey; updateresource.radnasip = resource.radnasip; updateresource.radnasid = resource.radnasid; updateresource.radvendorid = resource.radvendorid; updateresource.radattributetype = resource.radattributetype; updateresource.radgroupsprefix = resource.radgroupsprefix; updateresource.radgroupseparator = resource.radgroupseparator; updateresource.passencoding = resource.passencoding; updateresource.ipvendorid = resource.ipvendorid; updateresource.ipattributetype = resource.ipattributetype; updateresource.accounting = resource.accounting; updateresource.pwdvendorid = resource.pwdvendorid; updateresource.pwdattributetype = resource.pwdattributetype; updateresource.defaultauthenticationgroup = resource.defaultauthenticationgroup; updateresource.callingstationid = resource.callingstationid; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, aaaradiusparams resource) throws Exception { aaaradiusparams updateresource = new aaaradiusparams(); updateresource.serverip = resource.serverip; updateresource.serverport = resource.serverport; updateresource.authtimeout = resource.authtimeout; updateresource.radkey = resource.radkey; updateresource.radnasip = resource.radnasip; updateresource.radnasid = resource.radnasid; updateresource.radvendorid = resource.radvendorid; updateresource.radattributetype = resource.radattributetype; updateresource.radgroupsprefix = resource.radgroupsprefix; updateresource.radgroupseparator = resource.radgroupseparator; updateresource.passencoding = resource.passencoding; updateresource.ipvendorid = resource.ipvendorid; updateresource.ipattributetype = resource.ipattributetype; updateresource.accounting = resource.accounting; updateresource.pwdvendorid = resource.pwdvendorid; updateresource.pwdattributetype = resource.pwdattributetype; updateresource.defaultauthenticationgroup = resource.defaultauthenticationgroup; updateresource.callingstationid = resource.callingstationid; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "aaaradiusparams", "resource", ")", "throws", "Exception", "{", "aaaradiusparams", "updateresource", "=", "new", "aaaradiusparams", "(", ")", ";", "updateresource", ".", "serverip", "=", "resource", ".", "serverip", ";", "updateresource", ".", "serverport", "=", "resource", ".", "serverport", ";", "updateresource", ".", "authtimeout", "=", "resource", ".", "authtimeout", ";", "updateresource", ".", "radkey", "=", "resource", ".", "radkey", ";", "updateresource", ".", "radnasip", "=", "resource", ".", "radnasip", ";", "updateresource", ".", "radnasid", "=", "resource", ".", "radnasid", ";", "updateresource", ".", "radvendorid", "=", "resource", ".", "radvendorid", ";", "updateresource", ".", "radattributetype", "=", "resource", ".", "radattributetype", ";", "updateresource", ".", "radgroupsprefix", "=", "resource", ".", "radgroupsprefix", ";", "updateresource", ".", "radgroupseparator", "=", "resource", ".", "radgroupseparator", ";", "updateresource", ".", "passencoding", "=", "resource", ".", "passencoding", ";", "updateresource", ".", "ipvendorid", "=", "resource", ".", "ipvendorid", ";", "updateresource", ".", "ipattributetype", "=", "resource", ".", "ipattributetype", ";", "updateresource", ".", "accounting", "=", "resource", ".", "accounting", ";", "updateresource", ".", "pwdvendorid", "=", "resource", ".", "pwdvendorid", ";", "updateresource", ".", "pwdattributetype", "=", "resource", ".", "pwdattributetype", ";", "updateresource", ".", "defaultauthenticationgroup", "=", "resource", ".", "defaultauthenticationgroup", ";", "updateresource", ".", "callingstationid", "=", "resource", ".", "callingstationid", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update aaaradiusparams.
[ "Use", "this", "API", "to", "update", "aaaradiusparams", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaaradiusparams.java#L523-L544
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaaradiusparams.java
aaaradiusparams.unset
public static base_response unset(nitro_service client, aaaradiusparams resource, String[] args) throws Exception{ aaaradiusparams unsetresource = new aaaradiusparams(); return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, aaaradiusparams resource, String[] args) throws Exception{ aaaradiusparams unsetresource = new aaaradiusparams(); return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "aaaradiusparams", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "aaaradiusparams", "unsetresource", "=", "new", "aaaradiusparams", "(", ")", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of aaaradiusparams resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "aaaradiusparams", "resource", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaaradiusparams.java#L550-L553
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaaradiusparams.java
aaaradiusparams.get
public static aaaradiusparams get(nitro_service service) throws Exception{ aaaradiusparams obj = new aaaradiusparams(); aaaradiusparams[] response = (aaaradiusparams[])obj.get_resources(service); return response[0]; }
java
public static aaaradiusparams get(nitro_service service) throws Exception{ aaaradiusparams obj = new aaaradiusparams(); aaaradiusparams[] response = (aaaradiusparams[])obj.get_resources(service); return response[0]; }
[ "public", "static", "aaaradiusparams", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "aaaradiusparams", "obj", "=", "new", "aaaradiusparams", "(", ")", ";", "aaaradiusparams", "[", "]", "response", "=", "(", "aaaradiusparams", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the aaaradiusparams resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "aaaradiusparams", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaaradiusparams.java#L558-L562
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nssurgeq.java
nssurgeq.flush
public static base_response flush(nitro_service client, nssurgeq resource) throws Exception { nssurgeq flushresource = new nssurgeq(); flushresource.name = resource.name; flushresource.servername = resource.servername; flushresource.port = resource.port; return flushresource.perform_operation(client,"flush"); }
java
public static base_response flush(nitro_service client, nssurgeq resource) throws Exception { nssurgeq flushresource = new nssurgeq(); flushresource.name = resource.name; flushresource.servername = resource.servername; flushresource.port = resource.port; return flushresource.perform_operation(client,"flush"); }
[ "public", "static", "base_response", "flush", "(", "nitro_service", "client", ",", "nssurgeq", "resource", ")", "throws", "Exception", "{", "nssurgeq", "flushresource", "=", "new", "nssurgeq", "(", ")", ";", "flushresource", ".", "name", "=", "resource", ".", "name", ";", "flushresource", ".", "servername", "=", "resource", ".", "servername", ";", "flushresource", ".", "port", "=", "resource", ".", "port", ";", "return", "flushresource", ".", "perform_operation", "(", "client", ",", "\"flush\"", ")", ";", "}" ]
Use this API to flush nssurgeq.
[ "Use", "this", "API", "to", "flush", "nssurgeq", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nssurgeq.java#L141-L147
train
meertensinstituut/mtas
src/main/java/mtas/codec/MtasCodecPostingsFormat.java
MtasCodecPostingsFormat.getToken
public static MtasTokenString getToken(IndexInput inObject, IndexInput inTerm, Long ref) throws IOException { MtasTokenString token = null; try { inObject.seek(ref); token = new MtasTokenString(null, ""); token.setId(inObject.readVInt()); token.setTokenRef(ref); int objectFlags = inObject.readVInt(); int[] positions = null; if ((objectFlags & MTAS_OBJECT_HAS_PARENT) == MTAS_OBJECT_HAS_PARENT) { int parentId = inObject.readVInt(); token.setParentId(parentId); } if ((objectFlags & MTAS_OBJECT_HAS_POSITION_RANGE) == MTAS_OBJECT_HAS_POSITION_RANGE) { int positionStart = inObject.readVInt(); int positionEnd = positionStart + inObject.readVInt(); token.addPositionRange(positionStart, positionEnd); } else if ((objectFlags & MTAS_OBJECT_HAS_POSITION_SET) == MTAS_OBJECT_HAS_POSITION_SET) { int size = inObject.readVInt(); int tmpPrevious = 0; positions = new int[size]; for (int t = 0; t < size; t++) { int position = tmpPrevious + inObject.readVInt(); tmpPrevious = position; positions[t] = position; } token.addPositions(positions); } else { int position = inObject.readVInt(); token.addPosition(position); } if ((objectFlags & MTAS_OBJECT_HAS_OFFSET) == MTAS_OBJECT_HAS_OFFSET) { int offsetStart = inObject.readVInt(); int offsetEnd = offsetStart + inObject.readVInt(); token.setOffset(offsetStart, offsetEnd); } if ((objectFlags & MTAS_OBJECT_HAS_REALOFFSET) == MTAS_OBJECT_HAS_REALOFFSET) { int realOffsetStart = inObject.readVInt(); int realOffsetEnd = realOffsetStart + inObject.readVInt(); token.setRealOffset(realOffsetStart, realOffsetEnd); } if ((objectFlags & MTAS_OBJECT_HAS_PAYLOAD) == MTAS_OBJECT_HAS_PAYLOAD) { int length = inObject.readVInt(); byte[] mtasPayload = new byte[length]; inObject.readBytes(mtasPayload, 0, length); token.setPayload(new BytesRef(mtasPayload)); } Long termRef = inObject.readVLong(); inTerm.seek(termRef); token.setTermRef(termRef); token.setValue(inTerm.readString()); } catch (Exception e) { throw new IOException(e); } return token; }
java
public static MtasTokenString getToken(IndexInput inObject, IndexInput inTerm, Long ref) throws IOException { MtasTokenString token = null; try { inObject.seek(ref); token = new MtasTokenString(null, ""); token.setId(inObject.readVInt()); token.setTokenRef(ref); int objectFlags = inObject.readVInt(); int[] positions = null; if ((objectFlags & MTAS_OBJECT_HAS_PARENT) == MTAS_OBJECT_HAS_PARENT) { int parentId = inObject.readVInt(); token.setParentId(parentId); } if ((objectFlags & MTAS_OBJECT_HAS_POSITION_RANGE) == MTAS_OBJECT_HAS_POSITION_RANGE) { int positionStart = inObject.readVInt(); int positionEnd = positionStart + inObject.readVInt(); token.addPositionRange(positionStart, positionEnd); } else if ((objectFlags & MTAS_OBJECT_HAS_POSITION_SET) == MTAS_OBJECT_HAS_POSITION_SET) { int size = inObject.readVInt(); int tmpPrevious = 0; positions = new int[size]; for (int t = 0; t < size; t++) { int position = tmpPrevious + inObject.readVInt(); tmpPrevious = position; positions[t] = position; } token.addPositions(positions); } else { int position = inObject.readVInt(); token.addPosition(position); } if ((objectFlags & MTAS_OBJECT_HAS_OFFSET) == MTAS_OBJECT_HAS_OFFSET) { int offsetStart = inObject.readVInt(); int offsetEnd = offsetStart + inObject.readVInt(); token.setOffset(offsetStart, offsetEnd); } if ((objectFlags & MTAS_OBJECT_HAS_REALOFFSET) == MTAS_OBJECT_HAS_REALOFFSET) { int realOffsetStart = inObject.readVInt(); int realOffsetEnd = realOffsetStart + inObject.readVInt(); token.setRealOffset(realOffsetStart, realOffsetEnd); } if ((objectFlags & MTAS_OBJECT_HAS_PAYLOAD) == MTAS_OBJECT_HAS_PAYLOAD) { int length = inObject.readVInt(); byte[] mtasPayload = new byte[length]; inObject.readBytes(mtasPayload, 0, length); token.setPayload(new BytesRef(mtasPayload)); } Long termRef = inObject.readVLong(); inTerm.seek(termRef); token.setTermRef(termRef); token.setValue(inTerm.readString()); } catch (Exception e) { throw new IOException(e); } return token; }
[ "public", "static", "MtasTokenString", "getToken", "(", "IndexInput", "inObject", ",", "IndexInput", "inTerm", ",", "Long", "ref", ")", "throws", "IOException", "{", "MtasTokenString", "token", "=", "null", ";", "try", "{", "inObject", ".", "seek", "(", "ref", ")", ";", "token", "=", "new", "MtasTokenString", "(", "null", ",", "\"\"", ")", ";", "token", ".", "setId", "(", "inObject", ".", "readVInt", "(", ")", ")", ";", "token", ".", "setTokenRef", "(", "ref", ")", ";", "int", "objectFlags", "=", "inObject", ".", "readVInt", "(", ")", ";", "int", "[", "]", "positions", "=", "null", ";", "if", "(", "(", "objectFlags", "&", "MTAS_OBJECT_HAS_PARENT", ")", "==", "MTAS_OBJECT_HAS_PARENT", ")", "{", "int", "parentId", "=", "inObject", ".", "readVInt", "(", ")", ";", "token", ".", "setParentId", "(", "parentId", ")", ";", "}", "if", "(", "(", "objectFlags", "&", "MTAS_OBJECT_HAS_POSITION_RANGE", ")", "==", "MTAS_OBJECT_HAS_POSITION_RANGE", ")", "{", "int", "positionStart", "=", "inObject", ".", "readVInt", "(", ")", ";", "int", "positionEnd", "=", "positionStart", "+", "inObject", ".", "readVInt", "(", ")", ";", "token", ".", "addPositionRange", "(", "positionStart", ",", "positionEnd", ")", ";", "}", "else", "if", "(", "(", "objectFlags", "&", "MTAS_OBJECT_HAS_POSITION_SET", ")", "==", "MTAS_OBJECT_HAS_POSITION_SET", ")", "{", "int", "size", "=", "inObject", ".", "readVInt", "(", ")", ";", "int", "tmpPrevious", "=", "0", ";", "positions", "=", "new", "int", "[", "size", "]", ";", "for", "(", "int", "t", "=", "0", ";", "t", "<", "size", ";", "t", "++", ")", "{", "int", "position", "=", "tmpPrevious", "+", "inObject", ".", "readVInt", "(", ")", ";", "tmpPrevious", "=", "position", ";", "positions", "[", "t", "]", "=", "position", ";", "}", "token", ".", "addPositions", "(", "positions", ")", ";", "}", "else", "{", "int", "position", "=", "inObject", ".", "readVInt", "(", ")", ";", "token", ".", "addPosition", "(", "position", ")", ";", "}", "if", "(", "(", "objectFlags", "&", "MTAS_OBJECT_HAS_OFFSET", ")", "==", "MTAS_OBJECT_HAS_OFFSET", ")", "{", "int", "offsetStart", "=", "inObject", ".", "readVInt", "(", ")", ";", "int", "offsetEnd", "=", "offsetStart", "+", "inObject", ".", "readVInt", "(", ")", ";", "token", ".", "setOffset", "(", "offsetStart", ",", "offsetEnd", ")", ";", "}", "if", "(", "(", "objectFlags", "&", "MTAS_OBJECT_HAS_REALOFFSET", ")", "==", "MTAS_OBJECT_HAS_REALOFFSET", ")", "{", "int", "realOffsetStart", "=", "inObject", ".", "readVInt", "(", ")", ";", "int", "realOffsetEnd", "=", "realOffsetStart", "+", "inObject", ".", "readVInt", "(", ")", ";", "token", ".", "setRealOffset", "(", "realOffsetStart", ",", "realOffsetEnd", ")", ";", "}", "if", "(", "(", "objectFlags", "&", "MTAS_OBJECT_HAS_PAYLOAD", ")", "==", "MTAS_OBJECT_HAS_PAYLOAD", ")", "{", "int", "length", "=", "inObject", ".", "readVInt", "(", ")", ";", "byte", "[", "]", "mtasPayload", "=", "new", "byte", "[", "length", "]", ";", "inObject", ".", "readBytes", "(", "mtasPayload", ",", "0", ",", "length", ")", ";", "token", ".", "setPayload", "(", "new", "BytesRef", "(", "mtasPayload", ")", ")", ";", "}", "Long", "termRef", "=", "inObject", ".", "readVLong", "(", ")", ";", "inTerm", ".", "seek", "(", "termRef", ")", ";", "token", ".", "setTermRef", "(", "termRef", ")", ";", "token", ".", "setValue", "(", "inTerm", ".", "readString", "(", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "IOException", "(", "e", ")", ";", "}", "return", "token", ";", "}" ]
Gets the token. @param inObject the in object @param inTerm the in term @param ref the ref @return the token @throws IOException Signals that an I/O exception has occurred.
[ "Gets", "the", "token", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/MtasCodecPostingsFormat.java#L223-L282
train
meertensinstituut/mtas
src/main/java/mtas/codec/MtasCodecPostingsFormat.java
MtasCodecPostingsFormat.getTerm
public static String getTerm(IndexInput inTerm, Long ref) throws IOException { try { inTerm.seek(ref); return inTerm.readString(); } catch (Exception e) { throw new IOException(e); } }
java
public static String getTerm(IndexInput inTerm, Long ref) throws IOException { try { inTerm.seek(ref); return inTerm.readString(); } catch (Exception e) { throw new IOException(e); } }
[ "public", "static", "String", "getTerm", "(", "IndexInput", "inTerm", ",", "Long", "ref", ")", "throws", "IOException", "{", "try", "{", "inTerm", ".", "seek", "(", "ref", ")", ";", "return", "inTerm", ".", "readString", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "IOException", "(", "e", ")", ";", "}", "}" ]
Gets the term. @param inTerm the in term @param ref the ref @return the term @throws IOException Signals that an I/O exception has occurred.
[ "Gets", "the", "term", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/MtasCodecPostingsFormat.java#L292-L299
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/OutputHandler.java
OutputHandler.colorChannel
public void colorChannel(String channel, Color color){ if(this.channelColors == null){ this.channelColors = new HashMap<String,Color>(); } this.channelColors.put(channel.toLowerCase(),color); }
java
public void colorChannel(String channel, Color color){ if(this.channelColors == null){ this.channelColors = new HashMap<String,Color>(); } this.channelColors.put(channel.toLowerCase(),color); }
[ "public", "void", "colorChannel", "(", "String", "channel", ",", "Color", "color", ")", "{", "if", "(", "this", ".", "channelColors", "==", "null", ")", "{", "this", ".", "channelColors", "=", "new", "HashMap", "<", "String", ",", "Color", ">", "(", ")", ";", "}", "this", ".", "channelColors", ".", "put", "(", "channel", ".", "toLowerCase", "(", ")", ",", "color", ")", ";", "}" ]
Color the tag for a particular channel this color @param channel The channel to color @param color The color to use
[ "Color", "the", "tag", "for", "a", "particular", "channel", "this", "color" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/OutputHandler.java#L81-L86
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/OutputHandler.java
OutputHandler.styleChannel
public void styleChannel(String channel, Style style){ if(this.channelStyles == null){ this.channelStyles = new HashMap<String,Style>(); } this.channelStyles.put(channel.toLowerCase(),style); }
java
public void styleChannel(String channel, Style style){ if(this.channelStyles == null){ this.channelStyles = new HashMap<String,Style>(); } this.channelStyles.put(channel.toLowerCase(),style); }
[ "public", "void", "styleChannel", "(", "String", "channel", ",", "Style", "style", ")", "{", "if", "(", "this", ".", "channelStyles", "==", "null", ")", "{", "this", ".", "channelStyles", "=", "new", "HashMap", "<", "String", ",", "Style", ">", "(", ")", ";", "}", "this", ".", "channelStyles", ".", "put", "(", "channel", ".", "toLowerCase", "(", ")", ",", "style", ")", ";", "}" ]
Style the tag for a particular channel this style @param channel The channel to style @param style The style to use
[ "Style", "the", "tag", "for", "a", "particular", "channel", "this", "style" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/OutputHandler.java#L93-L98
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/OutputHandler.java
OutputHandler.style
protected StringBuilder style(StringBuilder b, String line, Color color, Style style){ if(color != Color.NONE || style != Style.NONE){ b.append(color.ansiCode); b.append(style.ansiCode); b.append(line); b.append("\033[0m"); } else { b.append(line); } return b; }
java
protected StringBuilder style(StringBuilder b, String line, Color color, Style style){ if(color != Color.NONE || style != Style.NONE){ b.append(color.ansiCode); b.append(style.ansiCode); b.append(line); b.append("\033[0m"); } else { b.append(line); } return b; }
[ "protected", "StringBuilder", "style", "(", "StringBuilder", "b", ",", "String", "line", ",", "Color", "color", ",", "Style", "style", ")", "{", "if", "(", "color", "!=", "Color", ".", "NONE", "||", "style", "!=", "Style", ".", "NONE", ")", "{", "b", ".", "append", "(", "color", ".", "ansiCode", ")", ";", "b", ".", "append", "(", "style", ".", "ansiCode", ")", ";", "b", ".", "append", "(", "line", ")", ";", "b", ".", "append", "(", "\"\\033[0m\"", ")", ";", "}", "else", "{", "b", ".", "append", "(", "line", ")", ";", "}", "return", "b", ";", "}" ]
Style a particular String segment, according to a color and style @param b The string builder to append to (for efficiency) @param line The String to be wrapped @param color The color to color as @param style The style to use @return The SringBuilder b
[ "Style", "a", "particular", "String", "segment", "according", "to", "a", "color", "and", "style" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/OutputHandler.java#L113-L123
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/protocol/protocoltcp_stats.java
protocoltcp_stats.get
public static protocoltcp_stats get(nitro_service service) throws Exception{ protocoltcp_stats obj = new protocoltcp_stats(); protocoltcp_stats[] response = (protocoltcp_stats[])obj.stat_resources(service); return response[0]; }
java
public static protocoltcp_stats get(nitro_service service) throws Exception{ protocoltcp_stats obj = new protocoltcp_stats(); protocoltcp_stats[] response = (protocoltcp_stats[])obj.stat_resources(service); return response[0]; }
[ "public", "static", "protocoltcp_stats", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "protocoltcp_stats", "obj", "=", "new", "protocoltcp_stats", "(", ")", ";", "protocoltcp_stats", "[", "]", "response", "=", "(", "protocoltcp_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch the statistics of all protocoltcp_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "protocoltcp_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/protocol/protocoltcp_stats.java#L1564-L1568
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/responder/responderpolicy_lbvserver_binding.java
responderpolicy_lbvserver_binding.get
public static responderpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{ responderpolicy_lbvserver_binding obj = new responderpolicy_lbvserver_binding(); obj.set_name(name); responderpolicy_lbvserver_binding response[] = (responderpolicy_lbvserver_binding[]) obj.get_resources(service); return response; }
java
public static responderpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{ responderpolicy_lbvserver_binding obj = new responderpolicy_lbvserver_binding(); obj.set_name(name); responderpolicy_lbvserver_binding response[] = (responderpolicy_lbvserver_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "responderpolicy_lbvserver_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "responderpolicy_lbvserver_binding", "obj", "=", "new", "responderpolicy_lbvserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "responderpolicy_lbvserver_binding", "response", "[", "]", "=", "(", "responderpolicy_lbvserver_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch responderpolicy_lbvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "responderpolicy_lbvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/responder/responderpolicy_lbvserver_binding.java#L162-L167
train