Codota Logo
OWLObject.compareTo
Code IndexAdd Codota to your IDE (free)

How to use
compareTo
method
in
org.semanticweb.owlapi.model.OWLObject

Best Java code snippets using org.semanticweb.owlapi.model.OWLObject.compareTo (Showing top 20 results out of 315)

  • Common ways to obtain OWLObject
private void myMethod () {
OWLObject o =
  • Codota IconOWLObjectTreeNode parentNode;parentNode.getOWLObject()
  • Codota IconOWLObjectTree tree;tree.getSelectedOWLObject()
  • Codota IconOWLAnnotationAssertionAxiom oWLAnnotationAssertionAxiom;oWLAnnotationAssertionAxiom.getSubject()
  • Smart code suggestions by Codota
}
origin: edu.stanford.protege/protege-editor-owl

public int compare(E o1, E o2) {
  return o1.compareTo(o2);
}
origin: edu.stanford.protege/org.protege.editor.owl

public int compare(E o1, E o2) {
  return o1.compareTo(o2);
}
origin: protegeproject/protege

public int compare(E o1, E o2) {
  return o1.compareTo(o2);
}
origin: org.protege/protege-editor-owl

public int compare(E o1, E o2) {
  return o1.compareTo(o2);
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

  protected static int compareLists(List<? extends OWLObject> list1, List<? extends OWLObject> list2) {
    int i = 0;
    int size = list1.size() < list2.size() ? list1.size() : list2.size();
    while (i < size) {
      OWLObject o1 = list1.get(i);
      OWLObject o2 = list2.get(i);
      int diff = o1.compareTo(o2);
      if (diff != 0) {
        return diff;
      }
      i++;
    }
    return list1.size() - list2.size();
  }
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

  protected static int compareLists(List<? extends OWLObject> list1, List<? extends OWLObject> list2) {
    int i = 0;
    int size = list1.size() < list2.size() ? list1.size() : list2.size();
    while (i < size) {
      OWLObject o1 = list1.get(i);
      OWLObject o2 = list2.get(i);
      int diff = o1.compareTo(o2);
      if (diff != 0) {
        return diff;
      }
      i++;
    }
    return list1.size() - list2.size();
  }
}
origin: net.sourceforge.owlapi/owlapi-osgidistribution

  @Override
  public int compare(@Nullable OWLObject o1, @Nullable OWLObject o2) {
    // if both objects are entities, compare their short forms
    if (o1 instanceof OWLEntity && o2 instanceof OWLEntity) {
      return entityComparator.compare((OWLEntity) o1, (OWLEntity) o2);
    }
    return verifyNotNull(o1).compareTo(o2);
  }
}
origin: owlcs/owlapi

  @Override
  public int compare(@Nullable OWLObject o1, @Nullable OWLObject o2) {
    // if both objects are entities, compare their short forms
    if (o1 instanceof OWLEntity && o2 instanceof OWLEntity) {
      return entityComparator.compare((OWLEntity) o1, (OWLEntity) o2);
    }
    return verifyNotNull(o1).compareTo(o2);
  }
}
origin: net.sourceforge.owlapi/owlapi-distribution

  @Override
  public int compare(@Nullable OWLObject o1, @Nullable OWLObject o2) {
    // if both objects are entities, compare their short forms
    if (o1 instanceof OWLEntity && o2 instanceof OWLEntity) {
      return entityComparator.compare((OWLEntity) o1, (OWLEntity) o2);
    }
    return verifyNotNull(o1).compareTo(o2);
  }
}
origin: edu.stanford.protege/protege-editor-owl

  public int compare(E o1, E o2) {
    OWLModelManager man = getOWLModelManager();
    String r1 = man.getRendering(o1);
    if (r1.startsWith("'")){
      r1 = r1.substring(1, r1.length()-1);
    }
    String r2 = man.getRendering(o2);
    if (r2.startsWith("'")){
      r2 = r2.substring(1, r2.length()-1);
    }
    int result = r1.compareToIgnoreCase(r2);
    if (result == 0) {
      result = o1.compareTo(o2);
    }
    return result;
  }
}
origin: SmartDataAnalytics/DL-Learner

  @Override
  public int compare(OWLObject o1, OWLObject o2) {
    int diff = indexProvider.getTypeIndex(o1) - indexProvider.getTypeIndex(o2);
    if(diff == 0){
      return o1.compareTo(o2);
    } else {
      return diff;
    }
  }
}
origin: org.protege/protege-editor-owl

  public int compare(E o1, E o2) {
    String r1 = getOWLModelManager().getRendering(o1);
    if (r1.startsWith("'")){
      r1 = r1.substring(1, r1.length()-2);
    }
    String r2 = getOWLModelManager().getRendering(o2);
    if (r2.startsWith("'")){
      r2 = r2.substring(1, r2.length()-2);
    }
    int result = r1.compareTo(r2);
    if (result == 0) {
      result = o1.compareTo(o2);
    }
    return result;
  }
}
origin: edu.stanford.protege/org.protege.editor.owl

  public int compare(E o1, E o2) {
    String r1 = getOWLModelManager().getRendering(o1);
    if (r1.startsWith("'")){
      r1 = r1.substring(1, r1.length()-2);
    }
    String r2 = getOWLModelManager().getRendering(o2);
    if (r2.startsWith("'")){
      r2 = r2.substring(1, r2.length()-2);
    }
    int result = r1.compareToIgnoreCase(r2);
    if (result == 0) {
      result = o1.compareTo(o2);
    }
    return result;
  }
}
origin: net.sourceforge.owlapi/owlapi-gwt-supersource

  @Override
  final protected int compareObjectOfSameType(OWLObject object) {
    OWLHasValueRestriction<?, ?, ?> other = (OWLHasValueRestriction<?, ?, ?>) object;
    int diff = getProperty().compareTo(other.getProperty());
    if (diff != 0) {
      return diff;
    }
    return value.compareTo(other.getValue());
  }
}
origin: net.sourceforge.owlapi/owlapi

  final protected int compareObjectOfSameType(OWLObject object) {
    OWLHasValueRestriction other = (OWLHasValueRestriction) object;
    int diff = getProperty().compareTo(other.getProperty());
    if(diff != 0) {
      return diff;
    }
    return value.compareTo(other.getValue());
  }
}
origin: net.sourceforge.owlapi/owlapi

  final protected int compareObjectOfSameType(OWLObject object) {
    OWLPropertyAssertionAxiom other = (OWLPropertyAssertionAxiom) object;
    int diff = subject.compareTo(other.getSubject());
    if (diff != 0) {
      return diff;
    }
    diff = property.compareTo(other.getProperty());
    if (diff != 0) {
      return diff;
    }
    return object.compareTo(other.getObject());
  }
}
origin: net.sourceforge.owlapi/owlapi-gwt-supersource

  @Override
  final protected int compareObjectOfSameType(OWLObject o) {
    OWLPropertyAssertionAxiom<?,?> other = (OWLPropertyAssertionAxiom<?,?>) o;
    int diff = subject.compareTo(other.getSubject());
    if (diff != 0) {
      return diff;
    }
    diff = property.compareTo(other.getProperty());
    if (diff != 0) {
      return diff;
    }
    return o.compareTo(other.getObject());
  }
}
origin: net.sourceforge.owlapi/owlapi-gwt-supersource

  @Override
  protected int compareObjectOfSameType(OWLObject object) {
    SWRLBinaryAtom<?,?> other = (SWRLBinaryAtom<?,?>) object;
    int diff = ((OWLObject) getPredicate()).compareTo((OWLObject) other.getPredicate());
    if (diff != 0) {
      return diff;
    }
    diff = arg0.compareTo(other.getFirstArgument());
    if (diff != 0) {
      return diff;
    }
    return arg1.compareTo(other.getSecondArgument());
  }
}
origin: net.sourceforge.owlapi/owlapi

  protected int compareObjectOfSameType(OWLObject object) {
    SWRLBinaryAtom other = (SWRLBinaryAtom) object;
    int diff = ((OWLObject)getPredicate()).compareTo((OWLObject)other.getPredicate());
    if(diff != 0) {
      return diff;
    }
    diff = arg0.compareTo(other.getFirstArgument());
    if(diff != 0) {
      return diff;
    }
    return arg1.compareTo(other.getSecondArgument());
  }
}
origin: net.sourceforge.owlapi/owlapi-gwt-client-side-emul

  @Override
  protected int compareObjectOfSameType(OWLObject object) {
    SWRLBinaryAtom<?, ?> other = (SWRLBinaryAtom<?, ?>) object;
    int diff = ((OWLObject) getPredicate()).compareTo((OWLObject) other
        .getPredicate());
    if (diff != 0) {
      return diff;
    }
    diff = arg0.compareTo(other.getFirstArgument());
    if (diff != 0) {
      return diff;
    }
    return arg1.compareTo(other.getSecondArgument());
  }
}
org.semanticweb.owlapi.modelOWLObjectcompareTo

Popular methods of OWLObject

  • accept
    Accepts a visitor
  • isTopEntity
    Determines if this object is either, owl:Thing (the top class), owl:topObjectProperty (the top objec
  • isBottomEntity
    Determines if this object is either, owl:Nothing (the bottom class), owl:bottomObjectProperty (the b
  • isIRI
  • hashIteration
    Iteration for hash codes
  • signature
  • components
  • datatypesInSignature
  • hasSharedStructure
  • isAnonymous
  • isAnonymousExpression
  • isAxiom
  • isAnonymousExpression,
  • isAxiom,
  • isIndividual,
  • isOntology,
  • nestedClassExpressions,
  • toString,
  • typeIndex,
  • classesInSignature,
  • dataPropertiesInSignature

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now