当前位置: 首页>>代码示例>>Python>>正文


Python ParamManager.__init__方法代码示例

本文整理汇总了Python中askomics.libaskomics.ParamManager.ParamManager.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ParamManager.__init__方法的具体用法?Python ParamManager.__init__怎么用?Python ParamManager.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在askomics.libaskomics.ParamManager.ParamManager的用法示例。


在下文中一共展示了ParamManager.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session):
        ParamManager.__init__(self, settings, session)
        self.log = logging.getLogger(__name__)
        self.databasename = "jobs.db"
        self.pathdb = self.get_database_user_directory()+"/"+self.databasename

        self.log.info(" ==> "+ self.pathdb +"<==");

        conn = sqlite3.connect("file:"+self.pathdb,uri=True)
        c = conn.cursor()
        reqSql = '''CREATE TABLE IF NOT EXISTS jobs
             (
             jobID INTEGER PRIMARY KEY AUTOINCREMENT,
             type text,
             state text,
             start int,
             end int ,
             data text,
             file text,
             preview string,
             requestGraph string,
             variates string,
             nr int
             )'''

        c.execute(reqSql)
        conn.commit()
        conn.close()
开发者ID:abretaud,项目名称:askomics,代码行数:30,代码来源:JobManager.py

示例2: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session,
                 name = None, endpoint = None,
                 username=None, password=None,
                 urlupdate=None):
        ParamManager.__init__(self, settings, session)
        self.log = logging.getLogger(__name__)

        self.name = name
        self.endpoint = endpoint
        self.username = username
        self.password = password
        self.urlupdate = urlupdate
        self.allowUpdate = False
开发者ID:askomics,项目名称:askomics,代码行数:15,代码来源:QueryLauncher.py

示例3: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session, name = None, endpoint = None ,username=None, password=None,urlupdate=None,auth='Basic'):
        ParamManager.__init__(self, settings, session)
        self.log = logging.getLogger(__name__)

        self.name = name
        self.endpoint = endpoint
        self.username = username
        self.password = password
        self.urlupdate = urlupdate
        self.auth = auth
        self.allowUpdate = False

        if self.auth != 'Basic' and self.auth != 'Digest':
            raise ValueError("Invalid Auth parameter :"+self.auth)
开发者ID:abretaud,项目名称:askomics,代码行数:16,代码来源:QueryLauncher.py

示例4: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session):
        '''
            Manage Modules Askomics
        '''
        ParamManager.__init__(self, settings, session)

        '''
            All modules have to be composed with thes keys
        '''
        self.latt = ['module','comment','version','owl','rdf']

        self.moduleFiles = {}
        self.graph_modules="askomics:graph:module"
        self.modulesdir='askomics/static/modules/'
        self.data = {}
开发者ID:ofilangi,项目名称:askomics,代码行数:17,代码来源:ModulesManager.py

示例5: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session, type_dict=None, delims=None):
        #FIXME: Can we get dict()s from config ?
        self.type_dict = {
            'Numeric' : 'xsd:decimal',
            'Text'    : 'xsd:string',
            'Category': ':',
            'Entity'  : ':'} if type_dict is None else type_dict

        self.delims = {
            'Numeric' : ('', ''),
            'Text'    : ('"', '"'),
            'Category': (':', ''),
            'Entity'  : (':', '')} if delims is None else delims

        ParamManager.__init__(self, settings, session)
        self.log = logging.getLogger(__name__)
开发者ID:odameron,项目名称:askomics,代码行数:18,代码来源:SourceFileConvertor.py

示例6: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session):
        ParamManager.__init__(self, settings, session)

        self.log = logging.getLogger(__name__)

        self.ldap_server = self.settings['askomics.ldap_host']
        self.ldap_port = self.settings['askomics.ldap_port']
        # self.ldap_bind_dn = self.settings['askomics.ldap_bind_dn']
        # self.ldap_bind_passwd = self.settings['askomics.ldap_bind_passwd']
        self.ldap_user_search_base = self.settings['askomics.ldap_user_search_base']
        self.ldap_user_filter = self.settings['askomics.ldap_user_filter']
        self.ldap_username_attr = self.settings['askomics.ldap_username_attr']
        self.ldap_email_attr = self.settings['askomics.ldap_email_attr']

        self.username = None
        self.password = None
        self.email = None
开发者ID:askomics,项目名称:askomics,代码行数:19,代码来源:LdapAuth.py

