/**
 *  '$RCSfile$'
 *  Copyright: 2016 Regents of the University of California and the
 *             National Center for Ecological Analysis and Synthesis
 *    Authors: Jing Tao
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package edu.ucsb.nceas.metacat.service;

import edu.ucsb.nceas.metacat.DocumentImpl;


/**
 * This class represents the information for a schema without a namespace
 * @author tao
 *
 */
public class XMLNoNamespaceSchema extends XMLSchema {
    private String noNamespaceSchemaLocation = null;
    private static final String type = DocumentImpl.NONAMESPACESCHEMA;
   
    /**
     * Constructor of the object
     * @param noNamespaceSchemaLocation  the uri of the noNamespaceSchemaLocation of the schema
     * @param externalFileUri  the registered file url location for this schema
     * @param formatId  the format id of a xml instance of the schema
     */
    public XMLNoNamespaceSchema(String noNamespaceSchemaLocation, String externalFileUri, String formatId) {
        //since it doesn't have a namespace, the null value will be set for the namespace
        super(null, externalFileUri, formatId);
        this.noNamespaceSchemaLocation = noNamespaceSchemaLocation;
    }
    
    /**
     * Get the no-namespace-schemal-location uri
     * @return
     */
    public String getNoNamespaceSchemaLocation() {
        return noNamespaceSchemaLocation;
    }
    
    /**
     * Set the no-namespace-schemal-location uri
     * @param noNamespaceSchemaLocation
     */
    public void setNoNamespaceSchemaLocation(String noNamespaceSchemaLocation) {
        this.noNamespaceSchemaLocation = noNamespaceSchemaLocation;
    }
    
    /**
     * Return the type of schema. It always is "NoNamespaceSchema".
     * @return
     */
    public static String getType() {
        return type;
    }
}