Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Working on updating and building.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Mar 21, 2024
1 parent 1ccc145 commit d8b59d1
Show file tree
Hide file tree
Showing 85 changed files with 1,092 additions and 638 deletions.
2 changes: 1 addition & 1 deletion docs/Users-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Note that if you are running Idyl E3 on AWS the rule can retrieve your SES crede
Drools implementation:

```
import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import com.mtnfog.entity.EntityExtractionAttributes;
import com.mtnfog.idyl.sdk.rulesengine.drools.model.EntitiesHolder;
import com.mtnfog.idyl.e3.rules.Ses;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.api.exceptions.BadRequestException;
import ai.philterd.entitydb.api.exceptions.InternalServerErrorException;
import ai.philterd.entitydb.api.exceptions.NotFoundException;
Expand Down
2 changes: 1 addition & 1 deletion entitydb-app/files/rules/text-match.drl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import com.mtnfog.entitydb.eql.filters.EqlFilters;

// This is a sample rule that uses an EQL query as a condition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import com.datastax.driver.core.Statement;
import com.datastax.driver.core.querybuilder.QueryBuilder;
import com.datastax.driver.core.querybuilder.Select;
import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.entitystore.cassandra.model.CassandraStoredEntity;
import com.mtnfog.entitydb.eql.model.EntityMetadataFilter;
import com.mtnfog.entitydb.eql.model.EntityQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import java.util.Map;

import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.model.entitystore.AbstractStoredEntity;
import ai.philterd.entitydb.model.entitystore.MetadataSanitizer;
import ai.philterd.entitydb.model.entitystore.EntityIdGenerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import com.amazonaws.services.dynamodbv2.model.ComparisonOperator;
import com.amazonaws.services.dynamodbv2.model.Condition;
import com.amazonaws.services.dynamodbv2.model.DescribeTableResult;
import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.entitystore.dynamodb.model.DynamoDBEndpoint;
import ai.philterd.entitydb.entitystore.dynamodb.model.DynamoDBStoredEntity;
import com.mtnfog.entitydb.eql.model.EntityMetadataFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBHashKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable;
import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.entitystore.dynamodb.DynamoDBEntityStore;
import ai.philterd.entitydb.model.entitystore.AbstractStoredEntity;
import ai.philterd.entitydb.model.entitystore.EntityIdGenerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
import com.mongodb.client.model.UpdateOptions;
import com.mongodb.client.result.DeleteResult;
import com.mongodb.client.result.UpdateResult;
import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.entitystore.mongodb.model.MongoDBStoredEntity;
import ai.philterd.entitydb.entitystore.mongodb.model.MongoDBStoredEntityCodec;
import com.mtnfog.entitydb.eql.model.EntityMetadataFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.bson.codecs.configuration.CodecRegistry;
import org.bson.conversions.Bson;

import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.model.entitystore.AbstractStoredEntity;
import ai.philterd.entitydb.model.entitystore.EntityIdGenerator;
import ai.philterd.entitydb.model.entitystore.MetadataSanitizer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;

import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.entitystore.rdbms.model.RdbmsStoredEntity;
import ai.philterd.entitydb.entitystore.rdbms.model.RdbmsStoredEntityMetadata;
import ai.philterd.entitydb.entitystore.rdbms.util.HibernateUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.model.entitystore.AbstractStoredEntity;
import ai.philterd.entitydb.model.entitystore.EntityIdGenerator;
import ai.philterd.entitydb.model.entitystore.EntityStore;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Test;

import com.mtnfog.entity.Entity;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.entitystore.rdbms.RdbmsEntityStore;
import ai.philterd.entitydb.entitystore.rdbms.model.RdbmsStoredEntity;
import ai.philterd.entitydb.model.entitystore.EntityStore;
Expand Down
4 changes: 2 additions & 2 deletions entitydb-eql/eql-language/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<artifactId>antlr4-maven-plugin</artifactId>
<version>${antlr.version}</version>
<configuration>
<outputDirectory>${basedir}/src/main/java/ai/idylnlp/eql/antlr</outputDirectory>
<outputDirectory>${basedir}/src/main/java/ai/philterd/entitydb/eql/antlr</outputDirectory>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -59,7 +59,7 @@
<dependencies>
<dependency>
<groupId>ai.philterd.entitydb</groupId>
<artifactId>idylnlp-model</artifactId>
<artifactId>entitydb-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,6 @@
* specific language governing permissions and limitations
* under the License.
*/

/*******************************************************************************
* Copyright 2019 Mountain Fog, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
******************************************************************************/
/*
* (C) Copyright 2017 Mountain Fog, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.philterd.entitydb.eql;

import java.io.ByteArrayInputStream;
Expand All @@ -73,12 +42,11 @@
import ai.philterd.entitydb.eql.antlr.EqlParser;
import ai.philterd.entitydb.eql.antlr.EqlParser.ConditionContext;
import ai.philterd.entitydb.eql.antlr.EqlParser.OptionContext;
import ai.philterd.entitydb.eql.exceptions.QueryGenerationException;
import ai.philterd.entitydb.eql.model.ConfidenceRange;
import ai.philterd.entitydb.eql.model.EntityMetadataFilter;
import ai.philterd.entitydb.eql.model.EntityOrder;
import ai.philterd.entitydb.eql.model.EntityQuery;
import ai.philterd.entitydb.eql.model.SortOrder;
import ai.philterd.entitydb.model.eql.ConfidenceRange;
import ai.philterd.entitydb.model.eql.EntityMetadataFilter;
import ai.philterd.entitydb.model.eql.EntityOrder;
import ai.philterd.entitydb.model.eql.EntityQuery;
import ai.philterd.entitydb.model.eql.SortOrder;

/**
* Entity Query Language (EQL) for querying entity stores.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
token literal names:
null
';'
'select * from entities'
'select * from entities where'
'and'
'='
'>'
'<'
'>='
'<='
'between'
'!='
'order by'
'metadata'
'confidence'
null
null
null
null
null
null

token symbolic names:
null
null
null
null
null
null
null
null
null
null
null
null
null
METADATA_FIELD
NUMERIC_FIELD
OPTION_FIELD
STRING_FIELD
SORT_ORDER_FIELD
INTEGERS
STRING
WS

rule names:
command
select
condition
option
sort


atn:
[4, 1, 20, 116, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 1, 0, 1, 0, 3, 0, 13, 8, 0, 1, 0, 3, 0, 16, 8, 0, 1, 1, 1, 1, 1, 1, 5, 1, 21, 8, 1, 10, 1, 12, 1, 24, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 31, 8, 1, 10, 1, 12, 1, 34, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 41, 8, 1, 10, 1, 12, 1, 44, 9, 1, 1, 1, 5, 1, 47, 8, 1, 10, 1, 12, 1, 50, 9, 1, 3, 1, 52, 8, 1, 1, 2, 1, 2, 1, 2, 3, 2, 57, 8, 2, 1, 2, 1, 2, 3, 2, 61, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 77, 8, 2, 1, 2, 1, 2, 3, 2, 81, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2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 43, 1, 0, 0, 0, 43, 48, 1, 0, 0, 0, 44, 42, 1, 0, 0, 0, 45, 47, 3, 6, 3, 0, 46, 45, 1, 0, 0, 0, 47, 50, 1, 0, 0, 0, 48, 46, 1, 0, 0, 0, 48, 49, 1, 0, 0, 0, 49, 52, 1, 0, 0, 0, 50, 48, 1, 0, 0, 0, 51, 17, 1, 0, 0, 0, 51, 18, 1, 0, 0, 0, 51, 25, 1, 0, 0, 0, 51, 35, 1, 0, 0, 0, 52, 3, 1, 0, 0, 0, 53, 54, 5, 20, 0, 0, 54, 56, 5, 14, 0, 0, 55, 57, 5, 20, 0, 0, 56, 55, 1, 0, 0, 0, 56, 57, 1, 0, 0, 0, 57, 58, 1, 0, 0, 0, 58, 60, 7, 0, 0, 0, 59, 61, 5, 20, 0, 0, 60, 59, 1, 0, 0, 0, 60, 61, 1, 0, 0, 0, 61, 62, 1, 0, 0, 0, 62, 96, 5, 18, 0, 0, 63, 64, 5, 20, 0, 0, 64, 65, 5, 14, 0, 0, 65, 66, 5, 20, 0, 0, 66, 67, 5, 10, 0, 0, 67, 68, 5, 20, 0, 0, 68, 69, 5, 18, 0, 0, 69, 70, 5, 20, 0, 0, 70, 71, 5, 4, 0, 0, 71, 72, 5, 20, 0, 0, 72, 96, 5, 18, 0, 0, 73, 74, 5, 20, 0, 0, 74, 76, 5, 16, 0, 0, 75, 77, 5, 20, 0, 0, 76, 75, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 78, 1, 0, 0, 0, 78, 80, 7, 1, 0, 0, 79, 81, 5, 20, 0, 0, 80, 79, 1, 0, 0, 0, 80, 81, 1, 0, 0, 0, 81, 82, 1, 0, 0, 0, 82, 96, 5, 19, 0, 0, 83, 84, 5, 20, 0, 0, 84, 85, 5, 13, 0, 0, 85, 86, 5, 20, 0, 0, 86, 88, 5, 19, 0, 0, 87, 89, 5, 20, 0, 0, 88, 87, 1, 0, 0, 0, 88, 89, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 92, 5, 5, 0, 0, 91, 93, 5, 20, 0, 0, 92, 91, 1, 0, 0, 0, 92, 93, 1, 0, 0, 0, 93, 94, 1, 0, 0, 0, 94, 96, 5, 19, 0, 0, 95, 53, 1, 0, 0, 0, 95, 63, 1, 0, 0, 0, 95, 73, 1, 0, 0, 0, 95, 83, 1, 0, 0, 0, 96, 5, 1, 0, 0, 0, 97, 98, 5, 20, 0, 0, 98, 99, 5, 15, 0, 0, 99, 100, 5, 20, 0, 0, 100, 106, 5, 18, 0, 0, 101, 102, 5, 20, 0, 0, 102, 103, 5, 15, 0, 0, 103, 104, 5, 20, 0, 0, 104, 106, 5, 18, 0, 0, 105, 97, 1, 0, 0, 0, 105, 101, 1, 0, 0, 0, 106, 7, 1, 0, 0, 0, 107, 108, 5, 20, 0, 0, 108, 109, 5, 12, 0, 0, 109, 110, 5, 20, 0, 0, 110, 113, 7, 2, 0, 0, 111, 112, 5, 20, 0, 0, 112, 114, 5, 17, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 9, 1, 0, 0, 0, 16, 12, 15, 22, 32, 42, 48, 51, 56, 60, 76, 80, 88, 92, 95, 105, 113]
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
T__9=3
T__8=4
T__7=5
T__6=6
T__5=7
T__4=8
SORT_ORDER_FIELD=17
STRING_FIELD=16
T__0=1
T__1=2
T__2=3
T__3=4
T__4=5
T__5=6
T__6=7
T__7=8
T__8=9
T__9=10
T__10=11
T__11=12
METADATA_FIELD=13
NUMERIC_FIELD=14
OPTION_FIELD=15
STRING_FIELD=16
SORT_ORDER_FIELD=17
INTEGERS=18
T__11=1
T__3=9
T__2=10
STRING=19
T__1=11
T__0=12
WS=20
T__10=2
METADATA_FIELD=13
';'=1
'select * from entities'=2
'select * from entities where'=3
'and'=4
'='=5
'>'=6
'<'=7
'>='=8
'<='=9
'between'=10
'!='=11
'order by'=12
'metadata'=13
'and'=6
'between'=5
'<='=1
'>'=11
'select * from entities where'=12
'='=10
'<'=9
'>='=7
';'=8
'order by'=3
'!='=4
'confidence'=14
'select * from entities'=2
Loading

0 comments on commit d8b59d1

Please sign in to comment.