/*
 * Copyright 2012-2014 MarkLogic Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.marklogic.client.eval;

import com.marklogic.client.io.marker.AbstractReadHandle;

public interface EvalResult {
    enum Type {
        STRING,
        NUMBER,
        BOOLEAN,
        ARRAY,
        OBJECT,
        NULL,
        XDM_ATOMIC,
        XDM_ATTRIBUTE,
        XDM_BINARY,
        XDM_COMMENT,
        XDM_DOCUMENT,
        XDM_DURATION,
        XDM_ELEMENT,
        XDM_ITEM,
        XDM_NODE,
        XDM_PROCESSINGINSTRUCTION,
        XDM_SEQUENCE,
        XDM_TEXT,
        XDM_VALUE,
        XDM_VARIABLE,
        XS_ANYURI,
        XS_BASE64BINARY,
        XS_BOOLEAN,
        XS_DATE,
        XS_DATETIME,
        XS_DAYTIMEDURATION,
        XS_DECIMAL,
        XS_DOUBLE,
        XS_DURATION,
        XS_FLOAT,
        XS_GDAY,
        XS_GMONTH,
        XS_GMONTHDAY,
        XS_GYEAR,
        XS_GYEARMONTH,
        XS_HEXBINARY,
        XS_INTEGER,
        XS_QNAME,
        XS_STRING,
        XS_TIME
    };
    public Type getType();
    public <H extends AbstractReadHandle> H get(H handle);
    public <T> T getAs(Class<T> clazz);
}

@@ -771,14 +771,15 @@
     
-NUMBER
+BOOLEAN
 ,%0A  
@@ -776,39 +776,41 @@
 OOLEAN,%0A        
-BOOLEAN
+JS_NUMBER
 ,%0A        ARRAY,
@@ -803,16 +803,19 @@
         
+JS_
 ARRAY,%0A 
@@ -821,16 +821,19 @@
         
+JS_
 OBJECT,%0A
@@ -1195,28 +1195,8 @@
 RY,%0A
-        XS_BOOLEAN,%0A
     
@@ -1498,27 +1498,8 @@
 ME,%0A
-        XS_STRING,%0A
     

allow STRING==XS_STRING and BOOLEAN=XS_BOOLEAN; add JS_ prefix on JS only types