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


Write a Geo Term Adds a new geo term to the database and returns the full geoterm with id . If write fails it returns false .
public function writeGeoTerm($term) {
        if ($term == null || $term->getName() == null || $term->getName() == "") {
            return false;
        }
        $written = new \snac\data\GeoTerm($term->toArray()); 
        $id = $this->sql->insertGeoTerm( $term->getName(),
                                            $term->getURI(),
                                            $term->getLatitude(),
                                            $term->getLongitude(),
                                            $term->getAdministrationCode(),
                                            $term->getCountryCode()
                                        );
        if (!$id)
            return false;
        $written->setID($id);
        return $written;
    }
public function writeGeoTerm ( $ term ) { if ( $ term == null || $ term -> getName ( ) == null || $ term -> getName ( ) == " " ) { return false ; } $ written = new \ snac \ data \ GeoTerm ( $ term -> toArray ( ) ) ; $ id = $ this -> sql -> insertGeoTerm ( $ term -> getName ( ) , $ term -> getURI ( ) , $ term -> getLatitude ( ) , $ term -> getLongitude ( ) , $ term -> getAdministrationCode ( ) , $ term -> getCountryCode ( ) ) ; if ( ! $ id ) return false ; $ written -> setID ( $ id ) ; return $ written ; }
Write a Geo Term
 Adds a new geo term to the database and returns the full geoterm with id.
Write a Geo Term Adds a new geo term to the database and returns the full geoterm with id .
// deep copy