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

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

Best Java code snippets using uk.ac.ebi.intact.bridges.ontologies.OntologyDocument.getRelationshipType (Showing top 5 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;
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-solr-core

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.ontologiesOntologyDocumentgetRelationshipType

Popular methods of OntologyDocument

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • orElseThrow (Optional)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • ImageIO (javax.imageio)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
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