incubator-vxquery-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject svn commit: r1390182 - /incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/
Date Tue, 25 Sep 2012 21:56:19 GMT
Author: prestonc
Date: Tue Sep 25 21:56:18 2012
New Revision: 1390182

URL: http://svn.apache.org/viewvc?rev=1390182&view=rev
Log:
Added derived string types to the cast function.

Added:
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToEntityOperation.java
  (with props)
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDOperation.java
  (with props)
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDREFOperation.java
  (with props)
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToLanguageOperation.java
  (with props)
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNCNameOperation.java
  (with props)
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNMTokenOperation.java
  (with props)
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNameOperation.java
  (with props)
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNormalizedStringOperation.java
  (with props)
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTokenOperation.java
  (with props)
Modified:
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/AbstractCastToOperation.java
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToStringOperation.java

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/AbstractCastToOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/AbstractCastToOperation.java?rev=1390182&r1=1390181&r2=1390182&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/AbstractCastToOperation.java
(original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/AbstractCastToOperation.java
Tue Sep 25 21:56:18 2012
@@ -136,7 +136,7 @@ public abstract class AbstractCastToOper
     }
 
     /**
-     * Derived Datatypes
+     * Derived Numeric Datatypes
      */
     public void convertByte(BytePointable bytep, DataOutput dOut) throws SystemException,
IOException {
         throw new SystemException(ErrorCode.XPTY0004);
@@ -186,4 +186,44 @@ public abstract class AbstractCastToOper
         throw new SystemException(ErrorCode.XPTY0004);
     }
 
