1 19 package org.netbeans.modules.xml.schema.model.impl; 20 21 import org.netbeans.modules.xml.schema.model.Any; 22 import org.w3c.dom.Element ; 23 27 public abstract class CommonAnyImpl extends SchemaComponentImpl implements Any { 28 29 32 public CommonAnyImpl(SchemaModelImpl model, Element el) { 33 super(model, el); 34 } 35 36 39 public void setNamespace(String namespace) { 40 setAttribute(NAMESPACE_PROPERTY, SchemaAttributes.NAMESPACE, namespace); 41 } 42 43 46 public void setProcessContents(ProcessContents pc) { 47 setAttribute(PROCESS_CONTENTS_PROPERTY, SchemaAttributes.PROCESS_CONTENTS, pc); 48 } 49 50 public ProcessContents getDefaultProcessContents() { 51 return ProcessContents.STRICT; 52 } 53 54 public ProcessContents getEffectiveProcessContents() { 55 ProcessContents v = getProcessContents(); 56 return v == null ? getDefaultProcessContents() : v; 57 } 58 59 62 public ProcessContents getProcessContents() { 63 String s = getAttribute(SchemaAttributes.PROCESS_CONTENTS); 64 return s == null? null : Util.parse(ProcessContents.class, s); 65 } 66 67 public ProcessContents getProcessContentsEffective() { 68 ProcessContents v = getProcessContents(); 69 return v == null ? getProcessContentsDefault() : v; 70 } 71 72 public ProcessContents getProcessContentsDefault() { 73 return ProcessContents.STRICT; 74 } 75 76 79 public String getNamespace() { 80 return getAttribute(SchemaAttributes.NAMESPACE); 81 82 } 83 84 public String getNamespaceDefault() { 85 return "##any"; } 87 88 public String getNameSpaceEffective() { 89 String v = getNamespace(); 90 return v == null ? getNamespaceDefault() : v; 91 } 92 } 93 | Popular Tags |