idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
14,100 | public static final long move ( ByteBuffer b1 , ByteBuffer b2 ) { int remaining1 = b1 . remaining ( ) ; int remaining2 = b2 . remaining ( ) ; if ( remaining1 <= remaining2 ) { b2 . put ( b1 ) ; return remaining1 ; } else { int safeLimit = b1 . limit ( ) ; b1 . limit ( b1 . position ( ) + remaining2 ) ; b2 . put ( b1 ) ... | Moves bytes from b1 to b2 as much as is possible . Positions are moved according to move . |
14,101 | public static final long move ( ByteBuffer bb , ByteBuffer [ ] bbArray , int offset , int length ) { return move ( new ByteBuffer [ ] { bb } , 0 , 1 , bbArray , offset , length ) ; } | Moves bytes from bb to bbArray as much as is possible . Positions are moved according to move . Returns number of bytes moved . |
14,102 | public static final long move ( ByteBuffer [ ] bbArray1 , ByteBuffer [ ] bbArray2 ) { return move ( bbArray1 , 0 , bbArray2 . length , bbArray2 , 0 , bbArray2 . length ) ; } | Moves bytes from bbArray1 to bbArray2 as much as is possible . Positions are moved according to move . Returns number of bytes moved . |
14,103 | public static final long move ( ByteBuffer [ ] bbArray1 , int offset1 , int length1 , ByteBuffer [ ] bbArray2 , int offset2 , int length2 ) { if ( length1 == 0 || length2 == 0 ) { return 0 ; } long res = 0 ; ArrayIterator < ByteBuffer > i1 = new ArrayIterator < > ( bbArray1 , offset1 , length1 ) ; ArrayIterator < ByteB... | Moves bytes from ba1 to ba2 as much as is possible . Positions are moved according to move . Returns number of bytes moved . |
14,104 | public int [ ] calculateInYearsMonthsDaysHoursMinutesAndSeconds ( final long compute ) { long uebrig = - 1 ; final int [ ] result = new int [ 6 ] ; final int years = ( int ) this . calculateInYears ( compute ) ; if ( 0 < years ) { result [ 0 ] = years ; uebrig = compute - years * ONE_YEAR ; } else { result [ 0 ] = 0 ; ... | Calculate in years months days hours minutes and seconds . |
14,105 | public String getHumanReadableAge ( final int [ ] readableAge ) { if ( null == readableAge || readableAge . length != 6 ) { throw new IllegalArgumentException ( "Int array should not be null and the length should be equal 6." ) ; } final StringBuilder result = new StringBuilder ( ) ; result . append ( "Your are " ) ; r... | Gets a human readable string from the age . |
14,106 | public List < Tag > getAllTags ( ) { List < Tag > ret = new Vector < Tag > ( taggers . size ( ) ) ; for ( Tagger tagger : taggers ) ret . add ( tagger . getTag ( ) ) ; return ret ; } | Obtains the list of all tags used by the taggers |
14,107 | public void floodFill ( int xx , int yy , int replacement ) { floodFill ( xx , yy , ( c ) -> c != replacement , replacement ) ; } | Fills area starting at xx yy . Area must be surrounded with replacement color . |
14,108 | public void floodFill ( int xx , int yy , IntPredicate target , int replacement ) { floodFill ( xx , yy , 0 , 0 , width , height , target , replacement ) ; } | Fills area starting at xx yy . Pixels fullfilling target are replaced with replacement color . |
14,109 | public void init ( RecordOwnerParent parent , Rec record , Map < String , Object > properties ) { ScreenLocation itsLocation = null ; Converter fieldConverter = null ; int iDisplayFieldDesc = ScreenConstants . DEFAULT_DISPLAY ; if ( properties != null ) { if ( properties . get ( ScreenModel . LOCATION ) instanceof Scre... | This is the new constructor list . This initializer is required by the RecordOwner interface . |
14,110 | public void addListeners ( ) { super . addListeners ( ) ; if ( this . getMainRecord ( ) != null ) this . getMainRecord ( ) . addScreenListeners ( this ) ; if ( this . getMainRecord ( ) != null ) if ( DBConstants . TRUE . equalsIgnoreCase ( this . getMainRecord ( ) . getTable ( ) . getDatabase ( ) . getProperty ( DBCons... | Override this to add behaviors . |
14,111 | public boolean onLogon ( ) { Record record = Record . makeRecordFromClassName ( UserInfoModel . THICK_CLASS , this ) ; this . removeRecord ( record ) ; BasePanel parentScreen = this . getParentScreen ( ) ; ScreenLocation itsLocation = this . getScreenLocation ( ) ; parentScreen . popHistory ( 1 , false ) ; parentScreen... | Display the Logon screen . |
14,112 | public static ScreenParent makeScreenFromParams ( Task task , ScreenLoc itsLocation , ComponentParent screenParent , int iDocType , Map < String , Object > properties ) { iDocType = iDocType & ~ ( ScreenConstants . DISPLAY_MASK | ScreenConstants . SCREEN_TYPE_MASK ) ; ScreenParent screen = null ; String strScreen = tas... | Make a screen window from the current params . |
14,113 | public String title ( ) { if ( getPlaceId ( ) != null ) { return getFormattedAddress ( ) ; } else { final TitleBuffer buf = new TitleBuffer ( ) ; buf . append ( getAddressLine1 ( ) ) . append ( "," , getAddressLine2 ( ) ) . append ( "," , getAddressLine3 ( ) ) . append ( "," , getAddressLine4 ( ) ) . append ( "," , get... | region > title |
14,114 | public Location getLocation ( ) { final String latLng = getLatLng ( ) ; return latLng != null ? Location . fromString ( latLng . replace ( "," , ";" ) ) : null ; } | region > Locatable API |
14,115 | void lifecycleAvailable ( Lifecycle lifecycle ) { LOG . debug ( "Lifecycle now available, draining queue" ) ; lifecycle . addListener ( LifecycleStage . CONFIGURE_STAGE , new LifecycleListener ( ) { public void onStage ( LifecycleStage lifecycleStage ) { LOG . debug ( "Lifecycle started, further injections disallowed" ... | Called once Guice has created our Lifecycle so we can start registering callbacks |
14,116 | public int compareVersions ( VersionedOntology o ) throws OntopException { if ( ! base . equals ( o . base ) || ! ontologyPath . equals ( o . ontologyPath ) ) { throw new OntopException ( "Version comparison must be done with same ontology series." ) ; } if ( major > o . major ) { return 1 ; } else if ( major == o . ma... | returns - 1 if this is lower than o returns 0 if this is equal to o returns 1 if this is greater than o |
14,117 | public boolean readCurrentUser ( ) { String strUserName = this . getProperty ( DBParams . USER_NAME ) ; String strUserID = this . getProperty ( DBParams . USER_ID ) ; boolean bUserFound = false ; if ( ( this . getMainRecord ( ) . getEditMode ( ) == DBConstants . EDIT_CURRENT ) || ( this . getMainRecord ( ) . getEditMod... | ReadCurrentUser Method . |
14,118 | public void addAutoLoginHandler ( ) { this . getMainRecord ( ) . addListener ( new FileListener ( null ) { public int doRecordChange ( FieldInfo field , int iChangeType , boolean bDisplayOption ) { int iErrorCode = super . doRecordChange ( field , iChangeType , bDisplayOption ) ; if ( ( iChangeType == DBConstants . AFT... | AddAutoLoginHandler Method . |
14,119 | public static boolean addStaticExtension ( String extension ) { if ( AssertUtils . isEmpty ( extension ) ) { return false ; } if ( ! extension . startsWith ( "." ) ) { extension = "." + extension ; } extension = extension . toLowerCase ( ) ; return STATIC_RESOURCE_EXTENSIONS . add ( extension ) ; } | Add the given extension to the list of static resources . |
14,120 | private boolean isStaticResource ( String uri ) { int index = uri . lastIndexOf ( '.' ) ; if ( index == - 1 ) { return false ; } String currentExtension = uri . substring ( index ) ; return STATIC_RESOURCE_EXTENSIONS . contains ( currentExtension ) ; } | Method that given a URL checks if the resources is static or not - depending on the request extension like . css . js . png etc . |
14,121 | public static TimecodeDuration valueOf ( String timecode ) throws IllegalArgumentException { TimecodeDuration td = new TimecodeDuration ( ) ; return ( TimecodeDuration ) td . parse ( timecode ) ; } | Returns a TimecodeDuration instance for given TimecodeDuration storage string . Will return null in case the storage string represents a null TimecodeDuration |
14,122 | public SceneManager setWindowForTerminating ( Window window ) { this . window = window ; window . addWindowListener ( new WindowAdapter ( ) { public void windowClosing ( WindowEvent e ) { terminate ( ) ; } public void windowClosed ( WindowEvent e ) { terminate ( ) ; } } ) ; return this ; } | Sets the specified window . The window will be disposed when terminating this manager . This manager will also be terminated when closing the window . |
14,123 | public void init ( String text ) { this . setOpaque ( true ) ; this . setHorizontalTextPosition ( JToggleButton . LEFT ) ; this . setAlignmentX ( JComponent . CENTER_ALIGNMENT ) ; } | Creates new JCellButton |
14,124 | public Component getTableCellRendererComponent ( JTable table , Object value , boolean isSelected , boolean hasFocus , int row , int column ) { this . setControlValue ( value ) ; if ( isSelected && ! hasFocus ) { this . setForeground ( table . getSelectionForeground ( ) ) ; this . setBackground ( table . getSelectionBa... | Get the renderer for this location in the table . From the TableCellRenderer interface . Sets the value of this control and returns this . |
14,125 | public Component getTableCellEditorComponent ( JTable table , Object value , boolean isSelected , int row , int column ) { this . setControlValue ( value ) ; return this ; } | Get the editor for this location in the table . From the TableCellEditor interface . Sets the value of this control and returns this . |
14,126 | public Object getCellEditorValue ( ) { boolean bValue = this . isSelected ( ) ; if ( bValue ) return Boolean . TRUE . toString ( ) ; else return Boolean . FALSE . toString ( ) ; } | Get the value . From the TableCellEditor interface . |
14,127 | public void setControlValue ( Object value ) { Boolean boolValue = null ; if ( value instanceof String ) if ( ( ( String ) value ) . length ( ) > 0 ) boolValue = new Boolean ( ( String ) value ) ; if ( boolValue == null ) boolValue = Boolean . FALSE ; this . setSelected ( boolValue . booleanValue ( ) ) ; } | Set the value of this checkbox . |
14,128 | public Record openMainRecord ( ) { Record record = Record . makeRecordFromClassName ( MenusModel . THICK_CLASS , this ) ; record . setOpenMode ( DBConstants . OPEN_READ_ONLY ) ; return record ; } | OpenMainFile Method . |
14,129 | private String fixDatabaseName ( String databaseName , Record record , Map < String , String > oldProperties ) { if ( databaseName . endsWith ( BaseDatabase . SHARED_SUFFIX ) ) databaseName = databaseName . substring ( 0 , databaseName . length ( ) - BaseDatabase . SHARED_SUFFIX . length ( ) ) ; else if ( databaseName ... | Clean up the database name ; |
14,130 | private String getDatabaseInfoDatabaseName ( String className ) { String databaseName = className . substring ( 0 , className . length ( ) - 1 - DatabaseInfo . DATABASE_INFO_FILE . length ( ) ) ; databaseName = databaseName . substring ( databaseName . lastIndexOf ( '.' ) + 1 ) ; if ( databaseName . endsWith ( BaseData... | GetDatabaseInfoDatabaseName Method . |
14,131 | public void saveOldProperties ( Map < String , String > oldProperties , Record record ) { this . saveOldProperty ( oldProperties , record . getDatabaseName ( ) + BaseDatabase . DBSHARED_PARAM_SUFFIX ) ; this . saveOldProperty ( oldProperties , record . getDatabaseName ( ) + BaseDatabase . DBUSER_PARAM_SUFFIX ) ; this .... | SaveOldProperties Method . |
14,132 | public void saveOldProperty ( Map < String , String > oldProperties , String param ) { oldProperties . put ( param , this . getTask ( ) . getProperty ( param ) ) ; } | SaveOldProperty Method . |
14,133 | public void restoreOldProperties ( Map < String , String > oldProperties , Record record ) { this . restoreOldProperty ( oldProperties , record . getDatabaseName ( ) + BaseDatabase . DBSHARED_PARAM_SUFFIX ) ; this . restoreOldProperty ( oldProperties , record . getDatabaseName ( ) + BaseDatabase . DBUSER_PARAM_SUFFIX )... | RestoreOldProperties Method . |
14,134 | private void restoreOldProperty ( Map < String , String > oldProperties , String param ) { this . getTask ( ) . setProperty ( param , oldProperties . get ( param ) ) ; } | RestoreOldProperty Method . |
14,135 | public int getUserID ( ) { int iUserID = - 1 ; String strUserID = DBConstants . BLANK ; if ( this . getRecord ( ) . getRecordOwner ( ) != null ) if ( this . getRecord ( ) . getRecordOwner ( ) . getTask ( ) != null ) if ( this . getRecord ( ) . getRecordOwner ( ) . getTask ( ) . getApplication ( ) != null ) strUserID = ... | Get the current User s ID . |
14,136 | public final Object [ ] [ ] cloneMatrix ( Object [ ] [ ] tempString ) { Object [ ] [ ] mxString = null ; if ( tempString != null ) { mxString = new Object [ tempString . length ] [ 2 ] ; for ( int i = 0 ; i < tempString . length ; i ++ ) { mxString [ i ] [ MessageConstants . NAME ] = tempString [ i ] [ MessageConstants... | Create a copy of this matrix . |
14,137 | public void propertyChange ( final java . beans . PropertyChangeEvent p1 ) { this . firePropertyChange ( p1 . getPropertyName ( ) , p1 . getOldValue ( ) , p1 . getNewValue ( ) ) ; } | Pass the property changes on to my listeners . |
14,138 | public void scanTreeForExcludes ( StringBuffer sb , String strParentFolderID ) { m_recPackagesExclude . setKeyArea ( Packages . PARENT_FOLDER_ID_KEY ) ; StringSubFileFilter listener = null ; m_recPackagesExclude . addListener ( listener = new StringSubFileFilter ( strParentFolderID , Packages . PARENT_FOLDER_ID , null ... | ScanTreeForExcludes Method . |
14,139 | public String getTree ( Record recPackages ) { try { if ( m_recPackagesTree == null ) { RecordOwner recordOwner = this . getOwner ( ) . findRecordOwner ( ) ; m_recPackagesTree = new Packages ( recordOwner ) ; if ( recordOwner != null ) recordOwner . removeRecord ( m_recPackagesTree ) ; } String strPackagesTree = recPac... | GetTree Method . |
14,140 | public void addElement ( int iTargetPosition , Object bookmark , GridList gridList ) { int iArrayIndex = this . bufferToArrayIndex ( iTargetPosition ) ; if ( ! this . inBufferArray ( iTargetPosition ) ) iArrayIndex = this . newBufferStartsAt ( iTargetPosition , gridList ) ; m_aCurrentRecord [ iArrayIndex ] = bookmark ;... | Add this record s unique info to current buffer . |
14,141 | public int findElement ( Object bookmark , int iHandleType ) { int iTargetPosition ; Object thisBookmark = null ; if ( bookmark == null ) return - 1 ; boolean bDataRecordFormat = false ; for ( iTargetPosition = m_iCurrentRecordStart ; iTargetPosition < m_iCurrentRecordEnd ; iTargetPosition ++ ) { thisBookmark = this . ... | This method does a sequential seqrch through the buffer looking for the bookmark . |
14,142 | public boolean inBufferList ( int iTargetPosition ) { boolean bInBufferList = ( ( iTargetPosition >= m_iCurrentRecordStart ) && ( iTargetPosition < m_iCurrentRecordEnd ) ) ; if ( bInBufferList ) if ( m_aCurrentRecord [ this . bufferToArrayIndex ( iTargetPosition ) ] == gEmptyCell ) bInBufferList = false ; return bInBuf... | Is this actual file position in the current cache? |
14,143 | public void moveBufferToAccessList ( GridList gridList ) { for ( int index = m_iCurrentRecordStart ; index < m_iCurrentRecordEnd ; index ++ ) { int iArrayIndex = this . bufferToArrayIndex ( index ) ; Object bookmark = m_aCurrentRecord [ iArrayIndex ] ; if ( bookmark != gEmptyCell ) gridList . addElement ( index , bookm... | Move these to the access list before getting rid of them . |
14,144 | public int newBufferStartsAt ( int iTargetPosition , GridList gridList ) { if ( gridList != null ) this . moveBufferToAccessList ( gridList ) ; for ( int index = m_iCurrentRecordStart ; index < m_iCurrentRecordEnd ; index ++ ) { int iArrayIndex = this . bufferToArrayIndex ( index ) ; Object bookmark = m_aCurrentRecord ... | Shift the current cache to the current records and setup a new buffer . |
14,145 | private ResourceHandler createZipResourceHandler ( final URL zipFile ) throws IOException { final FileSystem fileSystem = newFileSystem ( URI . create ( "jar:" + zipFile ) , Collections . < String , Object > emptyMap ( ) ) ; final ResourceManager resMgr = new FileSystemResourceManager ( fileSystem ) ; return new Resour... | Creates the resource handle for a zip file specified by the URL . |
14,146 | public void setReturnSessionOrObject ( PrintWriter out , Object objReturn ) { String strID = null ; String strSessionClass = null ; if ( objReturn instanceof RemoteTable ) { strSessionClass = REMOTE_TABLE ; strID = this . add ( new TableHolder ( this , ( RemoteTable ) objReturn ) ) ; } else if ( objReturn instanceof Re... | If this is a session convert to a proxy session and return if object convert and return . |
14,147 | public void free ( ) { m_dependentStateListener = null ; this . removeListener ( false ) ; if ( m_nextListener != null ) { m_nextListener . free ( ) ; m_nextListener = null ; } } | Free this listener . |
14,148 | public void doAddListener ( BaseListener listener ) { if ( m_nextListener != null ) m_nextListener . doAddListener ( listener ) ; else m_nextListener = listener ; } | Add a listener to the end of the chain . |
14,149 | public void removeListener ( BaseListener listener , boolean bFreeFlag ) { if ( m_nextListener != null ) { if ( m_nextListener == listener ) { m_nextListener = listener . getNextListener ( ) ; listener . unlink ( bFreeFlag ) ; } else m_nextListener . removeListener ( listener , bFreeFlag ) ; } } | Remove a specific listener from the chain . |
14,150 | public BaseListener getNextEnabledListener ( ) { if ( m_nextListener == null ) return null ; if ( m_nextListener . isEnabled ( ) ) return m_nextListener ; else return m_nextListener . getNextEnabledListener ( ) ; } | Get then next enabled listener in the chain . |
14,151 | public String getFullPath ( String strSite , String strPath ) { if ( strSite != null ) { if ( strPath != null ) if ( strPath . startsWith ( "/" ) ) strPath = strSite + strPath ; } return strPath ; } | GetFullPath Method . |
14,152 | public Record moveToCurrentRecord ( Record recBase ) { if ( recBase == null ) recBase = this . getBaseRecord ( ) ; BaseField fldRecordType = recBase . getSharedRecordTypeKey ( ) ; Object objKey = fldRecordType . getData ( ) ; BaseTable tableCurrent = this . getTableAt ( objKey ) ; Record recCurrent = null ; if ( tableC... | Figure what kind of record this record is and move it to the correct record . |
14,153 | public void copyRecordInfo ( Record recDest , Record recSource , boolean bCopyEditMode , boolean bOnlyModifiedFields ) { if ( recDest == null ) recDest = this . getCurrentRecord ( ) ; if ( recDest != recSource ) { boolean bAllowFieldChange = false ; boolean bMoveModifiedState = true ; Object [ ] rgobjEnabledFieldsOld =... | Set the current table target . |
14,154 | public static < T > Optional < T > of ( final T optionalValue ) { checkNotNull ( optionalValue , "Optional value may not be null in method of" ) ; return new Optional < T > ( optionalValue ) ; } | Returns an Optional with the specified present non - null value . |
14,155 | public Optional < T > filter ( final Predicate < ? super T > predicate ) { if ( isPresent ( ) && predicate . test ( get ( ) ) ) { return this ; } return empty ( ) ; } | Apply a predicate to the optional if the optional is present and the predicate is true return the optional otherwise return empty . |
14,156 | public Optional < T > ifPresent ( final Consumer < ? super T > consumer ) { if ( isPresent ( ) ) { consumer . accept ( get ( ) ) ; } return this ; } | If a value is present invoke the specified consumer with the value otherwise do nothing . |
14,157 | public T orElseSupplier ( final Supplier < T > other ) { checkNotNull ( other , "orElse requires a non null supplier" ) ; if ( isPresent ( ) ) { return get ( ) ; } return other . get ( ) ; } | Return the value if present otherwise get the value from the Supplier . |
14,158 | public T orElseThrow ( final String msg ) { checkNonEmptyString ( msg , "Valid message required" ) ; if ( isPresent ( ) ) { return get ( ) ; } throw new NoSuchElementException ( msg ) ; } | If optional is not empty return it s value if empty throw a NoSuchElementException with message . |
14,159 | public < V > Optional < V > map ( final Function < T , V > function ) { checkNotNull ( function , "Must provide non null function to map" ) ; if ( isPresent ( ) ) { final V applied = function . apply ( get ( ) ) ; return applied == null ? Optional . < V > empty ( ) : Optional . of ( function . apply ( get ( ) ) ) ; } e... | If a value is present map is with function and if the result is non - null return an Optional describing the result . Otherwise return an empty Optional . |
14,160 | public static String hash ( String plaintext ) throws WrappedException { try { MessageDigest md = MessageDigest . getInstance ( "SHA-1" ) ; md . update ( plaintext . getBytes ( "UTF-8" ) ) ; return hexEncode ( md . digest ( ) ) ; } catch ( NoSuchAlgorithmException | UnsupportedEncodingException e ) { throw new WrappedE... | Performs a one - way hash of the plaintext value using SHA - 1 . |
14,161 | public static String generateKey ( ) { byte [ ] bytes = new byte [ 32 ] ; getRandom ( ) . nextBytes ( bytes ) ; char [ ] chars = new char [ 64 ] ; for ( int c = 0 ; c < 32 ; c ++ ) { byte b = bytes [ c ] ; chars [ c * 2 ] = hexChars [ ( b & 255 ) >>> 4 ] ; chars [ c * 2 + 1 ] = hexChars [ b & 15 ] ; } return new String... | Generates a random key . |
14,162 | @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public static byte [ ] encode ( final String attributeName , final Object obj ) { TypeConverter converter = DataConverter . attributeConverters . get ( attributeName ) ; if ( converter == null ) { log . warn ( "Unable to find a suitable data converter for attribute {}... | Encodes attribute data into the standard binary representation for the type . |
14,163 | public static TypeConverter < ? > putConverter ( final String attributeName , final String type ) { TypeConverter < ? > conv = DataConverter . converterClasses . get ( type ) ; if ( conv == null ) { log . warn ( "Could not find a converter for data type {}." , type ) ; throw new IllegalArgumentException ( "Could not fi... | Maps a converter for an Attribute name . |
14,164 | public void addRelationshipToTarget ( final Level level , final RelationshipType type ) { final TargetRelationship relationship = new TargetRelationship ( this , level , type ) ; levelRelationships . add ( relationship ) ; relationships . add ( relationship ) ; } | Add a relationship to the target level . |
14,165 | public List < Relationship > getPreviousRelationships ( ) { final List < Relationship > prevRelationships = new LinkedList < Relationship > ( ) ; for ( final Relationship r : relationships ) { if ( r . getType ( ) == RelationshipType . PREVIOUS ) { prevRelationships . add ( r ) ; } } return prevRelationships ; } | Gets a list of previous relationships for the Topic . |
14,166 | public List < Relationship > getNextRelationships ( ) { final List < Relationship > nextRelationships = new LinkedList < Relationship > ( ) ; for ( final Relationship r : relationships ) { if ( r . getType ( ) == RelationshipType . NEXT ) { nextRelationships . add ( r ) ; } } return nextRelationships ; } | Gets a list of next relationships for the Topic . |
14,167 | public List < Relationship > getPrerequisiteRelationships ( ) { final List < Relationship > prerequisiteRelationships = new LinkedList < Relationship > ( ) ; for ( final Relationship r : relationships ) { if ( r . getType ( ) == RelationshipType . PREREQUISITE ) { prerequisiteRelationships . add ( r ) ; } } return prer... | Gets a list of prerequisite relationships for the topic . |
14,168 | public List < Relationship > getRelatedRelationships ( ) { final List < Relationship > relatedRelationships = new LinkedList < Relationship > ( ) ; for ( final Relationship r : relationships ) { if ( r . getType ( ) == RelationshipType . REFER_TO ) { relatedRelationships . add ( r ) ; } } return relatedRelationships ; ... | Gets a list of related relationships for the topic . |
14,169 | public List < Relationship > getLinkListRelationships ( ) { final List < Relationship > linkListRelationships = new LinkedList < Relationship > ( ) ; for ( final Relationship r : relationships ) { if ( r . getType ( ) == RelationshipType . LINKLIST ) { linkListRelationships . add ( r ) ; } } return linkListRelationship... | Gets a list of link - list relationships for the topic . |
14,170 | private boolean printRelationshipsWithLongSyntax ( final List < Relationship > relationships ) { for ( final Relationship relationship : relationships ) { if ( relationship . getRelationshipTitle ( ) != null && ! relationship . getRelationshipTitle ( ) . trim ( ) . isEmpty ( ) ) { return true ; } } return false ; } | Checks to see if a list of relationships should be printed using the long syntax . |
14,171 | protected String generateRelationshipText ( final RelationshipType relationshipType , boolean shortSyntax , final String spacer ) { final StringBuilder retValue ; final List < Relationship > relationships ; if ( relationshipType == RelationshipType . REFER_TO ) { if ( shortSyntax ) { retValue = new StringBuilder ( " [R... | Creates the relationship text to be added to a topic s text . |
14,172 | public static final FileFormat getFileFormat ( Path path , Map < String , ? > env ) { FileFormat fmt = ( FileFormat ) env . get ( FORMAT ) ; String filename = path . getFileName ( ) . toString ( ) ; if ( fmt == null ) { if ( filename . endsWith ( ".tar.gz" ) || filename . endsWith ( ".tar" ) || filename . endsWith ( ".... | Returns FileFormat either from env or using default value which is TAR_GNU for tar and CPIO_CRC for others . |
14,173 | public static final FileAttribute < ? > [ ] getFileAttributes ( Map < String , ? > env ) { FileAttribute < ? > [ ] attrs = ( FileAttribute < ? > [ ] ) env . get ( FILE_ATTRIBUTES ) ; if ( attrs == null ) { attrs = new FileAttribute < ? > [ 0 ] ; } return attrs ; } | Return file attributes from env or empty array . These attributes are used in creating archive file . Because of zip - file - system crashes if trying to open file system for not existing file . |
14,174 | public static final FileAttribute < ? > [ ] getDefaultRegularFileAttributes ( Map < String , ? > env ) { FileAttribute < ? > [ ] attrs = ( FileAttribute < ? > [ ] ) env . get ( DEFAULT_REGULAR_FILE_ATTRIBUTES ) ; if ( attrs == null ) { attrs = new FileAttribute < ? > [ ] { PosixFilePermissions . asFileAttribute ( Posix... | Return default attributes for new regular file . Either from env or default values . |
14,175 | public static final FileAttribute < ? > [ ] getDefaultDirectoryFileAttributes ( Map < String , ? > env ) { FileAttribute < ? > [ ] attrs = ( FileAttribute < ? > [ ] ) env . get ( DEFAULT_DIRECTORY_FILE_ATTRIBUTES ) ; if ( attrs == null ) { attrs = new FileAttribute < ? > [ ] { PosixFilePermissions . asFileAttribute ( P... | Return default attributes for new directory . Either from env or default values . |
14,176 | public static final FileAttribute < ? > [ ] getDefaultSymbolicLinkFileAttributes ( Map < String , ? > env ) { FileAttribute < ? > [ ] attrs = ( FileAttribute < ? > [ ] ) env . get ( DEFAULT_SYMBOLIC_LINK_FILE_ATTRIBUTES ) ; if ( attrs == null ) { attrs = new FileAttribute < ? > [ ] { PosixFilePermissions . asFileAttrib... | Return default attributes for new symbolic link . Either from env or default values . |
14,177 | public static final Set < ? extends OpenOption > getOpenOptions ( Path path , Map < String , ? > env ) throws IOException { Set < ? extends OpenOption > opts = ( Set < ? extends OpenOption > ) env . get ( OPEN_OPTIONS ) ; if ( opts == null ) { if ( Files . exists ( path ) && Files . size ( path ) > 0 ) { opts = EnumSet... | Returns open - options . Returns from env if exists . Otherwise if file exists and size greater than 0 returns READ or READ WRITE . |
14,178 | private synchronized WatchKey getWatchKeyForPath ( final String path ) throws IOException { WatchKey key = watchKeysByPath . get ( path ) ; if ( key == null ) { logger . debug ( "Lazy-instantiating watch key for path: {}" , path ) ; key = Paths . get ( path ) . register ( watchService , interested_types ) ; watchKeysBy... | Gets the watch key for a path with lazy initialization . |
14,179 | private synchronized WatchEvent < Path > resolveEventWithCorrectPath ( final WatchKey key , final WatchEvent < Path > event ) { Path correctPath = Paths . get ( pathsByWatchKey . get ( key ) ) ; return new ResolvedPathWatchEvent ( event , correctPath ) ; } | Resolves a watch event with its absolute path . |
14,180 | public SampleMessage getNextSample ( ) { if ( this . connected ) { try { return this . sampleQueue . take ( ) ; } catch ( InterruptedException e ) { log . error ( "Interrupted while waiting for next sample to arrive." , e ) ; } return null ; } throw new IllegalStateException ( "Connection to the aggregator has terminat... | Returns the next sample from the Aggregator blocking until it is available if none are currently buffered . If the connection to the aggregator has been completely shut down then this method will throw an IllegalStateException . |
14,181 | public int addRule ( final SubscriptionRequestRule rule ) { Integer theRuleNum = Integer . valueOf ( this . nextRuleNum . getAndIncrement ( ) ) ; synchronized ( this . ruleMap ) { if ( ! this . ruleMap . values ( ) . contains ( rule ) ) { this . ruleMap . put ( theRuleNum , rule ) ; SubscriptionRequestRule [ ] newRules... | Adds a Subscription Request Rule to the aggregator interface . If the aggregator is already connected the rule will be sent immediately otherwise it will be sent with all rules when the aggregator is connected . |
14,182 | void sampleReceived ( SolverAggregatorInterface aggregator , SampleMessage sample ) { if ( ! this . sampleQueue . offer ( sample ) && this . warnBufferFull ) { log . warn ( "Unable to insert a sample due to a full buffer." ) ; } } | Called when the aggregator sends a sample . Enqueues the sample into the internal buffer . |
14,183 | public String getDefaultVersion ( ) { Record recMessageVersion = ( ( ReferenceField ) this . getRecord ( MessageControl . MESSAGE_CONTROL_FILE ) . getField ( MessageControl . DEFAULT_VERSION_ID ) ) . getReference ( ) ; if ( recMessageVersion != null ) if ( ( recMessageVersion . getEditMode ( ) == DBConstants . EDIT_CUR... | GetDefaultVersion Method . |
14,184 | public void scanProcesses ( Object typeObject , OperationType type ) { String strTargetVersion = this . getProperty ( "version" ) ; if ( strTargetVersion == null ) strTargetVersion = this . getDefaultVersion ( ) ; Record recMessageTransport = ( ( ReferenceField ) this . getRecord ( MessageControl . MESSAGE_CONTROL_FILE... | ScanProcesses Method . |
14,185 | public String getControlProperty ( String strKey , String strDefaultValue ) { String strValue = ( ( PropertiesField ) this . getRecord ( MessageControl . MESSAGE_CONTROL_FILE ) . getField ( MessageControl . PROPERTIES ) ) . getProperty ( strKey ) ; if ( strValue == null ) { if ( strDefaultValue == null ) strDefaultValu... | GetControlProperty Method . |
14,186 | public String getDefaultValue ( String strKey ) { if ( DESCRIPTIONS == null ) DESCRIPTIONS = Utility . arrayToMap ( DEFAULTS ) ; return ( String ) DESCRIPTIONS . get ( strKey ) ; } | GetDefaultValue Method . |
14,187 | public String getURIProperty ( String strKey , String strDefaultValue ) { String strValue = this . getControlProperty ( strKey , strDefaultValue ) ; return this . getURIValue ( strValue ) ; } | GetURIProperty Method . |
14,188 | public String getURIValue ( String strValue ) { String strBaseURI = ( ( PropertiesField ) this . getRecord ( MessageControl . MESSAGE_CONTROL_FILE ) . getField ( MessageControl . PROPERTIES ) ) . getProperty ( MessageControl . BASE_NAMESPACE_URI ) ; if ( strBaseURI == null ) { strBaseURI = this . getProperty ( DBParams... | GetURIValue Method . |
14,189 | public MessageInfo getMessageIn ( MessageProcessInfo recMessageProcessInfo ) { return ( MessageInfo ) ( ( ReferenceField ) recMessageProcessInfo . getField ( MessageProcessInfo . MESSAGE_INFO_ID ) ) . getReference ( ) ; } | GetMessageIn Method . |
14,190 | public MessageInfo getMessageOut ( MessageProcessInfo recMessageProcessInfo ) { MessageProcessInfo recMessageProcessInfo2 = ( MessageProcessInfo ) ( ( ReferenceField ) recMessageProcessInfo . getField ( MessageProcessInfo . REPLY_MESSAGE_PROCESS_INFO_ID ) ) . getReference ( ) ; if ( recMessageProcessInfo2 != null ) ret... | GetMessageOut Method . |
14,191 | public String fixName ( String name ) { for ( int i = 0 ; i < name . length ( ) ; i ++ ) { if ( Character . isWhitespace ( name . charAt ( i ) ) ) name = name . substring ( 0 , i ) + name . substring ( i + 1 ) ; } return name ; } | FixName Method . |
14,192 | public String getNamespace ( ) { String strTargetVersion = this . getProperty ( "version" ) ; if ( strTargetVersion == null ) strTargetVersion = this . getDefaultVersion ( ) ; return this . getMessageControl ( ) . getNamespaceFromVersion ( strTargetVersion ) ; } | GetNamespace Method . |
14,193 | public boolean linkLastPredecessor ( Record recNewProjectTask , boolean bDisplayOption ) { if ( ( recNewProjectTask == null ) || ( recNewProjectTask . getEditMode ( ) != DBConstants . EDIT_ADD ) ) return false ; Object bookmark = recNewProjectTask . getLastModified ( DBConstants . BOOKMARK_HANDLE ) ; if ( bookmark == n... | LinkLastPredecessor Method . |
14,194 | public boolean updateChildren ( boolean bDisplayOption ) { int iMoveMode = DBConstants . SCREEN_MOVE ; ProjectTask recDetailChildren = this . getDetailChildren ( ) ; Date startDate = ( ( DateTimeField ) this . getField ( ProjectTask . START_DATE_TIME ) ) . getDateTime ( ) ; Date endDate = ( ( DateTimeField ) this . get... | UpdateChildren Method . |
14,195 | public boolean surveyDates ( boolean bDisplayOption ) { if ( m_recDetail == null ) { RecordOwner recordOwner = this . getRecordOwner ( ) ; m_recDetail = new ProjectTask ( recordOwner ) ; if ( recordOwner != null ) recordOwner . removeRecord ( m_recDetail ) ; m_recDetail . addListener ( new SubFileFilter ( this , true )... | SurveyDates Method . |
14,196 | public ProjectTaskPredecessor getProjectTaskPredecessor ( ) { if ( m_recProjectTaskPredecessor == null ) { m_recProjectTaskPredecessor = new ProjectTaskPredecessor ( this . getRecordOwner ( ) ) ; ( ( ReferenceField ) m_recProjectTaskPredecessor . getField ( ProjectTaskPredecessor . PROJECT_TASK_ID ) ) . getReferenceRec... | GetProjectTaskPredecessor Method . |
14,197 | public ProjectTask getDetailChildren ( ) { if ( m_recDetailChildren == null ) { RecordOwner recordOwner = this . getRecordOwner ( ) ; m_recDetailChildren = new ProjectTask ( recordOwner ) ; if ( recordOwner != null ) recordOwner . removeRecord ( m_recDetailChildren ) ; m_recDetailChildren . addListener ( new SubFileFil... | GetDetailChildren Method . |
14,198 | public int doSetData ( Object fieldPtr , boolean bDisplayOption , int iMoveMode ) { int iErrorCode = DBConstants . NORMAL_RETURN ; boolean bSubExists = ( this . getOwner ( ) . getRecord ( ) . getListener ( SubFileFilter . class . getName ( ) ) != null ) ; if ( bSubExists ) iErrorCode = super . doSetData ( fieldPtr , bD... | Move the physical binary data to this field . If there is not SubFileFilter then don t allow the field to be inited . |
14,199 | public boolean isSingleDataImage ( ) { if ( this . getScreenField ( ) . getConverter ( ) != null ) if ( this . getScreenField ( ) . getConverter ( ) . getField ( ) != null ) if ( this . getScreenField ( ) . getConverter ( ) . getField ( ) . getComponent ( 1 ) == null ) return true ; return false ; } | Special case - if this button is linked to data and this is the only sfield then display it . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.