/***
 *** Title: NameSpace Utility
 *** Author: Itsuki Noda
 *** Date: 2006.08.18
 ***/

package daruma.xml;

import daruma.xml.NameSpace;
import daruma.xml.DeclaredName;

import daruma.util.Itk;

/**
 * MISP で用いる Xml の要素名、属性名の定数を定義。
 *
 * 将来的には、利用する場所で宣言するのがよいかもしれないが、
 * とりあえずここにまとめておく。
 */

public class Lexicon {
    /**
     * 余計な constructor
     */
    private Lexicon() {}

    //------------------------------------------------------------
    /* SOAP 関連
     */

    public static final DeclaredName SoapEnvelope =
	new DeclaredName("Envelope", 		NameSpace.SOAP_ENV) ;

    public static final DeclaredName SoapProtoVersion =
	new DeclaredName("protocolVersion",	NameSpace.SOAP_ENV) ;

    public static final DeclaredName SoapHeader =
	new DeclaredName("Header",		NameSpace.SOAP_ENV) ;

    public static final DeclaredName SoapBody =
	new DeclaredName("Body",		NameSpace.SOAP_ENV) ;

    public static final DeclaredName SoapFault =
	new DeclaredName("Fault",		NameSpace.SOAP_ENV) ;

    public static final DeclaredName SoapFaultCode =
	new DeclaredName("faultcode",		NameSpace.SOAP_ENV) ;

    public static final DeclaredName SoapFaultString =
	new DeclaredName("faultstring",		NameSpace.SOAP_ENV) ;

    public static final DeclaredName SoapFaultDetail =
	new DeclaredName("detail",		NameSpace.SOAP_ENV) ;
    

    //------------------------------------------------------------
    /* XML Schema 関連
     */

