Package org.mizartools.dli

Examples of org.mizartools.dli.SymbolId


        if (aid != null) break;
      }
    }
    if (aid == null) aid = pattern.getAid();
    Symbols symbols = VocabularyFile.getSymbols(aid);
    SymbolId symbolId = null;
    SymbolType symbolType = null;
    ArticleId articleId = new ArticleId(aid);
    String token = null;
    org.mizartools.system.xml.Format.Kind kind = pattern.getFormat().getKind();
    switch (kind){
    case O :
      symbolType = SymbolType.vocO;
      token = symbols.getSymbolO(symbolNr);
      break;
    case R :
      symbolType = SymbolType.vocR;
      token = symbols.getSymbolR(symbolNr);
      break;
    case V :
      symbolType = SymbolType.vocV;
      token = symbols.getSymbolV(symbolNr);
      break;
    case M :
      symbolType = SymbolType.vocM;
      token = symbols.getSymbolM(symbolNr);
      break;
    case K :
      symbolType = SymbolType.vocK;
      token = symbols.getSymbolK(symbolNr);
      break;
    case L :
      symbolType = SymbolType.vocG;
      token = symbols.getSymbolG(symbolNr);
      break;
    case G :
      symbolType = SymbolType.vocG;
      token = symbols.getSymbolG(symbolNr);
      break;
    case U :
      symbolType = SymbolType.vocU;
      token = symbols.getSymbolU(symbolNr);
      break;
    case J :
      symbolType = SymbolType.vocG;
      token = symbols.getSymbolG(symbolNr);
      break;
    default :
      throw new DliException();
    }
    symbolId = new SymbolId(articleId, symbolType, token, symbolNr);
    return symbolId;
  }
View Full Code Here


        if (aid != null) break;
      }
    }
    if (aid == null) aid = pattern.getAid();
    Symbols symbols = VocabularyFile.getSymbols(aid);
    SymbolId symbolId = null;
    SymbolType symbolType = null;
    ArticleId articleId = new ArticleId(aid);
    String token = null;
    symbolType = SymbolType.vocL;
    token = symbols.getSymbolL(symbolNr);
    symbolId = new SymbolId(articleId, symbolType, token, symbolNr);
    return symbolId;
  }
View Full Code Here

  private DecodedLibraryItem changeSymbolWithUnknown(DecodedLibraryItem decodedLibraryItem) throws DliException {
    ItemDefinition itemDefinition = decodedLibraryItem.getItemDefinition();
    ArticleId articleId = new ArticleId("UNKNOWN");
    if (itemDefinition instanceof org.mizartools.dli.AttributeNotation) {
      AttributeNotation attributeNotation = (AttributeNotation)itemDefinition;
      SymbolId symbolId = attributeNotation.getSymbolId();
      SymbolId symbolIdNew = new SymbolId(articleId, symbolId.getSymbolType(), symbolId.getToken(), 1);
      itemDefinition = new AttributeNotation(symbolIdNew, attributeNotation.getLoci(), attributeNotation.getFormat(), attributeNotation.getVisible(), attributeNotation.getConstructor(), attributeNotation.getAntonym(), attributeNotation.getSynonym());
    } else if (itemDefinition instanceof org.mizartools.dli.AggregateNotation) {
      AggregateNotation aggregateNotation = (AggregateNotation)itemDefinition;
      SymbolId symbolId = aggregateNotation.getSymbolId();
      SymbolId symbolIdNew = new SymbolId(articleId, symbolId.getSymbolType(), symbolId.getToken(), 1);
      itemDefinition = new AggregateNotation(symbolIdNew, aggregateNotation.getLoci(), aggregateNotation.getFormat(), aggregateNotation.getVisible(), aggregateNotation.getConstructor(), aggregateNotation.getSynonym());
    } else if (itemDefinition instanceof org.mizartools.dli.PredicateNotation) {
      PredicateNotation predicateNotation = (PredicateNotation)itemDefinition;
      SymbolId symbolId = predicateNotation.getSymbolId();
      SymbolId symbolIdNew = new SymbolId(articleId, symbolId.getSymbolType(), symbolId.getToken(), 1);
      itemDefinition = new PredicateNotation(symbolIdNew, predicateNotation.getLoci(), predicateNotation.getFormat(), predicateNotation.getVisible(), predicateNotation.getConstructor(), predicateNotation.getAntonym(), predicateNotation.getSynonym());
    } else if (itemDefinition instanceof org.mizartools.dli.ModeNotation) {
      ModeNotation modeNotation = (ModeNotation)itemDefinition;
      SymbolId symbolId = modeNotation.getSymbolId();
      SymbolId symbolIdNew = new SymbolId(articleId, symbolId.getSymbolType(), symbolId.getToken(), 1);
      itemDefinition = new ModeNotation(symbolIdNew, modeNotation.getLoci(), modeNotation.getFormat(), modeNotation.getVisible(), modeNotation.getConstructor(), modeNotation.getAbbreviation(), modeNotation.getSynonym());
    } else if (itemDefinition instanceof org.mizartools.dli.ForgNotation) {
      ForgNotation forgNotation = (ForgNotation)itemDefinition;
      SymbolId symbolId = forgNotation.getSymbolId();
      SymbolId symbolIdNew = new SymbolId(articleId, symbolId.getSymbolType(), symbolId.getToken(), 1);
      itemDefinition = new ForgNotation(symbolIdNew, forgNotation.getLoci(), forgNotation.getFormat(), forgNotation.getVisible(), forgNotation.getConstructor(), forgNotation.getSynonym());
    } else if (itemDefinition instanceof org.mizartools.dli.SelectorNotation) {
      SelectorNotation selectorNotation = (SelectorNotation)itemDefinition;
      SymbolId symbolId = selectorNotation.getSymbolId();
      SymbolId symbolIdNew = new SymbolId(articleId, symbolId.getSymbolType(), symbolId.getToken(), 1);
      itemDefinition = new SelectorNotation(symbolIdNew, selectorNotation.getLoci(), selectorNotation.getFormat(), selectorNotation.getVisible(), selectorNotation.getConstructor(), selectorNotation.getSynonym());
    } else if (itemDefinition instanceof org.mizartools.dli.StructureNotation) {
      StructureNotation structureNotation = (StructureNotation)itemDefinition;
      SymbolId symbolId = structureNotation.getSymbolId();
      SymbolId symbolIdNew = new SymbolId(articleId, symbolId.getSymbolType(), symbolId.getToken(), 1);
      itemDefinition = new StructureNotation(symbolIdNew, structureNotation.getLoci(), structureNotation.getFormat(), structureNotation.getVisible(), structureNotation.getConstructor(), structureNotation.getSynonym());
    } else if (itemDefinition instanceof org.mizartools.dli.FunctorNotation) {
      FunctorNotation functorNotation = (FunctorNotation)itemDefinition;
      SymbolId symbolId1 = functorNotation.getSymbolId1();
      SymbolId symbolIdNew1 = new SymbolId(articleId, symbolId1.getSymbolType(), symbolId1.getToken(), 1);
      SymbolId symbolId2 = functorNotation.getSymbolId2();
      SymbolId symbolIdNew2 = null;
      if (symbolId2 != null) {
        symbolIdNew2 = new SymbolId(articleId, symbolId2.getSymbolType(), symbolId2.getToken(), 1);
      }
      itemDefinition = new FunctorNotation(symbolIdNew1, symbolIdNew2, functorNotation.getLoci(), functorNotation.getFormat(), functorNotation.getVisible(), functorNotation.getConstructor(), functorNotation.getSynonym());
    }
    return new DecodedLibraryItem(decodedLibraryItem.getItemId(), itemDefinition);
  }
