1 19 20 package org.netbeans.modules.xml.schema.model.impl; 21 22 import java.util.Collection ; 23 import org.netbeans.modules.xml.schema.model.Annotation; 24 import org.netbeans.modules.xml.schema.model.AppInfo; 25 import org.netbeans.modules.xml.schema.model.Documentation; 26 import org.netbeans.modules.xml.schema.model.SchemaComponent; 27 import org.netbeans.modules.xml.schema.model.visitor.SchemaVisitor; 28 import org.w3c.dom.Element ; 29 30 34 public class AnnotationImpl extends SchemaComponentImpl implements Annotation { 35 36 protected AnnotationImpl(SchemaModelImpl model) { 37 this(model, createNewComponent(SchemaElements.ANNOTATION, model)); 38 } 39 42 public AnnotationImpl(SchemaModelImpl model, Element el) { 43 super(model, el); 44 } 45 46 50 public Class <? extends SchemaComponent> getComponentType() { 51 return Annotation.class; 52 } 53 54 57 public void removeDocumentation(Documentation documentation) { 58 removeChild(DOCUMENTATION_PROPERTY, documentation); 59 } 60 61 64 public void addDocumentation(Documentation documentation) { 65 appendChild(DOCUMENTATION_PROPERTY, documentation); 66 } 67 68 71 public void accept(SchemaVisitor visitor) { 72 visitor.visit(this); 73 } 74 75 78 public java.util.Collection <Documentation> getDocumentationElements() { 79 return getChildren(Documentation.class); 80 } 81 82 public void removeAppInfo(AppInfo appInfo) { 83 removeChild(Annotation.APPINFO_PROPERTY, appInfo); 84 } 85 86 public void addAppInfo(AppInfo appInfo) { 87 appendChild(Annotation.APPINFO_PROPERTY, appInfo); 88 } 89 90 public Collection <AppInfo> getAppInfos() { 91 return getChildren(AppInfo.class); 92 } 93 } 94 | Popular Tags |