Examples of IRestriction


Examples of edu.pitt.dbmi.nlp.noble.ontology.IRestriction

      for(String relation: new String [] {PART_OF, HAS_PART}){
        p = target.getProperty("annotation_"+relation);
        if(p != null){
          for(IClass sibling: getClassList(target,cls.getPropertyValues(p))){
           
            IRestriction r = target.createRestriction(IRestriction.SOME_VALUES_FROM);
            r.setProperty(target.getProperty(relation));
            r.setParameter(sibling.getLogicExpression());
            cls.addNecessaryRestriction(r);
          }
          // remove temporary property
          cls.removePropertyValues(p);
        }
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IRestriction

  public IRestriction[] getRestrictions(IProperty p) {
    List<IRestriction> list = new ArrayList<IRestriction>();
    for(List l: new List [] {getEquivalentRestrictions(),getNecessaryRestrictions()}){
      for(Object o: l){
        if(o instanceof IRestriction){
          IRestriction r = (IRestriction)o;
          if(r.getProperty().equals(p))
            list.add(r);
        }
      }
    }
    return list.toArray(new IRestriction [0]);
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IRestriction

  private Object  convertResource(IOntology ont, Object value){
    if(value == null)
      return null;
   
    if(value instanceof IRestriction){
      IRestriction r = (IRestriction) value;
      IRestriction t = ont.createRestriction(r.getRestrictionType());
      t.setProperty((IProperty)convertResource(ont,r.getProperty()));
      t.setParameter((ILogicExpression)convertResource(ont,r.getParameter()));
      return t;
    }else if(value instanceof ILogicExpression){
      ILogicExpression e = (ILogicExpression) value;
      ILogicExpression t = ont.createLogicExpression();
      t.setExpressionType(e.getExpressionType());
      for(Object o: e){
        t.add(convertResource(ont,o));
      }
      return t;
    }else if(value instanceof IProperty){
      return ont.getProperty(((IProperty) value).getName());
    }else if(value instanceof IClass){
View Full Code Here

Examples of edu.pitt.ontology.IRestriction

  private Object  convertResource(IOntology ont, Object value){
    if(value == null)
      return null;
   
    if(value instanceof IRestriction){
      IRestriction r = (IRestriction) value;
      IRestriction t = ont.createRestriction(r.getRestrictionType());
      t.setProperty((IProperty)convertResource(ont,r.getProperty()));
      t.setParameter((ILogicExpression)convertResource(ont,r.getParameter()));
      return t;
    }else if(value instanceof ILogicExpression){
      ILogicExpression e = (ILogicExpression) value;
      ILogicExpression t = ont.createLogicExpression();
      t.setExpressionType(e.getExpressionType());
      for(Object o: e){
        t.add(convertResource(ont,o));
      }
      return t;
    }else if(value instanceof IProperty){
      return ont.getProperty(((IProperty) value).getName());
    }else if(value instanceof IClass){
View Full Code Here

Examples of edu.pitt.ontology.IRestriction

      for(String relation: new String [] {PART_OF, HAS_PART}){
        p = target.getProperty("annotation_"+relation);
        if(p != null){
          for(IClass sibling: getClassList(target,cls.getPropertyValues(p))){
           
            IRestriction r = target.createRestriction(IRestriction.SOME_VALUES_FROM);
            r.setProperty(target.getProperty(relation));
            r.setParameter(sibling.getLogicExpression());
            cls.addNecessaryRestriction(r);
          }
          // remove temporary property
          cls.removePropertyValues(p);
        }
View Full Code Here

Examples of edu.pitt.ontology.IRestriction

  public IRestriction[] getRestrictions(IProperty p) {
    List<IRestriction> list = new ArrayList<IRestriction>();
    for(List l: new List [] {getEquivalentRestrictions(),getNecessaryRestrictions()}){
      for(Object o: l){
        if(o instanceof IRestriction){
          IRestriction r = (IRestriction)o;
          if(r.getProperty().equals(p))
            list.add(r);
        }
      }
    }
    return list.toArray(new IRestriction [0]);
View Full Code Here

Examples of org.eclipse.ecf.presence.search.IRestriction

  }

  public void testRetrieveBuddiesAsync() throws Exception {
    assertNotNull(searchManager);

    IRestriction selection = searchManager.createRestriction();

    assertNotNull(selection);

    // fields to consider on XMPP server side search
    // search field for XMPP, criterion to match the search
    ICriterion name = selection.eq(NAME, "Marcelo*");
    ICriterion email = selection.eq(EMAIL, "zx*");
    ICriterion username = selection.eq(USERNAME, "sl*");

    // create a specific criteria
    final ICriteria criteria = searchManager.createCriteria();
    assertNotNull(criteria);
    criteria.add(name);
View Full Code Here

Examples of org.eclipse.ecf.presence.search.IRestriction

      throws ContainerConnectException {

    try {
      assertNotNull(searchManager);

      IRestriction selection = searchManager.createRestriction();
      assertNotNull(selection);

      // fields to consider on XMPP server side search
      // search field for XMPP, criterion to match the search
      ICriterion name = selection.eq(NAME, "Marcelo*");
      ICriterion email = selection.eq(EMAIL, "zx*");
      ICriterion username = selection.eq(USERNAME, "sl*");

      // create a specific criteria
      ICriteria criteria = searchManager.createCriteria();
      assertNotNull(criteria);
      criteria.add(name);
View Full Code Here

Examples of org.eclipse.ecf.presence.search.IRestriction

   */
  public void testRetrieveBuddiesEmailFieldSync() throws Exception {

    assertNotNull(searchManager);

    IRestriction selection = searchManager.createRestriction();
    assertNotNull(selection);

    // search field for XMPP, criterion to match the search
    // fields to consider on XMPP server side search
    ICriterion email = selection.eq(EMAIL, "mayworm*");

    // create a specific criteria
    ICriteria criteria = searchManager.createCriteria();
    assertNotNull(criteria);
    criteria.add(email);
View Full Code Here

Examples of org.eclipse.ecf.presence.search.IRestriction

   */
  public void testRetrieveBuddiesNameFieldSync() throws Exception {

    assertNotNull(searchManager);

    IRestriction selection = searchManager.createRestriction();
    assertNotNull(selection);

    // fields to consider on XMPP server side search
    // search field for XMPP, criterion to match the search
    ICriterion name = selection.eq(NAME, "marcelo*");

    // create a specific criteria
    try {
      ICriteria criteria = searchManager.createCriteria();
      assertNotNull(criteria);
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.