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
sequence
docstring
stringlengths
3
16k
docstring_tokens
sequence
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute.java
lbroute.get
public static lbroute[] get(nitro_service service) throws Exception{ lbroute obj = new lbroute(); lbroute[] response = (lbroute[])obj.get_resources(service); return response; }
java
public static lbroute[] get(nitro_service service) throws Exception{ lbroute obj = new lbroute(); lbroute[] response = (lbroute[])obj.get_resources(service); return response; }
[ "public", "static", "lbroute", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "lbroute", "obj", "=", "new", "lbroute", "(", ")", ";", "lbroute", "[", "]", "response", "=", "(", "lbroute", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the lbroute resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "lbroute", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute.java#L225-L229
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java
nsip6.add
public static base_response add(nitro_service client, nsip6 resource) throws Exception { nsip6 addresource = new nsip6(); addresource.ipv6address = resource.ipv6address; addresource.scope = resource.scope; addresource.type = resource.type; addresource.vlan = resource.vlan; addresource.nd = resource.nd; addresource.icmp = resource.icmp; addresource.vserver = resource.vserver; addresource.telnet = resource.telnet; addresource.ftp = resource.ftp; addresource.gui = resource.gui; addresource.ssh = resource.ssh; addresource.snmp = resource.snmp; addresource.mgmtaccess = resource.mgmtaccess; addresource.restrictaccess = resource.restrictaccess; addresource.dynamicrouting = resource.dynamicrouting; addresource.hostroute = resource.hostroute; addresource.ip6hostrtgw = resource.ip6hostrtgw; addresource.metric = resource.metric; addresource.vserverrhilevel = resource.vserverrhilevel; addresource.ospf6lsatype = resource.ospf6lsatype; addresource.ospfarea = resource.ospfarea; addresource.state = resource.state; addresource.map = resource.map; addresource.ownernode = resource.ownernode; addresource.td = resource.td; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, nsip6 resource) throws Exception { nsip6 addresource = new nsip6(); addresource.ipv6address = resource.ipv6address; addresource.scope = resource.scope; addresource.type = resource.type; addresource.vlan = resource.vlan; addresource.nd = resource.nd; addresource.icmp = resource.icmp; addresource.vserver = resource.vserver; addresource.telnet = resource.telnet; addresource.ftp = resource.ftp; addresource.gui = resource.gui; addresource.ssh = resource.ssh; addresource.snmp = resource.snmp; addresource.mgmtaccess = resource.mgmtaccess; addresource.restrictaccess = resource.restrictaccess; addresource.dynamicrouting = resource.dynamicrouting; addresource.hostroute = resource.hostroute; addresource.ip6hostrtgw = resource.ip6hostrtgw; addresource.metric = resource.metric; addresource.vserverrhilevel = resource.vserverrhilevel; addresource.ospf6lsatype = resource.ospf6lsatype; addresource.ospfarea = resource.ospfarea; addresource.state = resource.state; addresource.map = resource.map; addresource.ownernode = resource.ownernode; addresource.td = resource.td; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "nsip6", "resource", ")", "throws", "Exception", "{", "nsip6", "addresource", "=", "new", "nsip6", "(", ")", ";", "addresource", ".", "ipv6address", "=", "resource", ".", "ipv6address", ";", "addresource", ".", "scope", "=", "resource", ".", "scope", ";", "addresource", ".", "type", "=", "resource", ".", "type", ";", "addresource", ".", "vlan", "=", "resource", ".", "vlan", ";", "addresource", ".", "nd", "=", "resource", ".", "nd", ";", "addresource", ".", "icmp", "=", "resource", ".", "icmp", ";", "addresource", ".", "vserver", "=", "resource", ".", "vserver", ";", "addresource", ".", "telnet", "=", "resource", ".", "telnet", ";", "addresource", ".", "ftp", "=", "resource", ".", "ftp", ";", "addresource", ".", "gui", "=", "resource", ".", "gui", ";", "addresource", ".", "ssh", "=", "resource", ".", "ssh", ";", "addresource", ".", "snmp", "=", "resource", ".", "snmp", ";", "addresource", ".", "mgmtaccess", "=", "resource", ".", "mgmtaccess", ";", "addresource", ".", "restrictaccess", "=", "resource", ".", "restrictaccess", ";", "addresource", ".", "dynamicrouting", "=", "resource", ".", "dynamicrouting", ";", "addresource", ".", "hostroute", "=", "resource", ".", "hostroute", ";", "addresource", ".", "ip6hostrtgw", "=", "resource", ".", "ip6hostrtgw", ";", "addresource", ".", "metric", "=", "resource", ".", "metric", ";", "addresource", ".", "vserverrhilevel", "=", "resource", ".", "vserverrhilevel", ";", "addresource", ".", "ospf6lsatype", "=", "resource", ".", "ospf6lsatype", ";", "addresource", ".", "ospfarea", "=", "resource", ".", "ospfarea", ";", "addresource", ".", "state", "=", "resource", ".", "state", ";", "addresource", ".", "map", "=", "resource", ".", "map", ";", "addresource", ".", "ownernode", "=", "resource", ".", "ownernode", ";", "addresource", ".", "td", "=", "resource", ".", "td", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add nsip6.
[ "Use", "this", "API", "to", "add", "nsip6", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java#L663-L691
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java
nsip6.add
public static base_responses add(nitro_service client, nsip6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsip6 addresources[] = new nsip6[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nsip6(); addresources[i].ipv6address = resources[i].ipv6address; addresources[i].scope = resources[i].scope; addresources[i].type = resources[i].type; addresources[i].vlan = resources[i].vlan; addresources[i].nd = resources[i].nd; addresources[i].icmp = resources[i].icmp; addresources[i].vserver = resources[i].vserver; addresources[i].telnet = resources[i].telnet; addresources[i].ftp = resources[i].ftp; addresources[i].gui = resources[i].gui; addresources[i].ssh = resources[i].ssh; addresources[i].snmp = resources[i].snmp; addresources[i].mgmtaccess = resources[i].mgmtaccess; addresources[i].restrictaccess = resources[i].restrictaccess; addresources[i].dynamicrouting = resources[i].dynamicrouting; addresources[i].hostroute = resources[i].hostroute; addresources[i].ip6hostrtgw = resources[i].ip6hostrtgw; addresources[i].metric = resources[i].metric; addresources[i].vserverrhilevel = resources[i].vserverrhilevel; addresources[i].ospf6lsatype = resources[i].ospf6lsatype; addresources[i].ospfarea = resources[i].ospfarea; addresources[i].state = resources[i].state; addresources[i].map = resources[i].map; addresources[i].ownernode = resources[i].ownernode; addresources[i].td = resources[i].td; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, nsip6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsip6 addresources[] = new nsip6[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nsip6(); addresources[i].ipv6address = resources[i].ipv6address; addresources[i].scope = resources[i].scope; addresources[i].type = resources[i].type; addresources[i].vlan = resources[i].vlan; addresources[i].nd = resources[i].nd; addresources[i].icmp = resources[i].icmp; addresources[i].vserver = resources[i].vserver; addresources[i].telnet = resources[i].telnet; addresources[i].ftp = resources[i].ftp; addresources[i].gui = resources[i].gui; addresources[i].ssh = resources[i].ssh; addresources[i].snmp = resources[i].snmp; addresources[i].mgmtaccess = resources[i].mgmtaccess; addresources[i].restrictaccess = resources[i].restrictaccess; addresources[i].dynamicrouting = resources[i].dynamicrouting; addresources[i].hostroute = resources[i].hostroute; addresources[i].ip6hostrtgw = resources[i].ip6hostrtgw; addresources[i].metric = resources[i].metric; addresources[i].vserverrhilevel = resources[i].vserverrhilevel; addresources[i].ospf6lsatype = resources[i].ospf6lsatype; addresources[i].ospfarea = resources[i].ospfarea; addresources[i].state = resources[i].state; addresources[i].map = resources[i].map; addresources[i].ownernode = resources[i].ownernode; addresources[i].td = resources[i].td; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "nsip6", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nsip6", "addresources", "[", "]", "=", "new", "nsip6", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "nsip6", "(", ")", ";", "addresources", "[", "i", "]", ".", "ipv6address", "=", "resources", "[", "i", "]", ".", "ipv6address", ";", "addresources", "[", "i", "]", ".", "scope", "=", "resources", "[", "i", "]", ".", "scope", ";", "addresources", "[", "i", "]", ".", "type", "=", "resources", "[", "i", "]", ".", "type", ";", "addresources", "[", "i", "]", ".", "vlan", "=", "resources", "[", "i", "]", ".", "vlan", ";", "addresources", "[", "i", "]", ".", "nd", "=", "resources", "[", "i", "]", ".", "nd", ";", "addresources", "[", "i", "]", ".", "icmp", "=", "resources", "[", "i", "]", ".", "icmp", ";", "addresources", "[", "i", "]", ".", "vserver", "=", "resources", "[", "i", "]", ".", "vserver", ";", "addresources", "[", "i", "]", ".", "telnet", "=", "resources", "[", "i", "]", ".", "telnet", ";", "addresources", "[", "i", "]", ".", "ftp", "=", "resources", "[", "i", "]", ".", "ftp", ";", "addresources", "[", "i", "]", ".", "gui", "=", "resources", "[", "i", "]", ".", "gui", ";", "addresources", "[", "i", "]", ".", "ssh", "=", "resources", "[", "i", "]", ".", "ssh", ";", "addresources", "[", "i", "]", ".", "snmp", "=", "resources", "[", "i", "]", ".", "snmp", ";", "addresources", "[", "i", "]", ".", "mgmtaccess", "=", "resources", "[", "i", "]", ".", "mgmtaccess", ";", "addresources", "[", "i", "]", ".", "restrictaccess", "=", "resources", "[", "i", "]", ".", "restrictaccess", ";", "addresources", "[", "i", "]", ".", "dynamicrouting", "=", "resources", "[", "i", "]", ".", "dynamicrouting", ";", "addresources", "[", "i", "]", ".", "hostroute", "=", "resources", "[", "i", "]", ".", "hostroute", ";", "addresources", "[", "i", "]", ".", "ip6hostrtgw", "=", "resources", "[", "i", "]", ".", "ip6hostrtgw", ";", "addresources", "[", "i", "]", ".", "metric", "=", "resources", "[", "i", "]", ".", "metric", ";", "addresources", "[", "i", "]", ".", "vserverrhilevel", "=", "resources", "[", "i", "]", ".", "vserverrhilevel", ";", "addresources", "[", "i", "]", ".", "ospf6lsatype", "=", "resources", "[", "i", "]", ".", "ospf6lsatype", ";", "addresources", "[", "i", "]", ".", "ospfarea", "=", "resources", "[", "i", "]", ".", "ospfarea", ";", "addresources", "[", "i", "]", ".", "state", "=", "resources", "[", "i", "]", ".", "state", ";", "addresources", "[", "i", "]", ".", "map", "=", "resources", "[", "i", "]", ".", "map", ";", "addresources", "[", "i", "]", ".", "ownernode", "=", "resources", "[", "i", "]", ".", "ownernode", ";", "addresources", "[", "i", "]", ".", "td", "=", "resources", "[", "i", "]", ".", "td", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add nsip6 resources.
[ "Use", "this", "API", "to", "add", "nsip6", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java#L696-L731
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java
nsip6.delete
public static base_response delete(nitro_service client, String ipv6address) throws Exception { nsip6 deleteresource = new nsip6(); deleteresource.ipv6address = ipv6address; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, String ipv6address) throws Exception { nsip6 deleteresource = new nsip6(); deleteresource.ipv6address = ipv6address; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "String", "ipv6address", ")", "throws", "Exception", "{", "nsip6", "deleteresource", "=", "new", "nsip6", "(", ")", ";", "deleteresource", ".", "ipv6address", "=", "ipv6address", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete nsip6 of given name.
[ "Use", "this", "API", "to", "delete", "nsip6", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java#L736-L740
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java
nsip6.delete
public static base_response delete(nitro_service client, nsip6 resource) throws Exception { nsip6 deleteresource = new nsip6(); deleteresource.ipv6address = resource.ipv6address; deleteresource.td = resource.td; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, nsip6 resource) throws Exception { nsip6 deleteresource = new nsip6(); deleteresource.ipv6address = resource.ipv6address; deleteresource.td = resource.td; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "nsip6", "resource", ")", "throws", "Exception", "{", "nsip6", "deleteresource", "=", "new", "nsip6", "(", ")", ";", "deleteresource", ".", "ipv6address", "=", "resource", ".", "ipv6address", ";", "deleteresource", ".", "td", "=", "resource", ".", "td", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete nsip6.
[ "Use", "this", "API", "to", "delete", "nsip6", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java#L745-L750
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java
nsip6.delete
public static base_responses delete(nitro_service client, String ipv6address[]) throws Exception { base_responses result = null; if (ipv6address != null && ipv6address.length > 0) { nsip6 deleteresources[] = new nsip6[ipv6address.length]; for (int i=0;i<ipv6address.length;i++){ deleteresources[i] = new nsip6(); deleteresources[i].ipv6address = ipv6address[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
java
public static base_responses delete(nitro_service client, String ipv6address[]) throws Exception { base_responses result = null; if (ipv6address != null && ipv6address.length > 0) { nsip6 deleteresources[] = new nsip6[ipv6address.length]; for (int i=0;i<ipv6address.length;i++){ deleteresources[i] = new nsip6(); deleteresources[i].ipv6address = ipv6address[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "public", "static", "base_responses", "delete", "(", "nitro_service", "client", ",", "String", "ipv6address", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "ipv6address", "!=", "null", "&&", "ipv6address", ".", "length", ">", "0", ")", "{", "nsip6", "deleteresources", "[", "]", "=", "new", "nsip6", "[", "ipv6address", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ipv6address", ".", "length", ";", "i", "++", ")", "{", "deleteresources", "[", "i", "]", "=", "new", "nsip6", "(", ")", ";", "deleteresources", "[", "i", "]", ".", "ipv6address", "=", "ipv6address", "[", "i", "]", ";", "}", "result", "=", "delete_bulk_request", "(", "client", ",", "deleteresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to delete nsip6 resources of given names.
[ "Use", "this", "API", "to", "delete", "nsip6", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java#L755-L766
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java
nsip6.delete
public static base_responses delete(nitro_service client, nsip6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsip6 deleteresources[] = new nsip6[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new nsip6(); deleteresources[i].ipv6address = resources[i].ipv6address; deleteresources[i].td = resources[i].td; } result = delete_bulk_request(client, deleteresources); } return result; }
java
public static base_responses delete(nitro_service client, nsip6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsip6 deleteresources[] = new nsip6[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new nsip6(); deleteresources[i].ipv6address = resources[i].ipv6address; deleteresources[i].td = resources[i].td; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "public", "static", "base_responses", "delete", "(", "nitro_service", "client", ",", "nsip6", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nsip6", "deleteresources", "[", "]", "=", "new", "nsip6", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "deleteresources", "[", "i", "]", "=", "new", "nsip6", "(", ")", ";", "deleteresources", "[", "i", "]", ".", "ipv6address", "=", "resources", "[", "i", "]", ".", "ipv6address", ";", "deleteresources", "[", "i", "]", ".", "td", "=", "resources", "[", "i", "]", ".", "td", ";", "}", "result", "=", "delete_bulk_request", "(", "client", ",", "deleteresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to delete nsip6 resources.
[ "Use", "this", "API", "to", "delete", "nsip6", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java#L771-L783
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java
nsip6.update
public static base_response update(nitro_service client, nsip6 resource) throws Exception { nsip6 updateresource = new nsip6(); updateresource.ipv6address = resource.ipv6address; updateresource.td = resource.td; updateresource.nd = resource.nd; updateresource.icmp = resource.icmp; updateresource.vserver = resource.vserver; updateresource.telnet = resource.telnet; updateresource.ftp = resource.ftp; updateresource.gui = resource.gui; updateresource.ssh = resource.ssh; updateresource.snmp = resource.snmp; updateresource.mgmtaccess = resource.mgmtaccess; updateresource.restrictaccess = resource.restrictaccess; updateresource.state = resource.state; updateresource.map = resource.map; updateresource.dynamicrouting = resource.dynamicrouting; updateresource.hostroute = resource.hostroute; updateresource.ip6hostrtgw = resource.ip6hostrtgw; updateresource.metric = resource.metric; updateresource.vserverrhilevel = resource.vserverrhilevel; updateresource.ospf6lsatype = resource.ospf6lsatype; updateresource.ospfarea = resource.ospfarea; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, nsip6 resource) throws Exception { nsip6 updateresource = new nsip6(); updateresource.ipv6address = resource.ipv6address; updateresource.td = resource.td; updateresource.nd = resource.nd; updateresource.icmp = resource.icmp; updateresource.vserver = resource.vserver; updateresource.telnet = resource.telnet; updateresource.ftp = resource.ftp; updateresource.gui = resource.gui; updateresource.ssh = resource.ssh; updateresource.snmp = resource.snmp; updateresource.mgmtaccess = resource.mgmtaccess; updateresource.restrictaccess = resource.restrictaccess; updateresource.state = resource.state; updateresource.map = resource.map; updateresource.dynamicrouting = resource.dynamicrouting; updateresource.hostroute = resource.hostroute; updateresource.ip6hostrtgw = resource.ip6hostrtgw; updateresource.metric = resource.metric; updateresource.vserverrhilevel = resource.vserverrhilevel; updateresource.ospf6lsatype = resource.ospf6lsatype; updateresource.ospfarea = resource.ospfarea; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "nsip6", "resource", ")", "throws", "Exception", "{", "nsip6", "updateresource", "=", "new", "nsip6", "(", ")", ";", "updateresource", ".", "ipv6address", "=", "resource", ".", "ipv6address", ";", "updateresource", ".", "td", "=", "resource", ".", "td", ";", "updateresource", ".", "nd", "=", "resource", ".", "nd", ";", "updateresource", ".", "icmp", "=", "resource", ".", "icmp", ";", "updateresource", ".", "vserver", "=", "resource", ".", "vserver", ";", "updateresource", ".", "telnet", "=", "resource", ".", "telnet", ";", "updateresource", ".", "ftp", "=", "resource", ".", "ftp", ";", "updateresource", ".", "gui", "=", "resource", ".", "gui", ";", "updateresource", ".", "ssh", "=", "resource", ".", "ssh", ";", "updateresource", ".", "snmp", "=", "resource", ".", "snmp", ";", "updateresource", ".", "mgmtaccess", "=", "resource", ".", "mgmtaccess", ";", "updateresource", ".", "restrictaccess", "=", "resource", ".", "restrictaccess", ";", "updateresource", ".", "state", "=", "resource", ".", "state", ";", "updateresource", ".", "map", "=", "resource", ".", "map", ";", "updateresource", ".", "dynamicrouting", "=", "resource", ".", "dynamicrouting", ";", "updateresource", ".", "hostroute", "=", "resource", ".", "hostroute", ";", "updateresource", ".", "ip6hostrtgw", "=", "resource", ".", "ip6hostrtgw", ";", "updateresource", ".", "metric", "=", "resource", ".", "metric", ";", "updateresource", ".", "vserverrhilevel", "=", "resource", ".", "vserverrhilevel", ";", "updateresource", ".", "ospf6lsatype", "=", "resource", ".", "ospf6lsatype", ";", "updateresource", ".", "ospfarea", "=", "resource", ".", "ospfarea", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update nsip6.
[ "Use", "this", "API", "to", "update", "nsip6", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java#L788-L812
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java
nsip6.update
public static base_responses update(nitro_service client, nsip6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsip6 updateresources[] = new nsip6[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nsip6(); updateresources[i].ipv6address = resources[i].ipv6address; updateresources[i].td = resources[i].td; updateresources[i].nd = resources[i].nd; updateresources[i].icmp = resources[i].icmp; updateresources[i].vserver = resources[i].vserver; updateresources[i].telnet = resources[i].telnet; updateresources[i].ftp = resources[i].ftp; updateresources[i].gui = resources[i].gui; updateresources[i].ssh = resources[i].ssh; updateresources[i].snmp = resources[i].snmp; updateresources[i].mgmtaccess = resources[i].mgmtaccess; updateresources[i].restrictaccess = resources[i].restrictaccess; updateresources[i].state = resources[i].state; updateresources[i].map = resources[i].map; updateresources[i].dynamicrouting = resources[i].dynamicrouting; updateresources[i].hostroute = resources[i].hostroute; updateresources[i].ip6hostrtgw = resources[i].ip6hostrtgw; updateresources[i].metric = resources[i].metric; updateresources[i].vserverrhilevel = resources[i].vserverrhilevel; updateresources[i].ospf6lsatype = resources[i].ospf6lsatype; updateresources[i].ospfarea = resources[i].ospfarea; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, nsip6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsip6 updateresources[] = new nsip6[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nsip6(); updateresources[i].ipv6address = resources[i].ipv6address; updateresources[i].td = resources[i].td; updateresources[i].nd = resources[i].nd; updateresources[i].icmp = resources[i].icmp; updateresources[i].vserver = resources[i].vserver; updateresources[i].telnet = resources[i].telnet; updateresources[i].ftp = resources[i].ftp; updateresources[i].gui = resources[i].gui; updateresources[i].ssh = resources[i].ssh; updateresources[i].snmp = resources[i].snmp; updateresources[i].mgmtaccess = resources[i].mgmtaccess; updateresources[i].restrictaccess = resources[i].restrictaccess; updateresources[i].state = resources[i].state; updateresources[i].map = resources[i].map; updateresources[i].dynamicrouting = resources[i].dynamicrouting; updateresources[i].hostroute = resources[i].hostroute; updateresources[i].ip6hostrtgw = resources[i].ip6hostrtgw; updateresources[i].metric = resources[i].metric; updateresources[i].vserverrhilevel = resources[i].vserverrhilevel; updateresources[i].ospf6lsatype = resources[i].ospf6lsatype; updateresources[i].ospfarea = resources[i].ospfarea; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "nsip6", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nsip6", "updateresources", "[", "]", "=", "new", "nsip6", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "nsip6", "(", ")", ";", "updateresources", "[", "i", "]", ".", "ipv6address", "=", "resources", "[", "i", "]", ".", "ipv6address", ";", "updateresources", "[", "i", "]", ".", "td", "=", "resources", "[", "i", "]", ".", "td", ";", "updateresources", "[", "i", "]", ".", "nd", "=", "resources", "[", "i", "]", ".", "nd", ";", "updateresources", "[", "i", "]", ".", "icmp", "=", "resources", "[", "i", "]", ".", "icmp", ";", "updateresources", "[", "i", "]", ".", "vserver", "=", "resources", "[", "i", "]", ".", "vserver", ";", "updateresources", "[", "i", "]", ".", "telnet", "=", "resources", "[", "i", "]", ".", "telnet", ";", "updateresources", "[", "i", "]", ".", "ftp", "=", "resources", "[", "i", "]", ".", "ftp", ";", "updateresources", "[", "i", "]", ".", "gui", "=", "resources", "[", "i", "]", ".", "gui", ";", "updateresources", "[", "i", "]", ".", "ssh", "=", "resources", "[", "i", "]", ".", "ssh", ";", "updateresources", "[", "i", "]", ".", "snmp", "=", "resources", "[", "i", "]", ".", "snmp", ";", "updateresources", "[", "i", "]", ".", "mgmtaccess", "=", "resources", "[", "i", "]", ".", "mgmtaccess", ";", "updateresources", "[", "i", "]", ".", "restrictaccess", "=", "resources", "[", "i", "]", ".", "restrictaccess", ";", "updateresources", "[", "i", "]", ".", "state", "=", "resources", "[", "i", "]", ".", "state", ";", "updateresources", "[", "i", "]", ".", "map", "=", "resources", "[", "i", "]", ".", "map", ";", "updateresources", "[", "i", "]", ".", "dynamicrouting", "=", "resources", "[", "i", "]", ".", "dynamicrouting", ";", "updateresources", "[", "i", "]", ".", "hostroute", "=", "resources", "[", "i", "]", ".", "hostroute", ";", "updateresources", "[", "i", "]", ".", "ip6hostrtgw", "=", "resources", "[", "i", "]", ".", "ip6hostrtgw", ";", "updateresources", "[", "i", "]", ".", "metric", "=", "resources", "[", "i", "]", ".", "metric", ";", "updateresources", "[", "i", "]", ".", "vserverrhilevel", "=", "resources", "[", "i", "]", ".", "vserverrhilevel", ";", "updateresources", "[", "i", "]", ".", "ospf6lsatype", "=", "resources", "[", "i", "]", ".", "ospf6lsatype", ";", "updateresources", "[", "i", "]", ".", "ospfarea", "=", "resources", "[", "i", "]", ".", "ospfarea", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update nsip6 resources.
[ "Use", "this", "API", "to", "update", "nsip6", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java#L817-L848
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java
nsip6.unset
public static base_response unset(nitro_service client, nsip6 resource, String[] args) throws Exception{ nsip6 unsetresource = new nsip6(); unsetresource.ipv6address = resource.ipv6address; unsetresource.td = resource.td; return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, nsip6 resource, String[] args) throws Exception{ nsip6 unsetresource = new nsip6(); unsetresource.ipv6address = resource.ipv6address; unsetresource.td = resource.td; return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "nsip6", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "nsip6", "unsetresource", "=", "new", "nsip6", "(", ")", ";", "unsetresource", ".", "ipv6address", "=", "resource", ".", "ipv6address", ";", "unsetresource", ".", "td", "=", "resource", ".", "td", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of nsip6 resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "nsip6", "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/ns/nsip6.java#L854-L859
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java
nsip6.get
public static nsip6[] get(nitro_service service) throws Exception{ nsip6 obj = new nsip6(); nsip6[] response = (nsip6[])obj.get_resources(service); return response; }
java
public static nsip6[] get(nitro_service service) throws Exception{ nsip6 obj = new nsip6(); nsip6[] response = (nsip6[])obj.get_resources(service); return response; }
[ "public", "static", "nsip6", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "nsip6", "obj", "=", "new", "nsip6", "(", ")", ";", "nsip6", "[", "]", "response", "=", "(", "nsip6", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the nsip6 resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nsip6", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsip6.java#L899-L903
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/MultiClassPrecisionRecallExtendedStats.java
MultiClassPrecisionRecallExtendedStats.getAccuracyInfo
public Triple<Double, Integer, Integer> getAccuracyInfo() { int totalCorrect = tokensCorrect; int totalWrong = tokensCount - tokensCorrect; return new Triple<Double, Integer, Integer>((((double) totalCorrect) / tokensCount), totalCorrect, totalWrong); }
java
public Triple<Double, Integer, Integer> getAccuracyInfo() { int totalCorrect = tokensCorrect; int totalWrong = tokensCount - tokensCorrect; return new Triple<Double, Integer, Integer>((((double) totalCorrect) / tokensCount), totalCorrect, totalWrong); }
[ "public", "Triple", "<", "Double", ",", "Integer", ",", "Integer", ">", "getAccuracyInfo", "(", ")", "{", "int", "totalCorrect", "=", "tokensCorrect", ";", "int", "totalWrong", "=", "tokensCount", "-", "tokensCorrect", ";", "return", "new", "Triple", "<", "Double", ",", "Integer", ",", "Integer", ">", "(", "(", "(", "(", "double", ")", "totalCorrect", ")", "/", "tokensCount", ")", ",", "totalCorrect", ",", "totalWrong", ")", ";", "}" ]
Return overall per token accuracy
[ "Return", "overall", "per", "token", "accuracy" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/MultiClassPrecisionRecallExtendedStats.java#L227-L233
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/MultiClassPrecisionRecallExtendedStats.java
MultiClassPrecisionRecallExtendedStats.getAccuracyDescription
public String getAccuracyDescription(int numDigits) { NumberFormat nf = NumberFormat.getNumberInstance(); nf.setMaximumFractionDigits(numDigits); Triple<Double, Integer, Integer> accu = getAccuracyInfo(); return nf.format(accu.first()) + " (" + accu.second() + "/" + (accu.second() + accu.third()) + ")"; }
java
public String getAccuracyDescription(int numDigits) { NumberFormat nf = NumberFormat.getNumberInstance(); nf.setMaximumFractionDigits(numDigits); Triple<Double, Integer, Integer> accu = getAccuracyInfo(); return nf.format(accu.first()) + " (" + accu.second() + "/" + (accu.second() + accu.third()) + ")"; }
[ "public", "String", "getAccuracyDescription", "(", "int", "numDigits", ")", "{", "NumberFormat", "nf", "=", "NumberFormat", ".", "getNumberInstance", "(", ")", ";", "nf", ".", "setMaximumFractionDigits", "(", "numDigits", ")", ";", "Triple", "<", "Double", ",", "Integer", ",", "Integer", ">", "accu", "=", "getAccuracyInfo", "(", ")", ";", "return", "nf", ".", "format", "(", "accu", ".", "first", "(", ")", ")", "+", "\" (\"", "+", "accu", ".", "second", "(", ")", "+", "\"/\"", "+", "(", "accu", ".", "second", "(", ")", "+", "accu", ".", "third", "(", ")", ")", "+", "\")\"", ";", "}" ]
Returns a String summarizing overall accuracy that will print nicely.
[ "Returns", "a", "String", "summarizing", "overall", "accuracy", "that", "will", "print", "nicely", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/MultiClassPrecisionRecallExtendedStats.java#L242-L247
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/TwoDimensionalCounter.java
TwoDimensionalCounter.setCounter
public ClassicCounter<K2> setCounter(K1 o, Counter<K2> c) { ClassicCounter<K2> old = getCounter(o); total -= old.totalCount(); if (c instanceof ClassicCounter) { map.put(o, (ClassicCounter<K2>) c); } else { map.put(o, new ClassicCounter<K2>(c)); } total += c.totalCount(); return old; }
java
public ClassicCounter<K2> setCounter(K1 o, Counter<K2> c) { ClassicCounter<K2> old = getCounter(o); total -= old.totalCount(); if (c instanceof ClassicCounter) { map.put(o, (ClassicCounter<K2>) c); } else { map.put(o, new ClassicCounter<K2>(c)); } total += c.totalCount(); return old; }
[ "public", "ClassicCounter", "<", "K2", ">", "setCounter", "(", "K1", "o", ",", "Counter", "<", "K2", ">", "c", ")", "{", "ClassicCounter", "<", "K2", ">", "old", "=", "getCounter", "(", "o", ")", ";", "total", "-=", "old", ".", "totalCount", "(", ")", ";", "if", "(", "c", "instanceof", "ClassicCounter", ")", "{", "map", ".", "put", "(", "o", ",", "(", "ClassicCounter", "<", "K2", ">", ")", "c", ")", ";", "}", "else", "{", "map", ".", "put", "(", "o", ",", "new", "ClassicCounter", "<", "K2", ">", "(", "c", ")", ")", ";", "}", "total", "+=", "c", ".", "totalCount", "(", ")", ";", "return", "old", ";", "}" ]
replace the counter for K1-index o by new counter c
[ "replace", "the", "counter", "for", "K1", "-", "index", "o", "by", "new", "counter", "c" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/TwoDimensionalCounter.java#L183-L193
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/TwoDimensionalCounter.java
TwoDimensionalCounter.reverseIndexOrder
@SuppressWarnings( { "unchecked" }) public static <K1, K2> TwoDimensionalCounter<K2, K1> reverseIndexOrder(TwoDimensionalCounter<K1, K2> cc) { // they typing on the outerMF is violated a bit, but it'll work.... TwoDimensionalCounter<K2, K1> result = new TwoDimensionalCounter<K2, K1>((MapFactory) cc.outerMF, (MapFactory) cc.innerMF); for (K1 key1 : cc.firstKeySet()) { ClassicCounter<K2> c = cc.getCounter(key1); for (K2 key2 : c.keySet()) { double count = c.getCount(key2); result.setCount(key2, key1, count); } } return result; }
java
@SuppressWarnings( { "unchecked" }) public static <K1, K2> TwoDimensionalCounter<K2, K1> reverseIndexOrder(TwoDimensionalCounter<K1, K2> cc) { // they typing on the outerMF is violated a bit, but it'll work.... TwoDimensionalCounter<K2, K1> result = new TwoDimensionalCounter<K2, K1>((MapFactory) cc.outerMF, (MapFactory) cc.innerMF); for (K1 key1 : cc.firstKeySet()) { ClassicCounter<K2> c = cc.getCounter(key1); for (K2 key2 : c.keySet()) { double count = c.getCount(key2); result.setCount(key2, key1, count); } } return result; }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", "}", ")", "public", "static", "<", "K1", ",", "K2", ">", "TwoDimensionalCounter", "<", "K2", ",", "K1", ">", "reverseIndexOrder", "(", "TwoDimensionalCounter", "<", "K1", ",", "K2", ">", "cc", ")", "{", "// they typing on the outerMF is violated a bit, but it'll work....\r", "TwoDimensionalCounter", "<", "K2", ",", "K1", ">", "result", "=", "new", "TwoDimensionalCounter", "<", "K2", ",", "K1", ">", "(", "(", "MapFactory", ")", "cc", ".", "outerMF", ",", "(", "MapFactory", ")", "cc", ".", "innerMF", ")", ";", "for", "(", "K1", "key1", ":", "cc", ".", "firstKeySet", "(", ")", ")", "{", "ClassicCounter", "<", "K2", ">", "c", "=", "cc", ".", "getCounter", "(", "key1", ")", ";", "for", "(", "K2", "key2", ":", "c", ".", "keySet", "(", ")", ")", "{", "double", "count", "=", "c", ".", "getCount", "(", "key2", ")", ";", "result", ".", "setCount", "(", "key2", ",", "key1", ",", "count", ")", ";", "}", "}", "return", "result", ";", "}" ]
Produces a new ConditionalCounter. @return a new ConditionalCounter, where order of indices is reversed
[ "Produces", "a", "new", "ConditionalCounter", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/TwoDimensionalCounter.java#L200-L214
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/TwoDimensionalCounter.java
TwoDimensionalCounter.sumInnerCounter
public Counter<K1> sumInnerCounter() { Counter<K1> summed = new ClassicCounter<K1>(); for (K1 key : this.firstKeySet()) { summed.incrementCount(key, this.getCounter(key).totalCount()); } return summed; }
java
public Counter<K1> sumInnerCounter() { Counter<K1> summed = new ClassicCounter<K1>(); for (K1 key : this.firstKeySet()) { summed.incrementCount(key, this.getCounter(key).totalCount()); } return summed; }
[ "public", "Counter", "<", "K1", ">", "sumInnerCounter", "(", ")", "{", "Counter", "<", "K1", ">", "summed", "=", "new", "ClassicCounter", "<", "K1", ">", "(", ")", ";", "for", "(", "K1", "key", ":", "this", ".", "firstKeySet", "(", ")", ")", "{", "summed", ".", "incrementCount", "(", "key", ",", "this", ".", "getCounter", "(", "key", ")", ".", "totalCount", "(", ")", ")", ";", "}", "return", "summed", ";", "}" ]
Returns the counters with keys as the first key and count as the total count of the inner counter for that key @return counter of type K1
[ "Returns", "the", "counters", "with", "keys", "as", "the", "first", "key", "and", "count", "as", "the", "total", "count", "of", "the", "inner", "counter", "for", "that", "key" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/TwoDimensionalCounter.java#L350-L356
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel_binding.java
appfwpolicylabel_binding.get
public static appfwpolicylabel_binding get(nitro_service service, String labelname) throws Exception{ appfwpolicylabel_binding obj = new appfwpolicylabel_binding(); obj.set_labelname(labelname); appfwpolicylabel_binding response = (appfwpolicylabel_binding) obj.get_resource(service); return response; }
java
public static appfwpolicylabel_binding get(nitro_service service, String labelname) throws Exception{ appfwpolicylabel_binding obj = new appfwpolicylabel_binding(); obj.set_labelname(labelname); appfwpolicylabel_binding response = (appfwpolicylabel_binding) obj.get_resource(service); return response; }
[ "public", "static", "appfwpolicylabel_binding", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "appfwpolicylabel_binding", "obj", "=", "new", "appfwpolicylabel_binding", "(", ")", ";", "obj", ".", "set_labelname", "(", "labelname", ")", ";", "appfwpolicylabel_binding", "response", "=", "(", "appfwpolicylabel_binding", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch appfwpolicylabel_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "appfwpolicylabel_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel_binding.java#L114-L119
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/ssldhparam.java
ssldhparam.create
public static base_response create(nitro_service client, ssldhparam resource) throws Exception { ssldhparam createresource = new ssldhparam(); createresource.dhfile = resource.dhfile; createresource.bits = resource.bits; createresource.gen = resource.gen; return createresource.perform_operation(client,"create"); }
java
public static base_response create(nitro_service client, ssldhparam resource) throws Exception { ssldhparam createresource = new ssldhparam(); createresource.dhfile = resource.dhfile; createresource.bits = resource.bits; createresource.gen = resource.gen; return createresource.perform_operation(client,"create"); }
[ "public", "static", "base_response", "create", "(", "nitro_service", "client", ",", "ssldhparam", "resource", ")", "throws", "Exception", "{", "ssldhparam", "createresource", "=", "new", "ssldhparam", "(", ")", ";", "createresource", ".", "dhfile", "=", "resource", ".", "dhfile", ";", "createresource", ".", "bits", "=", "resource", ".", "bits", ";", "createresource", ".", "gen", "=", "resource", ".", "gen", ";", "return", "createresource", ".", "perform_operation", "(", "client", ",", "\"create\"", ")", ";", "}" ]
Use this API to create ssldhparam.
[ "Use", "this", "API", "to", "create", "ssldhparam", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/ssldhparam.java#L141-L147
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditnslogpolicy_vpnvserver_binding.java
auditnslogpolicy_vpnvserver_binding.get
public static auditnslogpolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{ auditnslogpolicy_vpnvserver_binding obj = new auditnslogpolicy_vpnvserver_binding(); obj.set_name(name); auditnslogpolicy_vpnvserver_binding response[] = (auditnslogpolicy_vpnvserver_binding[]) obj.get_resources(service); return response; }
java
public static auditnslogpolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{ auditnslogpolicy_vpnvserver_binding obj = new auditnslogpolicy_vpnvserver_binding(); obj.set_name(name); auditnslogpolicy_vpnvserver_binding response[] = (auditnslogpolicy_vpnvserver_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "auditnslogpolicy_vpnvserver_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "auditnslogpolicy_vpnvserver_binding", "obj", "=", "new", "auditnslogpolicy_vpnvserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "auditnslogpolicy_vpnvserver_binding", "response", "[", "]", "=", "(", "auditnslogpolicy_vpnvserver_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch auditnslogpolicy_vpnvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "auditnslogpolicy_vpnvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditnslogpolicy_vpnvserver_binding.java#L132-L137
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_authenticationtacacspolicy_binding.java
authenticationvserver_authenticationtacacspolicy_binding.get
public static authenticationvserver_authenticationtacacspolicy_binding[] get(nitro_service service, String name) throws Exception{ authenticationvserver_authenticationtacacspolicy_binding obj = new authenticationvserver_authenticationtacacspolicy_binding(); obj.set_name(name); authenticationvserver_authenticationtacacspolicy_binding response[] = (authenticationvserver_authenticationtacacspolicy_binding[]) obj.get_resources(service); return response; }
java
public static authenticationvserver_authenticationtacacspolicy_binding[] get(nitro_service service, String name) throws Exception{ authenticationvserver_authenticationtacacspolicy_binding obj = new authenticationvserver_authenticationtacacspolicy_binding(); obj.set_name(name); authenticationvserver_authenticationtacacspolicy_binding response[] = (authenticationvserver_authenticationtacacspolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "authenticationvserver_authenticationtacacspolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authenticationvserver_authenticationtacacspolicy_binding", "obj", "=", "new", "authenticationvserver_authenticationtacacspolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "authenticationvserver_authenticationtacacspolicy_binding", "response", "[", "]", "=", "(", "authenticationvserver_authenticationtacacspolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch authenticationvserver_authenticationtacacspolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "authenticationvserver_authenticationtacacspolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_authenticationtacacspolicy_binding.java#L264-L269
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpntrafficpolicy_aaagroup_binding.java
vpntrafficpolicy_aaagroup_binding.get
public static vpntrafficpolicy_aaagroup_binding[] get(nitro_service service, String name) throws Exception{ vpntrafficpolicy_aaagroup_binding obj = new vpntrafficpolicy_aaagroup_binding(); obj.set_name(name); vpntrafficpolicy_aaagroup_binding response[] = (vpntrafficpolicy_aaagroup_binding[]) obj.get_resources(service); return response; }
java
public static vpntrafficpolicy_aaagroup_binding[] get(nitro_service service, String name) throws Exception{ vpntrafficpolicy_aaagroup_binding obj = new vpntrafficpolicy_aaagroup_binding(); obj.set_name(name); vpntrafficpolicy_aaagroup_binding response[] = (vpntrafficpolicy_aaagroup_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "vpntrafficpolicy_aaagroup_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "vpntrafficpolicy_aaagroup_binding", "obj", "=", "new", "vpntrafficpolicy_aaagroup_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "vpntrafficpolicy_aaagroup_binding", "response", "[", "]", "=", "(", "vpntrafficpolicy_aaagroup_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch vpntrafficpolicy_aaagroup_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "vpntrafficpolicy_aaagroup_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpntrafficpolicy_aaagroup_binding.java#L132-L137
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ling/Sentence.java
Sentence.listToString
public static <T> String listToString(List<T> list, final boolean justValue) { return listToString(list, justValue, null); }
java
public static <T> String listToString(List<T> list, final boolean justValue) { return listToString(list, justValue, null); }
[ "public", "static", "<", "T", ">", "String", "listToString", "(", "List", "<", "T", ">", "list", ",", "final", "boolean", "justValue", ")", "{", "return", "listToString", "(", "list", ",", "justValue", ",", "null", ")", ";", "}" ]
Returns the sentence as a string with a space between words. Designed to work robustly, even if the elements stored in the 'Sentence' are not of type Label. This one uses the default separators for any word type that uses separators, such as TaggedWord. @param justValue If <code>true</code> and the elements are of type <code>Label</code>, return just the <code>value()</code> of the <code>Label</code> of each word; otherwise, call the <code>toString()</code> method on each item. @return The sentence in String form
[ "Returns", "the", "sentence", "as", "a", "string", "with", "a", "space", "between", "words", ".", "Designed", "to", "work", "robustly", "even", "if", "the", "elements", "stored", "in", "the", "Sentence", "are", "not", "of", "type", "Label", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ling/Sentence.java#L146-L148
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ling/Sentence.java
Sentence.listToString
public static <T> String listToString(List<T> list, final boolean justValue, final String separator) { StringBuilder s = new StringBuilder(); for (Iterator<T> wordIterator = list.iterator(); wordIterator.hasNext();) { T o = wordIterator.next(); s.append(wordToString(o, justValue, separator)); if (wordIterator.hasNext()) { s.append(' '); } } return s.toString(); }
java
public static <T> String listToString(List<T> list, final boolean justValue, final String separator) { StringBuilder s = new StringBuilder(); for (Iterator<T> wordIterator = list.iterator(); wordIterator.hasNext();) { T o = wordIterator.next(); s.append(wordToString(o, justValue, separator)); if (wordIterator.hasNext()) { s.append(' '); } } return s.toString(); }
[ "public", "static", "<", "T", ">", "String", "listToString", "(", "List", "<", "T", ">", "list", ",", "final", "boolean", "justValue", ",", "final", "String", "separator", ")", "{", "StringBuilder", "s", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Iterator", "<", "T", ">", "wordIterator", "=", "list", ".", "iterator", "(", ")", ";", "wordIterator", ".", "hasNext", "(", ")", ";", ")", "{", "T", "o", "=", "wordIterator", ".", "next", "(", ")", ";", "s", ".", "append", "(", "wordToString", "(", "o", ",", "justValue", ",", "separator", ")", ")", ";", "if", "(", "wordIterator", ".", "hasNext", "(", ")", ")", "{", "s", ".", "append", "(", "'", "'", ")", ";", "}", "}", "return", "s", ".", "toString", "(", ")", ";", "}" ]
As already described, but if separator is not null, then objects such as TaggedWord @param separator The string used to separate Word and Tag in TaggedWord, etc
[ "As", "already", "described", "but", "if", "separator", "is", "not", "null", "then", "objects", "such", "as", "TaggedWord" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ling/Sentence.java#L157-L168
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java
CMMClassifier.getTags
public Set<String> getTags() { Set<String> tags = new HashSet<String>(classIndex.objectsList()); tags.remove(flags.backgroundSymbol); return tags; }
java
public Set<String> getTags() { Set<String> tags = new HashSet<String>(classIndex.objectsList()); tags.remove(flags.backgroundSymbol); return tags; }
[ "public", "Set", "<", "String", ">", "getTags", "(", ")", "{", "Set", "<", "String", ">", "tags", "=", "new", "HashSet", "<", "String", ">", "(", "classIndex", ".", "objectsList", "(", ")", ")", ";", "tags", ".", "remove", "(", "flags", ".", "backgroundSymbol", ")", ";", "return", "tags", ";", "}" ]
Returns the Set of entities recognized by this Classifier. @return The Set of entities recognized by this Classifier.
[ "Returns", "the", "Set", "of", "entities", "recognized", "by", "this", "Classifier", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java#L158-L162
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java
CMMClassifier.classOf
protected String classOf(List<IN> lineInfos, int pos) { Datum<String, String> d = makeDatum(lineInfos, pos, featureFactory); return classifier.classOf(d); }
java
protected String classOf(List<IN> lineInfos, int pos) { Datum<String, String> d = makeDatum(lineInfos, pos, featureFactory); return classifier.classOf(d); }
[ "protected", "String", "classOf", "(", "List", "<", "IN", ">", "lineInfos", ",", "int", "pos", ")", "{", "Datum", "<", "String", ",", "String", ">", "d", "=", "makeDatum", "(", "lineInfos", ",", "pos", ",", "featureFactory", ")", ";", "return", "classifier", ".", "classOf", "(", "d", ")", ";", "}" ]
Returns the most likely class for the word at the given position.
[ "Returns", "the", "most", "likely", "class", "for", "the", "word", "at", "the", "given", "position", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java#L242-L245
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java
CMMClassifier.loglikelihood
public double loglikelihood(List<IN> lineInfos) { double cll = 0.0; for (int i = 0; i < lineInfos.size(); i++) { Datum<String, String> d = makeDatum(lineInfos, i, featureFactory); Counter<String> c = classifier.logProbabilityOf(d); double total = Double.NEGATIVE_INFINITY; for (String s : c.keySet()) { total = SloppyMath.logAdd(total, c.getCount(s)); } cll -= c.getCount(d.label()) - total; } // quadratic prior // HN: TODO: add other priors if (classifier instanceof LinearClassifier) { double sigmaSq = flags.sigma * flags.sigma; LinearClassifier<String, String> lc = (LinearClassifier<String, String>)classifier; for (String feature: lc.features()) { for (String classLabel: classIndex) { double w = lc.weight(feature, classLabel); cll += w * w / 2.0 / sigmaSq; } } } return cll; }
java
public double loglikelihood(List<IN> lineInfos) { double cll = 0.0; for (int i = 0; i < lineInfos.size(); i++) { Datum<String, String> d = makeDatum(lineInfos, i, featureFactory); Counter<String> c = classifier.logProbabilityOf(d); double total = Double.NEGATIVE_INFINITY; for (String s : c.keySet()) { total = SloppyMath.logAdd(total, c.getCount(s)); } cll -= c.getCount(d.label()) - total; } // quadratic prior // HN: TODO: add other priors if (classifier instanceof LinearClassifier) { double sigmaSq = flags.sigma * flags.sigma; LinearClassifier<String, String> lc = (LinearClassifier<String, String>)classifier; for (String feature: lc.features()) { for (String classLabel: classIndex) { double w = lc.weight(feature, classLabel); cll += w * w / 2.0 / sigmaSq; } } } return cll; }
[ "public", "double", "loglikelihood", "(", "List", "<", "IN", ">", "lineInfos", ")", "{", "double", "cll", "=", "0.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "lineInfos", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Datum", "<", "String", ",", "String", ">", "d", "=", "makeDatum", "(", "lineInfos", ",", "i", ",", "featureFactory", ")", ";", "Counter", "<", "String", ">", "c", "=", "classifier", ".", "logProbabilityOf", "(", "d", ")", ";", "double", "total", "=", "Double", ".", "NEGATIVE_INFINITY", ";", "for", "(", "String", "s", ":", "c", ".", "keySet", "(", ")", ")", "{", "total", "=", "SloppyMath", ".", "logAdd", "(", "total", ",", "c", ".", "getCount", "(", "s", ")", ")", ";", "}", "cll", "-=", "c", ".", "getCount", "(", "d", ".", "label", "(", ")", ")", "-", "total", ";", "}", "// quadratic prior\r", "// HN: TODO: add other priors\r", "if", "(", "classifier", "instanceof", "LinearClassifier", ")", "{", "double", "sigmaSq", "=", "flags", ".", "sigma", "*", "flags", ".", "sigma", ";", "LinearClassifier", "<", "String", ",", "String", ">", "lc", "=", "(", "LinearClassifier", "<", "String", ",", "String", ">", ")", "classifier", ";", "for", "(", "String", "feature", ":", "lc", ".", "features", "(", ")", ")", "{", "for", "(", "String", "classLabel", ":", "classIndex", ")", "{", "double", "w", "=", "lc", ".", "weight", "(", "feature", ",", "classLabel", ")", ";", "cll", "+=", "w", "*", "w", "/", "2.0", "/", "sigmaSq", ";", "}", "}", "}", "return", "cll", ";", "}" ]
Returns the log conditional likelihood of the given dataset. @return The log conditional likelihood of the given dataset.
[ "Returns", "the", "log", "conditional", "likelihood", "of", "the", "given", "dataset", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java#L252-L279
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java
CMMClassifier.getDataset
public Dataset<String, String> getDataset(Dataset<String, String> oldData, Index<String> goodFeatures) { //public Dataset getDataset(List data, Collection goodFeatures) { //makeAnswerArraysAndTagIndex(data); int[][] oldDataArray = oldData.getDataArray(); int[] oldLabelArray = oldData.getLabelsArray(); Index<String> oldFeatureIndex = oldData.featureIndex; int[] oldToNewFeatureMap = new int[oldFeatureIndex.size()]; int[][] newDataArray = new int[oldDataArray.length][]; System.err.print("Building reduced dataset..."); int size = oldFeatureIndex.size(); int max = 0; for (int i = 0; i < size; i++) { oldToNewFeatureMap[i] = goodFeatures.indexOf(oldFeatureIndex.get(i)); if (oldToNewFeatureMap[i] > max) { max = oldToNewFeatureMap[i]; } } for (int i = 0; i < oldDataArray.length; i++) { int[] data = oldDataArray[i]; size = 0; for (int j = 0; j < data.length; j++) { if (oldToNewFeatureMap[data[j]] > 0) { size++; } } int[] newData = new int[size]; int index = 0; for (int j = 0; j < data.length; j++) { int f = oldToNewFeatureMap[data[j]]; if (f > 0) { newData[index++] = f; } } newDataArray[i] = newData; } Dataset<String, String> train = new Dataset<String, String>(oldData.labelIndex, oldLabelArray, goodFeatures, newDataArray, newDataArray.length); System.err.println("done."); if (flags.featThreshFile != null) { System.err.println("applying thresholds..."); List<Pair<Pattern,Integer>> thresh = getThresholds(flags.featThreshFile); train.applyFeatureCountThreshold(thresh); } else if (flags.featureThreshold > 1) { System.err.println("Removing Features with counts < " + flags.featureThreshold); train.applyFeatureCountThreshold(flags.featureThreshold); } train.summaryStatistics(); return train; }
java
public Dataset<String, String> getDataset(Dataset<String, String> oldData, Index<String> goodFeatures) { //public Dataset getDataset(List data, Collection goodFeatures) { //makeAnswerArraysAndTagIndex(data); int[][] oldDataArray = oldData.getDataArray(); int[] oldLabelArray = oldData.getLabelsArray(); Index<String> oldFeatureIndex = oldData.featureIndex; int[] oldToNewFeatureMap = new int[oldFeatureIndex.size()]; int[][] newDataArray = new int[oldDataArray.length][]; System.err.print("Building reduced dataset..."); int size = oldFeatureIndex.size(); int max = 0; for (int i = 0; i < size; i++) { oldToNewFeatureMap[i] = goodFeatures.indexOf(oldFeatureIndex.get(i)); if (oldToNewFeatureMap[i] > max) { max = oldToNewFeatureMap[i]; } } for (int i = 0; i < oldDataArray.length; i++) { int[] data = oldDataArray[i]; size = 0; for (int j = 0; j < data.length; j++) { if (oldToNewFeatureMap[data[j]] > 0) { size++; } } int[] newData = new int[size]; int index = 0; for (int j = 0; j < data.length; j++) { int f = oldToNewFeatureMap[data[j]]; if (f > 0) { newData[index++] = f; } } newDataArray[i] = newData; } Dataset<String, String> train = new Dataset<String, String>(oldData.labelIndex, oldLabelArray, goodFeatures, newDataArray, newDataArray.length); System.err.println("done."); if (flags.featThreshFile != null) { System.err.println("applying thresholds..."); List<Pair<Pattern,Integer>> thresh = getThresholds(flags.featThreshFile); train.applyFeatureCountThreshold(thresh); } else if (flags.featureThreshold > 1) { System.err.println("Removing Features with counts < " + flags.featureThreshold); train.applyFeatureCountThreshold(flags.featureThreshold); } train.summaryStatistics(); return train; }
[ "public", "Dataset", "<", "String", ",", "String", ">", "getDataset", "(", "Dataset", "<", "String", ",", "String", ">", "oldData", ",", "Index", "<", "String", ">", "goodFeatures", ")", "{", "//public Dataset getDataset(List data, Collection goodFeatures) {\r", "//makeAnswerArraysAndTagIndex(data);\r", "int", "[", "]", "[", "]", "oldDataArray", "=", "oldData", ".", "getDataArray", "(", ")", ";", "int", "[", "]", "oldLabelArray", "=", "oldData", ".", "getLabelsArray", "(", ")", ";", "Index", "<", "String", ">", "oldFeatureIndex", "=", "oldData", ".", "featureIndex", ";", "int", "[", "]", "oldToNewFeatureMap", "=", "new", "int", "[", "oldFeatureIndex", ".", "size", "(", ")", "]", ";", "int", "[", "]", "[", "]", "newDataArray", "=", "new", "int", "[", "oldDataArray", ".", "length", "]", "[", "", "]", ";", "System", ".", "err", ".", "print", "(", "\"Building reduced dataset...\"", ")", ";", "int", "size", "=", "oldFeatureIndex", ".", "size", "(", ")", ";", "int", "max", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "oldToNewFeatureMap", "[", "i", "]", "=", "goodFeatures", ".", "indexOf", "(", "oldFeatureIndex", ".", "get", "(", "i", ")", ")", ";", "if", "(", "oldToNewFeatureMap", "[", "i", "]", ">", "max", ")", "{", "max", "=", "oldToNewFeatureMap", "[", "i", "]", ";", "}", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "oldDataArray", ".", "length", ";", "i", "++", ")", "{", "int", "[", "]", "data", "=", "oldDataArray", "[", "i", "]", ";", "size", "=", "0", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "data", ".", "length", ";", "j", "++", ")", "{", "if", "(", "oldToNewFeatureMap", "[", "data", "[", "j", "]", "]", ">", "0", ")", "{", "size", "++", ";", "}", "}", "int", "[", "]", "newData", "=", "new", "int", "[", "size", "]", ";", "int", "index", "=", "0", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "data", ".", "length", ";", "j", "++", ")", "{", "int", "f", "=", "oldToNewFeatureMap", "[", "data", "[", "j", "]", "]", ";", "if", "(", "f", ">", "0", ")", "{", "newData", "[", "index", "++", "]", "=", "f", ";", "}", "}", "newDataArray", "[", "i", "]", "=", "newData", ";", "}", "Dataset", "<", "String", ",", "String", ">", "train", "=", "new", "Dataset", "<", "String", ",", "String", ">", "(", "oldData", ".", "labelIndex", ",", "oldLabelArray", ",", "goodFeatures", ",", "newDataArray", ",", "newDataArray", ".", "length", ")", ";", "System", ".", "err", ".", "println", "(", "\"done.\"", ")", ";", "if", "(", "flags", ".", "featThreshFile", "!=", "null", ")", "{", "System", ".", "err", ".", "println", "(", "\"applying thresholds...\"", ")", ";", "List", "<", "Pair", "<", "Pattern", ",", "Integer", ">", ">", "thresh", "=", "getThresholds", "(", "flags", ".", "featThreshFile", ")", ";", "train", ".", "applyFeatureCountThreshold", "(", "thresh", ")", ";", "}", "else", "if", "(", "flags", ".", "featureThreshold", ">", "1", ")", "{", "System", ".", "err", ".", "println", "(", "\"Removing Features with counts < \"", "+", "flags", ".", "featureThreshold", ")", ";", "train", ".", "applyFeatureCountThreshold", "(", "flags", ".", "featureThreshold", ")", ";", "}", "train", ".", "summaryStatistics", "(", ")", ";", "return", "train", ";", "}" ]
Build a Dataset from some data. @param oldData This {@link Dataset} represents data for which we which to some features, specifically those features not in the {@link edu.stanford.nlp.util.Index} goodFeatures. @param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain. @return A new {@link Dataset} wheres each datapoint contains only features which were in goodFeatures.
[ "Build", "a", "Dataset", "from", "some", "data", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java#L793-L848
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java
CMMClassifier.makeDatum
public <T extends CoreLabel> Datum<String, String> makeDatum(List<IN> info, int loc, FeatureFactory featureFactory) { PaddedList<IN> pInfo = new PaddedList<IN>(info, pad); Collection<String> features = new ArrayList<String>(); List<Clique> cliques = featureFactory.getCliques(); for (Clique c : cliques) { Collection<String> feats = featureFactory.getCliqueFeatures(pInfo, loc, c); feats = addOtherClasses(feats, pInfo, loc, c); features.addAll(feats); } printFeatures(pInfo.get(loc), features); CoreLabel c = info.get(loc); return new BasicDatum<String, String>(features, c.get(AnswerAnnotation.class)); }
java
public <T extends CoreLabel> Datum<String, String> makeDatum(List<IN> info, int loc, FeatureFactory featureFactory) { PaddedList<IN> pInfo = new PaddedList<IN>(info, pad); Collection<String> features = new ArrayList<String>(); List<Clique> cliques = featureFactory.getCliques(); for (Clique c : cliques) { Collection<String> feats = featureFactory.getCliqueFeatures(pInfo, loc, c); feats = addOtherClasses(feats, pInfo, loc, c); features.addAll(feats); } printFeatures(pInfo.get(loc), features); CoreLabel c = info.get(loc); return new BasicDatum<String, String>(features, c.get(AnswerAnnotation.class)); }
[ "public", "<", "T", "extends", "CoreLabel", ">", "Datum", "<", "String", ",", "String", ">", "makeDatum", "(", "List", "<", "IN", ">", "info", ",", "int", "loc", ",", "FeatureFactory", "featureFactory", ")", "{", "PaddedList", "<", "IN", ">", "pInfo", "=", "new", "PaddedList", "<", "IN", ">", "(", "info", ",", "pad", ")", ";", "Collection", "<", "String", ">", "features", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "List", "<", "Clique", ">", "cliques", "=", "featureFactory", ".", "getCliques", "(", ")", ";", "for", "(", "Clique", "c", ":", "cliques", ")", "{", "Collection", "<", "String", ">", "feats", "=", "featureFactory", ".", "getCliqueFeatures", "(", "pInfo", ",", "loc", ",", "c", ")", ";", "feats", "=", "addOtherClasses", "(", "feats", ",", "pInfo", ",", "loc", ",", "c", ")", ";", "features", ".", "addAll", "(", "feats", ")", ";", "}", "printFeatures", "(", "pInfo", ".", "get", "(", "loc", ")", ",", "features", ")", ";", "CoreLabel", "c", "=", "info", ".", "get", "(", "loc", ")", ";", "return", "new", "BasicDatum", "<", "String", ",", "String", ">", "(", "features", ",", "c", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ")", ";", "}" ]
Make an individual Datum out of the data list info, focused at position loc. @param info A List of WordInfo objects @param loc The position in the info list to focus feature creation on @param featureFactory The factory that constructs features out of the item @return A Datum (BasicDatum) representing this data instance
[ "Make", "an", "individual", "Datum", "out", "of", "the", "data", "list", "info", "focused", "at", "position", "loc", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java#L1184-L1198
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java
CMMClassifier.addOtherClasses
private static Collection<String> addOtherClasses(Collection<String> feats, List<? extends CoreLabel> info, int loc, Clique c) { String addend = null; String pAnswer = info.get(loc - 1).get(AnswerAnnotation.class); String p2Answer = info.get(loc - 2).get(AnswerAnnotation.class); String p3Answer = info.get(loc - 3).get(AnswerAnnotation.class); String p4Answer = info.get(loc - 4).get(AnswerAnnotation.class); String p5Answer = info.get(loc - 5).get(AnswerAnnotation.class); String nAnswer = info.get(loc + 1).get(AnswerAnnotation.class); // cdm 2009: Is this really right? Do we not need to differentiate names that would collide??? if (c == FeatureFactory.cliqueCpC) { addend = '|' + pAnswer; } else if (c == FeatureFactory.cliqueCp2C) { addend = '|' + p2Answer; } else if (c == FeatureFactory.cliqueCp3C) { addend = '|' + p3Answer; } else if (c == FeatureFactory.cliqueCp4C) { addend = '|' + p4Answer; } else if (c == FeatureFactory.cliqueCp5C) { addend = '|' + p5Answer; } else if (c == FeatureFactory.cliqueCpCp2C) { addend = '|' + pAnswer + '-' + p2Answer; } else if (c == FeatureFactory.cliqueCpCp2Cp3C) { addend = '|' + pAnswer + '-' + p2Answer + '-' + p3Answer; } else if (c == FeatureFactory.cliqueCpCp2Cp3Cp4C) { addend = '|' + pAnswer + '-' + p2Answer + '-' + p3Answer + '-' + p4Answer; } else if (c == FeatureFactory.cliqueCpCp2Cp3Cp4Cp5C) { addend = '|' + pAnswer + '-' + p2Answer + '-' + p3Answer + '-' + p4Answer + '-' + p5Answer; } else if (c == FeatureFactory.cliqueCnC) { addend = '|' + nAnswer; } else if (c == FeatureFactory.cliqueCpCnC) { addend = '|' + pAnswer + '-' + nAnswer; } if (addend == null) { return feats; } Collection<String> newFeats = new HashSet<String>(); for (String feat : feats) { String newFeat = feat + addend; newFeats.add(newFeat); } return newFeats; }
java
private static Collection<String> addOtherClasses(Collection<String> feats, List<? extends CoreLabel> info, int loc, Clique c) { String addend = null; String pAnswer = info.get(loc - 1).get(AnswerAnnotation.class); String p2Answer = info.get(loc - 2).get(AnswerAnnotation.class); String p3Answer = info.get(loc - 3).get(AnswerAnnotation.class); String p4Answer = info.get(loc - 4).get(AnswerAnnotation.class); String p5Answer = info.get(loc - 5).get(AnswerAnnotation.class); String nAnswer = info.get(loc + 1).get(AnswerAnnotation.class); // cdm 2009: Is this really right? Do we not need to differentiate names that would collide??? if (c == FeatureFactory.cliqueCpC) { addend = '|' + pAnswer; } else if (c == FeatureFactory.cliqueCp2C) { addend = '|' + p2Answer; } else if (c == FeatureFactory.cliqueCp3C) { addend = '|' + p3Answer; } else if (c == FeatureFactory.cliqueCp4C) { addend = '|' + p4Answer; } else if (c == FeatureFactory.cliqueCp5C) { addend = '|' + p5Answer; } else if (c == FeatureFactory.cliqueCpCp2C) { addend = '|' + pAnswer + '-' + p2Answer; } else if (c == FeatureFactory.cliqueCpCp2Cp3C) { addend = '|' + pAnswer + '-' + p2Answer + '-' + p3Answer; } else if (c == FeatureFactory.cliqueCpCp2Cp3Cp4C) { addend = '|' + pAnswer + '-' + p2Answer + '-' + p3Answer + '-' + p4Answer; } else if (c == FeatureFactory.cliqueCpCp2Cp3Cp4Cp5C) { addend = '|' + pAnswer + '-' + p2Answer + '-' + p3Answer + '-' + p4Answer + '-' + p5Answer; } else if (c == FeatureFactory.cliqueCnC) { addend = '|' + nAnswer; } else if (c == FeatureFactory.cliqueCpCnC) { addend = '|' + pAnswer + '-' + nAnswer; } if (addend == null) { return feats; } Collection<String> newFeats = new HashSet<String>(); for (String feat : feats) { String newFeat = feat + addend; newFeats.add(newFeat); } return newFeats; }
[ "private", "static", "Collection", "<", "String", ">", "addOtherClasses", "(", "Collection", "<", "String", ">", "feats", ",", "List", "<", "?", "extends", "CoreLabel", ">", "info", ",", "int", "loc", ",", "Clique", "c", ")", "{", "String", "addend", "=", "null", ";", "String", "pAnswer", "=", "info", ".", "get", "(", "loc", "-", "1", ")", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "String", "p2Answer", "=", "info", ".", "get", "(", "loc", "-", "2", ")", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "String", "p3Answer", "=", "info", ".", "get", "(", "loc", "-", "3", ")", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "String", "p4Answer", "=", "info", ".", "get", "(", "loc", "-", "4", ")", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "String", "p5Answer", "=", "info", ".", "get", "(", "loc", "-", "5", ")", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "String", "nAnswer", "=", "info", ".", "get", "(", "loc", "+", "1", ")", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "// cdm 2009: Is this really right? Do we not need to differentiate names that would collide???\r", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCpC", ")", "{", "addend", "=", "'", "'", "+", "pAnswer", ";", "}", "else", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCp2C", ")", "{", "addend", "=", "'", "'", "+", "p2Answer", ";", "}", "else", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCp3C", ")", "{", "addend", "=", "'", "'", "+", "p3Answer", ";", "}", "else", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCp4C", ")", "{", "addend", "=", "'", "'", "+", "p4Answer", ";", "}", "else", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCp5C", ")", "{", "addend", "=", "'", "'", "+", "p5Answer", ";", "}", "else", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCpCp2C", ")", "{", "addend", "=", "'", "'", "+", "pAnswer", "+", "'", "'", "+", "p2Answer", ";", "}", "else", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCpCp2Cp3C", ")", "{", "addend", "=", "'", "'", "+", "pAnswer", "+", "'", "'", "+", "p2Answer", "+", "'", "'", "+", "p3Answer", ";", "}", "else", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCpCp2Cp3Cp4C", ")", "{", "addend", "=", "'", "'", "+", "pAnswer", "+", "'", "'", "+", "p2Answer", "+", "'", "'", "+", "p3Answer", "+", "'", "'", "+", "p4Answer", ";", "}", "else", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCpCp2Cp3Cp4Cp5C", ")", "{", "addend", "=", "'", "'", "+", "pAnswer", "+", "'", "'", "+", "p2Answer", "+", "'", "'", "+", "p3Answer", "+", "'", "'", "+", "p4Answer", "+", "'", "'", "+", "p5Answer", ";", "}", "else", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCnC", ")", "{", "addend", "=", "'", "'", "+", "nAnswer", ";", "}", "else", "if", "(", "c", "==", "FeatureFactory", ".", "cliqueCpCnC", ")", "{", "addend", "=", "'", "'", "+", "pAnswer", "+", "'", "'", "+", "nAnswer", ";", "}", "if", "(", "addend", "==", "null", ")", "{", "return", "feats", ";", "}", "Collection", "<", "String", ">", "newFeats", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "for", "(", "String", "feat", ":", "feats", ")", "{", "String", "newFeat", "=", "feat", "+", "addend", ";", "newFeats", ".", "add", "(", "newFeat", ")", ";", "}", "return", "newFeats", ";", "}" ]
This adds to the feature name the name of classes that are other than the current class that are involved in the clique. In the CMM, these other classes become part of the conditioning feature, and only the class of the current position is being predicted. @return A collection of features with extra class information put into the feature name.
[ "This", "adds", "to", "the", "feature", "name", "the", "name", "of", "classes", "that", "are", "other", "than", "the", "current", "class", "that", "are", "involved", "in", "the", "clique", ".", "In", "the", "CMM", "these", "other", "classes", "become", "part", "of", "the", "conditioning", "feature", "and", "only", "the", "class", "of", "the", "current", "position", "is", "being", "predicted", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java#L1209-L1251
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java
CMMClassifier.main
public static void main(String[] args) throws Exception { StringUtils.printErrInvocationString("CMMClassifier", args); Properties props = StringUtils.argsToProperties(args); CMMClassifier cmm = new CMMClassifier<CoreLabel>(props); String testFile = cmm.flags.testFile; String textFile = cmm.flags.textFile; String loadPath = cmm.flags.loadClassifier; String serializeTo = cmm.flags.serializeTo; // cmm.crossValidateTrainAndTest(trainFile); if (loadPath != null) { cmm.loadClassifierNoExceptions(loadPath, props); } else if (cmm.flags.loadJarClassifier != null) { cmm.loadJarClassifier(cmm.flags.loadJarClassifier, props); } else if (cmm.flags.trainFile != null) { if (cmm.flags.biasedTrainFile != null) { cmm.trainSemiSup(); } else { cmm.train(); } } else { cmm.loadDefaultClassifier(); } if (serializeTo != null) { cmm.serializeClassifier(serializeTo); } if (testFile != null) { cmm.classifyAndWriteAnswers(testFile, cmm.makeReaderAndWriter()); } else if (cmm.flags.testFiles != null) { cmm.classifyAndWriteAnswers(cmm.flags.baseTestDir, cmm.flags.testFiles, cmm.makeReaderAndWriter()); } if (textFile != null) { DocumentReaderAndWriter readerAndWriter = new PlainTextDocumentReaderAndWriter(); cmm.classifyAndWriteAnswers(textFile, readerAndWriter); } }
java
public static void main(String[] args) throws Exception { StringUtils.printErrInvocationString("CMMClassifier", args); Properties props = StringUtils.argsToProperties(args); CMMClassifier cmm = new CMMClassifier<CoreLabel>(props); String testFile = cmm.flags.testFile; String textFile = cmm.flags.textFile; String loadPath = cmm.flags.loadClassifier; String serializeTo = cmm.flags.serializeTo; // cmm.crossValidateTrainAndTest(trainFile); if (loadPath != null) { cmm.loadClassifierNoExceptions(loadPath, props); } else if (cmm.flags.loadJarClassifier != null) { cmm.loadJarClassifier(cmm.flags.loadJarClassifier, props); } else if (cmm.flags.trainFile != null) { if (cmm.flags.biasedTrainFile != null) { cmm.trainSemiSup(); } else { cmm.train(); } } else { cmm.loadDefaultClassifier(); } if (serializeTo != null) { cmm.serializeClassifier(serializeTo); } if (testFile != null) { cmm.classifyAndWriteAnswers(testFile, cmm.makeReaderAndWriter()); } else if (cmm.flags.testFiles != null) { cmm.classifyAndWriteAnswers(cmm.flags.baseTestDir, cmm.flags.testFiles, cmm.makeReaderAndWriter()); } if (textFile != null) { DocumentReaderAndWriter readerAndWriter = new PlainTextDocumentReaderAndWriter(); cmm.classifyAndWriteAnswers(textFile, readerAndWriter); } }
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "StringUtils", ".", "printErrInvocationString", "(", "\"CMMClassifier\"", ",", "args", ")", ";", "Properties", "props", "=", "StringUtils", ".", "argsToProperties", "(", "args", ")", ";", "CMMClassifier", "cmm", "=", "new", "CMMClassifier", "<", "CoreLabel", ">", "(", "props", ")", ";", "String", "testFile", "=", "cmm", ".", "flags", ".", "testFile", ";", "String", "textFile", "=", "cmm", ".", "flags", ".", "textFile", ";", "String", "loadPath", "=", "cmm", ".", "flags", ".", "loadClassifier", ";", "String", "serializeTo", "=", "cmm", ".", "flags", ".", "serializeTo", ";", "// cmm.crossValidateTrainAndTest(trainFile);\r", "if", "(", "loadPath", "!=", "null", ")", "{", "cmm", ".", "loadClassifierNoExceptions", "(", "loadPath", ",", "props", ")", ";", "}", "else", "if", "(", "cmm", ".", "flags", ".", "loadJarClassifier", "!=", "null", ")", "{", "cmm", ".", "loadJarClassifier", "(", "cmm", ".", "flags", ".", "loadJarClassifier", ",", "props", ")", ";", "}", "else", "if", "(", "cmm", ".", "flags", ".", "trainFile", "!=", "null", ")", "{", "if", "(", "cmm", ".", "flags", ".", "biasedTrainFile", "!=", "null", ")", "{", "cmm", ".", "trainSemiSup", "(", ")", ";", "}", "else", "{", "cmm", ".", "train", "(", ")", ";", "}", "}", "else", "{", "cmm", ".", "loadDefaultClassifier", "(", ")", ";", "}", "if", "(", "serializeTo", "!=", "null", ")", "{", "cmm", ".", "serializeClassifier", "(", "serializeTo", ")", ";", "}", "if", "(", "testFile", "!=", "null", ")", "{", "cmm", ".", "classifyAndWriteAnswers", "(", "testFile", ",", "cmm", ".", "makeReaderAndWriter", "(", ")", ")", ";", "}", "else", "if", "(", "cmm", ".", "flags", ".", "testFiles", "!=", "null", ")", "{", "cmm", ".", "classifyAndWriteAnswers", "(", "cmm", ".", "flags", ".", "baseTestDir", ",", "cmm", ".", "flags", ".", "testFiles", ",", "cmm", ".", "makeReaderAndWriter", "(", ")", ")", ";", "}", "if", "(", "textFile", "!=", "null", ")", "{", "DocumentReaderAndWriter", "readerAndWriter", "=", "new", "PlainTextDocumentReaderAndWriter", "(", ")", ";", "cmm", ".", "classifyAndWriteAnswers", "(", "textFile", ",", "readerAndWriter", ")", ";", "}", "}" ]
Command-line version of the classifier. See the class comments for examples of use, and SeqClassifierFlags for more information on supported flags.
[ "Command", "-", "line", "version", "of", "the", "classifier", ".", "See", "the", "class", "comments", "for", "examples", "of", "use", "and", "SeqClassifierFlags", "for", "more", "information", "on", "supported", "flags", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/ner/CMMClassifier.java#L1560-L1601
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nspbr6_stats.java
nspbr6_stats.get
public static nspbr6_stats[] get(nitro_service service, options option) throws Exception{ nspbr6_stats obj = new nspbr6_stats(); nspbr6_stats[] response = (nspbr6_stats[])obj.stat_resources(service,option); return response; }
java
public static nspbr6_stats[] get(nitro_service service, options option) throws Exception{ nspbr6_stats obj = new nspbr6_stats(); nspbr6_stats[] response = (nspbr6_stats[])obj.stat_resources(service,option); return response; }
[ "public", "static", "nspbr6_stats", "[", "]", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "nspbr6_stats", "obj", "=", "new", "nspbr6_stats", "(", ")", ";", "nspbr6_stats", "[", "]", "response", "=", "(", "nspbr6_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch the statistics of all nspbr6_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "nspbr6_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nspbr6_stats.java#L220-L224
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nspbr6_stats.java
nspbr6_stats.get
public static nspbr6_stats get(nitro_service service, String name) throws Exception{ nspbr6_stats obj = new nspbr6_stats(); obj.set_name(name); nspbr6_stats response = (nspbr6_stats) obj.stat_resource(service); return response; }
java
public static nspbr6_stats get(nitro_service service, String name) throws Exception{ nspbr6_stats obj = new nspbr6_stats(); obj.set_name(name); nspbr6_stats response = (nspbr6_stats) obj.stat_resource(service); return response; }
[ "public", "static", "nspbr6_stats", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "nspbr6_stats", "obj", "=", "new", "nspbr6_stats", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "nspbr6_stats", "response", "=", "(", "nspbr6_stats", ")", "obj", ".", "stat_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch statistics of nspbr6_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "nspbr6_stats", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nspbr6_stats.java#L229-L234
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.add
public static base_response add(nitro_service client, gslbsite resource) throws Exception { gslbsite addresource = new gslbsite(); addresource.sitename = resource.sitename; addresource.sitetype = resource.sitetype; addresource.siteipaddress = resource.siteipaddress; addresource.publicip = resource.publicip; addresource.metricexchange = resource.metricexchange; addresource.nwmetricexchange = resource.nwmetricexchange; addresource.sessionexchange = resource.sessionexchange; addresource.triggermonitor = resource.triggermonitor; addresource.parentsite = resource.parentsite; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, gslbsite resource) throws Exception { gslbsite addresource = new gslbsite(); addresource.sitename = resource.sitename; addresource.sitetype = resource.sitetype; addresource.siteipaddress = resource.siteipaddress; addresource.publicip = resource.publicip; addresource.metricexchange = resource.metricexchange; addresource.nwmetricexchange = resource.nwmetricexchange; addresource.sessionexchange = resource.sessionexchange; addresource.triggermonitor = resource.triggermonitor; addresource.parentsite = resource.parentsite; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "gslbsite", "resource", ")", "throws", "Exception", "{", "gslbsite", "addresource", "=", "new", "gslbsite", "(", ")", ";", "addresource", ".", "sitename", "=", "resource", ".", "sitename", ";", "addresource", ".", "sitetype", "=", "resource", ".", "sitetype", ";", "addresource", ".", "siteipaddress", "=", "resource", ".", "siteipaddress", ";", "addresource", ".", "publicip", "=", "resource", ".", "publicip", ";", "addresource", ".", "metricexchange", "=", "resource", ".", "metricexchange", ";", "addresource", ".", "nwmetricexchange", "=", "resource", ".", "nwmetricexchange", ";", "addresource", ".", "sessionexchange", "=", "resource", ".", "sessionexchange", ";", "addresource", ".", "triggermonitor", "=", "resource", ".", "triggermonitor", ";", "addresource", ".", "parentsite", "=", "resource", ".", "parentsite", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add gslbsite.
[ "Use", "this", "API", "to", "add", "gslbsite", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java#L296-L308
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.add
public static base_responses add(nitro_service client, gslbsite resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { gslbsite addresources[] = new gslbsite[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new gslbsite(); addresources[i].sitename = resources[i].sitename; addresources[i].sitetype = resources[i].sitetype; addresources[i].siteipaddress = resources[i].siteipaddress; addresources[i].publicip = resources[i].publicip; addresources[i].metricexchange = resources[i].metricexchange; addresources[i].nwmetricexchange = resources[i].nwmetricexchange; addresources[i].sessionexchange = resources[i].sessionexchange; addresources[i].triggermonitor = resources[i].triggermonitor; addresources[i].parentsite = resources[i].parentsite; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, gslbsite resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { gslbsite addresources[] = new gslbsite[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new gslbsite(); addresources[i].sitename = resources[i].sitename; addresources[i].sitetype = resources[i].sitetype; addresources[i].siteipaddress = resources[i].siteipaddress; addresources[i].publicip = resources[i].publicip; addresources[i].metricexchange = resources[i].metricexchange; addresources[i].nwmetricexchange = resources[i].nwmetricexchange; addresources[i].sessionexchange = resources[i].sessionexchange; addresources[i].triggermonitor = resources[i].triggermonitor; addresources[i].parentsite = resources[i].parentsite; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "gslbsite", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "gslbsite", "addresources", "[", "]", "=", "new", "gslbsite", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "gslbsite", "(", ")", ";", "addresources", "[", "i", "]", ".", "sitename", "=", "resources", "[", "i", "]", ".", "sitename", ";", "addresources", "[", "i", "]", ".", "sitetype", "=", "resources", "[", "i", "]", ".", "sitetype", ";", "addresources", "[", "i", "]", ".", "siteipaddress", "=", "resources", "[", "i", "]", ".", "siteipaddress", ";", "addresources", "[", "i", "]", ".", "publicip", "=", "resources", "[", "i", "]", ".", "publicip", ";", "addresources", "[", "i", "]", ".", "metricexchange", "=", "resources", "[", "i", "]", ".", "metricexchange", ";", "addresources", "[", "i", "]", ".", "nwmetricexchange", "=", "resources", "[", "i", "]", ".", "nwmetricexchange", ";", "addresources", "[", "i", "]", ".", "sessionexchange", "=", "resources", "[", "i", "]", ".", "sessionexchange", ";", "addresources", "[", "i", "]", ".", "triggermonitor", "=", "resources", "[", "i", "]", ".", "triggermonitor", ";", "addresources", "[", "i", "]", ".", "parentsite", "=", "resources", "[", "i", "]", ".", "parentsite", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add gslbsite resources.
[ "Use", "this", "API", "to", "add", "gslbsite", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java#L313-L332
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.delete
public static base_response delete(nitro_service client, String sitename) throws Exception { gslbsite deleteresource = new gslbsite(); deleteresource.sitename = sitename; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, String sitename) throws Exception { gslbsite deleteresource = new gslbsite(); deleteresource.sitename = sitename; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "String", "sitename", ")", "throws", "Exception", "{", "gslbsite", "deleteresource", "=", "new", "gslbsite", "(", ")", ";", "deleteresource", ".", "sitename", "=", "sitename", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete gslbsite of given name.
[ "Use", "this", "API", "to", "delete", "gslbsite", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java#L337-L341
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.delete
public static base_responses delete(nitro_service client, String sitename[]) throws Exception { base_responses result = null; if (sitename != null && sitename.length > 0) { gslbsite deleteresources[] = new gslbsite[sitename.length]; for (int i=0;i<sitename.length;i++){ deleteresources[i] = new gslbsite(); deleteresources[i].sitename = sitename[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
java
public static base_responses delete(nitro_service client, String sitename[]) throws Exception { base_responses result = null; if (sitename != null && sitename.length > 0) { gslbsite deleteresources[] = new gslbsite[sitename.length]; for (int i=0;i<sitename.length;i++){ deleteresources[i] = new gslbsite(); deleteresources[i].sitename = sitename[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "public", "static", "base_responses", "delete", "(", "nitro_service", "client", ",", "String", "sitename", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "sitename", "!=", "null", "&&", "sitename", ".", "length", ">", "0", ")", "{", "gslbsite", "deleteresources", "[", "]", "=", "new", "gslbsite", "[", "sitename", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "sitename", ".", "length", ";", "i", "++", ")", "{", "deleteresources", "[", "i", "]", "=", "new", "gslbsite", "(", ")", ";", "deleteresources", "[", "i", "]", ".", "sitename", "=", "sitename", "[", "i", "]", ";", "}", "result", "=", "delete_bulk_request", "(", "client", ",", "deleteresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to delete gslbsite resources of given names.
[ "Use", "this", "API", "to", "delete", "gslbsite", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java#L355-L366
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.update
public static base_response update(nitro_service client, gslbsite resource) throws Exception { gslbsite updateresource = new gslbsite(); updateresource.sitename = resource.sitename; updateresource.metricexchange = resource.metricexchange; updateresource.nwmetricexchange = resource.nwmetricexchange; updateresource.sessionexchange = resource.sessionexchange; updateresource.triggermonitor = resource.triggermonitor; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, gslbsite resource) throws Exception { gslbsite updateresource = new gslbsite(); updateresource.sitename = resource.sitename; updateresource.metricexchange = resource.metricexchange; updateresource.nwmetricexchange = resource.nwmetricexchange; updateresource.sessionexchange = resource.sessionexchange; updateresource.triggermonitor = resource.triggermonitor; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "gslbsite", "resource", ")", "throws", "Exception", "{", "gslbsite", "updateresource", "=", "new", "gslbsite", "(", ")", ";", "updateresource", ".", "sitename", "=", "resource", ".", "sitename", ";", "updateresource", ".", "metricexchange", "=", "resource", ".", "metricexchange", ";", "updateresource", ".", "nwmetricexchange", "=", "resource", ".", "nwmetricexchange", ";", "updateresource", ".", "sessionexchange", "=", "resource", ".", "sessionexchange", ";", "updateresource", ".", "triggermonitor", "=", "resource", ".", "triggermonitor", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update gslbsite.
[ "Use", "this", "API", "to", "update", "gslbsite", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java#L387-L395
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.update
public static base_responses update(nitro_service client, gslbsite resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { gslbsite updateresources[] = new gslbsite[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new gslbsite(); updateresources[i].sitename = resources[i].sitename; updateresources[i].metricexchange = resources[i].metricexchange; updateresources[i].nwmetricexchange = resources[i].nwmetricexchange; updateresources[i].sessionexchange = resources[i].sessionexchange; updateresources[i].triggermonitor = resources[i].triggermonitor; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, gslbsite resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { gslbsite updateresources[] = new gslbsite[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new gslbsite(); updateresources[i].sitename = resources[i].sitename; updateresources[i].metricexchange = resources[i].metricexchange; updateresources[i].nwmetricexchange = resources[i].nwmetricexchange; updateresources[i].sessionexchange = resources[i].sessionexchange; updateresources[i].triggermonitor = resources[i].triggermonitor; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "gslbsite", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "gslbsite", "updateresources", "[", "]", "=", "new", "gslbsite", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "gslbsite", "(", ")", ";", "updateresources", "[", "i", "]", ".", "sitename", "=", "resources", "[", "i", "]", ".", "sitename", ";", "updateresources", "[", "i", "]", ".", "metricexchange", "=", "resources", "[", "i", "]", ".", "metricexchange", ";", "updateresources", "[", "i", "]", ".", "nwmetricexchange", "=", "resources", "[", "i", "]", ".", "nwmetricexchange", ";", "updateresources", "[", "i", "]", ".", "sessionexchange", "=", "resources", "[", "i", "]", ".", "sessionexchange", ";", "updateresources", "[", "i", "]", ".", "triggermonitor", "=", "resources", "[", "i", "]", ".", "triggermonitor", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update gslbsite resources.
[ "Use", "this", "API", "to", "update", "gslbsite", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java#L400-L415
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.unset
public static base_response unset(nitro_service client, gslbsite resource, String[] args) throws Exception{ gslbsite unsetresource = new gslbsite(); unsetresource.sitename = resource.sitename; return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, gslbsite resource, String[] args) throws Exception{ gslbsite unsetresource = new gslbsite(); unsetresource.sitename = resource.sitename; return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "gslbsite", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "gslbsite", "unsetresource", "=", "new", "gslbsite", "(", ")", ";", "unsetresource", ".", "sitename", "=", "resource", ".", "sitename", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of gslbsite resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "gslbsite", "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/gslb/gslbsite.java#L421-L425
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.unset
public static base_responses unset(nitro_service client, String sitename[], String args[]) throws Exception { base_responses result = null; if (sitename != null && sitename.length > 0) { gslbsite unsetresources[] = new gslbsite[sitename.length]; for (int i=0;i<sitename.length;i++){ unsetresources[i] = new gslbsite(); unsetresources[i].sitename = sitename[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
public static base_responses unset(nitro_service client, String sitename[], String args[]) throws Exception { base_responses result = null; if (sitename != null && sitename.length > 0) { gslbsite unsetresources[] = new gslbsite[sitename.length]; for (int i=0;i<sitename.length;i++){ unsetresources[i] = new gslbsite(); unsetresources[i].sitename = sitename[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "public", "static", "base_responses", "unset", "(", "nitro_service", "client", ",", "String", "sitename", "[", "]", ",", "String", "args", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "sitename", "!=", "null", "&&", "sitename", ".", "length", ">", "0", ")", "{", "gslbsite", "unsetresources", "[", "]", "=", "new", "gslbsite", "[", "sitename", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "sitename", ".", "length", ";", "i", "++", ")", "{", "unsetresources", "[", "i", "]", "=", "new", "gslbsite", "(", ")", ";", "unsetresources", "[", "i", "]", ".", "sitename", "=", "sitename", "[", "i", "]", ";", "}", "result", "=", "unset_bulk_request", "(", "client", ",", "unsetresources", ",", "args", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to unset the properties of gslbsite resources. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "gslbsite", "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/gslb/gslbsite.java#L431-L442
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.get
public static gslbsite[] get(nitro_service service, options option) throws Exception{ gslbsite obj = new gslbsite(); gslbsite[] response = (gslbsite[])obj.get_resources(service,option); return response; }
java
public static gslbsite[] get(nitro_service service, options option) throws Exception{ gslbsite obj = new gslbsite(); gslbsite[] response = (gslbsite[])obj.get_resources(service,option); return response; }
[ "public", "static", "gslbsite", "[", "]", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "gslbsite", "obj", "=", "new", "gslbsite", "(", ")", ";", "gslbsite", "[", "]", "response", "=", "(", "gslbsite", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the gslbsite resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "gslbsite", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java#L472-L476
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.get
public static gslbsite get(nitro_service service, String sitename) throws Exception{ gslbsite obj = new gslbsite(); obj.set_sitename(sitename); gslbsite response = (gslbsite) obj.get_resource(service); return response; }
java
public static gslbsite get(nitro_service service, String sitename) throws Exception{ gslbsite obj = new gslbsite(); obj.set_sitename(sitename); gslbsite response = (gslbsite) obj.get_resource(service); return response; }
[ "public", "static", "gslbsite", "get", "(", "nitro_service", "service", ",", "String", "sitename", ")", "throws", "Exception", "{", "gslbsite", "obj", "=", "new", "gslbsite", "(", ")", ";", "obj", ".", "set_sitename", "(", "sitename", ")", ";", "gslbsite", "response", "=", "(", "gslbsite", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch gslbsite resource of given name .
[ "Use", "this", "API", "to", "fetch", "gslbsite", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java#L480-L485
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java
gslbsite.get
public static gslbsite[] get(nitro_service service, String sitename[]) throws Exception{ if (sitename !=null && sitename.length>0) { gslbsite response[] = new gslbsite[sitename.length]; gslbsite obj[] = new gslbsite[sitename.length]; for (int i=0;i<sitename.length;i++) { obj[i] = new gslbsite(); obj[i].set_sitename(sitename[i]); response[i] = (gslbsite) obj[i].get_resource(service); } return response; } return null; }
java
public static gslbsite[] get(nitro_service service, String sitename[]) throws Exception{ if (sitename !=null && sitename.length>0) { gslbsite response[] = new gslbsite[sitename.length]; gslbsite obj[] = new gslbsite[sitename.length]; for (int i=0;i<sitename.length;i++) { obj[i] = new gslbsite(); obj[i].set_sitename(sitename[i]); response[i] = (gslbsite) obj[i].get_resource(service); } return response; } return null; }
[ "public", "static", "gslbsite", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "sitename", "[", "]", ")", "throws", "Exception", "{", "if", "(", "sitename", "!=", "null", "&&", "sitename", ".", "length", ">", "0", ")", "{", "gslbsite", "response", "[", "]", "=", "new", "gslbsite", "[", "sitename", ".", "length", "]", ";", "gslbsite", "obj", "[", "]", "=", "new", "gslbsite", "[", "sitename", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "sitename", ".", "length", ";", "i", "++", ")", "{", "obj", "[", "i", "]", "=", "new", "gslbsite", "(", ")", ";", "obj", "[", "i", "]", ".", "set_sitename", "(", "sitename", "[", "i", "]", ")", ";", "response", "[", "i", "]", "=", "(", "gslbsite", ")", "obj", "[", "i", "]", ".", "get_resource", "(", "service", ")", ";", "}", "return", "response", ";", "}", "return", "null", ";", "}" ]
Use this API to fetch gslbsite resources of given names .
[ "Use", "this", "API", "to", "fetch", "gslbsite", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite.java#L490-L502
train
meertensinstituut/mtas
src/main/java/mtas/codec/util/distance/MorseDistance.java
MorseDistance.computeMorse
private String computeMorse(BytesRef term) { StringBuilder stringBuilder = new StringBuilder(); int i = term.offset + prefixOffset; for (; i < term.length; i++) { if (ALPHABET_MORSE.containsKey(term.bytes[i])) { stringBuilder.append(ALPHABET_MORSE.get(term.bytes[i]) + " "); } else if(term.bytes[i]!=0x00){ return null; } else { break; } } return stringBuilder.toString(); }
java
private String computeMorse(BytesRef term) { StringBuilder stringBuilder = new StringBuilder(); int i = term.offset + prefixOffset; for (; i < term.length; i++) { if (ALPHABET_MORSE.containsKey(term.bytes[i])) { stringBuilder.append(ALPHABET_MORSE.get(term.bytes[i]) + " "); } else if(term.bytes[i]!=0x00){ return null; } else { break; } } return stringBuilder.toString(); }
[ "private", "String", "computeMorse", "(", "BytesRef", "term", ")", "{", "StringBuilder", "stringBuilder", "=", "new", "StringBuilder", "(", ")", ";", "int", "i", "=", "term", ".", "offset", "+", "prefixOffset", ";", "for", "(", ";", "i", "<", "term", ".", "length", ";", "i", "++", ")", "{", "if", "(", "ALPHABET_MORSE", ".", "containsKey", "(", "term", ".", "bytes", "[", "i", "]", ")", ")", "{", "stringBuilder", ".", "append", "(", "ALPHABET_MORSE", ".", "get", "(", "term", ".", "bytes", "[", "i", "]", ")", "+", "\" \"", ")", ";", "}", "else", "if", "(", "term", ".", "bytes", "[", "i", "]", "!=", "0x00", ")", "{", "return", "null", ";", "}", "else", "{", "break", ";", "}", "}", "return", "stringBuilder", ".", "toString", "(", ")", ";", "}" ]
Compute morse. @param term the term @return the string
[ "Compute", "morse", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/distance/MorseDistance.java#L325-L338
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrComponentTermvector.java
MtasSolrComponentTermvector.distributedProcessFinish
private void distributedProcessFinish(ResponseBuilder rb, ComponentFields mtasFields) throws IOException { // rewrite Object mtasResponseRaw; if ((mtasResponseRaw = rb.rsp.getValues().get("mtas")) != null && mtasResponseRaw instanceof NamedList) { NamedList<Object> mtasResponse = (NamedList<Object>) mtasResponseRaw; Object mtasResponseTermvectorRaw; if ((mtasResponseTermvectorRaw = mtasResponse.get(NAME)) != null && mtasResponseTermvectorRaw instanceof ArrayList) { MtasSolrResultUtil.rewrite( (ArrayList<Object>) mtasResponseTermvectorRaw, searchComponent); } } }
java
private void distributedProcessFinish(ResponseBuilder rb, ComponentFields mtasFields) throws IOException { // rewrite Object mtasResponseRaw; if ((mtasResponseRaw = rb.rsp.getValues().get("mtas")) != null && mtasResponseRaw instanceof NamedList) { NamedList<Object> mtasResponse = (NamedList<Object>) mtasResponseRaw; Object mtasResponseTermvectorRaw; if ((mtasResponseTermvectorRaw = mtasResponse.get(NAME)) != null && mtasResponseTermvectorRaw instanceof ArrayList) { MtasSolrResultUtil.rewrite( (ArrayList<Object>) mtasResponseTermvectorRaw, searchComponent); } } }
[ "private", "void", "distributedProcessFinish", "(", "ResponseBuilder", "rb", ",", "ComponentFields", "mtasFields", ")", "throws", "IOException", "{", "// rewrite", "Object", "mtasResponseRaw", ";", "if", "(", "(", "mtasResponseRaw", "=", "rb", ".", "rsp", ".", "getValues", "(", ")", ".", "get", "(", "\"mtas\"", ")", ")", "!=", "null", "&&", "mtasResponseRaw", "instanceof", "NamedList", ")", "{", "NamedList", "<", "Object", ">", "mtasResponse", "=", "(", "NamedList", "<", "Object", ">", ")", "mtasResponseRaw", ";", "Object", "mtasResponseTermvectorRaw", ";", "if", "(", "(", "mtasResponseTermvectorRaw", "=", "mtasResponse", ".", "get", "(", "NAME", ")", ")", "!=", "null", "&&", "mtasResponseTermvectorRaw", "instanceof", "ArrayList", ")", "{", "MtasSolrResultUtil", ".", "rewrite", "(", "(", "ArrayList", "<", "Object", ">", ")", "mtasResponseTermvectorRaw", ",", "searchComponent", ")", ";", "}", "}", "}" ]
Distributed process finish. @param rb the rb @param mtasFields the mtas fields @throws IOException Signals that an I/O exception has occurred.
[ "Distributed", "process", "finish", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrComponentTermvector.java#L739-L754
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/protocol/protocoludp_stats.java
protocoludp_stats.get
public static protocoludp_stats get(nitro_service service) throws Exception{ protocoludp_stats obj = new protocoludp_stats(); protocoludp_stats[] response = (protocoludp_stats[])obj.stat_resources(service); return response[0]; }
java
public static protocoludp_stats get(nitro_service service) throws Exception{ protocoludp_stats obj = new protocoludp_stats(); protocoludp_stats[] response = (protocoludp_stats[])obj.stat_resources(service); return response[0]; }
[ "public", "static", "protocoludp_stats", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "protocoludp_stats", "obj", "=", "new", "protocoludp_stats", "(", ")", ";", "protocoludp_stats", "[", "]", "response", "=", "(", "protocoludp_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch the statistics of all protocoludp_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "protocoludp_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/protocoludp_stats.java#L218-L222
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cs/csvserver_cachepolicy_binding.java
csvserver_cachepolicy_binding.get
public static csvserver_cachepolicy_binding[] get(nitro_service service, String name) throws Exception{ csvserver_cachepolicy_binding obj = new csvserver_cachepolicy_binding(); obj.set_name(name); csvserver_cachepolicy_binding response[] = (csvserver_cachepolicy_binding[]) obj.get_resources(service); return response; }
java
public static csvserver_cachepolicy_binding[] get(nitro_service service, String name) throws Exception{ csvserver_cachepolicy_binding obj = new csvserver_cachepolicy_binding(); obj.set_name(name); csvserver_cachepolicy_binding response[] = (csvserver_cachepolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "csvserver_cachepolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "csvserver_cachepolicy_binding", "obj", "=", "new", "csvserver_cachepolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "csvserver_cachepolicy_binding", "response", "[", "]", "=", "(", "csvserver_cachepolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch csvserver_cachepolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "csvserver_cachepolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cs/csvserver_cachepolicy_binding.java#L327-L332
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationradiuspolicy_vpnglobal_binding.java
authenticationradiuspolicy_vpnglobal_binding.get
public static authenticationradiuspolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{ authenticationradiuspolicy_vpnglobal_binding obj = new authenticationradiuspolicy_vpnglobal_binding(); obj.set_name(name); authenticationradiuspolicy_vpnglobal_binding response[] = (authenticationradiuspolicy_vpnglobal_binding[]) obj.get_resources(service); return response; }
java
public static authenticationradiuspolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{ authenticationradiuspolicy_vpnglobal_binding obj = new authenticationradiuspolicy_vpnglobal_binding(); obj.set_name(name); authenticationradiuspolicy_vpnglobal_binding response[] = (authenticationradiuspolicy_vpnglobal_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "authenticationradiuspolicy_vpnglobal_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authenticationradiuspolicy_vpnglobal_binding", "obj", "=", "new", "authenticationradiuspolicy_vpnglobal_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "authenticationradiuspolicy_vpnglobal_binding", "response", "[", "]", "=", "(", "authenticationradiuspolicy_vpnglobal_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch authenticationradiuspolicy_vpnglobal_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "authenticationradiuspolicy_vpnglobal_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationradiuspolicy_vpnglobal_binding.java#L132-L137
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/HashIndex.java
HashIndex.indices
public int[] indices(Collection<E> elems) { int[] indices = new int[elems.size()]; int i = 0; for (E elem : elems) { indices[i++] = indexOf(elem); } return indices; }
java
public int[] indices(Collection<E> elems) { int[] indices = new int[elems.size()]; int i = 0; for (E elem : elems) { indices[i++] = indexOf(elem); } return indices; }
[ "public", "int", "[", "]", "indices", "(", "Collection", "<", "E", ">", "elems", ")", "{", "int", "[", "]", "indices", "=", "new", "int", "[", "elems", ".", "size", "(", ")", "]", ";", "int", "i", "=", "0", ";", "for", "(", "E", "elem", ":", "elems", ")", "{", "indices", "[", "i", "++", "]", "=", "indexOf", "(", "elem", ")", ";", "}", "return", "indices", ";", "}" ]
Returns the index of each elem in a List. @param elems The list of items @return An array of indices
[ "Returns", "the", "index", "of", "each", "elem", "in", "a", "List", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/HashIndex.java#L52-L59
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/HashIndex.java
HashIndex.get
public E get(int i) { if (i < 0 || i >= objects.size()) throw new ArrayIndexOutOfBoundsException("Index " + i + " outside the bounds [0," + size() + ")"); return objects.get(i); }
java
public E get(int i) { if (i < 0 || i >= objects.size()) throw new ArrayIndexOutOfBoundsException("Index " + i + " outside the bounds [0," + size() + ")"); return objects.get(i); }
[ "public", "E", "get", "(", "int", "i", ")", "{", "if", "(", "i", "<", "0", "||", "i", ">=", "objects", ".", "size", "(", ")", ")", "throw", "new", "ArrayIndexOutOfBoundsException", "(", "\"Index \"", "+", "i", "+", "\" outside the bounds [0,\"", "+", "size", "(", ")", "+", "\")\"", ")", ";", "return", "objects", ".", "get", "(", "i", ")", ";", "}" ]
Gets the object whose index is the integer argument. @param i the integer index to be queried for the corresponding argument @return the object whose index is the integer argument.
[ "Gets", "the", "object", "whose", "index", "is", "the", "integer", "argument", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/HashIndex.java#L98-L104
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/HashIndex.java
HashIndex.add
@Override public boolean add(E o) { Integer index = indexes.get(o); if (index == null && ! locked) { index = objects.size(); objects.add(o); indexes.put(o, index); return true; } return false; }
java
@Override public boolean add(E o) { Integer index = indexes.get(o); if (index == null && ! locked) { index = objects.size(); objects.add(o); indexes.put(o, index); return true; } return false; }
[ "@", "Override", "public", "boolean", "add", "(", "E", "o", ")", "{", "Integer", "index", "=", "indexes", ".", "get", "(", "o", ")", ";", "if", "(", "index", "==", "null", "&&", "!", "locked", ")", "{", "index", "=", "objects", ".", "size", "(", ")", ";", "objects", ".", "add", "(", "o", ")", ";", "indexes", ".", "put", "(", "o", ",", "index", ")", ";", "return", "true", ";", "}", "return", "false", ";", "}" ]
Adds an object to the Index. If it was already in the Index, then nothing is done. If it is not in the Index, then it is added iff the Index hasn't been locked. @return true if the item was added to the index and false if the item was already in the index or if the index is locked
[ "Adds", "an", "object", "to", "the", "Index", ".", "If", "it", "was", "already", "in", "the", "Index", "then", "nothing", "is", "done", ".", "If", "it", "is", "not", "in", "the", "Index", "then", "it", "is", "added", "iff", "the", "Index", "hasn", "t", "been", "locked", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/HashIndex.java#L211-L221
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan.java
vlan.add
public static base_response add(nitro_service client, vlan resource) throws Exception { vlan addresource = new vlan(); addresource.id = resource.id; addresource.aliasname = resource.aliasname; addresource.ipv6dynamicrouting = resource.ipv6dynamicrouting; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, vlan resource) throws Exception { vlan addresource = new vlan(); addresource.id = resource.id; addresource.aliasname = resource.aliasname; addresource.ipv6dynamicrouting = resource.ipv6dynamicrouting; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "vlan", "resource", ")", "throws", "Exception", "{", "vlan", "addresource", "=", "new", "vlan", "(", ")", ";", "addresource", ".", "id", "=", "resource", ".", "id", ";", "addresource", ".", "aliasname", "=", "resource", ".", "aliasname", ";", "addresource", ".", "ipv6dynamicrouting", "=", "resource", ".", "ipv6dynamicrouting", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add vlan.
[ "Use", "this", "API", "to", "add", "vlan", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan.java#L256-L262
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan.java
vlan.add
public static base_responses add(nitro_service client, vlan resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vlan addresources[] = new vlan[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new vlan(); addresources[i].id = resources[i].id; addresources[i].aliasname = resources[i].aliasname; addresources[i].ipv6dynamicrouting = resources[i].ipv6dynamicrouting; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, vlan resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vlan addresources[] = new vlan[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new vlan(); addresources[i].id = resources[i].id; addresources[i].aliasname = resources[i].aliasname; addresources[i].ipv6dynamicrouting = resources[i].ipv6dynamicrouting; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "vlan", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "vlan", "addresources", "[", "]", "=", "new", "vlan", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "vlan", "(", ")", ";", "addresources", "[", "i", "]", ".", "id", "=", "resources", "[", "i", "]", ".", "id", ";", "addresources", "[", "i", "]", ".", "aliasname", "=", "resources", "[", "i", "]", ".", "aliasname", ";", "addresources", "[", "i", "]", ".", "ipv6dynamicrouting", "=", "resources", "[", "i", "]", ".", "ipv6dynamicrouting", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add vlan resources.
[ "Use", "this", "API", "to", "add", "vlan", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan.java#L267-L280
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan.java
vlan.update
public static base_response update(nitro_service client, vlan resource) throws Exception { vlan updateresource = new vlan(); updateresource.id = resource.id; updateresource.aliasname = resource.aliasname; updateresource.ipv6dynamicrouting = resource.ipv6dynamicrouting; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, vlan resource) throws Exception { vlan updateresource = new vlan(); updateresource.id = resource.id; updateresource.aliasname = resource.aliasname; updateresource.ipv6dynamicrouting = resource.ipv6dynamicrouting; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "vlan", "resource", ")", "throws", "Exception", "{", "vlan", "updateresource", "=", "new", "vlan", "(", ")", ";", "updateresource", ".", "id", "=", "resource", ".", "id", ";", "updateresource", ".", "aliasname", "=", "resource", ".", "aliasname", ";", "updateresource", ".", "ipv6dynamicrouting", "=", "resource", ".", "ipv6dynamicrouting", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update vlan.
[ "Use", "this", "API", "to", "update", "vlan", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan.java#L335-L341
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan.java
vlan.get
public static vlan[] get(nitro_service service) throws Exception{ vlan obj = new vlan(); vlan[] response = (vlan[])obj.get_resources(service); return response; }
java
public static vlan[] get(nitro_service service) throws Exception{ vlan obj = new vlan(); vlan[] response = (vlan[])obj.get_resources(service); return response; }
[ "public", "static", "vlan", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "vlan", "obj", "=", "new", "vlan", "(", ")", ";", "vlan", "[", "]", "response", "=", "(", "vlan", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the vlan resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "vlan", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan.java#L408-L412
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan.java
vlan.get
public static vlan get(nitro_service service, Long id) throws Exception{ vlan obj = new vlan(); obj.set_id(id); vlan response = (vlan) obj.get_resource(service); return response; }
java
public static vlan get(nitro_service service, Long id) throws Exception{ vlan obj = new vlan(); obj.set_id(id); vlan response = (vlan) obj.get_resource(service); return response; }
[ "public", "static", "vlan", "get", "(", "nitro_service", "service", ",", "Long", "id", ")", "throws", "Exception", "{", "vlan", "obj", "=", "new", "vlan", "(", ")", ";", "obj", ".", "set_id", "(", "id", ")", ";", "vlan", "response", "=", "(", "vlan", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch vlan resource of given name .
[ "Use", "this", "API", "to", "fetch", "vlan", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan.java#L424-L429
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemcore.java
systemcore.get
public static systemcore get(nitro_service service) throws Exception{ systemcore obj = new systemcore(); systemcore[] response = (systemcore[])obj.get_resources(service); return response[0]; }
java
public static systemcore get(nitro_service service) throws Exception{ systemcore obj = new systemcore(); systemcore[] response = (systemcore[])obj.get_resources(service); return response[0]; }
[ "public", "static", "systemcore", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "systemcore", "obj", "=", "new", "systemcore", "(", ")", ";", "systemcore", "[", "]", "response", "=", "(", "systemcore", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the systemcore resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "systemcore", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemcore.java#L107-L111
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemcore.java
systemcore.get
public static systemcore[] get(nitro_service service, systemcore_args args) throws Exception{ systemcore obj = new systemcore(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); systemcore[] response = (systemcore[])obj.get_resources(service, option); return response; }
java
public static systemcore[] get(nitro_service service, systemcore_args args) throws Exception{ systemcore obj = new systemcore(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); systemcore[] response = (systemcore[])obj.get_resources(service, option); return response; }
[ "public", "static", "systemcore", "[", "]", "get", "(", "nitro_service", "service", ",", "systemcore_args", "args", ")", "throws", "Exception", "{", "systemcore", "obj", "=", "new", "systemcore", "(", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_args", "(", "nitro_util", ".", "object_to_string_withoutquotes", "(", "args", ")", ")", ";", "systemcore", "[", "]", "response", "=", "(", "systemcore", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the systemcore resources that are configured on netscaler. This uses systemcore_args which is a way to provide additional arguments while fetching the resources.
[ "Use", "this", "API", "to", "fetch", "all", "the", "systemcore", "resources", "that", "are", "configured", "on", "netscaler", ".", "This", "uses", "systemcore_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/system/systemcore.java#L126-L132
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/network/rnat_stats.java
rnat_stats.get
public static rnat_stats get(nitro_service service) throws Exception{ rnat_stats obj = new rnat_stats(); rnat_stats[] response = (rnat_stats[])obj.stat_resources(service); return response[0]; }
java
public static rnat_stats get(nitro_service service) throws Exception{ rnat_stats obj = new rnat_stats(); rnat_stats[] response = (rnat_stats[])obj.stat_resources(service); return response[0]; }
[ "public", "static", "rnat_stats", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "rnat_stats", "obj", "=", "new", "rnat_stats", "(", ")", ";", "rnat_stats", "[", "]", "response", "=", "(", "rnat_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch the statistics of all rnat_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "rnat_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/network/rnat_stats.java#L204-L208
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/snmp/snmpoption.java
snmpoption.update
public static base_response update(nitro_service client, snmpoption resource) throws Exception { snmpoption updateresource = new snmpoption(); updateresource.snmpset = resource.snmpset; updateresource.snmptraplogging = resource.snmptraplogging; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, snmpoption resource) throws Exception { snmpoption updateresource = new snmpoption(); updateresource.snmpset = resource.snmpset; updateresource.snmptraplogging = resource.snmptraplogging; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "snmpoption", "resource", ")", "throws", "Exception", "{", "snmpoption", "updateresource", "=", "new", "snmpoption", "(", ")", ";", "updateresource", ".", "snmpset", "=", "resource", ".", "snmpset", ";", "updateresource", ".", "snmptraplogging", "=", "resource", ".", "snmptraplogging", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update snmpoption.
[ "Use", "this", "API", "to", "update", "snmpoption", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/snmp/snmpoption.java#L113-L118
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/snmp/snmpoption.java
snmpoption.unset
public static base_response unset(nitro_service client, snmpoption resource, String[] args) throws Exception{ snmpoption unsetresource = new snmpoption(); return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, snmpoption resource, String[] args) throws Exception{ snmpoption unsetresource = new snmpoption(); return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "snmpoption", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "snmpoption", "unsetresource", "=", "new", "snmpoption", "(", ")", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of snmpoption resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "snmpoption", "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/snmp/snmpoption.java#L124-L127
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/snmp/snmpoption.java
snmpoption.get
public static snmpoption get(nitro_service service) throws Exception{ snmpoption obj = new snmpoption(); snmpoption[] response = (snmpoption[])obj.get_resources(service); return response[0]; }
java
public static snmpoption get(nitro_service service) throws Exception{ snmpoption obj = new snmpoption(); snmpoption[] response = (snmpoption[])obj.get_resources(service); return response[0]; }
[ "public", "static", "snmpoption", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "snmpoption", "obj", "=", "new", "snmpoption", "(", ")", ";", "snmpoption", "[", "]", "response", "=", "(", "snmpoption", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the snmpoption resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "snmpoption", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/snmp/snmpoption.java#L132-L136
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbvserver_filterpolicy_binding.java
lbvserver_filterpolicy_binding.get
public static lbvserver_filterpolicy_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_filterpolicy_binding obj = new lbvserver_filterpolicy_binding(); obj.set_name(name); lbvserver_filterpolicy_binding response[] = (lbvserver_filterpolicy_binding[]) obj.get_resources(service); return response; }
java
public static lbvserver_filterpolicy_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_filterpolicy_binding obj = new lbvserver_filterpolicy_binding(); obj.set_name(name); lbvserver_filterpolicy_binding response[] = (lbvserver_filterpolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "lbvserver_filterpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "lbvserver_filterpolicy_binding", "obj", "=", "new", "lbvserver_filterpolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "lbvserver_filterpolicy_binding", "response", "[", "]", "=", "(", "lbvserver_filterpolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch lbvserver_filterpolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "lbvserver_filterpolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbvserver_filterpolicy_binding.java#L346-L351
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.removeHandler
protected static <E extends LogRecordHandler> boolean removeHandler(Class<E> toRemove) { boolean rtn = false; Iterator<LogRecordHandler> iter = handlers.iterator(); while(iter.hasNext()){ if(iter.next().getClass().equals(toRemove)){ rtn = true; iter.remove(); } } return rtn; }
java
protected static <E extends LogRecordHandler> boolean removeHandler(Class<E> toRemove) { boolean rtn = false; Iterator<LogRecordHandler> iter = handlers.iterator(); while(iter.hasNext()){ if(iter.next().getClass().equals(toRemove)){ rtn = true; iter.remove(); } } return rtn; }
[ "protected", "static", "<", "E", "extends", "LogRecordHandler", ">", "boolean", "removeHandler", "(", "Class", "<", "E", ">", "toRemove", ")", "{", "boolean", "rtn", "=", "false", ";", "Iterator", "<", "LogRecordHandler", ">", "iter", "=", "handlers", ".", "iterator", "(", ")", ";", "while", "(", "iter", ".", "hasNext", "(", ")", ")", "{", "if", "(", "iter", ".", "next", "(", ")", ".", "getClass", "(", ")", ".", "equals", "(", "toRemove", ")", ")", "{", "rtn", "=", "true", ";", "iter", ".", "remove", "(", ")", ";", "}", "}", "return", "rtn", ";", "}" ]
Remove a handler from the list @param toRemove The handler to remove. Any handler object that matches this class will be removed. @return true if this handler was in the list.
[ "Remove", "a", "handler", "from", "the", "list" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L234-L244
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.appendHandler
protected static void appendHandler(LogRecordHandler parent, LogRecordHandler child){ RecordHandlerTree p = handlers.find(parent); if(p != null){ p.addChild(child); } else { throw new IllegalArgumentException("No such parent handler: " + parent); } }
java
protected static void appendHandler(LogRecordHandler parent, LogRecordHandler child){ RecordHandlerTree p = handlers.find(parent); if(p != null){ p.addChild(child); } else { throw new IllegalArgumentException("No such parent handler: " + parent); } }
[ "protected", "static", "void", "appendHandler", "(", "LogRecordHandler", "parent", ",", "LogRecordHandler", "child", ")", "{", "RecordHandlerTree", "p", "=", "handlers", ".", "find", "(", "parent", ")", ";", "if", "(", "p", "!=", "null", ")", "{", "p", ".", "addChild", "(", "child", ")", ";", "}", "else", "{", "throw", "new", "IllegalArgumentException", "(", "\"No such parent handler: \"", "+", "parent", ")", ";", "}", "}" ]
Append a Handler to a portion of the handler tree @param parent The parent to add the child to @param child The Handler to add.
[ "Append", "a", "Handler", "to", "a", "portion", "of", "the", "handler", "tree" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L313-L320
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.appendHandler
protected static void appendHandler(Class<? extends LogRecordHandler> parent, LogRecordHandler child){ List<LogRecordHandler> toAdd = new LinkedList<LogRecordHandler>(); //--Find Parents for(LogRecordHandler term : handlers){ if(parent.isAssignableFrom(term.getClass())){ toAdd.add(term); } } //--Add Handler for(LogRecordHandler p : toAdd){ appendHandler(p, child); } }
java
protected static void appendHandler(Class<? extends LogRecordHandler> parent, LogRecordHandler child){ List<LogRecordHandler> toAdd = new LinkedList<LogRecordHandler>(); //--Find Parents for(LogRecordHandler term : handlers){ if(parent.isAssignableFrom(term.getClass())){ toAdd.add(term); } } //--Add Handler for(LogRecordHandler p : toAdd){ appendHandler(p, child); } }
[ "protected", "static", "void", "appendHandler", "(", "Class", "<", "?", "extends", "LogRecordHandler", ">", "parent", ",", "LogRecordHandler", "child", ")", "{", "List", "<", "LogRecordHandler", ">", "toAdd", "=", "new", "LinkedList", "<", "LogRecordHandler", ">", "(", ")", ";", "//--Find Parents\r", "for", "(", "LogRecordHandler", "term", ":", "handlers", ")", "{", "if", "(", "parent", ".", "isAssignableFrom", "(", "term", ".", "getClass", "(", ")", ")", ")", "{", "toAdd", ".", "add", "(", "term", ")", ";", "}", "}", "//--Add Handler\r", "for", "(", "LogRecordHandler", "p", ":", "toAdd", ")", "{", "appendHandler", "(", "p", ",", "child", ")", ";", "}", "}" ]
Append a Handler to every parent of the given class @param parent The class of the parents to add the child to @param child The Handler to add.
[ "Append", "a", "Handler", "to", "every", "parent", "of", "the", "given", "class" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L327-L339
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.getHandler
@Deprecated @SuppressWarnings("unchecked") private static <E extends LogRecordHandler> E getHandler(Class<E> clazz){ for(LogRecordHandler cand : handlers){ if(clazz == cand.getClass()){ return (E) cand; } } return null; }
java
@Deprecated @SuppressWarnings("unchecked") private static <E extends LogRecordHandler> E getHandler(Class<E> clazz){ for(LogRecordHandler cand : handlers){ if(clazz == cand.getClass()){ return (E) cand; } } return null; }
[ "@", "Deprecated", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "<", "E", "extends", "LogRecordHandler", ">", "E", "getHandler", "(", "Class", "<", "E", ">", "clazz", ")", "{", "for", "(", "LogRecordHandler", "cand", ":", "handlers", ")", "{", "if", "(", "clazz", "==", "cand", ".", "getClass", "(", ")", ")", "{", "return", "(", "E", ")", "cand", ";", "}", "}", "return", "null", ";", "}" ]
Get a handler based on its class @param clazz The class of the Handler to return. If multiple Handlers exist, the first one is returned. @param <E> The class of the handler to return. @return The handler matching the class name.
[ "Get", "a", "handler", "based", "on", "its", "class" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L364-L373
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.captureSystemStreams
protected static void captureSystemStreams(boolean captureOut, boolean captureErr){ if(captureOut){ System.setOut(new RedwoodPrintStream(STDOUT, realSysOut)); } if(captureErr){ System.setErr(new RedwoodPrintStream(STDERR, realSysErr)); } }
java
protected static void captureSystemStreams(boolean captureOut, boolean captureErr){ if(captureOut){ System.setOut(new RedwoodPrintStream(STDOUT, realSysOut)); } if(captureErr){ System.setErr(new RedwoodPrintStream(STDERR, realSysErr)); } }
[ "protected", "static", "void", "captureSystemStreams", "(", "boolean", "captureOut", ",", "boolean", "captureErr", ")", "{", "if", "(", "captureOut", ")", "{", "System", ".", "setOut", "(", "new", "RedwoodPrintStream", "(", "STDOUT", ",", "realSysOut", ")", ")", ";", "}", "if", "(", "captureErr", ")", "{", "System", ".", "setErr", "(", "new", "RedwoodPrintStream", "(", "STDERR", ",", "realSysErr", ")", ")", ";", "}", "}" ]
Captures System.out and System.err and redirects them to Redwood logging. @param captureOut True is System.out should be captured @param captureErr True if System.err should be captured
[ "Captures", "System", ".", "out", "and", "System", ".", "err", "and", "redirects", "them", "to", "Redwood", "logging", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L381-L388
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.startTrack
public static void startTrack(final Object... args){ if(isClosed){ return; } //--Create Record final int len = args.length == 0 ? 0 : args.length-1; final Object content = args.length == 0 ? "" : args[len]; final Object[] tags = new Object[len]; final StackTraceElement ste = getStackTrace(); final long timestamp = System.currentTimeMillis(); System.arraycopy(args,0,tags,0,len); //--Create Task final long threadID = Thread.currentThread().getId(); final Runnable startTrack = new Runnable(){ public void run(){ assert !isThreaded || control.isHeldByCurrentThread(); Record toPass = new Record(content,tags,depth,ste,timestamp); depth += 1; titleStack.push(args.length == 0 ? "" : args[len].toString()); handlers.process(toPass, MessageType.START_TRACK, depth, toPass.timesstamp); assert !isThreaded || control.isHeldByCurrentThread(); } }; //--Run Task if(isThreaded){ //(case: multithreaded) long threadId = Thread.currentThread().getId(); attemptThreadControl( threadId, startTrack ); } else { //(case: no threading) startTrack.run(); } }
java
public static void startTrack(final Object... args){ if(isClosed){ return; } //--Create Record final int len = args.length == 0 ? 0 : args.length-1; final Object content = args.length == 0 ? "" : args[len]; final Object[] tags = new Object[len]; final StackTraceElement ste = getStackTrace(); final long timestamp = System.currentTimeMillis(); System.arraycopy(args,0,tags,0,len); //--Create Task final long threadID = Thread.currentThread().getId(); final Runnable startTrack = new Runnable(){ public void run(){ assert !isThreaded || control.isHeldByCurrentThread(); Record toPass = new Record(content,tags,depth,ste,timestamp); depth += 1; titleStack.push(args.length == 0 ? "" : args[len].toString()); handlers.process(toPass, MessageType.START_TRACK, depth, toPass.timesstamp); assert !isThreaded || control.isHeldByCurrentThread(); } }; //--Run Task if(isThreaded){ //(case: multithreaded) long threadId = Thread.currentThread().getId(); attemptThreadControl( threadId, startTrack ); } else { //(case: no threading) startTrack.run(); } }
[ "public", "static", "void", "startTrack", "(", "final", "Object", "...", "args", ")", "{", "if", "(", "isClosed", ")", "{", "return", ";", "}", "//--Create Record\r", "final", "int", "len", "=", "args", ".", "length", "==", "0", "?", "0", ":", "args", ".", "length", "-", "1", ";", "final", "Object", "content", "=", "args", ".", "length", "==", "0", "?", "\"\"", ":", "args", "[", "len", "]", ";", "final", "Object", "[", "]", "tags", "=", "new", "Object", "[", "len", "]", ";", "final", "StackTraceElement", "ste", "=", "getStackTrace", "(", ")", ";", "final", "long", "timestamp", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "System", ".", "arraycopy", "(", "args", ",", "0", ",", "tags", ",", "0", ",", "len", ")", ";", "//--Create Task\r", "final", "long", "threadID", "=", "Thread", ".", "currentThread", "(", ")", ".", "getId", "(", ")", ";", "final", "Runnable", "startTrack", "=", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "assert", "!", "isThreaded", "||", "control", ".", "isHeldByCurrentThread", "(", ")", ";", "Record", "toPass", "=", "new", "Record", "(", "content", ",", "tags", ",", "depth", ",", "ste", ",", "timestamp", ")", ";", "depth", "+=", "1", ";", "titleStack", ".", "push", "(", "args", ".", "length", "==", "0", "?", "\"\"", ":", "args", "[", "len", "]", ".", "toString", "(", ")", ")", ";", "handlers", ".", "process", "(", "toPass", ",", "MessageType", ".", "START_TRACK", ",", "depth", ",", "toPass", ".", "timesstamp", ")", ";", "assert", "!", "isThreaded", "||", "control", ".", "isHeldByCurrentThread", "(", ")", ";", "}", "}", ";", "//--Run Task\r", "if", "(", "isThreaded", ")", "{", "//(case: multithreaded)\r", "long", "threadId", "=", "Thread", ".", "currentThread", "(", ")", ".", "getId", "(", ")", ";", "attemptThreadControl", "(", "threadId", ",", "startTrack", ")", ";", "}", "else", "{", "//(case: no threading)\r", "startTrack", ".", "run", "(", ")", ";", "}", "}" ]
Begin a "track;" that is, begin logging at one level deeper. Channels other than the FORCE channel are ignored. @param args The title of the track to begin, with an optional FORCE flag.
[ "Begin", "a", "track", ";", "that", "is", "begin", "logging", "at", "one", "level", "deeper", ".", "Channels", "other", "than", "the", "FORCE", "channel", "are", "ignored", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L468-L498
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.endTrack
public static void endTrack(final String title){ if(isClosed){ return; } //--Make Task final long timestamp = System.currentTimeMillis(); Runnable endTrack = new Runnable(){ public void run(){ assert !isThreaded || control.isHeldByCurrentThread(); //(check name match) String expected = titleStack.pop(); if(!expected.equalsIgnoreCase(title)){ throw new IllegalArgumentException("Track names do not match: expected: " + expected + " found: " + title); } //(decrement depth) depth -= 1; //(send signal) handlers.process(null, MessageType.END_TRACK, depth, timestamp); assert !isThreaded || control.isHeldByCurrentThread(); } }; //--Run Task if(isThreaded){ //(case: multithreaded) long threadId = Thread.currentThread().getId(); attemptThreadControl( threadId, endTrack ); } else { //(case: no threading) endTrack.run(); } }
java
public static void endTrack(final String title){ if(isClosed){ return; } //--Make Task final long timestamp = System.currentTimeMillis(); Runnable endTrack = new Runnable(){ public void run(){ assert !isThreaded || control.isHeldByCurrentThread(); //(check name match) String expected = titleStack.pop(); if(!expected.equalsIgnoreCase(title)){ throw new IllegalArgumentException("Track names do not match: expected: " + expected + " found: " + title); } //(decrement depth) depth -= 1; //(send signal) handlers.process(null, MessageType.END_TRACK, depth, timestamp); assert !isThreaded || control.isHeldByCurrentThread(); } }; //--Run Task if(isThreaded){ //(case: multithreaded) long threadId = Thread.currentThread().getId(); attemptThreadControl( threadId, endTrack ); } else { //(case: no threading) endTrack.run(); } }
[ "public", "static", "void", "endTrack", "(", "final", "String", "title", ")", "{", "if", "(", "isClosed", ")", "{", "return", ";", "}", "//--Make Task\r", "final", "long", "timestamp", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "Runnable", "endTrack", "=", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "assert", "!", "isThreaded", "||", "control", ".", "isHeldByCurrentThread", "(", ")", ";", "//(check name match)\r", "String", "expected", "=", "titleStack", ".", "pop", "(", ")", ";", "if", "(", "!", "expected", ".", "equalsIgnoreCase", "(", "title", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Track names do not match: expected: \"", "+", "expected", "+", "\" found: \"", "+", "title", ")", ";", "}", "//(decrement depth)\r", "depth", "-=", "1", ";", "//(send signal)\r", "handlers", ".", "process", "(", "null", ",", "MessageType", ".", "END_TRACK", ",", "depth", ",", "timestamp", ")", ";", "assert", "!", "isThreaded", "||", "control", ".", "isHeldByCurrentThread", "(", ")", ";", "}", "}", ";", "//--Run Task\r", "if", "(", "isThreaded", ")", "{", "//(case: multithreaded)\r", "long", "threadId", "=", "Thread", ".", "currentThread", "(", ")", ".", "getId", "(", ")", ";", "attemptThreadControl", "(", "threadId", ",", "endTrack", ")", ";", "}", "else", "{", "//(case: no threading)\r", "endTrack", ".", "run", "(", ")", ";", "}", "}" ]
End a "track;" that is, return to logging at one level shallower. @param title A title that should match the beginning of this track.
[ "End", "a", "track", ";", "that", "is", "return", "to", "logging", "at", "one", "level", "shallower", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L519-L547
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.finishThread
public static void finishThread(){ //--Create Task final long threadId = Thread.currentThread().getId(); Runnable finish = new Runnable(){ public void run(){ releaseThreadControl(threadId); } }; //--Run Task if(isThreaded){ //(case: multithreaded) attemptThreadControl( threadId, finish ); } else { //(case: no threading) throw new IllegalStateException("finishThreads() called outside of threaded environment"); } }
java
public static void finishThread(){ //--Create Task final long threadId = Thread.currentThread().getId(); Runnable finish = new Runnable(){ public void run(){ releaseThreadControl(threadId); } }; //--Run Task if(isThreaded){ //(case: multithreaded) attemptThreadControl( threadId, finish ); } else { //(case: no threading) throw new IllegalStateException("finishThreads() called outside of threaded environment"); } }
[ "public", "static", "void", "finishThread", "(", ")", "{", "//--Create Task\r", "final", "long", "threadId", "=", "Thread", ".", "currentThread", "(", ")", ".", "getId", "(", ")", ";", "Runnable", "finish", "=", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "releaseThreadControl", "(", "threadId", ")", ";", "}", "}", ";", "//--Run Task\r", "if", "(", "isThreaded", ")", "{", "//(case: multithreaded)\r", "attemptThreadControl", "(", "threadId", ",", "finish", ")", ";", "}", "else", "{", "//(case: no threading)\r", "throw", "new", "IllegalStateException", "(", "\"finishThreads() called outside of threaded environment\"", ")", ";", "}", "}" ]
Signal that this thread will not log any more messages in the multithreaded environment
[ "Signal", "that", "this", "thread", "will", "not", "log", "any", "more", "messages", "in", "the", "multithreaded", "environment" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L575-L591
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.endThreads
public static void endThreads(String check){ //(error check) if(currentThread != -1L){ throw new IllegalStateException("endThreads() called, but thread " + currentThread + " has not finished (exception in thread?)"); } //(end threaded environment) assert !control.isHeldByCurrentThread(); isThreaded = false; //(write remaining threads) boolean cleanPass = false; while(!cleanPass){ cleanPass = true; for(long thread : threadedLogQueue.keySet()){ assert currentThread < 0L; if(threadedLogQueue.get(thread) != null && !threadedLogQueue.get(thread).isEmpty()){ //(mark queue as unclean) cleanPass = false; //(variables) Queue<Runnable> backlog = threadedLogQueue.get(thread); currentThread = thread; //(clear buffer) while(currentThread >= 0){ if(currentThread != thread){ throw new IllegalStateException("Redwood control shifted away from flushing thread"); } if(backlog.isEmpty()){ throw new IllegalStateException("Forgot to call finishThread() on thread " + currentThread); } assert !control.isHeldByCurrentThread(); backlog.poll().run(); } //(unregister thread) threadsWaiting.remove(thread); } } } while(threadsWaiting.size() > 0){ assert currentThread < 0L; assert control.tryLock(); assert !threadsWaiting.isEmpty(); control.lock(); attemptThreadControlThreadsafe(-1); control.unlock(); } //(clean up) for(long threadId : threadedLogQueue.keySet()){ assert threadedLogQueue.get(threadId).isEmpty(); } assert threadsWaiting.isEmpty(); assert currentThread == -1L; endTrack("Threads( "+check+" )"); }
java
public static void endThreads(String check){ //(error check) if(currentThread != -1L){ throw new IllegalStateException("endThreads() called, but thread " + currentThread + " has not finished (exception in thread?)"); } //(end threaded environment) assert !control.isHeldByCurrentThread(); isThreaded = false; //(write remaining threads) boolean cleanPass = false; while(!cleanPass){ cleanPass = true; for(long thread : threadedLogQueue.keySet()){ assert currentThread < 0L; if(threadedLogQueue.get(thread) != null && !threadedLogQueue.get(thread).isEmpty()){ //(mark queue as unclean) cleanPass = false; //(variables) Queue<Runnable> backlog = threadedLogQueue.get(thread); currentThread = thread; //(clear buffer) while(currentThread >= 0){ if(currentThread != thread){ throw new IllegalStateException("Redwood control shifted away from flushing thread"); } if(backlog.isEmpty()){ throw new IllegalStateException("Forgot to call finishThread() on thread " + currentThread); } assert !control.isHeldByCurrentThread(); backlog.poll().run(); } //(unregister thread) threadsWaiting.remove(thread); } } } while(threadsWaiting.size() > 0){ assert currentThread < 0L; assert control.tryLock(); assert !threadsWaiting.isEmpty(); control.lock(); attemptThreadControlThreadsafe(-1); control.unlock(); } //(clean up) for(long threadId : threadedLogQueue.keySet()){ assert threadedLogQueue.get(threadId).isEmpty(); } assert threadsWaiting.isEmpty(); assert currentThread == -1L; endTrack("Threads( "+check+" )"); }
[ "public", "static", "void", "endThreads", "(", "String", "check", ")", "{", "//(error check)\r", "if", "(", "currentThread", "!=", "-", "1L", ")", "{", "throw", "new", "IllegalStateException", "(", "\"endThreads() called, but thread \"", "+", "currentThread", "+", "\" has not finished (exception in thread?)\"", ")", ";", "}", "//(end threaded environment)\r", "assert", "!", "control", ".", "isHeldByCurrentThread", "(", ")", ";", "isThreaded", "=", "false", ";", "//(write remaining threads)\r", "boolean", "cleanPass", "=", "false", ";", "while", "(", "!", "cleanPass", ")", "{", "cleanPass", "=", "true", ";", "for", "(", "long", "thread", ":", "threadedLogQueue", ".", "keySet", "(", ")", ")", "{", "assert", "currentThread", "<", "0L", ";", "if", "(", "threadedLogQueue", ".", "get", "(", "thread", ")", "!=", "null", "&&", "!", "threadedLogQueue", ".", "get", "(", "thread", ")", ".", "isEmpty", "(", ")", ")", "{", "//(mark queue as unclean)\r", "cleanPass", "=", "false", ";", "//(variables)\r", "Queue", "<", "Runnable", ">", "backlog", "=", "threadedLogQueue", ".", "get", "(", "thread", ")", ";", "currentThread", "=", "thread", ";", "//(clear buffer)\r", "while", "(", "currentThread", ">=", "0", ")", "{", "if", "(", "currentThread", "!=", "thread", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Redwood control shifted away from flushing thread\"", ")", ";", "}", "if", "(", "backlog", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Forgot to call finishThread() on thread \"", "+", "currentThread", ")", ";", "}", "assert", "!", "control", ".", "isHeldByCurrentThread", "(", ")", ";", "backlog", ".", "poll", "(", ")", ".", "run", "(", ")", ";", "}", "//(unregister thread)\r", "threadsWaiting", ".", "remove", "(", "thread", ")", ";", "}", "}", "}", "while", "(", "threadsWaiting", ".", "size", "(", ")", ">", "0", ")", "{", "assert", "currentThread", "<", "0L", ";", "assert", "control", ".", "tryLock", "(", ")", ";", "assert", "!", "threadsWaiting", ".", "isEmpty", "(", ")", ";", "control", ".", "lock", "(", ")", ";", "attemptThreadControlThreadsafe", "(", "-", "1", ")", ";", "control", ".", "unlock", "(", ")", ";", "}", "//(clean up)\r", "for", "(", "long", "threadId", ":", "threadedLogQueue", ".", "keySet", "(", ")", ")", "{", "assert", "threadedLogQueue", ".", "get", "(", "threadId", ")", ".", "isEmpty", "(", ")", ";", "}", "assert", "threadsWaiting", ".", "isEmpty", "(", ")", ";", "assert", "currentThread", "==", "-", "1L", ";", "endTrack", "(", "\"Threads( \"", "+", "check", "+", "\" )\"", ")", ";", "}" ]
Signal that all threads have run to completion, and the multithreaded environment is over. @param check The name of the thread group passed to startThreads()
[ "Signal", "that", "all", "threads", "have", "run", "to", "completion", "and", "the", "multithreaded", "environment", "is", "over", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L598-L645
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.showOnlyChannels
public static void showOnlyChannels(Object... channels){ for(LogRecordHandler handler : handlers){ if(handler instanceof VisibilityHandler){ VisibilityHandler visHandler = (VisibilityHandler) handler; visHandler.hideAll(); for (Object channel : channels) { visHandler.alsoShow(channel); } } } }
java
public static void showOnlyChannels(Object... channels){ for(LogRecordHandler handler : handlers){ if(handler instanceof VisibilityHandler){ VisibilityHandler visHandler = (VisibilityHandler) handler; visHandler.hideAll(); for (Object channel : channels) { visHandler.alsoShow(channel); } } } }
[ "public", "static", "void", "showOnlyChannels", "(", "Object", "...", "channels", ")", "{", "for", "(", "LogRecordHandler", "handler", ":", "handlers", ")", "{", "if", "(", "handler", "instanceof", "VisibilityHandler", ")", "{", "VisibilityHandler", "visHandler", "=", "(", "VisibilityHandler", ")", "handler", ";", "visHandler", ".", "hideAll", "(", ")", ";", "for", "(", "Object", "channel", ":", "channels", ")", "{", "visHandler", ".", "alsoShow", "(", "channel", ")", ";", "}", "}", "}", "}" ]
Show only the given channel. @param channels The channels to show
[ "Show", "only", "the", "given", "channel", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L661-L671
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.hideOnlyChannels
public static void hideOnlyChannels(Object... channels){ for(LogRecordHandler handler : handlers){ if(handler instanceof VisibilityHandler){ VisibilityHandler visHandler = (VisibilityHandler) handler; visHandler.showAll(); for (Object channel : channels) { visHandler.alsoHide(channel); } } } }
java
public static void hideOnlyChannels(Object... channels){ for(LogRecordHandler handler : handlers){ if(handler instanceof VisibilityHandler){ VisibilityHandler visHandler = (VisibilityHandler) handler; visHandler.showAll(); for (Object channel : channels) { visHandler.alsoHide(channel); } } } }
[ "public", "static", "void", "hideOnlyChannels", "(", "Object", "...", "channels", ")", "{", "for", "(", "LogRecordHandler", "handler", ":", "handlers", ")", "{", "if", "(", "handler", "instanceof", "VisibilityHandler", ")", "{", "VisibilityHandler", "visHandler", "=", "(", "VisibilityHandler", ")", "handler", ";", "visHandler", ".", "showAll", "(", ")", ";", "for", "(", "Object", "channel", ":", "channels", ")", "{", "visHandler", ".", "alsoHide", "(", "channel", ")", ";", "}", "}", "}", "}" ]
Hide multiple channels. All other channels will be shown. @param channels The channels to hide
[ "Hide", "multiple", "channels", ".", "All", "other", "channels", "will", "be", "shown", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L677-L687
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.showChannels
public static void showChannels(Object... channels){ // TODO this could share more code with the other show/hide(Only)Channels methods for(LogRecordHandler handler : handlers){ if(handler instanceof VisibilityHandler){ VisibilityHandler visHandler = (VisibilityHandler) handler; for (Object channel : channels) { visHandler.alsoShow(channel); } } } }
java
public static void showChannels(Object... channels){ // TODO this could share more code with the other show/hide(Only)Channels methods for(LogRecordHandler handler : handlers){ if(handler instanceof VisibilityHandler){ VisibilityHandler visHandler = (VisibilityHandler) handler; for (Object channel : channels) { visHandler.alsoShow(channel); } } } }
[ "public", "static", "void", "showChannels", "(", "Object", "...", "channels", ")", "{", "// TODO this could share more code with the other show/hide(Only)Channels methods\r", "for", "(", "LogRecordHandler", "handler", ":", "handlers", ")", "{", "if", "(", "handler", "instanceof", "VisibilityHandler", ")", "{", "VisibilityHandler", "visHandler", "=", "(", "VisibilityHandler", ")", "handler", ";", "for", "(", "Object", "channel", ":", "channels", ")", "{", "visHandler", ".", "alsoShow", "(", "channel", ")", ";", "}", "}", "}", "}" ]
Show multiple channels. All other channels will be unaffected. @param channels The channels to show
[ "Show", "multiple", "channels", ".", "All", "other", "channels", "will", "be", "unaffected", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L693-L703
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.hideChannels
public static void hideChannels(Object... channels){ // TODO this could share more code with the other show/hide(Only)Channels methods for(LogRecordHandler handler : handlers){ if(handler instanceof VisibilityHandler){ VisibilityHandler visHandler = (VisibilityHandler) handler; for (Object channel : channels) { visHandler.alsoHide(channel); } } } }
java
public static void hideChannels(Object... channels){ // TODO this could share more code with the other show/hide(Only)Channels methods for(LogRecordHandler handler : handlers){ if(handler instanceof VisibilityHandler){ VisibilityHandler visHandler = (VisibilityHandler) handler; for (Object channel : channels) { visHandler.alsoHide(channel); } } } }
[ "public", "static", "void", "hideChannels", "(", "Object", "...", "channels", ")", "{", "// TODO this could share more code with the other show/hide(Only)Channels methods\r", "for", "(", "LogRecordHandler", "handler", ":", "handlers", ")", "{", "if", "(", "handler", "instanceof", "VisibilityHandler", ")", "{", "VisibilityHandler", "visHandler", "=", "(", "VisibilityHandler", ")", "handler", ";", "for", "(", "Object", "channel", ":", "channels", ")", "{", "visHandler", ".", "alsoHide", "(", "channel", ")", ";", "}", "}", "}", "}" ]
Hide multiple channels. All other channels will be unaffected. @param channels The channels to hide
[ "Hide", "multiple", "channels", ".", "All", "other", "channels", "will", "be", "unaffected", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L709-L719
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.stop
public static void stop(){ //--Close logger isClosed = true; // <- not a thread-safe boolean Thread.yield(); //poor man's synchronization attempt (let everything else log that wants to) Thread.yield(); //--Close Tracks while(depth > 0){ depth -= 1; //(send signal to handlers) handlers.process(null, MessageType.END_TRACK, depth, System.currentTimeMillis()); } //--Shutdown handlers.process(null, MessageType.SHUTDOWN, 0, System.currentTimeMillis()); }
java
public static void stop(){ //--Close logger isClosed = true; // <- not a thread-safe boolean Thread.yield(); //poor man's synchronization attempt (let everything else log that wants to) Thread.yield(); //--Close Tracks while(depth > 0){ depth -= 1; //(send signal to handlers) handlers.process(null, MessageType.END_TRACK, depth, System.currentTimeMillis()); } //--Shutdown handlers.process(null, MessageType.SHUTDOWN, 0, System.currentTimeMillis()); }
[ "public", "static", "void", "stop", "(", ")", "{", "//--Close logger\r", "isClosed", "=", "true", ";", "// <- not a thread-safe boolean\r", "Thread", ".", "yield", "(", ")", ";", "//poor man's synchronization attempt (let everything else log that wants to)\r", "Thread", ".", "yield", "(", ")", ";", "//--Close Tracks\r", "while", "(", "depth", ">", "0", ")", "{", "depth", "-=", "1", ";", "//(send signal to handlers)\r", "handlers", ".", "process", "(", "null", ",", "MessageType", ".", "END_TRACK", ",", "depth", ",", "System", ".", "currentTimeMillis", "(", ")", ")", ";", "}", "//--Shutdown\r", "handlers", ".", "process", "(", "null", ",", "MessageType", ".", "SHUTDOWN", ",", "0", ",", "System", ".", "currentTimeMillis", "(", ")", ")", ";", "}" ]
Stop Redwood, closing all tracks and prohibiting future log messages.
[ "Stop", "Redwood", "closing", "all", "tracks", "and", "prohibiting", "future", "log", "messages", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L746-L759
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.getStackTrace
private static StackTraceElement getStackTrace() { StackTraceElement[] stack = Thread.currentThread().getStackTrace(); int i = 2; // we can skip the first two (first is getStackTrace(), second is this method) while (i < stack.length) { boolean isLoggingClass = false; for (String loggingClass : loggingClasses) { String className = stack[i].getClassName(); if (className.startsWith(loggingClass)) { isLoggingClass = true; break; } } if (!isLoggingClass) { break; } i += 1; } // if we didn't find anything, keep last element (probably shouldn't happen, but could if people add too many logging classes) if (i >= stack.length) { i = stack.length - 1; } return stack[i]; }
java
private static StackTraceElement getStackTrace() { StackTraceElement[] stack = Thread.currentThread().getStackTrace(); int i = 2; // we can skip the first two (first is getStackTrace(), second is this method) while (i < stack.length) { boolean isLoggingClass = false; for (String loggingClass : loggingClasses) { String className = stack[i].getClassName(); if (className.startsWith(loggingClass)) { isLoggingClass = true; break; } } if (!isLoggingClass) { break; } i += 1; } // if we didn't find anything, keep last element (probably shouldn't happen, but could if people add too many logging classes) if (i >= stack.length) { i = stack.length - 1; } return stack[i]; }
[ "private", "static", "StackTraceElement", "getStackTrace", "(", ")", "{", "StackTraceElement", "[", "]", "stack", "=", "Thread", ".", "currentThread", "(", ")", ".", "getStackTrace", "(", ")", ";", "int", "i", "=", "2", ";", "// we can skip the first two (first is getStackTrace(), second is this method)\r", "while", "(", "i", "<", "stack", ".", "length", ")", "{", "boolean", "isLoggingClass", "=", "false", ";", "for", "(", "String", "loggingClass", ":", "loggingClasses", ")", "{", "String", "className", "=", "stack", "[", "i", "]", ".", "getClassName", "(", ")", ";", "if", "(", "className", ".", "startsWith", "(", "loggingClass", ")", ")", "{", "isLoggingClass", "=", "true", ";", "break", ";", "}", "}", "if", "(", "!", "isLoggingClass", ")", "{", "break", ";", "}", "i", "+=", "1", ";", "}", "// if we didn't find anything, keep last element (probably shouldn't happen, but could if people add too many logging classes)\r", "if", "(", "i", ">=", "stack", ".", "length", ")", "{", "i", "=", "stack", ".", "length", "-", "1", ";", "}", "return", "stack", "[", "i", "]", ";", "}" ]
Get the current stack trace element, skipping anything from known logging classes. @return The current stack trace for this thread
[ "Get", "the", "current", "stack", "trace", "element", "skipping", "anything", "from", "known", "logging", "classes", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L800-L825
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.filterStackTrace
protected static List<StackTraceElement> filterStackTrace(StackTraceElement[] stack) { List<StackTraceElement> filteredStack = new ArrayList<StackTraceElement>(); int i = 2; // we can skip the first two (first is getStackTrace(), second is this method) while (i < stack.length) { boolean isLoggingClass = false; for (String loggingClass : loggingClasses) { String className = stack[i].getClassName(); if (className.startsWith(loggingClass)) { isLoggingClass = true; break; } } if (!isLoggingClass) { filteredStack.add(stack[i]); } i += 1; } // if we didn't find anything, keep the full stack if (filteredStack.size() == 0) { return Arrays.asList(stack); } return filteredStack; }
java
protected static List<StackTraceElement> filterStackTrace(StackTraceElement[] stack) { List<StackTraceElement> filteredStack = new ArrayList<StackTraceElement>(); int i = 2; // we can skip the first two (first is getStackTrace(), second is this method) while (i < stack.length) { boolean isLoggingClass = false; for (String loggingClass : loggingClasses) { String className = stack[i].getClassName(); if (className.startsWith(loggingClass)) { isLoggingClass = true; break; } } if (!isLoggingClass) { filteredStack.add(stack[i]); } i += 1; } // if we didn't find anything, keep the full stack if (filteredStack.size() == 0) { return Arrays.asList(stack); } return filteredStack; }
[ "protected", "static", "List", "<", "StackTraceElement", ">", "filterStackTrace", "(", "StackTraceElement", "[", "]", "stack", ")", "{", "List", "<", "StackTraceElement", ">", "filteredStack", "=", "new", "ArrayList", "<", "StackTraceElement", ">", "(", ")", ";", "int", "i", "=", "2", ";", "// we can skip the first two (first is getStackTrace(), second is this method)\r", "while", "(", "i", "<", "stack", ".", "length", ")", "{", "boolean", "isLoggingClass", "=", "false", ";", "for", "(", "String", "loggingClass", ":", "loggingClasses", ")", "{", "String", "className", "=", "stack", "[", "i", "]", ".", "getClassName", "(", ")", ";", "if", "(", "className", ".", "startsWith", "(", "loggingClass", ")", ")", "{", "isLoggingClass", "=", "true", ";", "break", ";", "}", "}", "if", "(", "!", "isLoggingClass", ")", "{", "filteredStack", ".", "add", "(", "stack", "[", "i", "]", ")", ";", "}", "i", "+=", "1", ";", "}", "// if we didn't find anything, keep the full stack\r", "if", "(", "filteredStack", ".", "size", "(", ")", "==", "0", ")", "{", "return", "Arrays", ".", "asList", "(", "stack", ")", ";", "}", "return", "filteredStack", ";", "}" ]
Removes logging classes from a stack trace.
[ "Removes", "logging", "classes", "from", "a", "stack", "trace", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L830-L855
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/ipset.java
ipset.add
public static base_response add(nitro_service client, ipset resource) throws Exception { ipset addresource = new ipset(); addresource.name = resource.name; addresource.td = resource.td; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, ipset resource) throws Exception { ipset addresource = new ipset(); addresource.name = resource.name; addresource.td = resource.td; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "ipset", "resource", ")", "throws", "Exception", "{", "ipset", "addresource", "=", "new", "ipset", "(", ")", ";", "addresource", ".", "name", "=", "resource", ".", "name", ";", "addresource", ".", "td", "=", "resource", ".", "td", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add ipset.
[ "Use", "this", "API", "to", "add", "ipset", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/ipset.java#L121-L126
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/ipset.java
ipset.get
public static ipset[] get(nitro_service service) throws Exception{ ipset obj = new ipset(); ipset[] response = (ipset[])obj.get_resources(service); return response; }
java
public static ipset[] get(nitro_service service) throws Exception{ ipset obj = new ipset(); ipset[] response = (ipset[])obj.get_resources(service); return response; }
[ "public", "static", "ipset", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "ipset", "obj", "=", "new", "ipset", "(", ")", ";", "ipset", "[", "]", "response", "=", "(", "ipset", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the ipset resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "ipset", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/ipset.java#L198-L202
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/ipset.java
ipset.get
public static ipset get(nitro_service service, String name) throws Exception{ ipset obj = new ipset(); obj.set_name(name); ipset response = (ipset) obj.get_resource(service); return response; }
java
public static ipset get(nitro_service service, String name) throws Exception{ ipset obj = new ipset(); obj.set_name(name); ipset response = (ipset) obj.get_resource(service); return response; }
[ "public", "static", "ipset", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "ipset", "obj", "=", "new", "ipset", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "ipset", "response", "=", "(", "ipset", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch ipset resource of given name .
[ "Use", "this", "API", "to", "fetch", "ipset", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/ipset.java#L214-L219
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_crosssitescripting_binding.java
appfwprofile_crosssitescripting_binding.get
public static appfwprofile_crosssitescripting_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_crosssitescripting_binding obj = new appfwprofile_crosssitescripting_binding(); obj.set_name(name); appfwprofile_crosssitescripting_binding response[] = (appfwprofile_crosssitescripting_binding[]) obj.get_resources(service); return response; }
java
public static appfwprofile_crosssitescripting_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_crosssitescripting_binding obj = new appfwprofile_crosssitescripting_binding(); obj.set_name(name); appfwprofile_crosssitescripting_binding response[] = (appfwprofile_crosssitescripting_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "appfwprofile_crosssitescripting_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "appfwprofile_crosssitescripting_binding", "obj", "=", "new", "appfwprofile_crosssitescripting_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "appfwprofile_crosssitescripting_binding", "response", "[", "]", "=", "(", "appfwprofile_crosssitescripting_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch appfwprofile_crosssitescripting_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "appfwprofile_crosssitescripting_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_crosssitescripting_binding.java#L263-L268
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditsyslogpolicy_aaauser_binding.java
auditsyslogpolicy_aaauser_binding.get
public static auditsyslogpolicy_aaauser_binding[] get(nitro_service service, String name) throws Exception{ auditsyslogpolicy_aaauser_binding obj = new auditsyslogpolicy_aaauser_binding(); obj.set_name(name); auditsyslogpolicy_aaauser_binding response[] = (auditsyslogpolicy_aaauser_binding[]) obj.get_resources(service); return response; }
java
public static auditsyslogpolicy_aaauser_binding[] get(nitro_service service, String name) throws Exception{ auditsyslogpolicy_aaauser_binding obj = new auditsyslogpolicy_aaauser_binding(); obj.set_name(name); auditsyslogpolicy_aaauser_binding response[] = (auditsyslogpolicy_aaauser_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "auditsyslogpolicy_aaauser_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "auditsyslogpolicy_aaauser_binding", "obj", "=", "new", "auditsyslogpolicy_aaauser_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "auditsyslogpolicy_aaauser_binding", "response", "[", "]", "=", "(", "auditsyslogpolicy_aaauser_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch auditsyslogpolicy_aaauser_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "auditsyslogpolicy_aaauser_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditsyslogpolicy_aaauser_binding.java#L132-L137
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java
autoscaleaction.add
public static base_response add(nitro_service client, autoscaleaction resource) throws Exception { autoscaleaction addresource = new autoscaleaction(); addresource.name = resource.name; addresource.type = resource.type; addresource.profilename = resource.profilename; addresource.parameters = resource.parameters; addresource.vmdestroygraceperiod = resource.vmdestroygraceperiod; addresource.quiettime = resource.quiettime; addresource.vserver = resource.vserver; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, autoscaleaction resource) throws Exception { autoscaleaction addresource = new autoscaleaction(); addresource.name = resource.name; addresource.type = resource.type; addresource.profilename = resource.profilename; addresource.parameters = resource.parameters; addresource.vmdestroygraceperiod = resource.vmdestroygraceperiod; addresource.quiettime = resource.quiettime; addresource.vserver = resource.vserver; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "autoscaleaction", "resource", ")", "throws", "Exception", "{", "autoscaleaction", "addresource", "=", "new", "autoscaleaction", "(", ")", ";", "addresource", ".", "name", "=", "resource", ".", "name", ";", "addresource", ".", "type", "=", "resource", ".", "type", ";", "addresource", ".", "profilename", "=", "resource", ".", "profilename", ";", "addresource", ".", "parameters", "=", "resource", ".", "parameters", ";", "addresource", ".", "vmdestroygraceperiod", "=", "resource", ".", "vmdestroygraceperiod", ";", "addresource", ".", "quiettime", "=", "resource", ".", "quiettime", ";", "addresource", ".", "vserver", "=", "resource", ".", "vserver", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add autoscaleaction.
[ "Use", "this", "API", "to", "add", "autoscaleaction", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java#L225-L235
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java
autoscaleaction.add
public static base_responses add(nitro_service client, autoscaleaction resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { autoscaleaction addresources[] = new autoscaleaction[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new autoscaleaction(); addresources[i].name = resources[i].name; addresources[i].type = resources[i].type; addresources[i].profilename = resources[i].profilename; addresources[i].parameters = resources[i].parameters; addresources[i].vmdestroygraceperiod = resources[i].vmdestroygraceperiod; addresources[i].quiettime = resources[i].quiettime; addresources[i].vserver = resources[i].vserver; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, autoscaleaction resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { autoscaleaction addresources[] = new autoscaleaction[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new autoscaleaction(); addresources[i].name = resources[i].name; addresources[i].type = resources[i].type; addresources[i].profilename = resources[i].profilename; addresources[i].parameters = resources[i].parameters; addresources[i].vmdestroygraceperiod = resources[i].vmdestroygraceperiod; addresources[i].quiettime = resources[i].quiettime; addresources[i].vserver = resources[i].vserver; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "autoscaleaction", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "autoscaleaction", "addresources", "[", "]", "=", "new", "autoscaleaction", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "autoscaleaction", "(", ")", ";", "addresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "addresources", "[", "i", "]", ".", "type", "=", "resources", "[", "i", "]", ".", "type", ";", "addresources", "[", "i", "]", ".", "profilename", "=", "resources", "[", "i", "]", ".", "profilename", ";", "addresources", "[", "i", "]", ".", "parameters", "=", "resources", "[", "i", "]", ".", "parameters", ";", "addresources", "[", "i", "]", ".", "vmdestroygraceperiod", "=", "resources", "[", "i", "]", ".", "vmdestroygraceperiod", ";", "addresources", "[", "i", "]", ".", "quiettime", "=", "resources", "[", "i", "]", ".", "quiettime", ";", "addresources", "[", "i", "]", ".", "vserver", "=", "resources", "[", "i", "]", ".", "vserver", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add autoscaleaction resources.
[ "Use", "this", "API", "to", "add", "autoscaleaction", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java#L240-L257
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java
autoscaleaction.update
public static base_response update(nitro_service client, autoscaleaction resource) throws Exception { autoscaleaction updateresource = new autoscaleaction(); updateresource.name = resource.name; updateresource.profilename = resource.profilename; updateresource.parameters = resource.parameters; updateresource.vmdestroygraceperiod = resource.vmdestroygraceperiod; updateresource.quiettime = resource.quiettime; updateresource.vserver = resource.vserver; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, autoscaleaction resource) throws Exception { autoscaleaction updateresource = new autoscaleaction(); updateresource.name = resource.name; updateresource.profilename = resource.profilename; updateresource.parameters = resource.parameters; updateresource.vmdestroygraceperiod = resource.vmdestroygraceperiod; updateresource.quiettime = resource.quiettime; updateresource.vserver = resource.vserver; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "autoscaleaction", "resource", ")", "throws", "Exception", "{", "autoscaleaction", "updateresource", "=", "new", "autoscaleaction", "(", ")", ";", "updateresource", ".", "name", "=", "resource", ".", "name", ";", "updateresource", ".", "profilename", "=", "resource", ".", "profilename", ";", "updateresource", ".", "parameters", "=", "resource", ".", "parameters", ";", "updateresource", ".", "vmdestroygraceperiod", "=", "resource", ".", "vmdestroygraceperiod", ";", "updateresource", ".", "quiettime", "=", "resource", ".", "quiettime", ";", "updateresource", ".", "vserver", "=", "resource", ".", "vserver", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update autoscaleaction.
[ "Use", "this", "API", "to", "update", "autoscaleaction", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java#L312-L321
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java
autoscaleaction.update
public static base_responses update(nitro_service client, autoscaleaction resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { autoscaleaction updateresources[] = new autoscaleaction[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new autoscaleaction(); updateresources[i].name = resources[i].name; updateresources[i].profilename = resources[i].profilename; updateresources[i].parameters = resources[i].parameters; updateresources[i].vmdestroygraceperiod = resources[i].vmdestroygraceperiod; updateresources[i].quiettime = resources[i].quiettime; updateresources[i].vserver = resources[i].vserver; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, autoscaleaction resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { autoscaleaction updateresources[] = new autoscaleaction[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new autoscaleaction(); updateresources[i].name = resources[i].name; updateresources[i].profilename = resources[i].profilename; updateresources[i].parameters = resources[i].parameters; updateresources[i].vmdestroygraceperiod = resources[i].vmdestroygraceperiod; updateresources[i].quiettime = resources[i].quiettime; updateresources[i].vserver = resources[i].vserver; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "autoscaleaction", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "autoscaleaction", "updateresources", "[", "]", "=", "new", "autoscaleaction", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "autoscaleaction", "(", ")", ";", "updateresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "updateresources", "[", "i", "]", ".", "profilename", "=", "resources", "[", "i", "]", ".", "profilename", ";", "updateresources", "[", "i", "]", ".", "parameters", "=", "resources", "[", "i", "]", ".", "parameters", ";", "updateresources", "[", "i", "]", ".", "vmdestroygraceperiod", "=", "resources", "[", "i", "]", ".", "vmdestroygraceperiod", ";", "updateresources", "[", "i", "]", ".", "quiettime", "=", "resources", "[", "i", "]", ".", "quiettime", ";", "updateresources", "[", "i", "]", ".", "vserver", "=", "resources", "[", "i", "]", ".", "vserver", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update autoscaleaction resources.
[ "Use", "this", "API", "to", "update", "autoscaleaction", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java#L326-L342
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java
autoscaleaction.get
public static autoscaleaction[] get(nitro_service service) throws Exception{ autoscaleaction obj = new autoscaleaction(); autoscaleaction[] response = (autoscaleaction[])obj.get_resources(service); return response; }
java
public static autoscaleaction[] get(nitro_service service) throws Exception{ autoscaleaction obj = new autoscaleaction(); autoscaleaction[] response = (autoscaleaction[])obj.get_resources(service); return response; }
[ "public", "static", "autoscaleaction", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "autoscaleaction", "obj", "=", "new", "autoscaleaction", "(", ")", ";", "autoscaleaction", "[", "]", "response", "=", "(", "autoscaleaction", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the autoscaleaction resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "autoscaleaction", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java#L391-L395
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java
autoscaleaction.get
public static autoscaleaction get(nitro_service service, String name) throws Exception{ autoscaleaction obj = new autoscaleaction(); obj.set_name(name); autoscaleaction response = (autoscaleaction) obj.get_resource(service); return response; }
java
public static autoscaleaction get(nitro_service service, String name) throws Exception{ autoscaleaction obj = new autoscaleaction(); obj.set_name(name); autoscaleaction response = (autoscaleaction) obj.get_resource(service); return response; }
[ "public", "static", "autoscaleaction", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "autoscaleaction", "obj", "=", "new", "autoscaleaction", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "autoscaleaction", "response", "=", "(", "autoscaleaction", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch autoscaleaction resource of given name .
[ "Use", "this", "API", "to", "fetch", "autoscaleaction", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/autoscale/autoscaleaction.java#L407-L412
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslvserver_sslcipher_binding.java
sslvserver_sslcipher_binding.get
public static sslvserver_sslcipher_binding[] get(nitro_service service, String vservername) throws Exception{ sslvserver_sslcipher_binding obj = new sslvserver_sslcipher_binding(); obj.set_vservername(vservername); sslvserver_sslcipher_binding response[] = (sslvserver_sslcipher_binding[]) obj.get_resources(service); return response; }
java
public static sslvserver_sslcipher_binding[] get(nitro_service service, String vservername) throws Exception{ sslvserver_sslcipher_binding obj = new sslvserver_sslcipher_binding(); obj.set_vservername(vservername); sslvserver_sslcipher_binding response[] = (sslvserver_sslcipher_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "sslvserver_sslcipher_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "vservername", ")", "throws", "Exception", "{", "sslvserver_sslcipher_binding", "obj", "=", "new", "sslvserver_sslcipher_binding", "(", ")", ";", "obj", ".", "set_vservername", "(", "vservername", ")", ";", "sslvserver_sslcipher_binding", "response", "[", "]", "=", "(", "sslvserver_sslcipher_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch sslvserver_sslcipher_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "sslvserver_sslcipher_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslvserver_sslcipher_binding.java#L131-L136
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_authenticationsamlpolicy_binding.java
vpnglobal_authenticationsamlpolicy_binding.get
public static vpnglobal_authenticationsamlpolicy_binding[] get(nitro_service service) throws Exception{ vpnglobal_authenticationsamlpolicy_binding obj = new vpnglobal_authenticationsamlpolicy_binding(); vpnglobal_authenticationsamlpolicy_binding response[] = (vpnglobal_authenticationsamlpolicy_binding[]) obj.get_resources(service); return response; }
java
public static vpnglobal_authenticationsamlpolicy_binding[] get(nitro_service service) throws Exception{ vpnglobal_authenticationsamlpolicy_binding obj = new vpnglobal_authenticationsamlpolicy_binding(); vpnglobal_authenticationsamlpolicy_binding response[] = (vpnglobal_authenticationsamlpolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "vpnglobal_authenticationsamlpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "vpnglobal_authenticationsamlpolicy_binding", "obj", "=", "new", "vpnglobal_authenticationsamlpolicy_binding", "(", ")", ";", "vpnglobal_authenticationsamlpolicy_binding", "response", "[", "]", "=", "(", "vpnglobal_authenticationsamlpolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch a vpnglobal_authenticationsamlpolicy_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "vpnglobal_authenticationsamlpolicy_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_authenticationsamlpolicy_binding.java#L225-L229
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java
nsacl6.add
public static base_response add(nitro_service client, nsacl6 resource) throws Exception { nsacl6 addresource = new nsacl6(); addresource.acl6name = resource.acl6name; addresource.acl6action = resource.acl6action; addresource.td = resource.td; addresource.srcipv6 = resource.srcipv6; addresource.srcipop = resource.srcipop; addresource.srcipv6val = resource.srcipv6val; addresource.srcport = resource.srcport; addresource.srcportop = resource.srcportop; addresource.srcportval = resource.srcportval; addresource.destipv6 = resource.destipv6; addresource.destipop = resource.destipop; addresource.destipv6val = resource.destipv6val; addresource.destport = resource.destport; addresource.destportop = resource.destportop; addresource.destportval = resource.destportval; addresource.ttl = resource.ttl; addresource.srcmac = resource.srcmac; addresource.protocol = resource.protocol; addresource.protocolnumber = resource.protocolnumber; addresource.vlan = resource.vlan; addresource.Interface = resource.Interface; addresource.established = resource.established; addresource.icmptype = resource.icmptype; addresource.icmpcode = resource.icmpcode; addresource.priority = resource.priority; addresource.state = resource.state; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, nsacl6 resource) throws Exception { nsacl6 addresource = new nsacl6(); addresource.acl6name = resource.acl6name; addresource.acl6action = resource.acl6action; addresource.td = resource.td; addresource.srcipv6 = resource.srcipv6; addresource.srcipop = resource.srcipop; addresource.srcipv6val = resource.srcipv6val; addresource.srcport = resource.srcport; addresource.srcportop = resource.srcportop; addresource.srcportval = resource.srcportval; addresource.destipv6 = resource.destipv6; addresource.destipop = resource.destipop; addresource.destipv6val = resource.destipv6val; addresource.destport = resource.destport; addresource.destportop = resource.destportop; addresource.destportval = resource.destportval; addresource.ttl = resource.ttl; addresource.srcmac = resource.srcmac; addresource.protocol = resource.protocol; addresource.protocolnumber = resource.protocolnumber; addresource.vlan = resource.vlan; addresource.Interface = resource.Interface; addresource.established = resource.established; addresource.icmptype = resource.icmptype; addresource.icmpcode = resource.icmpcode; addresource.priority = resource.priority; addresource.state = resource.state; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "nsacl6", "resource", ")", "throws", "Exception", "{", "nsacl6", "addresource", "=", "new", "nsacl6", "(", ")", ";", "addresource", ".", "acl6name", "=", "resource", ".", "acl6name", ";", "addresource", ".", "acl6action", "=", "resource", ".", "acl6action", ";", "addresource", ".", "td", "=", "resource", ".", "td", ";", "addresource", ".", "srcipv6", "=", "resource", ".", "srcipv6", ";", "addresource", ".", "srcipop", "=", "resource", ".", "srcipop", ";", "addresource", ".", "srcipv6val", "=", "resource", ".", "srcipv6val", ";", "addresource", ".", "srcport", "=", "resource", ".", "srcport", ";", "addresource", ".", "srcportop", "=", "resource", ".", "srcportop", ";", "addresource", ".", "srcportval", "=", "resource", ".", "srcportval", ";", "addresource", ".", "destipv6", "=", "resource", ".", "destipv6", ";", "addresource", ".", "destipop", "=", "resource", ".", "destipop", ";", "addresource", ".", "destipv6val", "=", "resource", ".", "destipv6val", ";", "addresource", ".", "destport", "=", "resource", ".", "destport", ";", "addresource", ".", "destportop", "=", "resource", ".", "destportop", ";", "addresource", ".", "destportval", "=", "resource", ".", "destportval", ";", "addresource", ".", "ttl", "=", "resource", ".", "ttl", ";", "addresource", ".", "srcmac", "=", "resource", ".", "srcmac", ";", "addresource", ".", "protocol", "=", "resource", ".", "protocol", ";", "addresource", ".", "protocolnumber", "=", "resource", ".", "protocolnumber", ";", "addresource", ".", "vlan", "=", "resource", ".", "vlan", ";", "addresource", ".", "Interface", "=", "resource", ".", "Interface", ";", "addresource", ".", "established", "=", "resource", ".", "established", ";", "addresource", ".", "icmptype", "=", "resource", ".", "icmptype", ";", "addresource", ".", "icmpcode", "=", "resource", ".", "icmpcode", ";", "addresource", ".", "priority", "=", "resource", ".", "priority", ";", "addresource", ".", "state", "=", "resource", ".", "state", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add nsacl6.
[ "Use", "this", "API", "to", "add", "nsacl6", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java#L769-L798
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java
nsacl6.add
public static base_responses add(nitro_service client, nsacl6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsacl6 addresources[] = new nsacl6[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nsacl6(); addresources[i].acl6name = resources[i].acl6name; addresources[i].acl6action = resources[i].acl6action; addresources[i].td = resources[i].td; addresources[i].srcipv6 = resources[i].srcipv6; addresources[i].srcipop = resources[i].srcipop; addresources[i].srcipv6val = resources[i].srcipv6val; addresources[i].srcport = resources[i].srcport; addresources[i].srcportop = resources[i].srcportop; addresources[i].srcportval = resources[i].srcportval; addresources[i].destipv6 = resources[i].destipv6; addresources[i].destipop = resources[i].destipop; addresources[i].destipv6val = resources[i].destipv6val; addresources[i].destport = resources[i].destport; addresources[i].destportop = resources[i].destportop; addresources[i].destportval = resources[i].destportval; addresources[i].ttl = resources[i].ttl; addresources[i].srcmac = resources[i].srcmac; addresources[i].protocol = resources[i].protocol; addresources[i].protocolnumber = resources[i].protocolnumber; addresources[i].vlan = resources[i].vlan; addresources[i].Interface = resources[i].Interface; addresources[i].established = resources[i].established; addresources[i].icmptype = resources[i].icmptype; addresources[i].icmpcode = resources[i].icmpcode; addresources[i].priority = resources[i].priority; addresources[i].state = resources[i].state; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, nsacl6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsacl6 addresources[] = new nsacl6[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nsacl6(); addresources[i].acl6name = resources[i].acl6name; addresources[i].acl6action = resources[i].acl6action; addresources[i].td = resources[i].td; addresources[i].srcipv6 = resources[i].srcipv6; addresources[i].srcipop = resources[i].srcipop; addresources[i].srcipv6val = resources[i].srcipv6val; addresources[i].srcport = resources[i].srcport; addresources[i].srcportop = resources[i].srcportop; addresources[i].srcportval = resources[i].srcportval; addresources[i].destipv6 = resources[i].destipv6; addresources[i].destipop = resources[i].destipop; addresources[i].destipv6val = resources[i].destipv6val; addresources[i].destport = resources[i].destport; addresources[i].destportop = resources[i].destportop; addresources[i].destportval = resources[i].destportval; addresources[i].ttl = resources[i].ttl; addresources[i].srcmac = resources[i].srcmac; addresources[i].protocol = resources[i].protocol; addresources[i].protocolnumber = resources[i].protocolnumber; addresources[i].vlan = resources[i].vlan; addresources[i].Interface = resources[i].Interface; addresources[i].established = resources[i].established; addresources[i].icmptype = resources[i].icmptype; addresources[i].icmpcode = resources[i].icmpcode; addresources[i].priority = resources[i].priority; addresources[i].state = resources[i].state; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "nsacl6", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nsacl6", "addresources", "[", "]", "=", "new", "nsacl6", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "nsacl6", "(", ")", ";", "addresources", "[", "i", "]", ".", "acl6name", "=", "resources", "[", "i", "]", ".", "acl6name", ";", "addresources", "[", "i", "]", ".", "acl6action", "=", "resources", "[", "i", "]", ".", "acl6action", ";", "addresources", "[", "i", "]", ".", "td", "=", "resources", "[", "i", "]", ".", "td", ";", "addresources", "[", "i", "]", ".", "srcipv6", "=", "resources", "[", "i", "]", ".", "srcipv6", ";", "addresources", "[", "i", "]", ".", "srcipop", "=", "resources", "[", "i", "]", ".", "srcipop", ";", "addresources", "[", "i", "]", ".", "srcipv6val", "=", "resources", "[", "i", "]", ".", "srcipv6val", ";", "addresources", "[", "i", "]", ".", "srcport", "=", "resources", "[", "i", "]", ".", "srcport", ";", "addresources", "[", "i", "]", ".", "srcportop", "=", "resources", "[", "i", "]", ".", "srcportop", ";", "addresources", "[", "i", "]", ".", "srcportval", "=", "resources", "[", "i", "]", ".", "srcportval", ";", "addresources", "[", "i", "]", ".", "destipv6", "=", "resources", "[", "i", "]", ".", "destipv6", ";", "addresources", "[", "i", "]", ".", "destipop", "=", "resources", "[", "i", "]", ".", "destipop", ";", "addresources", "[", "i", "]", ".", "destipv6val", "=", "resources", "[", "i", "]", ".", "destipv6val", ";", "addresources", "[", "i", "]", ".", "destport", "=", "resources", "[", "i", "]", ".", "destport", ";", "addresources", "[", "i", "]", ".", "destportop", "=", "resources", "[", "i", "]", ".", "destportop", ";", "addresources", "[", "i", "]", ".", "destportval", "=", "resources", "[", "i", "]", ".", "destportval", ";", "addresources", "[", "i", "]", ".", "ttl", "=", "resources", "[", "i", "]", ".", "ttl", ";", "addresources", "[", "i", "]", ".", "srcmac", "=", "resources", "[", "i", "]", ".", "srcmac", ";", "addresources", "[", "i", "]", ".", "protocol", "=", "resources", "[", "i", "]", ".", "protocol", ";", "addresources", "[", "i", "]", ".", "protocolnumber", "=", "resources", "[", "i", "]", ".", "protocolnumber", ";", "addresources", "[", "i", "]", ".", "vlan", "=", "resources", "[", "i", "]", ".", "vlan", ";", "addresources", "[", "i", "]", ".", "Interface", "=", "resources", "[", "i", "]", ".", "Interface", ";", "addresources", "[", "i", "]", ".", "established", "=", "resources", "[", "i", "]", ".", "established", ";", "addresources", "[", "i", "]", ".", "icmptype", "=", "resources", "[", "i", "]", ".", "icmptype", ";", "addresources", "[", "i", "]", ".", "icmpcode", "=", "resources", "[", "i", "]", ".", "icmpcode", ";", "addresources", "[", "i", "]", ".", "priority", "=", "resources", "[", "i", "]", ".", "priority", ";", "addresources", "[", "i", "]", ".", "state", "=", "resources", "[", "i", "]", ".", "state", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add nsacl6 resources.
[ "Use", "this", "API", "to", "add", "nsacl6", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java#L803-L839
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java
nsacl6.delete
public static base_response delete(nitro_service client, String acl6name) throws Exception { nsacl6 deleteresource = new nsacl6(); deleteresource.acl6name = acl6name; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, String acl6name) throws Exception { nsacl6 deleteresource = new nsacl6(); deleteresource.acl6name = acl6name; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "String", "acl6name", ")", "throws", "Exception", "{", "nsacl6", "deleteresource", "=", "new", "nsacl6", "(", ")", ";", "deleteresource", ".", "acl6name", "=", "acl6name", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete nsacl6 of given name.
[ "Use", "this", "API", "to", "delete", "nsacl6", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java#L844-L848
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java
nsacl6.delete
public static base_responses delete(nitro_service client, String acl6name[]) throws Exception { base_responses result = null; if (acl6name != null && acl6name.length > 0) { nsacl6 deleteresources[] = new nsacl6[acl6name.length]; for (int i=0;i<acl6name.length;i++){ deleteresources[i] = new nsacl6(); deleteresources[i].acl6name = acl6name[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
java
public static base_responses delete(nitro_service client, String acl6name[]) throws Exception { base_responses result = null; if (acl6name != null && acl6name.length > 0) { nsacl6 deleteresources[] = new nsacl6[acl6name.length]; for (int i=0;i<acl6name.length;i++){ deleteresources[i] = new nsacl6(); deleteresources[i].acl6name = acl6name[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "public", "static", "base_responses", "delete", "(", "nitro_service", "client", ",", "String", "acl6name", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "acl6name", "!=", "null", "&&", "acl6name", ".", "length", ">", "0", ")", "{", "nsacl6", "deleteresources", "[", "]", "=", "new", "nsacl6", "[", "acl6name", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "acl6name", ".", "length", ";", "i", "++", ")", "{", "deleteresources", "[", "i", "]", "=", "new", "nsacl6", "(", ")", ";", "deleteresources", "[", "i", "]", ".", "acl6name", "=", "acl6name", "[", "i", "]", ";", "}", "result", "=", "delete_bulk_request", "(", "client", ",", "deleteresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to delete nsacl6 resources of given names.
[ "Use", "this", "API", "to", "delete", "nsacl6", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java#L862-L873
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java
nsacl6.update
public static base_response update(nitro_service client, nsacl6 resource) throws Exception { nsacl6 updateresource = new nsacl6(); updateresource.acl6name = resource.acl6name; updateresource.aclaction = resource.aclaction; updateresource.srcipv6 = resource.srcipv6; updateresource.srcipop = resource.srcipop; updateresource.srcipv6val = resource.srcipv6val; updateresource.srcport = resource.srcport; updateresource.srcportop = resource.srcportop; updateresource.srcportval = resource.srcportval; updateresource.destipv6 = resource.destipv6; updateresource.destipop = resource.destipop; updateresource.destipv6val = resource.destipv6val; updateresource.destport = resource.destport; updateresource.destportop = resource.destportop; updateresource.destportval = resource.destportval; updateresource.srcmac = resource.srcmac; updateresource.protocol = resource.protocol; updateresource.protocolnumber = resource.protocolnumber; updateresource.icmptype = resource.icmptype; updateresource.icmpcode = resource.icmpcode; updateresource.vlan = resource.vlan; updateresource.Interface = resource.Interface; updateresource.priority = resource.priority; updateresource.established = resource.established; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, nsacl6 resource) throws Exception { nsacl6 updateresource = new nsacl6(); updateresource.acl6name = resource.acl6name; updateresource.aclaction = resource.aclaction; updateresource.srcipv6 = resource.srcipv6; updateresource.srcipop = resource.srcipop; updateresource.srcipv6val = resource.srcipv6val; updateresource.srcport = resource.srcport; updateresource.srcportop = resource.srcportop; updateresource.srcportval = resource.srcportval; updateresource.destipv6 = resource.destipv6; updateresource.destipop = resource.destipop; updateresource.destipv6val = resource.destipv6val; updateresource.destport = resource.destport; updateresource.destportop = resource.destportop; updateresource.destportval = resource.destportval; updateresource.srcmac = resource.srcmac; updateresource.protocol = resource.protocol; updateresource.protocolnumber = resource.protocolnumber; updateresource.icmptype = resource.icmptype; updateresource.icmpcode = resource.icmpcode; updateresource.vlan = resource.vlan; updateresource.Interface = resource.Interface; updateresource.priority = resource.priority; updateresource.established = resource.established; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "nsacl6", "resource", ")", "throws", "Exception", "{", "nsacl6", "updateresource", "=", "new", "nsacl6", "(", ")", ";", "updateresource", ".", "acl6name", "=", "resource", ".", "acl6name", ";", "updateresource", ".", "aclaction", "=", "resource", ".", "aclaction", ";", "updateresource", ".", "srcipv6", "=", "resource", ".", "srcipv6", ";", "updateresource", ".", "srcipop", "=", "resource", ".", "srcipop", ";", "updateresource", ".", "srcipv6val", "=", "resource", ".", "srcipv6val", ";", "updateresource", ".", "srcport", "=", "resource", ".", "srcport", ";", "updateresource", ".", "srcportop", "=", "resource", ".", "srcportop", ";", "updateresource", ".", "srcportval", "=", "resource", ".", "srcportval", ";", "updateresource", ".", "destipv6", "=", "resource", ".", "destipv6", ";", "updateresource", ".", "destipop", "=", "resource", ".", "destipop", ";", "updateresource", ".", "destipv6val", "=", "resource", ".", "destipv6val", ";", "updateresource", ".", "destport", "=", "resource", ".", "destport", ";", "updateresource", ".", "destportop", "=", "resource", ".", "destportop", ";", "updateresource", ".", "destportval", "=", "resource", ".", "destportval", ";", "updateresource", ".", "srcmac", "=", "resource", ".", "srcmac", ";", "updateresource", ".", "protocol", "=", "resource", ".", "protocol", ";", "updateresource", ".", "protocolnumber", "=", "resource", ".", "protocolnumber", ";", "updateresource", ".", "icmptype", "=", "resource", ".", "icmptype", ";", "updateresource", ".", "icmpcode", "=", "resource", ".", "icmpcode", ";", "updateresource", ".", "vlan", "=", "resource", ".", "vlan", ";", "updateresource", ".", "Interface", "=", "resource", ".", "Interface", ";", "updateresource", ".", "priority", "=", "resource", ".", "priority", ";", "updateresource", ".", "established", "=", "resource", ".", "established", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update nsacl6.
[ "Use", "this", "API", "to", "update", "nsacl6", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java#L894-L920
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java
nsacl6.update
public static base_responses update(nitro_service client, nsacl6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsacl6 updateresources[] = new nsacl6[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nsacl6(); updateresources[i].acl6name = resources[i].acl6name; updateresources[i].aclaction = resources[i].aclaction; updateresources[i].srcipv6 = resources[i].srcipv6; updateresources[i].srcipop = resources[i].srcipop; updateresources[i].srcipv6val = resources[i].srcipv6val; updateresources[i].srcport = resources[i].srcport; updateresources[i].srcportop = resources[i].srcportop; updateresources[i].srcportval = resources[i].srcportval; updateresources[i].destipv6 = resources[i].destipv6; updateresources[i].destipop = resources[i].destipop; updateresources[i].destipv6val = resources[i].destipv6val; updateresources[i].destport = resources[i].destport; updateresources[i].destportop = resources[i].destportop; updateresources[i].destportval = resources[i].destportval; updateresources[i].srcmac = resources[i].srcmac; updateresources[i].protocol = resources[i].protocol; updateresources[i].protocolnumber = resources[i].protocolnumber; updateresources[i].icmptype = resources[i].icmptype; updateresources[i].icmpcode = resources[i].icmpcode; updateresources[i].vlan = resources[i].vlan; updateresources[i].Interface = resources[i].Interface; updateresources[i].priority = resources[i].priority; updateresources[i].established = resources[i].established; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, nsacl6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsacl6 updateresources[] = new nsacl6[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nsacl6(); updateresources[i].acl6name = resources[i].acl6name; updateresources[i].aclaction = resources[i].aclaction; updateresources[i].srcipv6 = resources[i].srcipv6; updateresources[i].srcipop = resources[i].srcipop; updateresources[i].srcipv6val = resources[i].srcipv6val; updateresources[i].srcport = resources[i].srcport; updateresources[i].srcportop = resources[i].srcportop; updateresources[i].srcportval = resources[i].srcportval; updateresources[i].destipv6 = resources[i].destipv6; updateresources[i].destipop = resources[i].destipop; updateresources[i].destipv6val = resources[i].destipv6val; updateresources[i].destport = resources[i].destport; updateresources[i].destportop = resources[i].destportop; updateresources[i].destportval = resources[i].destportval; updateresources[i].srcmac = resources[i].srcmac; updateresources[i].protocol = resources[i].protocol; updateresources[i].protocolnumber = resources[i].protocolnumber; updateresources[i].icmptype = resources[i].icmptype; updateresources[i].icmpcode = resources[i].icmpcode; updateresources[i].vlan = resources[i].vlan; updateresources[i].Interface = resources[i].Interface; updateresources[i].priority = resources[i].priority; updateresources[i].established = resources[i].established; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "nsacl6", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nsacl6", "updateresources", "[", "]", "=", "new", "nsacl6", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "nsacl6", "(", ")", ";", "updateresources", "[", "i", "]", ".", "acl6name", "=", "resources", "[", "i", "]", ".", "acl6name", ";", "updateresources", "[", "i", "]", ".", "aclaction", "=", "resources", "[", "i", "]", ".", "aclaction", ";", "updateresources", "[", "i", "]", ".", "srcipv6", "=", "resources", "[", "i", "]", ".", "srcipv6", ";", "updateresources", "[", "i", "]", ".", "srcipop", "=", "resources", "[", "i", "]", ".", "srcipop", ";", "updateresources", "[", "i", "]", ".", "srcipv6val", "=", "resources", "[", "i", "]", ".", "srcipv6val", ";", "updateresources", "[", "i", "]", ".", "srcport", "=", "resources", "[", "i", "]", ".", "srcport", ";", "updateresources", "[", "i", "]", ".", "srcportop", "=", "resources", "[", "i", "]", ".", "srcportop", ";", "updateresources", "[", "i", "]", ".", "srcportval", "=", "resources", "[", "i", "]", ".", "srcportval", ";", "updateresources", "[", "i", "]", ".", "destipv6", "=", "resources", "[", "i", "]", ".", "destipv6", ";", "updateresources", "[", "i", "]", ".", "destipop", "=", "resources", "[", "i", "]", ".", "destipop", ";", "updateresources", "[", "i", "]", ".", "destipv6val", "=", "resources", "[", "i", "]", ".", "destipv6val", ";", "updateresources", "[", "i", "]", ".", "destport", "=", "resources", "[", "i", "]", ".", "destport", ";", "updateresources", "[", "i", "]", ".", "destportop", "=", "resources", "[", "i", "]", ".", "destportop", ";", "updateresources", "[", "i", "]", ".", "destportval", "=", "resources", "[", "i", "]", ".", "destportval", ";", "updateresources", "[", "i", "]", ".", "srcmac", "=", "resources", "[", "i", "]", ".", "srcmac", ";", "updateresources", "[", "i", "]", ".", "protocol", "=", "resources", "[", "i", "]", ".", "protocol", ";", "updateresources", "[", "i", "]", ".", "protocolnumber", "=", "resources", "[", "i", "]", ".", "protocolnumber", ";", "updateresources", "[", "i", "]", ".", "icmptype", "=", "resources", "[", "i", "]", ".", "icmptype", ";", "updateresources", "[", "i", "]", ".", "icmpcode", "=", "resources", "[", "i", "]", ".", "icmpcode", ";", "updateresources", "[", "i", "]", ".", "vlan", "=", "resources", "[", "i", "]", ".", "vlan", ";", "updateresources", "[", "i", "]", ".", "Interface", "=", "resources", "[", "i", "]", ".", "Interface", ";", "updateresources", "[", "i", "]", ".", "priority", "=", "resources", "[", "i", "]", ".", "priority", ";", "updateresources", "[", "i", "]", ".", "established", "=", "resources", "[", "i", "]", ".", "established", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update nsacl6 resources.
[ "Use", "this", "API", "to", "update", "nsacl6", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java#L925-L958
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java
nsacl6.unset
public static base_response unset(nitro_service client, nsacl6 resource, String[] args) throws Exception{ nsacl6 unsetresource = new nsacl6(); unsetresource.acl6name = resource.acl6name; return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, nsacl6 resource, String[] args) throws Exception{ nsacl6 unsetresource = new nsacl6(); unsetresource.acl6name = resource.acl6name; return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "nsacl6", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "nsacl6", "unsetresource", "=", "new", "nsacl6", "(", ")", ";", "unsetresource", ".", "acl6name", "=", "resource", ".", "acl6name", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of nsacl6 resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "nsacl6", "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/ns/nsacl6.java#L964-L968
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl6.java
nsacl6.unset
public static base_responses unset(nitro_service client, String acl6name[], String args[]) throws Exception { base_responses result = null; if (acl6name != null && acl6name.length > 0) { nsacl6 unsetresources[] = new nsacl6[acl6name.length]; for (int i=0;i<acl6name.length;i++){ unsetresources[i] = new nsacl6(); unsetresources[i].acl6name = acl6name[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
public static base_responses unset(nitro_service client, String acl6name[], String args[]) throws Exception { base_responses result = null; if (acl6name != null && acl6name.length > 0) { nsacl6 unsetresources[] = new nsacl6[acl6name.length]; for (int i=0;i<acl6name.length;i++){ unsetresources[i] = new nsacl6(); unsetresources[i].acl6name = acl6name[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "public", "static", "base_responses", "unset", "(", "nitro_service", "client", ",", "String", "acl6name", "[", "]", ",", "String", "args", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "acl6name", "!=", "null", "&&", "acl6name", ".", "length", ">", "0", ")", "{", "nsacl6", "unsetresources", "[", "]", "=", "new", "nsacl6", "[", "acl6name", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "acl6name", ".", "length", ";", "i", "++", ")", "{", "unsetresources", "[", "i", "]", "=", "new", "nsacl6", "(", ")", ";", "unsetresources", "[", "i", "]", ".", "acl6name", "=", "acl6name", "[", "i", "]", ";", "}", "result", "=", "unset_bulk_request", "(", "client", ",", "unsetresources", ",", "args", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to unset the properties of nsacl6 resources. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "nsacl6", "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/ns/nsacl6.java#L974-L985
train