1 19 20 package org.netbeans.modules.xml.schema.model.impl; 21 22 import org.netbeans.modules.xml.schema.model.Field; 23 import org.netbeans.modules.xml.schema.model.SchemaComponent; 24 import org.netbeans.modules.xml.schema.model.visitor.SchemaVisitor; 25 import org.w3c.dom.Element ; 26 27 31 public class FieldImpl extends SchemaComponentImpl implements Field { 32 33 public FieldImpl(SchemaModelImpl model) { 34 this(model,createNewComponent(SchemaElements.FIELD,model)); 35 } 36 37 40 public FieldImpl(SchemaModelImpl model, Element el) { 41 super(model, el); 42 } 43 44 48 public Class <? extends SchemaComponent> getComponentType() { 49 return Field.class; 50 } 51 52 55 public void accept(SchemaVisitor visitor) { 56 visitor.visit(this); 57 } 58 59 62 public void setXPath(String xpath) { 63 setAttribute(XPATH_PROPERTY, SchemaAttributes.XPATH, xpath); 64 } 65 66 69 public String getXPath() { 70 return getAttribute(SchemaAttributes.XPATH); 71 } 72 } 73 | Popular Tags |