1 16 package org.apache.axis.types; 17 18 import org.apache.axis.utils.Messages; 19 20 27 public class Id extends NCName { 28 29 public Id() { 30 super(); 31 } 32 33 37 public Id(String stValue) throws IllegalArgumentException { 38 try { 39 setValue(stValue); 40 } 41 catch (IllegalArgumentException e) { 42 throw new IllegalArgumentException ( 44 Messages.getMessage("badIdType00") + "data=[" + 45 stValue + "]"); 46 } 47 } 48 49 55 public void setValue(String stValue) throws IllegalArgumentException { 56 if (Id.isValid(stValue) == false) 57 throw new IllegalArgumentException ( 58 Messages.getMessage("badIdType00") + 59 " data=[" + stValue + "]"); 60 m_value = stValue; 61 } 62 63 69 public static boolean isValid(String stValue) { 70 return NCName.isValid(stValue); 71 } 72 } 73 | Popular Tags |