Examples of DliException


Examples of org.mizartools.dli.DliException

      org.mizartools.system.xml.Field field) throws DliException {
    UniqueIdentifier uniqueIdentifier = null;
    try {
      uniqueIdentifier = UniqueIdentifier.getInstance(abstractSignature, field);
    } catch (UniqueIdentifierException e) {
      throw new DliException();
    }
    ArticleId articleId = new ArticleId(uniqueIdentifier.aid);
    ItemType itemType = null;
    switch (uniqueIdentifier.type){
    case mode : itemType = ItemType.mode; break;
    case struct : itemType = ItemType.struct; break;
    case sel : itemType = ItemType.sel; break;
    default : throw new DliException();
    }
    ItemId itemId = new ItemId(articleId, itemType, uniqueIdentifier.nr);
    return itemId;
  }
View Full Code Here

Examples of org.mizartools.dli.DliException

    LinkedList<Term> termList = new LinkedList<Term>();
    UniqueIdentifier uniqueIdentifier = null;
    try {
      uniqueIdentifier = UniqueIdentifier.getInstance(abstractSignature, constructor.getRedefaid() , constructor.getKind(), constructor.getRedefnr());
    } catch (UniqueIdentifierException e) {
      throw new DliException();
    }
    ArticleId articleId = new ArticleId(uniqueIdentifier.aid);
    ItemType itemType = null;
    switch (uniqueIdentifier.type){
    case mode : itemType = ItemType.mode; break;
    case func : itemType = ItemType.func; break;
    case pred : itemType = ItemType.pred; break;
    case attr : itemType = ItemType.attr; break;
    default : throw new DliException();
    }
    ItemId itemId = new ItemId(articleId, itemType, uniqueIdentifier.nr);
    Type type = new Type(adjectiveList, itemId, termList, false);
    Redefinition redefinition = new Redefinition(type);
    return redefinition;
View Full Code Here

Examples of org.mizartools.dli.DliException

        Term termDli;
          if (term instanceof org.mizartools.system.xml.Func) {
        org.mizartools.system.xml.Func func = (org.mizartools.system.xml.Func) term;
          LinkedList<Term> term2List = getTermList(abstractSignature, ((org.mizartools.system.xml.Func)term).getTermList());
        if (func.getKind() == org.mizartools.system.xml.Func.Kind.F){
          if (func.getNr() == null) throw new DliException();
          termDli = new PrivateFunctor(func.getNr(), term2List);
        } else {
            ItemId itemId = getItemId(abstractSignature, ((org.mizartools.system.xml.Func)term))
              termDli = new Func(itemId, term2List);
        }
          } else if (term instanceof org.mizartools.system.xml.Var) {
            termDli = new Variable(((org.mizartools.system.xml.Var)term).getNr());
          } else if (term instanceof org.mizartools.system.xml.LocusVar) {
            termDli = new LocusVar(((org.mizartools.system.xml.LocusVar)term).getNr());
          } else if (term instanceof org.mizartools.system.xml.Num) {
            termDli = new Num(((org.mizartools.system.xml.Num)term).getNr());
          } else {
          throw new DliException();
          }
          termDliList.add(termDli);
      }
      return termDliList;
  }
View Full Code Here

Examples of org.mizartools.dli.DliException

    throws DliException {
      UniqueIdentifier uniqueIdentifier = null;
      try {
        uniqueIdentifier = UniqueIdentifier.getInstance(abstractSignature, func);
      } catch (UniqueIdentifierException e) {
        throw new DliException();
      }
      ArticleId articleId = new ArticleId(uniqueIdentifier.aid);
      ItemType itemType = null;
      switch (uniqueIdentifier.type){
      case mode : itemType = ItemType.mode; break;
      case func : itemType = ItemType.func; break;
      case struct : itemType = ItemType.struct; break;
      case sel : itemType = ItemType.sel; break;
      case aggr : itemType = ItemType.aggr; break;
      default : throw new DliException();
      }
      ItemId itemId = new ItemId(articleId, itemType, uniqueIdentifier.nr);
      return itemId;
    }
View Full Code Here

Examples of org.mizartools.dli.DliException

  throws DliException {
    UniqueIdentifier uniqueIdentifier = null;
    try {
      uniqueIdentifier = UniqueIdentifier.getInstance(abstractSignature, typ);
    } catch (UniqueIdentifierException e) {
      throw new DliException();
    }
    ArticleId articleId = new ArticleId(uniqueIdentifier.aid);
    ItemType itemType = null;
    switch (uniqueIdentifier.type){
    case mode : itemType = ItemType.mode; break;
    case struct : itemType = ItemType.struct; break;
    default : throw new DliException();
    }
    ItemId itemId = new ItemId(articleId, itemType, uniqueIdentifier.nr);
    return itemId;
  }
View Full Code Here

