Esempio n. 1
0
def generateTransactionEntityInfo():

    transactionDict = extractor.getTransactionDictionary()

    for transactionEntity in transactionDict.dictByNumber.values():

        nextTransaction = transactionEntity.getNextTransaction()
        previousTransaction = transactionEntity.getPreviousTransaction()

        writeRecordPrefixWithKnownId(of, "Transaction",
                                     transactionEntity.getCdifId())
        writeStringField(of, "name", transactionEntity.getName())
        writeStringField(of, "uniqueName", transactionEntity.getUniqueName())
        writeStringField(of, "creationTime",
                         transactionEntity.getCreationTime().isoformat())
        writeStringField(of, "latestTime",
                         transactionEntity.getLatestTime().isoformat())
        writeStringField(of, "message", transactionEntity.getMessage())
        writeStringField(of, "author",
                         transactionEntity.getAuthor().getIdentifier())
        if nextTransaction is None:
            writeStringField(of, "nextTransaction", "")
        else:
            writeStringField(of, "nextTransaction",
                             nextTransaction.getUniqueName())
        if previousTransaction is None:
            writeStringField(of, "previousTransaction", "")
        else:
            writeStringField(of, "previousTransaction",
                             previousTransaction.getUniqueName())

        writeRecordPostfix(of)
Esempio n. 2
0
def generateFunctionVersionEntityInfo(versionDict):

    for functionVersionEntity in versionDict.values():

        writeRecordPrefix(of, "FunctionVersion")
        writeStringField(of, "revision", functionVersionEntity.getRevision())
        writeStringField(of, "versionOfFunction",
                         functionVersionEntity.getFunctionName())
        writeBooleanField(of, "isCreation", functionVersionEntity.isCreation())
        writeBooleanField(of, "isDeletion", functionVersionEntity.isDeletion())
        writeBooleanField(of, "isModification",
                          functionVersionEntity.isModification())

        writeRecordPostfix(of)
Esempio n. 3
0
def generateMethodVersionEntityInfo(versionDict):

    for methodVersionEntity in versionDict.values():

        writeRecordPrefix(of, "MethodVersion")
        writeStringField(of, "revision", methodVersionEntity.getRevision())
        writeStringField(of, "versionOfMethod",
                         methodVersionEntity.getMethodName())
        writeBooleanField(of, "isCreation", methodVersionEntity.isCreation())
        writeBooleanField(of, "isDeletion", methodVersionEntity.isDeletion())
        writeBooleanField(of, "isModification",
                          methodVersionEntity.isModification())

        writeRecordPostfix(of)
Esempio n. 4
0
def generateClassVersionEntityInfo(versionDict):

    for classVersionEntity in versionDict.values():

        writeRecordPrefix(of, "ClassVersion")
        writeStringField(of, "revision", classVersionEntity.getRevision())
        writeStringField(of, "versionOfClass",
                         classVersionEntity.getClassName())
        writeBooleanField(of, "isCreation", classVersionEntity.isCreation())
        writeBooleanField(of, "isDeletion", classVersionEntity.isDeletion())
        writeBooleanField(of, "isModification",
                          classVersionEntity.isModification())

        writeRecordPostfix(of)
Esempio n. 5
0
def generateReleaseRevisionEntityInfo():

    releaseRevisionDict = extractor.getReleaseRevisionDictionary()

    for releaseRevisionEntity in releaseRevisionDict.entityDict.values():

        writeRecordPrefixWithKnownId(of, "ReleaseRevision",
                                     releaseRevisionEntity.getCdifId())
        writeStringField(of, "release",
                         releaseRevisionEntity.getRelease().getUniqueName())
        writeStringField(of, "revision",
                         releaseRevisionEntity.getRevision().getUniqueName())

        writeRecordPostfix(of)
Esempio n. 6
0
def generateSystemVersionEntityInfo():

    systemVersionDict = extractor.getSystemVersionDictionary()

    for systemVersionEntity in systemVersionDict.entityDict.values():

        writeRecordPrefixWithKnownId(of, "SystemVersion",
                                     systemVersionEntity.getCdifId())
        writeStringField(of, "transaction",
                         systemVersionEntity.getTransaction().getUniqueName())
        writeStringField(of, "revision",
                         systemVersionEntity.getRevision().getUniqueName())

        writeRecordPostfix(of)
