Examples of DecodedLibraryItem


Examples of org.mizartools.dli.DecodedLibraryItem

    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

Examples of org.mizartools.dli.DecodedLibraryItem

    case modenot:
    case prednot:
      if (!articleXml.hasNotations()) throw new DliException();
      NotationsSignature notationsSignature = articleXml.getNotationsSignature();
      for (org.mizartools.system.xml.Pattern pattern : articleXml.getNotations().getPatternList()){
        DecodedLibraryItem decodedLibraryItem = getItem(notationsSignature, pattern);
        UniqueIdentifier uniqueIdentifier1;
        try {
          uniqueIdentifier1 = UniqueIdentifier.getInstance(decodedLibraryItem.getItemId().toString());
        } catch (UniqueIdentifierException e) {
          e.printStackTrace();
          throw new DliException();
        }
        if (hashMapItem.containsKey(uniqueIdentifier1)) {
          throw new DliException();
        } else {
          hashMapItem.put(uniqueIdentifier1, decodedLibraryItem);
        }
      }
      break;
    case sch:
      if (!articleXml.hasSchemes()) throw new DliException();
      SchemesSignature schemesSignature = articleXml.getSchemesSignature();
      SchemeId schemeId = new SchemeId();
      for (org.mizartools.system.xml.Scheme scheme : articleXml.getSchemes().getSchemeList()){
        DecodedLibraryItem decodedLibraryItem = getItem(schemesSignature, scheme, schemeId);
        UniqueIdentifier uniqueIdentifier1;
        try {
          uniqueIdentifier1 = UniqueIdentifier.getInstance(decodedLibraryItem.getItemId().toString());
        } catch (UniqueIdentifierException e) {
          e.printStackTrace();
          throw new DliException();
        }
        if (hashMapItem.containsKey(uniqueIdentifier1)) {
          throw new DliException();
        } else {
          hashMapItem.put(uniqueIdentifier1, decodedLibraryItem);
        }
      }
      break;
    case dfs:
      if (!articleXml.hasDefinientia()) throw new DliException();
      DefinientiaSignature definientiaSignature = articleXml.getDefinientiaSignature();
      int relativeNr = 0;
      int nrDefiniens = 0;
      for (org.mizartools.system.xml.Definiens definiens : articleXml.getDefinientia().getDefiniensList()){
        nrDefiniens++;
        relativeNr = definiens.getDefnr() - nrDefiniens;
        DecodedLibraryItem decodedLibraryItem = ItemFactory.getItem(definientiaSignature, definiens, relativeNr);
        UniqueIdentifier uniqueIdentifier1;
        try {
          uniqueIdentifier1 = UniqueIdentifier.getInstance(decodedLibraryItem.getItemId().toString());
        } catch (UniqueIdentifierException e) {
          e.printStackTrace();
          throw new DliException();
        }
        if (hashMapItem.containsKey(uniqueIdentifier1)) {
          throw new DliException();
        } else {
          hashMapItem.put(uniqueIdentifier1, decodedLibraryItem);
        }
      }
      break;
    case def:
    case th:
      if (!articleXml.hasTheorems()) throw new DliException();
      TheoremsSignature theoremsSignature = articleXml.getTheoremsSignature();
      TheoremId theoremId = new TheoremId();
      TheoremId theoremIdDef = new TheoremId();
      for (org.mizartools.system.xml.Theorem theorem : articleXml.getTheorems().getTheoremList()){
        DecodedLibraryItem decodedLibraryItem = ItemFactory.getItem(theoremsSignature, theorem, theoremId, theoremIdDef);
        UniqueIdentifier uniqueIdentifier1;
        try {
          uniqueIdentifier1 = UniqueIdentifier.getInstance(decodedLibraryItem.getItemId().toString());
        } catch (UniqueIdentifierException e) {
          e.printStackTrace();
          throw new DliException();
        }
        if (hashMapItem.containsKey(uniqueIdentifier1)) {
          throw new DliException();
        } else {
          hashMapItem.put(uniqueIdentifier1, decodedLibraryItem);
        }
      }
      break;
    case exreg:
    case funcreg:
      if (!articleXml.hasRegistrations()) throw new DliException();
      RegistrationsSignature registrationsSignature = articleXml.getRegistrationsSignature();
      for (IClusterRegistration iClusterRegistration : articleXml.getRegistrations().getIClusterRegistrationList()){
        DecodedLibraryItem decodedLibraryItem = ItemFactory.getItem(registrationsSignature, iClusterRegistration);
        UniqueIdentifier uniqueIdentifier1;
        try {
          uniqueIdentifier1 = UniqueIdentifier.getInstance(decodedLibraryItem.getItemId().toString());
        } catch (UniqueIdentifierException e) {
          e.printStackTrace();
          throw new DliException();
        }
        if (hashMapItem.containsKey(uniqueIdentifier1)) {
View Full Code Here

Examples of org.mizartools.dli.DecodedLibraryItem

      }
    Term term1 = Adapter.getTerm(abstractSignature, reduction.getTerm1(), new VariableId());
    Term term2 = Adapter.getTerm(abstractSignature, reduction.getTerm2(), new VariableId());
    ItemDefinition itemDefinition = new ReductionRegistration(loci, typeList, term1, term2);
    ItemId itemId = new ItemId(articleId, ItemType.redreg, reduction.getNr());
    DecodedLibraryItem decodedLibraryItem = new DecodedLibraryItem(itemId, itemDefinition);
    return decodedLibraryItem;
  }
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.