name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
streampipes_SimpleBlockFusionProcessor_getInstance_rdh
/** * Returns the singleton instance for BlockFusionProcessor. */ public static SimpleBlockFusionProcessor getInstance() { return INSTANCE; }
3.26
streampipes_CanolaExtractor_getInstance_rdh
/** * Returns the singleton instance for {@link CanolaExtractor}. */ public static CanolaExtractor getInstance() { return INSTANCE; }
3.26
streampipes_OpcNode_getQudtURI_rdh
/** * Returns the corresponding QUDT URI if the {@code opcUnitId} is given, * otherwise it returns an empty string. <br> * Currently, there are only two examples added. <br> * Other units have to be added manually, please have a look at the <a href="http://opcfoundation.org/UA/EngineeringUnits/UNECE/UNECE_to_OPCUA....
3.26
streampipes_OpcUaTypes_getType_rdh
/** * Maps OPC UA data types to internal StreamPipes data types * * @param o * data type id as UInteger * @return StreamPipes internal data type */ public static Datatypes getType(UInteger o) { if ((((((UInteger.valueOf(4).equals(o) | UInteger.valueOf(5).equals(o)) | UInteger.valueOf(6).equals(o)) | UInte...
3.26
streampipes_AbstractMigrationManager_performMigration_rdh
/** * Performs the actual migration of a pipeline element. * This includes the communication with the extensions service which runs the migration. * * @param pipelineElement * pipeline element to be migrated * @param migrationConfig * config of the migration to be performed * @param url * url of the migr...
3.26
streampipes_AbstractMigrationManager_performUpdate_rdh
/** * Perform the update of the description based on the given requestUrl * * @param requestUrl * URl that references the description to be updated at the extensions service. */ protected void performUpdate(String requestUrl) { try { var entityPayload = HttpJsonParser.getContentFromUrl(URI.create(re...
3.26
streampipes_AbstractMigrationManager_updateDescriptions_rdh
/** * Update all descriptions of entities in the Core that are affected by migrations. * * @param migrationConfigs * List of migrations to take in account * @param serviceUrl * Url of the extension service that provides the migrations. */ protected void updateDescriptions(List<ModelMigratorConfig> migratio...
3.26
streampipes_ImageExtractor_getInstance_rdh
/** * Returns the singleton instance of {@link ImageExtractor}. * * @return */ public static ImageExtractor getInstance() { return INSTANCE; }
3.26
streampipes_ImageExtractor_process_rdh
/** * Fetches the given {@link URL} using {@link HTMLFetcher} and processes the retrieved HTML using * the specified {@link BoilerpipeExtractor}. * * @param doc * The processed {@link TextDocument}. * @param is * The original HTML document. * @return A List of enclosed {@link Image}s * @throws BoilerpipePr...
3.26
streampipes_ExtractorBase_getText_rdh
/** * Extracts text from the given {@link TextDocument} object. * * @param doc * The {@link TextDocument}. * @return The extracted text. * @throws BoilerpipeProcessingException */ public String getText(TextDocument doc) throws BoilerpipeProcessingException { process(doc); return doc.getContent(); }
3.26
streampipes_SpKafkaProducer_createKafkaTopic_rdh
/** * Create a new topic and define number partitions, replicas, and retention time * * @param settings * The settings to connect to a Kafka broker */ private void createKafkaTopic(KafkaTransportProtocol settings) throws ExecutionException, InterruptedException { Properties props = new Properties(); prop...
3.26
streampipes_ZipFileExtractor_extractZipToMap_rdh
// TODO used by export feature - extend this to support binaries public Map<String, byte[]> extractZipToMap() throws IOException { byte[] buffer = new byte[1024]; Map<String, byte[]> entries = new HashMap<>(); ZipInputStream zis = new ZipInputStream(zipInputStream); ZipEntry zipEntry = zis.getNextEntry(...
3.26
streampipes_DataStreamApi_create_rdh
/** * Directly install a new data stream * * @param stream * The data stream to add */ @Override public void create(SpDataStream stream) { post(StreamPipesApiPath.fromBaseApiPath().addToPath("streams"), stream); }
3.26
streampipes_DataStreamApi_delete_rdh
/** * Delete a data stream * * @param streamId * The elementId of the stream */ @Override public void delete(String streamId) { delete(getBaseResourcePath().addToPath(URLEncoder.encode(streamId)), Message.class); }
3.26
streampipes_DataStreamApi_subscribe_rdh
/** * Subscribe to a data stream * * @param stream * The data stream to subscribe to * @param kafkaConfig * Additional kafka settings which will override the default value (see docs) * @param callback * The callback where events will be received */ @Override public ISubscription subscribe(SpDataStream st...
3.26
streampipes_DataStreamApi_all_rdh
/** * Get all available data streams * * @return {@link org.apache.streampipes.model.SpDataStream} A list of all data streams owned by the user. */ @Override public List<SpDataStream> all() { return getAll(getBaseResourcePath()); }
3.26
streampipes_OpcUaUtil_resolveConfiguration_rdh
/** * * * OPC UA specific implementation of * {@link ResolvesContainerProvidedOptions resolveOptions(String, StaticPropertyExtractor)}. * * @param internalName * The internal name of the Static Property * @param parameterExtractor * to extract parameters from the OPC UA config * @return {@code List<Option>...
3.26
streampipes_OpcUaUtil_retrieveDataTypesFromServer_rdh
/** * connects to each node individually and updates the data type in accordance to the data from the server. * * @param opcNodes * List of opcNodes where the data type is not determined appropriately */ public static void retrieveDataTypesFromServer(OpcUaClient client, List<OpcNode> opcNodes) throws AdapterExce...
3.26
streampipes_OpcUaUtil_formatServerAddress_rdh
/** * * * Ensures server address starts with {@code opc.tcp://} * * @param serverAddress * server address as given by user * @return correctly formated server address */ public static String formatServerAddress(String serverAddress) { if (!serverAddress.startsWith("opc.tcp://")) { serverAddress = "opc....
3.26
streampipes_OpcUaUtil_getSchema_rdh
/** * * * OPC UA specific implementation of * * @param extractor * @return guess schema * @throws AdapterException * @throws ParseException */ public static GuessSchema getSchema(IAdapterParameterExtractor extractor) throws AdapterException, ParseException { var builder = GuessSchemaBuilder.create(); Ev...
3.26
streampipes_DbDataTypeFactory_getFromObject_rdh
/** * Tries to identify the data type of the object {@code o}. In case it is not supported, it is * interpreted as a String (VARCHAR(255)) * * @param o * The object which should be identified * @return */ public static DbDataTypes getFromObject(final Object o, SupportedDbEngines sqlEngine) { if (o instance...
3.26
streampipes_StatementUtils_getStatement_rdh
/** * This method checks if the user input is correct. When not null is returned * * @param s * @return */ public static Statement getStatement(String s) { Statement result = new Statement(); String[] parts = s.split(";"); // default case if (parts.length == 2) { if (parts[0].equals("*")) { result.set...
3.26
streampipes_StatementUtils_addLabel_rdh
/** * Add a label to the input event according to the provided statements * * @param inputEvent * @param value * @param statements * @return */ public static Event addLabel(Event inputEvent, String labelName, double value, List<Statement> statements) { String label = getLabel(v...
3.26
streampipes_TextBlock_getContainedTextElements_rdh
/** * Returns the containedTextElements BitSet, or <code>null</code>. * * @return */ public BitSet getContainedTextElements() { return containedTextElements; }
3.26
streampipes_TextBlock_hasLabel_rdh
/** * Checks whether this TextBlock has the given label. * * @param label * The label * @return <code>true</code> if this block is marked by the given label. */ public boolean hasLabel(final String label) { return (labels != null) && labels.contains(label); }
3.26
streampipes_TextBlock_m1_rdh
/** * Adds a set of labels to this {@link TextBlock}. <code>null</code>-references are silently * ignored. * * @param l * The labels to be added. */ public void m1(final String... l) { if (l == null) { return;} if (this.labels == null) { this.labels = new HashSet<String>(); } for (final String label :...
3.26
streampipes_TextBlock_addLabel_rdh
/** * Adds an arbitrary String label to this {@link TextBlock}. * * @param label * The label * @see DefaultLabels */ public void addLabel(final String label) { if (labels == null) { labels = new HashSet<String>(2); } labels.add(label); }
3.26
streampipes_TextBlock_getLabels_rdh
/** * Returns the labels associated to this TextBlock, or <code>null</code> if no such labels exist. * * NOTE: The returned instance is the one used directly in TextBlock. You have full access to the * data structure. However it is recommended to use the label-specific methods in * {@link TextBlock} whenever possi...
3.26
streampipes_ProtocolManager_findInputCollector_rdh
// TODO currently only the topic name is used as an identifier for a consumer/producer. Should // be changed by some hashCode implementation in streampipes-model, but this requires changes // in empire serializers public static <T extends TransportProtocol> StandaloneSpInputCollector findInputCollector(T protocol, Tran...
3.26
streampipes_RuntimeResolvableRequestHandler_handleRuntimeResponse_rdh
// for backwards compatibility public RuntimeOptionsResponse handleRuntimeResponse(ResolvesContainerProvidedOptions resolvesOptions, RuntimeOptionsRequest req) throws SpConfigurationException { List<Option> availableOptions = resolvesOptions.resolveOptions(req.getRequestId(), makeExtractor(req)); SelectionStati...
3.26
streampipes_InfluxStore_connect_rdh
/** * Connects to the InfluxDB Server, sets the database and initializes the batch-behaviour * * @throws SpRuntimeException * If not connection can be established or if the database could not * be found */ private void connect(InfluxConnectionSettings settings) throws SpRuntimeException { influxDb = Infl...
3.26
streampipes_InfluxStore_createDatabase_rdh
/** * Creates a new database with the given name * * @param dbName * The name of the database which should be created */ private void createDatabase(String dbName) throws SpRuntimeException { if (!dbName.matches("^[a-zA-Z_]\\w*$")) { throw new SpRuntimeException(("Database name '" + dbName) + "' not ...
3.26
streampipes_InfluxStore_close_rdh
/** * Shuts down the connection to the InfluxDB server */ public void close() throws SpRuntimeException { influxDb.flush(); try { Thread.sleep(1000); } catch (InterruptedException e) { throw new SpRuntimeException(e); } influxDb.close(); }
3.26
streampipes_NumWordsRulesExtractor_getInstance_rdh
/** * Returns the singleton instance for {@link NumWordsRulesExtractor}. */ public static NumWordsRulesExtractor getInstance() { return INSTANCE; }
3.26
streampipes_MqttUtils_extractQoSFromString_rdh
// remove non-digits public static QoS extractQoSFromString(String s) { int qos = Integer.parseInt(s.replaceAll("\\D+", "")); switch (qos) { case 0 : return QoS.AT_MOST_ONCE; case 1 : return QoS.AT_LEAST_ONCE; case 2 : return QoS.EXACTLY_ONCE; ...
3.26
streampipes_HTMLFetcher_fetch_rdh
/** * Fetches the document at the given URL, using {@link URLConnection}. * * @param url * @return * @throws IOException */ public static HTMLDocument fetch(final URL url) throws IOException { final URLConnection conn = url.openConnection(); final String ct = conn.getC...
3.26
streampipes_EpProperties_stringEp_rdh
/** * Creates a new primitive property of type string and the provided domain property. In addition, the value range * of the property is restricted to the defined {@link org.apache.streampipes.model.schema.Enumeration} * * @param runtimeName * The field identifier of the event property at runtime. * @param dom...
3.26
streampipes_EpProperties_integerEp_rdh
/** * Creates a new primitive property of type integer and the provided domain properties. In addition, the value range * of the property is restricted to the defined {@link org.apache.streampipes.model.schema.Enumeration} * * @param runtimeName * The field identifier of the event property at runtime. * @param ...
3.26
streampipes_EpProperties_imageProperty_rdh
/** * Creates a new primitive property of type image (with data type string and domain property image * * @param runtimeName * The field identifier of the event property at runtime. * @return {@link org.apache.streampipes.model.schema.EventPropertyPrimitive} */public static EventPropertyPrimitive imageProperty(...
3.26
streampipes_EpProperties_listStringEp_rdh
/** * Creates a new list-based event property of type string and with the assigned domain property. * * @param label * A human-readable label of the property * @param runtimeName * The field identifier of the event property at runtime. * @param domainProperty * The semantics of the list property as a Stri...
3.26
streampipes_EpProperties_listLongEp_rdh
/** * Creates a new list-based event property of type long and with the assigned domain property. * * @param label * A human-readable label of the property * @param runtimeName * The field identifier of the event property at runtime. * @param domainProperty * The semantics of the list property as a String...
3.26
streampipes_EpProperties_listIntegerEp_rdh
/** * Creates a new list-based event property of type integer and with the assigned domain property. * * @param label * A human-readable label of the property * @param runtimeName * The field identifier of the event property at runtime. * @param domainProperty * The semantics of the list property as a Str...
3.26
streampipes_EpProperties_numberEp_rdh
/** * Creates a new primitive property of type number and the provided domain property. * * @param runtimeName * The field identifier of the event property at runtime. * @param domainProperty * The semantics of the list property as a String. The string should correspond to a URI * provided by a vocabulary....
3.26
streampipes_EpProperties_timestampProperty_rdh
/** * Creates a new primitive property of type timestamp (with data type long and domain property schema.org/DateTime * * @param runtimeName * The field identifier of the event property at runtime. * @return {@link org.apache.streampipes.model.schema.EventPropertyPrimitive} */ public static EventPropertyPrimiti...
3.26
streampipes_EpProperties_longEp_rdh
/** * Creates a new primitive property of type integer and the provided domain property. * * @param label * A human-readable identifier of the property presented to users in the StreamPipes UI. * If you do not want to have a label besides the runtime name, use * {@link org.apache.streampipes.sdk.helpers.Lab...
3.26
streampipes_EpProperties_listBooleanEp_rdh
/** * Creates a new list-based event property of type boolean and with the assigned domain property. * * @param label * A human-readable label of the property * @param runtimeName * The field identifier of the event property at runtime. * @param domainProperty * The semantics of the list property as a Str...
3.26
streampipes_EpProperties_m0_rdh
/** * Creates a new primitive property of type string and the provided domain property. In addition, the value range * of the property is restricted to the defined {@link org.apache.streampipes.model.schema.Enumeration} * * @param runtimeName * The field identifier of the event property at runtime. * @param dom...
3.26
streampipes_EpProperties_listDoubleEp_rdh
/** * Creates a new list-based event property of type double and with the assigned domain property. * * @param label * A human-readable label of the property * @param runtimeName * The field identifier of the event property at runtime. * @param domainProperty * The semantics of the list property as a Stri...
3.26
streampipes_EpProperties_booleanEp_rdh
/** * Creates a new primitive property of type boolean and the provided domain property. * * @param runtimeName * The field identifier of the event property at runtime. * @param domainProperty * The semantics of the list property as a String. The string should correspond to a URI * provided by a vocabulary...
3.26
streampipes_EpProperties_listEp_rdh
/** * Creates a new list-based event property of the parameter type eventProperty * * @param label * A human-readable label of the property * @param runtimeName * The field identifier of the event property at runtime. * @param eventProperty * The complex type of data in the list * @return {@link org.apac...
3.26
streampipes_ParserDescriptionBuilder_create_rdh
/** * Creates a new format description using the builder pattern. * * @param id * A unique identifier of the new element, e.g., com.mycompany.sink.mynewdatasink * @param label * A human-readable name of the element. * Will later be shown as the element name in the StreamPipes UI. * @param description * ...
3.26
streampipes_DataStreamBuilder_create_rdh
/** * Creates a new data stream using the builder pattern. * * @param id * A unique identifier of the new element, e.g., com.mycompany.stream.mynewdatastream * @return a new instance of {@link DataStreamBuilder} */ public static DataStreamBuilder create(String id) { return new DataStreamBuilder(id); }
3.26
streampipes_DataStreamBuilder_properties_rdh
/** * Assigns a list of new event properties to the stream's schema. * * @param properties * The event properties that should be added. * @return this */ public DataStreamBuilder properties(List<EventProperty> properties) { this.f0.addAll(properties); return me(); }
3.26
streampipes_DataStreamBuilder_format_rdh
/** * Assigns a new {@link org.apache.streampipes.model.grounding.TransportFormat} to the stream definition. * * @param format * The transport format of the stream at runtime (e.g., JSON or Thrift). * Use {@link org.apache.streampipes.sdk.helpers.Formats} to use some pre-defined formats * (or create a new f...
3.26
streampipes_DataStreamBuilder_property_rdh
/** * Assigns a new event property to the stream's schema. * * @param property * The event property that should be added. * Use {@link org.apache.streampipes.sdk.helpers.EpProperties} * for defining simple property definitions or * {@link org.apache.streampipes.sdk.builder.PrimitivePropertyBuilder} * ...
3.26
streampipes_DataStreamBuilder_protocol_rdh
/** * Assigns a new {@link org.apache.streampipes.model.grounding.TransportProtocol} to the stream definition. * * @param protocol * The transport protocol of the stream at runtime (e.g., Kafka or MQTT). * Use {@link org.apache.streampipes.sdk.helpers.Protocols} to use some pre-defined protocols * (or creat...
3.26
streampipes_DataStreamBuilder_m0_rdh
/** * Creates a new data stream using the builder pattern. * * @param id * A unique identifier of the new element, e.g., com.mycompany.stream.mynewdatastream * @param label * A human-readable name of the element. * Will later be shown as the element name in the StreamPipes UI. * @param description * A ...
3.26
streampipes_ProcessingElementBuilder_outputStrategy_rdh
/** * Assigns an output strategy to the element which defines the output the data processor produces. * * @param outputStrategy * An {@link org.apache.streampipes.model.output.OutputStrategy}. Use * {@link org.apache.streampipes.sdk.helpers.OutputStrategies} to assign the strategy. * @return {@link Processing...
3.26
streampipes_ProcessingElementBuilder_create_rdh
/** * Creates a new processing element using the builder pattern. If no label and description is * given * for an element, * {@link org.apache.streampipes.sdk.builder.AbstractProcessingElementBuilder#withLocales(Locales...)} * must be called. * * @param id * A unique identifier of the new element, e.g., com.m...
3.26
streampipes_ProcessingElementBuilder_category_rdh
/** * Assigns a category to the element which later serves to categorize data processors in the UI. * * @param epaCategory * The {@link org.apache.streampipes.model.DataProcessorType} of the element. * @return {@link ProcessingElementBuilder} */ public ProcessingElementBuilder category(DataProcessorType... epaC...
3.26
streampipes_KDTree_createKDTree_rdh
// Only ever goes to log2(items.length) depth so lack of tail recursion is a non-issue private KDNode<T> createKDTree(List<T> items, int depth) { if (items.isEmpty()) { return null; } Collections.sort(items, items.get(0).getComparator(depth % 3)); int currentIndex = items.si...
3.26
streampipes_JdbcClient_save_rdh
/** * Prepares a statement for the insertion of values or the * * @param event * The event which should be saved to the Postgres table * @throws SpRuntimeException * When there was an error in the saving process */ protected void save(final Event event) throws SpRuntimeException { // TODO: Add batch su...
3.26
streampipes_JdbcClient_connectWithSSL_rdh
/** * WIP * * @param host * @param port * @param databaseName * @throws SpRuntimeException */ private void connectWithSSL(String host, int port, String databaseName) throws SpRuntimeException { String url = ((((((((((((("jdbc:" + this.dbDescription.getEngine().getUrlName()) + "://") + host) + ":") + port) ...
3.26
streampipes_JdbcClient_closeAll_rdh
/** * Closes all open connections and statements of JDBC */ protected void closeAll() { boolean error = false; try { if (this.statementHandler.statement != null) {this.statementHandler.statement.close();this.statementHandler.statement = null; } } catch (SQLException e) { error ...
3.26
streampipes_JdbcClient_ensureDatabaseExists_rdh
/** * If this method returns successfully a database with the given name exists on the server, specified by the url. * * @param databaseName * The name of the database that should exist * @throws SpRuntimeException * If the database does not exists and could not be created */ protected void ensureDatabaseExi...
3.26
streampipes_JdbcClient_ensureTableExists_rdh
/** * If this method returns successfully a table with the name in * {@link JdbcConnectionParameters#getDbTable()} exists in the database * with the given database name exists on the server, specified by the url. * * @param url * The JDBC url containing the needed information (e.g. "jdbc:iotdb://127.0.0.1:6667/...
3.26
streampipes_JdbcClient_connect_rdh
/** * Connects to the SQL database and initializes {@link JdbcClient#connection} * * @throws SpRuntimeException * When the connection could not be established (because of a * wrong identification, missing database etc.) */ private void connect(String host, int port, String databaseName) throws SpRuntimeExc...
3.26
streampipes_DataSinkBuilder_create_rdh
/** * Creates a new data sink using the builder pattern. If no label and description is given * for an element, * {@link org.apache.streampipes.sdk.builder.AbstractProcessingElementBuilder#withLocales(Locales...)} * must be called. * * @param id * A unique identifier of the new element, e.g., com.mycompany.sin...
3.26
streampipes_MD5_m0_rdh
/** * Encodes a string * * @param str * String to encode * @return Encoded String */ public static String m0(String str) { if ((str == null) || (str.length() == 0)) { throw new IllegalArgumentException("String to encrypt cannot be null or zero length"); } StringBuilder hexString = new String...
3.26
streampipes_RuntimeTypeAdapterFactory_registerSubtype_rdh
/** * Registers {@code type} identified by its {@link Class#getSimpleName simple * name}. Labels are case sensitive. * * @throws IllegalArgumentException * if either {@code type} or its simple name * have already been registered on this type adapter. */ public RuntimeTypeAdapterFactory<T> registerSubtype(Cla...
3.26
streampipes_RuntimeTypeAdapterFactory_of_rdh
/** * Creates a new runtime type adapter for {@code baseType} using {@code "type"} as * the type field name. */ public static <T> RuntimeTypeAdapterFactory<T> of(Class<T> baseType) { return new RuntimeTypeAdapterFactory<>(baseType, "type"); }
3.26
streampipes_Aggregation_process_rdh
// Gets called every time a new event is fired, i.e. when an aggregation has to be calculated protected void process(Iterable<Event> input, Collector<Event> out) { List<Double> values = new ArrayList<>(); Event lastEvent = new Event(); // Adds the values of all recent events in input to aggregate them later // Dumps t...
3.26
streampipes_NumWordsRulesClassifier_m0_rdh
/** * Returns the singleton instance for RulebasedBoilerpipeClassifier. */ public static NumWordsRulesClassifier m0() { return INSTANCE; }
3.26
streampipes_SpTrajectoryBuilder_removeOldestPoint_rdh
/** * removes the oldest point (Index 0) from the CoordinateList object. */ private void removeOldestPoint() { coordinateList.remove(0); }
3.26
streampipes_SpTrajectoryBuilder_getDescription_rdh
/** * getter method for description text * * @return description text */ public String getDescription() { return description; }
3.26
streampipes_SpTrajectoryBuilder_createSingleTrajectoryCoordinate_rdh
/** * Creates a Coordinate object with X, Y and M Value to be stored later directly in the trajectory * object. Should be used always used if adding a subpoint to the trajectory list * * @param geom * Point geometry, which coordinates will be added to the trajectory list * @param m * Double M value, which wi...
3.26
streampipes_SpTrajectoryBuilder_returnAsLineString_rdh
/** * returns a JTS LineString geometry from the trajectory object. LineString only stores the point * geometry without M value. The lineString is oriented to the trajectory direction. This means: the * newest point is always the last point and has the highest subpoint index. The First point is the * oldest point w...
3.26
streampipes_SpTrajectoryBuilder_addPointToTrajectory_rdh
/** * Adds a Point to the trajectory object and also handle removes old point * if {link #numberSubPoints} threshold is exceeded. * * @param point * {@link org.locationtech.jts.geom.Point} * @param m * stores an extra double value to the subpoint of a * trajectory {@link org.locationtech.jts.geom.Coordina...
3.26
streampipes_StreamRequirementsBuilder_create_rdh
/** * Creates new requirements for a data processor or a data sink. * * @return {@link StreamRequirementsBuilder} */ public static StreamRequirementsBuilder create() { return new StreamRequirementsBuilder();}
3.26
streampipes_StreamRequirementsBuilder_requiredPropertyWithNaryMapping_rdh
/** * Sets a new property requirement and, in addition, adds a * {@link org.apache.streampipes.model.staticproperty.MappingPropertyNary} static property to the pipeline element * definition. * * @param propertyRequirement * The property requirement. * Use {@link org.apache.streampipes.sdk.helpers.EpRequireme...
3.26
streampipes_StreamRequirementsBuilder_requiredPropertyWithUnaryMapping_rdh
/** * Sets a new property requirement and, in addition, adds a * {@link org.apache.streampipes.model.staticproperty.MappingPropertyUnary} static property to the pipeline element * definition. * * @param propertyRequirement * The property requirement. * Use {@link org.apache.streampipes.sdk.helpers.EpRequirem...
3.26
streampipes_StreamRequirementsBuilder_any_rdh
/** * Creates a new stream requirement without any further property requirements. * * @return {@link CollectedStreamRequirements} */ public static CollectedStreamRequirements any() { return StreamRequirementsBuilder.create().build(); }
3.26
streampipes_StreamRequirementsBuilder_requiredProperty_rdh
/** * Sets a new property requirement, e.g., a property of a specific data type or with specific semantics * a data stream that is connected to this pipeline element must provide. * * @param propertyRequirement * The property requirement. * Use {@link org.apache.streampipes.sdk.helpers.EpRequirements} to * ...
3.26
streampipes_TableDescription_createTable_rdh
/** * Creates a table with the name {@link JdbcConnectionParameters#getDbTable()} and the * properties from {@link TableDescription#getEventSchema()}. Calls * {@link SQLStatementUtils#extractEventProperties(List, String, DbDescription)} internally with the * {@link TableDescription#getEventSchema()} to extract all ...
3.26
streampipes_IgnoreBlocksAfterContentFilter_getDefaultInstance_rdh
/** * Returns the singleton instance for DeleteBlocksAfterContentFilter. */ public static IgnoreBlocksAfterContentFilter getDefaultInstance() { return DEFAULT_INSTANCE; }
3.26
streampipes_Networking_getIpAddressForOsx_rdh
/** * this method is a workaround for developers using osx * in OSX InetAddress.getLocalHost().getHostAddress() always returns 127.0.0.1 * as a workaround developers must manually set the SP_HOST environment variable with the actual ip * with this method the IP is set automatically * * @return IP */ private stat...
3.26
streampipes_SimpleEstimator_isLowQuality_rdh
/** * Given the statistics of the document before and after applying the {@link BoilerpipeExtractor}, * can we regard the extraction quality (too) low? * * Works well with {@link DefaultExtractor}, {@link ArticleExtractor} and others. * * @param dsBefore * @param dsAfter * @return true if low quality is to be e...
3.26
streampipes_DataLakeMeasure_getTimestampFieldName_rdh
/** * This can be used to get the name of the timestamp property without the stream prefix * * @return the name of the timestamp property */ @TsIgnore @JsonIgnore public String getTimestampFieldName() { return timestampField.split(STREAM_PREFIX_DELIMITER)[1]; }
3.26
streampipes_PrimitivePropertyBuilder_create_rdh
/** * A builder class helping to define advanced primitive properties. For simple property definitions, you can also * use {@link org.apache.streampipes.sdk.helpers.EpProperties}. * * @param datatype * The primitive {@link org.apache.streampipes.sdk.utils.Datatypes} definition of the new property. * @param runt...
3.26
streampipes_PrimitivePropertyBuilder_label_rdh
/** * Assigns a human-readable label to the event property. The label is used in the StreamPipes UI for better * explaining users the meaning of the property. * * @param label * @return this */ public PrimitivePropertyBuilder label(String label) {this.eventProperty.setLabel(label); return this; }
3.26
streampipes_PrimitivePropertyBuilder_description_rdh
/** * Assigns a human-readable description to the event property. The description is used in the StreamPipes UI for * better explaining users the meaning of the property. * * @param description * @return this */ public PrimitivePropertyBuilder description(String description) { this.eventProperty.setDescriptio...
3.26
streampipes_PrimitivePropertyBuilder_valueSpecification_rdh
/** * Defines the value range in form of an enumeration. The data type of the event property must be of type String * or Number. * * @param label * A human-readable label describing this enumeration. * @param description * A human-readable description of the enumeration. * @param allowedValues * A list o...
3.26
streampipes_PrimitivePropertyBuilder_scope_rdh
/** * Assigns a property scope to the event property. * * @param propertyScope * The {@link org.apache.streampipes.model.schema.PropertyScope}. * @return this */ public PrimitivePropertyBuilder scope(PropertyScope propertyScope) { this.eventProperty.setPropertyScope(propertyScope.name()); return this; }
3.26
streampipes_PrimitivePropertyBuilder_domainProperty_rdh
/** * Specifies the semantics of the property (e.g., whether a double value stands for a latitude coordinate). * * @param domainProperty * The domain property as a String. The domain property should reflect an URI. Use some * existing vocabulary from {@link org.apache.streampipes.vocabulary} or create your own...
3.26
streampipes_FileManager_cleanFile_rdh
/** * Remove Byte Order Mark (BOM) from csv files * * @param fileInputStream * @param filetype * @return */ public static InputStream cleanFile(InputStream fileInputStream, String filetype) { if (Filetypes.CSV.getFileExtensions().contains(filetype.toLowerCase())) { fileInputStream = new BOMInputStream...
3.26
streampipes_FileManager_storeFile_rdh
/** * Store a file in the internal file storage. * For csv files the bom is removed * * @param user * who created the file * @param filename * @param fileInputStream * content of file * @return */ public static FileMetadata storeFile(String user, String filename, InputStream fileInputStream) throws IOExce...
3.26
streampipes_SplitParagraphBlocksFilter_getInstance_rdh
/** * Returns the singleton instance for TerminatingBlocksFinder. */ public static SplitParagraphBlocksFilter getInstance() { return INSTANCE; }
3.26
streampipes_RosBridgeAdapter_getListOfAllTopics_rdh
// Ignore for now, but is interesting for future implementations private List<String> getListOfAllTopics(Ros ros) { List<String> result = new ArrayList<>(); Service service = new Service(ros, "/rosapi/topics", "rosapi/Topics"); ServiceRequest request = new ServiceRequest(); ServiceResponse response...
3.26
streampipes_NetioRestAdapter_pullData_rdh
/** * pullData is called iteratively according to the polling interval defined in getPollInterval. */ @Override public void pullData() { try { NetioAllPowerOutputs allPowerOutputs = requestData(); for (NetioPowerOutput output : allPowerOutputs.getPowerOutputs()) { Map<String, Obje...
3.26
streampipes_NetioRestAdapter_applyConfiguration_rdh
/** * Extracts the user configuration from the SpecificAdapterStreamDescription and sets the local variales * * @param extractor * StaticPropertyExtractor */ private void applyConfiguration(IParameterExtractor extractor) { this.ip = extractor.singleValueParameter(NETIO_IP, String.class); this.username = ...
3.26