Package edu.mit.simile.fresnel.selection

Examples of edu.mit.simile.fresnel.selection.PropertyDescription


              }
              tmconn.commit();
              tmconn.setAutoCommit(true);
              tmconn.close();
              if (selector instanceof PropertyDescription) {
                PropertyDescription selectorPD = (PropertyDescription) selector;
                if (current == max) {
                  // if we've hit the limit, stop with sublensing
                  subr.setTitle(resolveLabel(in, objResource));
                } else {                 
                  // pick a sublens to apply to the resource
                  int newdepth = (selectorPD.getDepth() + current < max) ? selectorPD.getDepth() + current : max;
                  Lens sublens = null;
                  Iterator<Lens> sublensesIt = selectorPD.getSublensesIterator();
                  boolean match = false;
                  matched:
                  while (sublensesIt.hasNext()) {
                    sublens = sublensesIt.next();
                    Iterator<ISelector> domainIt = sublens.getDomainSet().iterator();
View Full Code Here


              r.addProperty(pr);
            }
            if (object instanceof Resource) {
              Resource objResource = (Resource) object;
              if (selector instanceof PropertyDescription) {
                PropertyDescription selectorPD = (PropertyDescription) selector;
                if (current == max) {
                  ValueResult vr = new ValueResult(resolveLabel(in, objResource, false).getString(), pr, selected.getContext());
                  pr.addValue(vr);
                  this._propertyResultModelHash.putResult(prop, pr);
                } else {
                  // pick a sublens to apply to the resource
                  int newdepth = (selectorPD.getDepth() + current < max) ? selectorPD.getDepth() : max;
                  Lens sublens = null;
                  Iterator<Lens> sublensesIt = selectorPD.getSublensesIterator();
                  boolean matched = false;
                  matching:
                  while (sublensesIt.hasNext()) {
                    sublens = sublensesIt.next();
                    Iterator<ISelector> domainIt = sublens.getDomainSet().iterator();
View Full Code Here

      Iterator<ISelector> psi = parent.getShowProperties().iterator();
      while (psi.hasNext()) {
        ISelector check = psi.next();
        if (check.canSelect(in, r.getParent().getOrigin(), r.getOrigin())) {
          if (check instanceof PropertyDescription) {
            PropertyDescription pd = (PropertyDescription) check;
            if (pd.isGroupUse()) {
              // pick which format to use...
              Group groupFormats = (Group) pd.getUse();
              Iterator<Format> fi = groupFormats.getFormats().iterator();
              while (fi.hasNext()) {
                Format potential = fi.next();
                for (Iterator<ISelector> di = potential.getDomainSet().iterator(); di.hasNext(); ) {
                  ISelector potentialCheck = di.next();
                  if (potentialCheck.canSelect(getModel(), r.getParent().getOrigin(), r.getOrigin())) {
                    format = potential;
                    break;
                  }
                }
              }
            } else {
              if (null != pd.getUse()) {
                format = (Format) pd.getUse();
                break;
              }
            }
          }
        }
View Full Code Here

TOP

Related Classes of edu.mit.simile.fresnel.selection.PropertyDescription

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.