Changeset 1206


Ignore:
Timestamp:
12/04/11 23:06:10 (9 years ago)
Author:
philsmart
Message:
 
Location:
raptor-parse/trunk/src/main/java/uk/ac/cardiff/raptor/parse
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • raptor-parse/trunk/src/main/java/uk/ac/cardiff/raptor/parse/BaseEventParser.java

    r1187 r1206  
    5656    /** A human readable name of the types of events this parser handles. */ 
    5757    private String eventTypeFriendlyName; 
     58 
     59    /** 
     60     * Whether this event parser is enabled and should be used. Defaults to true. 
     61     */ 
     62    private boolean enabled = true; 
    5863 
    5964    /** 
     
    216221    } 
    217222 
     223    /** 
     224     * @param enabled the enabled to set 
     225     */ 
     226    public void setEnabled(boolean enabled) { 
     227        this.enabled = enabled; 
     228    } 
     229 
     230    /** 
     231     * @return the enabled 
     232     */ 
     233    public boolean isEnabled() { 
     234        return enabled; 
     235    } 
     236 
    218237} 
  • raptor-parse/trunk/src/main/java/uk/ac/cardiff/raptor/parse/DataAccessRegister.java

    r1187 r1206  
    7171 
    7272    /** 
     73     * Gets the list of parsing modules currently registered that are enabled. 
     74     *  
     75     * @return list of parsing modules, all subclasses of the {@link BaseEventParser} class 
     76     */ 
     77    public List<BaseEventParser> getEnabledParsingModules() { 
     78        List<BaseEventParser> eventParsers = new ArrayList<BaseEventParser>(); 
     79        for (BaseEventParser eventParser : parsingModules) { 
     80            if (eventParser.isEnabled()) { 
     81                eventParsers.add(eventParser); 
     82            } 
     83        } 
     84        return eventParsers; 
     85    } 
     86 
     87    /** 
    7388     * Returns the first parsing module whos <code>eventType</code> matches the <code>eventType</code> parameter 
    7489     *  
Note: See TracChangeset for help on using the changeset viewer.