idx
int64
0
41.2k
question
stringlengths
74
4.04k
target
stringlengths
7
750
2,500
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 .
2,501
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 .
2,502
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 .
2,503
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 .
2,504
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 .
2,505
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 .
2,506
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
2,507
public void combine ( CRFClassifier < IN > crf , double weight ) { Timing timer = new Timing ( ) ; 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 ) { throw new RuntimeException ( "Incompatible CRFClassifier: labelIndices length does not match" ) ; } this . classIndex . addAll ( crf . classIndex . objectsList ( ) ) ; 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 ) ; 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
2,508
public Pair < int [ ] [ ] [ ] , int [ ] > documentToDataAndLabels ( List < IN > document ) { int docSize = document . size ( ) ; int [ ] [ ] [ ] data = new int [ docSize ] [ windowSize ] [ ] ; int [ ] labels = new int [ docSize ] ; if ( flags . useReverse ) { Collections . reverse ( document ) ; } 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 { } } 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 ) ; } return new Pair < int [ ] [ ] [ ] , int [ ] > ( data , labels ) ; }
Convert a document List into arrays storing the data features and labels .
2,509
public Pair < int [ ] [ ] [ ] [ ] , int [ ] [ ] > documentsToDataAndLabels ( Collection < List < IN > > documents ) { List < int [ ] [ ] [ ] > data = new ArrayList < int [ ] [ ] [ ] > ( ) ; 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 .
2,510
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 .
2,511
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 > > ( ) ; 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 ) ) ; } 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 ) ) ; return d ; }
Makes a CRFDatum by producing features and a label from input data at a specific position using the provided factory .
2,512
public List < CRFCliqueTree > getCliqueTrees ( String filename , DocumentReaderAndWriter < IN > readerAndWriter ) { 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 .
2,513
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 ( int position = beginContext ; position < beginPosition ; position ++ ) { List < Collection < String > > cliqueFeatures = new ArrayList < Collection < String > > ( ) ; for ( int i = 0 ; i < windowSize ; i ++ ) { 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 ) ; } for ( int position = beginPosition ; position <= endPosition ; position ++ ) { List < Collection < String > > cliqueFeatures = new ArrayList < Collection < String > > ( ) ; for ( int i = 0 ; i < windowSize ; i ++ ) { 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 .
2,514
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 ) ; labels [ dataIndex ] [ j ] = classIndex . indexOf ( crfDatum . label ( ) ) ; 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 ) ; data [ dataIndex ] [ j ] [ k ] = new int [ features . size ( ) ] ; int m = 0 ; try { for ( String feature : features ) { 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 .
2,515
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 .
2,516
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 .
2,517
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 .
2,518
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 ) ; } 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 ( ) ; } 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 .
2,519
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 .
2,520
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 .
2,521
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 .
2,522
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 .
2,523
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 .
2,524
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 .
2,525
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 .
2,526
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 .
2,527
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 .
2,528
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 .
2,529
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 .
2,530
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 .
2,531
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 .
2,532
private void calculateSCL ( double [ ] x ) { 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 ++ ) { int [ ] features = data [ d ] ; 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 ] ; } } 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 ] ; } } for ( int f = 0 ; f < features . length ; f ++ ) { int i = indexOf ( features [ f ] , labels [ d ] ) ; derivative [ i ] -= probs [ ld ] ; } value -= probs [ ld ] ; } 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 .
2,533
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 .
2,534
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 .
2,535
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 ( ) ) { 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 ( ) ; } }
end class CoNLLIterator
2,536
private CoreLabel makeCoreLabel ( String line ) { CoreLabel wi = new CoreLabel ( ) ; 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 .
2,537
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 ] ) ; } }
Return the coding scheme to IOB1 coding regardless of what was used internally . This is useful for scoring against CoNLL test output .
2,538
public void printAnswers ( List < CoreLabel > doc , PrintWriter out ) { if ( ! "iob1" . equalsIgnoreCase ( flags . entitySubclassification ) ) { deEndify ( doc ) ; } for ( CoreLabel fl : doc ) { String word = fl . word ( ) ; if ( word == BOUNDARY ) { out . println ( ) ; } else { String gold = fl . get ( OriginalAnswerAnnotation . class ) ; if ( gold == null ) gold = "" ; String guess = 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 ) ; } } }
Write a standard CoNLL format output file .
2,539
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 ) { 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 .
2,540
protected void getBatch ( int batchSize ) { if ( thisBatch == null || thisBatch . length != batchSize ) { thisBatch = new int [ batchSize ] ; } if ( sampleMethod . equals ( SamplingMethod . RandomWithReplacement ) ) { for ( int i = 0 ; i < batchSize ; i ++ ) { thisBatch [ i ] = randGenerator . nextInt ( this . dataDimension ( ) ) ; } } else if ( sampleMethod . equals ( SamplingMethod . Ordered ) ) { for ( int i = 0 ; i < batchSize ; i ++ ) { thisBatch [ i ] = ( curElement + i ) % this . dataDimension ( ) ; } curElement = ( curElement + batchSize ) % this . dataDimension ( ) ; } else if ( sampleMethod . equals ( SamplingMethod . RandomWithoutReplacement ) ) { 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 ( ) ) ; } if ( curElement + batchSize > this . dataDimension ( ) ) { Collections . shuffle ( Arrays . asList ( allIndices ) , randGenerator ) ; } curElement = ( curElement + batchSize ) % allIndices . size ( ) ; } else { System . err . println ( "NO SAMPLING METHOD SELECTED" ) ; System . exit ( 1 ) ; } }
private int numCalls = 0 ;
2,541
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 .
2,542
@ 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 .
2,543
@ 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 .
2,544
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 .
2,545
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 .
2,546
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 .
2,547
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 .
2,548
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 .
2,549
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 .
2,550
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 .
2,551
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 .
2,552
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 .
2,553
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 .
2,554
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 .
2,555
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 .
2,556
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 .
2,557
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 .
2,558
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 .
2,559
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 .
2,560
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 .
2,561
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 .
2,562
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 .
2,563
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 .
2,564
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 .
2,565
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 .
2,566
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 .
2,567
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 .
2,568
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 .
2,569
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 .
2,570
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 .
2,571
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 .
2,572
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 .
2,573
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 .
2,574
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 .
2,575
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 .
2,576
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 .
2,577
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 .
2,578
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 .
2,579
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 .
2,580
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 .
2,581
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 .
2,582
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 .
2,583
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 .
2,584
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 .
2,585
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 .
2,586
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 .
2,587
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 .
2,588
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 .
2,589
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 .
2,590
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 .
2,591
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 .
2,592
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 .
2,593
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 .
2,594
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 .
2,595
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 .
2,596
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 .
2,597
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 .
2,598
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 .
2,599
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 .