1 17 package org.apache.ws.jaxme.xs.xml.impl; 18 19 import org.apache.ws.jaxme.xs.xml.*; 20 21 22 53 public class XsEWhiteSpaceImpl extends XsTFacetImpl implements XsEWhiteSpace { 54 protected XsEWhiteSpaceImpl(XsObject pParent) { 55 super(pParent); 56 } 57 58 public void setValue(String pValue) { 59 if ("preserve".equals(pValue) || "replace".equals(pValue) || 60 "collapse".equals(pValue)) { 61 super.setValue(pValue); 62 } else { 63 throw new IllegalArgumentException ("Invalid value: " + pValue + "; expected either of 'preserve', 'replace', or 'collapse'"); 64 } 65 } 66 67 public boolean isPreserving() { 68 return "preserve".equals(getValue()); 69 } 70 71 public boolean isReplacing() { 72 return "replace".equals(getValue()); 73 } 74 75 public boolean isCollapsing() { 76 return "collapse".equals(getValue()); 77 } 78 79 public String getFacetName() { 80 return "whiteSpace"; 81 } 82 } 83 | Popular Tags |