Codota Logo
OntologyDocument.isCyclicRelationship
Code IndexAdd Codota to your IDE (free)

How to use
isCyclicRelationship
method
in
uk.ac.ebi.intact.bridges.ontologies.OntologyDocument

Best Java code snippets using uk.ac.ebi.intact.bridges.ontologies.OntologyDocument.isCyclicRelationship (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-solr-core

  /**
   * Used to exclude any document that does not have an "is_a" relationship or it is not a root node
   * (null relationship) or it is cyclic.
   * @param ontologyDocument
   * @return
   */
  public boolean accept(OntologyDocument ontologyDocument) {
    if (ontologyDocument.getRelationshipType() == null) {
      return true;
    }

    final String type = ontologyDocument.getRelationshipType();
    // note that the types are ordered by decreasing likelyhood of appearence to improve performance
    return (    type.equals( "OBO_REL:is_a" )
         || type.equals( "part_of" )
         || type.equals( "is_a" )
         || type.equals( "OBO_REL:part_of" )
        )
        && ! ontologyDocument.isCyclicRelationship();
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-solr

  /**
   * Used to exclude any document that does not have an "is_a" relationship or it is not a root node
   * (null relationship) or it is cyclic.
   * @param ontologyDocument
   * @return
   */
  public boolean accept(OntologyDocument ontologyDocument) {
    if (ontologyDocument.getRelationshipType() == null) {
      return true;
    }

    final String type = ontologyDocument.getRelationshipType();
    // note that the types are ordered by decreasing likelyhood of appearence to improve performance
    return (    type.equals( "OBO_REL:is_a" )
         || type.equals( "part_of" )
         || type.equals( "is_a" )
         || type.equals( "OBO_REL:part_of" )
        )
        && ! ontologyDocument.isCyclicRelationship();
  }
}
origin: uk.ac.ebi.intact.bridges/intact-ontologies

public void addDocument(OntologyDocument ontologyDoc) throws IOException {
  Document doc = new Document();
  doc.add(new Field(FieldName.ONTOLOGY, ontologyDoc.getOntology(), Field.Store.YES, Field.Index.UN_TOKENIZED));
  if (ontologyDoc.getParentId() != null) {
    doc.add(new Field(FieldName.PARENT_ID, ontologyDoc.getParentId(), Field.Store.YES, Field.Index.UN_TOKENIZED));
    doc.add(new Field(FieldName.PARENT_NAME, ontologyDoc.getParentName(), Field.Store.YES, Field.Index.TOKENIZED));
    doc.add(new Field(FieldName.PARENT_NAME_SORTABLE, ontologyDoc.getParentName(), Field.Store.YES, Field.Index.UN_TOKENIZED));
  }
  if (ontologyDoc.getChildId() != null) {
    doc.add(new Field(FieldName.CHILDREN_ID, ontologyDoc.getChildId(), Field.Store.YES, Field.Index.UN_TOKENIZED));
    doc.add(new Field(FieldName.CHILDREN_NAME, ontologyDoc.getChildName(), Field.Store.YES, Field.Index.TOKENIZED));
    doc.add(new Field(FieldName.CHILDREN_NAME_SORTABLE, ontologyDoc.getChildName(), Field.Store.YES, Field.Index.UN_TOKENIZED));
  }
  if (ontologyDoc.getRelationshipType() != null) {
    doc.add(new Field(FieldName.RELATIONSHIP_TYPE, ontologyDoc.getRelationshipType(), Field.Store.YES, Field.Index.UN_TOKENIZED));
  }
  doc.add(new Field(FieldName.RELATIONSHIP_CYCLIC, String.valueOf(ontologyDoc.isCyclicRelationship()),
           Field.Store.YES, Field.Index.UN_TOKENIZED));
  doc.add(new Field(FieldName.PARENT_SYNONYMS, StringUtils.join(ontologyDoc.getParentSynonyms(), SYNONYM_SEPARATOR), Field.Store.YES, Field.Index.UN_TOKENIZED));
  doc.add(new Field(FieldName.CHILDREN_SYNONYMS, StringUtils.join(ontologyDoc.getChildSynonyms(), SYNONYM_SEPARATOR), Field.Store.YES, Field.Index.UN_TOKENIZED));
  this.indexWriter.addDocument(doc);
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-solr

private SolrInputDocument createSolrInputDocument(OntologyDocument ontologyDocument) {
  SolrInputDocument doc = new SolrInputDocument();
  String uniqueKey = ontologyDocument.getOntology() + "_" + ontologyDocument.getParentId() + "_" + ontologyDocument.getChildId() + "_" + ontologyDocument.getRelationshipType();
  addField(doc, OntologyFieldNames.ID, uniqueKey, false);
  addField(doc, OntologyFieldNames.ONTOLOGY, ontologyDocument.getOntology(), false);
  addField(doc, OntologyFieldNames.PARENT_ID, ontologyDocument.getParentId(), false);
  addField(doc, OntologyFieldNames.PARENT_NAME, ontologyDocument.getParentName(), true);
  addField(doc, OntologyFieldNames.CHILD_ID, ontologyDocument.getChildId(), false);
  addField(doc, OntologyFieldNames.CHILD_NAME, ontologyDocument.getChildName(), true);
  addField(doc, OntologyFieldNames.RELATIONSHIP_TYPE, ontologyDocument.getRelationshipType(), false);
  addField(doc, OntologyFieldNames.CYCLIC, ontologyDocument.isCyclicRelationship(), false);
  
  for (String synonym : ontologyDocument.getParentSynonyms()) {
    addField(doc, OntologyFieldNames.PARENT_SYNONYMS, synonym, false);
  }
  for (String synonym : ontologyDocument.getChildSynonyms()) {
    addField(doc, OntologyFieldNames.CHILDREN_SYNONYMS, synonym, false);
  }
  return doc;
}
uk.ac.ebi.intact.bridges.ontologiesOntologyDocumentisCyclicRelationship

Popular methods of OntologyDocument

  • getChildId
  • getChildName
  • getChildSynonyms
  • getOntology
  • getParentId
  • getParentName
  • getParentSynonyms
  • getRelationshipType
  • <init>
  • addAllChildSynonyms
  • addAllParentSynonyms
  • addChildSynonym
  • addAllParentSynonyms,
  • addChildSynonym,
  • addParentSynonym

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • requestLocationUpdates (LocationManager)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JComboBox (javax.swing)
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