1 9 10 package org.netbeans.modules.xml.retriever.catalog.model.impl; 11 12 import java.net.URI ; 13 import java.net.URISyntaxException ; 14 import org.netbeans.modules.xml.retriever.catalog.model.CatalogAttributes; 15 import org.netbeans.modules.xml.retriever.catalog.model.CatalogModel; 16 import org.netbeans.modules.xml.retriever.catalog.model.CatalogQNames; 17 import org.netbeans.modules.xml.retriever.catalog.model.CatalogVisitor; 18 import org.netbeans.modules.xml.retriever.catalog.model.System; 19 import org.w3c.dom.Element ; 20 21 25 public class SystemImpl extends CatalogComponentImpl implements 26 org.netbeans.modules.xml.retriever.catalog.model.System{ 27 28 public SystemImpl(CatalogModelImpl model, Element e) { 29 super(model, e); 30 } 31 32 public SystemImpl(CatalogModelImpl model) { 33 this(model, createElementNS(model, CatalogQNames.SYSTEM)); 34 } 35 36 public void accept(CatalogVisitor visitor) { 37 visitor.visit(this); 38 } 39 40 public String getSystemIDAttr() { 41 return getAttribute(CatalogAttributes.systemId); 42 } 43 44 public String getURIAttr() { 45 return getAttribute(CatalogAttributes.uri); 46 } 47 48 public String getXprojectCatalogFileLocationAttr() { 49 return getAttribute(CatalogAttributes.xprojectCatalogFileLocation); 50 } 51 52 public String getReferencingFileAttr() { 53 return getAttribute(CatalogAttributes.referencingFile); 54 } 55 56 public void setSystemIDAttr(URI uri) { 57 super.setAttribute(SYSTEMID_ATTR_PROP, CatalogAttributes.systemId, 58 uri.toString()); 59 } 60 61 public void setURIAttr(URI uri) { 62 super.setAttribute(URI_ATTR_PROP, CatalogAttributes.uri, 63 uri.toString()); 64 } 65 66 public void setXprojectCatalogFileLocationAttr(URI uri) { 67 super.setAttribute(XPROJECTREF_ATTR_PROP, 68 CatalogAttributes.xprojectCatalogFileLocation, uri.toString()); 69 } 70 71 public void setReferencingFileAttr(URI uri) { 72 super.setAttribute(REFFILE_ATTR_PROP, CatalogAttributes.referencingFile, 73 uri.toString()); 74 } 75 76 } 77 | Popular Tags |