View Javadoc

1   /*
2    * $Id: LibraryConfiguration.java,v 1.5 2005/06/01 19:55:51 jlerner Exp $
3    *
4    * Copyright (c) 1999-2004, BBN Technologies, LLC.
5    * All rights reserved.
6    * http://www.daml.org/legal/opensource/bbn_license.html
7    */
8    
9   package com.bbn.swede.core.libraries;
10  
11  /***
12   * A subclass of AbstractConfiguration with accessors, mutators and constants
13   * specified for Libraries.
14   * 
15   * @author aperezlo
16   */
17  
18  public class LibraryConfiguration extends AbstractConfiguration
19  {
20     /***
21      * Property identifier for library name.
22      */
23     public static final String LIBRARY_NAME_PROPERTY = "library-name";
24     /***
25      * Property identifier for update frequency.
26      */
27     public static final String LIBRARY_UPDATE_SCHEDULE_PROPERTY = "library-update-schedule";
28     
29     /* (non-Javadoc)
30      * @see com.bbn.swede.core.libraries.IConfiguration#getPropertiesValidator()
31      */
32     public IConfigurationValidator getPropertiesValidator()
33     {
34        return new ConfigurationValidator(ConfigurationValidator.VALIDATE_LIBRARY);
35     }
36  
37     /* (non-Javadoc)
38      * @see com.bbn.swede.core.libraries.IConfiguration#getName()
39      */
40     public String getName()
41     {
42        return getSystemProperty(LIBRARY_NAME_PROPERTY);
43     }
44     
45     /***
46      * Sets the name of this library.
47      * 
48      * @param s the new name of the library
49      */
50     public void setName(String s)
51     {
52        setSystemProperty(LIBRARY_NAME_PROPERTY, s);
53     }
54  }