SymbolId symbolId1 = Adapter.getSymbolId1(pattern);
Loci loci = Adapter.getLoci(abstractSignature, pattern.getArgTypes());
Format format = Adapter.getFormat(pattern.getFormat());
Visible visible = Adapter.getVisible(pattern.getVisible());
Constructor constructor = Adapter.getConstructor(abstractSignature, pattern);
Synonym synonym = null;
Antonym antonym = null;
org.mizartools.system.xml.Pattern.Kind kind = pattern.getKind();
switch (kind) {
case M :
if (pattern.getRedefnr() != null) synonym = new Synonym();
Abbreviation abbreviation = Adapter.getAbbreviation(abstractSignature, pattern.getExpansion());
itemDefinition = new ModeNotation(symbolId1, loci, format, visible, constructor, abbreviation, synonym);
itemType = ItemType.modenot;
break;
case R :
if (pattern.getAntonymic() != null) antonym = new Antonym();
if (pattern.getRedefnr() != null) synonym = new Synonym();
if (antonym != null && synonym != null) synonym = null;
itemDefinition = new PredicateNotation(symbolId1, loci, format, visible, constructor, antonym, synonym);
itemType = ItemType.prednot;
break;
case K :
if (pattern.getRedefnr() != null) synonym = new Synonym();
SymbolId symbolId2 = Adapter.getSymbolId2(pattern);
itemDefinition = new FunctorNotation(symbolId1, symbolId2, loci, format, visible, constructor, synonym);
itemType = ItemType.funcnot;
break;
case V :
if (pattern.getAntonymic() != null) antonym = new Antonym();
if (antonym == null && pattern.getRedefnr() != null) synonym = new Synonym();
itemDefinition = new AttributeNotation(symbolId1, loci, format, visible, constructor, antonym, synonym);
itemType = ItemType.attrnot;
break;
case G :
itemDefinition = new AggregateNotation(symbolId1, loci, format, visible, constructor, synonym);