Skip to content

Method

mmcif.api.Method.MethodDefinition

Source code in mmcif/api/Method.py
class MethodDefinition(object):
    def __init__(self, methodId, code="calculate", language="Python", inline=None, priority=None, implementation=None, implementationSource="inline"):
        self.methodId = methodId
        self.language = language
        self.code = code
        self.inline = inline
        self.priority = priority if priority else 1
        self.implementationSource = implementationSource
        self.implementation = implementation

    def getId(self):
        return self.methodId

    def getLanguage(self):
        return self.language

    def getCode(self):
        return self.code

    def getInline(self):
        return self.inline

    def getImplementation(self):
        return self.implementation

    def getImplementationSource(self):
        return self.implementationSource

    def getPriority(self):
        return self.priority

    def printIt(self, fh=sys.stdout):
        fh.write("------------- Method definition -------------\n")
        fh.write("Id:                      %s\n" % self.methodId)
        fh.write("Code:                    %s\n" % self.code)
        fh.write("Language:                %s\n" % str(self.language))
        fh.write("Inline text:             %s\n" % str(self.inline))
        fh.write("Implementation:           %s\n" % str(self.implementation))
        fh.write("Implementation source:   %s\n" % str(self.implementationSource))
        fh.write("Priority:                %d\n" % self.priority)

    def __repr__(self):
        oL = []
        oL.append("\n------------- Method definition -------------")
        oL.append("Id:                      %s" % self.methodId)
        oL.append("Code:                    %s" % self.code)
        oL.append("Language:                %s" % str(self.language))
        oL.append("Inline text:             %s" % str(self.inline))
        oL.append("Implementation:           %s" % str(self.implementation))
        oL.append("Implementation source:   %s" % str(self.implementationSource))
        oL.append("Priority:                %d" % self.priority)
        return "\n".join(oL)

__init__(self, methodId, code='calculate', language='Python', inline=None, priority=None, implementation=None, implementationSource='inline') special

Source code in mmcif/api/Method.py
def __init__(self, methodId, code="calculate", language="Python", inline=None, priority=None, implementation=None, implementationSource="inline"):
    self.methodId = methodId
    self.language = language
    self.code = code
    self.inline = inline
    self.priority = priority if priority else 1
    self.implementationSource = implementationSource
    self.implementation = implementation

__repr__(self) special

Source code in mmcif/api/Method.py
def __repr__(self):
    oL = []
    oL.append("\n------------- Method definition -------------")
    oL.append("Id:                      %s" % self.methodId)
    oL.append("Code:                    %s" % self.code)
    oL.append("Language:                %s" % str(self.language))
    oL.append("Inline text:             %s" % str(self.inline))
    oL.append("Implementation:           %s" % str(self.implementation))
    oL.append("Implementation source:   %s" % str(self.implementationSource))
    oL.append("Priority:                %d" % self.priority)
    return "\n".join(oL)

getCode(self)

Source code in mmcif/api/Method.py
def getCode(self):
    return self.code

getId(self)

Source code in mmcif/api/Method.py
def getId(self):
    return self.methodId

getImplementation(self)

Source code in mmcif/api/Method.py
def getImplementation(self):
    return self.implementation

getImplementationSource(self)

Source code in mmcif/api/Method.py
def getImplementationSource(self):
    return self.implementationSource

getInline(self)

Source code in mmcif/api/Method.py
def getInline(self):
    return self.inline

getLanguage(self)

Source code in mmcif/api/Method.py
def getLanguage(self):
    return self.language

getPriority(self)

Source code in mmcif/api/Method.py
def getPriority(self):
    return self.priority

printIt(self, fh=<_io.StringIO object at 0x10897ae50>)

Source code in mmcif/api/Method.py
def printIt(self, fh=sys.stdout):
    fh.write("------------- Method definition -------------\n")
    fh.write("Id:                      %s\n" % self.methodId)
    fh.write("Code:                    %s\n" % self.code)
    fh.write("Language:                %s\n" % str(self.language))
    fh.write("Inline text:             %s\n" % str(self.inline))
    fh.write("Implementation:           %s\n" % str(self.implementation))
    fh.write("Implementation source:   %s\n" % str(self.implementationSource))
    fh.write("Priority:                %d\n" % self.priority)

mmcif.api.Method.MethodReference

Source code in mmcif/api/Method.py
class MethodReference(object):
    def __init__(self, methodId, mType="attribute", category=None, attribute=None):
        self.methodId = methodId
        self.type = mType
        self.categoryName = category
        self.attributeName = attribute

    def getId(self):
        return self.methodId

    def getType(self):
        return self.type

    def getCategoryName(self):
        return self.categoryName

    def getAttributeName(self):
        return self.attributeName

    def printIt(self, fh=sys.stdout):
        fh.write("--------------- Method Reference -----------------\n")
        fh.write("Id:             %s\n" % self.methodId)
        fh.write("Type:           %s\n" % self.type)
        fh.write("Category name:  %s\n" % str(self.categoryName))
        fh.write("Attribute name: %s\n" % str(self.attributeName))

    def __repr__(self):
        oL = []
        oL.append("--------------- Method Reference -----------------")
        oL.append("Id:             %s" % self.methodId)
        oL.append("Type:           %s" % self.type)
        oL.append("Category name:  %s" % str(self.categoryName))
        oL.append("Attribute name: %s" % str(self.attributeName))
        return "\n".join(oL)

__init__(self, methodId, mType='attribute', category=None, attribute=None) special

Source code in mmcif/api/Method.py
def __init__(self, methodId, mType="attribute", category=None, attribute=None):
    self.methodId = methodId
    self.type = mType
    self.categoryName = category
    self.attributeName = attribute

__repr__(self) special

Source code in mmcif/api/Method.py
def __repr__(self):
    oL = []
    oL.append("--------------- Method Reference -----------------")
    oL.append("Id:             %s" % self.methodId)
    oL.append("Type:           %s" % self.type)
    oL.append("Category name:  %s" % str(self.categoryName))
    oL.append("Attribute name: %s" % str(self.attributeName))
    return "\n".join(oL)

getAttributeName(self)

Source code in mmcif/api/Method.py
def getAttributeName(self):
    return self.attributeName

getCategoryName(self)

Source code in mmcif/api/Method.py
def getCategoryName(self):
    return self.categoryName

getId(self)

Source code in mmcif/api/Method.py
def getId(self):
    return self.methodId

getType(self)

Source code in mmcif/api/Method.py
def getType(self):
    return self.type

printIt(self, fh=<_io.StringIO object at 0x10897ae50>)

Source code in mmcif/api/Method.py
def printIt(self, fh=sys.stdout):
    fh.write("--------------- Method Reference -----------------\n")
    fh.write("Id:             %s\n" % self.methodId)
    fh.write("Type:           %s\n" % self.type)
    fh.write("Category name:  %s\n" % str(self.categoryName))
    fh.write("Attribute name: %s\n" % str(self.attributeName))