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/responder/responderhtmlpage.java
responderhtmlpage.Import
public static base_response Import(nitro_service client, responderhtmlpage resource) throws Exception { responderhtmlpage Importresource = new responderhtmlpage(); Importresource.src = resource.src; Importresource.name = resource.name; Importresource.comment = resource.comment; Importresource.overwrite = resource.overwrite; return Importresource.perform_operation(client,"Import"); }
java
public static base_response Import(nitro_service client, responderhtmlpage resource) throws Exception { responderhtmlpage Importresource = new responderhtmlpage(); Importresource.src = resource.src; Importresource.name = resource.name; Importresource.comment = resource.comment; Importresource.overwrite = resource.overwrite; return Importresource.perform_operation(client,"Import"); }
[ "public", "static", "base_response", "Import", "(", "nitro_service", "client", ",", "responderhtmlpage", "resource", ")", "throws", "Exception", "{", "responderhtmlpage", "Importresource", "=", "new", "responderhtmlpage", "(", ")", ";", "Importresource", ".", "src", "=", "resource", ".", "src", ";", "Importresource", ".", "name", "=", "resource", ".", "name", ";", "Importresource", ".", "comment", "=", "resource", ".", "comment", ";", "Importresource", ".", "overwrite", "=", "resource", ".", "overwrite", ";", "return", "Importresource", ".", "perform_operation", "(", "client", ",", "\"Import\"", ")", ";", "}" ]
Use this API to Import responderhtmlpage.
[ "Use", "this", "API", "to", "Import", "responderhtmlpage", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/responder/responderhtmlpage.java#L175-L182
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/responder/responderhtmlpage.java
responderhtmlpage.change
public static base_response change(nitro_service client, responderhtmlpage resource) throws Exception { responderhtmlpage updateresource = new responderhtmlpage(); updateresource.name = resource.name; return updateresource.perform_operation(client,"update"); }
java
public static base_response change(nitro_service client, responderhtmlpage resource) throws Exception { responderhtmlpage updateresource = new responderhtmlpage(); updateresource.name = resource.name; return updateresource.perform_operation(client,"update"); }
[ "public", "static", "base_response", "change", "(", "nitro_service", "client", ",", "responderhtmlpage", "resource", ")", "throws", "Exception", "{", "responderhtmlpage", "updateresource", "=", "new", "responderhtmlpage", "(", ")", ";", "updateresource", ".", "name", "=", "resource", ".", "name", ";", "return", "updateresource", ".", "perform_operation", "(", "client", ",", "\"update\"", ")", ";", "}" ]
Use this API to change responderhtmlpage.
[ "Use", "this", "API", "to", "change", "responderhtmlpage", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/responder/responderhtmlpage.java#L205-L209
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/responder/responderhtmlpage.java
responderhtmlpage.get
public static responderhtmlpage get(nitro_service service) throws Exception{ responderhtmlpage obj = new responderhtmlpage(); responderhtmlpage[] response = (responderhtmlpage[])obj.get_resources(service); return response[0]; }
java
public static responderhtmlpage get(nitro_service service) throws Exception{ responderhtmlpage obj = new responderhtmlpage(); responderhtmlpage[] response = (responderhtmlpage[])obj.get_resources(service); return response[0]; }
[ "public", "static", "responderhtmlpage", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "responderhtmlpage", "obj", "=", "new", "responderhtmlpage", "(", ")", ";", "responderhtmlpage", "[", "]", "response", "=", "(", "responderhtmlpage", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the responderhtmlpage resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "responderhtmlpage", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/responder/responderhtmlpage.java#L214-L218
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/responder/responderhtmlpage.java
responderhtmlpage.get
public static responderhtmlpage get(nitro_service service, String name) throws Exception{ responderhtmlpage obj = new responderhtmlpage(); obj.set_name(name); responderhtmlpage response = (responderhtmlpage) obj.get_resource(service); return response; }
java
public static responderhtmlpage get(nitro_service service, String name) throws Exception{ responderhtmlpage obj = new responderhtmlpage(); obj.set_name(name); responderhtmlpage response = (responderhtmlpage) obj.get_resource(service); return response; }
[ "public", "static", "responderhtmlpage", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "responderhtmlpage", "obj", "=", "new", "responderhtmlpage", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "responderhtmlpage", "response", "=", "(", "responderhtmlpage", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch responderhtmlpage resource of given name .
[ "Use", "this", "API", "to", "fetch", "responderhtmlpage", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/responder/responderhtmlpage.java#L232-L237
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/optimization/GoldenSectionLineSearch.java
GoldenSectionLineSearch.goldenMean
private double goldenMean(double a, double b) { if (geometric) { return a * Math.pow(b / a, GOLDEN_SECTION); } else { return a + (b - a) * GOLDEN_SECTION; } }
java
private double goldenMean(double a, double b) { if (geometric) { return a * Math.pow(b / a, GOLDEN_SECTION); } else { return a + (b - a) * GOLDEN_SECTION; } }
[ "private", "double", "goldenMean", "(", "double", "a", ",", "double", "b", ")", "{", "if", "(", "geometric", ")", "{", "return", "a", "*", "Math", ".", "pow", "(", "b", "/", "a", ",", "GOLDEN_SECTION", ")", ";", "}", "else", "{", "return", "a", "+", "(", "b", "-", "a", ")", "*", "GOLDEN_SECTION", ";", "}", "}" ]
The point that is the GOLDEN_SECTION along the way from a to b. a may be less or greater than b, you find the point 60-odd percent of the way from a to b. @param a Interval minimum @param b Interval maximum @return The GOLDEN_SECTION along the way from a to b.
[ "The", "point", "that", "is", "the", "GOLDEN_SECTION", "along", "the", "way", "from", "a", "to", "b", ".", "a", "may", "be", "less", "or", "greater", "than", "b", "you", "find", "the", "point", "60", "-", "odd", "percent", "of", "the", "way", "from", "a", "to", "b", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/optimization/GoldenSectionLineSearch.java#L188-L194
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.getNumWeights
public int getNumWeights() { if (weights == null) return 0; int numWeights = 0; for (double[] wts : weights) { numWeights += wts.length; } return numWeights; }
java
public int getNumWeights() { if (weights == null) return 0; int numWeights = 0; for (double[] wts : weights) { numWeights += wts.length; } return numWeights; }
[ "public", "int", "getNumWeights", "(", ")", "{", "if", "(", "weights", "==", "null", ")", "return", "0", ";", "int", "numWeights", "=", "0", ";", "for", "(", "double", "[", "]", "wts", ":", "weights", ")", "{", "numWeights", "+=", "wts", ".", "length", ";", "}", "return", "numWeights", ";", "}" ]
Returns the total number of weights associated with this classifier. @return number of weights
[ "Returns", "the", "total", "number", "of", "weights", "associated", "with", "this", "classifier", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L198-L205
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.scaleWeights
public void scaleWeights(double scale) { for (int i = 0; i < weights.length; i++) { for (int j = 0; j < weights[i].length; j++) { weights[i][j] *= scale; } } }
java
public void scaleWeights(double scale) { for (int i = 0; i < weights.length; i++) { for (int j = 0; j < weights[i].length; j++) { weights[i][j] *= scale; } } }
[ "public", "void", "scaleWeights", "(", "double", "scale", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "weights", ".", "length", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "0", ";", "j", "<", "weights", "[", "i", "]", ".", "length", ";", "j", "++", ")", "{", "weights", "[", "i", "]", "[", "j", "]", "*=", "scale", ";", "}", "}", "}" ]
Scales the weights of this crfclassifier by the specified weight @param scale
[ "Scales", "the", "weights", "of", "this", "crfclassifier", "by", "the", "specified", "weight" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L250-L256
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.combine
public void combine(CRFClassifier<IN> crf, double weight) { Timing timer = new Timing(); // Check the CRFClassifiers are compatible if (!this.pad.equals(crf.pad)) { throw new RuntimeException("Incompatible CRFClassifier: pad does not match"); } if (this.windowSize != crf.windowSize) { throw new RuntimeException("Incompatible CRFClassifier: windowSize does not match"); } if (this.labelIndices.length != crf.labelIndices.length) { // Should match since this should be same as the windowSize throw new RuntimeException("Incompatible CRFClassifier: labelIndices length does not match"); } this.classIndex.addAll(crf.classIndex.objectsList()); // Combine weights of the other classifier with this classifier, // weighing the other classifier's weights by weight // First merge the feature indicies int oldNumFeatures1 = this.featureIndex.size(); int oldNumFeatures2 = crf.featureIndex.size(); int oldNumWeights1 = this.getNumWeights(); int oldNumWeights2 = crf.getNumWeights(); this.featureIndex.addAll(crf.featureIndex.objectsList()); this.knownLCWords.addAll(crf.knownLCWords); assert (weights.length == oldNumFeatures1); // Combine weights of this classifier with other classifier for (int i = 0; i < labelIndices.length; i++) { this.labelIndices[i].addAll(crf.labelIndices[i].objectsList()); } System.err.println("Combining weights: will automatically match labelIndices"); combineWeights(crf, weight); int numFeatures = featureIndex.size(); int numWeights = getNumWeights(); long elapsedMs = timer.stop(); System.err.println("numFeatures: orig1=" + oldNumFeatures1 + ", orig2=" + oldNumFeatures2 + ", combined=" + numFeatures); System.err .println("numWeights: orig1=" + oldNumWeights1 + ", orig2=" + oldNumWeights2 + ", combined=" + numWeights); System.err.println("Time to combine CRFClassifier: " + Timing.toSecondsString(elapsedMs) + " seconds"); }
java
public void combine(CRFClassifier<IN> crf, double weight) { Timing timer = new Timing(); // Check the CRFClassifiers are compatible if (!this.pad.equals(crf.pad)) { throw new RuntimeException("Incompatible CRFClassifier: pad does not match"); } if (this.windowSize != crf.windowSize) { throw new RuntimeException("Incompatible CRFClassifier: windowSize does not match"); } if (this.labelIndices.length != crf.labelIndices.length) { // Should match since this should be same as the windowSize throw new RuntimeException("Incompatible CRFClassifier: labelIndices length does not match"); } this.classIndex.addAll(crf.classIndex.objectsList()); // Combine weights of the other classifier with this classifier, // weighing the other classifier's weights by weight // First merge the feature indicies int oldNumFeatures1 = this.featureIndex.size(); int oldNumFeatures2 = crf.featureIndex.size(); int oldNumWeights1 = this.getNumWeights(); int oldNumWeights2 = crf.getNumWeights(); this.featureIndex.addAll(crf.featureIndex.objectsList()); this.knownLCWords.addAll(crf.knownLCWords); assert (weights.length == oldNumFeatures1); // Combine weights of this classifier with other classifier for (int i = 0; i < labelIndices.length; i++) { this.labelIndices[i].addAll(crf.labelIndices[i].objectsList()); } System.err.println("Combining weights: will automatically match labelIndices"); combineWeights(crf, weight); int numFeatures = featureIndex.size(); int numWeights = getNumWeights(); long elapsedMs = timer.stop(); System.err.println("numFeatures: orig1=" + oldNumFeatures1 + ", orig2=" + oldNumFeatures2 + ", combined=" + numFeatures); System.err .println("numWeights: orig1=" + oldNumWeights1 + ", orig2=" + oldNumWeights2 + ", combined=" + numWeights); System.err.println("Time to combine CRFClassifier: " + Timing.toSecondsString(elapsedMs) + " seconds"); }
[ "public", "void", "combine", "(", "CRFClassifier", "<", "IN", ">", "crf", ",", "double", "weight", ")", "{", "Timing", "timer", "=", "new", "Timing", "(", ")", ";", "// Check the CRFClassifiers are compatible\r", "if", "(", "!", "this", ".", "pad", ".", "equals", "(", "crf", ".", "pad", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"Incompatible CRFClassifier: pad does not match\"", ")", ";", "}", "if", "(", "this", ".", "windowSize", "!=", "crf", ".", "windowSize", ")", "{", "throw", "new", "RuntimeException", "(", "\"Incompatible CRFClassifier: windowSize does not match\"", ")", ";", "}", "if", "(", "this", ".", "labelIndices", ".", "length", "!=", "crf", ".", "labelIndices", ".", "length", ")", "{", "// Should match since this should be same as the windowSize\r", "throw", "new", "RuntimeException", "(", "\"Incompatible CRFClassifier: labelIndices length does not match\"", ")", ";", "}", "this", ".", "classIndex", ".", "addAll", "(", "crf", ".", "classIndex", ".", "objectsList", "(", ")", ")", ";", "// Combine weights of the other classifier with this classifier,\r", "// weighing the other classifier's weights by weight\r", "// First merge the feature indicies\r", "int", "oldNumFeatures1", "=", "this", ".", "featureIndex", ".", "size", "(", ")", ";", "int", "oldNumFeatures2", "=", "crf", ".", "featureIndex", ".", "size", "(", ")", ";", "int", "oldNumWeights1", "=", "this", ".", "getNumWeights", "(", ")", ";", "int", "oldNumWeights2", "=", "crf", ".", "getNumWeights", "(", ")", ";", "this", ".", "featureIndex", ".", "addAll", "(", "crf", ".", "featureIndex", ".", "objectsList", "(", ")", ")", ";", "this", ".", "knownLCWords", ".", "addAll", "(", "crf", ".", "knownLCWords", ")", ";", "assert", "(", "weights", ".", "length", "==", "oldNumFeatures1", ")", ";", "// Combine weights of this classifier with other classifier\r", "for", "(", "int", "i", "=", "0", ";", "i", "<", "labelIndices", ".", "length", ";", "i", "++", ")", "{", "this", ".", "labelIndices", "[", "i", "]", ".", "addAll", "(", "crf", ".", "labelIndices", "[", "i", "]", ".", "objectsList", "(", ")", ")", ";", "}", "System", ".", "err", ".", "println", "(", "\"Combining weights: will automatically match labelIndices\"", ")", ";", "combineWeights", "(", "crf", ",", "weight", ")", ";", "int", "numFeatures", "=", "featureIndex", ".", "size", "(", ")", ";", "int", "numWeights", "=", "getNumWeights", "(", ")", ";", "long", "elapsedMs", "=", "timer", ".", "stop", "(", ")", ";", "System", ".", "err", ".", "println", "(", "\"numFeatures: orig1=\"", "+", "oldNumFeatures1", "+", "\", orig2=\"", "+", "oldNumFeatures2", "+", "\", combined=\"", "+", "numFeatures", ")", ";", "System", ".", "err", ".", "println", "(", "\"numWeights: orig1=\"", "+", "oldNumWeights1", "+", "\", orig2=\"", "+", "oldNumWeights2", "+", "\", combined=\"", "+", "numWeights", ")", ";", "System", ".", "err", ".", "println", "(", "\"Time to combine CRFClassifier: \"", "+", "Timing", ".", "toSecondsString", "(", "elapsedMs", ")", "+", "\" seconds\"", ")", ";", "}" ]
Combines weighted crf with this crf @param crf @param weight
[ "Combines", "weighted", "crf", "with", "this", "crf" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L336-L378
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.documentToDataAndLabels
public Pair<int[][][], int[]> documentToDataAndLabels(List<IN> document) { int docSize = document.size(); // first index is position in the document also the index of the // clique/factor table // second index is the number of elements in the clique/window these // features are for (starting with last element) // third index is position of the feature in the array that holds them // element in data[j][k][m] is the index of the mth feature occurring in // position k of the jth clique int[][][] data = new int[docSize][windowSize][]; // index is the position in the document // element in labels[j] is the index of the correct label (if it exists) at // position j of document int[] labels = new int[docSize]; if (flags.useReverse) { Collections.reverse(document); } // System.err.println("docSize:"+docSize); for (int j = 0; j < docSize; j++) { CRFDatum<List<String>, CRFLabel> d = makeDatum(document, j, featureFactory); List<List<String>> features = d.asFeatures(); for (int k = 0, fSize = features.size(); k < fSize; k++) { Collection<String> cliqueFeatures = features.get(k); data[j][k] = new int[cliqueFeatures.size()]; int m = 0; for (String feature : cliqueFeatures) { int index = featureIndex.indexOf(feature); if (index >= 0) { data[j][k][m] = index; m++; } else { // this is where we end up when we do feature threshold cutoffs } } // Reduce memory use when some features were cut out by threshold if (m < data[j][k].length) { int[] f = new int[m]; System.arraycopy(data[j][k], 0, f, 0, m); data[j][k] = f; } } IN wi = document.get(j); labels[j] = classIndex.indexOf(wi.get(AnswerAnnotation.class)); } if (flags.useReverse) { Collections.reverse(document); } // System.err.println("numClasses: "+classIndex.size()+" "+classIndex); // System.err.println("numDocuments: 1"); // System.err.println("numDatums: "+data.length); // System.err.println("numFeatures: "+featureIndex.size()); return new Pair<int[][][], int[]>(data, labels); }
java
public Pair<int[][][], int[]> documentToDataAndLabels(List<IN> document) { int docSize = document.size(); // first index is position in the document also the index of the // clique/factor table // second index is the number of elements in the clique/window these // features are for (starting with last element) // third index is position of the feature in the array that holds them // element in data[j][k][m] is the index of the mth feature occurring in // position k of the jth clique int[][][] data = new int[docSize][windowSize][]; // index is the position in the document // element in labels[j] is the index of the correct label (if it exists) at // position j of document int[] labels = new int[docSize]; if (flags.useReverse) { Collections.reverse(document); } // System.err.println("docSize:"+docSize); for (int j = 0; j < docSize; j++) { CRFDatum<List<String>, CRFLabel> d = makeDatum(document, j, featureFactory); List<List<String>> features = d.asFeatures(); for (int k = 0, fSize = features.size(); k < fSize; k++) { Collection<String> cliqueFeatures = features.get(k); data[j][k] = new int[cliqueFeatures.size()]; int m = 0; for (String feature : cliqueFeatures) { int index = featureIndex.indexOf(feature); if (index >= 0) { data[j][k][m] = index; m++; } else { // this is where we end up when we do feature threshold cutoffs } } // Reduce memory use when some features were cut out by threshold if (m < data[j][k].length) { int[] f = new int[m]; System.arraycopy(data[j][k], 0, f, 0, m); data[j][k] = f; } } IN wi = document.get(j); labels[j] = classIndex.indexOf(wi.get(AnswerAnnotation.class)); } if (flags.useReverse) { Collections.reverse(document); } // System.err.println("numClasses: "+classIndex.size()+" "+classIndex); // System.err.println("numDocuments: 1"); // System.err.println("numDatums: "+data.length); // System.err.println("numFeatures: "+featureIndex.size()); return new Pair<int[][][], int[]>(data, labels); }
[ "public", "Pair", "<", "int", "[", "]", "[", "]", "[", "]", ",", "int", "[", "]", ">", "documentToDataAndLabels", "(", "List", "<", "IN", ">", "document", ")", "{", "int", "docSize", "=", "document", ".", "size", "(", ")", ";", "// first index is position in the document also the index of the\r", "// clique/factor table\r", "// second index is the number of elements in the clique/window these\r", "// features are for (starting with last element)\r", "// third index is position of the feature in the array that holds them\r", "// element in data[j][k][m] is the index of the mth feature occurring in\r", "// position k of the jth clique\r", "int", "[", "]", "[", "]", "[", "]", "data", "=", "new", "int", "[", "docSize", "]", "[", "windowSize", "]", "[", "", "]", ";", "// index is the position in the document\r", "// element in labels[j] is the index of the correct label (if it exists) at\r", "// position j of document\r", "int", "[", "]", "labels", "=", "new", "int", "[", "docSize", "]", ";", "if", "(", "flags", ".", "useReverse", ")", "{", "Collections", ".", "reverse", "(", "document", ")", ";", "}", "// System.err.println(\"docSize:\"+docSize);\r", "for", "(", "int", "j", "=", "0", ";", "j", "<", "docSize", ";", "j", "++", ")", "{", "CRFDatum", "<", "List", "<", "String", ">", ",", "CRFLabel", ">", "d", "=", "makeDatum", "(", "document", ",", "j", ",", "featureFactory", ")", ";", "List", "<", "List", "<", "String", ">", ">", "features", "=", "d", ".", "asFeatures", "(", ")", ";", "for", "(", "int", "k", "=", "0", ",", "fSize", "=", "features", ".", "size", "(", ")", ";", "k", "<", "fSize", ";", "k", "++", ")", "{", "Collection", "<", "String", ">", "cliqueFeatures", "=", "features", ".", "get", "(", "k", ")", ";", "data", "[", "j", "]", "[", "k", "]", "=", "new", "int", "[", "cliqueFeatures", ".", "size", "(", ")", "]", ";", "int", "m", "=", "0", ";", "for", "(", "String", "feature", ":", "cliqueFeatures", ")", "{", "int", "index", "=", "featureIndex", ".", "indexOf", "(", "feature", ")", ";", "if", "(", "index", ">=", "0", ")", "{", "data", "[", "j", "]", "[", "k", "]", "[", "m", "]", "=", "index", ";", "m", "++", ";", "}", "else", "{", "// this is where we end up when we do feature threshold cutoffs\r", "}", "}", "// Reduce memory use when some features were cut out by threshold\r", "if", "(", "m", "<", "data", "[", "j", "]", "[", "k", "]", ".", "length", ")", "{", "int", "[", "]", "f", "=", "new", "int", "[", "m", "]", ";", "System", ".", "arraycopy", "(", "data", "[", "j", "]", "[", "k", "]", ",", "0", ",", "f", ",", "0", ",", "m", ")", ";", "data", "[", "j", "]", "[", "k", "]", "=", "f", ";", "}", "}", "IN", "wi", "=", "document", ".", "get", "(", "j", ")", ";", "labels", "[", "j", "]", "=", "classIndex", ".", "indexOf", "(", "wi", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ")", ";", "}", "if", "(", "flags", ".", "useReverse", ")", "{", "Collections", ".", "reverse", "(", "document", ")", ";", "}", "// System.err.println(\"numClasses: \"+classIndex.size()+\" \"+classIndex);\r", "// System.err.println(\"numDocuments: 1\");\r", "// System.err.println(\"numDatums: \"+data.length);\r", "// System.err.println(\"numFeatures: \"+featureIndex.size());\r", "return", "new", "Pair", "<", "int", "[", "]", "[", "]", "[", "]", ",", "int", "[", "]", ">", "(", "data", ",", "labels", ")", ";", "}" ]
Convert a document List into arrays storing the data features and labels. @param document Training documents @return A Pair, where the first element is an int[][][] representing the data and the second element is an int[] representing the labels
[ "Convert", "a", "document", "List", "into", "arrays", "storing", "the", "data", "features", "and", "labels", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L416-L476
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.documentsToDataAndLabels
public Pair<int[][][][], int[][]> documentsToDataAndLabels(Collection<List<IN>> documents) { // first index is the number of the document // second index is position in the document also the index of the // clique/factor table // third index is the number of elements in the clique/window these features // are for (starting with last element) // fourth index is position of the feature in the array that holds them // element in data[i][j][k][m] is the index of the mth feature occurring in // position k of the jth clique of the ith document // int[][][][] data = new int[documentsSize][][][]; List<int[][][]> data = new ArrayList<int[][][]>(); // first index is the number of the document // second index is the position in the document // element in labels[i][j] is the index of the correct label (if it exists) // at position j in document i // int[][] labels = new int[documentsSize][]; List<int[]> labels = new ArrayList<int[]>(); int numDatums = 0; for (List<IN> doc : documents) { Pair<int[][][], int[]> docPair = documentToDataAndLabels(doc); data.add(docPair.first()); labels.add(docPair.second()); numDatums += doc.size(); } System.err.println("numClasses: " + classIndex.size() + ' ' + classIndex); System.err.println("numDocuments: " + data.size()); System.err.println("numDatums: " + numDatums); System.err.println("numFeatures: " + featureIndex.size()); printFeatures(); int[][][][] dataA = new int[0][][][]; int[][] labelsA = new int[0][]; return new Pair<int[][][][], int[][]>(data.toArray(dataA), labels.toArray(labelsA)); }
java
public Pair<int[][][][], int[][]> documentsToDataAndLabels(Collection<List<IN>> documents) { // first index is the number of the document // second index is position in the document also the index of the // clique/factor table // third index is the number of elements in the clique/window these features // are for (starting with last element) // fourth index is position of the feature in the array that holds them // element in data[i][j][k][m] is the index of the mth feature occurring in // position k of the jth clique of the ith document // int[][][][] data = new int[documentsSize][][][]; List<int[][][]> data = new ArrayList<int[][][]>(); // first index is the number of the document // second index is the position in the document // element in labels[i][j] is the index of the correct label (if it exists) // at position j in document i // int[][] labels = new int[documentsSize][]; List<int[]> labels = new ArrayList<int[]>(); int numDatums = 0; for (List<IN> doc : documents) { Pair<int[][][], int[]> docPair = documentToDataAndLabels(doc); data.add(docPair.first()); labels.add(docPair.second()); numDatums += doc.size(); } System.err.println("numClasses: " + classIndex.size() + ' ' + classIndex); System.err.println("numDocuments: " + data.size()); System.err.println("numDatums: " + numDatums); System.err.println("numFeatures: " + featureIndex.size()); printFeatures(); int[][][][] dataA = new int[0][][][]; int[][] labelsA = new int[0][]; return new Pair<int[][][][], int[][]>(data.toArray(dataA), labels.toArray(labelsA)); }
[ "public", "Pair", "<", "int", "[", "]", "[", "]", "[", "]", "[", "]", ",", "int", "[", "]", "[", "]", ">", "documentsToDataAndLabels", "(", "Collection", "<", "List", "<", "IN", ">", ">", "documents", ")", "{", "// first index is the number of the document\r", "// second index is position in the document also the index of the\r", "// clique/factor table\r", "// third index is the number of elements in the clique/window these features\r", "// are for (starting with last element)\r", "// fourth index is position of the feature in the array that holds them\r", "// element in data[i][j][k][m] is the index of the mth feature occurring in\r", "// position k of the jth clique of the ith document\r", "// int[][][][] data = new int[documentsSize][][][];\r", "List", "<", "int", "[", "]", "[", "]", "[", "]", ">", "data", "=", "new", "ArrayList", "<", "int", "[", "]", "[", "]", "[", "]", ">", "(", ")", ";", "// first index is the number of the document\r", "// second index is the position in the document\r", "// element in labels[i][j] is the index of the correct label (if it exists)\r", "// at position j in document i\r", "// int[][] labels = new int[documentsSize][];\r", "List", "<", "int", "[", "]", ">", "labels", "=", "new", "ArrayList", "<", "int", "[", "]", ">", "(", ")", ";", "int", "numDatums", "=", "0", ";", "for", "(", "List", "<", "IN", ">", "doc", ":", "documents", ")", "{", "Pair", "<", "int", "[", "]", "[", "]", "[", "]", ",", "int", "[", "]", ">", "docPair", "=", "documentToDataAndLabels", "(", "doc", ")", ";", "data", ".", "add", "(", "docPair", ".", "first", "(", ")", ")", ";", "labels", ".", "add", "(", "docPair", ".", "second", "(", ")", ")", ";", "numDatums", "+=", "doc", ".", "size", "(", ")", ";", "}", "System", ".", "err", ".", "println", "(", "\"numClasses: \"", "+", "classIndex", ".", "size", "(", ")", "+", "'", "'", "+", "classIndex", ")", ";", "System", ".", "err", ".", "println", "(", "\"numDocuments: \"", "+", "data", ".", "size", "(", ")", ")", ";", "System", ".", "err", ".", "println", "(", "\"numDatums: \"", "+", "numDatums", ")", ";", "System", ".", "err", ".", "println", "(", "\"numFeatures: \"", "+", "featureIndex", ".", "size", "(", ")", ")", ";", "printFeatures", "(", ")", ";", "int", "[", "]", "[", "]", "[", "]", "[", "]", "dataA", "=", "new", "int", "[", "0", "]", "[", "", "]", "[", "", "]", "[", "", "]", ";", "int", "[", "]", "[", "]", "labelsA", "=", "new", "int", "[", "0", "]", "[", "", "]", ";", "return", "new", "Pair", "<", "int", "[", "]", "[", "]", "[", "]", "[", "]", ",", "int", "[", "]", "[", "]", ">", "(", "data", ".", "toArray", "(", "dataA", ")", ",", "labels", ".", "toArray", "(", "labelsA", ")", ")", ";", "}" ]
Convert an ObjectBank to arrays of data features and labels. @return A Pair, where the first element is an int[][][][] representing the data and the second element is an int[][] representing the labels.
[ "Convert", "an", "ObjectBank", "to", "arrays", "of", "data", "features", "and", "labels", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L555-L594
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.documentsToDataAndLabelsList
public List<Pair<int[][][], int[]>> documentsToDataAndLabelsList(Collection<List<IN>> documents) { int numDatums = 0; List<Pair<int[][][], int[]>> docList = new ArrayList<Pair<int[][][], int[]>>(); for (List<IN> doc : documents) { Pair<int[][][], int[]> docPair = documentToDataAndLabels(doc); docList.add(docPair); numDatums += doc.size(); } System.err.println("numClasses: " + classIndex.size() + ' ' + classIndex); System.err.println("numDocuments: " + docList.size()); System.err.println("numDatums: " + numDatums); System.err.println("numFeatures: " + featureIndex.size()); return docList; }
java
public List<Pair<int[][][], int[]>> documentsToDataAndLabelsList(Collection<List<IN>> documents) { int numDatums = 0; List<Pair<int[][][], int[]>> docList = new ArrayList<Pair<int[][][], int[]>>(); for (List<IN> doc : documents) { Pair<int[][][], int[]> docPair = documentToDataAndLabels(doc); docList.add(docPair); numDatums += doc.size(); } System.err.println("numClasses: " + classIndex.size() + ' ' + classIndex); System.err.println("numDocuments: " + docList.size()); System.err.println("numDatums: " + numDatums); System.err.println("numFeatures: " + featureIndex.size()); return docList; }
[ "public", "List", "<", "Pair", "<", "int", "[", "]", "[", "]", "[", "]", ",", "int", "[", "]", ">", ">", "documentsToDataAndLabelsList", "(", "Collection", "<", "List", "<", "IN", ">", ">", "documents", ")", "{", "int", "numDatums", "=", "0", ";", "List", "<", "Pair", "<", "int", "[", "]", "[", "]", "[", "]", ",", "int", "[", "]", ">", ">", "docList", "=", "new", "ArrayList", "<", "Pair", "<", "int", "[", "]", "[", "]", "[", "]", ",", "int", "[", "]", ">", ">", "(", ")", ";", "for", "(", "List", "<", "IN", ">", "doc", ":", "documents", ")", "{", "Pair", "<", "int", "[", "]", "[", "]", "[", "]", ",", "int", "[", "]", ">", "docPair", "=", "documentToDataAndLabels", "(", "doc", ")", ";", "docList", ".", "add", "(", "docPair", ")", ";", "numDatums", "+=", "doc", ".", "size", "(", ")", ";", "}", "System", ".", "err", ".", "println", "(", "\"numClasses: \"", "+", "classIndex", ".", "size", "(", ")", "+", "'", "'", "+", "classIndex", ")", ";", "System", ".", "err", ".", "println", "(", "\"numDocuments: \"", "+", "docList", ".", "size", "(", ")", ")", ";", "System", ".", "err", ".", "println", "(", "\"numDatums: \"", "+", "numDatums", ")", ";", "System", ".", "err", ".", "println", "(", "\"numFeatures: \"", "+", "featureIndex", ".", "size", "(", ")", ")", ";", "return", "docList", ";", "}" ]
Convert an ObjectBank to corresponding collection of data features and labels. @return A List of pairs, one for each document, where the first element is an int[][][] representing the data and the second element is an int[] representing the labels.
[ "Convert", "an", "ObjectBank", "to", "corresponding", "collection", "of", "data", "features", "and", "labels", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L604-L619
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.makeDatum
public CRFDatum<List<String>, CRFLabel> makeDatum(List<IN> info, int loc, edu.stanford.nlp.sequences.FeatureFactory<IN> featureFactory) { pad.set(AnswerAnnotation.class, flags.backgroundSymbol); PaddedList<IN> pInfo = new PaddedList<IN>(info, pad); ArrayList<List<String>> features = new ArrayList<List<String>>(); // for (int i = 0; i < windowSize; i++) { // List featuresC = new ArrayList(); // for (int j = 0; j < FeatureFactory.win[i].length; j++) { // featuresC.addAll(featureFactory.features(info, loc, // FeatureFactory.win[i][j])); // } // features.add(featuresC); // } Collection<Clique> done = new HashSet<Clique>(); for (int i = 0; i < windowSize; i++) { List<String> featuresC = new ArrayList<String>(); List<Clique> windowCliques = FeatureFactory.getCliques(i, 0); windowCliques.removeAll(done); done.addAll(windowCliques); for (Clique c : windowCliques) { featuresC.addAll(featureFactory.getCliqueFeatures(pInfo, loc, c)); //todo useless copy because of typing reasons } features.add(featuresC); } int[] labels = new int[windowSize]; for (int i = 0; i < windowSize; i++) { String answer = pInfo.get(loc + i - windowSize + 1).get(AnswerAnnotation.class); labels[i] = classIndex.indexOf(answer); } printFeatureLists(pInfo.get(loc), features); CRFDatum<List<String>, CRFLabel> d = new CRFDatum<List<String>, CRFLabel>(features, new CRFLabel(labels)); // System.err.println(d); return d; }
java
public CRFDatum<List<String>, CRFLabel> makeDatum(List<IN> info, int loc, edu.stanford.nlp.sequences.FeatureFactory<IN> featureFactory) { pad.set(AnswerAnnotation.class, flags.backgroundSymbol); PaddedList<IN> pInfo = new PaddedList<IN>(info, pad); ArrayList<List<String>> features = new ArrayList<List<String>>(); // for (int i = 0; i < windowSize; i++) { // List featuresC = new ArrayList(); // for (int j = 0; j < FeatureFactory.win[i].length; j++) { // featuresC.addAll(featureFactory.features(info, loc, // FeatureFactory.win[i][j])); // } // features.add(featuresC); // } Collection<Clique> done = new HashSet<Clique>(); for (int i = 0; i < windowSize; i++) { List<String> featuresC = new ArrayList<String>(); List<Clique> windowCliques = FeatureFactory.getCliques(i, 0); windowCliques.removeAll(done); done.addAll(windowCliques); for (Clique c : windowCliques) { featuresC.addAll(featureFactory.getCliqueFeatures(pInfo, loc, c)); //todo useless copy because of typing reasons } features.add(featuresC); } int[] labels = new int[windowSize]; for (int i = 0; i < windowSize; i++) { String answer = pInfo.get(loc + i - windowSize + 1).get(AnswerAnnotation.class); labels[i] = classIndex.indexOf(answer); } printFeatureLists(pInfo.get(loc), features); CRFDatum<List<String>, CRFLabel> d = new CRFDatum<List<String>, CRFLabel>(features, new CRFLabel(labels)); // System.err.println(d); return d; }
[ "public", "CRFDatum", "<", "List", "<", "String", ">", ",", "CRFLabel", ">", "makeDatum", "(", "List", "<", "IN", ">", "info", ",", "int", "loc", ",", "edu", ".", "stanford", ".", "nlp", ".", "sequences", ".", "FeatureFactory", "<", "IN", ">", "featureFactory", ")", "{", "pad", ".", "set", "(", "AnswerAnnotation", ".", "class", ",", "flags", ".", "backgroundSymbol", ")", ";", "PaddedList", "<", "IN", ">", "pInfo", "=", "new", "PaddedList", "<", "IN", ">", "(", "info", ",", "pad", ")", ";", "ArrayList", "<", "List", "<", "String", ">", ">", "features", "=", "new", "ArrayList", "<", "List", "<", "String", ">", ">", "(", ")", ";", "// for (int i = 0; i < windowSize; i++) {\r", "// List featuresC = new ArrayList();\r", "// for (int j = 0; j < FeatureFactory.win[i].length; j++) {\r", "// featuresC.addAll(featureFactory.features(info, loc,\r", "// FeatureFactory.win[i][j]));\r", "// }\r", "// features.add(featuresC);\r", "// }\r", "Collection", "<", "Clique", ">", "done", "=", "new", "HashSet", "<", "Clique", ">", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "windowSize", ";", "i", "++", ")", "{", "List", "<", "String", ">", "featuresC", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "List", "<", "Clique", ">", "windowCliques", "=", "FeatureFactory", ".", "getCliques", "(", "i", ",", "0", ")", ";", "windowCliques", ".", "removeAll", "(", "done", ")", ";", "done", ".", "addAll", "(", "windowCliques", ")", ";", "for", "(", "Clique", "c", ":", "windowCliques", ")", "{", "featuresC", ".", "addAll", "(", "featureFactory", ".", "getCliqueFeatures", "(", "pInfo", ",", "loc", ",", "c", ")", ")", ";", "//todo useless copy because of typing reasons\r", "}", "features", ".", "add", "(", "featuresC", ")", ";", "}", "int", "[", "]", "labels", "=", "new", "int", "[", "windowSize", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "windowSize", ";", "i", "++", ")", "{", "String", "answer", "=", "pInfo", ".", "get", "(", "loc", "+", "i", "-", "windowSize", "+", "1", ")", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "labels", "[", "i", "]", "=", "classIndex", ".", "indexOf", "(", "answer", ")", ";", "}", "printFeatureLists", "(", "pInfo", ".", "get", "(", "loc", ")", ",", "features", ")", ";", "CRFDatum", "<", "List", "<", "String", ">", ",", "CRFLabel", ">", "d", "=", "new", "CRFDatum", "<", "List", "<", "String", ">", ",", "CRFLabel", ">", "(", "features", ",", "new", "CRFLabel", "(", "labels", ")", ")", ";", "// System.err.println(d);\r", "return", "d", ";", "}" ]
Makes a CRFDatum by producing features and a label from input data at a specific position, using the provided factory. @param info The input data @param loc The position to build a datum at @param featureFactory The FeatureFactory to use to extract features @return The constructed CRFDatum
[ "Makes", "a", "CRFDatum", "by", "producing", "features", "and", "a", "label", "from", "input", "data", "at", "a", "specific", "position", "using", "the", "provided", "factory", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L817-L857
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.getCliqueTrees
public List<CRFCliqueTree> getCliqueTrees(String filename, DocumentReaderAndWriter<IN> readerAndWriter) { // only for the OCR data does this matter flags.ocrTrain = false; List<CRFCliqueTree> cts = new ArrayList<CRFCliqueTree>(); ObjectBank<List<IN>> docs = makeObjectBankFromFile(filename, readerAndWriter); for (List<IN> doc : docs) { cts.add(getCliqueTree(doc)); } return cts; }
java
public List<CRFCliqueTree> getCliqueTrees(String filename, DocumentReaderAndWriter<IN> readerAndWriter) { // only for the OCR data does this matter flags.ocrTrain = false; List<CRFCliqueTree> cts = new ArrayList<CRFCliqueTree>(); ObjectBank<List<IN>> docs = makeObjectBankFromFile(filename, readerAndWriter); for (List<IN> doc : docs) { cts.add(getCliqueTree(doc)); } return cts; }
[ "public", "List", "<", "CRFCliqueTree", ">", "getCliqueTrees", "(", "String", "filename", ",", "DocumentReaderAndWriter", "<", "IN", ">", "readerAndWriter", ")", "{", "// only for the OCR data does this matter\r", "flags", ".", "ocrTrain", "=", "false", ";", "List", "<", "CRFCliqueTree", ">", "cts", "=", "new", "ArrayList", "<", "CRFCliqueTree", ">", "(", ")", ";", "ObjectBank", "<", "List", "<", "IN", ">", ">", "docs", "=", "makeObjectBankFromFile", "(", "filename", ",", "readerAndWriter", ")", ";", "for", "(", "List", "<", "IN", ">", "doc", ":", "docs", ")", "{", "cts", ".", "add", "(", "getCliqueTree", "(", "doc", ")", ")", ";", "}", "return", "cts", ";", "}" ]
Want to make arbitrary probability queries? Then this is the method for you. Given the filename, it reads it in and breaks it into documents, and then makes a CRFCliqueTree for each document. you can then ask the clique tree for marginals and conditional probabilities of almost anything you want.
[ "Want", "to", "make", "arbitrary", "probability", "queries?", "Then", "this", "is", "the", "method", "for", "you", ".", "Given", "the", "filename", "it", "reads", "it", "in", "and", "breaks", "it", "into", "documents", "and", "then", "makes", "a", "CRFCliqueTree", "for", "each", "document", ".", "you", "can", "then", "ask", "the", "clique", "tree", "for", "marginals", "and", "conditional", "probabilities", "of", "almost", "anything", "you", "want", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L1422-L1433
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.extractDatumSequence
protected List<CRFDatum> extractDatumSequence(int[][][] allData, int beginPosition, int endPosition, List<IN> labeledWordInfos) { List<CRFDatum> result = new ArrayList<CRFDatum>(); int beginContext = beginPosition - windowSize + 1; if (beginContext < 0) { beginContext = 0; } // for the beginning context, add some dummy datums with no features! // TODO: is there any better way to do this? for (int position = beginContext; position < beginPosition; position++) { List<Collection<String>> cliqueFeatures = new ArrayList<Collection<String>>(); for (int i = 0; i < windowSize; i++) { // create a feature list cliqueFeatures.add(Collections.<String>emptyList()); } CRFDatum<Collection<String>, String> datum = new CRFDatum<Collection<String>, String>(cliqueFeatures, labeledWordInfos.get(position).get(AnswerAnnotation.class)); result.add(datum); } // now add the real datums for (int position = beginPosition; position <= endPosition; position++) { List<Collection<String>> cliqueFeatures = new ArrayList<Collection<String>>(); for (int i = 0; i < windowSize; i++) { // create a feature list Collection<String> features = new ArrayList<String>(); for (int j = 0; j < allData[position][i].length; j++) { features.add(featureIndex.get(allData[position][i][j])); } cliqueFeatures.add(features); } CRFDatum<Collection<String>,String> datum = new CRFDatum<Collection<String>,String>(cliqueFeatures, labeledWordInfos.get(position).get(AnswerAnnotation.class)); result.add(datum); } return result; }
java
protected List<CRFDatum> extractDatumSequence(int[][][] allData, int beginPosition, int endPosition, List<IN> labeledWordInfos) { List<CRFDatum> result = new ArrayList<CRFDatum>(); int beginContext = beginPosition - windowSize + 1; if (beginContext < 0) { beginContext = 0; } // for the beginning context, add some dummy datums with no features! // TODO: is there any better way to do this? for (int position = beginContext; position < beginPosition; position++) { List<Collection<String>> cliqueFeatures = new ArrayList<Collection<String>>(); for (int i = 0; i < windowSize; i++) { // create a feature list cliqueFeatures.add(Collections.<String>emptyList()); } CRFDatum<Collection<String>, String> datum = new CRFDatum<Collection<String>, String>(cliqueFeatures, labeledWordInfos.get(position).get(AnswerAnnotation.class)); result.add(datum); } // now add the real datums for (int position = beginPosition; position <= endPosition; position++) { List<Collection<String>> cliqueFeatures = new ArrayList<Collection<String>>(); for (int i = 0; i < windowSize; i++) { // create a feature list Collection<String> features = new ArrayList<String>(); for (int j = 0; j < allData[position][i].length; j++) { features.add(featureIndex.get(allData[position][i][j])); } cliqueFeatures.add(features); } CRFDatum<Collection<String>,String> datum = new CRFDatum<Collection<String>,String>(cliqueFeatures, labeledWordInfos.get(position).get(AnswerAnnotation.class)); result.add(datum); } return result; }
[ "protected", "List", "<", "CRFDatum", ">", "extractDatumSequence", "(", "int", "[", "]", "[", "]", "[", "]", "allData", ",", "int", "beginPosition", ",", "int", "endPosition", ",", "List", "<", "IN", ">", "labeledWordInfos", ")", "{", "List", "<", "CRFDatum", ">", "result", "=", "new", "ArrayList", "<", "CRFDatum", ">", "(", ")", ";", "int", "beginContext", "=", "beginPosition", "-", "windowSize", "+", "1", ";", "if", "(", "beginContext", "<", "0", ")", "{", "beginContext", "=", "0", ";", "}", "// for the beginning context, add some dummy datums with no features!\r", "// TODO: is there any better way to do this?\r", "for", "(", "int", "position", "=", "beginContext", ";", "position", "<", "beginPosition", ";", "position", "++", ")", "{", "List", "<", "Collection", "<", "String", ">>", "cliqueFeatures", "=", "new", "ArrayList", "<", "Collection", "<", "String", ">", ">", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "windowSize", ";", "i", "++", ")", "{", "// create a feature list\r", "cliqueFeatures", ".", "add", "(", "Collections", ".", "<", "String", ">", "emptyList", "(", ")", ")", ";", "}", "CRFDatum", "<", "Collection", "<", "String", ">", ",", "String", ">", "datum", "=", "new", "CRFDatum", "<", "Collection", "<", "String", ">", ",", "String", ">", "(", "cliqueFeatures", ",", "labeledWordInfos", ".", "get", "(", "position", ")", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ")", ";", "result", ".", "add", "(", "datum", ")", ";", "}", "// now add the real datums\r", "for", "(", "int", "position", "=", "beginPosition", ";", "position", "<=", "endPosition", ";", "position", "++", ")", "{", "List", "<", "Collection", "<", "String", ">>", "cliqueFeatures", "=", "new", "ArrayList", "<", "Collection", "<", "String", ">", ">", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "windowSize", ";", "i", "++", ")", "{", "// create a feature list\r", "Collection", "<", "String", ">", "features", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "allData", "[", "position", "]", "[", "i", "]", ".", "length", ";", "j", "++", ")", "{", "features", ".", "add", "(", "featureIndex", ".", "get", "(", "allData", "[", "position", "]", "[", "i", "]", "[", "j", "]", ")", ")", ";", "}", "cliqueFeatures", ".", "add", "(", "features", ")", ";", "}", "CRFDatum", "<", "Collection", "<", "String", ">", ",", "String", ">", "datum", "=", "new", "CRFDatum", "<", "Collection", "<", "String", ">", ",", "String", ">", "(", "cliqueFeatures", ",", "labeledWordInfos", ".", "get", "(", "position", ")", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ")", ";", "result", ".", "add", "(", "datum", ")", ";", "}", "return", "result", ";", "}" ]
Creates a new CRFDatum from the preprocessed allData format, given the document number, position number, and a List of Object labels. @return A new CRFDatum
[ "Creates", "a", "new", "CRFDatum", "from", "the", "preprocessed", "allData", "format", "given", "the", "document", "number", "position", "number", "and", "a", "List", "of", "Object", "labels", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L1811-L1846
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.addProcessedData
protected void addProcessedData(List<List<CRFDatum<Collection<String>, String>>> processedData, int[][][][] data, int[][] labels, int offset) { for (int i = 0, pdSize = processedData.size(); i < pdSize; i++) { int dataIndex = i + offset; List<CRFDatum<Collection<String>, String>> document = processedData.get(i); int dsize = document.size(); labels[dataIndex] = new int[dsize]; data[dataIndex] = new int[dsize][][]; for (int j = 0; j < dsize; j++) { CRFDatum<Collection<String>, String> crfDatum = document.get(j); // add label, they are offset by extra context labels[dataIndex][j] = classIndex.indexOf(crfDatum.label()); // add features List<Collection<String>> cliques = crfDatum.asFeatures(); int csize = cliques.size(); data[dataIndex][j] = new int[csize][]; for (int k = 0; k < csize; k++) { Collection<String> features = cliques.get(k); // Debug only: Remove // if (j < windowSize) { // System.err.println("addProcessedData: Features Size: " + // features.size()); // } data[dataIndex][j][k] = new int[features.size()]; int m = 0; try { for (String feature : features) { // System.err.println("feature " + feature); // if (featureIndex.indexOf(feature)) ; if (featureIndex == null) { System.out.println("Feature is NULL!"); } data[dataIndex][j][k][m] = featureIndex.indexOf(feature); m++; } } catch (Exception e) { e.printStackTrace(); System.err.printf("[index=%d, j=%d, k=%d, m=%d]\n", dataIndex, j, k, m); System.err.println("data.length " + data.length); System.err.println("data[dataIndex].length " + data[dataIndex].length); System.err.println("data[dataIndex][j].length " + data[dataIndex][j].length); System.err.println("data[dataIndex][j][k].length " + data[dataIndex][j].length); System.err.println("data[dataIndex][j][k][m] " + data[dataIndex][j][k][m]); return; } } } } }
java
protected void addProcessedData(List<List<CRFDatum<Collection<String>, String>>> processedData, int[][][][] data, int[][] labels, int offset) { for (int i = 0, pdSize = processedData.size(); i < pdSize; i++) { int dataIndex = i + offset; List<CRFDatum<Collection<String>, String>> document = processedData.get(i); int dsize = document.size(); labels[dataIndex] = new int[dsize]; data[dataIndex] = new int[dsize][][]; for (int j = 0; j < dsize; j++) { CRFDatum<Collection<String>, String> crfDatum = document.get(j); // add label, they are offset by extra context labels[dataIndex][j] = classIndex.indexOf(crfDatum.label()); // add features List<Collection<String>> cliques = crfDatum.asFeatures(); int csize = cliques.size(); data[dataIndex][j] = new int[csize][]; for (int k = 0; k < csize; k++) { Collection<String> features = cliques.get(k); // Debug only: Remove // if (j < windowSize) { // System.err.println("addProcessedData: Features Size: " + // features.size()); // } data[dataIndex][j][k] = new int[features.size()]; int m = 0; try { for (String feature : features) { // System.err.println("feature " + feature); // if (featureIndex.indexOf(feature)) ; if (featureIndex == null) { System.out.println("Feature is NULL!"); } data[dataIndex][j][k][m] = featureIndex.indexOf(feature); m++; } } catch (Exception e) { e.printStackTrace(); System.err.printf("[index=%d, j=%d, k=%d, m=%d]\n", dataIndex, j, k, m); System.err.println("data.length " + data.length); System.err.println("data[dataIndex].length " + data[dataIndex].length); System.err.println("data[dataIndex][j].length " + data[dataIndex][j].length); System.err.println("data[dataIndex][j][k].length " + data[dataIndex][j].length); System.err.println("data[dataIndex][j][k][m] " + data[dataIndex][j][k][m]); return; } } } } }
[ "protected", "void", "addProcessedData", "(", "List", "<", "List", "<", "CRFDatum", "<", "Collection", "<", "String", ">", ",", "String", ">", ">", ">", "processedData", ",", "int", "[", "]", "[", "]", "[", "]", "[", "]", "data", ",", "int", "[", "]", "[", "]", "labels", ",", "int", "offset", ")", "{", "for", "(", "int", "i", "=", "0", ",", "pdSize", "=", "processedData", ".", "size", "(", ")", ";", "i", "<", "pdSize", ";", "i", "++", ")", "{", "int", "dataIndex", "=", "i", "+", "offset", ";", "List", "<", "CRFDatum", "<", "Collection", "<", "String", ">", ",", "String", ">", ">", "document", "=", "processedData", ".", "get", "(", "i", ")", ";", "int", "dsize", "=", "document", ".", "size", "(", ")", ";", "labels", "[", "dataIndex", "]", "=", "new", "int", "[", "dsize", "]", ";", "data", "[", "dataIndex", "]", "=", "new", "int", "[", "dsize", "]", "[", "", "]", "[", "", "]", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "dsize", ";", "j", "++", ")", "{", "CRFDatum", "<", "Collection", "<", "String", ">", ",", "String", ">", "crfDatum", "=", "document", ".", "get", "(", "j", ")", ";", "// add label, they are offset by extra context\r", "labels", "[", "dataIndex", "]", "[", "j", "]", "=", "classIndex", ".", "indexOf", "(", "crfDatum", ".", "label", "(", ")", ")", ";", "// add features\r", "List", "<", "Collection", "<", "String", ">", ">", "cliques", "=", "crfDatum", ".", "asFeatures", "(", ")", ";", "int", "csize", "=", "cliques", ".", "size", "(", ")", ";", "data", "[", "dataIndex", "]", "[", "j", "]", "=", "new", "int", "[", "csize", "]", "[", "", "]", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "csize", ";", "k", "++", ")", "{", "Collection", "<", "String", ">", "features", "=", "cliques", ".", "get", "(", "k", ")", ";", "// Debug only: Remove\r", "// if (j < windowSize) {\r", "// System.err.println(\"addProcessedData: Features Size: \" +\r", "// features.size());\r", "// }\r", "data", "[", "dataIndex", "]", "[", "j", "]", "[", "k", "]", "=", "new", "int", "[", "features", ".", "size", "(", ")", "]", ";", "int", "m", "=", "0", ";", "try", "{", "for", "(", "String", "feature", ":", "features", ")", "{", "// System.err.println(\"feature \" + feature);\r", "// if (featureIndex.indexOf(feature)) ;\r", "if", "(", "featureIndex", "==", "null", ")", "{", "System", ".", "out", ".", "println", "(", "\"Feature is NULL!\"", ")", ";", "}", "data", "[", "dataIndex", "]", "[", "j", "]", "[", "k", "]", "[", "m", "]", "=", "featureIndex", ".", "indexOf", "(", "feature", ")", ";", "m", "++", ";", "}", "}", "catch", "(", "Exception", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "System", ".", "err", ".", "printf", "(", "\"[index=%d, j=%d, k=%d, m=%d]\\n\"", ",", "dataIndex", ",", "j", ",", "k", ",", "m", ")", ";", "System", ".", "err", ".", "println", "(", "\"data.length \"", "+", "data", ".", "length", ")", ";", "System", ".", "err", ".", "println", "(", "\"data[dataIndex].length \"", "+", "data", "[", "dataIndex", "]", ".", "length", ")", ";", "System", ".", "err", ".", "println", "(", "\"data[dataIndex][j].length \"", "+", "data", "[", "dataIndex", "]", "[", "j", "]", ".", "length", ")", ";", "System", ".", "err", ".", "println", "(", "\"data[dataIndex][j][k].length \"", "+", "data", "[", "dataIndex", "]", "[", "j", "]", ".", "length", ")", ";", "System", ".", "err", ".", "println", "(", "\"data[dataIndex][j][k][m] \"", "+", "data", "[", "dataIndex", "]", "[", "j", "]", "[", "k", "]", "[", "m", "]", ")", ";", "return", ";", "}", "}", "}", "}", "}" ]
Adds the List of Lists of CRFDatums to the data and labels arrays, treating each datum as if it were its own document. Adds context labels in addition to the target label for each datum, meaning that for a particular document, the number of labels will be windowSize-1 greater than the number of datums. @param processedData a List of Lists of CRFDatums
[ "Adds", "the", "List", "of", "Lists", "of", "CRFDatums", "to", "the", "data", "and", "labels", "arrays", "treating", "each", "datum", "as", "if", "it", "were", "its", "own", "document", ".", "Adds", "context", "labels", "in", "addition", "to", "the", "target", "label", "for", "each", "datum", "meaning", "that", "for", "a", "particular", "document", "the", "number", "of", "labels", "will", "be", "windowSize", "-", "1", "greater", "than", "the", "number", "of", "datums", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L1858-L1909
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.getJarClassifier
public static <IN extends CoreMap> CRFClassifier<IN> getJarClassifier(String resourceName, Properties props) { CRFClassifier<IN> crf = new CRFClassifier<IN>(); crf.loadJarClassifier(resourceName, props); return crf; }
java
public static <IN extends CoreMap> CRFClassifier<IN> getJarClassifier(String resourceName, Properties props) { CRFClassifier<IN> crf = new CRFClassifier<IN>(); crf.loadJarClassifier(resourceName, props); return crf; }
[ "public", "static", "<", "IN", "extends", "CoreMap", ">", "CRFClassifier", "<", "IN", ">", "getJarClassifier", "(", "String", "resourceName", ",", "Properties", "props", ")", "{", "CRFClassifier", "<", "IN", ">", "crf", "=", "new", "CRFClassifier", "<", "IN", ">", "(", ")", ";", "crf", ".", "loadJarClassifier", "(", "resourceName", ",", "props", ")", ";", "return", "crf", ";", "}" ]
Used to load a classifier stored as a resource inside a jar file. THIS FUNCTION WILL ONLY WORK IF THE CODE WAS LOADED FROM A JAR FILE WHICH HAS A SERIALIZED CLASSIFIER STORED INSIDE IT. @param resourceName Name of clasifier resource inside the jar file. @return A CRFClassifier stored in the jar file
[ "Used", "to", "load", "a", "classifier", "stored", "as", "a", "resource", "inside", "a", "jar", "file", ".", "THIS", "FUNCTION", "WILL", "ONLY", "WORK", "IF", "THE", "CODE", "WAS", "LOADED", "FROM", "A", "JAR", "FILE", "WHICH", "HAS", "A", "SERIALIZED", "CLASSIFIER", "STORED", "INSIDE", "IT", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L2327-L2331
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.getClassifier
public static <IN extends CoreMap> CRFClassifier<IN> getClassifier(File file) throws IOException, ClassCastException, ClassNotFoundException { CRFClassifier<IN> crf = new CRFClassifier<IN>(); crf.loadClassifier(file); return crf; }
java
public static <IN extends CoreMap> CRFClassifier<IN> getClassifier(File file) throws IOException, ClassCastException, ClassNotFoundException { CRFClassifier<IN> crf = new CRFClassifier<IN>(); crf.loadClassifier(file); return crf; }
[ "public", "static", "<", "IN", "extends", "CoreMap", ">", "CRFClassifier", "<", "IN", ">", "getClassifier", "(", "File", "file", ")", "throws", "IOException", ",", "ClassCastException", ",", "ClassNotFoundException", "{", "CRFClassifier", "<", "IN", ">", "crf", "=", "new", "CRFClassifier", "<", "IN", ">", "(", ")", ";", "crf", ".", "loadClassifier", "(", "file", ")", ";", "return", "crf", ";", "}" ]
Loads a CRF classifier from a filepath, and returns it. @param file File to load classifier from @return The CRF classifier @throws IOException If there are problems accessing the input stream @throws ClassCastException If there are problems interpreting the serialized data @throws ClassNotFoundException If there are problems interpreting the serialized data
[ "Loads", "a", "CRF", "classifier", "from", "a", "filepath", "and", "returns", "it", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L2347-L2352
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.getClassifier
public static CRFClassifier getClassifier(InputStream in) throws IOException, ClassCastException, ClassNotFoundException { CRFClassifier crf = new CRFClassifier(); crf.loadClassifier(in); return crf; }
java
public static CRFClassifier getClassifier(InputStream in) throws IOException, ClassCastException, ClassNotFoundException { CRFClassifier crf = new CRFClassifier(); crf.loadClassifier(in); return crf; }
[ "public", "static", "CRFClassifier", "getClassifier", "(", "InputStream", "in", ")", "throws", "IOException", ",", "ClassCastException", ",", "ClassNotFoundException", "{", "CRFClassifier", "crf", "=", "new", "CRFClassifier", "(", ")", ";", "crf", ".", "loadClassifier", "(", "in", ")", ";", "return", "crf", ";", "}" ]
Loads a CRF classifier from an InputStream, and returns it. This method does not buffer the InputStream, so you should have buffered it before calling this method. @param in InputStream to load classifier from @return The CRF classifier @throws IOException If there are problems accessing the input stream @throws ClassCastException If there are problems interpreting the serialized data @throws ClassNotFoundException If there are problems interpreting the serialized data
[ "Loads", "a", "CRF", "classifier", "from", "an", "InputStream", "and", "returns", "it", ".", "This", "method", "does", "not", "buffer", "the", "InputStream", "so", "you", "should", "have", "buffered", "it", "before", "calling", "this", "method", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L2370-L2375
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java
CRFClassifier.main
public static void main(String[] args) throws Exception { StringUtils.printErrInvocationString("CRFClassifier", args); Properties props = StringUtils.argsToProperties(args); CRFClassifier<CoreLabel> crf = new CRFClassifier<CoreLabel>(props); String testFile = crf.flags.testFile; String textFile = crf.flags.textFile; String loadPath = crf.flags.loadClassifier; String loadTextPath = crf.flags.loadTextClassifier; String serializeTo = crf.flags.serializeTo; String serializeToText = crf.flags.serializeToText; if (loadPath != null) { crf.loadClassifierNoExceptions(loadPath, props); } else if (loadTextPath != null) { System.err.println("Warning: this is now only tested for Chinese Segmenter"); System.err.println("(Sun Dec 23 00:59:39 2007) (pichuan)"); try { crf.loadTextClassifier(loadTextPath, props); // System.err.println("DEBUG: out from crf.loadTextClassifier"); } catch (Exception e) { throw new RuntimeException("error loading " + loadTextPath, e); } } else if (crf.flags.loadJarClassifier != null) { crf.loadJarClassifier(crf.flags.loadJarClassifier, props); } else if (crf.flags.trainFile != null || crf.flags.trainFileList != null) { crf.train(); } else { crf.loadDefaultClassifier(); } // System.err.println("Using " + crf.flags.featureFactory); // System.err.println("Using " + // StringUtils.getShortClassName(crf.readerAndWriter)); if (serializeTo != null) { crf.serializeClassifier(serializeTo); } if (serializeToText != null) { crf.serializeTextClassifier(serializeToText); } if (testFile != null) { DocumentReaderAndWriter<CoreLabel> readerAndWriter = crf.makeReaderAndWriter(); if (crf.flags.searchGraphPrefix != null) { crf.classifyAndWriteViterbiSearchGraph(testFile, crf.flags.searchGraphPrefix, crf.makeReaderAndWriter()); } else if (crf.flags.printFirstOrderProbs) { crf.printFirstOrderProbs(testFile, readerAndWriter); } else if (crf.flags.printProbs) { crf.printProbs(testFile, readerAndWriter); } else if (crf.flags.useKBest) { int k = crf.flags.kBest; crf.classifyAndWriteAnswersKBest(testFile, k, readerAndWriter); } else if (crf.flags.printLabelValue) { crf.printLabelInformation(testFile, readerAndWriter); } else { crf.classifyAndWriteAnswers(testFile, readerAndWriter); } } if (textFile != null) { crf.classifyAndWriteAnswers(textFile); } if (crf.flags.readStdin) { crf.classifyStdin(); } }
java
public static void main(String[] args) throws Exception { StringUtils.printErrInvocationString("CRFClassifier", args); Properties props = StringUtils.argsToProperties(args); CRFClassifier<CoreLabel> crf = new CRFClassifier<CoreLabel>(props); String testFile = crf.flags.testFile; String textFile = crf.flags.textFile; String loadPath = crf.flags.loadClassifier; String loadTextPath = crf.flags.loadTextClassifier; String serializeTo = crf.flags.serializeTo; String serializeToText = crf.flags.serializeToText; if (loadPath != null) { crf.loadClassifierNoExceptions(loadPath, props); } else if (loadTextPath != null) { System.err.println("Warning: this is now only tested for Chinese Segmenter"); System.err.println("(Sun Dec 23 00:59:39 2007) (pichuan)"); try { crf.loadTextClassifier(loadTextPath, props); // System.err.println("DEBUG: out from crf.loadTextClassifier"); } catch (Exception e) { throw new RuntimeException("error loading " + loadTextPath, e); } } else if (crf.flags.loadJarClassifier != null) { crf.loadJarClassifier(crf.flags.loadJarClassifier, props); } else if (crf.flags.trainFile != null || crf.flags.trainFileList != null) { crf.train(); } else { crf.loadDefaultClassifier(); } // System.err.println("Using " + crf.flags.featureFactory); // System.err.println("Using " + // StringUtils.getShortClassName(crf.readerAndWriter)); if (serializeTo != null) { crf.serializeClassifier(serializeTo); } if (serializeToText != null) { crf.serializeTextClassifier(serializeToText); } if (testFile != null) { DocumentReaderAndWriter<CoreLabel> readerAndWriter = crf.makeReaderAndWriter(); if (crf.flags.searchGraphPrefix != null) { crf.classifyAndWriteViterbiSearchGraph(testFile, crf.flags.searchGraphPrefix, crf.makeReaderAndWriter()); } else if (crf.flags.printFirstOrderProbs) { crf.printFirstOrderProbs(testFile, readerAndWriter); } else if (crf.flags.printProbs) { crf.printProbs(testFile, readerAndWriter); } else if (crf.flags.useKBest) { int k = crf.flags.kBest; crf.classifyAndWriteAnswersKBest(testFile, k, readerAndWriter); } else if (crf.flags.printLabelValue) { crf.printLabelInformation(testFile, readerAndWriter); } else { crf.classifyAndWriteAnswers(testFile, readerAndWriter); } } if (textFile != null) { crf.classifyAndWriteAnswers(textFile); } if (crf.flags.readStdin) { crf.classifyStdin(); } }
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "StringUtils", ".", "printErrInvocationString", "(", "\"CRFClassifier\"", ",", "args", ")", ";", "Properties", "props", "=", "StringUtils", ".", "argsToProperties", "(", "args", ")", ";", "CRFClassifier", "<", "CoreLabel", ">", "crf", "=", "new", "CRFClassifier", "<", "CoreLabel", ">", "(", "props", ")", ";", "String", "testFile", "=", "crf", ".", "flags", ".", "testFile", ";", "String", "textFile", "=", "crf", ".", "flags", ".", "textFile", ";", "String", "loadPath", "=", "crf", ".", "flags", ".", "loadClassifier", ";", "String", "loadTextPath", "=", "crf", ".", "flags", ".", "loadTextClassifier", ";", "String", "serializeTo", "=", "crf", ".", "flags", ".", "serializeTo", ";", "String", "serializeToText", "=", "crf", ".", "flags", ".", "serializeToText", ";", "if", "(", "loadPath", "!=", "null", ")", "{", "crf", ".", "loadClassifierNoExceptions", "(", "loadPath", ",", "props", ")", ";", "}", "else", "if", "(", "loadTextPath", "!=", "null", ")", "{", "System", ".", "err", ".", "println", "(", "\"Warning: this is now only tested for Chinese Segmenter\"", ")", ";", "System", ".", "err", ".", "println", "(", "\"(Sun Dec 23 00:59:39 2007) (pichuan)\"", ")", ";", "try", "{", "crf", ".", "loadTextClassifier", "(", "loadTextPath", ",", "props", ")", ";", "// System.err.println(\"DEBUG: out from crf.loadTextClassifier\");\r", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "RuntimeException", "(", "\"error loading \"", "+", "loadTextPath", ",", "e", ")", ";", "}", "}", "else", "if", "(", "crf", ".", "flags", ".", "loadJarClassifier", "!=", "null", ")", "{", "crf", ".", "loadJarClassifier", "(", "crf", ".", "flags", ".", "loadJarClassifier", ",", "props", ")", ";", "}", "else", "if", "(", "crf", ".", "flags", ".", "trainFile", "!=", "null", "||", "crf", ".", "flags", ".", "trainFileList", "!=", "null", ")", "{", "crf", ".", "train", "(", ")", ";", "}", "else", "{", "crf", ".", "loadDefaultClassifier", "(", ")", ";", "}", "// System.err.println(\"Using \" + crf.flags.featureFactory);\r", "// System.err.println(\"Using \" +\r", "// StringUtils.getShortClassName(crf.readerAndWriter));\r", "if", "(", "serializeTo", "!=", "null", ")", "{", "crf", ".", "serializeClassifier", "(", "serializeTo", ")", ";", "}", "if", "(", "serializeToText", "!=", "null", ")", "{", "crf", ".", "serializeTextClassifier", "(", "serializeToText", ")", ";", "}", "if", "(", "testFile", "!=", "null", ")", "{", "DocumentReaderAndWriter", "<", "CoreLabel", ">", "readerAndWriter", "=", "crf", ".", "makeReaderAndWriter", "(", ")", ";", "if", "(", "crf", ".", "flags", ".", "searchGraphPrefix", "!=", "null", ")", "{", "crf", ".", "classifyAndWriteViterbiSearchGraph", "(", "testFile", ",", "crf", ".", "flags", ".", "searchGraphPrefix", ",", "crf", ".", "makeReaderAndWriter", "(", ")", ")", ";", "}", "else", "if", "(", "crf", ".", "flags", ".", "printFirstOrderProbs", ")", "{", "crf", ".", "printFirstOrderProbs", "(", "testFile", ",", "readerAndWriter", ")", ";", "}", "else", "if", "(", "crf", ".", "flags", ".", "printProbs", ")", "{", "crf", ".", "printProbs", "(", "testFile", ",", "readerAndWriter", ")", ";", "}", "else", "if", "(", "crf", ".", "flags", ".", "useKBest", ")", "{", "int", "k", "=", "crf", ".", "flags", ".", "kBest", ";", "crf", ".", "classifyAndWriteAnswersKBest", "(", "testFile", ",", "k", ",", "readerAndWriter", ")", ";", "}", "else", "if", "(", "crf", ".", "flags", ".", "printLabelValue", ")", "{", "crf", ".", "printLabelInformation", "(", "testFile", ",", "readerAndWriter", ")", ";", "}", "else", "{", "crf", ".", "classifyAndWriteAnswers", "(", "testFile", ",", "readerAndWriter", ")", ";", "}", "}", "if", "(", "textFile", "!=", "null", ")", "{", "crf", ".", "classifyAndWriteAnswers", "(", "textFile", ")", ";", "}", "if", "(", "crf", ".", "flags", ".", "readStdin", ")", "{", "crf", ".", "classifyStdin", "(", ")", ";", "}", "}" ]
The main method. See the class documentation.
[ "The", "main", "method", ".", "See", "the", "class", "documentation", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/CRFClassifier.java#L2398-L2466
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwglobal_auditsyslogpolicy_binding.java
appfwglobal_auditsyslogpolicy_binding.get
public static appfwglobal_auditsyslogpolicy_binding[] get(nitro_service service) throws Exception{ appfwglobal_auditsyslogpolicy_binding obj = new appfwglobal_auditsyslogpolicy_binding(); appfwglobal_auditsyslogpolicy_binding response[] = (appfwglobal_auditsyslogpolicy_binding[]) obj.get_resources(service); return response; }
java
public static appfwglobal_auditsyslogpolicy_binding[] get(nitro_service service) throws Exception{ appfwglobal_auditsyslogpolicy_binding obj = new appfwglobal_auditsyslogpolicy_binding(); appfwglobal_auditsyslogpolicy_binding response[] = (appfwglobal_auditsyslogpolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "appfwglobal_auditsyslogpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "appfwglobal_auditsyslogpolicy_binding", "obj", "=", "new", "appfwglobal_auditsyslogpolicy_binding", "(", ")", ";", "appfwglobal_auditsyslogpolicy_binding", "response", "[", "]", "=", "(", "appfwglobal_auditsyslogpolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch a appfwglobal_auditsyslogpolicy_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "appfwglobal_auditsyslogpolicy_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwglobal_auditsyslogpolicy_binding.java#L340-L344
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cs/csvserver_cmppolicy_binding.java
csvserver_cmppolicy_binding.get
public static csvserver_cmppolicy_binding[] get(nitro_service service, String name) throws Exception{ csvserver_cmppolicy_binding obj = new csvserver_cmppolicy_binding(); obj.set_name(name); csvserver_cmppolicy_binding response[] = (csvserver_cmppolicy_binding[]) obj.get_resources(service); return response; }
java
public static csvserver_cmppolicy_binding[] get(nitro_service service, String name) throws Exception{ csvserver_cmppolicy_binding obj = new csvserver_cmppolicy_binding(); obj.set_name(name); csvserver_cmppolicy_binding response[] = (csvserver_cmppolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "csvserver_cmppolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "csvserver_cmppolicy_binding", "obj", "=", "new", "csvserver_cmppolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "csvserver_cmppolicy_binding", "response", "[", "]", "=", "(", "csvserver_cmppolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch csvserver_cmppolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "csvserver_cmppolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cs/csvserver_cmppolicy_binding.java#L337-L342
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/ipset_nsip_binding.java
ipset_nsip_binding.get
public static ipset_nsip_binding[] get(nitro_service service, String name) throws Exception{ ipset_nsip_binding obj = new ipset_nsip_binding(); obj.set_name(name); ipset_nsip_binding response[] = (ipset_nsip_binding[]) obj.get_resources(service); return response; }
java
public static ipset_nsip_binding[] get(nitro_service service, String name) throws Exception{ ipset_nsip_binding obj = new ipset_nsip_binding(); obj.set_name(name); ipset_nsip_binding response[] = (ipset_nsip_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "ipset_nsip_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "ipset_nsip_binding", "obj", "=", "new", "ipset_nsip_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "ipset_nsip_binding", "response", "[", "]", "=", "(", "ipset_nsip_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch ipset_nsip_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "ipset_nsip_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/ipset_nsip_binding.java#L154-L159
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java
appfwlearningdata.delete
public static base_response delete(nitro_service client, appfwlearningdata resource) throws Exception { appfwlearningdata deleteresource = new appfwlearningdata(); deleteresource.profilename = resource.profilename; deleteresource.starturl = resource.starturl; deleteresource.cookieconsistency = resource.cookieconsistency; deleteresource.fieldconsistency = resource.fieldconsistency; deleteresource.formactionurl_ffc = resource.formactionurl_ffc; deleteresource.crosssitescripting = resource.crosssitescripting; deleteresource.formactionurl_xss = resource.formactionurl_xss; deleteresource.sqlinjection = resource.sqlinjection; deleteresource.formactionurl_sql = resource.formactionurl_sql; deleteresource.fieldformat = resource.fieldformat; deleteresource.formactionurl_ff = resource.formactionurl_ff; deleteresource.csrftag = resource.csrftag; deleteresource.csrfformoriginurl = resource.csrfformoriginurl; deleteresource.xmldoscheck = resource.xmldoscheck; deleteresource.xmlwsicheck = resource.xmlwsicheck; deleteresource.xmlattachmentcheck = resource.xmlattachmentcheck; deleteresource.totalxmlrequests = resource.totalxmlrequests; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, appfwlearningdata resource) throws Exception { appfwlearningdata deleteresource = new appfwlearningdata(); deleteresource.profilename = resource.profilename; deleteresource.starturl = resource.starturl; deleteresource.cookieconsistency = resource.cookieconsistency; deleteresource.fieldconsistency = resource.fieldconsistency; deleteresource.formactionurl_ffc = resource.formactionurl_ffc; deleteresource.crosssitescripting = resource.crosssitescripting; deleteresource.formactionurl_xss = resource.formactionurl_xss; deleteresource.sqlinjection = resource.sqlinjection; deleteresource.formactionurl_sql = resource.formactionurl_sql; deleteresource.fieldformat = resource.fieldformat; deleteresource.formactionurl_ff = resource.formactionurl_ff; deleteresource.csrftag = resource.csrftag; deleteresource.csrfformoriginurl = resource.csrfformoriginurl; deleteresource.xmldoscheck = resource.xmldoscheck; deleteresource.xmlwsicheck = resource.xmlwsicheck; deleteresource.xmlattachmentcheck = resource.xmlattachmentcheck; deleteresource.totalxmlrequests = resource.totalxmlrequests; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "appfwlearningdata", "resource", ")", "throws", "Exception", "{", "appfwlearningdata", "deleteresource", "=", "new", "appfwlearningdata", "(", ")", ";", "deleteresource", ".", "profilename", "=", "resource", ".", "profilename", ";", "deleteresource", ".", "starturl", "=", "resource", ".", "starturl", ";", "deleteresource", ".", "cookieconsistency", "=", "resource", ".", "cookieconsistency", ";", "deleteresource", ".", "fieldconsistency", "=", "resource", ".", "fieldconsistency", ";", "deleteresource", ".", "formactionurl_ffc", "=", "resource", ".", "formactionurl_ffc", ";", "deleteresource", ".", "crosssitescripting", "=", "resource", ".", "crosssitescripting", ";", "deleteresource", ".", "formactionurl_xss", "=", "resource", ".", "formactionurl_xss", ";", "deleteresource", ".", "sqlinjection", "=", "resource", ".", "sqlinjection", ";", "deleteresource", ".", "formactionurl_sql", "=", "resource", ".", "formactionurl_sql", ";", "deleteresource", ".", "fieldformat", "=", "resource", ".", "fieldformat", ";", "deleteresource", ".", "formactionurl_ff", "=", "resource", ".", "formactionurl_ff", ";", "deleteresource", ".", "csrftag", "=", "resource", ".", "csrftag", ";", "deleteresource", ".", "csrfformoriginurl", "=", "resource", ".", "csrfformoriginurl", ";", "deleteresource", ".", "xmldoscheck", "=", "resource", ".", "xmldoscheck", ";", "deleteresource", ".", "xmlwsicheck", "=", "resource", ".", "xmlwsicheck", ";", "deleteresource", ".", "xmlattachmentcheck", "=", "resource", ".", "xmlattachmentcheck", ";", "deleteresource", ".", "totalxmlrequests", "=", "resource", ".", "totalxmlrequests", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete appfwlearningdata.
[ "Use", "this", "API", "to", "delete", "appfwlearningdata", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java#L497-L517
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java
appfwlearningdata.delete
public static base_responses delete(nitro_service client, appfwlearningdata resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appfwlearningdata deleteresources[] = new appfwlearningdata[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new appfwlearningdata(); deleteresources[i].profilename = resources[i].profilename; deleteresources[i].starturl = resources[i].starturl; deleteresources[i].cookieconsistency = resources[i].cookieconsistency; deleteresources[i].fieldconsistency = resources[i].fieldconsistency; deleteresources[i].formactionurl_ffc = resources[i].formactionurl_ffc; deleteresources[i].crosssitescripting = resources[i].crosssitescripting; deleteresources[i].formactionurl_xss = resources[i].formactionurl_xss; deleteresources[i].sqlinjection = resources[i].sqlinjection; deleteresources[i].formactionurl_sql = resources[i].formactionurl_sql; deleteresources[i].fieldformat = resources[i].fieldformat; deleteresources[i].formactionurl_ff = resources[i].formactionurl_ff; deleteresources[i].csrftag = resources[i].csrftag; deleteresources[i].csrfformoriginurl = resources[i].csrfformoriginurl; deleteresources[i].xmldoscheck = resources[i].xmldoscheck; deleteresources[i].xmlwsicheck = resources[i].xmlwsicheck; deleteresources[i].xmlattachmentcheck = resources[i].xmlattachmentcheck; deleteresources[i].totalxmlrequests = resources[i].totalxmlrequests; } result = delete_bulk_request(client, deleteresources); } return result; }
java
public static base_responses delete(nitro_service client, appfwlearningdata resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appfwlearningdata deleteresources[] = new appfwlearningdata[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new appfwlearningdata(); deleteresources[i].profilename = resources[i].profilename; deleteresources[i].starturl = resources[i].starturl; deleteresources[i].cookieconsistency = resources[i].cookieconsistency; deleteresources[i].fieldconsistency = resources[i].fieldconsistency; deleteresources[i].formactionurl_ffc = resources[i].formactionurl_ffc; deleteresources[i].crosssitescripting = resources[i].crosssitescripting; deleteresources[i].formactionurl_xss = resources[i].formactionurl_xss; deleteresources[i].sqlinjection = resources[i].sqlinjection; deleteresources[i].formactionurl_sql = resources[i].formactionurl_sql; deleteresources[i].fieldformat = resources[i].fieldformat; deleteresources[i].formactionurl_ff = resources[i].formactionurl_ff; deleteresources[i].csrftag = resources[i].csrftag; deleteresources[i].csrfformoriginurl = resources[i].csrfformoriginurl; deleteresources[i].xmldoscheck = resources[i].xmldoscheck; deleteresources[i].xmlwsicheck = resources[i].xmlwsicheck; deleteresources[i].xmlattachmentcheck = resources[i].xmlattachmentcheck; deleteresources[i].totalxmlrequests = resources[i].totalxmlrequests; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "public", "static", "base_responses", "delete", "(", "nitro_service", "client", ",", "appfwlearningdata", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "appfwlearningdata", "deleteresources", "[", "]", "=", "new", "appfwlearningdata", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "deleteresources", "[", "i", "]", "=", "new", "appfwlearningdata", "(", ")", ";", "deleteresources", "[", "i", "]", ".", "profilename", "=", "resources", "[", "i", "]", ".", "profilename", ";", "deleteresources", "[", "i", "]", ".", "starturl", "=", "resources", "[", "i", "]", ".", "starturl", ";", "deleteresources", "[", "i", "]", ".", "cookieconsistency", "=", "resources", "[", "i", "]", ".", "cookieconsistency", ";", "deleteresources", "[", "i", "]", ".", "fieldconsistency", "=", "resources", "[", "i", "]", ".", "fieldconsistency", ";", "deleteresources", "[", "i", "]", ".", "formactionurl_ffc", "=", "resources", "[", "i", "]", ".", "formactionurl_ffc", ";", "deleteresources", "[", "i", "]", ".", "crosssitescripting", "=", "resources", "[", "i", "]", ".", "crosssitescripting", ";", "deleteresources", "[", "i", "]", ".", "formactionurl_xss", "=", "resources", "[", "i", "]", ".", "formactionurl_xss", ";", "deleteresources", "[", "i", "]", ".", "sqlinjection", "=", "resources", "[", "i", "]", ".", "sqlinjection", ";", "deleteresources", "[", "i", "]", ".", "formactionurl_sql", "=", "resources", "[", "i", "]", ".", "formactionurl_sql", ";", "deleteresources", "[", "i", "]", ".", "fieldformat", "=", "resources", "[", "i", "]", ".", "fieldformat", ";", "deleteresources", "[", "i", "]", ".", "formactionurl_ff", "=", "resources", "[", "i", "]", ".", "formactionurl_ff", ";", "deleteresources", "[", "i", "]", ".", "csrftag", "=", "resources", "[", "i", "]", ".", "csrftag", ";", "deleteresources", "[", "i", "]", ".", "csrfformoriginurl", "=", "resources", "[", "i", "]", ".", "csrfformoriginurl", ";", "deleteresources", "[", "i", "]", ".", "xmldoscheck", "=", "resources", "[", "i", "]", ".", "xmldoscheck", ";", "deleteresources", "[", "i", "]", ".", "xmlwsicheck", "=", "resources", "[", "i", "]", ".", "xmlwsicheck", ";", "deleteresources", "[", "i", "]", ".", "xmlattachmentcheck", "=", "resources", "[", "i", "]", ".", "xmlattachmentcheck", ";", "deleteresources", "[", "i", "]", ".", "totalxmlrequests", "=", "resources", "[", "i", "]", ".", "totalxmlrequests", ";", "}", "result", "=", "delete_bulk_request", "(", "client", ",", "deleteresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to delete appfwlearningdata resources.
[ "Use", "this", "API", "to", "delete", "appfwlearningdata", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java#L522-L549
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java
appfwlearningdata.reset
public static base_response reset(nitro_service client) throws Exception { appfwlearningdata resetresource = new appfwlearningdata(); return resetresource.perform_operation(client,"reset"); }
java
public static base_response reset(nitro_service client) throws Exception { appfwlearningdata resetresource = new appfwlearningdata(); return resetresource.perform_operation(client,"reset"); }
[ "public", "static", "base_response", "reset", "(", "nitro_service", "client", ")", "throws", "Exception", "{", "appfwlearningdata", "resetresource", "=", "new", "appfwlearningdata", "(", ")", ";", "return", "resetresource", ".", "perform_operation", "(", "client", ",", "\"reset\"", ")", ";", "}" ]
Use this API to reset appfwlearningdata.
[ "Use", "this", "API", "to", "reset", "appfwlearningdata", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java#L554-L557
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java
appfwlearningdata.reset
public static base_responses reset(nitro_service client, appfwlearningdata resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appfwlearningdata resetresources[] = new appfwlearningdata[resources.length]; for (int i=0;i<resources.length;i++){ resetresources[i] = new appfwlearningdata(); } result = perform_operation_bulk_request(client, resetresources,"reset"); } return result; }
java
public static base_responses reset(nitro_service client, appfwlearningdata resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appfwlearningdata resetresources[] = new appfwlearningdata[resources.length]; for (int i=0;i<resources.length;i++){ resetresources[i] = new appfwlearningdata(); } result = perform_operation_bulk_request(client, resetresources,"reset"); } return result; }
[ "public", "static", "base_responses", "reset", "(", "nitro_service", "client", ",", "appfwlearningdata", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "appfwlearningdata", "resetresources", "[", "]", "=", "new", "appfwlearningdata", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "resetresources", "[", "i", "]", "=", "new", "appfwlearningdata", "(", ")", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "resetresources", ",", "\"reset\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to reset appfwlearningdata resources.
[ "Use", "this", "API", "to", "reset", "appfwlearningdata", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java#L562-L572
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java
appfwlearningdata.export
public static base_response export(nitro_service client, appfwlearningdata resource) throws Exception { appfwlearningdata exportresource = new appfwlearningdata(); exportresource.profilename = resource.profilename; exportresource.securitycheck = resource.securitycheck; exportresource.target = resource.target; return exportresource.perform_operation(client,"export"); }
java
public static base_response export(nitro_service client, appfwlearningdata resource) throws Exception { appfwlearningdata exportresource = new appfwlearningdata(); exportresource.profilename = resource.profilename; exportresource.securitycheck = resource.securitycheck; exportresource.target = resource.target; return exportresource.perform_operation(client,"export"); }
[ "public", "static", "base_response", "export", "(", "nitro_service", "client", ",", "appfwlearningdata", "resource", ")", "throws", "Exception", "{", "appfwlearningdata", "exportresource", "=", "new", "appfwlearningdata", "(", ")", ";", "exportresource", ".", "profilename", "=", "resource", ".", "profilename", ";", "exportresource", ".", "securitycheck", "=", "resource", ".", "securitycheck", ";", "exportresource", ".", "target", "=", "resource", ".", "target", ";", "return", "exportresource", ".", "perform_operation", "(", "client", ",", "\"export\"", ")", ";", "}" ]
Use this API to export appfwlearningdata.
[ "Use", "this", "API", "to", "export", "appfwlearningdata", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java#L577-L583
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java
appfwlearningdata.export
public static base_responses export(nitro_service client, appfwlearningdata resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appfwlearningdata exportresources[] = new appfwlearningdata[resources.length]; for (int i=0;i<resources.length;i++){ exportresources[i] = new appfwlearningdata(); exportresources[i].profilename = resources[i].profilename; exportresources[i].securitycheck = resources[i].securitycheck; exportresources[i].target = resources[i].target; } result = perform_operation_bulk_request(client, exportresources,"export"); } return result; }
java
public static base_responses export(nitro_service client, appfwlearningdata resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appfwlearningdata exportresources[] = new appfwlearningdata[resources.length]; for (int i=0;i<resources.length;i++){ exportresources[i] = new appfwlearningdata(); exportresources[i].profilename = resources[i].profilename; exportresources[i].securitycheck = resources[i].securitycheck; exportresources[i].target = resources[i].target; } result = perform_operation_bulk_request(client, exportresources,"export"); } return result; }
[ "public", "static", "base_responses", "export", "(", "nitro_service", "client", ",", "appfwlearningdata", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "appfwlearningdata", "exportresources", "[", "]", "=", "new", "appfwlearningdata", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "exportresources", "[", "i", "]", "=", "new", "appfwlearningdata", "(", ")", ";", "exportresources", "[", "i", "]", ".", "profilename", "=", "resources", "[", "i", "]", ".", "profilename", ";", "exportresources", "[", "i", "]", ".", "securitycheck", "=", "resources", "[", "i", "]", ".", "securitycheck", ";", "exportresources", "[", "i", "]", ".", "target", "=", "resources", "[", "i", "]", ".", "target", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "exportresources", ",", "\"export\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to export appfwlearningdata resources.
[ "Use", "this", "API", "to", "export", "appfwlearningdata", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java#L588-L601
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningdata.java
appfwlearningdata.get
public static appfwlearningdata[] get(nitro_service service, appfwlearningdata_args args) throws Exception{ appfwlearningdata obj = new appfwlearningdata(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); appfwlearningdata[] response = (appfwlearningdata[])obj.get_resources(service, option); return response; }
java
public static appfwlearningdata[] get(nitro_service service, appfwlearningdata_args args) throws Exception{ appfwlearningdata obj = new appfwlearningdata(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); appfwlearningdata[] response = (appfwlearningdata[])obj.get_resources(service, option); return response; }
[ "public", "static", "appfwlearningdata", "[", "]", "get", "(", "nitro_service", "service", ",", "appfwlearningdata_args", "args", ")", "throws", "Exception", "{", "appfwlearningdata", "obj", "=", "new", "appfwlearningdata", "(", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_args", "(", "nitro_util", ".", "object_to_string_withoutquotes", "(", "args", ")", ")", ";", "appfwlearningdata", "[", "]", "response", "=", "(", "appfwlearningdata", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the appfwlearningdata resources that are configured on netscaler. This uses appfwlearningdata_args which is a way to provide additional arguments while fetching the resources.
[ "Use", "this", "API", "to", "fetch", "all", "the", "appfwlearningdata", "resources", "that", "are", "configured", "on", "netscaler", ".", "This", "uses", "appfwlearningdata_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/appfw/appfwlearningdata.java#L632-L638
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_safeobject_binding.java
appfwprofile_safeobject_binding.get
public static appfwprofile_safeobject_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_safeobject_binding obj = new appfwprofile_safeobject_binding(); obj.set_name(name); appfwprofile_safeobject_binding response[] = (appfwprofile_safeobject_binding[]) obj.get_resources(service); return response; }
java
public static appfwprofile_safeobject_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_safeobject_binding obj = new appfwprofile_safeobject_binding(); obj.set_name(name); appfwprofile_safeobject_binding response[] = (appfwprofile_safeobject_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "appfwprofile_safeobject_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "appfwprofile_safeobject_binding", "obj", "=", "new", "appfwprofile_safeobject_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "appfwprofile_safeobject_binding", "response", "[", "]", "=", "(", "appfwprofile_safeobject_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch appfwprofile_safeobject_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "appfwprofile_safeobject_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_safeobject_binding.java#L268-L273
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmsessionpolicy_binding.java
tmsessionpolicy_binding.get
public static tmsessionpolicy_binding get(nitro_service service, String name) throws Exception{ tmsessionpolicy_binding obj = new tmsessionpolicy_binding(); obj.set_name(name); tmsessionpolicy_binding response = (tmsessionpolicy_binding) obj.get_resource(service); return response; }
java
public static tmsessionpolicy_binding get(nitro_service service, String name) throws Exception{ tmsessionpolicy_binding obj = new tmsessionpolicy_binding(); obj.set_name(name); tmsessionpolicy_binding response = (tmsessionpolicy_binding) obj.get_resource(service); return response; }
[ "public", "static", "tmsessionpolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "tmsessionpolicy_binding", "obj", "=", "new", "tmsessionpolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "tmsessionpolicy_binding", "response", "=", "(", "tmsessionpolicy_binding", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch tmsessionpolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "tmsessionpolicy_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmsessionpolicy_binding.java#L136-L141
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_auditnslogpolicy_binding.java
vpnvserver_auditnslogpolicy_binding.get
public static vpnvserver_auditnslogpolicy_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_auditnslogpolicy_binding obj = new vpnvserver_auditnslogpolicy_binding(); obj.set_name(name); vpnvserver_auditnslogpolicy_binding response[] = (vpnvserver_auditnslogpolicy_binding[]) obj.get_resources(service); return response; }
java
public static vpnvserver_auditnslogpolicy_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_auditnslogpolicy_binding obj = new vpnvserver_auditnslogpolicy_binding(); obj.set_name(name); vpnvserver_auditnslogpolicy_binding response[] = (vpnvserver_auditnslogpolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "vpnvserver_auditnslogpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "vpnvserver_auditnslogpolicy_binding", "obj", "=", "new", "vpnvserver_auditnslogpolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "vpnvserver_auditnslogpolicy_binding", "response", "[", "]", "=", "(", "vpnvserver_auditnslogpolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch vpnvserver_auditnslogpolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "vpnvserver_auditnslogpolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_auditnslogpolicy_binding.java#L326-L331
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/LogConditionalObjectiveFunction.java
LogConditionalObjectiveFunction.calculateSCL
private void calculateSCL(double[] x) { //System.out.println("Checking at: "+x[0]+" "+x[1]+" "+x[2]); value = 0.0; Arrays.fill(derivative, 0.0); double[] sums = new double[numClasses]; double[] probs = new double[numClasses]; double[] counts = new double[numClasses]; Arrays.fill(counts, 0.0); for (int d = 0; d < data.length; d++) { // if (d == testMin) { // d = testMax - 1; // continue; // } int[] features = data[d]; // activation Arrays.fill(sums, 0.0); for (int c = 0; c < numClasses; c++) { for (int f = 0; f < features.length; f++) { int i = indexOf(features[f], c); sums[c] += x[i]; } } // expectation (slower routine replaced by fast way) // double total = Double.NEGATIVE_INFINITY; // for (int c=0; c<numClasses; c++) { // total = SloppyMath.logAdd(total, sums[c]); // } double total = ArrayMath.logSum(sums); int ld = labels[d]; for (int c = 0; c < numClasses; c++) { probs[c] = Math.exp(sums[c] - total); for (int f = 0; f < features.length; f++) { int i = indexOf(features[f], c); derivative[i] += probs[ld] * probs[c]; } } // observed for (int f = 0; f < features.length; f++) { int i = indexOf(features[f], labels[d]); derivative[i] -= probs[ld]; } value -= probs[ld]; } // priors if (true) { for (int i = 0; i < x.length; i++) { double k = 1.0; double w = x[i]; value += k * w * w / 2.0; derivative[i] += k * w; } } }
java
private void calculateSCL(double[] x) { //System.out.println("Checking at: "+x[0]+" "+x[1]+" "+x[2]); value = 0.0; Arrays.fill(derivative, 0.0); double[] sums = new double[numClasses]; double[] probs = new double[numClasses]; double[] counts = new double[numClasses]; Arrays.fill(counts, 0.0); for (int d = 0; d < data.length; d++) { // if (d == testMin) { // d = testMax - 1; // continue; // } int[] features = data[d]; // activation Arrays.fill(sums, 0.0); for (int c = 0; c < numClasses; c++) { for (int f = 0; f < features.length; f++) { int i = indexOf(features[f], c); sums[c] += x[i]; } } // expectation (slower routine replaced by fast way) // double total = Double.NEGATIVE_INFINITY; // for (int c=0; c<numClasses; c++) { // total = SloppyMath.logAdd(total, sums[c]); // } double total = ArrayMath.logSum(sums); int ld = labels[d]; for (int c = 0; c < numClasses; c++) { probs[c] = Math.exp(sums[c] - total); for (int f = 0; f < features.length; f++) { int i = indexOf(features[f], c); derivative[i] += probs[ld] * probs[c]; } } // observed for (int f = 0; f < features.length; f++) { int i = indexOf(features[f], labels[d]); derivative[i] -= probs[ld]; } value -= probs[ld]; } // priors if (true) { for (int i = 0; i < x.length; i++) { double k = 1.0; double w = x[i]; value += k * w * w / 2.0; derivative[i] += k * w; } } }
[ "private", "void", "calculateSCL", "(", "double", "[", "]", "x", ")", "{", "//System.out.println(\"Checking at: \"+x[0]+\" \"+x[1]+\" \"+x[2]);\r", "value", "=", "0.0", ";", "Arrays", ".", "fill", "(", "derivative", ",", "0.0", ")", ";", "double", "[", "]", "sums", "=", "new", "double", "[", "numClasses", "]", ";", "double", "[", "]", "probs", "=", "new", "double", "[", "numClasses", "]", ";", "double", "[", "]", "counts", "=", "new", "double", "[", "numClasses", "]", ";", "Arrays", ".", "fill", "(", "counts", ",", "0.0", ")", ";", "for", "(", "int", "d", "=", "0", ";", "d", "<", "data", ".", "length", ";", "d", "++", ")", "{", "// if (d == testMin) {\r", "// d = testMax - 1;\r", "// continue;\r", "// }\r", "int", "[", "]", "features", "=", "data", "[", "d", "]", ";", "// activation\r", "Arrays", ".", "fill", "(", "sums", ",", "0.0", ")", ";", "for", "(", "int", "c", "=", "0", ";", "c", "<", "numClasses", ";", "c", "++", ")", "{", "for", "(", "int", "f", "=", "0", ";", "f", "<", "features", ".", "length", ";", "f", "++", ")", "{", "int", "i", "=", "indexOf", "(", "features", "[", "f", "]", ",", "c", ")", ";", "sums", "[", "c", "]", "+=", "x", "[", "i", "]", ";", "}", "}", "// expectation (slower routine replaced by fast way)\r", "// double total = Double.NEGATIVE_INFINITY;\r", "// for (int c=0; c<numClasses; c++) {\r", "// total = SloppyMath.logAdd(total, sums[c]);\r", "// }\r", "double", "total", "=", "ArrayMath", ".", "logSum", "(", "sums", ")", ";", "int", "ld", "=", "labels", "[", "d", "]", ";", "for", "(", "int", "c", "=", "0", ";", "c", "<", "numClasses", ";", "c", "++", ")", "{", "probs", "[", "c", "]", "=", "Math", ".", "exp", "(", "sums", "[", "c", "]", "-", "total", ")", ";", "for", "(", "int", "f", "=", "0", ";", "f", "<", "features", ".", "length", ";", "f", "++", ")", "{", "int", "i", "=", "indexOf", "(", "features", "[", "f", "]", ",", "c", ")", ";", "derivative", "[", "i", "]", "+=", "probs", "[", "ld", "]", "*", "probs", "[", "c", "]", ";", "}", "}", "// observed\r", "for", "(", "int", "f", "=", "0", ";", "f", "<", "features", ".", "length", ";", "f", "++", ")", "{", "int", "i", "=", "indexOf", "(", "features", "[", "f", "]", ",", "labels", "[", "d", "]", ")", ";", "derivative", "[", "i", "]", "-=", "probs", "[", "ld", "]", ";", "}", "value", "-=", "probs", "[", "ld", "]", ";", "}", "// priors\r", "if", "(", "true", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "x", ".", "length", ";", "i", "++", ")", "{", "double", "k", "=", "1.0", ";", "double", "w", "=", "x", "[", "i", "]", ";", "value", "+=", "k", "*", "w", "*", "w", "/", "2.0", ";", "derivative", "[", "i", "]", "+=", "k", "*", "w", ";", "}", "}", "}" ]
Calculate the summed conditional likelihood of this data by summing conditional estimates.
[ "Calculate", "the", "summed", "conditional", "likelihood", "of", "this", "data", "by", "summing", "conditional", "estimates", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/LogConditionalObjectiveFunction.java#L140-L192
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/vrid6.java
vrid6.get
public static vrid6[] get(nitro_service service) throws Exception{ vrid6 obj = new vrid6(); vrid6[] response = (vrid6[])obj.get_resources(service); return response; }
java
public static vrid6[] get(nitro_service service) throws Exception{ vrid6 obj = new vrid6(); vrid6[] response = (vrid6[])obj.get_resources(service); return response; }
[ "public", "static", "vrid6", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "vrid6", "obj", "=", "new", "vrid6", "(", ")", ";", "vrid6", "[", "]", "response", "=", "(", "vrid6", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the vrid6 resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "vrid6", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/vrid6.java#L283-L287
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/vrid6.java
vrid6.get
public static vrid6 get(nitro_service service, Long id) throws Exception{ vrid6 obj = new vrid6(); obj.set_id(id); vrid6 response = (vrid6) obj.get_resource(service); return response; }
java
public static vrid6 get(nitro_service service, Long id) throws Exception{ vrid6 obj = new vrid6(); obj.set_id(id); vrid6 response = (vrid6) obj.get_resource(service); return response; }
[ "public", "static", "vrid6", "get", "(", "nitro_service", "service", ",", "Long", "id", ")", "throws", "Exception", "{", "vrid6", "obj", "=", "new", "vrid6", "(", ")", ";", "obj", ".", "set_id", "(", "id", ")", ";", "vrid6", "response", "=", "(", "vrid6", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch vrid6 resource of given name .
[ "Use", "this", "API", "to", "fetch", "vrid6", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/vrid6.java#L299-L304
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/CoNLLDocumentReaderAndWriter.java
CoNLLDocumentReaderAndWriter.splitIntoDocs
private static Iterator<String> splitIntoDocs(Reader r) { if (TREAT_FILE_AS_ONE_DOCUMENT) { return Collections.singleton(IOUtils.slurpReader(r)).iterator(); } else { Collection<String> docs = new ArrayList<String>(); ObjectBank<String> ob = ObjectBank.getLineIterator(r); StringBuilder current = new StringBuilder(); for (String line : ob) { if (docPattern.matcher(line).lookingAt()) { // Start new doc, store old one if non-empty if (current.length() > 0) { docs.add(current.toString()); current = new StringBuilder(); } } current.append(line); current.append('\n'); } if (current.length() > 0) { docs.add(current.toString()); } return docs.iterator(); } }
java
private static Iterator<String> splitIntoDocs(Reader r) { if (TREAT_FILE_AS_ONE_DOCUMENT) { return Collections.singleton(IOUtils.slurpReader(r)).iterator(); } else { Collection<String> docs = new ArrayList<String>(); ObjectBank<String> ob = ObjectBank.getLineIterator(r); StringBuilder current = new StringBuilder(); for (String line : ob) { if (docPattern.matcher(line).lookingAt()) { // Start new doc, store old one if non-empty if (current.length() > 0) { docs.add(current.toString()); current = new StringBuilder(); } } current.append(line); current.append('\n'); } if (current.length() > 0) { docs.add(current.toString()); } return docs.iterator(); } }
[ "private", "static", "Iterator", "<", "String", ">", "splitIntoDocs", "(", "Reader", "r", ")", "{", "if", "(", "TREAT_FILE_AS_ONE_DOCUMENT", ")", "{", "return", "Collections", ".", "singleton", "(", "IOUtils", ".", "slurpReader", "(", "r", ")", ")", ".", "iterator", "(", ")", ";", "}", "else", "{", "Collection", "<", "String", ">", "docs", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "ObjectBank", "<", "String", ">", "ob", "=", "ObjectBank", ".", "getLineIterator", "(", "r", ")", ";", "StringBuilder", "current", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "String", "line", ":", "ob", ")", "{", "if", "(", "docPattern", ".", "matcher", "(", "line", ")", ".", "lookingAt", "(", ")", ")", "{", "// Start new doc, store old one if non-empty\r", "if", "(", "current", ".", "length", "(", ")", ">", "0", ")", "{", "docs", ".", "add", "(", "current", ".", "toString", "(", ")", ")", ";", "current", "=", "new", "StringBuilder", "(", ")", ";", "}", "}", "current", ".", "append", "(", "line", ")", ";", "current", ".", "append", "(", "'", "'", ")", ";", "}", "if", "(", "current", ".", "length", "(", ")", ">", "0", ")", "{", "docs", ".", "add", "(", "current", ".", "toString", "(", ")", ")", ";", "}", "return", "docs", ".", "iterator", "(", ")", ";", "}", "}" ]
end class CoNLLIterator
[ "end", "class", "CoNLLIterator" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/CoNLLDocumentReaderAndWriter.java#L87-L110
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/CoNLLDocumentReaderAndWriter.java
CoNLLDocumentReaderAndWriter.makeCoreLabel
private CoreLabel makeCoreLabel(String line) { CoreLabel wi = new CoreLabel(); // wi.line = line; String[] bits = line.split("\\s+"); switch (bits.length) { case 0: case 1: wi.setWord(BOUNDARY); wi.set(AnswerAnnotation.class, OTHER); break; case 2: wi.setWord(bits[0]); wi.set(AnswerAnnotation.class, bits[1]); break; case 3: wi.setWord(bits[0]); wi.setTag(bits[1]); wi.set(AnswerAnnotation.class, bits[2]); break; case 4: wi.setWord(bits[0]); wi.setTag(bits[1]); wi.set(ChunkAnnotation.class, bits[2]); wi.set(AnswerAnnotation.class, bits[3]); break; case 5: if (flags.useLemmaAsWord) { wi.setWord(bits[1]); } else { wi.setWord(bits[0]); } wi.set(LemmaAnnotation.class, bits[1]); wi.setTag(bits[2]); wi.set(ChunkAnnotation.class, bits[3]); wi.set(AnswerAnnotation.class, bits[4]); break; default: throw new RuntimeIOException("Unexpected input (many fields): " + line); } wi.set(OriginalAnswerAnnotation.class, wi.get(AnswerAnnotation.class)); return wi; }
java
private CoreLabel makeCoreLabel(String line) { CoreLabel wi = new CoreLabel(); // wi.line = line; String[] bits = line.split("\\s+"); switch (bits.length) { case 0: case 1: wi.setWord(BOUNDARY); wi.set(AnswerAnnotation.class, OTHER); break; case 2: wi.setWord(bits[0]); wi.set(AnswerAnnotation.class, bits[1]); break; case 3: wi.setWord(bits[0]); wi.setTag(bits[1]); wi.set(AnswerAnnotation.class, bits[2]); break; case 4: wi.setWord(bits[0]); wi.setTag(bits[1]); wi.set(ChunkAnnotation.class, bits[2]); wi.set(AnswerAnnotation.class, bits[3]); break; case 5: if (flags.useLemmaAsWord) { wi.setWord(bits[1]); } else { wi.setWord(bits[0]); } wi.set(LemmaAnnotation.class, bits[1]); wi.setTag(bits[2]); wi.set(ChunkAnnotation.class, bits[3]); wi.set(AnswerAnnotation.class, bits[4]); break; default: throw new RuntimeIOException("Unexpected input (many fields): " + line); } wi.set(OriginalAnswerAnnotation.class, wi.get(AnswerAnnotation.class)); return wi; }
[ "private", "CoreLabel", "makeCoreLabel", "(", "String", "line", ")", "{", "CoreLabel", "wi", "=", "new", "CoreLabel", "(", ")", ";", "// wi.line = line;\r", "String", "[", "]", "bits", "=", "line", ".", "split", "(", "\"\\\\s+\"", ")", ";", "switch", "(", "bits", ".", "length", ")", "{", "case", "0", ":", "case", "1", ":", "wi", ".", "setWord", "(", "BOUNDARY", ")", ";", "wi", ".", "set", "(", "AnswerAnnotation", ".", "class", ",", "OTHER", ")", ";", "break", ";", "case", "2", ":", "wi", ".", "setWord", "(", "bits", "[", "0", "]", ")", ";", "wi", ".", "set", "(", "AnswerAnnotation", ".", "class", ",", "bits", "[", "1", "]", ")", ";", "break", ";", "case", "3", ":", "wi", ".", "setWord", "(", "bits", "[", "0", "]", ")", ";", "wi", ".", "setTag", "(", "bits", "[", "1", "]", ")", ";", "wi", ".", "set", "(", "AnswerAnnotation", ".", "class", ",", "bits", "[", "2", "]", ")", ";", "break", ";", "case", "4", ":", "wi", ".", "setWord", "(", "bits", "[", "0", "]", ")", ";", "wi", ".", "setTag", "(", "bits", "[", "1", "]", ")", ";", "wi", ".", "set", "(", "ChunkAnnotation", ".", "class", ",", "bits", "[", "2", "]", ")", ";", "wi", ".", "set", "(", "AnswerAnnotation", ".", "class", ",", "bits", "[", "3", "]", ")", ";", "break", ";", "case", "5", ":", "if", "(", "flags", ".", "useLemmaAsWord", ")", "{", "wi", ".", "setWord", "(", "bits", "[", "1", "]", ")", ";", "}", "else", "{", "wi", ".", "setWord", "(", "bits", "[", "0", "]", ")", ";", "}", "wi", ".", "set", "(", "LemmaAnnotation", ".", "class", ",", "bits", "[", "1", "]", ")", ";", "wi", ".", "setTag", "(", "bits", "[", "2", "]", ")", ";", "wi", ".", "set", "(", "ChunkAnnotation", ".", "class", ",", "bits", "[", "3", "]", ")", ";", "wi", ".", "set", "(", "AnswerAnnotation", ".", "class", ",", "bits", "[", "4", "]", ")", ";", "break", ";", "default", ":", "throw", "new", "RuntimeIOException", "(", "\"Unexpected input (many fields): \"", "+", "line", ")", ";", "}", "wi", ".", "set", "(", "OriginalAnswerAnnotation", ".", "class", ",", "wi", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ")", ";", "return", "wi", ";", "}" ]
This deals with the CoNLL files for different languages which have between 2 and 5 columns on non-blank lines. @param line A line of CoNLL input @return The constructed token
[ "This", "deals", "with", "the", "CoNLL", "files", "for", "different", "languages", "which", "have", "between", "2", "and", "5", "columns", "on", "non", "-", "blank", "lines", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/CoNLLDocumentReaderAndWriter.java#L245-L286
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/CoNLLDocumentReaderAndWriter.java
CoNLLDocumentReaderAndWriter.deEndify
private void deEndify(List<CoreLabel> tokens) { if (flags.retainEntitySubclassification) { return; } tokens = new PaddedList<CoreLabel>(tokens, new CoreLabel()); int k = tokens.size(); String[] newAnswers = new String[k]; for (int i = 0; i < k; i++) { CoreLabel c = tokens.get(i); CoreLabel p = tokens.get(i - 1); if (c.get(AnswerAnnotation.class).length() > 1 && c.get(AnswerAnnotation.class).charAt(1) == '-') { String base = c.get(AnswerAnnotation.class).substring(2); String pBase = (p.get(AnswerAnnotation.class).length() <= 2 ? p.get(AnswerAnnotation.class) : p.get(AnswerAnnotation.class).substring(2)); boolean isSecond = (base.equals(pBase)); boolean isStart = (c.get(AnswerAnnotation.class).charAt(0) == 'B' || c.get(AnswerAnnotation.class).charAt(0) == 'S'); if (isSecond && isStart) { newAnswers[i] = intern("B-" + base); } else { newAnswers[i] = intern("I-" + base); } } else { newAnswers[i] = c.get(AnswerAnnotation.class); } } for (int i = 0; i < k; i++) { CoreLabel c = tokens.get(i); c.set(AnswerAnnotation.class, newAnswers[i]); } }
java
private void deEndify(List<CoreLabel> tokens) { if (flags.retainEntitySubclassification) { return; } tokens = new PaddedList<CoreLabel>(tokens, new CoreLabel()); int k = tokens.size(); String[] newAnswers = new String[k]; for (int i = 0; i < k; i++) { CoreLabel c = tokens.get(i); CoreLabel p = tokens.get(i - 1); if (c.get(AnswerAnnotation.class).length() > 1 && c.get(AnswerAnnotation.class).charAt(1) == '-') { String base = c.get(AnswerAnnotation.class).substring(2); String pBase = (p.get(AnswerAnnotation.class).length() <= 2 ? p.get(AnswerAnnotation.class) : p.get(AnswerAnnotation.class).substring(2)); boolean isSecond = (base.equals(pBase)); boolean isStart = (c.get(AnswerAnnotation.class).charAt(0) == 'B' || c.get(AnswerAnnotation.class).charAt(0) == 'S'); if (isSecond && isStart) { newAnswers[i] = intern("B-" + base); } else { newAnswers[i] = intern("I-" + base); } } else { newAnswers[i] = c.get(AnswerAnnotation.class); } } for (int i = 0; i < k; i++) { CoreLabel c = tokens.get(i); c.set(AnswerAnnotation.class, newAnswers[i]); } }
[ "private", "void", "deEndify", "(", "List", "<", "CoreLabel", ">", "tokens", ")", "{", "if", "(", "flags", ".", "retainEntitySubclassification", ")", "{", "return", ";", "}", "tokens", "=", "new", "PaddedList", "<", "CoreLabel", ">", "(", "tokens", ",", "new", "CoreLabel", "(", ")", ")", ";", "int", "k", "=", "tokens", ".", "size", "(", ")", ";", "String", "[", "]", "newAnswers", "=", "new", "String", "[", "k", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "k", ";", "i", "++", ")", "{", "CoreLabel", "c", "=", "tokens", ".", "get", "(", "i", ")", ";", "CoreLabel", "p", "=", "tokens", ".", "get", "(", "i", "-", "1", ")", ";", "if", "(", "c", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ".", "length", "(", ")", ">", "1", "&&", "c", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ".", "charAt", "(", "1", ")", "==", "'", "'", ")", "{", "String", "base", "=", "c", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ".", "substring", "(", "2", ")", ";", "String", "pBase", "=", "(", "p", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ".", "length", "(", ")", "<=", "2", "?", "p", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ":", "p", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ".", "substring", "(", "2", ")", ")", ";", "boolean", "isSecond", "=", "(", "base", ".", "equals", "(", "pBase", ")", ")", ";", "boolean", "isStart", "=", "(", "c", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ".", "charAt", "(", "0", ")", "==", "'", "'", "||", "c", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ".", "charAt", "(", "0", ")", "==", "'", "'", ")", ";", "if", "(", "isSecond", "&&", "isStart", ")", "{", "newAnswers", "[", "i", "]", "=", "intern", "(", "\"B-\"", "+", "base", ")", ";", "}", "else", "{", "newAnswers", "[", "i", "]", "=", "intern", "(", "\"I-\"", "+", "base", ")", ";", "}", "}", "else", "{", "newAnswers", "[", "i", "]", "=", "c", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "}", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "k", ";", "i", "++", ")", "{", "CoreLabel", "c", "=", "tokens", ".", "get", "(", "i", ")", ";", "c", ".", "set", "(", "AnswerAnnotation", ".", "class", ",", "newAnswers", "[", "i", "]", ")", ";", "}", "}" ]
Return the coding scheme to IOB1 coding, regardless of what was used internally. This is useful for scoring against CoNLL test output. @param tokens List of tokens in some NER encoding
[ "Return", "the", "coding", "scheme", "to", "IOB1", "coding", "regardless", "of", "what", "was", "used", "internally", ".", "This", "is", "useful", "for", "scoring", "against", "CoNLL", "test", "output", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/CoNLLDocumentReaderAndWriter.java#L301-L329
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/CoNLLDocumentReaderAndWriter.java
CoNLLDocumentReaderAndWriter.printAnswers
public void printAnswers(List<CoreLabel> doc, PrintWriter out) { // boolean tagsMerged = flags.mergeTags; // boolean useHead = flags.splitOnHead; if ( ! "iob1".equalsIgnoreCase(flags.entitySubclassification)) { deEndify(doc); } for (CoreLabel fl : doc) { String word = fl.word(); if (word == BOUNDARY) { // Using == is okay, because it is set to constant out.println(); } else { String gold = fl.get(OriginalAnswerAnnotation.class); if(gold == null) gold = ""; String guess = fl.get(AnswerAnnotation.class); // System.err.println(fl.word() + "\t" + fl.get(AnswerAnnotation.class) + "\t" + fl.get(AnswerAnnotation.class)); String pos = fl.tag(); String chunk = (fl.get(ChunkAnnotation.class) == null ? "" : fl.get(ChunkAnnotation.class)); out.println(fl.word() + '\t' + pos + '\t' + chunk + '\t' + gold + '\t' + guess); } } }
java
public void printAnswers(List<CoreLabel> doc, PrintWriter out) { // boolean tagsMerged = flags.mergeTags; // boolean useHead = flags.splitOnHead; if ( ! "iob1".equalsIgnoreCase(flags.entitySubclassification)) { deEndify(doc); } for (CoreLabel fl : doc) { String word = fl.word(); if (word == BOUNDARY) { // Using == is okay, because it is set to constant out.println(); } else { String gold = fl.get(OriginalAnswerAnnotation.class); if(gold == null) gold = ""; String guess = fl.get(AnswerAnnotation.class); // System.err.println(fl.word() + "\t" + fl.get(AnswerAnnotation.class) + "\t" + fl.get(AnswerAnnotation.class)); String pos = fl.tag(); String chunk = (fl.get(ChunkAnnotation.class) == null ? "" : fl.get(ChunkAnnotation.class)); out.println(fl.word() + '\t' + pos + '\t' + chunk + '\t' + gold + '\t' + guess); } } }
[ "public", "void", "printAnswers", "(", "List", "<", "CoreLabel", ">", "doc", ",", "PrintWriter", "out", ")", "{", "// boolean tagsMerged = flags.mergeTags;\r", "// boolean useHead = flags.splitOnHead;\r", "if", "(", "!", "\"iob1\"", ".", "equalsIgnoreCase", "(", "flags", ".", "entitySubclassification", ")", ")", "{", "deEndify", "(", "doc", ")", ";", "}", "for", "(", "CoreLabel", "fl", ":", "doc", ")", "{", "String", "word", "=", "fl", ".", "word", "(", ")", ";", "if", "(", "word", "==", "BOUNDARY", ")", "{", "// Using == is okay, because it is set to constant\r", "out", ".", "println", "(", ")", ";", "}", "else", "{", "String", "gold", "=", "fl", ".", "get", "(", "OriginalAnswerAnnotation", ".", "class", ")", ";", "if", "(", "gold", "==", "null", ")", "gold", "=", "\"\"", ";", "String", "guess", "=", "fl", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "// System.err.println(fl.word() + \"\\t\" + fl.get(AnswerAnnotation.class) + \"\\t\" + fl.get(AnswerAnnotation.class));\r", "String", "pos", "=", "fl", ".", "tag", "(", ")", ";", "String", "chunk", "=", "(", "fl", ".", "get", "(", "ChunkAnnotation", ".", "class", ")", "==", "null", "?", "\"\"", ":", "fl", ".", "get", "(", "ChunkAnnotation", ".", "class", ")", ")", ";", "out", ".", "println", "(", "fl", ".", "word", "(", ")", "+", "'", "'", "+", "pos", "+", "'", "'", "+", "chunk", "+", "'", "'", "+", "gold", "+", "'", "'", "+", "guess", ")", ";", "}", "}", "}" ]
Write a standard CoNLL format output file. @param doc The document: A List of CoreLabel @param out Where to send the answers to
[ "Write", "a", "standard", "CoNLL", "format", "output", "file", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/CoNLLDocumentReaderAndWriter.java#L337-L360
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/CoNLLDocumentReaderAndWriter.java
CoNLLDocumentReaderAndWriter.main
public static void main(String[] args) throws IOException, ClassNotFoundException { CoNLLDocumentReaderAndWriter f = new CoNLLDocumentReaderAndWriter(); f.init(new SeqClassifierFlags()); int numDocs = 0; int numTokens = 0; int numEntities = 0; String lastAnsBase = ""; for (Iterator<List<CoreLabel>> it = f.getIterator(new FileReader(args[0])); it.hasNext(); ) { List<CoreLabel> doc = it.next(); numDocs++; for (CoreLabel fl : doc) { // System.out.println("FL " + (++i) + " was " + fl); if (fl.word().equals(BOUNDARY)) { continue; } String ans = fl.get(AnswerAnnotation.class); String ansBase; String ansPrefix; String[] bits = ans.split("-"); if (bits.length == 1) { ansBase = bits[0]; ansPrefix = ""; } else { ansBase = bits[1]; ansPrefix = bits[0]; } numTokens++; if (ansBase.equals("O")) { } else if (ansBase.equals(lastAnsBase)) { if (ansPrefix.equals("B")) { numEntities++; } } else { numEntities++; } } } System.out.println("File " + args[0] + " has " + numDocs + " documents, " + numTokens + " (non-blank line) tokens and " + numEntities + " entities."); }
java
public static void main(String[] args) throws IOException, ClassNotFoundException { CoNLLDocumentReaderAndWriter f = new CoNLLDocumentReaderAndWriter(); f.init(new SeqClassifierFlags()); int numDocs = 0; int numTokens = 0; int numEntities = 0; String lastAnsBase = ""; for (Iterator<List<CoreLabel>> it = f.getIterator(new FileReader(args[0])); it.hasNext(); ) { List<CoreLabel> doc = it.next(); numDocs++; for (CoreLabel fl : doc) { // System.out.println("FL " + (++i) + " was " + fl); if (fl.word().equals(BOUNDARY)) { continue; } String ans = fl.get(AnswerAnnotation.class); String ansBase; String ansPrefix; String[] bits = ans.split("-"); if (bits.length == 1) { ansBase = bits[0]; ansPrefix = ""; } else { ansBase = bits[1]; ansPrefix = bits[0]; } numTokens++; if (ansBase.equals("O")) { } else if (ansBase.equals(lastAnsBase)) { if (ansPrefix.equals("B")) { numEntities++; } } else { numEntities++; } } } System.out.println("File " + args[0] + " has " + numDocs + " documents, " + numTokens + " (non-blank line) tokens and " + numEntities + " entities."); }
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "CoNLLDocumentReaderAndWriter", "f", "=", "new", "CoNLLDocumentReaderAndWriter", "(", ")", ";", "f", ".", "init", "(", "new", "SeqClassifierFlags", "(", ")", ")", ";", "int", "numDocs", "=", "0", ";", "int", "numTokens", "=", "0", ";", "int", "numEntities", "=", "0", ";", "String", "lastAnsBase", "=", "\"\"", ";", "for", "(", "Iterator", "<", "List", "<", "CoreLabel", ">", ">", "it", "=", "f", ".", "getIterator", "(", "new", "FileReader", "(", "args", "[", "0", "]", ")", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "List", "<", "CoreLabel", ">", "doc", "=", "it", ".", "next", "(", ")", ";", "numDocs", "++", ";", "for", "(", "CoreLabel", "fl", ":", "doc", ")", "{", "// System.out.println(\"FL \" + (++i) + \" was \" + fl);\r", "if", "(", "fl", ".", "word", "(", ")", ".", "equals", "(", "BOUNDARY", ")", ")", "{", "continue", ";", "}", "String", "ans", "=", "fl", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "String", "ansBase", ";", "String", "ansPrefix", ";", "String", "[", "]", "bits", "=", "ans", ".", "split", "(", "\"-\"", ")", ";", "if", "(", "bits", ".", "length", "==", "1", ")", "{", "ansBase", "=", "bits", "[", "0", "]", ";", "ansPrefix", "=", "\"\"", ";", "}", "else", "{", "ansBase", "=", "bits", "[", "1", "]", ";", "ansPrefix", "=", "bits", "[", "0", "]", ";", "}", "numTokens", "++", ";", "if", "(", "ansBase", ".", "equals", "(", "\"O\"", ")", ")", "{", "}", "else", "if", "(", "ansBase", ".", "equals", "(", "lastAnsBase", ")", ")", "{", "if", "(", "ansPrefix", ".", "equals", "(", "\"B\"", ")", ")", "{", "numEntities", "++", ";", "}", "}", "else", "{", "numEntities", "++", ";", "}", "}", "}", "System", ".", "out", ".", "println", "(", "\"File \"", "+", "args", "[", "0", "]", "+", "\" has \"", "+", "numDocs", "+", "\" documents, \"", "+", "numTokens", "+", "\" (non-blank line) tokens and \"", "+", "numEntities", "+", "\" entities.\"", ")", ";", "}" ]
Count some stats on what occurs in a file.
[ "Count", "some", "stats", "on", "what", "occurs", "in", "a", "file", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/CoNLLDocumentReaderAndWriter.java#L364-L404
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/optimization/AbstractStochasticCachingDiffFunction.java
AbstractStochasticCachingDiffFunction.getBatch
protected void getBatch(int batchSize){ // if (numCalls == 0) { // for (int i = 0; i < 1538*\15; i++) { // randGenerator.nextInt(this.dataDimension()); // } // } // numCalls++; if (thisBatch == null || thisBatch.length != batchSize){ thisBatch = new int[batchSize]; } //----------------------------- //RANDOM WITH REPLACEMENT //----------------------------- if (sampleMethod.equals(SamplingMethod.RandomWithReplacement)){ for(int i = 0; i<batchSize;i++){ thisBatch[i] = randGenerator.nextInt(this.dataDimension()); //Just generate a random index // System.err.println("numCalls = "+(numCalls++)); } //----------------------------- //ORDERED //----------------------------- }else if(sampleMethod.equals(SamplingMethod.Ordered)){ for(int i = 0; i<batchSize;i++){ thisBatch[i] = (curElement + i) % this.dataDimension() ; //Take the next batchSize points in order } curElement = (curElement + batchSize) % this.dataDimension(); //watch out for overflow //----------------------------- //RANDOM WITHOUT REPLACEMENT //----------------------------- }else if(sampleMethod.equals(SamplingMethod.RandomWithoutReplacement)){ //Declare the indices array if needed. if (allIndices == null || allIndices.size()!= this.dataDimension()){ allIndices = new ArrayList<Integer>(); for(int i=0;i<this.dataDimension();i++){ allIndices.add(i); } Collections.shuffle(allIndices,randGenerator); } for(int i = 0; i<batchSize;i++){ thisBatch[i] = allIndices.get((curElement + i) % allIndices.size()); //Grab the next batchSize indices } if (curElement + batchSize > this.dataDimension()){ Collections.shuffle(Arrays.asList(allIndices),randGenerator); //Shuffle if we got to the end of the list } //watch out for overflow curElement = (curElement + batchSize) % allIndices.size(); //Rollover }else{ System.err.println("NO SAMPLING METHOD SELECTED"); System.exit(1); } }
java
protected void getBatch(int batchSize){ // if (numCalls == 0) { // for (int i = 0; i < 1538*\15; i++) { // randGenerator.nextInt(this.dataDimension()); // } // } // numCalls++; if (thisBatch == null || thisBatch.length != batchSize){ thisBatch = new int[batchSize]; } //----------------------------- //RANDOM WITH REPLACEMENT //----------------------------- if (sampleMethod.equals(SamplingMethod.RandomWithReplacement)){ for(int i = 0; i<batchSize;i++){ thisBatch[i] = randGenerator.nextInt(this.dataDimension()); //Just generate a random index // System.err.println("numCalls = "+(numCalls++)); } //----------------------------- //ORDERED //----------------------------- }else if(sampleMethod.equals(SamplingMethod.Ordered)){ for(int i = 0; i<batchSize;i++){ thisBatch[i] = (curElement + i) % this.dataDimension() ; //Take the next batchSize points in order } curElement = (curElement + batchSize) % this.dataDimension(); //watch out for overflow //----------------------------- //RANDOM WITHOUT REPLACEMENT //----------------------------- }else if(sampleMethod.equals(SamplingMethod.RandomWithoutReplacement)){ //Declare the indices array if needed. if (allIndices == null || allIndices.size()!= this.dataDimension()){ allIndices = new ArrayList<Integer>(); for(int i=0;i<this.dataDimension();i++){ allIndices.add(i); } Collections.shuffle(allIndices,randGenerator); } for(int i = 0; i<batchSize;i++){ thisBatch[i] = allIndices.get((curElement + i) % allIndices.size()); //Grab the next batchSize indices } if (curElement + batchSize > this.dataDimension()){ Collections.shuffle(Arrays.asList(allIndices),randGenerator); //Shuffle if we got to the end of the list } //watch out for overflow curElement = (curElement + batchSize) % allIndices.size(); //Rollover }else{ System.err.println("NO SAMPLING METHOD SELECTED"); System.exit(1); } }
[ "protected", "void", "getBatch", "(", "int", "batchSize", ")", "{", "// if (numCalls == 0) {\r", "// for (int i = 0; i < 1538*\\15; i++) {\r", "// randGenerator.nextInt(this.dataDimension());\r", "// }\r", "// }\r", "// numCalls++;\r", "if", "(", "thisBatch", "==", "null", "||", "thisBatch", ".", "length", "!=", "batchSize", ")", "{", "thisBatch", "=", "new", "int", "[", "batchSize", "]", ";", "}", "//-----------------------------\r", "//RANDOM WITH REPLACEMENT\r", "//-----------------------------\r", "if", "(", "sampleMethod", ".", "equals", "(", "SamplingMethod", ".", "RandomWithReplacement", ")", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "batchSize", ";", "i", "++", ")", "{", "thisBatch", "[", "i", "]", "=", "randGenerator", ".", "nextInt", "(", "this", ".", "dataDimension", "(", ")", ")", ";", "//Just generate a random index\r", "// System.err.println(\"numCalls = \"+(numCalls++));\r", "}", "//-----------------------------\r", "//ORDERED\r", "//-----------------------------\r", "}", "else", "if", "(", "sampleMethod", ".", "equals", "(", "SamplingMethod", ".", "Ordered", ")", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "batchSize", ";", "i", "++", ")", "{", "thisBatch", "[", "i", "]", "=", "(", "curElement", "+", "i", ")", "%", "this", ".", "dataDimension", "(", ")", ";", "//Take the next batchSize points in order\r", "}", "curElement", "=", "(", "curElement", "+", "batchSize", ")", "%", "this", ".", "dataDimension", "(", ")", ";", "//watch out for overflow\r", "//-----------------------------\r", "//RANDOM WITHOUT REPLACEMENT\r", "//-----------------------------\r", "}", "else", "if", "(", "sampleMethod", ".", "equals", "(", "SamplingMethod", ".", "RandomWithoutReplacement", ")", ")", "{", "//Declare the indices array if needed.\r", "if", "(", "allIndices", "==", "null", "||", "allIndices", ".", "size", "(", ")", "!=", "this", ".", "dataDimension", "(", ")", ")", "{", "allIndices", "=", "new", "ArrayList", "<", "Integer", ">", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "dataDimension", "(", ")", ";", "i", "++", ")", "{", "allIndices", ".", "add", "(", "i", ")", ";", "}", "Collections", ".", "shuffle", "(", "allIndices", ",", "randGenerator", ")", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "batchSize", ";", "i", "++", ")", "{", "thisBatch", "[", "i", "]", "=", "allIndices", ".", "get", "(", "(", "curElement", "+", "i", ")", "%", "allIndices", ".", "size", "(", ")", ")", ";", "//Grab the next batchSize indices\r", "}", "if", "(", "curElement", "+", "batchSize", ">", "this", ".", "dataDimension", "(", ")", ")", "{", "Collections", ".", "shuffle", "(", "Arrays", ".", "asList", "(", "allIndices", ")", ",", "randGenerator", ")", ";", "//Shuffle if we got to the end of the list\r", "}", "//watch out for overflow\r", "curElement", "=", "(", "curElement", "+", "batchSize", ")", "%", "allIndices", ".", "size", "(", ")", ";", "//Rollover\r", "}", "else", "{", "System", ".", "err", ".", "println", "(", "\"NO SAMPLING METHOD SELECTED\"", ")", ";", "System", ".", "exit", "(", "1", ")", ";", "}", "}" ]
private int numCalls = 0;
[ "private", "int", "numCalls", "=", "0", ";" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/optimization/AbstractStochasticCachingDiffFunction.java#L152-L214
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server_service_binding.java
server_service_binding.get
public static server_service_binding[] get(nitro_service service, String name) throws Exception{ server_service_binding obj = new server_service_binding(); obj.set_name(name); server_service_binding response[] = (server_service_binding[]) obj.get_resources(service); return response; }
java
public static server_service_binding[] get(nitro_service service, String name) throws Exception{ server_service_binding obj = new server_service_binding(); obj.set_name(name); server_service_binding response[] = (server_service_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "server_service_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "server_service_binding", "obj", "=", "new", "server_service_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "server_service_binding", "response", "[", "]", "=", "(", "server_service_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch server_service_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "server_service_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/server_service_binding.java#L162-L167
train
RestComm/cluster
cache/src/main/java/org/restcomm/cache/MobicentsCache.java
MobicentsCache.setReplicationClassLoader
@SuppressWarnings("rawtypes") public void setReplicationClassLoader(Fqn regionFqn, ClassLoader classLoader) { if (!isLocalMode()) { final Region region = jBossCache.getRegion(regionFqn, true); region.registerContextClassLoader(classLoader); if (!region.isActive() && jBossCache.getCacheStatus() == CacheStatus.STARTED) { region.activate(); } } }
java
@SuppressWarnings("rawtypes") public void setReplicationClassLoader(Fqn regionFqn, ClassLoader classLoader) { if (!isLocalMode()) { final Region region = jBossCache.getRegion(regionFqn, true); region.registerContextClassLoader(classLoader); if (!region.isActive() && jBossCache.getCacheStatus() == CacheStatus.STARTED) { region.activate(); } } }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "void", "setReplicationClassLoader", "(", "Fqn", "regionFqn", ",", "ClassLoader", "classLoader", ")", "{", "if", "(", "!", "isLocalMode", "(", ")", ")", "{", "final", "Region", "region", "=", "jBossCache", ".", "getRegion", "(", "regionFqn", ",", "true", ")", ";", "region", ".", "registerContextClassLoader", "(", "classLoader", ")", ";", "if", "(", "!", "region", ".", "isActive", "(", ")", "&&", "jBossCache", ".", "getCacheStatus", "(", ")", "==", "CacheStatus", ".", "STARTED", ")", "{", "region", ".", "activate", "(", ")", ";", "}", "}", "}" ]
Sets the class loader to be used on serialization operations, for data stored in the specified fqn and child nodes. Note that if another class loader is set for a specific child node tree, the cache will use instead that class loader. @param regionFqn @param classLoader
[ "Sets", "the", "class", "loader", "to", "be", "used", "on", "serialization", "operations", "for", "data", "stored", "in", "the", "specified", "fqn", "and", "child", "nodes", ".", "Note", "that", "if", "another", "class", "loader", "is", "set", "for", "a", "specific", "child", "node", "tree", "the", "cache", "will", "use", "instead", "that", "class", "loader", "." ]
46bff5e9ae89528ccc7b43ba50a0de5b96913e6f
https://github.com/RestComm/cluster/blob/46bff5e9ae89528ccc7b43ba50a0de5b96913e6f/cache/src/main/java/org/restcomm/cache/MobicentsCache.java#L184-L193
train
RestComm/cluster
cache/src/main/java/org/restcomm/cache/MobicentsCache.java
MobicentsCache.unsetReplicationClassLoader
@SuppressWarnings("rawtypes") public void unsetReplicationClassLoader(Fqn regionFqn, ClassLoader classLoader) { if (!isLocalMode()) { final Region region = jBossCache.getRegion(regionFqn, true); if (region != null) { if (region.isActive()) { region.deactivate(); } region.unregisterContextClassLoader(); jBossCache.removeRegion(regionFqn); } } }
java
@SuppressWarnings("rawtypes") public void unsetReplicationClassLoader(Fqn regionFqn, ClassLoader classLoader) { if (!isLocalMode()) { final Region region = jBossCache.getRegion(regionFqn, true); if (region != null) { if (region.isActive()) { region.deactivate(); } region.unregisterContextClassLoader(); jBossCache.removeRegion(regionFqn); } } }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "void", "unsetReplicationClassLoader", "(", "Fqn", "regionFqn", ",", "ClassLoader", "classLoader", ")", "{", "if", "(", "!", "isLocalMode", "(", ")", ")", "{", "final", "Region", "region", "=", "jBossCache", ".", "getRegion", "(", "regionFqn", ",", "true", ")", ";", "if", "(", "region", "!=", "null", ")", "{", "if", "(", "region", ".", "isActive", "(", ")", ")", "{", "region", ".", "deactivate", "(", ")", ";", "}", "region", ".", "unregisterContextClassLoader", "(", ")", ";", "jBossCache", ".", "removeRegion", "(", "regionFqn", ")", ";", "}", "}", "}" ]
Unsets the class loader to be used on serialization operations, for data stored in the specified fqn and child nodes. @param regionFqn @param classLoader
[ "Unsets", "the", "class", "loader", "to", "be", "used", "on", "serialization", "operations", "for", "data", "stored", "in", "the", "specified", "fqn", "and", "child", "nodes", "." ]
46bff5e9ae89528ccc7b43ba50a0de5b96913e6f
https://github.com/RestComm/cluster/blob/46bff5e9ae89528ccc7b43ba50a0de5b96913e6f/cache/src/main/java/org/restcomm/cache/MobicentsCache.java#L212-L224
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemglobal_authenticationradiuspolicy_binding.java
systemglobal_authenticationradiuspolicy_binding.get
public static systemglobal_authenticationradiuspolicy_binding[] get(nitro_service service) throws Exception{ systemglobal_authenticationradiuspolicy_binding obj = new systemglobal_authenticationradiuspolicy_binding(); systemglobal_authenticationradiuspolicy_binding response[] = (systemglobal_authenticationradiuspolicy_binding[]) obj.get_resources(service); return response; }
java
public static systemglobal_authenticationradiuspolicy_binding[] get(nitro_service service) throws Exception{ systemglobal_authenticationradiuspolicy_binding obj = new systemglobal_authenticationradiuspolicy_binding(); systemglobal_authenticationradiuspolicy_binding response[] = (systemglobal_authenticationradiuspolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "systemglobal_authenticationradiuspolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "systemglobal_authenticationradiuspolicy_binding", "obj", "=", "new", "systemglobal_authenticationradiuspolicy_binding", "(", ")", ";", "systemglobal_authenticationradiuspolicy_binding", "response", "[", "]", "=", "(", "systemglobal_authenticationradiuspolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch a systemglobal_authenticationradiuspolicy_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "systemglobal_authenticationradiuspolicy_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemglobal_authenticationradiuspolicy_binding.java#L180-L184
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditsyslogpolicy_authenticationvserver_binding.java
auditsyslogpolicy_authenticationvserver_binding.get
public static auditsyslogpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ auditsyslogpolicy_authenticationvserver_binding obj = new auditsyslogpolicy_authenticationvserver_binding(); obj.set_name(name); auditsyslogpolicy_authenticationvserver_binding response[] = (auditsyslogpolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
java
public static auditsyslogpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ auditsyslogpolicy_authenticationvserver_binding obj = new auditsyslogpolicy_authenticationvserver_binding(); obj.set_name(name); auditsyslogpolicy_authenticationvserver_binding response[] = (auditsyslogpolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "auditsyslogpolicy_authenticationvserver_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "auditsyslogpolicy_authenticationvserver_binding", "obj", "=", "new", "auditsyslogpolicy_authenticationvserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "auditsyslogpolicy_authenticationvserver_binding", "response", "[", "]", "=", "(", "auditsyslogpolicy_authenticationvserver_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch auditsyslogpolicy_authenticationvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "auditsyslogpolicy_authenticationvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditsyslogpolicy_authenticationvserver_binding.java#L132-L137
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup_lbvserver_binding.java
lbgroup_lbvserver_binding.get
public static lbgroup_lbvserver_binding[] get(nitro_service service, String name) throws Exception{ lbgroup_lbvserver_binding obj = new lbgroup_lbvserver_binding(); obj.set_name(name); lbgroup_lbvserver_binding response[] = (lbgroup_lbvserver_binding[]) obj.get_resources(service); return response; }
java
public static lbgroup_lbvserver_binding[] get(nitro_service service, String name) throws Exception{ lbgroup_lbvserver_binding obj = new lbgroup_lbvserver_binding(); obj.set_name(name); lbgroup_lbvserver_binding response[] = (lbgroup_lbvserver_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "lbgroup_lbvserver_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "lbgroup_lbvserver_binding", "obj", "=", "new", "lbgroup_lbvserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "lbgroup_lbvserver_binding", "response", "[", "]", "=", "(", "lbgroup_lbvserver_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch lbgroup_lbvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "lbgroup_lbvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbgroup_lbvserver_binding.java#L158-L163
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java
nspbr.add
public static base_response add(nitro_service client, nspbr resource) throws Exception { nspbr addresource = new nspbr(); addresource.name = resource.name; addresource.action = resource.action; addresource.td = resource.td; addresource.srcip = resource.srcip; addresource.srcipop = resource.srcipop; addresource.srcipval = resource.srcipval; addresource.srcport = resource.srcport; addresource.srcportop = resource.srcportop; addresource.srcportval = resource.srcportval; addresource.destip = resource.destip; addresource.destipop = resource.destipop; addresource.destipval = resource.destipval; addresource.destport = resource.destport; addresource.destportop = resource.destportop; addresource.destportval = resource.destportval; addresource.nexthop = resource.nexthop; addresource.nexthopval = resource.nexthopval; addresource.iptunnel = resource.iptunnel; addresource.iptunnelname = resource.iptunnelname; addresource.srcmac = resource.srcmac; addresource.protocol = resource.protocol; addresource.protocolnumber = resource.protocolnumber; addresource.vlan = resource.vlan; addresource.Interface = resource.Interface; addresource.priority = resource.priority; addresource.msr = resource.msr; addresource.monitor = resource.monitor; addresource.state = resource.state; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, nspbr resource) throws Exception { nspbr addresource = new nspbr(); addresource.name = resource.name; addresource.action = resource.action; addresource.td = resource.td; addresource.srcip = resource.srcip; addresource.srcipop = resource.srcipop; addresource.srcipval = resource.srcipval; addresource.srcport = resource.srcport; addresource.srcportop = resource.srcportop; addresource.srcportval = resource.srcportval; addresource.destip = resource.destip; addresource.destipop = resource.destipop; addresource.destipval = resource.destipval; addresource.destport = resource.destport; addresource.destportop = resource.destportop; addresource.destportval = resource.destportval; addresource.nexthop = resource.nexthop; addresource.nexthopval = resource.nexthopval; addresource.iptunnel = resource.iptunnel; addresource.iptunnelname = resource.iptunnelname; addresource.srcmac = resource.srcmac; addresource.protocol = resource.protocol; addresource.protocolnumber = resource.protocolnumber; addresource.vlan = resource.vlan; addresource.Interface = resource.Interface; addresource.priority = resource.priority; addresource.msr = resource.msr; addresource.monitor = resource.monitor; addresource.state = resource.state; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "nspbr", "resource", ")", "throws", "Exception", "{", "nspbr", "addresource", "=", "new", "nspbr", "(", ")", ";", "addresource", ".", "name", "=", "resource", ".", "name", ";", "addresource", ".", "action", "=", "resource", ".", "action", ";", "addresource", ".", "td", "=", "resource", ".", "td", ";", "addresource", ".", "srcip", "=", "resource", ".", "srcip", ";", "addresource", ".", "srcipop", "=", "resource", ".", "srcipop", ";", "addresource", ".", "srcipval", "=", "resource", ".", "srcipval", ";", "addresource", ".", "srcport", "=", "resource", ".", "srcport", ";", "addresource", ".", "srcportop", "=", "resource", ".", "srcportop", ";", "addresource", ".", "srcportval", "=", "resource", ".", "srcportval", ";", "addresource", ".", "destip", "=", "resource", ".", "destip", ";", "addresource", ".", "destipop", "=", "resource", ".", "destipop", ";", "addresource", ".", "destipval", "=", "resource", ".", "destipval", ";", "addresource", ".", "destport", "=", "resource", ".", "destport", ";", "addresource", ".", "destportop", "=", "resource", ".", "destportop", ";", "addresource", ".", "destportval", "=", "resource", ".", "destportval", ";", "addresource", ".", "nexthop", "=", "resource", ".", "nexthop", ";", "addresource", ".", "nexthopval", "=", "resource", ".", "nexthopval", ";", "addresource", ".", "iptunnel", "=", "resource", ".", "iptunnel", ";", "addresource", ".", "iptunnelname", "=", "resource", ".", "iptunnelname", ";", "addresource", ".", "srcmac", "=", "resource", ".", "srcmac", ";", "addresource", ".", "protocol", "=", "resource", ".", "protocol", ";", "addresource", ".", "protocolnumber", "=", "resource", ".", "protocolnumber", ";", "addresource", ".", "vlan", "=", "resource", ".", "vlan", ";", "addresource", ".", "Interface", "=", "resource", ".", "Interface", ";", "addresource", ".", "priority", "=", "resource", ".", "priority", ";", "addresource", ".", "msr", "=", "resource", ".", "msr", ";", "addresource", ".", "monitor", "=", "resource", ".", "monitor", ";", "addresource", ".", "state", "=", "resource", ".", "state", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add nspbr.
[ "Use", "this", "API", "to", "add", "nspbr", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java#L868-L899
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java
nspbr.add
public static base_responses add(nitro_service client, nspbr resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nspbr addresources[] = new nspbr[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nspbr(); addresources[i].name = resources[i].name; addresources[i].action = resources[i].action; addresources[i].td = resources[i].td; addresources[i].srcip = resources[i].srcip; addresources[i].srcipop = resources[i].srcipop; addresources[i].srcipval = resources[i].srcipval; addresources[i].srcport = resources[i].srcport; addresources[i].srcportop = resources[i].srcportop; addresources[i].srcportval = resources[i].srcportval; addresources[i].destip = resources[i].destip; addresources[i].destipop = resources[i].destipop; addresources[i].destipval = resources[i].destipval; addresources[i].destport = resources[i].destport; addresources[i].destportop = resources[i].destportop; addresources[i].destportval = resources[i].destportval; addresources[i].nexthop = resources[i].nexthop; addresources[i].nexthopval = resources[i].nexthopval; addresources[i].iptunnel = resources[i].iptunnel; addresources[i].iptunnelname = resources[i].iptunnelname; 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].priority = resources[i].priority; addresources[i].msr = resources[i].msr; addresources[i].monitor = resources[i].monitor; addresources[i].state = resources[i].state; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, nspbr resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nspbr addresources[] = new nspbr[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nspbr(); addresources[i].name = resources[i].name; addresources[i].action = resources[i].action; addresources[i].td = resources[i].td; addresources[i].srcip = resources[i].srcip; addresources[i].srcipop = resources[i].srcipop; addresources[i].srcipval = resources[i].srcipval; addresources[i].srcport = resources[i].srcport; addresources[i].srcportop = resources[i].srcportop; addresources[i].srcportval = resources[i].srcportval; addresources[i].destip = resources[i].destip; addresources[i].destipop = resources[i].destipop; addresources[i].destipval = resources[i].destipval; addresources[i].destport = resources[i].destport; addresources[i].destportop = resources[i].destportop; addresources[i].destportval = resources[i].destportval; addresources[i].nexthop = resources[i].nexthop; addresources[i].nexthopval = resources[i].nexthopval; addresources[i].iptunnel = resources[i].iptunnel; addresources[i].iptunnelname = resources[i].iptunnelname; 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].priority = resources[i].priority; addresources[i].msr = resources[i].msr; addresources[i].monitor = resources[i].monitor; addresources[i].state = resources[i].state; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "nspbr", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nspbr", "addresources", "[", "]", "=", "new", "nspbr", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "nspbr", "(", ")", ";", "addresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "addresources", "[", "i", "]", ".", "action", "=", "resources", "[", "i", "]", ".", "action", ";", "addresources", "[", "i", "]", ".", "td", "=", "resources", "[", "i", "]", ".", "td", ";", "addresources", "[", "i", "]", ".", "srcip", "=", "resources", "[", "i", "]", ".", "srcip", ";", "addresources", "[", "i", "]", ".", "srcipop", "=", "resources", "[", "i", "]", ".", "srcipop", ";", "addresources", "[", "i", "]", ".", "srcipval", "=", "resources", "[", "i", "]", ".", "srcipval", ";", "addresources", "[", "i", "]", ".", "srcport", "=", "resources", "[", "i", "]", ".", "srcport", ";", "addresources", "[", "i", "]", ".", "srcportop", "=", "resources", "[", "i", "]", ".", "srcportop", ";", "addresources", "[", "i", "]", ".", "srcportval", "=", "resources", "[", "i", "]", ".", "srcportval", ";", "addresources", "[", "i", "]", ".", "destip", "=", "resources", "[", "i", "]", ".", "destip", ";", "addresources", "[", "i", "]", ".", "destipop", "=", "resources", "[", "i", "]", ".", "destipop", ";", "addresources", "[", "i", "]", ".", "destipval", "=", "resources", "[", "i", "]", ".", "destipval", ";", "addresources", "[", "i", "]", ".", "destport", "=", "resources", "[", "i", "]", ".", "destport", ";", "addresources", "[", "i", "]", ".", "destportop", "=", "resources", "[", "i", "]", ".", "destportop", ";", "addresources", "[", "i", "]", ".", "destportval", "=", "resources", "[", "i", "]", ".", "destportval", ";", "addresources", "[", "i", "]", ".", "nexthop", "=", "resources", "[", "i", "]", ".", "nexthop", ";", "addresources", "[", "i", "]", ".", "nexthopval", "=", "resources", "[", "i", "]", ".", "nexthopval", ";", "addresources", "[", "i", "]", ".", "iptunnel", "=", "resources", "[", "i", "]", ".", "iptunnel", ";", "addresources", "[", "i", "]", ".", "iptunnelname", "=", "resources", "[", "i", "]", ".", "iptunnelname", ";", "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", "]", ".", "priority", "=", "resources", "[", "i", "]", ".", "priority", ";", "addresources", "[", "i", "]", ".", "msr", "=", "resources", "[", "i", "]", ".", "msr", ";", "addresources", "[", "i", "]", ".", "monitor", "=", "resources", "[", "i", "]", ".", "monitor", ";", "addresources", "[", "i", "]", ".", "state", "=", "resources", "[", "i", "]", ".", "state", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add nspbr resources.
[ "Use", "this", "API", "to", "add", "nspbr", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java#L904-L942
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java
nspbr.update
public static base_response update(nitro_service client, nspbr resource) throws Exception { nspbr updateresource = new nspbr(); updateresource.name = resource.name; updateresource.action = resource.action; updateresource.srcip = resource.srcip; updateresource.srcipop = resource.srcipop; updateresource.srcipval = resource.srcipval; updateresource.srcport = resource.srcport; updateresource.srcportop = resource.srcportop; updateresource.srcportval = resource.srcportval; updateresource.destip = resource.destip; updateresource.destipop = resource.destipop; updateresource.destipval = resource.destipval; updateresource.destport = resource.destport; updateresource.destportop = resource.destportop; updateresource.destportval = resource.destportval; updateresource.nexthop = resource.nexthop; updateresource.nexthopval = resource.nexthopval; updateresource.iptunnel = resource.iptunnel; updateresource.iptunnelname = resource.iptunnelname; updateresource.srcmac = resource.srcmac; updateresource.protocol = resource.protocol; updateresource.protocolnumber = resource.protocolnumber; updateresource.vlan = resource.vlan; updateresource.Interface = resource.Interface; updateresource.priority = resource.priority; updateresource.msr = resource.msr; updateresource.monitor = resource.monitor; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, nspbr resource) throws Exception { nspbr updateresource = new nspbr(); updateresource.name = resource.name; updateresource.action = resource.action; updateresource.srcip = resource.srcip; updateresource.srcipop = resource.srcipop; updateresource.srcipval = resource.srcipval; updateresource.srcport = resource.srcport; updateresource.srcportop = resource.srcportop; updateresource.srcportval = resource.srcportval; updateresource.destip = resource.destip; updateresource.destipop = resource.destipop; updateresource.destipval = resource.destipval; updateresource.destport = resource.destport; updateresource.destportop = resource.destportop; updateresource.destportval = resource.destportval; updateresource.nexthop = resource.nexthop; updateresource.nexthopval = resource.nexthopval; updateresource.iptunnel = resource.iptunnel; updateresource.iptunnelname = resource.iptunnelname; updateresource.srcmac = resource.srcmac; updateresource.protocol = resource.protocol; updateresource.protocolnumber = resource.protocolnumber; updateresource.vlan = resource.vlan; updateresource.Interface = resource.Interface; updateresource.priority = resource.priority; updateresource.msr = resource.msr; updateresource.monitor = resource.monitor; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "nspbr", "resource", ")", "throws", "Exception", "{", "nspbr", "updateresource", "=", "new", "nspbr", "(", ")", ";", "updateresource", ".", "name", "=", "resource", ".", "name", ";", "updateresource", ".", "action", "=", "resource", ".", "action", ";", "updateresource", ".", "srcip", "=", "resource", ".", "srcip", ";", "updateresource", ".", "srcipop", "=", "resource", ".", "srcipop", ";", "updateresource", ".", "srcipval", "=", "resource", ".", "srcipval", ";", "updateresource", ".", "srcport", "=", "resource", ".", "srcport", ";", "updateresource", ".", "srcportop", "=", "resource", ".", "srcportop", ";", "updateresource", ".", "srcportval", "=", "resource", ".", "srcportval", ";", "updateresource", ".", "destip", "=", "resource", ".", "destip", ";", "updateresource", ".", "destipop", "=", "resource", ".", "destipop", ";", "updateresource", ".", "destipval", "=", "resource", ".", "destipval", ";", "updateresource", ".", "destport", "=", "resource", ".", "destport", ";", "updateresource", ".", "destportop", "=", "resource", ".", "destportop", ";", "updateresource", ".", "destportval", "=", "resource", ".", "destportval", ";", "updateresource", ".", "nexthop", "=", "resource", ".", "nexthop", ";", "updateresource", ".", "nexthopval", "=", "resource", ".", "nexthopval", ";", "updateresource", ".", "iptunnel", "=", "resource", ".", "iptunnel", ";", "updateresource", ".", "iptunnelname", "=", "resource", ".", "iptunnelname", ";", "updateresource", ".", "srcmac", "=", "resource", ".", "srcmac", ";", "updateresource", ".", "protocol", "=", "resource", ".", "protocol", ";", "updateresource", ".", "protocolnumber", "=", "resource", ".", "protocolnumber", ";", "updateresource", ".", "vlan", "=", "resource", ".", "vlan", ";", "updateresource", ".", "Interface", "=", "resource", ".", "Interface", ";", "updateresource", ".", "priority", "=", "resource", ".", "priority", ";", "updateresource", ".", "msr", "=", "resource", ".", "msr", ";", "updateresource", ".", "monitor", "=", "resource", ".", "monitor", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update nspbr.
[ "Use", "this", "API", "to", "update", "nspbr", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java#L997-L1026
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java
nspbr.update
public static base_responses update(nitro_service client, nspbr resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nspbr updateresources[] = new nspbr[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nspbr(); updateresources[i].name = resources[i].name; updateresources[i].action = resources[i].action; updateresources[i].srcip = resources[i].srcip; updateresources[i].srcipop = resources[i].srcipop; updateresources[i].srcipval = resources[i].srcipval; updateresources[i].srcport = resources[i].srcport; updateresources[i].srcportop = resources[i].srcportop; updateresources[i].srcportval = resources[i].srcportval; updateresources[i].destip = resources[i].destip; updateresources[i].destipop = resources[i].destipop; updateresources[i].destipval = resources[i].destipval; updateresources[i].destport = resources[i].destport; updateresources[i].destportop = resources[i].destportop; updateresources[i].destportval = resources[i].destportval; updateresources[i].nexthop = resources[i].nexthop; updateresources[i].nexthopval = resources[i].nexthopval; updateresources[i].iptunnel = resources[i].iptunnel; updateresources[i].iptunnelname = resources[i].iptunnelname; updateresources[i].srcmac = resources[i].srcmac; updateresources[i].protocol = resources[i].protocol; updateresources[i].protocolnumber = resources[i].protocolnumber; updateresources[i].vlan = resources[i].vlan; updateresources[i].Interface = resources[i].Interface; updateresources[i].priority = resources[i].priority; updateresources[i].msr = resources[i].msr; updateresources[i].monitor = resources[i].monitor; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, nspbr resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nspbr updateresources[] = new nspbr[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nspbr(); updateresources[i].name = resources[i].name; updateresources[i].action = resources[i].action; updateresources[i].srcip = resources[i].srcip; updateresources[i].srcipop = resources[i].srcipop; updateresources[i].srcipval = resources[i].srcipval; updateresources[i].srcport = resources[i].srcport; updateresources[i].srcportop = resources[i].srcportop; updateresources[i].srcportval = resources[i].srcportval; updateresources[i].destip = resources[i].destip; updateresources[i].destipop = resources[i].destipop; updateresources[i].destipval = resources[i].destipval; updateresources[i].destport = resources[i].destport; updateresources[i].destportop = resources[i].destportop; updateresources[i].destportval = resources[i].destportval; updateresources[i].nexthop = resources[i].nexthop; updateresources[i].nexthopval = resources[i].nexthopval; updateresources[i].iptunnel = resources[i].iptunnel; updateresources[i].iptunnelname = resources[i].iptunnelname; updateresources[i].srcmac = resources[i].srcmac; updateresources[i].protocol = resources[i].protocol; updateresources[i].protocolnumber = resources[i].protocolnumber; updateresources[i].vlan = resources[i].vlan; updateresources[i].Interface = resources[i].Interface; updateresources[i].priority = resources[i].priority; updateresources[i].msr = resources[i].msr; updateresources[i].monitor = resources[i].monitor; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "nspbr", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nspbr", "updateresources", "[", "]", "=", "new", "nspbr", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "nspbr", "(", ")", ";", "updateresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "updateresources", "[", "i", "]", ".", "action", "=", "resources", "[", "i", "]", ".", "action", ";", "updateresources", "[", "i", "]", ".", "srcip", "=", "resources", "[", "i", "]", ".", "srcip", ";", "updateresources", "[", "i", "]", ".", "srcipop", "=", "resources", "[", "i", "]", ".", "srcipop", ";", "updateresources", "[", "i", "]", ".", "srcipval", "=", "resources", "[", "i", "]", ".", "srcipval", ";", "updateresources", "[", "i", "]", ".", "srcport", "=", "resources", "[", "i", "]", ".", "srcport", ";", "updateresources", "[", "i", "]", ".", "srcportop", "=", "resources", "[", "i", "]", ".", "srcportop", ";", "updateresources", "[", "i", "]", ".", "srcportval", "=", "resources", "[", "i", "]", ".", "srcportval", ";", "updateresources", "[", "i", "]", ".", "destip", "=", "resources", "[", "i", "]", ".", "destip", ";", "updateresources", "[", "i", "]", ".", "destipop", "=", "resources", "[", "i", "]", ".", "destipop", ";", "updateresources", "[", "i", "]", ".", "destipval", "=", "resources", "[", "i", "]", ".", "destipval", ";", "updateresources", "[", "i", "]", ".", "destport", "=", "resources", "[", "i", "]", ".", "destport", ";", "updateresources", "[", "i", "]", ".", "destportop", "=", "resources", "[", "i", "]", ".", "destportop", ";", "updateresources", "[", "i", "]", ".", "destportval", "=", "resources", "[", "i", "]", ".", "destportval", ";", "updateresources", "[", "i", "]", ".", "nexthop", "=", "resources", "[", "i", "]", ".", "nexthop", ";", "updateresources", "[", "i", "]", ".", "nexthopval", "=", "resources", "[", "i", "]", ".", "nexthopval", ";", "updateresources", "[", "i", "]", ".", "iptunnel", "=", "resources", "[", "i", "]", ".", "iptunnel", ";", "updateresources", "[", "i", "]", ".", "iptunnelname", "=", "resources", "[", "i", "]", ".", "iptunnelname", ";", "updateresources", "[", "i", "]", ".", "srcmac", "=", "resources", "[", "i", "]", ".", "srcmac", ";", "updateresources", "[", "i", "]", ".", "protocol", "=", "resources", "[", "i", "]", ".", "protocol", ";", "updateresources", "[", "i", "]", ".", "protocolnumber", "=", "resources", "[", "i", "]", ".", "protocolnumber", ";", "updateresources", "[", "i", "]", ".", "vlan", "=", "resources", "[", "i", "]", ".", "vlan", ";", "updateresources", "[", "i", "]", ".", "Interface", "=", "resources", "[", "i", "]", ".", "Interface", ";", "updateresources", "[", "i", "]", ".", "priority", "=", "resources", "[", "i", "]", ".", "priority", ";", "updateresources", "[", "i", "]", ".", "msr", "=", "resources", "[", "i", "]", ".", "msr", ";", "updateresources", "[", "i", "]", ".", "monitor", "=", "resources", "[", "i", "]", ".", "monitor", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update nspbr resources.
[ "Use", "this", "API", "to", "update", "nspbr", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java#L1031-L1067
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java
nspbr.enable
public static base_response enable(nitro_service client, nspbr resource) throws Exception { nspbr enableresource = new nspbr(); enableresource.name = resource.name; return enableresource.perform_operation(client,"enable"); }
java
public static base_response enable(nitro_service client, nspbr resource) throws Exception { nspbr enableresource = new nspbr(); enableresource.name = resource.name; return enableresource.perform_operation(client,"enable"); }
[ "public", "static", "base_response", "enable", "(", "nitro_service", "client", ",", "nspbr", "resource", ")", "throws", "Exception", "{", "nspbr", "enableresource", "=", "new", "nspbr", "(", ")", ";", "enableresource", ".", "name", "=", "resource", ".", "name", ";", "return", "enableresource", ".", "perform_operation", "(", "client", ",", "\"enable\"", ")", ";", "}" ]
Use this API to enable nspbr.
[ "Use", "this", "API", "to", "enable", "nspbr", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java#L1125-L1129
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java
nspbr.enable
public static base_responses enable(nitro_service client, nspbr resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nspbr enableresources[] = new nspbr[resources.length]; for (int i=0;i<resources.length;i++){ enableresources[i] = new nspbr(); enableresources[i].name = resources[i].name; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
java
public static base_responses enable(nitro_service client, nspbr resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nspbr enableresources[] = new nspbr[resources.length]; for (int i=0;i<resources.length;i++){ enableresources[i] = new nspbr(); enableresources[i].name = resources[i].name; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
[ "public", "static", "base_responses", "enable", "(", "nitro_service", "client", ",", "nspbr", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nspbr", "enableresources", "[", "]", "=", "new", "nspbr", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "enableresources", "[", "i", "]", "=", "new", "nspbr", "(", ")", ";", "enableresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "enableresources", ",", "\"enable\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to enable nspbr resources.
[ "Use", "this", "API", "to", "enable", "nspbr", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java#L1150-L1161
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java
nspbr.get
public static nspbr[] get(nitro_service service) throws Exception{ nspbr obj = new nspbr(); nspbr[] response = (nspbr[])obj.get_resources(service); return response; }
java
public static nspbr[] get(nitro_service service) throws Exception{ nspbr obj = new nspbr(); nspbr[] response = (nspbr[])obj.get_resources(service); return response; }
[ "public", "static", "nspbr", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "nspbr", "obj", "=", "new", "nspbr", "(", ")", ";", "nspbr", "[", "]", "response", "=", "(", "nspbr", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the nspbr resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nspbr", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java#L1216-L1220
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java
nspbr.get
public static nspbr[] get(nitro_service service, nspbr_args args) throws Exception{ nspbr obj = new nspbr(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); nspbr[] response = (nspbr[])obj.get_resources(service, option); return response; }
java
public static nspbr[] get(nitro_service service, nspbr_args args) throws Exception{ nspbr obj = new nspbr(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); nspbr[] response = (nspbr[])obj.get_resources(service, option); return response; }
[ "public", "static", "nspbr", "[", "]", "get", "(", "nitro_service", "service", ",", "nspbr_args", "args", ")", "throws", "Exception", "{", "nspbr", "obj", "=", "new", "nspbr", "(", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_args", "(", "nitro_util", ".", "object_to_string_withoutquotes", "(", "args", ")", ")", ";", "nspbr", "[", "]", "response", "=", "(", "nspbr", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the nspbr resources that are configured on netscaler. This uses nspbr_args which is a way to provide additional arguments while fetching the resources.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nspbr", "resources", "that", "are", "configured", "on", "netscaler", ".", "This", "uses", "nspbr_args", "which", "is", "a", "way", "to", "provide", "additional", "arguments", "while", "fetching", "the", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java#L1233-L1239
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java
nspbr.get
public static nspbr get(nitro_service service, String name) throws Exception{ nspbr obj = new nspbr(); obj.set_name(name); nspbr response = (nspbr) obj.get_resource(service); return response; }
java
public static nspbr get(nitro_service service, String name) throws Exception{ nspbr obj = new nspbr(); obj.set_name(name); nspbr response = (nspbr) obj.get_resource(service); return response; }
[ "public", "static", "nspbr", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "nspbr", "obj", "=", "new", "nspbr", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "nspbr", "response", "=", "(", "nspbr", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch nspbr resource of given name .
[ "Use", "this", "API", "to", "fetch", "nspbr", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nspbr.java#L1244-L1249
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_vpnintranetapplication_binding.java
vpnglobal_vpnintranetapplication_binding.get
public static vpnglobal_vpnintranetapplication_binding[] get(nitro_service service) throws Exception{ vpnglobal_vpnintranetapplication_binding obj = new vpnglobal_vpnintranetapplication_binding(); vpnglobal_vpnintranetapplication_binding response[] = (vpnglobal_vpnintranetapplication_binding[]) obj.get_resources(service); return response; }
java
public static vpnglobal_vpnintranetapplication_binding[] get(nitro_service service) throws Exception{ vpnglobal_vpnintranetapplication_binding obj = new vpnglobal_vpnintranetapplication_binding(); vpnglobal_vpnintranetapplication_binding response[] = (vpnglobal_vpnintranetapplication_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "vpnglobal_vpnintranetapplication_binding", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "vpnglobal_vpnintranetapplication_binding", "obj", "=", "new", "vpnglobal_vpnintranetapplication_binding", "(", ")", ";", "vpnglobal_vpnintranetapplication_binding", "response", "[", "]", "=", "(", "vpnglobal_vpnintranetapplication_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch a vpnglobal_vpnintranetapplication_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "vpnglobal_vpnintranetapplication_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_vpnintranetapplication_binding.java#L131-L135
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaauser_authorizationpolicy_binding.java
aaauser_authorizationpolicy_binding.get
public static aaauser_authorizationpolicy_binding[] get(nitro_service service, String username) throws Exception{ aaauser_authorizationpolicy_binding obj = new aaauser_authorizationpolicy_binding(); obj.set_username(username); aaauser_authorizationpolicy_binding response[] = (aaauser_authorizationpolicy_binding[]) obj.get_resources(service); return response; }
java
public static aaauser_authorizationpolicy_binding[] get(nitro_service service, String username) throws Exception{ aaauser_authorizationpolicy_binding obj = new aaauser_authorizationpolicy_binding(); obj.set_username(username); aaauser_authorizationpolicy_binding response[] = (aaauser_authorizationpolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "aaauser_authorizationpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "username", ")", "throws", "Exception", "{", "aaauser_authorizationpolicy_binding", "obj", "=", "new", "aaauser_authorizationpolicy_binding", "(", ")", ";", "obj", ".", "set_username", "(", "username", ")", ";", "aaauser_authorizationpolicy_binding", "response", "[", "]", "=", "(", "aaauser_authorizationpolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch aaauser_authorizationpolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "aaauser_authorizationpolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaauser_authorizationpolicy_binding.java#L240-L245
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java
rnat.clear
public static base_response clear(nitro_service client, rnat resource) throws Exception { rnat clearresource = new rnat(); clearresource.network = resource.network; clearresource.netmask = resource.netmask; clearresource.aclname = resource.aclname; clearresource.redirectport = resource.redirectport; clearresource.natip = resource.natip; clearresource.td = resource.td; return clearresource.perform_operation(client,"clear"); }
java
public static base_response clear(nitro_service client, rnat resource) throws Exception { rnat clearresource = new rnat(); clearresource.network = resource.network; clearresource.netmask = resource.netmask; clearresource.aclname = resource.aclname; clearresource.redirectport = resource.redirectport; clearresource.natip = resource.natip; clearresource.td = resource.td; return clearresource.perform_operation(client,"clear"); }
[ "public", "static", "base_response", "clear", "(", "nitro_service", "client", ",", "rnat", "resource", ")", "throws", "Exception", "{", "rnat", "clearresource", "=", "new", "rnat", "(", ")", ";", "clearresource", ".", "network", "=", "resource", ".", "network", ";", "clearresource", ".", "netmask", "=", "resource", ".", "netmask", ";", "clearresource", ".", "aclname", "=", "resource", ".", "aclname", ";", "clearresource", ".", "redirectport", "=", "resource", ".", "redirectport", ";", "clearresource", ".", "natip", "=", "resource", ".", "natip", ";", "clearresource", ".", "td", "=", "resource", ".", "td", ";", "return", "clearresource", ".", "perform_operation", "(", "client", ",", "\"clear\"", ")", ";", "}" ]
Use this API to clear rnat.
[ "Use", "this", "API", "to", "clear", "rnat", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java#L225-L234
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java
rnat.clear
public static base_responses clear(nitro_service client, rnat resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { rnat clearresources[] = new rnat[resources.length]; for (int i=0;i<resources.length;i++){ clearresources[i] = new rnat(); clearresources[i].network = resources[i].network; clearresources[i].netmask = resources[i].netmask; clearresources[i].aclname = resources[i].aclname; clearresources[i].redirectport = resources[i].redirectport; clearresources[i].natip = resources[i].natip; clearresources[i].td = resources[i].td; } result = perform_operation_bulk_request(client, clearresources,"clear"); } return result; }
java
public static base_responses clear(nitro_service client, rnat resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { rnat clearresources[] = new rnat[resources.length]; for (int i=0;i<resources.length;i++){ clearresources[i] = new rnat(); clearresources[i].network = resources[i].network; clearresources[i].netmask = resources[i].netmask; clearresources[i].aclname = resources[i].aclname; clearresources[i].redirectport = resources[i].redirectport; clearresources[i].natip = resources[i].natip; clearresources[i].td = resources[i].td; } result = perform_operation_bulk_request(client, clearresources,"clear"); } return result; }
[ "public", "static", "base_responses", "clear", "(", "nitro_service", "client", ",", "rnat", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "rnat", "clearresources", "[", "]", "=", "new", "rnat", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "clearresources", "[", "i", "]", "=", "new", "rnat", "(", ")", ";", "clearresources", "[", "i", "]", ".", "network", "=", "resources", "[", "i", "]", ".", "network", ";", "clearresources", "[", "i", "]", ".", "netmask", "=", "resources", "[", "i", "]", ".", "netmask", ";", "clearresources", "[", "i", "]", ".", "aclname", "=", "resources", "[", "i", "]", ".", "aclname", ";", "clearresources", "[", "i", "]", ".", "redirectport", "=", "resources", "[", "i", "]", ".", "redirectport", ";", "clearresources", "[", "i", "]", ".", "natip", "=", "resources", "[", "i", "]", ".", "natip", ";", "clearresources", "[", "i", "]", ".", "td", "=", "resources", "[", "i", "]", ".", "td", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "clearresources", ",", "\"clear\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to clear rnat resources.
[ "Use", "this", "API", "to", "clear", "rnat", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java#L239-L255
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java
rnat.update
public static base_response update(nitro_service client, rnat resource) throws Exception { rnat updateresource = new rnat(); updateresource.network = resource.network; updateresource.netmask = resource.netmask; updateresource.natip = resource.natip; updateresource.td = resource.td; updateresource.aclname = resource.aclname; updateresource.redirectport = resource.redirectport; updateresource.natip2 = resource.natip2; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, rnat resource) throws Exception { rnat updateresource = new rnat(); updateresource.network = resource.network; updateresource.netmask = resource.netmask; updateresource.natip = resource.natip; updateresource.td = resource.td; updateresource.aclname = resource.aclname; updateresource.redirectport = resource.redirectport; updateresource.natip2 = resource.natip2; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "rnat", "resource", ")", "throws", "Exception", "{", "rnat", "updateresource", "=", "new", "rnat", "(", ")", ";", "updateresource", ".", "network", "=", "resource", ".", "network", ";", "updateresource", ".", "netmask", "=", "resource", ".", "netmask", ";", "updateresource", ".", "natip", "=", "resource", ".", "natip", ";", "updateresource", ".", "td", "=", "resource", ".", "td", ";", "updateresource", ".", "aclname", "=", "resource", ".", "aclname", ";", "updateresource", ".", "redirectport", "=", "resource", ".", "redirectport", ";", "updateresource", ".", "natip2", "=", "resource", ".", "natip2", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update rnat.
[ "Use", "this", "API", "to", "update", "rnat", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java#L260-L270
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java
rnat.update
public static base_responses update(nitro_service client, rnat resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { rnat updateresources[] = new rnat[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new rnat(); updateresources[i].network = resources[i].network; updateresources[i].netmask = resources[i].netmask; updateresources[i].natip = resources[i].natip; updateresources[i].td = resources[i].td; updateresources[i].aclname = resources[i].aclname; updateresources[i].redirectport = resources[i].redirectport; updateresources[i].natip2 = resources[i].natip2; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, rnat resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { rnat updateresources[] = new rnat[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new rnat(); updateresources[i].network = resources[i].network; updateresources[i].netmask = resources[i].netmask; updateresources[i].natip = resources[i].natip; updateresources[i].td = resources[i].td; updateresources[i].aclname = resources[i].aclname; updateresources[i].redirectport = resources[i].redirectport; updateresources[i].natip2 = resources[i].natip2; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "rnat", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "rnat", "updateresources", "[", "]", "=", "new", "rnat", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "rnat", "(", ")", ";", "updateresources", "[", "i", "]", ".", "network", "=", "resources", "[", "i", "]", ".", "network", ";", "updateresources", "[", "i", "]", ".", "netmask", "=", "resources", "[", "i", "]", ".", "netmask", ";", "updateresources", "[", "i", "]", ".", "natip", "=", "resources", "[", "i", "]", ".", "natip", ";", "updateresources", "[", "i", "]", ".", "td", "=", "resources", "[", "i", "]", ".", "td", ";", "updateresources", "[", "i", "]", ".", "aclname", "=", "resources", "[", "i", "]", ".", "aclname", ";", "updateresources", "[", "i", "]", ".", "redirectport", "=", "resources", "[", "i", "]", ".", "redirectport", ";", "updateresources", "[", "i", "]", ".", "natip2", "=", "resources", "[", "i", "]", ".", "natip2", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update rnat resources.
[ "Use", "this", "API", "to", "update", "rnat", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java#L275-L292
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java
rnat.unset
public static base_response unset(nitro_service client, rnat resource, String[] args) throws Exception{ rnat unsetresource = new rnat(); unsetresource.network = resource.network; unsetresource.netmask = resource.netmask; unsetresource.td = resource.td; unsetresource.aclname = resource.aclname; unsetresource.redirectport = resource.redirectport; unsetresource.natip = resource.natip; return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, rnat resource, String[] args) throws Exception{ rnat unsetresource = new rnat(); unsetresource.network = resource.network; unsetresource.netmask = resource.netmask; unsetresource.td = resource.td; unsetresource.aclname = resource.aclname; unsetresource.redirectport = resource.redirectport; unsetresource.natip = resource.natip; return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "rnat", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "rnat", "unsetresource", "=", "new", "rnat", "(", ")", ";", "unsetresource", ".", "network", "=", "resource", ".", "network", ";", "unsetresource", ".", "netmask", "=", "resource", ".", "netmask", ";", "unsetresource", ".", "td", "=", "resource", ".", "td", ";", "unsetresource", ".", "aclname", "=", "resource", ".", "aclname", ";", "unsetresource", ".", "redirectport", "=", "resource", ".", "redirectport", ";", "unsetresource", ".", "natip", "=", "resource", ".", "natip", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of rnat resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "rnat", "resource", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java#L298-L307
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java
rnat.unset
public static base_responses unset(nitro_service client, rnat resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { rnat unsetresources[] = new rnat[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new rnat(); unsetresources[i].network = resources[i].network; unsetresources[i].netmask = resources[i].netmask; unsetresources[i].td = resources[i].td; unsetresources[i].aclname = resources[i].aclname; unsetresources[i].redirectport = resources[i].redirectport; unsetresources[i].natip = resources[i].natip; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
public static base_responses unset(nitro_service client, rnat resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { rnat unsetresources[] = new rnat[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new rnat(); unsetresources[i].network = resources[i].network; unsetresources[i].netmask = resources[i].netmask; unsetresources[i].td = resources[i].td; unsetresources[i].aclname = resources[i].aclname; unsetresources[i].redirectport = resources[i].redirectport; unsetresources[i].natip = resources[i].natip; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "public", "static", "base_responses", "unset", "(", "nitro_service", "client", ",", "rnat", "resources", "[", "]", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "rnat", "unsetresources", "[", "]", "=", "new", "rnat", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "unsetresources", "[", "i", "]", "=", "new", "rnat", "(", ")", ";", "unsetresources", "[", "i", "]", ".", "network", "=", "resources", "[", "i", "]", ".", "network", ";", "unsetresources", "[", "i", "]", ".", "netmask", "=", "resources", "[", "i", "]", ".", "netmask", ";", "unsetresources", "[", "i", "]", ".", "td", "=", "resources", "[", "i", "]", ".", "td", ";", "unsetresources", "[", "i", "]", ".", "aclname", "=", "resources", "[", "i", "]", ".", "aclname", ";", "unsetresources", "[", "i", "]", ".", "redirectport", "=", "resources", "[", "i", "]", ".", "redirectport", ";", "unsetresources", "[", "i", "]", ".", "natip", "=", "resources", "[", "i", "]", ".", "natip", ";", "}", "result", "=", "unset_bulk_request", "(", "client", ",", "unsetresources", ",", "args", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to unset the properties of rnat resources. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "rnat", "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/network/rnat.java#L313-L329
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java
rnat.get
public static rnat[] get(nitro_service service, options option) throws Exception{ rnat obj = new rnat(); rnat[] response = (rnat[])obj.get_resources(service,option); return response; }
java
public static rnat[] get(nitro_service service, options option) throws Exception{ rnat obj = new rnat(); rnat[] response = (rnat[])obj.get_resources(service,option); return response; }
[ "public", "static", "rnat", "[", "]", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "rnat", "obj", "=", "new", "rnat", "(", ")", ";", "rnat", "[", "]", "response", "=", "(", "rnat", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the rnat resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "rnat", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnat.java#L342-L346
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authorization/authorizationpolicy_binding.java
authorizationpolicy_binding.get
public static authorizationpolicy_binding get(nitro_service service, String name) throws Exception{ authorizationpolicy_binding obj = new authorizationpolicy_binding(); obj.set_name(name); authorizationpolicy_binding response = (authorizationpolicy_binding) obj.get_resource(service); return response; }
java
public static authorizationpolicy_binding get(nitro_service service, String name) throws Exception{ authorizationpolicy_binding obj = new authorizationpolicy_binding(); obj.set_name(name); authorizationpolicy_binding response = (authorizationpolicy_binding) obj.get_resource(service); return response; }
[ "public", "static", "authorizationpolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authorizationpolicy_binding", "obj", "=", "new", "authorizationpolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "authorizationpolicy_binding", "response", "=", "(", "authorizationpolicy_binding", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch authorizationpolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "authorizationpolicy_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authorization/authorizationpolicy_binding.java#L147-L152
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cachepolicy_cachepolicylabel_binding.java
cachepolicy_cachepolicylabel_binding.get
public static cachepolicy_cachepolicylabel_binding[] get(nitro_service service, String policyname) throws Exception{ cachepolicy_cachepolicylabel_binding obj = new cachepolicy_cachepolicylabel_binding(); obj.set_policyname(policyname); cachepolicy_cachepolicylabel_binding response[] = (cachepolicy_cachepolicylabel_binding[]) obj.get_resources(service); return response; }
java
public static cachepolicy_cachepolicylabel_binding[] get(nitro_service service, String policyname) throws Exception{ cachepolicy_cachepolicylabel_binding obj = new cachepolicy_cachepolicylabel_binding(); obj.set_policyname(policyname); cachepolicy_cachepolicylabel_binding response[] = (cachepolicy_cachepolicylabel_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "cachepolicy_cachepolicylabel_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "policyname", ")", "throws", "Exception", "{", "cachepolicy_cachepolicylabel_binding", "obj", "=", "new", "cachepolicy_cachepolicylabel_binding", "(", ")", ";", "obj", ".", "set_policyname", "(", "policyname", ")", ";", "cachepolicy_cachepolicylabel_binding", "response", "[", "]", "=", "(", "cachepolicy_cachepolicylabel_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch cachepolicy_cachepolicylabel_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "cachepolicy_cachepolicylabel_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cachepolicy_cachepolicylabel_binding.java#L162-L167
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationtacacspolicy_vpnvserver_binding.java
authenticationtacacspolicy_vpnvserver_binding.get
public static authenticationtacacspolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationtacacspolicy_vpnvserver_binding obj = new authenticationtacacspolicy_vpnvserver_binding(); obj.set_name(name); authenticationtacacspolicy_vpnvserver_binding response[] = (authenticationtacacspolicy_vpnvserver_binding[]) obj.get_resources(service); return response; }
java
public static authenticationtacacspolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationtacacspolicy_vpnvserver_binding obj = new authenticationtacacspolicy_vpnvserver_binding(); obj.set_name(name); authenticationtacacspolicy_vpnvserver_binding response[] = (authenticationtacacspolicy_vpnvserver_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "authenticationtacacspolicy_vpnvserver_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authenticationtacacspolicy_vpnvserver_binding", "obj", "=", "new", "authenticationtacacspolicy_vpnvserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "authenticationtacacspolicy_vpnvserver_binding", "response", "[", "]", "=", "(", "authenticationtacacspolicy_vpnvserver_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch authenticationtacacspolicy_vpnvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "authenticationtacacspolicy_vpnvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationtacacspolicy_vpnvserver_binding.java#L132-L137
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite_binding.java
gslbsite_binding.get
public static gslbsite_binding get(nitro_service service, String sitename) throws Exception{ gslbsite_binding obj = new gslbsite_binding(); obj.set_sitename(sitename); gslbsite_binding response = (gslbsite_binding) obj.get_resource(service); return response; }
java
public static gslbsite_binding get(nitro_service service, String sitename) throws Exception{ gslbsite_binding obj = new gslbsite_binding(); obj.set_sitename(sitename); gslbsite_binding response = (gslbsite_binding) obj.get_resource(service); return response; }
[ "public", "static", "gslbsite_binding", "get", "(", "nitro_service", "service", ",", "String", "sitename", ")", "throws", "Exception", "{", "gslbsite_binding", "obj", "=", "new", "gslbsite_binding", "(", ")", ";", "obj", ".", "set_sitename", "(", "sitename", ")", ";", "gslbsite_binding", "response", "=", "(", "gslbsite_binding", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch gslbsite_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "gslbsite_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite_binding.java#L103-L108
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/wi/wipackage.java
wipackage.Install
public static base_response Install(nitro_service client, wipackage resource) throws Exception { wipackage Installresource = new wipackage(); Installresource.jre = resource.jre; Installresource.wi = resource.wi; Installresource.maxsites = resource.maxsites; return Installresource.perform_operation(client); }
java
public static base_response Install(nitro_service client, wipackage resource) throws Exception { wipackage Installresource = new wipackage(); Installresource.jre = resource.jre; Installresource.wi = resource.wi; Installresource.maxsites = resource.maxsites; return Installresource.perform_operation(client); }
[ "public", "static", "base_response", "Install", "(", "nitro_service", "client", ",", "wipackage", "resource", ")", "throws", "Exception", "{", "wipackage", "Installresource", "=", "new", "wipackage", "(", ")", ";", "Installresource", ".", "jre", "=", "resource", ".", "jre", ";", "Installresource", ".", "wi", "=", "resource", ".", "wi", ";", "Installresource", ".", "maxsites", "=", "resource", ".", "maxsites", ";", "return", "Installresource", ".", "perform_operation", "(", "client", ")", ";", "}" ]
Use this API to Install wipackage.
[ "Use", "this", "API", "to", "Install", "wipackage", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/wi/wipackage.java#L136-L142
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/vrid6_interface_binding.java
vrid6_interface_binding.get
public static vrid6_interface_binding[] get(nitro_service service, Long id) throws Exception{ vrid6_interface_binding obj = new vrid6_interface_binding(); obj.set_id(id); vrid6_interface_binding response[] = (vrid6_interface_binding[]) obj.get_resources(service); return response; }
java
public static vrid6_interface_binding[] get(nitro_service service, Long id) throws Exception{ vrid6_interface_binding obj = new vrid6_interface_binding(); obj.set_id(id); vrid6_interface_binding response[] = (vrid6_interface_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "vrid6_interface_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "Long", "id", ")", "throws", "Exception", "{", "vrid6_interface_binding", "obj", "=", "new", "vrid6_interface_binding", "(", ")", ";", "obj", ".", "set_id", "(", "id", ")", ";", "vrid6_interface_binding", "response", "[", "]", "=", "(", "vrid6_interface_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch vrid6_interface_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "vrid6_interface_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/vrid6_interface_binding.java#L186-L191
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicy64.java
dnspolicy64.get
public static dnspolicy64[] get(nitro_service service) throws Exception{ dnspolicy64 obj = new dnspolicy64(); dnspolicy64[] response = (dnspolicy64[])obj.get_resources(service); return response; }
java
public static dnspolicy64[] get(nitro_service service) throws Exception{ dnspolicy64 obj = new dnspolicy64(); dnspolicy64[] response = (dnspolicy64[])obj.get_resources(service); return response; }
[ "public", "static", "dnspolicy64", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "dnspolicy64", "obj", "=", "new", "dnspolicy64", "(", ")", ";", "dnspolicy64", "[", "]", "response", "=", "(", "dnspolicy64", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the dnspolicy64 resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "dnspolicy64", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicy64.java#L308-L312
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicy64.java
dnspolicy64.get
public static dnspolicy64 get(nitro_service service, String name) throws Exception{ dnspolicy64 obj = new dnspolicy64(); obj.set_name(name); dnspolicy64 response = (dnspolicy64) obj.get_resource(service); return response; }
java
public static dnspolicy64 get(nitro_service service, String name) throws Exception{ dnspolicy64 obj = new dnspolicy64(); obj.set_name(name); dnspolicy64 response = (dnspolicy64) obj.get_resource(service); return response; }
[ "public", "static", "dnspolicy64", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "dnspolicy64", "obj", "=", "new", "dnspolicy64", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "dnspolicy64", "response", "=", "(", "dnspolicy64", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch dnspolicy64 resource of given name .
[ "Use", "this", "API", "to", "fetch", "dnspolicy64", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicy64.java#L324-L329
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicy64.java
dnspolicy64.get_filtered
public static dnspolicy64[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ dnspolicy64 obj = new dnspolicy64(); options option = new options(); option.set_filter(filter); dnspolicy64[] response = (dnspolicy64[]) obj.getfiltered(service, option); return response; }
java
public static dnspolicy64[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ dnspolicy64 obj = new dnspolicy64(); options option = new options(); option.set_filter(filter); dnspolicy64[] response = (dnspolicy64[]) obj.getfiltered(service, option); return response; }
[ "public", "static", "dnspolicy64", "[", "]", "get_filtered", "(", "nitro_service", "service", ",", "filtervalue", "[", "]", "filter", ")", "throws", "Exception", "{", "dnspolicy64", "obj", "=", "new", "dnspolicy64", "(", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_filter", "(", "filter", ")", ";", "dnspolicy64", "[", "]", "response", "=", "(", "dnspolicy64", "[", "]", ")", "obj", ".", "getfiltered", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch filtered set of dnspolicy64 resources. set the filter parameter values in filtervalue object.
[ "Use", "this", "API", "to", "fetch", "filtered", "set", "of", "dnspolicy64", "resources", ".", "set", "the", "filter", "parameter", "values", "in", "filtervalue", "object", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicy64.java#L363-L369
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_intranetip_binding.java
vpnvserver_intranetip_binding.get
public static vpnvserver_intranetip_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_intranetip_binding obj = new vpnvserver_intranetip_binding(); obj.set_name(name); vpnvserver_intranetip_binding response[] = (vpnvserver_intranetip_binding[]) obj.get_resources(service); return response; }
java
public static vpnvserver_intranetip_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_intranetip_binding obj = new vpnvserver_intranetip_binding(); obj.set_name(name); vpnvserver_intranetip_binding response[] = (vpnvserver_intranetip_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "vpnvserver_intranetip_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "vpnvserver_intranetip_binding", "obj", "=", "new", "vpnvserver_intranetip_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "vpnvserver_intranetip_binding", "response", "[", "]", "=", "(", "vpnvserver_intranetip_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch vpnvserver_intranetip_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "vpnvserver_intranetip_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_intranetip_binding.java#L198-L203
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_authenticationcertpolicy_binding.java
vpnglobal_authenticationcertpolicy_binding.get
public static vpnglobal_authenticationcertpolicy_binding[] get(nitro_service service) throws Exception{ vpnglobal_authenticationcertpolicy_binding obj = new vpnglobal_authenticationcertpolicy_binding(); vpnglobal_authenticationcertpolicy_binding response[] = (vpnglobal_authenticationcertpolicy_binding[]) obj.get_resources(service); return response; }
java
public static vpnglobal_authenticationcertpolicy_binding[] get(nitro_service service) throws Exception{ vpnglobal_authenticationcertpolicy_binding obj = new vpnglobal_authenticationcertpolicy_binding(); vpnglobal_authenticationcertpolicy_binding response[] = (vpnglobal_authenticationcertpolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "vpnglobal_authenticationcertpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "vpnglobal_authenticationcertpolicy_binding", "obj", "=", "new", "vpnglobal_authenticationcertpolicy_binding", "(", ")", ";", "vpnglobal_authenticationcertpolicy_binding", "response", "[", "]", "=", "(", "vpnglobal_authenticationcertpolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch a vpnglobal_authenticationcertpolicy_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "vpnglobal_authenticationcertpolicy_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_authenticationcertpolicy_binding.java#L225-L229
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/netbridge_binding.java
netbridge_binding.get
public static netbridge_binding get(nitro_service service, String name) throws Exception{ netbridge_binding obj = new netbridge_binding(); obj.set_name(name); netbridge_binding response = (netbridge_binding) obj.get_resource(service); return response; }
java
public static netbridge_binding get(nitro_service service, String name) throws Exception{ netbridge_binding obj = new netbridge_binding(); obj.set_name(name); netbridge_binding response = (netbridge_binding) obj.get_resource(service); return response; }
[ "public", "static", "netbridge_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "netbridge_binding", "obj", "=", "new", "netbridge_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "netbridge_binding", "response", "=", "(", "netbridge_binding", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch netbridge_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "netbridge_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/netbridge_binding.java#L136-L141
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/appqoe/appqoepolicy_stats.java
appqoepolicy_stats.get
public static appqoepolicy_stats[] get(nitro_service service) throws Exception{ appqoepolicy_stats obj = new appqoepolicy_stats(); appqoepolicy_stats[] response = (appqoepolicy_stats[])obj.stat_resources(service); return response; }
java
public static appqoepolicy_stats[] get(nitro_service service) throws Exception{ appqoepolicy_stats obj = new appqoepolicy_stats(); appqoepolicy_stats[] response = (appqoepolicy_stats[])obj.stat_resources(service); return response; }
[ "public", "static", "appqoepolicy_stats", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "appqoepolicy_stats", "obj", "=", "new", "appqoepolicy_stats", "(", ")", ";", "appqoepolicy_stats", "[", "]", "response", "=", "(", "appqoepolicy_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch the statistics of all appqoepolicy_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "appqoepolicy_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/appqoe/appqoepolicy_stats.java#L371-L375
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/appqoe/appqoepolicy_stats.java
appqoepolicy_stats.get
public static appqoepolicy_stats get(nitro_service service, String name) throws Exception{ appqoepolicy_stats obj = new appqoepolicy_stats(); obj.set_name(name); appqoepolicy_stats response = (appqoepolicy_stats) obj.stat_resource(service); return response; }
java
public static appqoepolicy_stats get(nitro_service service, String name) throws Exception{ appqoepolicy_stats obj = new appqoepolicy_stats(); obj.set_name(name); appqoepolicy_stats response = (appqoepolicy_stats) obj.stat_resource(service); return response; }
[ "public", "static", "appqoepolicy_stats", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "appqoepolicy_stats", "obj", "=", "new", "appqoepolicy_stats", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "appqoepolicy_stats", "response", "=", "(", "appqoepolicy_stats", ")", "obj", ".", "stat_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch statistics of appqoepolicy_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "appqoepolicy_stats", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/appqoe/appqoepolicy_stats.java#L389-L394
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/nstrace.java
nstrace.get
public static nstrace get(nitro_service service) throws Exception{ nstrace obj = new nstrace(); nstrace[] response = (nstrace[])obj.get_resources(service); return response[0]; }
java
public static nstrace get(nitro_service service) throws Exception{ nstrace obj = new nstrace(); nstrace[] response = (nstrace[])obj.get_resources(service); return response[0]; }
[ "public", "static", "nstrace", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "nstrace", "obj", "=", "new", "nstrace", "(", ")", ";", "nstrace", "[", "]", "response", "=", "(", "nstrace", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the nstrace resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nstrace", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/nstrace.java#L640-L644
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsdhcpip.java
nsdhcpip.release
public static base_response release(nitro_service client) throws Exception { nsdhcpip releaseresource = new nsdhcpip(); return releaseresource.perform_operation(client,"release"); }
java
public static base_response release(nitro_service client) throws Exception { nsdhcpip releaseresource = new nsdhcpip(); return releaseresource.perform_operation(client,"release"); }
[ "public", "static", "base_response", "release", "(", "nitro_service", "client", ")", "throws", "Exception", "{", "nsdhcpip", "releaseresource", "=", "new", "nsdhcpip", "(", ")", ";", "return", "releaseresource", ".", "perform_operation", "(", "client", ",", "\"release\"", ")", ";", "}" ]
Use this API to release nsdhcpip.
[ "Use", "this", "API", "to", "release", "nsdhcpip", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsdhcpip.java#L75-L78
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/cache/cachepolicy_stats.java
cachepolicy_stats.get
public static cachepolicy_stats[] get(nitro_service service) throws Exception{ cachepolicy_stats obj = new cachepolicy_stats(); cachepolicy_stats[] response = (cachepolicy_stats[])obj.stat_resources(service); return response; }
java
public static cachepolicy_stats[] get(nitro_service service) throws Exception{ cachepolicy_stats obj = new cachepolicy_stats(); cachepolicy_stats[] response = (cachepolicy_stats[])obj.stat_resources(service); return response; }
[ "public", "static", "cachepolicy_stats", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "cachepolicy_stats", "obj", "=", "new", "cachepolicy_stats", "(", ")", ";", "cachepolicy_stats", "[", "]", "response", "=", "(", "cachepolicy_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch the statistics of all cachepolicy_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "cachepolicy_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/cache/cachepolicy_stats.java#L151-L155
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/cache/cachepolicy_stats.java
cachepolicy_stats.get
public static cachepolicy_stats get(nitro_service service, String policyname) throws Exception{ cachepolicy_stats obj = new cachepolicy_stats(); obj.set_policyname(policyname); cachepolicy_stats response = (cachepolicy_stats) obj.stat_resource(service); return response; }
java
public static cachepolicy_stats get(nitro_service service, String policyname) throws Exception{ cachepolicy_stats obj = new cachepolicy_stats(); obj.set_policyname(policyname); cachepolicy_stats response = (cachepolicy_stats) obj.stat_resource(service); return response; }
[ "public", "static", "cachepolicy_stats", "get", "(", "nitro_service", "service", ",", "String", "policyname", ")", "throws", "Exception", "{", "cachepolicy_stats", "obj", "=", "new", "cachepolicy_stats", "(", ")", ";", "obj", ".", "set_policyname", "(", "policyname", ")", ";", "cachepolicy_stats", "response", "=", "(", "cachepolicy_stats", ")", "obj", ".", "stat_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch statistics of cachepolicy_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "cachepolicy_stats", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/cache/cachepolicy_stats.java#L169-L174
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite_gslbservice_binding.java
gslbsite_gslbservice_binding.get
public static gslbsite_gslbservice_binding[] get(nitro_service service, String sitename) throws Exception{ gslbsite_gslbservice_binding obj = new gslbsite_gslbservice_binding(); obj.set_sitename(sitename); gslbsite_gslbservice_binding response[] = (gslbsite_gslbservice_binding[]) obj.get_resources(service); return response; }
java
public static gslbsite_gslbservice_binding[] get(nitro_service service, String sitename) throws Exception{ gslbsite_gslbservice_binding obj = new gslbsite_gslbservice_binding(); obj.set_sitename(sitename); gslbsite_gslbservice_binding response[] = (gslbsite_gslbservice_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "gslbsite_gslbservice_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "sitename", ")", "throws", "Exception", "{", "gslbsite_gslbservice_binding", "obj", "=", "new", "gslbsite_gslbservice_binding", "(", ")", ";", "obj", ".", "set_sitename", "(", "sitename", ")", ";", "gslbsite_gslbservice_binding", "response", "[", "]", "=", "(", "gslbsite_gslbservice_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch gslbsite_gslbservice_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "gslbsite_gslbservice_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite_gslbservice_binding.java#L162-L167
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite_gslbservice_binding.java
gslbsite_gslbservice_binding.get_filtered
public static gslbsite_gslbservice_binding[] get_filtered(nitro_service service, String sitename, filtervalue[] filter) throws Exception{ gslbsite_gslbservice_binding obj = new gslbsite_gslbservice_binding(); obj.set_sitename(sitename); options option = new options(); option.set_filter(filter); gslbsite_gslbservice_binding[] response = (gslbsite_gslbservice_binding[]) obj.getfiltered(service, option); return response; }
java
public static gslbsite_gslbservice_binding[] get_filtered(nitro_service service, String sitename, filtervalue[] filter) throws Exception{ gslbsite_gslbservice_binding obj = new gslbsite_gslbservice_binding(); obj.set_sitename(sitename); options option = new options(); option.set_filter(filter); gslbsite_gslbservice_binding[] response = (gslbsite_gslbservice_binding[]) obj.getfiltered(service, option); return response; }
[ "public", "static", "gslbsite_gslbservice_binding", "[", "]", "get_filtered", "(", "nitro_service", "service", ",", "String", "sitename", ",", "filtervalue", "[", "]", "filter", ")", "throws", "Exception", "{", "gslbsite_gslbservice_binding", "obj", "=", "new", "gslbsite_gslbservice_binding", "(", ")", ";", "obj", ".", "set_sitename", "(", "sitename", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_filter", "(", "filter", ")", ";", "gslbsite_gslbservice_binding", "[", "]", "response", "=", "(", "gslbsite_gslbservice_binding", "[", "]", ")", "obj", ".", "getfiltered", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch filtered set of gslbsite_gslbservice_binding resources. set the filter parameter values in filtervalue object.
[ "Use", "this", "API", "to", "fetch", "filtered", "set", "of", "gslbsite_gslbservice_binding", "resources", ".", "set", "the", "filter", "parameter", "values", "in", "filtervalue", "object", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite_gslbservice_binding.java#L186-L193
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite_gslbservice_binding.java
gslbsite_gslbservice_binding.count
public static long count(nitro_service service, String sitename) throws Exception{ gslbsite_gslbservice_binding obj = new gslbsite_gslbservice_binding(); obj.set_sitename(sitename); options option = new options(); option.set_count(true); gslbsite_gslbservice_binding response[] = (gslbsite_gslbservice_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
java
public static long count(nitro_service service, String sitename) throws Exception{ gslbsite_gslbservice_binding obj = new gslbsite_gslbservice_binding(); obj.set_sitename(sitename); options option = new options(); option.set_count(true); gslbsite_gslbservice_binding response[] = (gslbsite_gslbservice_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
[ "public", "static", "long", "count", "(", "nitro_service", "service", ",", "String", "sitename", ")", "throws", "Exception", "{", "gslbsite_gslbservice_binding", "obj", "=", "new", "gslbsite_gslbservice_binding", "(", ")", ";", "obj", ".", "set_sitename", "(", "sitename", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_count", "(", "true", ")", ";", "gslbsite_gslbservice_binding", "response", "[", "]", "=", "(", "gslbsite_gslbservice_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "if", "(", "response", "!=", "null", ")", "{", "return", "response", "[", "0", "]", ".", "__count", ";", "}", "return", "0", ";", "}" ]
Use this API to count gslbsite_gslbservice_binding resources configued on NetScaler.
[ "Use", "this", "API", "to", "count", "gslbsite_gslbservice_binding", "resources", "configued", "on", "NetScaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbsite_gslbservice_binding.java#L198-L208
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbsite_stats.java
gslbsite_stats.get
public static gslbsite_stats[] get(nitro_service service, options option) throws Exception{ gslbsite_stats obj = new gslbsite_stats(); gslbsite_stats[] response = (gslbsite_stats[])obj.stat_resources(service,option); return response; }
java
public static gslbsite_stats[] get(nitro_service service, options option) throws Exception{ gslbsite_stats obj = new gslbsite_stats(); gslbsite_stats[] response = (gslbsite_stats[])obj.stat_resources(service,option); return response; }
[ "public", "static", "gslbsite_stats", "[", "]", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "gslbsite_stats", "obj", "=", "new", "gslbsite_stats", "(", ")", ";", "gslbsite_stats", "[", "]", "response", "=", "(", "gslbsite_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch the statistics of all gslbsite_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "gslbsite_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbsite_stats.java#L330-L334
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbsite_stats.java
gslbsite_stats.get
public static gslbsite_stats get(nitro_service service, String sitename) throws Exception{ gslbsite_stats obj = new gslbsite_stats(); obj.set_sitename(sitename); gslbsite_stats response = (gslbsite_stats) obj.stat_resource(service); return response; }
java
public static gslbsite_stats get(nitro_service service, String sitename) throws Exception{ gslbsite_stats obj = new gslbsite_stats(); obj.set_sitename(sitename); gslbsite_stats response = (gslbsite_stats) obj.stat_resource(service); return response; }
[ "public", "static", "gslbsite_stats", "get", "(", "nitro_service", "service", ",", "String", "sitename", ")", "throws", "Exception", "{", "gslbsite_stats", "obj", "=", "new", "gslbsite_stats", "(", ")", ";", "obj", ".", "set_sitename", "(", "sitename", ")", ";", "gslbsite_stats", "response", "=", "(", "gslbsite_stats", ")", "obj", ".", "stat_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch statistics of gslbsite_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "gslbsite_stats", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbsite_stats.java#L339-L344
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java
dnsaddrec.add
public static base_response add(nitro_service client, dnsaddrec resource) throws Exception { dnsaddrec addresource = new dnsaddrec(); addresource.hostname = resource.hostname; addresource.ipaddress = resource.ipaddress; addresource.ttl = resource.ttl; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, dnsaddrec resource) throws Exception { dnsaddrec addresource = new dnsaddrec(); addresource.hostname = resource.hostname; addresource.ipaddress = resource.ipaddress; addresource.ttl = resource.ttl; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "dnsaddrec", "resource", ")", "throws", "Exception", "{", "dnsaddrec", "addresource", "=", "new", "dnsaddrec", "(", ")", ";", "addresource", ".", "hostname", "=", "resource", ".", "hostname", ";", "addresource", ".", "ipaddress", "=", "resource", ".", "ipaddress", ";", "addresource", ".", "ttl", "=", "resource", ".", "ttl", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add dnsaddrec.
[ "Use", "this", "API", "to", "add", "dnsaddrec", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java#L188-L194
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java
dnsaddrec.add
public static base_responses add(nitro_service client, dnsaddrec resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsaddrec addresources[] = new dnsaddrec[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnsaddrec(); addresources[i].hostname = resources[i].hostname; addresources[i].ipaddress = resources[i].ipaddress; addresources[i].ttl = resources[i].ttl; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, dnsaddrec resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsaddrec addresources[] = new dnsaddrec[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnsaddrec(); addresources[i].hostname = resources[i].hostname; addresources[i].ipaddress = resources[i].ipaddress; addresources[i].ttl = resources[i].ttl; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "dnsaddrec", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "dnsaddrec", "addresources", "[", "]", "=", "new", "dnsaddrec", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "dnsaddrec", "(", ")", ";", "addresources", "[", "i", "]", ".", "hostname", "=", "resources", "[", "i", "]", ".", "hostname", ";", "addresources", "[", "i", "]", ".", "ipaddress", "=", "resources", "[", "i", "]", ".", "ipaddress", ";", "addresources", "[", "i", "]", ".", "ttl", "=", "resources", "[", "i", "]", ".", "ttl", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add dnsaddrec resources.
[ "Use", "this", "API", "to", "add", "dnsaddrec", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java#L199-L212
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java
dnsaddrec.delete
public static base_response delete(nitro_service client, String hostname) throws Exception { dnsaddrec deleteresource = new dnsaddrec(); deleteresource.hostname = hostname; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, String hostname) throws Exception { dnsaddrec deleteresource = new dnsaddrec(); deleteresource.hostname = hostname; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "String", "hostname", ")", "throws", "Exception", "{", "dnsaddrec", "deleteresource", "=", "new", "dnsaddrec", "(", ")", ";", "deleteresource", ".", "hostname", "=", "hostname", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete dnsaddrec of given name.
[ "Use", "this", "API", "to", "delete", "dnsaddrec", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java#L217-L221
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java
dnsaddrec.delete
public static base_response delete(nitro_service client, dnsaddrec resource) throws Exception { dnsaddrec deleteresource = new dnsaddrec(); deleteresource.hostname = resource.hostname; deleteresource.ipaddress = resource.ipaddress; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, dnsaddrec resource) throws Exception { dnsaddrec deleteresource = new dnsaddrec(); deleteresource.hostname = resource.hostname; deleteresource.ipaddress = resource.ipaddress; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "dnsaddrec", "resource", ")", "throws", "Exception", "{", "dnsaddrec", "deleteresource", "=", "new", "dnsaddrec", "(", ")", ";", "deleteresource", ".", "hostname", "=", "resource", ".", "hostname", ";", "deleteresource", ".", "ipaddress", "=", "resource", ".", "ipaddress", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete dnsaddrec.
[ "Use", "this", "API", "to", "delete", "dnsaddrec", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java#L226-L231
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java
dnsaddrec.delete
public static base_responses delete(nitro_service client, dnsaddrec resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsaddrec deleteresources[] = new dnsaddrec[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new dnsaddrec(); deleteresources[i].hostname = resources[i].hostname; deleteresources[i].ipaddress = resources[i].ipaddress; } result = delete_bulk_request(client, deleteresources); } return result; }
java
public static base_responses delete(nitro_service client, dnsaddrec resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsaddrec deleteresources[] = new dnsaddrec[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new dnsaddrec(); deleteresources[i].hostname = resources[i].hostname; deleteresources[i].ipaddress = resources[i].ipaddress; } result = delete_bulk_request(client, deleteresources); } return result; }
[ "public", "static", "base_responses", "delete", "(", "nitro_service", "client", ",", "dnsaddrec", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "dnsaddrec", "deleteresources", "[", "]", "=", "new", "dnsaddrec", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "deleteresources", "[", "i", "]", "=", "new", "dnsaddrec", "(", ")", ";", "deleteresources", "[", "i", "]", ".", "hostname", "=", "resources", "[", "i", "]", ".", "hostname", ";", "deleteresources", "[", "i", "]", ".", "ipaddress", "=", "resources", "[", "i", "]", ".", "ipaddress", ";", "}", "result", "=", "delete_bulk_request", "(", "client", ",", "deleteresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to delete dnsaddrec resources.
[ "Use", "this", "API", "to", "delete", "dnsaddrec", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java#L252-L264
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java
dnsaddrec.get
public static dnsaddrec[] get(nitro_service service) throws Exception{ dnsaddrec obj = new dnsaddrec(); dnsaddrec[] response = (dnsaddrec[])obj.get_resources(service); return response; }
java
public static dnsaddrec[] get(nitro_service service) throws Exception{ dnsaddrec obj = new dnsaddrec(); dnsaddrec[] response = (dnsaddrec[])obj.get_resources(service); return response; }
[ "public", "static", "dnsaddrec", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "dnsaddrec", "obj", "=", "new", "dnsaddrec", "(", ")", ";", "dnsaddrec", "[", "]", "response", "=", "(", "dnsaddrec", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the dnsaddrec resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "dnsaddrec", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java#L269-L273
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java
dnsaddrec.get
public static dnsaddrec[] get(nitro_service service, dnsaddrec_args args) throws Exception{ dnsaddrec obj = new dnsaddrec(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); dnsaddrec[] response = (dnsaddrec[])obj.get_resources(service, option); return response; }
java
public static dnsaddrec[] get(nitro_service service, dnsaddrec_args args) throws Exception{ dnsaddrec obj = new dnsaddrec(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); dnsaddrec[] response = (dnsaddrec[])obj.get_resources(service, option); return response; }
[ "public", "static", "dnsaddrec", "[", "]", "get", "(", "nitro_service", "service", ",", "dnsaddrec_args", "args", ")", "throws", "Exception", "{", "dnsaddrec", "obj", "=", "new", "dnsaddrec", "(", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_args", "(", "nitro_util", ".", "object_to_string_withoutquotes", "(", "args", ")", ")", ";", "dnsaddrec", "[", "]", "response", "=", "(", "dnsaddrec", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the dnsaddrec resources that are configured on netscaler. This uses dnsaddrec_args which is a way to provide additional arguments while fetching the resources.
[ "Use", "this", "API", "to", "fetch", "all", "the", "dnsaddrec", "resources", "that", "are", "configured", "on", "netscaler", ".", "This", "uses", "dnsaddrec_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/dns/dnsaddrec.java#L286-L292
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java
dnsaddrec.get
public static dnsaddrec get(nitro_service service, String hostname) throws Exception{ dnsaddrec obj = new dnsaddrec(); obj.set_hostname(hostname); dnsaddrec response = (dnsaddrec) obj.get_resource(service); return response; }
java
public static dnsaddrec get(nitro_service service, String hostname) throws Exception{ dnsaddrec obj = new dnsaddrec(); obj.set_hostname(hostname); dnsaddrec response = (dnsaddrec) obj.get_resource(service); return response; }
[ "public", "static", "dnsaddrec", "get", "(", "nitro_service", "service", ",", "String", "hostname", ")", "throws", "Exception", "{", "dnsaddrec", "obj", "=", "new", "dnsaddrec", "(", ")", ";", "obj", ".", "set_hostname", "(", "hostname", ")", ";", "dnsaddrec", "response", "=", "(", "dnsaddrec", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch dnsaddrec resource of given name .
[ "Use", "this", "API", "to", "fetch", "dnsaddrec", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsaddrec.java#L297-L302
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authorization/authorizationpolicy_aaauser_binding.java
authorizationpolicy_aaauser_binding.get
public static authorizationpolicy_aaauser_binding[] get(nitro_service service, String name) throws Exception{ authorizationpolicy_aaauser_binding obj = new authorizationpolicy_aaauser_binding(); obj.set_name(name); authorizationpolicy_aaauser_binding response[] = (authorizationpolicy_aaauser_binding[]) obj.get_resources(service); return response; }
java
public static authorizationpolicy_aaauser_binding[] get(nitro_service service, String name) throws Exception{ authorizationpolicy_aaauser_binding obj = new authorizationpolicy_aaauser_binding(); obj.set_name(name); authorizationpolicy_aaauser_binding response[] = (authorizationpolicy_aaauser_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "authorizationpolicy_aaauser_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authorizationpolicy_aaauser_binding", "obj", "=", "new", "authorizationpolicy_aaauser_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "authorizationpolicy_aaauser_binding", "response", "[", "]", "=", "(", "authorizationpolicy_aaauser_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch authorizationpolicy_aaauser_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "authorizationpolicy_aaauser_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authorization/authorizationpolicy_aaauser_binding.java#L122-L127
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsxmlnamespace.java
nsxmlnamespace.add
public static base_response add(nitro_service client, nsxmlnamespace resource) throws Exception { nsxmlnamespace addresource = new nsxmlnamespace(); addresource.prefix = resource.prefix; addresource.Namespace = resource.Namespace; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, nsxmlnamespace resource) throws Exception { nsxmlnamespace addresource = new nsxmlnamespace(); addresource.prefix = resource.prefix; addresource.Namespace = resource.Namespace; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "nsxmlnamespace", "resource", ")", "throws", "Exception", "{", "nsxmlnamespace", "addresource", "=", "new", "nsxmlnamespace", "(", ")", ";", "addresource", ".", "prefix", "=", "resource", ".", "prefix", ";", "addresource", ".", "Namespace", "=", "resource", ".", "Namespace", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add nsxmlnamespace.
[ "Use", "this", "API", "to", "add", "nsxmlnamespace", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsxmlnamespace.java#L131-L136
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsxmlnamespace.java
nsxmlnamespace.add
public static base_responses add(nitro_service client, nsxmlnamespace resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsxmlnamespace addresources[] = new nsxmlnamespace[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nsxmlnamespace(); addresources[i].prefix = resources[i].prefix; addresources[i].Namespace = resources[i].Namespace; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, nsxmlnamespace resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsxmlnamespace addresources[] = new nsxmlnamespace[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nsxmlnamespace(); addresources[i].prefix = resources[i].prefix; addresources[i].Namespace = resources[i].Namespace; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "nsxmlnamespace", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nsxmlnamespace", "addresources", "[", "]", "=", "new", "nsxmlnamespace", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "nsxmlnamespace", "(", ")", ";", "addresources", "[", "i", "]", ".", "prefix", "=", "resources", "[", "i", "]", ".", "prefix", ";", "addresources", "[", "i", "]", ".", "Namespace", "=", "resources", "[", "i", "]", ".", "Namespace", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add nsxmlnamespace resources.
[ "Use", "this", "API", "to", "add", "nsxmlnamespace", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsxmlnamespace.java#L141-L153
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsxmlnamespace.java
nsxmlnamespace.delete
public static base_response delete(nitro_service client, String prefix) throws Exception { nsxmlnamespace deleteresource = new nsxmlnamespace(); deleteresource.prefix = prefix; return deleteresource.delete_resource(client); }
java
public static base_response delete(nitro_service client, String prefix) throws Exception { nsxmlnamespace deleteresource = new nsxmlnamespace(); deleteresource.prefix = prefix; return deleteresource.delete_resource(client); }
[ "public", "static", "base_response", "delete", "(", "nitro_service", "client", ",", "String", "prefix", ")", "throws", "Exception", "{", "nsxmlnamespace", "deleteresource", "=", "new", "nsxmlnamespace", "(", ")", ";", "deleteresource", ".", "prefix", "=", "prefix", ";", "return", "deleteresource", ".", "delete_resource", "(", "client", ")", ";", "}" ]
Use this API to delete nsxmlnamespace of given name.
[ "Use", "this", "API", "to", "delete", "nsxmlnamespace", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsxmlnamespace.java#L158-L162
train