Esempio n. 1
0
def renderVocTermDetail(vocterm):
    dagtrees = []
    if not vocterm.isobsolete and vocterm.dagnodes:
        # build DAG trees for all the paths
        dagtrees = DagBuilder.buildDagTrees(vocterm.dagnodes)
        
    return render_template('detail/vocterm_detail.html',
                           vocterm = vocterm,
                           dagtrees = dagtrees)
Esempio n. 2
0
def renderVocTermDetail(vocterm):
    dagtrees = []
    if not vocterm.isobsolete and vocterm.dagnodes:
        # build DAG trees for all the paths
        dagtrees = DagBuilder.buildDagTrees(vocterm.dagnodes)
        
    return render_template('detail/vocterm_detail.html',
                           vocterm = vocterm,
                           dagtrees = dagtrees)
Esempio n. 3
0
def _loadFeatureTypeDag():
    """
    Loads the Feature Type DAG terms
    and builds a DAG tree
    """
    dagtree = None
    
    # get root term
    rootTerm = VocTerm.query.filter_by(
                    vocabname=FEATURE_TYPE_VOCAB_NAME,
                    term=FEATURE_TYPE_ROOT).first()
    
    if rootTerm and rootTerm.dagnodes:
        dagtree = DagBuilder.buildDagTreeFromRoot(rootTerm.dagnodes[0])

	for node in dagtree['root'].tree_list:
	    db.session.expunge(node.dagnode)
	    db.session.expunge(node.dagnode.vocterm)
    
    return dagtree