idx
int64 0
41.2k
| question
stringlengths 74
4.04k
| target
stringlengths 7
750
|
|---|---|---|
2,200
|
public DocumentReaderAndWriter < IN > makeReaderAndWriter ( ) { DocumentReaderAndWriter < IN > readerAndWriter ; try { readerAndWriter = ( ( DocumentReaderAndWriter < IN > ) Class . forName ( flags . readerAndWriter ) . newInstance ( ) ) ; } catch ( Exception e ) { throw new RuntimeException ( String . format ( "Error loading flags.readerAndWriter: '%s'" , flags . readerAndWriter ) , e ) ; } readerAndWriter . init ( flags ) ; return readerAndWriter ; }
|
Makes a DocumentReaderAndWriter based on the flags the CRFClassifier was constructed with . Will create the flags . readerAndWriter and initialize it with the CRFClassifier s flags .
|
2,201
|
public DocumentReaderAndWriter < IN > makePlainTextReaderAndWriter ( ) { String readerClassName = flags . plainTextDocumentReaderAndWriter ; if ( readerClassName == null ) { readerClassName = SeqClassifierFlags . DEFAULT_PLAIN_TEXT_READER ; } DocumentReaderAndWriter < IN > readerAndWriter ; try { readerAndWriter = ( ( DocumentReaderAndWriter < IN > ) Class . forName ( readerClassName ) . newInstance ( ) ) ; } catch ( Exception e ) { throw new RuntimeException ( String . format ( "Error loading flags.plainTextDocumentReaderAndWriter: '%s'" , flags . plainTextDocumentReaderAndWriter ) , e ) ; } readerAndWriter . init ( flags ) ; return readerAndWriter ; }
|
Makes a DocumentReaderAndWriter based on flags . plainTextReaderAndWriter . Useful for reading in untokenized text documents or reading plain text from the command line . An example of a way to use this would be to return a edu . stanford . nlp . wordseg . Sighan2005DocumentReaderAndWriter for the Chinese Segmenter .
|
2,202
|
public List < List < IN > > classify ( String str ) { ObjectBank < List < IN > > documents = makeObjectBankFromString ( str , plainTextReaderAndWriter ) ; List < List < IN > > result = new ArrayList < List < IN > > ( ) ; for ( List < IN > document : documents ) { classify ( document ) ; List < IN > sentence = new ArrayList < IN > ( ) ; for ( IN wi : document ) { sentence . add ( wi ) ; } result . add ( sentence ) ; } return result ; }
|
Classify the tokens in a String . Each sentence becomes a separate document .
|
2,203
|
public List < List < IN > > classifyRaw ( String str , DocumentReaderAndWriter < IN > readerAndWriter ) { ObjectBank < List < IN > > documents = makeObjectBankFromString ( str , readerAndWriter ) ; List < List < IN > > result = new ArrayList < List < IN > > ( ) ; for ( List < IN > document : documents ) { classify ( document ) ; List < IN > sentence = new ArrayList < IN > ( ) ; for ( IN wi : document ) { sentence . add ( wi ) ; } result . add ( sentence ) ; } return result ; }
|
Classify the tokens in a String . Each sentence becomes a separate document . Doesn t override default readerAndWriter .
|
2,204
|
public List < List < IN > > classifyFile ( String filename ) { ObjectBank < List < IN > > documents = makeObjectBankFromFile ( filename , plainTextReaderAndWriter ) ; List < List < IN > > result = new ArrayList < List < IN > > ( ) ; for ( List < IN > document : documents ) { classify ( document ) ; List < IN > sentence = new ArrayList < IN > ( ) ; for ( IN wi : document ) { sentence . add ( wi ) ; } result . add ( sentence ) ; } return result ; }
|
Classify the contents of a file .
|
2,205
|
public void printProbs ( String filename , DocumentReaderAndWriter < IN > readerAndWriter ) { flags . ocrTrain = false ; ObjectBank < List < IN > > docs = makeObjectBankFromFile ( filename , readerAndWriter ) ; printProbsDocuments ( docs ) ; }
|
Takes the file reads it in and prints out the likelihood of each possible label at each point .
|
2,206
|
public boolean classifyDocumentStdin ( DocumentReaderAndWriter < IN > readerWriter ) throws IOException { BufferedReader is = new BufferedReader ( new InputStreamReader ( System . in , flags . inputEncoding ) ) ; String line ; String text = "" ; String eol = "\n" ; String sentence = "<s>" ; int blankLines = 0 ; while ( ( line = is . readLine ( ) ) != null ) { if ( line . trim ( ) . equals ( "" ) ) { ++ blankLines ; if ( blankLines > 3 ) { return false ; } else if ( blankLines > 2 ) { ObjectBank < List < IN > > documents = makeObjectBankFromString ( text , readerWriter ) ; classifyAndWriteAnswers ( documents , readerWriter ) ; text = "" ; } else { text += sentence + eol ; } } else { text += line + eol ; blankLines = 0 ; } } if ( text . trim ( ) != "" ) { ObjectBank < List < IN > > documents = makeObjectBankFromString ( text , readerWriter ) ; classifyAndWriteAnswers ( documents , readerWriter ) ; } return ( line == null ) ; }
|
Classify stdin by documents seperated by 3 blank line
|
2,207
|
public boolean classifySentenceStdin ( DocumentReaderAndWriter < IN > readerWriter ) throws IOException { BufferedReader is = new BufferedReader ( new InputStreamReader ( System . in , flags . inputEncoding ) ) ; String line ; String text = "" ; String eol = "\n" ; String sentence = "<s>" ; while ( ( line = is . readLine ( ) ) != null ) { if ( line . trim ( ) . equals ( "" ) ) { text += sentence + eol ; ObjectBank < List < IN > > documents = makeObjectBankFromString ( text , readerWriter ) ; classifyAndWriteAnswers ( documents , readerWriter ) ; text = "" ; } else { text += line + eol ; } } if ( text . trim ( ) . equals ( "" ) ) { return false ; } return true ; }
|
Classify stdin by senteces seperated by blank line
|
2,208
|
public void classifyAndWriteViterbiSearchGraph ( String testFile , String searchGraphPrefix , DocumentReaderAndWriter < IN > readerAndWriter ) throws IOException { Timing timer = new Timing ( ) ; ObjectBank < List < IN > > documents = makeObjectBankFromFile ( testFile , readerAndWriter ) ; int numWords = 0 ; int numSentences = 0 ; for ( List < IN > doc : documents ) { DFSA < String , Integer > tagLattice = getViterbiSearchGraph ( doc , AnswerAnnotation . class ) ; numWords += doc . size ( ) ; PrintWriter latticeWriter = new PrintWriter ( new FileOutputStream ( searchGraphPrefix + '.' + numSentences + ".wlattice" ) ) ; PrintWriter vsgWriter = new PrintWriter ( new FileOutputStream ( searchGraphPrefix + '.' + numSentences + ".lattice" ) ) ; if ( readerAndWriter instanceof LatticeWriter ) ( ( LatticeWriter ) readerAndWriter ) . printLattice ( tagLattice , doc , latticeWriter ) ; tagLattice . printAttFsmFormat ( vsgWriter ) ; latticeWriter . close ( ) ; vsgWriter . close ( ) ; numSentences ++ ; } long millis = timer . stop ( ) ; double wordspersec = numWords / ( ( ( double ) millis ) / 1000 ) ; NumberFormat nf = new DecimalFormat ( "0.00" ) ; System . err . println ( this . getClass ( ) . getName ( ) + " tagged " + numWords + " words in " + numSentences + " documents at " + nf . format ( wordspersec ) + " words per second." ) ; }
|
Load a test file run the classifier on it and then write a Viterbi search graph for each sequence .
|
2,209
|
public void writeAnswers ( List < IN > doc , PrintWriter printWriter , DocumentReaderAndWriter < IN > readerAndWriter ) throws IOException { if ( flags . lowerNewgeneThreshold ) { return ; } if ( flags . numRuns <= 1 ) { readerAndWriter . printAnswers ( doc , printWriter ) ; printWriter . flush ( ) ; } }
|
Write the classifications of the Sequence classifier out to a writer in a format determined by the DocumentReaderAndWriter used .
|
2,210
|
public static void printResults ( Counter < String > entityTP , Counter < String > entityFP , Counter < String > entityFN ) { Set < String > entities = new TreeSet < String > ( ) ; entities . addAll ( entityTP . keySet ( ) ) ; entities . addAll ( entityFP . keySet ( ) ) ; entities . addAll ( entityFN . keySet ( ) ) ; boolean printedHeader = false ; for ( String entity : entities ) { double tp = entityTP . getCount ( entity ) ; double fp = entityFP . getCount ( entity ) ; double fn = entityFN . getCount ( entity ) ; printedHeader = printPRLine ( entity , tp , fp , fn , printedHeader ) ; } double tp = entityTP . totalCount ( ) ; double fp = entityFP . totalCount ( ) ; double fn = entityFN . totalCount ( ) ; printedHeader = printPRLine ( "Totals" , tp , fp , fn , printedHeader ) ; }
|
Given counters of true positives false positives and false negatives prints out precision recall and f1 for each key .
|
2,211
|
public void loadClassifier ( InputStream in , Properties props ) throws IOException , ClassCastException , ClassNotFoundException { loadClassifier ( new ObjectInputStream ( in ) , props ) ; }
|
Load a classifier from the specified InputStream . The classifier is reinitialized from the flags serialized in the classifier . This does not close the InputStream .
|
2,212
|
public void loadClassifier ( String loadPath , Properties props ) throws ClassCastException , IOException , ClassNotFoundException { InputStream is ; if ( ( is = loadStreamFromClasspath ( loadPath ) ) != null ) { Timing . startDoing ( "Loading classifier from " + loadPath ) ; loadClassifier ( is ) ; is . close ( ) ; Timing . endDoing ( ) ; } else { loadClassifier ( new File ( loadPath ) , props ) ; } }
|
Loads a classifier from the file specified by loadPath . If loadPath ends in . gz uses a GZIPInputStream else uses a regular FileInputStream .
|
2,213
|
public void loadClassifier ( File file , Properties props ) throws ClassCastException , IOException , ClassNotFoundException { Timing . startDoing ( "Loading classifier from " + file . getAbsolutePath ( ) ) ; BufferedInputStream bis ; if ( file . getName ( ) . endsWith ( ".gz" ) ) { bis = new BufferedInputStream ( new GZIPInputStream ( new FileInputStream ( file ) ) ) ; } else { bis = new BufferedInputStream ( new FileInputStream ( file ) ) ; } loadClassifier ( bis , props ) ; bis . close ( ) ; Timing . endDoing ( ) ; }
|
Loads a classifier from the file specified . If the file s name ends in . gz uses a GZIPInputStream else uses a regular FileInputStream . This method closes the File when done .
|
2,214
|
protected void printFeatures ( IN wi , Collection < String > features ) { if ( flags . printFeatures == null || writtenNum > flags . printFeaturesUpto ) { return ; } try { if ( cliqueWriter == null ) { cliqueWriter = new PrintWriter ( new FileOutputStream ( "feats" + flags . printFeatures + ".txt" ) , true ) ; writtenNum = 0 ; } } catch ( Exception ioe ) { throw new RuntimeException ( ioe ) ; } if ( writtenNum >= flags . printFeaturesUpto ) { return ; } if ( wi instanceof CoreLabel ) { cliqueWriter . print ( wi . get ( TextAnnotation . class ) + ' ' + wi . get ( PartOfSpeechAnnotation . class ) + ' ' + wi . get ( CoreAnnotations . GoldAnswerAnnotation . class ) + '\t' ) ; } else { cliqueWriter . print ( wi . get ( CoreAnnotations . TextAnnotation . class ) + wi . get ( CoreAnnotations . GoldAnswerAnnotation . class ) + '\t' ) ; } boolean first = true ; for ( Object feat : features ) { if ( first ) { first = false ; } else { cliqueWriter . print ( " " ) ; } cliqueWriter . print ( feat ) ; } cliqueWriter . println ( ) ; writtenNum ++ ; }
|
Print the String features generated from a IN
|
2,215
|
public static aaauser_intranetip_binding [ ] get ( nitro_service service , String username ) throws Exception { aaauser_intranetip_binding obj = new aaauser_intranetip_binding ( ) ; obj . set_username ( username ) ; aaauser_intranetip_binding response [ ] = ( aaauser_intranetip_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch aaauser_intranetip_binding resources of given name .
|
2,216
|
public boolean find ( ) { if ( findIterator == null ) { findIterator = root . iterator ( ) ; } if ( findCurrent != null && matches ( ) ) { return true ; } while ( findIterator . hasNext ( ) ) { findCurrent = findIterator . next ( ) ; resetChildIter ( findCurrent ) ; if ( matches ( ) ) { return true ; } } return false ; }
|
Find the next match of the pattern on the tree
|
2,217
|
public static sslciphersuite [ ] get ( nitro_service service , options option ) throws Exception { sslciphersuite obj = new sslciphersuite ( ) ; sslciphersuite [ ] response = ( sslciphersuite [ ] ) obj . get_resources ( service , option ) ; return response ; }
|
Use this API to fetch all the sslciphersuite resources that are configured on netscaler .
|
2,218
|
public static sslciphersuite get ( nitro_service service , String ciphername ) throws Exception { sslciphersuite obj = new sslciphersuite ( ) ; obj . set_ciphername ( ciphername ) ; sslciphersuite response = ( sslciphersuite ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch sslciphersuite resource of given name .
|
2,219
|
public static sslciphersuite [ ] get ( nitro_service service , String ciphername [ ] ) throws Exception { if ( ciphername != null && ciphername . length > 0 ) { sslciphersuite response [ ] = new sslciphersuite [ ciphername . length ] ; sslciphersuite obj [ ] = new sslciphersuite [ ciphername . length ] ; for ( int i = 0 ; i < ciphername . length ; i ++ ) { obj [ i ] = new sslciphersuite ( ) ; obj [ i ] . set_ciphername ( ciphername [ i ] ) ; response [ i ] = ( sslciphersuite ) obj [ i ] . get_resource ( service ) ; } return response ; } return null ; }
|
Use this API to fetch sslciphersuite resources of given names .
|
2,220
|
public static sslcipher_individualcipher_binding [ ] get ( nitro_service service , String ciphergroupname ) throws Exception { sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding ( ) ; obj . set_ciphergroupname ( ciphergroupname ) ; sslcipher_individualcipher_binding response [ ] = ( sslcipher_individualcipher_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch sslcipher_individualcipher_binding resources of given name .
|
2,221
|
public static sslcipher_individualcipher_binding [ ] get_filtered ( nitro_service service , String ciphergroupname , filtervalue [ ] filter ) throws Exception { sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding ( ) ; obj . set_ciphergroupname ( ciphergroupname ) ; options option = new options ( ) ; option . set_filter ( filter ) ; sslcipher_individualcipher_binding [ ] response = ( sslcipher_individualcipher_binding [ ] ) obj . getfiltered ( service , option ) ; return response ; }
|
Use this API to fetch filtered set of sslcipher_individualcipher_binding resources . set the filter parameter values in filtervalue object .
|
2,222
|
public static long count ( nitro_service service , String ciphergroupname ) throws Exception { sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding ( ) ; obj . set_ciphergroupname ( ciphergroupname ) ; options option = new options ( ) ; option . set_count ( true ) ; sslcipher_individualcipher_binding response [ ] = ( sslcipher_individualcipher_binding [ ] ) obj . get_resources ( service , option ) ; if ( response != null ) { return response [ 0 ] . __count ; } return 0 ; }
|
Use this API to count sslcipher_individualcipher_binding resources configued on NetScaler .
|
2,223
|
public static base_response add ( nitro_service client , inat resource ) throws Exception { inat addresource = new inat ( ) ; addresource . name = resource . name ; addresource . publicip = resource . publicip ; addresource . privateip = resource . privateip ; addresource . tcpproxy = resource . tcpproxy ; addresource . ftp = resource . ftp ; addresource . tftp = resource . tftp ; addresource . usip = resource . usip ; addresource . usnip = resource . usnip ; addresource . proxyip = resource . proxyip ; addresource . mode = resource . mode ; addresource . td = resource . td ; return addresource . add_resource ( client ) ; }
|
Use this API to add inat .
|
2,224
|
public static base_responses add ( nitro_service client , inat resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { inat addresources [ ] = new inat [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new inat ( ) ; addresources [ i ] . name = resources [ i ] . name ; addresources [ i ] . publicip = resources [ i ] . publicip ; addresources [ i ] . privateip = resources [ i ] . privateip ; addresources [ i ] . tcpproxy = resources [ i ] . tcpproxy ; addresources [ i ] . ftp = resources [ i ] . ftp ; addresources [ i ] . tftp = resources [ i ] . tftp ; addresources [ i ] . usip = resources [ i ] . usip ; addresources [ i ] . usnip = resources [ i ] . usnip ; addresources [ i ] . proxyip = resources [ i ] . proxyip ; addresources [ i ] . mode = resources [ i ] . mode ; addresources [ i ] . td = resources [ i ] . td ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
|
Use this API to add inat resources .
|
2,225
|
public static base_response update ( nitro_service client , inat resource ) throws Exception { inat updateresource = new inat ( ) ; updateresource . name = resource . name ; updateresource . privateip = resource . privateip ; updateresource . tcpproxy = resource . tcpproxy ; updateresource . ftp = resource . ftp ; updateresource . tftp = resource . tftp ; updateresource . usip = resource . usip ; updateresource . usnip = resource . usnip ; updateresource . proxyip = resource . proxyip ; updateresource . mode = resource . mode ; return updateresource . update_resource ( client ) ; }
|
Use this API to update inat .
|
2,226
|
public static base_responses update ( nitro_service client , inat resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { inat updateresources [ ] = new inat [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new inat ( ) ; updateresources [ i ] . name = resources [ i ] . name ; updateresources [ i ] . privateip = resources [ i ] . privateip ; updateresources [ i ] . tcpproxy = resources [ i ] . tcpproxy ; updateresources [ i ] . ftp = resources [ i ] . ftp ; updateresources [ i ] . tftp = resources [ i ] . tftp ; updateresources [ i ] . usip = resources [ i ] . usip ; updateresources [ i ] . usnip = resources [ i ] . usnip ; updateresources [ i ] . proxyip = resources [ i ] . proxyip ; updateresources [ i ] . mode = resources [ i ] . mode ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update inat resources .
|
2,227
|
public static inat [ ] get ( nitro_service service ) throws Exception { inat obj = new inat ( ) ; inat [ ] response = ( inat [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the inat resources that are configured on netscaler .
|
2,228
|
public static inat get ( nitro_service service , String name ) throws Exception { inat obj = new inat ( ) ; obj . set_name ( name ) ; inat response = ( inat ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch inat resource of given name .
|
2,229
|
public static base_response add ( nitro_service client , vpnclientlessaccesspolicy resource ) throws Exception { vpnclientlessaccesspolicy addresource = new vpnclientlessaccesspolicy ( ) ; addresource . name = resource . name ; addresource . rule = resource . rule ; addresource . profilename = resource . profilename ; return addresource . add_resource ( client ) ; }
|
Use this API to add vpnclientlessaccesspolicy .
|
2,230
|
public static base_response update ( nitro_service client , vpnclientlessaccesspolicy resource ) throws Exception { vpnclientlessaccesspolicy updateresource = new vpnclientlessaccesspolicy ( ) ; updateresource . name = resource . name ; updateresource . rule = resource . rule ; updateresource . profilename = resource . profilename ; return updateresource . update_resource ( client ) ; }
|
Use this API to update vpnclientlessaccesspolicy .
|
2,231
|
public static vpnclientlessaccesspolicy [ ] get ( nitro_service service ) throws Exception { vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy ( ) ; vpnclientlessaccesspolicy [ ] response = ( vpnclientlessaccesspolicy [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the vpnclientlessaccesspolicy resources that are configured on netscaler .
|
2,232
|
public static vpnclientlessaccesspolicy get ( nitro_service service , String name ) throws Exception { vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy ( ) ; obj . set_name ( name ) ; vpnclientlessaccesspolicy response = ( vpnclientlessaccesspolicy ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch vpnclientlessaccesspolicy resource of given name .
|
2,233
|
public static vpnclientlessaccesspolicy [ ] get_filtered ( nitro_service service , filtervalue [ ] filter ) throws Exception { vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; vpnclientlessaccesspolicy [ ] response = ( vpnclientlessaccesspolicy [ ] ) obj . getfiltered ( service , option ) ; return response ; }
|
Use this API to fetch filtered set of vpnclientlessaccesspolicy resources . set the filter parameter values in filtervalue object .
|
2,234
|
public static aaagroup_vpnsessionpolicy_binding [ ] get ( nitro_service service , String groupname ) throws Exception { aaagroup_vpnsessionpolicy_binding obj = new aaagroup_vpnsessionpolicy_binding ( ) ; obj . set_groupname ( groupname ) ; aaagroup_vpnsessionpolicy_binding response [ ] = ( aaagroup_vpnsessionpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch aaagroup_vpnsessionpolicy_binding resources of given name .
|
2,235
|
public static void main ( String [ ] args ) { TreebankLanguagePack tlp = new PennTreebankLanguagePack ( ) ; System . out . println ( "Start symbol: " + tlp . startSymbol ( ) ) ; String start = tlp . startSymbol ( ) ; System . out . println ( "Should be true: " + ( tlp . isStartSymbol ( start ) ) ) ; String [ ] strs = { "-" , "-LLB-" , "NP-2" , "NP=3" , "NP-LGS" , "NP-TMP=3" } ; for ( String str : strs ) { System . out . println ( "String: " + str + " basic: " + tlp . basicCategory ( str ) + " basicAndFunc: " + tlp . categoryAndFunction ( str ) ) ; } }
|
Prints a few aspects of the TreebankLanguagePack just for debugging .
|
2,236
|
public static auditsyslogpolicy_lbvserver_binding [ ] get ( nitro_service service , String name ) throws Exception { auditsyslogpolicy_lbvserver_binding obj = new auditsyslogpolicy_lbvserver_binding ( ) ; obj . set_name ( name ) ; auditsyslogpolicy_lbvserver_binding response [ ] = ( auditsyslogpolicy_lbvserver_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch auditsyslogpolicy_lbvserver_binding resources of given name .
|
2,237
|
public static appfwpolicylabel_policybinding_binding [ ] get ( nitro_service service , String labelname ) throws Exception { appfwpolicylabel_policybinding_binding obj = new appfwpolicylabel_policybinding_binding ( ) ; obj . set_labelname ( labelname ) ; appfwpolicylabel_policybinding_binding response [ ] = ( appfwpolicylabel_policybinding_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch appfwpolicylabel_policybinding_binding resources of given name .
|
2,238
|
public static nsacl6_stats [ ] get ( nitro_service service ) throws Exception { nsacl6_stats obj = new nsacl6_stats ( ) ; nsacl6_stats [ ] response = ( nsacl6_stats [ ] ) obj . stat_resources ( service ) ; return response ; }
|
Use this API to fetch the statistics of all nsacl6_stats resources that are configured on netscaler .
|
2,239
|
public static nsacl6_stats get ( nitro_service service , String acl6name ) throws Exception { nsacl6_stats obj = new nsacl6_stats ( ) ; obj . set_acl6name ( acl6name ) ; nsacl6_stats response = ( nsacl6_stats ) obj . stat_resource ( service ) ; return response ; }
|
Use this API to fetch statistics of nsacl6_stats resource of given name .
|
2,240
|
public static vpnglobal_vpntrafficpolicy_binding [ ] get ( nitro_service service ) throws Exception { vpnglobal_vpntrafficpolicy_binding obj = new vpnglobal_vpntrafficpolicy_binding ( ) ; vpnglobal_vpntrafficpolicy_binding response [ ] = ( vpnglobal_vpntrafficpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch a vpnglobal_vpntrafficpolicy_binding resources .
|
2,241
|
public static authenticationnegotiatepolicy_binding get ( nitro_service service , String name ) throws Exception { authenticationnegotiatepolicy_binding obj = new authenticationnegotiatepolicy_binding ( ) ; obj . set_name ( name ) ; authenticationnegotiatepolicy_binding response = ( authenticationnegotiatepolicy_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch authenticationnegotiatepolicy_binding resource of given name .
|
2,242
|
public static void main ( String [ ] args ) { Treebank treebank = new DiskTreebank ( ) ; treebank . loadPath ( args [ 0 ] ) ; WordStemmer ls = new WordStemmer ( ) ; for ( Tree tree : treebank ) { ls . visitTree ( tree ) ; System . out . println ( tree ) ; } }
|
Reads stems and prints the trees in the file .
|
2,243
|
public static base_response clear ( nitro_service client ) throws Exception { gslbldnsentries clearresource = new gslbldnsentries ( ) ; return clearresource . perform_operation ( client , "clear" ) ; }
|
Use this API to clear gslbldnsentries .
|
2,244
|
public static base_responses clear ( nitro_service client , gslbldnsentries resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { gslbldnsentries clearresources [ ] = new gslbldnsentries [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { clearresources [ i ] = new gslbldnsentries ( ) ; } result = perform_operation_bulk_request ( client , clearresources , "clear" ) ; } return result ; }
|
Use this API to clear gslbldnsentries resources .
|
2,245
|
public static gslbldnsentries [ ] get ( nitro_service service ) throws Exception { gslbldnsentries obj = new gslbldnsentries ( ) ; gslbldnsentries [ ] response = ( gslbldnsentries [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the gslbldnsentries resources that are configured on netscaler .
|
2,246
|
public AutomatonInstance doClone ( ) { AutomatonInstance clone = new AutomatonInstance ( this . automatonEng , this . current , this . instanceId , this . safeGuard ) ; clone . failed = this . failed ; clone . transitionCount = this . transitionCount ; clone . failCount = this . failCount ; clone . iterateCount = this . iterateCount ; clone . backtrackCount = this . backtrackCount ; clone . trace = new LinkedList < > ( ) ; for ( StateExploration se : this . trace ) { clone . trace . add ( se . doClone ( ) ) ; } return clone ; }
|
Creates a clone of the current automatonEng instance for iteration alternative purposes .
|
2,247
|
public static base_response add ( nitro_service client , clusternodegroup resource ) throws Exception { clusternodegroup addresource = new clusternodegroup ( ) ; addresource . name = resource . name ; addresource . strict = resource . strict ; return addresource . add_resource ( client ) ; }
|
Use this API to add clusternodegroup .
|
2,248
|
public static base_responses add ( nitro_service client , clusternodegroup resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { clusternodegroup addresources [ ] = new clusternodegroup [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new clusternodegroup ( ) ; addresources [ i ] . name = resources [ i ] . name ; addresources [ i ] . strict = resources [ i ] . strict ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
|
Use this API to add clusternodegroup resources .
|
2,249
|
public static base_response update ( nitro_service client , clusternodegroup resource ) throws Exception { clusternodegroup updateresource = new clusternodegroup ( ) ; updateresource . name = resource . name ; updateresource . strict = resource . strict ; return updateresource . update_resource ( client ) ; }
|
Use this API to update clusternodegroup .
|
2,250
|
public static base_responses update ( nitro_service client , clusternodegroup resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { clusternodegroup updateresources [ ] = new clusternodegroup [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new clusternodegroup ( ) ; updateresources [ i ] . name = resources [ i ] . name ; updateresources [ i ] . strict = resources [ i ] . strict ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update clusternodegroup resources .
|
2,251
|
public static base_responses unset ( nitro_service client , String name [ ] , String args [ ] ) throws Exception { base_responses result = null ; if ( name != null && name . length > 0 ) { clusternodegroup unsetresources [ ] = new clusternodegroup [ name . length ] ; for ( int i = 0 ; i < name . length ; i ++ ) { unsetresources [ i ] = new clusternodegroup ( ) ; unsetresources [ i ] . name = name [ i ] ; } result = unset_bulk_request ( client , unsetresources , args ) ; } return result ; }
|
Use this API to unset the properties of clusternodegroup resources . Properties that need to be unset are specified in args array .
|
2,252
|
public static clusternodegroup [ ] get ( nitro_service service ) throws Exception { clusternodegroup obj = new clusternodegroup ( ) ; clusternodegroup [ ] response = ( clusternodegroup [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the clusternodegroup resources that are configured on netscaler .
|
2,253
|
public static clusternodegroup get ( nitro_service service , String name ) throws Exception { clusternodegroup obj = new clusternodegroup ( ) ; obj . set_name ( name ) ; clusternodegroup response = ( clusternodegroup ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch clusternodegroup resource of given name .
|
2,254
|
public String haikunate ( ) { if ( tokenHex ) { tokenChars = "0123456789abcdef" ; } String adjective = randomString ( adjectives ) ; String noun = randomString ( nouns ) ; StringBuilder token = new StringBuilder ( ) ; if ( tokenChars != null && tokenChars . length ( ) > 0 ) { for ( int i = 0 ; i < tokenLength ; i ++ ) { token . append ( tokenChars . charAt ( random . nextInt ( tokenChars . length ( ) ) ) ) ; } } return Stream . of ( adjective , noun , token . toString ( ) ) . filter ( s -> s != null && ! s . isEmpty ( ) ) . collect ( joining ( delimiter ) ) ; }
|
Generate heroku - like random names
|
2,255
|
private String randomString ( String [ ] s ) { if ( s == null || s . length <= 0 ) return "" ; return s [ this . random . nextInt ( s . length ) ] ; }
|
Random string from string array
|
2,256
|
public static systemeventhistory [ ] get ( nitro_service service , systemeventhistory_args args ) throws Exception { systemeventhistory obj = new systemeventhistory ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; systemeventhistory [ ] response = ( systemeventhistory [ ] ) obj . get_resources ( service , option ) ; return response ; }
|
Use this API to fetch all the systemeventhistory resources that are configured on netscaler . This uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources .
|
2,257
|
public static String getPunctClass ( String punc ) { if ( punc . equals ( "%" ) || punc . equals ( "-PLUS-" ) ) return "perc" ; else if ( punc . startsWith ( "*" ) ) return "bullet" ; else if ( sfClass . contains ( punc ) ) return "sf" ; else if ( colonClass . contains ( punc ) || pEllipsis . matcher ( punc ) . matches ( ) ) return "colon" ; else if ( commaClass . contains ( punc ) ) return "comma" ; else if ( currencyClass . contains ( punc ) ) return "curr" ; else if ( slashClass . contains ( punc ) ) return "slash" ; else if ( lBracketClass . contains ( punc ) ) return "lrb" ; else if ( rBracketClass . contains ( punc ) ) return "rrb" ; else if ( quoteClass . contains ( punc ) ) return "quote" ; return "" ; }
|
Return the equivalence class of the argument . If the argument is not contained in and equivalence class then an empty string is returned .
|
2,258
|
public static vpnclientlessaccesspolicy_binding get ( nitro_service service , String name ) throws Exception { vpnclientlessaccesspolicy_binding obj = new vpnclientlessaccesspolicy_binding ( ) ; obj . set_name ( name ) ; vpnclientlessaccesspolicy_binding response = ( vpnclientlessaccesspolicy_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name .
|
2,259
|
public static crvserver_policymap_binding [ ] get ( nitro_service service , String name ) throws Exception { crvserver_policymap_binding obj = new crvserver_policymap_binding ( ) ; obj . set_name ( name ) ; crvserver_policymap_binding response [ ] = ( crvserver_policymap_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch crvserver_policymap_binding resources of given name .
|
2,260
|
public static dnsnsecrec [ ] get ( nitro_service service ) throws Exception { dnsnsecrec obj = new dnsnsecrec ( ) ; dnsnsecrec [ ] response = ( dnsnsecrec [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the dnsnsecrec resources that are configured on netscaler .
|
2,261
|
public static dnsnsecrec [ ] get ( nitro_service service , dnsnsecrec_args args ) throws Exception { dnsnsecrec obj = new dnsnsecrec ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; dnsnsecrec [ ] response = ( dnsnsecrec [ ] ) obj . get_resources ( service , option ) ; return response ; }
|
Use this API to fetch all the dnsnsecrec resources that are configured on netscaler . This uses dnsnsecrec_args which is a way to provide additional arguments while fetching the resources .
|
2,262
|
public static dnsnsecrec get ( nitro_service service , String hostname ) throws Exception { dnsnsecrec obj = new dnsnsecrec ( ) ; obj . set_hostname ( hostname ) ; dnsnsecrec response = ( dnsnsecrec ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch dnsnsecrec resource of given name .
|
2,263
|
public static dnsnsecrec [ ] get ( nitro_service service , String hostname [ ] ) throws Exception { if ( hostname != null && hostname . length > 0 ) { dnsnsecrec response [ ] = new dnsnsecrec [ hostname . length ] ; dnsnsecrec obj [ ] = new dnsnsecrec [ hostname . length ] ; for ( int i = 0 ; i < hostname . length ; i ++ ) { obj [ i ] = new dnsnsecrec ( ) ; obj [ i ] . set_hostname ( hostname [ i ] ) ; response [ i ] = ( dnsnsecrec ) obj [ i ] . get_resource ( service ) ; } return response ; } return null ; }
|
Use this API to fetch dnsnsecrec resources of given names .
|
2,264
|
public static < E > Set < E > diff ( Set < E > s1 , Set < E > s2 ) { Set < E > s = new HashSet < E > ( ) ; for ( E o : s1 ) { if ( ! s2 . contains ( o ) ) { s . add ( o ) ; } } return s ; }
|
Returns the difference of sets s1 and s2 .
|
2,265
|
public static < E > Set < E > union ( Set < E > s1 , Set < E > s2 ) { Set < E > s = new HashSet < E > ( ) ; s . addAll ( s1 ) ; s . addAll ( s2 ) ; return s ; }
|
Returns the union of sets s1 and s2 .
|
2,266
|
public static < E > Set < E > intersection ( Set < E > s1 , Set < E > s2 ) { Set < E > s = new HashSet < E > ( ) ; s . addAll ( s1 ) ; s . retainAll ( s2 ) ; return s ; }
|
Returns the intersection of sets s1 and s2 .
|
2,267
|
private void updateMaxMin ( IntervalRBTreeNode < T > n , IntervalRBTreeNode < T > c ) { if ( c != null ) { if ( n . max < c . max ) { n . max = c . max ; } if ( n . min > c . min ) { n . min = c . min ; } } }
|
Update max min .
|
2,268
|
private void setMaxMin ( IntervalRBTreeNode < T > n ) { n . min = n . left ; n . max = n . right ; if ( n . leftChild != null ) { n . min = Math . min ( n . min , n . leftChild . min ) ; n . max = Math . max ( n . max , n . leftChild . max ) ; } if ( n . rightChild != null ) { n . min = Math . min ( n . min , n . rightChild . min ) ; n . max = Math . max ( n . max , n . rightChild . max ) ; } }
|
Sets the max min .
|
2,269
|
public static appflowglobal_binding get ( nitro_service service ) throws Exception { appflowglobal_binding obj = new appflowglobal_binding ( ) ; appflowglobal_binding response = ( appflowglobal_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch a appflowglobal_binding resource .
|
2,270
|
public static authenticationvserver_authenticationcertpolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { authenticationvserver_authenticationcertpolicy_binding obj = new authenticationvserver_authenticationcertpolicy_binding ( ) ; obj . set_name ( name ) ; authenticationvserver_authenticationcertpolicy_binding response [ ] = ( authenticationvserver_authenticationcertpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch authenticationvserver_authenticationcertpolicy_binding resources of given name .
|
2,271
|
public static base_response Reboot ( nitro_service client , reboot resource ) throws Exception { reboot Rebootresource = new reboot ( ) ; Rebootresource . warm = resource . warm ; return Rebootresource . perform_operation ( client ) ; }
|
Use this API to Reboot reboot .
|
2,272
|
public static policydataset_value_binding [ ] get ( nitro_service service , String name ) throws Exception { policydataset_value_binding obj = new policydataset_value_binding ( ) ; obj . set_name ( name ) ; policydataset_value_binding response [ ] = ( policydataset_value_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch policydataset_value_binding resources of given name .
|
2,273
|
public static authenticationvserver_binding get ( nitro_service service , String name ) throws Exception { authenticationvserver_binding obj = new authenticationvserver_binding ( ) ; obj . set_name ( name ) ; authenticationvserver_binding response = ( authenticationvserver_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch authenticationvserver_binding resource of given name .
|
2,274
|
public static appqoepolicy [ ] get ( nitro_service service ) throws Exception { appqoepolicy obj = new appqoepolicy ( ) ; appqoepolicy [ ] response = ( appqoepolicy [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the appqoepolicy resources that are configured on netscaler .
|
2,275
|
public static appqoepolicy get ( nitro_service service , String name ) throws Exception { appqoepolicy obj = new appqoepolicy ( ) ; obj . set_name ( name ) ; appqoepolicy response = ( appqoepolicy ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch appqoepolicy resource of given name .
|
2,276
|
public static appqoepolicy [ ] get_filtered ( nitro_service service , filtervalue [ ] filter ) throws Exception { appqoepolicy obj = new appqoepolicy ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; appqoepolicy [ ] response = ( appqoepolicy [ ] ) obj . getfiltered ( service , option ) ; return response ; }
|
Use this API to fetch filtered set of appqoepolicy resources . set the filter parameter values in filtervalue object .
|
2,277
|
public static bridgegroup_nsip_binding [ ] get ( nitro_service service , Long id ) throws Exception { bridgegroup_nsip_binding obj = new bridgegroup_nsip_binding ( ) ; obj . set_id ( id ) ; bridgegroup_nsip_binding response [ ] = ( bridgegroup_nsip_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch bridgegroup_nsip_binding resources of given name .
|
2,278
|
public static gslbservice_stats [ ] get ( nitro_service service ) throws Exception { gslbservice_stats obj = new gslbservice_stats ( ) ; gslbservice_stats [ ] response = ( gslbservice_stats [ ] ) obj . stat_resources ( service ) ; return response ; }
|
Use this API to fetch the statistics of all gslbservice_stats resources that are configured on netscaler .
|
2,279
|
public static gslbservice_stats get ( nitro_service service , String servicename ) throws Exception { gslbservice_stats obj = new gslbservice_stats ( ) ; obj . set_servicename ( servicename ) ; gslbservice_stats response = ( gslbservice_stats ) obj . stat_resource ( service ) ; return response ; }
|
Use this API to fetch statistics of gslbservice_stats resource of given name .
|
2,280
|
public static sslpolicylabel [ ] get ( nitro_service service ) throws Exception { sslpolicylabel obj = new sslpolicylabel ( ) ; sslpolicylabel [ ] response = ( sslpolicylabel [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the sslpolicylabel resources that are configured on netscaler .
|
2,281
|
public static sslpolicylabel get ( nitro_service service , String labelname ) throws Exception { sslpolicylabel obj = new sslpolicylabel ( ) ; obj . set_labelname ( labelname ) ; sslpolicylabel response = ( sslpolicylabel ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch sslpolicylabel resource of given name .
|
2,282
|
public static sslcertlink [ ] get ( nitro_service service ) throws Exception { sslcertlink obj = new sslcertlink ( ) ; sslcertlink [ ] response = ( sslcertlink [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the sslcertlink resources that are configured on netscaler .
|
2,283
|
private void computeCosts ( ) { cost = Long . MAX_VALUE ; for ( QueueItem item : queueSpans ) { cost = Math . min ( cost , item . sequenceSpans . spans . cost ( ) ) ; } }
|
Compute costs .
|
2,284
|
private void fillQueue ( QueueItem item , Integer minStartPosition , Integer maxStartPosition , Integer minEndPosition ) throws IOException { int newStartPosition ; int newEndPosition ; Integer firstRetrievedPosition = null ; if ( ( minStartPosition != null ) && ( item . lowestPosition != null ) && ( item . lowestPosition < minStartPosition ) ) { item . del ( ( minStartPosition - 1 ) ) ; } while ( ! item . noMorePositions ) { boolean doNotCollectAnotherPosition ; doNotCollectAnotherPosition = item . filledPosition && ( minStartPosition == null ) && ( maxStartPosition == null ) ; doNotCollectAnotherPosition |= item . filledPosition && ( maxStartPosition != null ) && ( item . lastRetrievedPosition != null ) && ( maxStartPosition < item . lastRetrievedPosition ) ; if ( doNotCollectAnotherPosition ) { return ; } else { firstRetrievedPosition = null ; while ( ! item . noMorePositions ) { newStartPosition = item . sequenceSpans . spans . nextStartPosition ( ) ; if ( newStartPosition == NO_MORE_POSITIONS ) { if ( ! item . queue . isEmpty ( ) ) { item . filledPosition = true ; item . lastFilledPosition = item . lastRetrievedPosition ; } item . noMorePositions = true ; return ; } else if ( ( minStartPosition != null ) && ( newStartPosition < minStartPosition ) ) { } else { newEndPosition = item . sequenceSpans . spans . endPosition ( ) ; if ( ( minEndPosition == null ) || ( newEndPosition >= minEndPosition - ignoreItem . getMinStartPosition ( docId , newEndPosition ) ) ) { item . add ( newStartPosition , newEndPosition ) ; if ( firstRetrievedPosition == null ) { firstRetrievedPosition = newStartPosition ; } else if ( ! firstRetrievedPosition . equals ( newStartPosition ) ) { break ; } } } } } } }
|
Fill queue .
|
2,285
|
public static appfwprofile_stats [ ] get ( nitro_service service ) throws Exception { appfwprofile_stats obj = new appfwprofile_stats ( ) ; appfwprofile_stats [ ] response = ( appfwprofile_stats [ ] ) obj . stat_resources ( service ) ; return response ; }
|
Use this API to fetch the statistics of all appfwprofile_stats resources that are configured on netscaler .
|
2,286
|
public static appfwprofile_stats get ( nitro_service service , String name ) throws Exception { appfwprofile_stats obj = new appfwprofile_stats ( ) ; obj . set_name ( name ) ; appfwprofile_stats response = ( appfwprofile_stats ) obj . stat_resource ( service ) ; return response ; }
|
Use this API to fetch statistics of appfwprofile_stats resource of given name .
|
2,287
|
private static LogPriorType intToType ( int intPrior ) { LogPriorType [ ] values = LogPriorType . values ( ) ; for ( LogPriorType val : values ) { if ( val . ordinal ( ) == intPrior ) { return val ; } } throw new IllegalArgumentException ( intPrior + " is not a legal LogPrior." ) ; }
|
why isn t this functionality in enum?
|
2,288
|
public static base_response convert ( nitro_service client , sslpkcs12 resource ) throws Exception { sslpkcs12 convertresource = new sslpkcs12 ( ) ; convertresource . outfile = resource . outfile ; convertresource . Import = resource . Import ; convertresource . pkcs12file = resource . pkcs12file ; convertresource . des = resource . des ; convertresource . des3 = resource . des3 ; convertresource . export = resource . export ; convertresource . certfile = resource . certfile ; convertresource . keyfile = resource . keyfile ; convertresource . password = resource . password ; convertresource . pempassphrase = resource . pempassphrase ; return convertresource . perform_operation ( client , "convert" ) ; }
|
Use this API to convert sslpkcs12 .
|
2,289
|
public static base_response update ( nitro_service client , protocolhttpband resource ) throws Exception { protocolhttpband updateresource = new protocolhttpband ( ) ; updateresource . reqbandsize = resource . reqbandsize ; updateresource . respbandsize = resource . respbandsize ; return updateresource . update_resource ( client ) ; }
|
Use this API to update protocolhttpband .
|
2,290
|
public static base_response unset ( nitro_service client , protocolhttpband resource , String [ ] args ) throws Exception { protocolhttpband unsetresource = new protocolhttpband ( ) ; return unsetresource . unset_resource ( client , args ) ; }
|
Use this API to unset the properties of protocolhttpband resource . Properties that need to be unset are specified in args array .
|
2,291
|
public static protocolhttpband [ ] get ( nitro_service service , protocolhttpband_args args ) throws Exception { protocolhttpband obj = new protocolhttpband ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; protocolhttpband [ ] response = ( protocolhttpband [ ] ) obj . get_resources ( service , option ) ; return response ; }
|
Use this API to fetch all the protocolhttpband resources that are configured on netscaler . This uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources .
|
2,292
|
public static authenticationldappolicy_vpnglobal_binding [ ] get ( nitro_service service , String name ) throws Exception { authenticationldappolicy_vpnglobal_binding obj = new authenticationldappolicy_vpnglobal_binding ( ) ; obj . set_name ( name ) ; authenticationldappolicy_vpnglobal_binding response [ ] = ( authenticationldappolicy_vpnglobal_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch authenticationldappolicy_vpnglobal_binding resources of given name .
|
2,293
|
public static base_response Force ( nitro_service client , hafailover resource ) throws Exception { hafailover Forceresource = new hafailover ( ) ; Forceresource . force = resource . force ; return Forceresource . perform_operation ( client , "Force" ) ; }
|
Use this API to Force hafailover .
|
2,294
|
public static aaapreauthenticationpolicy_binding get ( nitro_service service , String name ) throws Exception { aaapreauthenticationpolicy_binding obj = new aaapreauthenticationpolicy_binding ( ) ; obj . set_name ( name ) ; aaapreauthenticationpolicy_binding response = ( aaapreauthenticationpolicy_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch aaapreauthenticationpolicy_binding resource of given name .
|
2,295
|
protected static boolean numericEquals ( Field vector1 , Field vector2 ) { if ( vector1 . size ( ) != vector2 . size ( ) ) return false ; if ( vector1 . isEmpty ( ) ) return true ; Iterator < Object > it1 = vector1 . iterator ( ) ; Iterator < Object > it2 = vector2 . iterator ( ) ; while ( it1 . hasNext ( ) ) { Object obj1 = it1 . next ( ) ; Object obj2 = it2 . next ( ) ; if ( ! ( obj1 instanceof Number && obj2 instanceof Number ) ) return false ; if ( ( ( Number ) obj1 ) . doubleValue ( ) != ( ( Number ) obj2 ) . doubleValue ( ) ) return false ; } return true ; }
|
Compares two vectors and determines if they are numeric equals independent of its type .
|
2,296
|
protected boolean setFieldIfNecessary ( String field , Object value ) { if ( ! isOpen ( ) ) throw new ClosedObjectException ( "The Document object is closed." ) ; if ( ! compareFieldValue ( field , value ) ) { _doc . setField ( field , value ) ; return true ; } return false ; }
|
Verifies if the new value is different from the field s old value . It s useful for example in NoSQL databases that replicates data between servers . This verification prevents to mark a field as modified and to be replicated needlessly .
|
2,297
|
public static appflowpolicy_appflowglobal_binding [ ] get ( nitro_service service , String name ) throws Exception { appflowpolicy_appflowglobal_binding obj = new appflowpolicy_appflowglobal_binding ( ) ; obj . set_name ( name ) ; appflowpolicy_appflowglobal_binding response [ ] = ( appflowpolicy_appflowglobal_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch appflowpolicy_appflowglobal_binding resources of given name .
|
2,298
|
public static base_response add ( nitro_service client , lbroute resource ) throws Exception { lbroute addresource = new lbroute ( ) ; addresource . network = resource . network ; addresource . netmask = resource . netmask ; addresource . gatewayname = resource . gatewayname ; return addresource . add_resource ( client ) ; }
|
Use this API to add lbroute .
|
2,299
|
public static base_response delete ( nitro_service client , lbroute resource ) throws Exception { lbroute deleteresource = new lbroute ( ) ; deleteresource . network = resource . network ; deleteresource . netmask = resource . netmask ; return deleteresource . delete_resource ( client ) ; }
|
Use this API to delete lbroute .
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.