+    /**
+     * Derived String Datatypes
+     */
+
+    public void convertEntity(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        throw new SystemException(ErrorCode.XPTY0004);
+    }
+
+    public void convertID(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        throw new SystemException(ErrorCode.XPTY0004);
+    }
+
+    public void convertIDREF(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        throw new SystemException(ErrorCode.XPTY0004);
+    }
+
+    public void convertLanguage(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        throw new SystemException(ErrorCode.XPTY0004);
+    }
+
+    public void convertName(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        throw new SystemException(ErrorCode.XPTY0004);
+    }
+
+    public void convertNCName(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        throw new SystemException(ErrorCode.XPTY0004);
+    }
+
+    public void convertNMToken(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        throw new SystemException(ErrorCode.XPTY0004);
+    }
+
+    public void convertNormalizedString(UTF8StringPointable stringp, DataOutput dOut) throws
SystemException,
+            IOException {
+        throw new SystemException(ErrorCode.XPTY0004);
+    }
+
+    public void convertToken(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        throw new SystemException(ErrorCode.XPTY0004);
+    }
 }

Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToEntityOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToEntityOperation.java?rev=1390182&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToEntityOperation.java
(added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToEntityOperation.java
Tue Sep 25 21:56:18 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.vxquery.runtime.functions.cast;
+
+import org.apache.vxquery.datamodel.values.ValueTag;
+
+public class CastToEntityOperation extends CastToStringOperation {
+
+    public CastToEntityOperation() {
+        returnTag = ValueTag.XS_ENTITY_TAG;
+    }
+
+}
\ No newline at end of file

Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToEntityOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDOperation.java?rev=1390182&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDOperation.java
(added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDOperation.java
Tue Sep 25 21:56:18 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.vxquery.runtime.functions.cast;
+
+import org.apache.vxquery.datamodel.values.ValueTag;
+
+public class CastToIDOperation extends CastToStringOperation {
+
+    public CastToIDOperation() {
+        returnTag = ValueTag.XS_ID_TAG;
+    }
+
+}
\ No newline at end of file

Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDREFOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDREFOperation.java?rev=1390182&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDREFOperation.java
(added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDREFOperation.java
Tue Sep 25 21:56:18 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.vxquery.runtime.functions.cast;
+
+import org.apache.vxquery.datamodel.values.ValueTag;
+
+public class CastToIDREFOperation extends CastToStringOperation {
+
+    public CastToIDREFOperation() {
+        returnTag = ValueTag.XS_IDREF_TAG;
+    }
+
+}
\ No newline at end of file

Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToIDREFOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToLanguageOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToLanguageOperation.java?rev=1390182&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToLanguageOperation.java
(added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToLanguageOperation.java
Tue Sep 25 21:56:18 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.vxquery.runtime.functions.cast;
+
+import org.apache.vxquery.datamodel.values.ValueTag;
+
+public class CastToLanguageOperation extends CastToStringOperation {
+
+    public CastToLanguageOperation() {
+        returnTag = ValueTag.XS_LANGUAGE_TAG;
+    }
+
+}
\ No newline at end of file

Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToLanguageOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNCNameOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNCNameOperation.java?rev=1390182&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNCNameOperation.java
(added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNCNameOperation.java
Tue Sep 25 21:56:18 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.vxquery.runtime.functions.cast;
+
+import org.apache.vxquery.datamodel.values.ValueTag;
+
+public class CastToNCNameOperation extends CastToStringOperation {
+
+    public CastToNCNameOperation() {
+        returnTag = ValueTag.XS_NCNAME_TAG;
+    }
+
+}
\ No newline at end of file

Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNCNameOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNMTokenOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNMTokenOperation.java?rev=1390182&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNMTokenOperation.java
(added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNMTokenOperation.java
Tue Sep 25 21:56:18 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.vxquery.runtime.functions.cast;
+
+import org.apache.vxquery.datamodel.values.ValueTag;
+
+public class CastToNMTokenOperation extends CastToStringOperation {
+
+    public CastToNMTokenOperation() {
+        returnTag = ValueTag.XS_NMTOKEN_TAG;
+    }
+
+}
\ No newline at end of file

Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNMTokenOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNameOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNameOperation.java?rev=1390182&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNameOperation.java
(added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNameOperation.java
Tue Sep 25 21:56:18 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.vxquery.runtime.functions.cast;
+
+import org.apache.vxquery.datamodel.values.ValueTag;
+
+public class CastToNameOperation extends CastToStringOperation {
+
+    public CastToNameOperation() {
+        returnTag = ValueTag.XS_NAME_TAG;
+    }
+
+}
\ No newline at end of file

Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNameOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNormalizedStringOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNormalizedStringOperation.java?rev=1390182&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNormalizedStringOperation.java
(added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNormalizedStringOperation.java
Tue Sep 25 21:56:18 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.vxquery.runtime.functions.cast;
+
+import org.apache.vxquery.datamodel.values.ValueTag;
+
+public class CastToNormalizedStringOperation extends CastToStringOperation {
+
+    public CastToNormalizedStringOperation() {
+        returnTag = ValueTag.XS_NORMALIZED_STRING_TAG;
+    }
+
+}
\ No newline at end of file

Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToNormalizedStringOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToStringOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToStringOperation.java?rev=1390182&r1=1390181&r2=1390182&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToStringOperation.java
(original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToStringOperation.java
Tue Sep 25 21:56:18 2012
@@ -730,7 +730,7 @@ public class CastToStringOperation exten
     }
 
     /**
-     * Derived Datatypes
+     * Derived Numeric Datatypes
      */
     public void convertByte(BytePointable bytep, DataOutput dOut) throws SystemException,
IOException {
         abvsInner.reset();
@@ -805,6 +805,63 @@ public class CastToStringOperation exten
     }
 
     /**
+     * Derived String Data Types
+     */
+    @Override
+    public void convertEntity(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        // TODO Add check to verify string consists of limited character set.
+        convertString(stringp, dOut);
+    }
+
+    @Override
+    public void convertID(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        // TODO Add check to verify string consists of limited character set.
+        convertString(stringp, dOut);
+    }
+
+    @Override
+    public void convertIDREF(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        // TODO Add check to verify string consists of limited character set.
+        convertString(stringp, dOut);
+    }
+
+    @Override
+    public void convertLanguage(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        // TODO Add check to verify string consists of limited character set.
+        convertString(stringp, dOut);
+    }
+
+    @Override
+    public void convertName(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        // TODO Add check to verify string consists of limited character set.
+        convertString(stringp, dOut);
+    }
+
+    @Override
+    public void convertNCName(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        // TODO Add check to verify string consists of limited character set.
+        convertString(stringp, dOut);
+    }
+
+    @Override
+    public void convertNMToken(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        // TODO Add check to verify string consists of limited character set.
+        convertString(stringp, dOut);
+    }
+
+    @Override
+    public void convertNormalizedString(UTF8StringPointable stringp, DataOutput dOut) throws
SystemException, IOException {
+        // TODO Add check to verify string consists of limited character set.
+        convertString(stringp, dOut);
+    }
+
+    @Override
+    public void convertToken(UTF8StringPointable stringp, DataOutput dOut) throws SystemException,
IOException {
+        // TODO Add check to verify string consists of limited character set.
+        convertString(stringp, dOut);
+    }
+
+    /**
      * Returns the number of digits in a long. A few special cases that needed attention.
      */
     private int getNumberOfDigits(long value) {

Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTokenOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTokenOperation.java?rev=1390182&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTokenOperation.java
(added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTokenOperation.java
Tue Sep 25 21:56:18 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.vxquery.runtime.functions.cast;
+
+import org.apache.vxquery.datamodel.values.ValueTag;
+
+public class CastToTokenOperation extends CastToStringOperation {
+
+    public CastToTokenOperation() {
+        returnTag = ValueTag.XS_TOKEN_TAG;
+    }
+
+}
\ No newline at end of file

Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToTokenOperation.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message