src/snac/server/database/DBUtil.php
/**
     * Write a Vocabulary Term
     *
     * Adds a new vocabulary term to the database and returns the full term with id.  If
     * write fails, it returns false.
     *
     * @param  \snac\data\Term $term Vocabulary term to write
     * @return \snac\data\Term|boolean       Term if succeeded, or false on failure
     */
Write a Vocabulary Term
Adds a new vocabulary term to the database and returns the full term with id.  If
write fails, it returns false.


Write a Vocabulary Term Adds a new vocabulary term to the database and returns the full term with id . If write fails it returns false .
public function writeVocabularyTerm($term) {
        if ($term == null || $term->getType() == null || $term->getType() == "" || $term->getTerm() == null || $term->getTerm() == "") {
            return false;
        }
        $written = new \snac\data\Term($term->toArray()); 
        $id = $this->sql->insertVocabularyTerm($term->getType(), $term->getTerm(), $term->getURI(), $term->getDescription());
        if (!$id)
            return false;
        $written->setID($id);
        return $written;
    }
public function writeVocabularyTerm ( $ term ) { if ( $ term == null || $ term -> getType ( ) == null || $ term -> getType ( ) == " " || $ term -> getTerm ( ) == null || $ term -> getTerm ( ) == " " ) { return false ; } $ written = new \ snac \ data \ Term ( $ term -> toArray ( ) ) ; $ id = $ this -> sql -> insertVocabularyTerm ( $ term -> getType ( ) , $ term -> getTerm ( ) , $ term -> getURI ( ) , $ term -> getDescription ( ) ) ; if ( ! $ id ) return false ; $ written -> setID ( $ id ) ; return $ written ; }
Write a Vocabulary Term
 Adds a new vocabulary term to the database and returns the full term with id.
Write a Vocabulary Term Adds a new vocabulary term to the database and returns the full term with id .
// deep copy