本文整理汇总了Python中al_lib.ArchiLib.ArchiLib.startTimer方法的典型用法代码示例。如果您正苦于以下问题:Python ArchiLib.startTimer方法的具体用法?Python ArchiLib.startTimer怎么用?Python ArchiLib.startTimer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类al_lib.ArchiLib.ArchiLib
的用法示例。
在下文中一共展示了ArchiLib.startTimer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: importWSDL
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def importWSDL():
start_time = ArchiLib.startTimer()
etree.QName(ArchiLib.ARCHIMATE_NS, u"model")
treeArchi = etree.parse(fileArchimateTest)
al = ArchiLib()
dirWSDL = u"/Users/morrj140/Documents/SolutionEngineering/Jawa/Jawa_v2_rc37"
for root, dirs, files in os.walk(dirWSDL, topdown=True):
for name in files:
nameFile = os.path.join(root, name)
logger.info(u"Checking File : %s" % name)
if nameFile[-4:].lower() == u"wsdl":
nFile = name[:-5]
logger.info(u"nFile : %s" % nFile)
tree = etree.parse(nameFile)
xp = u"//@schemaLocation"
txp = tree.xpath(xp)
for x in txp:
method = x[4:-4]
logger.info(u"x : %s" % method)
al.insertTwoColumns(
treeArchi, u"Application", u"New Jawa", u"archimate:ApplicationService", nFile, method
)
al.outputXML(treeArchi)
ArchiLib.stopTimer(start_time)
示例2: exportArchi
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def exportArchi(fileArchimate, fileConceptsExport):
start_time = ArchiLib.startTimer()
ea = ExportArchi(fileArchimate, fileConceptsExport)
ea.exportArchi()
ArchiLib.stopTimer(start_time)
示例3: __init__
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def __init__(self, fileArchimate):
self.fileAchimate = fileArchimate
self.n = 0
self.al = ArchiLib(fileArchimate)
self.start_time = ArchiLib.startTimer()
self.width = u"120"
self.height = u"55"
示例4: exportArchiFolderModels
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def exportArchiFolderModels(fileArchimate, fileConceptsExport, folder):
start_time = ArchiLib.startTimer()
eafm = ExportArchiFolderModels(fileArchimate, fileConceptsExport)
eafm.exportArchiFolderModels(folder)
ArchiLib.stopTimer(start_time)
示例5: createRelations
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def createRelations(fileArchimate=fileArchimateTest):
start_time = ArchiLib.startTimer()
cr = CreateRelationsInArchi(fileArchimate)
cr.createRelations()
ArchiLib.stopTimer(start_time)
示例6: namedEntityAnalysis
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def namedEntityAnalysis(fileArchimate=fileArchimateTest, fileConceptsRequirements=fileConceptsRequirements):
start_time = ArchiLib.startTimer()
ane = AnalyzeNamedEntities(fileArchimate, fileConceptsRequirements)
ane.analyzeNamedEntities()
ArchiLib.stopTimer(start_time)
示例7: analyzeGraph
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def analyzeGraph(gdb):
concepts = None
start_time = ArchiLib.startTimer()
ag = AnalyzeGraph(gdb)
ag.analyzeNetworkX(concepts, fileConceptsExport)
ArchiLib.stopTimer(start_time)
示例8: createTagCloud
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def createTagCloud(conceptFile, topic):
start_time = ArchiLib.startTimer()
concepts = Concepts.loadConcepts(conceptFile)
tc = TopicCloud(concepts, font_path=u"/Users/morrj140/Fonts/DroidSans.ttf", imageFile=u"Topics.png")
tc.createTagCloud(topic)
ArchiLib.stopTimer(start_time)
示例9: exportNeo4j
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def exportNeo4j(gdb):
# measure process time, wall time
start_time = ArchiLib.startTimer()
concepts = Concepts(u"Neo4J", u"Neo4J Graph DB")
nj = Neo4JLib(gdb)
nj.exportNeo4JToConcepts(concepts)
ArchiLib.stopTimer(start_time)
示例10: exportArchiModel
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def exportArchiModel(fileArchimate, fileConceptsExport, model, fileCSVExport):
start_time = ArchiLib.startTimer()
eam = ExportArchiModel(fileArchimate, fileConceptsExport, fileCSVExport)
listMTE = list()
listMTE.append(model)
eam.exportArchiModel(listMTE)
ArchiLib.stopTimer(start_time)
示例11: dependancyAnalysisFromArchi
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def dependancyAnalysisFromArchi(fileArchimate):
start_time = ArchiLib.startTimer()
da = DependancyAnalysis(fileArchimate)
concepts, listTSort = da.collectDependancyAnalysisNodes()
da.dependancyAnalysis(listTSort)
concepts.logConcepts()
ArchiLib.stopTimer(start_time)
示例12: ImportCSVIntoArchi
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def ImportCSVIntoArchi(fileArchimate, folder, subfolder, fileMetaEntity):
start_time = ArchiLib.startTimer()
logger.info(u"Using : %s" % fileArchimate)
al = ArchiLib(fileArchimate)
_ = al.logTypeCounts(ListOnly=True)
al.insertNColumns(folder, subfolder, fileMetaEntity, CaseFix=False)
al.outputXMLtoFile()
relations = len(al.dictRel)
nodes = len(al.dictND)
logger.info(u"----------------------------------------------------------------------------------------")
logger.info(u"Encountered %d errors and added %d Nodes and %d relations" % (len(al.listErrors), nodes, relations))
ArchiLib.stopTimer(start_time)
示例13: graphConcepts
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def graphConcepts(conceptFile):
start_time = ArchiLib.startTimer()
concepts = Concepts.loadConcepts(conceptFile)
# concepts.logConcepts()
# graph = PatternGraph()
graph = GraphVizGraph()
# graph = NetworkXGraph(conceptFile[:-2]+u".png")
graph.addGraphNodes(concepts)
graph.addGraphEdges(concepts)
if isinstance(graph, NetworkXGraph):
graph.saveJSON(concepts)
if isinstance(graph, GraphVizGraph):
graph.exportGraph()
if isinstance(graph, PatternGraph):
graph.exportGraph()
ArchiLib.stopTimer(start_time)
示例14: createArchiFromConcepts
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
from al_lib.Constants import *
from al_lib.ArchiLib import ArchiLib
from al_lib.ConceptsImportArchi import ConceptsImportArchi
def createArchiFromConcepts(fileArchimate, fileConceptsImport, fileArchimateImport):
logger.info(u"Using : %s" % fileArchimate)
logger.info(u"Loading :" + fileConceptsImport)
ic = ConceptsImportArchi(fileArchimate, fileConceptsImport)
concepts = Concepts.loadConcepts(fileConceptsImport)
# Create Subfolder
folder = u"Implementation & Migration"
subfolder = u"Dependancy Analysis - %s" % time.strftime(u"%Y%d%m_%H%M%S")
ic.importConcepts(concepts, folder, subfolder)
ic.exportXML(fileArchimateImport)
if __name__ == u"__main__":
start_time = ArchiLib.startTimer()
createArchiFromConcepts(fileArchimateTest, fileConceptsExport, fileArchimateImport)
ArchiLib.stopTimer(start_time)
示例15: queryGraph
# 需要导入模块: from al_lib.ArchiLib import ArchiLib [as 别名]
# 或者: from al_lib.ArchiLib.ArchiLib import startTimer [as 别名]
def queryGraph(gdb):
nj = Neo4JLib(gdb, fileCSVExport)
start_time = ArchiLib.startTimer()
# nj.Neo4JCounts()
#
# Useful Cypher Queries
#
# UpdateQuery = "match (n0 {typeName:'BusinessObject', name:'Contract'}) set n0.PageRank = 1 return n"
# demoQuery1 = "MATCH (n0:Stakeholder)-- (r0)-- (n1:WorkPackage)--(r1)--(n2:BusinessObject) RETURN n0, r0, n1, r1, n2"
# demoQuery2 = "MATCH (n0:WorkPackage)--(r0)--(n1:ApplicationComponent)--(r1)--(n2:ApplicationService)--(r2)--(n3:BusinessProcess) where n1.aname = 'Contract Management' RETURN n0, r0, n1, r1, n2, r2, n3"
# delNodes = "MATCH (n { name: 'Node' })-[r]-() DELETE n, r"
ql = list()
if True:
qs1 = u"MATCH (n:ApplicationFunction)-[r1]-(m:ApplicationComponent)-[r2]-(o:DataObject) "
qs2 = u"where n.parentPath =~ \"/DVC V3.10/Application/AS400/[ A-Za-z0-9/]+\" "
qs3 = u"return distinct m.aname, m.typeName, m.parentPath, n.aname, n.typeName, n.parentPath, "
qs4 = u"o.aname, o.typeName, o.parentPath order by m.typeName"
qs = qs1 + qs2 + qs3 + qs4
elif False:
qs = u"MATCH (a:ApplicationComponent)-[r*1..2]-(b:ApplicationComponent)-[r1*1..2]-(c:BusinessObject)-[r2*1..2]-(d:Requirement) RETURN distinct a.aname as Application, b.aname, b.typeName, c.aname, c.typeName, d.aname"
qs1 = u"MATCH (a:BusinessObject)-[r0]-(c:Requirement), (b:BusinessObject)-[r1]-(d:DataObject), (f:DataObject)-[]-(g:ApplicationComponent) where a = b and d=f RETURN a.aname as BusinessObject, c.aname as Requirement, d.aname as DataObject, g.aname as Application"
qs2 = u"MATCH (n:BusinessObject)-[r]-(m) where m.typeName = \"BusinessObject\" or m.typeName = \"DataObject\" or m.typeName = \"Requirement\" RETURN n.aname, n.typeName, m.aname, m.typeName"
elif False:
qs1 =u"MATCH (n:BusinessObject)-[r*1..2]->(m:DataObject) where left(m.parentPath, 46) = \"/DVC V34/Application/Data Objects/AS400 Tables\" RETURN n.aname, n.typeName, m.aname, m.typeName"
qs = qs1
# These first queries are used for CMS to ECM - Hopefully, they will open some doors
elif False:
qs1 = u"MATCH (n:ApplicationComponent {aname : \"GoPublish Websites\"})-[r1]-(m)-[r2]-(o) return n.aname, n.parentPath, m.aname, m.parentPath, o.aname, o.parentPath"
qs2 = u"MATCH (n:ApplicationComponent {aname : \"Hippo Websites\"})-[r1]->(m) return n.aname, n.parentPath, m.aname, m.parentPath"
qs3 = u"MATCH (n:ApplicationComponent {aname : \"DLP Websites\"})-[r1]->(m) return n.aname, n.parentPath, m.aname, m.parentPath"
qs4 = u"MATCH (n:ApplicationComponent {aname : \"OneSource Websites\"})-[r1]->(m) return n.aname, n.parentPath, m.aname, m.parentPath"
qs = qs4
elif False:
qs1 = u"MATCH (n:DataObject)-[r*1..2]->(m:DataObject) where left(n.parentPath, 42) = \"/CMS INTO ECM V5/Application/Content Types\" RETURN n.aname, n.parentPath, m.aname, m.parentPath"
qs =qs1
elif False:
qs0 = u"MATCH (n:ArchimateDiagramModel)-[r]->(m:DiagramObject)-[r1]->(o:ApplicationComponent)-[r2*1..2]->(p:ApplicationComponent) where left(n.parentPath, 46) = \"/CMS INTO ECM V5/Views/3. Application/Websites\" RETURN n.aname, n.parentPath, m.parentPath, o.aname, p.aname"
qs1 = u"MATCH (n:ArchimateDiagramModel)-[r]->(m:DiagramObject)-[r1]->(o:ApplicationComponent)-[r2*1..3]->(p:DataObject) where left(n.parentPath, 46) = \"/CMS INTO ECM V5/Views/3. Application/Websites\" RETURN n.aname, o.aname, p.aname"
qs2 = u"MATCH (n:ArchimateDiagramModel)-[r]->(m:DiagramObject)-[r1]->(o:ApplicationComponent)-[r2*1..3]->(p:ApplicationComponent)-[r3*0..3]->(q:DataObject) where left(n.parentPath, 46) = \"/CMS INTO ECM V5/Views/3. Application/Websites\" RETURN n.aname, o.aname, p.aname, q.aname"
qs3 = u"MATCH (n:ArchimateDiagramModel)-[r]->(m:DiagramObject)-[r1]->(o:ApplicationComponent)-[r2*0..1]->(p:ApplicationComponent) where left(n.parentPath, 46) = \"/CMS INTO ECM V5/Views/3. Application/Websites\" RETURN n.aname, m.typeName, o.aname, p.aname"
qs = qs3
elif False:
qs = u"match (n:BusinessObject)-[r]->(m:Requirement) return n.aname, count(m) order by count(m) desc"
elif False:
qs = u"MATCH (a)-[r]->(b) WHERE labels(a) <> [] AND labels(b) <> [] RETURN DISTINCT head(labels(a)) AS This, type(r) as To, head(labels(b)) AS That"
elif False:
qs = u"MATCH (m:ApplicationComponent) - [r] -> (n:ApplicationFunction) RETURN distinct(n.aname) as Function, n.parentPath, r.typeName as Type, m.aname as Component, m.parentPath order by n.aname"
elif False:
# Determine order of service development based on the dependancy analysis done on Business Processes
# qs = u"match (l:ApplicationService)--(r0:Relation)-- (n:BusinessProcess)--(r1:Relation)--(m:WorkPackage) return m,l,n order by m.aname"
# Try with Application Component as well
qs = u"match (i:DataObject)--(r0:Relation) -- (j:ApplicationComponent)--(r1:Relation)--(l:ApplicationService)--(r2:Relation)-- (n:BusinessProcess)--(r3:Relation)--(m:WorkPackage) return m,n,l,j,i order by m.aname"
elif False:
# Determine the business process ordering by the magnitude of the reqiurements
qs = u"match (i:Requirement)--(r1:Relation)--(j:BusinessObject)--(r2:Relation)--(k:BusinessProcess)--(r3:Relation)--(l:WorkPackage) return l,k,j,count(i) order by l.aname"
elif False:
# Determine a Business Scenario's associciation to Business Processes
# qs = u"match (n0:BusinessEvent) --> (r0:TriggeringRelationship) --> (n1:BusinessProcess) --> (r1:TriggeringRelationship) --> (n2:BusinessEvent) return n0, r0, n1, r1, n2"
qs = u"match (n0:BusinessEvent) --> (r0:Relation)--> (n1:BusinessProcess) -[*1..10]-> (r1:FlowRelationship) --> (n2:BusinessProcess) return n0, n1, n2 order by n0.aname"
elif False:
qs = u"MATCH (n0:BusinessObject) --> (r0:Relation) --> (n1:BusinessProcess) "
qs = qs + u"where (toint(substring(n1.aname, 0, 1)) is null ) "
qs = qs + u"return n0.aname, n1.aname order by n0.aname desc"
elif False:
qs = u"match (n:BusinessProcess) <-- (r0:Relation) <-- (m:ApplicationService) "
qs = qs + u"with n, m, count(r) as cr "
qs = qs + u" where cr > 0 "
qs = qs + u" return n.aname, m.aname, cr"
elif False:
qs = u"MATCH (n:Requirement) <-- (r0:Relation) <-- (n0:BusinessObject) --> (r1:Relation) --> (n1:BusinessProcess) "
qs = qs + u"where (toint(substring(n1.aname, 0, 1)) is null ) "
qs = qs + u"return count(n), n0.aname, n0.Degree, n0.PageRank, n1.aname, n1.Degree, n1.PageRank order by n0.aname desc"
elif False:
ql.append(u"ApplicationFunction")
ql.append(u"ApplicationComponent")
#.........这里部分代码省略.........