示例7: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session, username, email, password, password2):
        ParamManager.__init__(self, settings, session)

        self.log = logging.getLogger(__name__)
        self.username = str(username)
        self.email = str(email)
        self.passwd = str(password)
        self.passwd2 = str(password2)
        self.admin = False
        self.blocked = True
        self.galaxy = False

        # concatenate askmics salt, password and random salt and hash it with sha256 function
        # see --"https://en.wikipedia.org/wiki/Salt_(cryptography)"-- for more info about salt
        alpabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
        self.randomsalt = ''.join(random.choice(alpabet) for i in range(20))
        salted_pw = self.settings["askomics.salt"] + self.passwd + self.randomsalt
        self.sha256_pw = hashlib.sha256(salted_pw.encode('utf8')).hexdigest()
开发者ID:ofilangi,项目名称:askomics,代码行数:20,代码来源:Security.py

示例8: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session, path, uri_set=None):

        ParamManager.__init__(self, settings, session)

        self.timestamp = datetime.datetime.now().isoformat()

        self.path = path

        self.metadatas = {}

        # The name should not contain extension as dots are not allowed in rdf names
        # self.name = os.path.splitext(os.path.basename(path))[0]
        self.name = os.path.basename(path)
        self.alphanum_name = re.sub('[^0-9a-zA-Z]+', '_', self.name)

        self.graph = 'askomics:unkown:uri:graph'
        if 'graph' in self.session:
            self.graph = self.session['graph']

        # Graph name can't contain any non alphanumeric characters. replace all with _
        self.graph = self.graph + ':' + self.alphanum_name + '_' + self.timestamp

        self.log = logging.getLogger(__name__)

        self.reset_cache()

        self.uri = {}
        pref_uri = "http://semanticweb.org/askomics/entity/"
        if self.is_defined('askomics.prefix'):
            pref_uri = self.get_param("askomics.prefix")

        self.uri = [ pref_uri for idx in range(20) ]

        if uri_set != None:
            for idx,uri in uri_set.items():
                if uri:
                    # uri have to end with # or /
                    if not uri.endswith('#') and not uri.endswith('/'):
                        uri = uri + "/"
                    self.uri[int(idx)] = uri
                else:
                    self.uri[int(idx)] = self.get_param("askomics.prefix")
开发者ID:abretaud,项目名称:askomics,代码行数:44,代码来源:SourceFile.py

示例9: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session, path):

        ParamManager.__init__(self, settings, session)

        self.timestamp = datetime.datetime.now().isoformat()

        self.path = path

        # The name should not contain extension as dots are not allowed in rdf names
        self.name = os.path.splitext(os.path.basename(path))[0]
        # FIXME check name uniqueness as we remove extension (collision if uploading example.tsv and example.txt)

        self.log = logging.getLogger(__name__)

        self.metadatas = {
            'loadDate': '',
            'username': getpass.getuser(),
            'fileName': self.name,
            'version': get_distribution('Askomics').version,
            'server': '',
            'graphName':''}

        self.reset_cache()
开发者ID:cbettemb,项目名称:askomics,代码行数:25,代码来源:SourceFile.py

示例10: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session):

        ParamManager.__init__(self, settings, session)
        self.log = logging.getLogger(__name__)
开发者ID:Piezoid,项目名称:askomics,代码行数:6,代码来源:SourceFileConvertor.py

示例11: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session):

        ParamManager.__init__(self, settings, session)

        self.manage_rdf_format = ['application/rdf+xml','owl','rdf','n3','nt','json-ld']
        self.log = logging.getLogger(__name__)
开发者ID:askomics,项目名称:askomics,代码行数:8,代码来源:SourceFileConvertor.py

示例12: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
 def __init__(self, settings, session):
     ParamManager.__init__(self, settings, session)
     self.log = logging.getLogger(__name__)
     self.databasename = "endpoints.db"
     self.pathdb = self.get_common_user_directory()+"/"+self.databasename
     self.create_db()
开发者ID:abretaud,项目名称:askomics,代码行数:8,代码来源:EndpointManager.py

示例13: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session, dico={}):
        ParamManager.__init__(self, settings, session)
        CounterManager.__init__(self, dico)

        self.log = logging.getLogger(__name__)
开发者ID:odameron,项目名称:askomics,代码行数:7,代码来源:TripleStoreExplorer.py

示例14: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
 def __init__(self, settings, session):
     ParamManager.__init__(self, settings, session)
开发者ID:askomics,项目名称:askomics,代码行数:4,代码来源:JobManager.py

示例15: __init__

# 需要导入模块: from askomics.libaskomics.ParamManager import ParamManager [as 别名]
# 或者: from askomics.libaskomics.ParamManager.ParamManager import __init__ [as 别名]
    def __init__(self, settings, session, url, apikey):
        ParamManager.__init__(self, settings, session)

        self.log = logging.getLogger(__name__)
        self.url = url
        self.apikey = apikey
开发者ID:ofilangi,项目名称:askomics,代码行数:8,代码来源:GalaxyConnector.py


注:本文中的askomics.libaskomics.ParamManager.ParamManager.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。