View Full Code Here

      org.mizartools.system.xml.Pattern pattern)
    throws DliException {
    ArticleId articleId = new ArticleId(pattern.getAid());
    ItemType itemType = null;
    ItemDefinition itemDefinition = null;
    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() != nullantonym = 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() != nullantonym = new Antonym();
View Full Code Here

        if (aid != null) break;
      }
    }
    if (aid == null) aid = pattern.getAid();
    Symbols symbols = VocabularyFile.getSymbols(aid);
    SymbolId symbolId = null;
    SymbolType symbolType = null;
    ArticleId articleId = new ArticleId(aid);
    String token = null;
    org.mizartools.system.xml.Format.Kind kind = pattern.getFormat().getKind();
    switch (kind){
    case O :
      symbolType = SymbolType.vocO;
      token = symbols.getSymbolO(symbolNr);
      break;
    case R :
      symbolType = SymbolType.vocR;
      token = symbols.getSymbolR(symbolNr);
      break;
    case V :
      symbolType = SymbolType.vocV;
      token = symbols.getSymbolV(symbolNr);
      break;
    case M :
      symbolType = SymbolType.vocM;
      token = symbols.getSymbolM(symbolNr);
      break;
    case K :
      symbolType = SymbolType.vocK;
      token = symbols.getSymbolK(symbolNr);
      break;
    case L :
      symbolType = SymbolType.vocG;
      token = symbols.getSymbolG(symbolNr);
      break;
    case G :
      symbolType = SymbolType.vocG;
      token = symbols.getSymbolG(symbolNr);
      break;
    case U :
      symbolType = SymbolType.vocU;
      token = symbols.getSymbolU(symbolNr);
      break;
    case J :
      symbolType = SymbolType.vocG;
      token = symbols.getSymbolG(symbolNr);
      break;
    default :
      throw new DliException();
    }
    symbolId = new SymbolId(articleId, symbolType, token, symbolNr);
    return symbolId;
  }
View Full Code Here

        if (aid != null) break;
      }
    }
    if (aid == null) aid = pattern.getAid();
    Symbols symbols = VocabularyFile.getSymbols(aid);
    SymbolId symbolId = null;
    SymbolType symbolType = null;
    ArticleId articleId = new ArticleId(aid);
    String token = null;
    symbolType = SymbolType.vocL;
    token = symbols.getSymbolL(symbolNr);
    symbolId = new SymbolId(articleId, symbolType, token, symbolNr);
    return symbolId;
  }
View Full Code Here

TOP

Related Classes of org.mizartools.dli.SymbolId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.