1 19 20 package org.netbeans.modules.xml.schema.model.impl; 21 22 import java.io.IOException ; 23 import org.netbeans.modules.xml.schema.model.AppInfo; 24 import org.netbeans.modules.xml.schema.model.SchemaComponent; 25 import org.netbeans.modules.xml.schema.model.visitor.SchemaVisitor; 26 import org.w3c.dom.Element ; 27 28 32 public class AppInfoImpl extends SchemaComponentImpl implements AppInfo { 33 34 public AppInfoImpl(SchemaModelImpl model) { 35 this(model, createNewComponent(SchemaElements.APPINFO, model)); 36 } 37 38 public AppInfoImpl(SchemaModelImpl model, Element el) { 39 super(model, el); 40 } 41 42 public void setURI(String uri) { 43 setAttribute(SOURCE_PROPERTY, SchemaAttributes.SOURCE, uri); 44 } 45 46 public void accept(SchemaVisitor v) { 47 v.visit(this); 48 } 49 50 public String getURI() { 51 return getAttribute(SchemaAttributes.SOURCE); 52 } 53 54 public Element getAppInfoElement() { 55 return Element .class.cast(getPeer().cloneNode(true)); 56 } 57 58 public void setAppInfoElement(Element content) { 59 super.updatePeer(CONTENT_PROPERTY, content); 60 } 61 62 public Class <? extends SchemaComponent> getComponentType() { 63 return AppInfo.class; 64 } 65 66 public void setContentFragment(String text) throws IOException { 67 super.setXmlFragment(CONTENT_PROPERTY, text); 68 } 69 70 public String getContentFragment() { 71 return super.getXmlFragment(); 72 } 73 } 74 | Popular Tags |