congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Role.subs
Code IndexAdd Tabnine to your IDE (free)

How to use
subs
method
in
ai.grakn.concept.Role

Best Java code snippets using ai.grakn.concept.Role.subs (Showing top 6 results out of 315)

origin: ai.grakn/grakn-graql

  @Override
  public Stream<Role> toCompatibleRoles(Role entryRole) {
    return entryRole.subs();
  }
}
origin: ai.grakn/grakn-test-tools

public static Collection<? extends SchemaConcept> allSchemaElementsFrom(GraknTx graph) {
  Set<SchemaConcept> allSchemaConcepts = new HashSet<>();
  allSchemaConcepts.addAll(graph.admin().getMetaConcept().subs().collect(toSet()));
  allSchemaConcepts.addAll(graph.admin().getMetaRole().subs().collect(toSet()));
  allSchemaConcepts.addAll(graph.admin().getMetaRule().subs().collect(toSet()));
  return allSchemaConcepts;
}
origin: ai.grakn/grakn-test-tools

private Role role() {
  return random.choose(tx.admin().getMetaRole().subs().collect(toSet()));
}
origin: ai.grakn/migration-export

  /**
   * Get all the {@link SchemaConcept}s in a graph.
   * @return a stream of all {@link SchemaConcept}s with non-reserved IDs
   */
  private Stream<? extends SchemaConcept> schemaConcepts(){
    Stream<? extends Type> types = tx.admin().getMetaConcept().subs();
    Stream<Role> roles = tx.admin().getMetaRole().subs();
    Stream<Rule> rules = tx.admin().getMetaRule().subs();

    return Stream.of(types, roles, rules)
        .flatMap(Function.identity())
        .filter(t -> !Schema.MetaSchema.isMetaLabel(t.label()));
  }
}
origin: ai.grakn/migration-base

public static void printWholeCompletionMessage(MigrationOptions options){
  System.out.println("Migration complete.");
  if(options.isVerbose()) {
    System.out.println("Gathering information about migrated data. If in a hurry, you can ctrl+c now.");
    GraknTx tx = new Grakn(options.getUri()).session(options.getKeyspace()).transaction(GraknTxType.WRITE);
    QueryBuilder qb = tx.graql();
    StringBuilder builder = new StringBuilder();
    builder.append("Graph schema contains:\n");
    builder.append("\t ").append(tx.admin().getMetaEntityType().instances().count()).append(" entity types\n");
    builder.append("\t ").append(tx.admin().getMetaRelationType().instances().count()).append(" relation types\n");
    builder.append("\t ").append(tx.admin().getMetaRole().subs().count()).append(" roles\n\n");
    builder.append("\t ").append(tx.admin().getMetaAttributeType().instances().count()).append(" resource types\n");
    builder.append("\t ").append(tx.admin().getMetaRule().subs().count()).append(" rules\n\n");
    builder.append("Graph data contains:\n");
    builder.append("\t ").append(qb.match(var("x").isa(label(ENTITY.getLabel()))).aggregate(count()).execute()).append(" entities\n");
    builder.append("\t ").append(qb.match(var("x").isa(label(RELATIONSHIP.getLabel()))).aggregate(count()).execute()).append(" relations\n");
    builder.append("\t ").append(qb.match(var("x").isa(label(ATTRIBUTE.getLabel()))).aggregate(count()).execute()).append(" resources\n");
    builder.append("\t ").append(qb.match(var("x").isa(label(RULE.getLabel()))).aggregate(count()).execute()).append(" rules\n\n");
    System.out.println(builder);
    tx.close();
  }
}
origin: ai.grakn/grakn-kb

boolean subRoleNotFoundInRelates = superRelate.subs().noneMatch(sub -> relatesLabels.contains(sub.label()));
ai.grakn.conceptRolesubs

Javadoc

Returns the sub of this Role.

Popular methods of Role

  • label
    Changes the Label of this Concept to a new one.
  • sup
  • relationships
    Returns the RelationshipTypes that this Role takes part in.
  • isDeleted
  • isImplicit
  • labelId
  • players
    Returns a collection of the Types that can play this Role.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • Menu (java.awt)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now