1 31 32 package org.opencms.xml.types; 33 34 import org.opencms.file.CmsObject; 35 import org.opencms.xml.CmsXmlContentDefinition; 36 import org.opencms.xml.I_CmsXmlDocument; 37 38 import java.util.Locale ; 39 40 import org.dom4j.Element; 41 import org.dom4j.Namespace; 42 import org.dom4j.QName; 43 44 68 public interface I_CmsXmlSchemaType extends Comparable { 69 70 71 Namespace XSI_NAMESPACE = Namespace.get("xsi", "http://www.w3.org/2001/XMLSchema-instance"); 72 73 74 QName XSI_NAMESPACE_ATTRIBUTE_NO_SCHEMA_LOCATION = QName.get("noNamespaceSchemaLocation", XSI_NAMESPACE); 75 76 84 void appendXmlSchema(Element root); 85 86 95 I_CmsXmlContentValue createValue(I_CmsXmlDocument document, Element element, Locale locale); 96 97 114 Element generateXml(CmsObject cms, I_CmsXmlDocument document, Element root, Locale locale); 115 116 127 CmsXmlContentDefinition getContentDefinition(); 128 129 138 String getDefault(Locale locale); 139 140 145 int getMaxOccurs(); 146 147 152 int getMinOccurs(); 153 154 164 String getName(); 165 166 171 String getSchemaDefinition(); 172 173 184 String getTypeName(); 185 186 196 boolean isSimpleType(); 197 198 207 I_CmsXmlSchemaType newInstance(String name, String minOccurs, String maxOccurs); 208 209 218 void setContentDefinition(CmsXmlContentDefinition contentDefinition); 219 220 225 void setDefault(String defaultValue); 226 227 241 boolean validateValue(String value); 242 } | Popular Tags |