Esempio n. 7
0
def generateGlobalVariableVersionEntityInfo(versionDict):

    for globalVarVersionEntity in versionDict.values():

        writeRecordPrefix(of, "GlobalVariableVersion")
        writeStringField(of, "revision", globalVarVersionEntity.getRevision())
        writeStringField(of, "versionOfGlobalVariable",
                         globalVarVersionEntity.getGlobalVariableName())
        writeBooleanField(of, "isCreation",
                          globalVarVersionEntity.isCreation())
        writeBooleanField(of, "isDeletion",
                          globalVarVersionEntity.isDeletion())
        writeBooleanField(of, "isModification",
                          globalVarVersionEntity.isModification())

        writeRecordPostfix(of)
Esempio n. 8
0
def generateAttributeVersionEntityInfo(versionDict):

    for attributeVersionEntity in versionDict.values():

        writeRecordPrefix(of, "AttributeVersion")
        writeStringField(of, "revision", attributeVersionEntity.getRevision())
        writeStringField(of, "versionOfAttribute",
                         attributeVersionEntity.getAttributeName())
        writeBooleanField(of, "isCreation",
                          attributeVersionEntity.isCreation())
        writeBooleanField(of, "isDeletion",
                          attributeVersionEntity.isDeletion())
        writeBooleanField(of, "isModification",
                          attributeVersionEntity.isModification())

        writeRecordPostfix(of)
Esempio n. 9
0
def generateReleaseEntityInfo():

    releaseDict = extractor.getReleaseDictionary()

    for releaseEntity in releaseDict.entityDict.values():

        writeRecordPrefixWithKnownId(of, "Release", releaseEntity.getCdifId())
        writeStringField(of, "name", releaseEntity.getName())
        if releaseEntity.getCreationTime() == None:
            writeStringField(of, "creationTime", "")
        else:
            writeStringField(of, "creationTime",
                             releaseEntity.getCreationTime().isoformat())
        writeStringField(of, "uniqueName", releaseEntity.getUniqueName())

        writeRecordPostfix(of)
Esempio n. 10
0
def generateAuthorEntityInfo():

    authorDict = extractor.getAuthorDictionary()

    for authorEntity in authorDict.entityDict.values():

        writeRecordPrefixWithKnownId(of, "Author", authorEntity.getCdifId())

        writeStringField(of, "identifier", authorEntity.getIdentifier())
        writeStringField(of, "fullName", authorEntity.getFullName())
        if authorEntity.getEmailAddress() == None:
            writeStringField(of, "emailAddress", "")
        else:
            writeStringField(of, "emailAddress",
                             authorEntity.getEmailAddress())

        writeRecordPostfix(of)
Esempio n. 11
0
def generateFileEntityInfo():

    fileDict = extractor.getFilesDictionary()

    for fileEntity in fileDict.dictByUniqueName.values():

        writeRecordPrefixWithKnownId(of, "SourceFile", fileEntity.getCdifId())

        writeStringField(of, "name", fileEntity.getName())
        writeStringField(of, "creationTime",
                         fileEntity.getCreationTime().isoformat())
        writeStringField(of, "uniqueName", fileEntity.getUniqueName())
        if fileEntity.getFullPath() == None:
            writeStringField(of, "fullPath", "")
        else:
            writeStringField(of, "fullPath", fileEntity.getFullPath())

        writeRecordPostfix(of)
Esempio n. 12
0
def generateRevisionEntityInfo():

    revisionDict = extractor.getRevisionDictionary()

    for revisionEntity in revisionDict.entityDict.values():

        if not revisionEntity.isDeletion():

            nextRevision = revisionEntity.getNextRevision()
            previousRevision = revisionEntity.getPreviousRevision()
            transaction = revisionEntity.getTransaction()
            deletingTransaction = revisionEntity.getDeletingTransaction()

            writeRecordPrefixWithKnownId(of, "Revision",
                                         revisionEntity.getCdifId())
            writeStringField(of, "name", revisionEntity.getName())
            writeStringField(of, "creationTime",
                             revisionEntity.getCreationTime().isoformat())
            writeStringField(of, "uniqueName", revisionEntity.getUniqueName())
            writeStringField(of, "message", revisionEntity.getMessage())
            writeStringField(of, "revisionOf",
                             revisionEntity.getSourceFile().getUniqueName())
            writeStringField(of, "author",
                             revisionEntity.getAuthor().getIdentifier())
            if nextRevision is None:
                writeStringField(of, "nextRevision", "")
            else:
                writeStringField(of, "nextRevision",
                                 nextRevision.getUniqueName())
            if previousRevision is None:
                writeStringField(of, "previousRevision", "")
            else:
                writeStringField(of, "previousRevision",
                                 previousRevision.getUniqueName())
            writeStringField(of, "partOfTransaction",
                             transaction.getUniqueName())
            if deletingTransaction is not None:
                writeStringField(of, "deletedByTransaction",
                                 deletingTransaction.getUniqueName())

            writeRecordPostfix(of)