public int compareVersions ( VersionedOntology o ) throws OntopException { if ( ! base . equals ( o . base ) || ! ontologyPath . equals ( o . ontologyPath ) ) { throw new OntopException ( "Version comparison must be done with same ontology series." ) ; } if ( major > o . major ) { return 1 ; } else if ( major == o . major ) { if ( minor > o . minor ) { return 1 ; } else if ( minor == o . minor ) { return 0 ; } } return - 1 ; }
returns - 1 if this is lower than o returns 0 if this is equal to o returns 1 if this is greater than o