Package org.mizartools.dli

Examples of org.mizartools.dli.ItemDefinition


    }
    return error;
  }

  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);
View Full Code Here


      org.mizartools.system.utility.AbstractSignature abstractSignature,
      org.mizartools.system.xml.Constructor constructor)
  throws DliException {
    ArticleId articleId = new ArticleId(constructor.getAid());
    ItemType itemType = null;
    ItemDefinition itemDefinition = null;
    LinkedList<Locus> locusList = Adapter.getLocusList(abstractSignature, constructor.getArgTypes());
    Properties properties = Adapter.getProperties(constructor.getProperties());
    Type type = null;
    Redefinition redefinition = Adapter.getRedefinition(abstractSignature, constructor);
    switch (constructor.getKind()) {
View Full Code Here

      org.mizartools.system.utility.AbstractSignature abstractSignature,
      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();
      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);
      itemType = ItemType.aggrnot;
      break;
    case L :
      itemDefinition = new StructureNotation(symbolId1, loci, format, visible, constructor, synonym);
      itemType = ItemType.structnot;
      break;
    case U :
      itemDefinition = new SelectorNotation(symbolId1, loci, format, visible, constructor, synonym);
      itemType = ItemType.selnot;
      break;
    case J :
      itemDefinition = new ForgNotation(symbolId1, loci, format, visible, constructor, synonym);
      itemType = ItemType.forgnot;
      break;
    default :
    }
    if (itemDefinition == nullitemDefinition = new ItemDefinition("?");

    int nr = pattern.getNr();
    ItemId itemId = new ItemId(articleId, itemType, nr);

    DecodedLibraryItem decodedLibraryItem = new DecodedLibraryItem(itemId, itemDefinition);
View Full Code Here

      org.mizartools.system.utility.AbstractSignature abstractSignature,
      org.mizartools.system.xml.Definiens definiens,
      int relativeNr)
  throws DliException {
    ArticleId articleId = new ArticleId(definiens.getAid());
    ItemDefinition itemDefinition = null;
    Definiendum definiendum = new Definiendum(Adapter.getItemId(abstractSignature, definiens.getConstrkind(), definiens.getConstrnr()));
    Loci loci = Adapter.getLoci(abstractSignature, definiens.getTypList());
    Visible visible = Adapter.getVisible(definiens.getEssentials());
    Assumptions assumptions = null;
    if (definiens.getFormula() == null) {
View Full Code Here

  private static DecodedLibraryItem getItemC(
      org.mizartools.system.utility.AbstractSignature abstractSignature,
      org.mizartools.system.xml.CCluster cCluster)
    throws DliException {
    ArticleId articleId = new ArticleId(cCluster.getAid());
    ItemDefinition itemDefinition = null;
    Loci loci = Adapter.getLoci(abstractSignature, cCluster.getArgTypes());
    Type type = null;
    if (cCluster.getTyp() != null) type = Adapter.getType(abstractSignature, cCluster.getTyp());
    LinkedList<org.mizartools.system.xml.Cluster> cluster1List = new LinkedList<org.mizartools.system.xml.Cluster>();
    if (cCluster.getCluster1() != null) cluster1List.add(cCluster.getCluster1());
View Full Code Here

    if (fCluster.getTyp() != null) type = Adapter.getType(abstractSignature, fCluster.getTyp());
    LinkedList<org.mizartools.system.xml.Cluster> clusterList = new LinkedList<org.mizartools.system.xml.Cluster>();
    if (fCluster.getCluster1() != null) clusterList.add(fCluster.getCluster1());
    if (fCluster.getCluster2() != null) clusterList.add(fCluster.getCluster2());
    Cluster cluster = new Cluster(Adapter.getAdjectiveList(abstractSignature, clusterList));
    ItemDefinition itemDefinition = new TermAdjectiveRegistration(loci, cluster, term, type);
    fCluster.getArgTypes();
    ItemId itemId = new ItemId(articleId, ItemType.funcreg, fCluster.getNr());
    DecodedLibraryItem decodedLibraryItem = new DecodedLibraryItem(itemId, itemDefinition);
    return decodedLibraryItem;
  }
View Full Code Here

    Type type = Adapter.getType(abstractSignature, rCluster.getTyp());
    LinkedList<org.mizartools.system.xml.Cluster> clusterList = new LinkedList<org.mizartools.system.xml.Cluster>();
    if (rCluster.getCluster1() != null) clusterList.add(rCluster.getCluster1());
    if (rCluster.getCluster2() != null) clusterList.add(rCluster.getCluster2());
    Cluster cluster = new Cluster(Adapter.getAdjectiveList(abstractSignature, clusterList));
    ItemDefinition itemDefinition = new ExistentialRegistration(loci, cluster, type);
    ItemId itemId = new ItemId(articleId, ItemType.exreg, rCluster.getNr());
    DecodedLibraryItem decodedLibraryItem = new DecodedLibraryItem(itemId, itemDefinition);
    return decodedLibraryItem;
  }
View Full Code Here

        argeqList.add(argeq);
      }
    Argeqs argeqs = new Argeqs(argeqList);
    Func func1 = (Func)Adapter.getTerm(abstractSignature, identify.getTerm1(), new VariableId());
    Func func2 = (Func)Adapter.getTerm(abstractSignature, identify.getTerm2(), new VariableId());
    ItemDefinition itemDefinition = new IdentifyRegistration(loci, func1, func2, argeqs);
    ItemId itemId = new ItemId(articleId, ItemType.idreg, identify.getNr());
    DecodedLibraryItem decodedLibraryItem = new DecodedLibraryItem(itemId, itemDefinition);
    return decodedLibraryItem;
  }
View Full Code Here

      TheoremId theoremIdDef) throws DliException {
    String aid = theorem.getAid();
    if (aid == null) aid = abstractSignature.getArticleId();
    ArticleId articleId = new ArticleId(aid);
    Formula formula = Adapter.getFormula(abstractSignature, theorem.getFormula(), new VariableId());
    ItemDefinition itemDefinition = new Theorem(formula);
    ItemType itemType = null;
    int nr = 0;
    switch (theorem.getKind()){
    case D :
      itemType = ItemType.def;
View Full Code Here

    Premisses premisses = new Premisses(formulaList);
    LinkedList<Formula> formula2List = new LinkedList<Formula>();
    formula2List.add(Adapter.getFormula(abstractSignature, scheme.getFormula1(), new VariableId()));
    Thesis thesis = new Thesis(formula2List);
   
    ItemDefinition itemDefinition = new Scheme(itemId.toString(), parameters, premisses, thesis);
    DecodedLibraryItem decodedLibraryItem = new DecodedLibraryItem(itemId, itemDefinition);
    return decodedLibraryItem;
  }
View Full Code Here

TOP

Related Classes of org.mizartools.dli.ItemDefinition

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.