edu.mayo.informatics.lexgrid.convert.utility.loaderPreferences.loaders
Class OWLPreferenceLoader

java.lang.Object
  extended by edu.mayo.informatics.lexgrid.convert.utility.loaderPreferences.loaders.BasePreferenceLoader
      extended by edu.mayo.informatics.lexgrid.convert.utility.loaderPreferences.loaders.OWLPreferenceLoader
All Implemented Interfaces:
PreferenceLoader

public class OWLPreferenceLoader
extends BasePreferenceLoader
implements PreferenceLoader

Class to load OWL loader preferences from an XML file

Author:
Kevin Peterson

Field Summary
 
Fields inherited from class edu.mayo.informatics.lexgrid.convert.utility.loaderPreferences.loaders.BasePreferenceLoader
log, prefs
 
Constructor Summary
OWLPreferenceLoader(java.net.URI OWLPreferences)
          Constructor for creating an OWLPreferenceLoader.
 
Method Summary
 LoaderPreferences load()
          Returns a generic Preferences object.
 boolean validate()
          Validates an XML preferences file against its corresponding XSD.
 
Methods inherited from class edu.mayo.informatics.lexgrid.convert.utility.loaderPreferences.loaders.BasePreferenceLoader
getPreferencesURI, setPreferencesURI, unmarshal, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.mayo.informatics.lexgrid.convert.utility.loaderPreferences.interfaces.PreferenceLoader
getPreferencesURI, setPreferencesURI
 

Constructor Detail

OWLPreferenceLoader

public OWLPreferenceLoader(java.net.URI OWLPreferences)
                    throws LgConvertException
Constructor for creating an OWLPreferenceLoader. This class is used to populate specific OWL constants that will be used during the load. NOTE: This will by default NOT validate the XML against its schema.

Parameters:
OWLPreferences - The location of the XML preferences file.
Throws:
LgConvertException - Thrown if the XML is not a valid XML file, or if the XML does not validate against the schema.
Method Detail

validate

public boolean validate()
Validates an XML preferences file against its corresponding XSD. If errors are found, the exception will be logged.

Specified by:
validate in interface PreferenceLoader
Returns:
false if the XML does not validate, otherwise true.

load

public LoaderPreferences load()
                       throws LgConvertException
Description copied from interface: PreferenceLoader
Returns a generic Preferences object. This method will NOT validate against an XSD, but will do minimum checks to determine if the XML is well-formed.

Specified by:
load in interface PreferenceLoader
Returns:
The generic Preferences Object. Because each loader implements its preferences independently, this method returns a generic Object. Use a specific loader to get each format's specific preferences object.
Throws:
LgConvertException

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.