1 17 package org.eclipse.emf.ecore.xmi; 18 19 import java.util.List ; 20 import java.util.Map ; 21 22 import org.eclipse.emf.common.util.EMap; 23 import org.eclipse.emf.common.util.URI; 24 import org.eclipse.emf.ecore.EClass; 25 import org.eclipse.emf.ecore.EDataType; 26 import org.eclipse.emf.ecore.EFactory; 27 import org.eclipse.emf.ecore.ENamedElement; 28 import org.eclipse.emf.ecore.EObject; 29 import org.eclipse.emf.ecore.EPackage; 30 import org.eclipse.emf.ecore.EStructuralFeature; 31 import org.eclipse.emf.ecore.util.ExtendedMetaData; 32 33 40 public interface XMLHelper 41 { 42 45 public void setOptions(Map options); 46 47 51 public void setNoNamespacePackage(EPackage pkg); 52 53 57 public EPackage getNoNamespacePackage(); 58 59 63 public void setAnySimpleType(EClass type); 64 65 68 public void setXMLMap(XMLResource.XMLMap map); 69 70 73 public XMLResource.XMLMap getXMLMap(); 74 75 78 public void setExtendedMetaData(ExtendedMetaData extendedMetaData); 79 80 83 public ExtendedMetaData getExtendedMetaData(); 84 85 88 XMLResource getResource(); 89 90 93 Object getValue(EObject eObject, EStructuralFeature eStructuralFeature); 94 95 98 String getName(ENamedElement eNamedElement); 99 100 110 String getQName(EClass eClass); 111 112 120 void populateNameInfo(NameInfo nameInfo, EClass eClass); 121 122 132 String getQName(EDataType eDataType); 133 134 142 void populateNameInfo(NameInfo nameInfo, EDataType eDataType); 143 144 149 String getQName(EStructuralFeature feature); 150 151 159 void populateNameInfo(NameInfo nameInfo, EStructuralFeature feature); 160 161 164 String getPrefix(EPackage ePackage); 165 166 169 String getNamespaceURI(String prefix); 170 171 174 List getPrefixes(EPackage ePackage); 175 176 179 String getID(EObject eObject); 180 181 184 String getIDREF(EObject eObject); 185 186 189 String getHREF(EObject eObject); 190 191 194 URI deresolve(URI uri); 195 196 199 EPackage[] packages(); 200 201 204 EObject createObject(EFactory eFactory, String name); 205 206 209 void setValue(EObject eObject, EStructuralFeature eStructuralFeature, Object value, int position); 210 211 214 EStructuralFeature getFeature(EClass eClass, String namespaceURI, String name); 215 216 219 EStructuralFeature getFeature(EClass eClass, String namespaceURI, String name, boolean isElement); 220 221 225 int DATATYPE_SINGLE = 1; 226 int DATATYPE_IS_MANY = 2; 227 int IS_MANY_ADD = 3; 228 int IS_MANY_MOVE = 4; 229 int OTHER = 5; 230 231 234 int getFeatureKind(EStructuralFeature feature); 235 236 240 String getXMLEncoding(String javaEncoding); 241 242 246 String getJavaEncoding(String xmlEncoding); 247 248 interface ManyReference 249 { 250 EObject getObject(); 251 EStructuralFeature getFeature(); 252 Object [] getValues(); 253 int[] getPositions(); 254 int getLineNumber(); 255 int getColumnNumber(); 256 } 257 258 List setManyReference(ManyReference reference, String location); 259 260 void setCheckForDuplicates(boolean checkForDuplicates); 261 262 void setProcessDanglingHREF(String value); 263 264 DanglingHREFException getDanglingHREFException(); 265 266 URI resolve(URI relative, URI base); 267 268 271 void addPrefix(String prefix, String uri); 272 273 276 Map getAnyContentPrefixToURIMapping(); 277 278 282 void recordPrefixToURIMapping(); 283 284 287 String getURI(String prefix); 288 289 297 public void pushContext(); 298 299 306 public void popContext(); 307 308 311 public String convertToString(EFactory factory, EDataType dataType, Object data); 312 313 EMap getPrefixToNamespaceMap(); 314 void setPrefixToNamespaceMap(EMap prefixToNamespaceMap); 315 316 320 void setMustHavePrefix(boolean mustHavePrefix); 321 322 } 323 | Popular Tags |