001/* ***** BEGIN LICENSE BLOCK ***** 002 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 003 * 004 * The contents of this file are subject to the Mozilla Public License Version 005 * 1.1 (the "License"); you may not use this file except in compliance with 006 * the License. You may obtain a copy of the License at 007 * http://www.mozilla.org/MPL/ 008 * 009 * Software distributed under the License is distributed on an "AS IS" basis, 010 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 011 * for the specific language governing rights and limitations under the 012 * License. 013 * 014 * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 015 * Java(TM), hosted at https://github.com/gunterze/dcm4che. 016 * 017 * The Initial Developer of the Original Code is 018 * Agfa Healthcare. 019 * Portions created by the Initial Developer are Copyright (C) 2011 020 * the Initial Developer. All Rights Reserved. 021 * 022 * Contributor(s): 023 * See @authors listed below 024 * 025 * Alternatively, the contents of this file may be used under the terms of 026 * either the GNU General Public License Version 2 or later (the "GPL"), or 027 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 028 * in which case the provisions of the GPL or the LGPL are applicable instead 029 * of those above. If you wish to allow use of your version of this file only 030 * under the terms of either the GPL or the LGPL, and not to allow others to 031 * use your version of this file under the terms of the MPL, indicate your 032 * decision by deleting the provisions above and replace them with the notice 033 * and other provisions required by the GPL or the LGPL. If you do not delete 034 * the provisions above, a recipient may use your version of this file under 035 * the terms of any one of the MPL, the GPL or the LGPL. 036 * 037 * ***** END LICENSE BLOCK ***** */ 038 039package org.dcm4che3.data; 040 041import java.util.Date; 042import java.util.TimeZone; 043 044/** 045 * @author Gunter Zeilinger <gunterze@gmail.com> 046 */ 047enum SequenceValueType implements ValueType { 048 SQ; 049 050 @Override 051 public boolean isStringValue() { 052 return false; 053 } 054 055 @Override 056 public boolean useSpecificCharacterSet() { 057 return false; 058 } 059 060 @Override 061 public boolean isIntValue() { 062 return false; 063 } 064 065 @Override 066 public boolean isTemporalType() { 067 return false; 068 } 069 070 @Override 071 public int numEndianBytes() { 072 throw new UnsupportedOperationException(); 073 } 074 075 @Override 076 public byte[] toggleEndian(byte[] b, boolean preserve) { 077 throw new UnsupportedOperationException(); 078 } 079 080 @Override 081 public byte[] toBytes(Object val, SpecificCharacterSet cs) { 082 throw new UnsupportedOperationException(); 083 } 084 085 @Override 086 public String toString(Object val, boolean bigEndian, int valueIndex, 087 String defVal) { 088 throw new UnsupportedOperationException(); 089 } 090 091 @Override 092 public Object toStrings(Object val, boolean bigEndian, 093 SpecificCharacterSet cs) { 094 throw new UnsupportedOperationException(); 095 } 096 097 @Override 098 public int toInt(Object val, boolean bigEndian, int valueIndex, 099 int defVal) { 100 throw new UnsupportedOperationException(); 101 } 102 103 @Override 104 public int[] toInts(Object val, boolean bigEndian) { 105 throw new UnsupportedOperationException(); 106 } 107 108 @Override 109 public float toFloat(Object val, boolean bigEndian, int valueIndex, 110 float defVal) { 111 throw new UnsupportedOperationException(); 112 } 113 114 @Override 115 public float[] toFloats(Object val, boolean bigEndian) { 116 throw new UnsupportedOperationException(); 117 } 118 119 @Override 120 public double toDouble(Object val, boolean bigEndian, int valueIndex, 121 double defVal) { 122 throw new UnsupportedOperationException(); 123 } 124 125 @Override 126 public double[] toDoubles(Object val, boolean bigEndian) { 127 throw new UnsupportedOperationException(); 128 } 129 130 @Override 131 public Date toDate(Object val, TimeZone tz, int valueIndex, boolean ceil, 132 Date defVal, DatePrecision precision) { 133 throw new UnsupportedOperationException(); 134 } 135 136 @Override 137 public Date[] toDate(Object val, TimeZone tz, boolean ceil, 138 DatePrecisions precisions) { 139 throw new UnsupportedOperationException(); 140 } 141 142 @Override 143 public Object toValue(byte[] b) { 144 throw new UnsupportedOperationException(); 145 } 146 147 @Override 148 public Object toValue(String s, boolean bigEndian) { 149 throw new UnsupportedOperationException(); 150 } 151 152 @Override 153 public Object toValue(String[] ss, boolean bigEndian) { 154 throw new UnsupportedOperationException(); 155 } 156 157 @Override 158 public Object toValue(int[] is, boolean bigEndian) { 159 throw new UnsupportedOperationException(); 160 } 161 162 @Override 163 public Object toValue(float[] fs, boolean bigEndian) { 164 throw new UnsupportedOperationException(); 165 } 166 167 @Override 168 public Object toValue(double[] ds, boolean bigEndian) { 169 throw new UnsupportedOperationException(); 170 } 171 172 @Override 173 public Object toValue(Date[] ds, TimeZone tz, DatePrecision precision) { 174 throw new UnsupportedOperationException(); 175 } 176 177 @Override 178 public boolean prompt(Object val, boolean bigEndian, 179 SpecificCharacterSet cs, int maxChars, StringBuilder sb) { 180 sb.append(val); 181 return true; 182 } 183 184 @Override 185 public int vmOf(Object val) { 186 return 1; 187 } 188}