Package edu.mit.simile.fresnel.selection

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


    if (lens) {
      if (null != lenses) {
        // find label lens for resource
        Iterator<Lens> instancesIt = lenses.getInstanceLenses().iterator();
        while (instancesIt.hasNext()) {
          Lens check = instancesIt.next();
          if (check.hasPurpose(new Purpose(FresnelCore.labelLens))) { 
            AggregateLabel labels = new AggregateLabel(applyLabelLens(check, in, focus, 0, MAXIMUM_LENS_DEPTH));
            if (labels.getString().trim().equals(""))
              continue;
            else
              return new Title(labels);
          }
        }
       
        // find label lens for resource's type
        Iterator<Lens> classesIt = lenses.getClassLenses().iterator();
        while (classesIt.hasNext()) {
          Lens check = classesIt.next();
          if (check.hasPurpose(new Purpose(FresnelCore.labelLens))) {
            AggregateLabel labels = new AggregateLabel(applyLabelLens(check, in, focus, 0, MAXIMUM_LENS_DEPTH));
            if (labels.getString().trim().equals(""))
              continue;
            else
              return new Title(labels);
          }
        }
      }

      if (null != instanceLenses) {
        // find label lens for resource
        Iterator<Lens> instancesIt = instanceLenses.getInstanceLenses().iterator();
        while (instancesIt.hasNext()) {
          Lens check = instancesIt.next();
          if (check.hasPurpose(new Purpose(FresnelCore.labelLens))) { 
            AggregateLabel labels = new AggregateLabel(applyLabelLens(check, in, focus, 0, MAXIMUM_LENS_DEPTH));
            if (labels.getString().trim().equals(""))
              continue;
            else
              return new Title(labels);
          }
        }
      }
      if (null != classLenses) {
        // find label lens for resource
        Iterator<Lens> classesIt = classLenses.getClassLenses().iterator();
        while (classesIt.hasNext()) {
          Lens check = classesIt.next();
          if (check.hasPurpose(new Purpose(FresnelCore.labelLens))) {
            AggregateLabel labels = new AggregateLabel(applyLabelLens(check, in, focus, 0, MAXIMUM_LENS_DEPTH));
            if (labels.getString().trim().equals(""))
              continue;
            else
              return new Title(labels);
View Full Code Here


        }
      }

      // get any lens-specified (property description) formatting, use instead of
      // passed in format if necessary
      Lens parent = r.getParent().getLens();
      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;
View Full Code Here

TOP

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

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.