Codota Logo
StreamsQuery.getSparql
Code IndexAdd Codota to your IDE (free)

How to use
getSparql
method
in
org.apache.rya.streams.api.entity.StreamsQuery

Best Java code snippets using org.apache.rya.streams.api.entity.StreamsQuery.getSparql (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: apache/incubator-rya

private void append(final StringBuilder string, final StreamsQuery query) {
  requireNonNull(string);
  requireNonNull(query);
  string.append("    Streams Query {\n")
     .append("        Query ID: ").append(query.getQueryId()).append(",\n")
     .append("        Is Active: ").append(query.isActive()).append(",\n")
     .append("        SPARQL: ").append(query.getSparql()).append("\n")
     .append("    }");
}
origin: apache/incubator-rya

/**
 * Pretty formats a {@link StreamsQuery}.
 *
 * @param query - The query to format. (not null)
 * @return The pretty formatted string.
 * @throws Exception A problem was encountered while pretty formatting the SPARQL.
 */
public static String format(final StreamsQuery query) throws Exception {
  requireNonNull(query);
  // Pretty format the SPARQL query.
  final ParsedQuery parsedQuery = new SPARQLParser().parseQuery(query.getSparql(), null);
  final String prettySparql = new SPARQLQueryRenderer().render(parsedQuery);
  final String[] lines = prettySparql.split("\n");
  // Create the formatted string.
  query.getQueryId();
  query.isActive();
  String.format(" QueryId: %s", query.getQueryId());
  final StringBuilder builder = new StringBuilder();
  builder.append(" Query ID: ").append( query.getQueryId() ) .append("\n");
  builder.append("Is Active: ").append( query.isActive() ).append("\n");
  builder.append("Is Insert: ").append( query.isInsert() ).append("\n");
  builder.append("   SPARQL: ").append( lines[0] ).append("\n");
  for(int i = 1; i < lines.length; i++) {
    builder.append("           ").append(lines[i]).append("\n");
  }
  return builder.toString();
}
origin: apache/incubator-rya

final String sparql = query.get().getSparql();
final TopologyBuilder topologyBuilder;
try {
origin: apache/incubator-rya

final StreamsQuery updated = new StreamsQuery(
    old.getQueryId(),
    old.getSparql(),
    change.getIsActive().get(),
    old.isInsert());
origin: apache/incubator-rya

  @Override
  public KafkaStreams make(final String ryaInstance, final StreamsQuery query) throws KafkaStreamsFactoryException {
    requireNonNull(ryaInstance);
    requireNonNull(query);

    // Setup the Kafka Stream program.
    final Properties streamsProps = new Properties();

    // Configure the Kafka servers that will be talked to.
    streamsProps.setProperty(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServersConfig);

    // Use the Query ID as the Application ID to ensure we resume where we left off the last time this command was run.
    streamsProps.put(StreamsConfig.APPLICATION_ID_CONFIG, "RyaStreams-Query-" + query.getQueryId());

    // Always start at the beginning of the input topic.
    streamsProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");

    // Setup the topology that processes the Query.
    final String statementsTopic = KafkaTopics.statementsTopic(ryaInstance);
    final String resultsTopic = KafkaTopics.queryResultsTopic(ryaInstance, query.getQueryId());

    try {
      final TopologyBuilder topologyBuilder = topologyFactory.build(query.getSparql(), statementsTopic, resultsTopic, new RandomUUIDFactory());
      return new KafkaStreams(topologyBuilder, new StreamsConfig(streamsProps));
    } catch (final MalformedQueryException | TopologyBuilderException e) {
      throw new KafkaStreamsFactoryException("Could not create a KafkaStreams processing topology for query " + query.getQueryId(), e);
    }
  }
}
origin: org.apache.rya/rya.streams.api

final StreamsQuery updated = new StreamsQuery(
    old.getQueryId(),
    old.getSparql(),
    change.getIsActive().get());
queriesCache.put(queryId, updated);
org.apache.rya.streams.api.entityStreamsQuerygetSparql

Popular methods of StreamsQuery

  • getQueryId
  • isActive
  • isInsert
  • <init>
    Constructs an instance of StreamsQuery.

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • compareTo (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JTextField (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
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