1 17 package org.eclipse.emf.ecore.util; 18 19 20 import java.util.Collection ; 21 import java.util.List ; 22 23 import org.eclipse.emf.ecore.EAttribute; 24 import org.eclipse.emf.ecore.EClass; 25 import org.eclipse.emf.ecore.EClassifier; 26 import org.eclipse.emf.ecore.EDataType; 27 import org.eclipse.emf.ecore.EPackage; 28 import org.eclipse.emf.ecore.EReference; 29 import org.eclipse.emf.ecore.EStructuralFeature; 30 31 32 79 public interface ExtendedMetaData 80 { 81 84 String ANNOTATION_URI = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; 85 86 89 String XMLNS_URI = "http://www.w3.org/2000/xmlns/"; 90 91 94 String XML_URI = "http://www.w3.org/XML/1998/namespace"; 95 96 99 String XSI_URI = "http://www.w3.org/2001/XMLSchema-instance"; 100 101 104 String XML_SCHEMA_URI = "http://www.w3.org/2001/XMLSchema"; 105 106 109 String XMI_URI = "http://www.omg.org/XMI"; 110 111 114 String XMLNS_PREFIX = "xmlns"; 115 116 119 String XSI_PREFIX = "xsi"; 120 121 124 EPackage getPackage(String namespace); 125 126 129 void putPackage(String namespace, EPackage ePackage); 130 131 136 EClass getDocumentRoot(EPackage ePackage); 137 138 143 void setDocumentRoot(EClass eClass); 144 145 149 EReference getXMLNSPrefixMapFeature(EClass eClass); 150 151 155 EReference getXSISchemaLocationMapFeature(EClass eClass); 156 157 161 boolean isQualified(EPackage ePackage); 162 163 167 void setQualified(EPackage ePackage, boolean isQualified); 168 169 174 String getNamespace(EPackage ePackage); 175 176 180 String getNamespace(EClassifier eClassifier); 181 182 187 String getNamespace(EStructuralFeature eStructuralFeature); 188 189 194 void setNamespace(EStructuralFeature eStructuralFeature, String namespace); 195 196 201 String getName(EClassifier eClassifier); 202 203 208 void setName(EClassifier eClassifier, String name); 209 210 214 boolean isAnonymous(EClassifier eClassifier); 215 216 222 String getName(EStructuralFeature eStructuralFeature); 223 224 230 void setName(EStructuralFeature eStructuralFeature, String name); 231 232 235 EClassifier getType(String namespace, String name); 236 237 241 EStructuralFeature getAttribute(String namespace, String name); 242 243 247 EStructuralFeature getElement(String namespace, String name); 248 249 252 EClassifier getType(EPackage ePackage, String name); 253 254 259 EStructuralFeature getAttribute(EClass eClass, String namespace, String name); 260 261 266 EStructuralFeature getElement(EClass eClass, String namespace, String name); 267 268 271 EStructuralFeature getSimpleFeature(EClass eClass); 272 273 276 EAttribute getMixedFeature(EClass eClass); 277 278 283 int UNSPECIFIED_FEATURE = 0; 284 285 290 int SIMPLE_FEATURE = 1; 291 292 297 int ATTRIBUTE_FEATURE = 2; 298 299 304 int ATTRIBUTE_WILDCARD_FEATURE = 3; 305 306 311 int ELEMENT_FEATURE = 4; 312 313 318 int ELEMENT_WILDCARD_FEATURE = 5; 319 320 325 int GROUP_FEATURE = 6; 326 327 332 String [] FEATURE_KINDS = { "unspecified", "simple", "attribute", "attributeWildcard", "element", "elementWildcard", "group" }; 333 334 345 int getFeatureKind(EStructuralFeature eStructuralFeature); 346 347 358 void setFeatureKind(EStructuralFeature eStructuralFeature, int kind); 359 360 365 int UNSPECIFIED_CONTENT = 0; 366 367 372 int EMPTY_CONTENT = 1; 373 374 379 int SIMPLE_CONTENT = 2; 380 381 386 int MIXED_CONTENT = 3; 387 388 393 int ELEMENT_ONLY_CONTENT = 4; 394 395 400 String [] CONTENT_KINDS = { "unspecified", "empty", "simple", "mixed", "elementOnly" }; 401 402 411 int getContentKind(EClass eClass); 412 413 422 void setContentKind(EClass eClass, int kind); 423 424 428 int UNSPECIFIED_DERIVATION = 0; 429 430 434 int RESTRICTION_DERIVATION = 1; 435 436 440 int LIST_DERIVATION = 2; 441 442 446 int UNION_DERIVATION = 3; 447 448 452 String [] DERIVATION_KINDS = { "unspecified", "restriction", "list", "union" }; 453 454 461 int getDerivationKind(EDataType eDataType); 462 463 468 EDataType getBaseType(EDataType eDataType); 469 470 475 void setBaseType(EDataType eDataType, EDataType baseType); 476 477 481 EDataType getItemType(EDataType eDataType); 482 483 487 void setItemType(EDataType eDataType, EDataType itemType); 488 489 493 List getMemberTypes(EDataType eDataType); 494 495 499 void setMemberTypes(EDataType eDataType, List memberTypes); 500 501 505 List getAllAttributes(EClass eClass); 506 507 511 List getAllElements(EClass eClass); 512 513 516 List getAttributes(EClass eClass); 517 518 521 List getElements(EClass eClass); 522 523 526 boolean matches(List wildcards, String namespace); 527 528 531 boolean matches(String wildcard, String namespace); 532 533 537 List getWildcards(EStructuralFeature eStructuralFeature); 538 539 543 void setWildcards(EStructuralFeature eStructuralFeature, List wildcards); 544 545 550 int UNSPECIFIED_PROCESSING = 0; 551 552 557 int STRICT_PROCESSING = 1; 558 559 564 int LAX_PROCESSING = 2; 565 566 571 int SKIP_PROCESSING = 3; 572 573 578 String [] PROCESSING_KINDS = { "unspecified", "strict", "lax", "skip" }; 579 580 588 int getProcessingKind(EStructuralFeature eStructuralFeature); 589 590 598 void setProcessingKind(EStructuralFeature eStructuralFeature, int processingKind); 599 600 605 EStructuralFeature getAffiliation(EStructuralFeature eStructuralFeature); 606 607 612 void setAffiliation(EStructuralFeature eStructuralFeature, EStructuralFeature affiliation); 613 614 619 EStructuralFeature getGroup(EStructuralFeature eStructuralFeature); 620 621 626 void setGroup(EStructuralFeature eStructuralFeature, EStructuralFeature group); 627 628 637 EStructuralFeature getAffiliation(EClass eClass, EStructuralFeature eStructuralFeature); 638 639 642 EStructuralFeature getAttributeWildcardAffiliation(EClass eClass, String namespace, String name); 643 644 647 EStructuralFeature getElementWildcardAffiliation(EClass eClass, String namespace, String name); 648 649 654 int UNSPECIFIED_WHITE_SPACE = 0; 655 656 661 int PRESERVE_WHITE_SPACE = 1; 662 663 668 int REPLACE_WHITE_SPACE = 2; 669 670 675 int COLLAPSE_WHITE_SPACE = 3; 676 677 682 String [] WHITE_SPACE_KINDS = { "unspecified", "preserve", "replace", "collapse" }; 683 684 692 int getWhiteSpaceFacet(EDataType eDataType); 693 694 702 void setWhiteSpaceFacet(EDataType eDataType, int whiteSpace); 703 704 708 List getEnumerationFacet(EDataType eDataType); 709 710 714 void setEnumerationFacet(EDataType eDataType, List literals); 715 716 720 List getPatternFacet(EDataType eDataType); 721 722 726 void setPatternFacet(EDataType eDataType, List pattern); 727 728 732 int getTotalDigitsFacet(EDataType eDataType); 733 734 738 void setTotalDigitsFacet(EDataType eDataType, int digits); 739 740 744 int getFractionDigitsFacet(EDataType eDataType); 745 746 750 void setFractionDigitsFacet(EDataType eDataType, int digits); 751 752 756 int getLengthFacet(EDataType eDataType); 757 758 762 void setLengthFacet(EDataType eDataType, int length); 763 764 768 int getMinLengthFacet(EDataType eDataType); 769 770 774 void setMinLengthFacet(EDataType eDataType, int length); 775 776 780 int getMaxLengthFacet(EDataType eDataType); 781 782 786 void setMaxLengthFacet(EDataType eDataType, int length); 787 788 792 String getMinExclusiveFacet(EDataType eDataType); 793 794 798 void setMinExclusiveFacet(EDataType eDataType, String literal); 799 800 804 String getMaxExclusiveFacet(EDataType eDataType); 805 806 810 void setMaxExclusiveFacet(EDataType eDataType, String literal); 811 812 816 String getMinInclusiveFacet(EDataType eDataType); 817 818 822 void setMinInclusiveFacet(EDataType eDataType, String literal); 823 824 828 String getMaxInclusiveFacet(EDataType eDataType); 829 830 834 void setMaxInclusiveFacet(EDataType eDataType, String literal); 835 836 839 EPackage demandPackage(String namespace); 840 841 845 EClassifier demandType(String namespace, String name); 846 847 852 EStructuralFeature demandFeature(String namespace, String name, boolean isElement); 853 854 858 EStructuralFeature demandFeature(String namespace, String name, boolean isElement, boolean isReference); 859 860 863 Collection demandedPackages(); 864 865 869 ExtendedMetaData INSTANCE = new BasicExtendedMetaData(); 870 } 871 | Popular Tags |