Examples of org.mizartools.dli.DliException

  throws DliException {
    UniqueIdentifier uniqueIdentifier = null;
    try {
      uniqueIdentifier = UniqueIdentifier.getInstance(abstractSignature, adjective);
    } catch (UniqueIdentifierException e) {
      throw new DliException();
    }
    ArticleId articleId = new ArticleId(uniqueIdentifier.aid);
    ItemType itemType = null;
    switch (uniqueIdentifier.type){
    case mode : itemType = ItemType.mode; break;
    case attr : itemType = ItemType.attr; break;
    default : throw new DliException();
    }
    ItemId itemId = new ItemId(articleId, itemType, uniqueIdentifier.nr);
    return itemId;
  }
View Full Code Here

Examples of org.mizartools.dli.DliException

    if (pattern.getConstrnr() == 0) return null;
    UniqueIdentifier uniqueIdentifier = null;
    try {
      uniqueIdentifier = UniqueIdentifier.getInstance(abstractSignature, null, pattern.getConstrkind(), pattern.getConstrnr());
    } catch (UniqueIdentifierException e) {
      throw new DliException();
    }
    ArticleId articleId = new ArticleId(uniqueIdentifier.aid);
    ItemType itemType = null;
    switch (uniqueIdentifier.type){
    case mode : itemType = ItemType.mode; break;
    case attr : itemType = ItemType.attr; break;
    case pred : itemType = ItemType.pred; break;
    case func : itemType = ItemType.func; break;
    case struct : itemType = ItemType.struct; break;
    case sel : itemType = ItemType.sel; break;
    case aggr : itemType = ItemType.aggr; break;
    case forg : itemType = ItemType.forg; break;
    default : throw new DliException();
    }
    ItemId itemId = new ItemId(articleId, itemType, uniqueIdentifier.nr);
    Constructor constructor = new Constructor(itemId);
    return constructor;
  }
View Full Code Here

Examples of org.mizartools.dli.DliException

        case J :
          if (symbolNr > vocabularyItem.nrG) symbolNr = symbolNr - vocabularyItem.nrG;
          else aid = vocabularyItem.articleId;
          break;
        default :
          throw new DliException();
        }
        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

Examples of org.mizartools.dli.DliException

      LinkedList<Term> termList = new LinkedList<Term>();
      for (org.mizartools.system.xml.Term term1 : func.getTermList()) {
        termList.add(getTerm(abstractSignature, term1, vid));
      }
      if (func.getKind() == org.mizartools.system.xml.Func.Kind.F){
        if (func.getNr() == null) throw new DliException();
        termDli = new PrivateFunctor(func.getNr(), termList);
      } else {
        ItemId itemId = getItemId(abstractSignature, func.getKind(), func.getNr());
        termDli = new Func(itemId, termList);
      }
    } else if (term instanceof org.mizartools.system.xml.Choice) {
      termDli = new The(getType(abstractSignature, ((org.mizartools.system.xml.Choice)term).getTyp()));
    } else if (term instanceof org.mizartools.system.xml.Num) {
      termDli = new Num(((org.mizartools.system.xml.Num)term).getNr());
    } else if (term instanceof org.mizartools.system.xml.Fraenkel) {
      org.mizartools.system.xml.Fraenkel fraenkel = (org.mizartools.system.xml.Fraenkel)term;
      LinkedList<Var> varList = new LinkedList<Var>();
      VariableId vid2 = new VariableId();
      vid2.setId(vid.getId());
      for (org.mizartools.system.xml.Typ typ : fraenkel.getTypList()) {
        vid2.increment();
        Variable variable = new Variable(vid2.getId());
        Type type = getType(abstractSignature, typ);
        varList.add(new Var(variable, type));
      }
      Term term1 = getTerm(abstractSignature, fraenkel.getTerm(), vid2);
      termDli = new Fraenkel(varList, term1, getFormula(abstractSignature, fraenkel.getFormula(), vid2));
    } else throw new DliException();
    return termDli;
  }
View Full Code Here

Examples of org.mizartools.dli.DliException

      org.mizartools.system.xml.Func.Kind kind, Integer nr) throws DliException {
    UniqueIdentifier uniqueIdentifier = null;
    try {
      uniqueIdentifier = UniqueIdentifier.getInstance(abstractSignature, null, kind, nr);
    } catch (UniqueIdentifierException e) {
      throw new DliException();
    }
    ArticleId articleId = new ArticleId(uniqueIdentifier.aid);
    ItemType itemType = null;
    switch (uniqueIdentifier.type){
    case func : itemType = ItemType.func; break;
    case struct : itemType = ItemType.struct; break;
    case sel : itemType = ItemType.sel; break;
    case aggr : itemType = ItemType.aggr; break;
    default : throw new DliException();
    }
    ItemId itemId = new ItemId(articleId, itemType, uniqueIdentifier.nr);
    return itemId;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.