    public static final DeclaredName XsdSchema =
	new DeclaredName("schema",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdImport =
	new DeclaredName("import",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdElement =
	new DeclaredName("element",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdComplexType =
	new DeclaredName("complexType",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdSimpleType =
	new DeclaredName("simpleType",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdGroup =
	new DeclaredName("group",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdComplexContent =
	new DeclaredName("complexContent",	NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdSimpleContent =
	new DeclaredName("simpleContent",	NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdExtension =
	new DeclaredName("extension",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdRestriction =
	new DeclaredName("restriction",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdSequence =
	new DeclaredName("sequence",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdChoice =
	new DeclaredName("choice",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdAll =
	new DeclaredName("all",			NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdAttribute =
	new DeclaredName("attribute",		NameSpace.XML_SCHEMA) ;


    public static final DeclaredName XsdAttrNamespace =
	new DeclaredName("namespace",		NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdAttrSchemaLocation =
	new DeclaredName("schemaLocation",	NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdAttrTargetNs =
	new DeclaredName("targetNamespace",	NameSpace.XML_SCHEMA) ;

    public static final DeclaredName XsdAttrBase =
	new DeclaredName("base",		NameSpace.XML_SCHEMA) ;

    //----------------------------------------
    /* XSD の MISP 拡張
     */
    public static final DeclaredName XsdAttrMispAttrId =
	new DeclaredName("id",			NameSpace.MISP) ;

    /* MISP extention in XML Schema. 
     * if the element definition has the following attribute,
     * DaRuMa let the data indexed in backend DBMS.
     */
    public static final DeclaredName MispAttrIndexed =
	new DeclaredName("indexed",		NameSpace.MISP) ;

    public static final DeclaredName MispAttrIndexed_True =
	new DeclaredName("true",		null) ;


    //------------------------------------------------------------
    /* GML 関連
     */
    public static final DeclaredName GmlFeatureMember =
	new DeclaredName("featureMember",	NameSpace.GML) ;

    public static final DeclaredName GmlGeometry =
	new DeclaredName("Geometry",		NameSpace.GML) ;

    public static final DeclaredName GmlPoint =
	new DeclaredName("Point",		NameSpace.GML) ;

    public static final DeclaredName GmlCurve =
	new DeclaredName("Curve",		NameSpace.GML) ;

    public static final DeclaredName GmlLineString =
	new DeclaredName("LineString",		NameSpace.GML) ;

    public static final DeclaredName GmlLinearRing =
	new DeclaredName("LinearRing",		NameSpace.GML) ;

    public static final DeclaredName GmlSurface =
	new DeclaredName("Surface",		NameSpace.GML) ;

    public static final DeclaredName GmlPolygon =
	new DeclaredName("Polygon",		NameSpace.GML) ;

    public static final DeclaredName GmlBox =
	new DeclaredName("Box",			NameSpace.GML) ;

    public static final DeclaredName GmlGeometryCollection  =
	new DeclaredName("GeometryCollection", 	NameSpace.GML) ;

    public static final DeclaredName GmlMultiPoint =
	new DeclaredName("MultiPoint",		NameSpace.GML) ;

    public static final DeclaredName GmlMultiCurve =
	new DeclaredName("MultiCurve",		NameSpace.GML) ;

    public static final DeclaredName GmlMultiLineString =
	new DeclaredName("MultiLineString",	NameSpace.GML) ;

    public static final DeclaredName GmlMultiSurface =
	new DeclaredName("MultiSurface",	NameSpace.GML) ;

    public static final DeclaredName GmlMultiPolygon =
	new DeclaredName("MultiPolygon",	NameSpace.GML) ;

    public static final DeclaredName GmlCoordinates =
	new DeclaredName("coordinates",		NameSpace.GML) ;

    public static final DeclaredName GmlExterior =
	new DeclaredName("exterior",		NameSpace.GML) ;

    public static final DeclaredName GmlOuterBoundaryIs =
	new DeclaredName("outerBoundaryIs",	NameSpace.GML) ;

    public static final DeclaredName GmlInterior =
	new DeclaredName("interior",		NameSpace.GML) ;

    public static final DeclaredName GmlInnerBoundaryIs =
	new DeclaredName("innerBoundaryIs",	NameSpace.GML) ;

    public static final DeclaredName GmlAttrSrsName =
	new DeclaredName("srsName",		null) ;

    public static final DeclaredName GmlBeginPosition =
	new DeclaredName("beginPosition",	NameSpace.GML) ;

    public static final DeclaredName GmlEndPosition =
	new DeclaredName("endPosition",		NameSpace.GML) ;

    public static final DeclaredName GmlAttrIndeterminatePositon =
	new DeclaredName("indeterminatePositon",null);

    public static final DeclaredName GmlAttrIndeterminatePositon_Unknown =
	new DeclaredName("unknown",		null);

    public static final DeclaredName GmlEnvelope =
	new DeclaredName("Envelope",		NameSpace.GML);

    public static final DeclaredName GmlNull =
	new DeclaredName("Null",		NameSpace.GML);

    public static final DeclaredName GmlNull_Inapplicable =
	new DeclaredName("inapplicable",	null) ;




    //------------------------------------------------------------
    /* MISP 関連
     */
    
    //----------------------------------------
    /* TopLevel
     */

    public static final DeclaredName MispRegisterFeatureType  =
	new DeclaredName("RegisterFeatureType", NameSpace.MISP) ;

    public static final DeclaredName MispRegisterCoordinateSystemTransformation =
	new DeclaredName("RegisterCoordinateSystemTransformation", NameSpace.MISP) ;

    public static final DeclaredName MispDescribeFeatureType =
	new DeclaredName("DescribeFeatureType", NameSpace.MISP) ;

    public static final DeclaredName MispGetCapabilities =
	new DeclaredName("GetCapabilities",	NameSpace.MISP) ;

    public static final DeclaredName MispGetFeature  =
	new DeclaredName("GetFeature",		NameSpace.MISP) ;

    public static final DeclaredName MispTransaction  =
	new DeclaredName("Transaction",		NameSpace.MISP) ;

    public static final DeclaredName MispGetCoordinateSystemTransformation =
	new DeclaredName("GetCoordinateSystemTransformation", NameSpace.MISP) ;


    //----------------------------------------
    /* レスポンス TopLevel
     */
    public static final DeclaredName MispRegisterFeatureTypeResponse =
	new DeclaredName(MispRegisterFeatureType.localname + "Response",
			 NameSpace.MISP) ;

    public static final DeclaredName MispRegisterCoordinateSystemTransformationResponse =
	new DeclaredName(MispRegisterCoordinateSystemTransformation.localname + "Response",
			 NameSpace.MISP) ;
    public static final DeclaredName MispDescribeFeatureTypeResponse =
	new DeclaredName(MispDescribeFeatureType.localname + "Response",
			 NameSpace.MISP) ;

    public static final DeclaredName MispGetCapabilitiesResponse =
	new DeclaredName(MispGetCapabilities.localname + "Response",
			 NameSpace.MISP) ;

    public static final DeclaredName MispGetFeatureResponse =
	new DeclaredName(MispGetFeature.localname + "Response",	
			 NameSpace.MISP) ;

    public static final DeclaredName MispTransactionResponse =
	new DeclaredName(MispTransaction.localname + "Response",
			 NameSpace.MISP) ;

    public static final DeclaredName MispTransactionResult =
	new DeclaredName(MispTransaction.localname + "Result",
			 NameSpace.MISP) ;

    //----------------------------------------
    /* GetCapabilities のレスポンス内容
     */
    public static final DeclaredName MispWfsCapabilities =
	new DeclaredName("WFS_Capabilities",	NameSpace.MISP) ;

    public static final DeclaredName MispCapabilities =
	new DeclaredName("Capabilities",	NameSpace.MISP) ;

    public static final DeclaredName MispFeatureTypeList =
	new DeclaredName("FeatureTypeList",	NameSpace.MISP) ;

    public static final DeclaredName MispOperations =
	new DeclaredName("Operations",		NameSpace.MISP) ;

    public static final DeclaredName MispFeatureType =
	new DeclaredName("FeatureType",		NameSpace.MISP) ;

    public static final DeclaredName MispGetCoordinateSystemTransformationResponse =
	new DeclaredName("GetCoordinateSystemTransformationResponse", NameSpace.MISP) ;

    //----------------------------------------
    /* Transaction 関連
     */
    public static final DeclaredName MispUpdate  =
	new DeclaredName("Update",		NameSpace.MISP) ;

    public static final DeclaredName MispDelete  =
	new DeclaredName("Delete",		NameSpace.MISP) ;

    public static final DeclaredName MispInsert  =
	new DeclaredName("Insert",		NameSpace.MISP) ;

    public static final DeclaredName MispQuery =
	new DeclaredName("Query",		NameSpace.MISP) ;

    //----------------------------------------
    /* Filter 関連
     */
    public static final DeclaredName MispFilter =
	new DeclaredName("Filter",		NameSpace.MISP) ;

    public static final DeclaredName MispName =
	new DeclaredName("Name",		NameSpace.MISP) ;

    public static final DeclaredName MispValue =
	new DeclaredName("Value",		NameSpace.MISP) ;

    public static final DeclaredName MispPropertyName =
	new DeclaredName("PropertyName",	NameSpace.MISP) ;

    public static final DeclaredName MispLiteral =
	new DeclaredName("Literal",		NameSpace.MISP) ;

    public static final DeclaredName MispFunction =
	new DeclaredName("Function",		NameSpace.MISP) ;

    //----------------------------------------
    /* Filter Logical Predicate 関連
     */
    public static final DeclaredName MispFilterTrue =
	new DeclaredName("True",		NameSpace.MISP) ;
    public static final DeclaredName MispFilterFalse =
	new DeclaredName("False",		NameSpace.MISP) ;
    public static final DeclaredName MispFilterAnd =
	new DeclaredName("And",			NameSpace.MISP) ;
    public static final DeclaredName MispFilterOr =
	new DeclaredName("Or",			NameSpace.MISP) ;
    public static final DeclaredName MispFilterNot =
	new DeclaredName("Not",			NameSpace.MISP) ;

    //----------------------------------------
    /* Filter Compariton Predicate 関連
     */
    public static final DeclaredName MispFilterPropertyIsEqualTo =
	new DeclaredName("PropertyIsEqualTo",	NameSpace.MISP) ;
    public static final DeclaredName MispFilterPropertyIsLessThan =
	new DeclaredName("PropertyIsLessThan",  NameSpace.MISP) ;
    public static final DeclaredName MispFilterPropertyIsGreaterThan =
	new DeclaredName("PropertyIsGreaterThan", NameSpace.MISP) ;
    public static final DeclaredName MispFilterPropertyIsLessThanOrEqualTo =
	new DeclaredName("PropertyIsLessThanOrEqualTo", NameSpace.MISP) ;
    public static final DeclaredName MispFilterPropertyIsGreaterThanOrEqualTo =
	new DeclaredName("PropertyIsGreaterThanOrEqualTo", NameSpace.MISP) ;

    //----------------------------------------
    /* Filter Geometry Predicate 関連
     */
    public static final DeclaredName MispFilterBBOX =
	new DeclaredName("BBOX",		NameSpace.MISP) ;
    public static final DeclaredName MispFilterBBox =
	new DeclaredName("BBox",		NameSpace.MISP) ; // deprecated
    public static final DeclaredName MispFilterContains =
	new DeclaredName("Contains",		NameSpace.MISP) ;
    public static final DeclaredName MispFilterCrosses =
	new DeclaredName("Crosses",		NameSpace.MISP) ;
    public static final DeclaredName MispFilterDisjoint =
	new DeclaredName("Disjoint",		NameSpace.MISP) ;
    public static final DeclaredName MispFilterEquals =
	new DeclaredName("Equals",		NameSpace.MISP) ;
    public static final DeclaredName MispFilterIntersects =
	new DeclaredName("Intersects",		NameSpace.MISP) ;
    public static final DeclaredName MispFilterOverlaps =
	new DeclaredName("Overlaps",		NameSpace.MISP) ;
    public static final DeclaredName MispFilterTouches =
	new DeclaredName("Touches",		NameSpace.MISP) ;
    public static final DeclaredName MispFilterWithin =
	new DeclaredName("Within",		NameSpace.MISP) ;
    
    //----------------------------------------
    /* SortBy 関連
     */
    public static final DeclaredName MispSortBy =
	new DeclaredName("SortBy",		NameSpace.MISP) ;
    public static final DeclaredName MispSortProperty =
	new DeclaredName("SortProperty",	NameSpace.MISP) ;

    //----------------------------------------
    /* ResponseStatus 関連
     */
    public static final DeclaredName MispResponseStatus =
	new DeclaredName("ResponseStatus",	NameSpace.MISP) ;

    public static final DeclaredName MispElapsedTime  =
	new DeclaredName("ElapsedTime",		NameSpace.MISP) ;

    public static final DeclaredName MispMostRecentTransactionID =
	new DeclaredName("MostRecentTransactionID",	NameSpace.MISP) ;

    public static final DeclaredName MispTransactionID =
	new DeclaredName("TransactionID",	NameSpace.MISP) ;

    public static final DeclaredName MispMessage =
	new DeclaredName("Message",		NameSpace.MISP) ;

    public static final DeclaredName MispInsertCount =
	new DeclaredName("InsertCount",		NameSpace.MISP) ;
    public static final DeclaredName MispUpdateCount =
	new DeclaredName("UpdateCount",		NameSpace.MISP) ;
    public static final DeclaredName MispDeleteCount =
	new DeclaredName("DeleteCount",		NameSpace.MISP) ;

    public static final DeclaredName MispStatus =
	new DeclaredName("Status",		NameSpace.MISP) ;

    public static final DeclaredName MispStatus_Success =
	new DeclaredName("SUCCESS",		null) ;

    public static final DeclaredName MispStatus_Failure =
	new DeclaredName("FAILURE",		null) ;



    public static final DeclaredName MispFeatureCollection =
	new DeclaredName("FeatureCollection",	NameSpace.MISP) ;

    public static final DeclaredName MispFeatureCount =
	new DeclaredName("FeatureCount",	NameSpace.MISP) ;

    public static final DeclaredName MispBoundedBy =
	new DeclaredName("BoundedBy",		NameSpace.MISP) ;


    //----------------------------------------
    /* Error 関連
     */
    public static final DeclaredName MispError =
	new DeclaredName("Error",		NameSpace.MISP) ;

    public static final DeclaredName MispErrorTypeName =
	new DeclaredName("TypeName",		NameSpace.MISP) ;

    public static final DeclaredName MispErrorMessage =
	new DeclaredName("Message",		NameSpace.MISP) ;

    public static final DeclaredName MispErrorStackTrace =
	new DeclaredName("StackTrace",		NameSpace.MISP) ;


    //----------------------------------------
    /* MISP 属性 関連
     */
    public static final DeclaredName MispAttrId =
	new DeclaredName("id",			NameSpace.MISP) ;

    public static final DeclaredName MispAttrTypeName =
	new DeclaredName("typeName",		NameSpace.MISP) ;

    public static final DeclaredName MispAttrMode =
	new DeclaredName("mode",		NameSpace.MISP) ;

    public static final DeclaredName MispAttrMode_Preserve =
	new DeclaredName("preserve",		null) ;


    //----------------------------------------
    /* Query Mode
     */
    /* GetFeature の Query の mode 属性の名前 */
    public static final DeclaredName MispAttrQueryMode = 
	new DeclaredName("mode",		null);

    
    /* GetFeature の Query の mode 属性で boundedBy の場合の
     * property 指定用属性名 */
    public static final DeclaredName MispAttrQueryProp = 
	new DeclaredName("property",		null);

    /* GetFeature の Query mode のうちの１つで、feature list を返す
     * モード名。通常の query mode */
    public static final DeclaredName MispAttrQueryMode_Features = 
	new DeclaredName("features",		null);

    /* GetFeature の Query mode のうちの１つで、feature の数を返す
     * モード名。*/
    public static final DeclaredName MispAttrQueryMode_Count = 
	new DeclaredName("count",		null) ;

    /* GetFeature の Query mode のうちの１つで、feature をカバーする
     * boundary を返すモード名。*/
    public static final DeclaredName MispAttrQueryMode_BoundedBy = 
	new DeclaredName("boundedBy",		null) ;

    /* GetFeature の Query の limit 属性の名前
     * 検索する際の地物の数の上限を指定する。SQL 分の limit に相当。
     * この属性は obsoleted, GetFeature@maxFeatures の使用を推奨 */
    public static final DeclaredName MispAttrQueryLimit = 
	new DeclaredName("limit",		null) ;

    /* GetFeature の maxFeature 属性の名前
     * 検索する際の地物の数の上限を指定する。SQL 分の limit に相当。*/
    public static final DeclaredName MispAttrMaxFeatures = 
	new DeclaredName("maxFeatures",		null) ;

    /* GetFeature の startPosition 属性の名前
     * 返答に検索結果の地物の何件目から返すかを指定する。*/
    public static final DeclaredName MispAttrStartPosition = 
	new DeclaredName("startPosition",		null) ;

    /* 削除されたデータを検索したい時にこれを操作する */
    public static final DeclaredName MispAttrQueryModifyFlag = 
	new DeclaredName("modifyFlag", 		null) ;

}


