def __init__(
self,
configmode=None,
configfile='config.ttl',
repository=None,
targetdir=None,
versioning=True
):
"""The init method.
This method checks if the config file is given and reads the config file.
If the config file is missing, it will be generated after analyzing the
file structure.
"""
logger = logging.getLogger('quit.conf.QuitConfiguration')
logger.debug('Initializing configuration object.')
self.configchanged = False
self.sysconf = Graph()
self.graphconf = None
self.versioning = versioning
self.origin = None
self.graphs = {}
self.files = {}
self.quit = Namespace('http://quit.aksw.org/')
self.nsMngrSysconf = NamespaceManager(self.sysconf)
self.nsMngrSysconf.bind('', 'http://quit.aksw.org/', override=False)
self.nsMngrGraphconf = NamespaceManager(self.sysconf)
self.nsMngrGraphconf.bind('', 'http://quit.aksw.org/', override=False)
try:
self.__initstoreconfig(
repository=repository,
targetdir=targetdir,
configfile=configfile,
configmode=configmode
)
except InvalidConfigurationError as e:
logger.error(e)
raise e
return
评论列表
文章目录