當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。