Package it.unimi.dsi.util

Examples of it.unimi.dsi.util.Properties.containsKey()


  @SuppressWarnings("unchecked")
  static public Index getInstance( final CharSequence basename, final boolean randomAccess, final boolean documentSizes, final EnumMap<UriKeys,String> queryProperties ) throws ConfigurationException, IOException, ClassNotFoundException, SecurityException, URISyntaxException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
    final Properties properties = new Properties( basename + DiskBasedIndex.PROPERTIES_EXTENSION );
    ClusteringStrategy strategy = null;
    Class<? extends ClusteringStrategy> strategyClass = null;
    if ( properties.containsKey( PropertyKeys.STRATEGY ) ) strategy = (ClusteringStrategy)BinIO.loadObject( properties.getString( PropertyKeys.STRATEGY ) );
    else if ( properties.containsKey( PropertyKeys.STRATEGYCLASS ) ) try {
      strategyClass = (Class<? extends ClusteringStrategy>)MG4JClassParser.getParser().parse( properties.getString( PropertyKeys.STRATEGYCLASS ) );
    }
    catch ( ParseException e ) {
      throw new RuntimeException( e );
View Full Code Here


  static public Index getInstance( final CharSequence basename, final boolean randomAccess, final boolean documentSizes, final EnumMap<UriKeys,String> queryProperties ) throws ConfigurationException, IOException, ClassNotFoundException, SecurityException, URISyntaxException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
    final Properties properties = new Properties( basename + DiskBasedIndex.PROPERTIES_EXTENSION );
    ClusteringStrategy strategy = null;
    Class<? extends ClusteringStrategy> strategyClass = null;
    if ( properties.containsKey( PropertyKeys.STRATEGY ) ) strategy = (ClusteringStrategy)BinIO.loadObject( properties.getString( PropertyKeys.STRATEGY ) );
    else if ( properties.containsKey( PropertyKeys.STRATEGYCLASS ) ) try {
      strategyClass = (Class<? extends ClusteringStrategy>)MG4JClassParser.getParser().parse( properties.getString( PropertyKeys.STRATEGYCLASS ) );
    }
    catch ( ParseException e ) {
      throw new RuntimeException( e );
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.