1 17 package org.apache.ws.jaxme.xs.xml.impl; 18 19 import org.apache.ws.jaxme.xs.xml.*; 20 import org.apache.ws.jaxme.xs.xml.XsNamespaceList.Basic; 21 import org.apache.ws.jaxme.xs.xml.XsNamespaceList.Other; 22 23 24 47 public class XsTWildcardImpl extends XsTAnnotatedImpl implements XsTWildcard { 48 private XsNamespaceList namespaceList = XsNamespaceList.ANY; 49 private ProcessContents processContents = STRICT; 50 51 protected XsTWildcardImpl(XsObject pParent) { 52 super(pParent); 53 } 54 55 public void setNamespace(final String pNamespaceList) { 56 if (getXsESchema().getTargetNamespace() == null) { 57 XsAnyURI pTargetNamespace = getXsESchema().getTargetNamespace(); 60 if ("##any".equals(pNamespaceList)) { 61 namespaceList = XsNamespaceList.ANY; 62 } else if ("##other".equals(pNamespaceList)) { 63 namespaceList = new Other(pTargetNamespace){ 64 public XsAnyURI[] getUris() { 65 XsAnyURI targetNamespace = getXsESchema().getTargetNamespace(); 66 if (targetNamespace == null) { 67 return super.getUris(); 68 } else { 69 return new XsAnyURI[]{targetNamespace}; 70 } 71 } 72 }; 73 } else { 74 namespaceList = new Basic(pNamespaceList, pTargetNamespace){ 75 public XsAnyURI[] getUris() { 76 XsAnyURI targetNamespace = getXsESchema().getTargetNamespace(); 77 if (targetNamespace == null) { 78 return super.getUris(); 79 } else { 80 return XsNamespaceList.valueOf(pNamespaceList, targetNamespace).getUris(); 81 } 82 } 83 }; 84 }; 85 } else { 86 namespaceList = XsNamespaceList.valueOf(pNamespaceList, getXsESchema().getTargetNamespace()); 88 } 89 } 90 91 public XsNamespaceList getNamespace() { 92 return namespaceList; 93 } 94 95 public void setProcessContents(ProcessContents pProcessContents) { 96 processContents = pProcessContents; 97 } 98 99 public ProcessContents getProcessContents() { 100 return processContents; 101 } 102 } 103 | Popular Tags |