private Set < String > versionLabelsFor ( Version version ) throws RepositoryException { if ( ! version . getParent ( ) . equals ( this ) ) { throw new VersionException ( JcrI18n . invalidVersion . text ( version . getPath ( ) , getPath ( ) ) ) ; } String versionId = version . getIdentifier ( ) ; PropertyIterator iter = versionLabels ( ) . getProperties ( ) ; if ( iter . getSize ( ) == 0 ) return Collections . emptySet ( ) ; Set < String > labels = new HashSet < String > ( ) ; while ( iter . hasNext ( ) ) { javax . jcr . Property prop = iter . nextProperty ( ) ; if ( versionId . equals ( prop . getString ( ) ) ) { labels . add ( prop . getName ( ) ) ; } } return labels ; }
Returns the version labels that point to the given version