-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from nimble-platform/staging
Pull Request for Release MVP 19.0.2 / FMP 13.0.2
- Loading branch information
Showing
3 changed files
with
1,168 additions
and
1,146 deletions.
There are no files selected for viewing
357 changes: 181 additions & 176 deletions
357
src/main/java/eu/nimble/indexing/repository/PropertyRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,176 +1,181 @@ | ||
package eu.nimble.indexing.repository; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import org.springframework.data.solr.repository.Query; | ||
import org.springframework.data.solr.repository.SolrCrudRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import eu.nimble.service.model.solr.owl.IPropertyType; | ||
import eu.nimble.service.model.solr.owl.PropertyType; | ||
|
||
@Repository | ||
public interface PropertyRepository extends SolrCrudRepository<PropertyType, String>{ | ||
/** | ||
* Obtain a single property by it's uri | ||
* @param uri | ||
* @return | ||
*/ | ||
List<PropertyType> findByUri(String uri); | ||
/** | ||
* Retrieve all properties for a distinct product | ||
* @param product The product's uri | ||
* @return | ||
*/ | ||
@Query(fields={ | ||
IPropertyType.TYPE_FIELD, | ||
IPropertyType.IS_FACET_FIELD, | ||
IPropertyType.BOOST_FIELD, | ||
IPropertyType.IDX_FIELD_NAME_FIELD, | ||
IPropertyType.PROPERTY_TYPE_FIELD, | ||
IPropertyType.LABEL_FIELD, | ||
IPropertyType.ALTERNATE_LABEL_FIELD, | ||
IPropertyType.HIDDEN_LABEL_FIELD, | ||
IPropertyType.LANGUAGES_FIELD, | ||
IPropertyType.LANGUAGE_TXT_FIELD, | ||
IPropertyType.LOCAL_NAME_FIELD, | ||
IPropertyType.NAME_SPACE_FIELD, | ||
IPropertyType.ID_FIELD, | ||
IPropertyType.COMMENT_FIELD, | ||
IPropertyType.DESCRIPTION_FIELD, | ||
IPropertyType.RANGE_FIELD, | ||
IPropertyType.VALUE_QUALIFIER_FIELD, | ||
IPropertyType.IS_VISIBLE_FIELD, | ||
IPropertyType.CODE_LIST_FIELD, | ||
IPropertyType.CODE_LIST_ID_FIELD | ||
}) | ||
List<PropertyType> findByProduct(String product); | ||
/** | ||
* Find all properties assigned to one of the provided products | ||
* @param products | ||
* @return | ||
*/ | ||
@Query(fields={ | ||
IPropertyType.TYPE_FIELD, | ||
IPropertyType.IS_FACET_FIELD, | ||
IPropertyType.BOOST_FIELD, | ||
IPropertyType.IDX_FIELD_NAME_FIELD, | ||
IPropertyType.PROPERTY_TYPE_FIELD, | ||
IPropertyType.LABEL_FIELD, | ||
IPropertyType.ALTERNATE_LABEL_FIELD, | ||
IPropertyType.HIDDEN_LABEL_FIELD, | ||
IPropertyType.LANGUAGES_FIELD, | ||
IPropertyType.LANGUAGE_TXT_FIELD, | ||
IPropertyType.LOCAL_NAME_FIELD, | ||
IPropertyType.NAME_SPACE_FIELD, | ||
IPropertyType.ID_FIELD, | ||
IPropertyType.COMMENT_FIELD, | ||
IPropertyType.DESCRIPTION_FIELD, | ||
IPropertyType.RANGE_FIELD, | ||
IPropertyType.VALUE_QUALIFIER_FIELD, | ||
IPropertyType.IS_VISIBLE_FIELD, | ||
IPropertyType.CODE_LIST_FIELD, | ||
IPropertyType.CODE_LIST_ID_FIELD | ||
}) | ||
List<PropertyType> findByProductIn(Set<String> products); | ||
/** | ||
* | ||
* @param namespace | ||
* @param localNames | ||
* @return | ||
*/ | ||
@Query(fields={ | ||
IPropertyType.TYPE_FIELD, | ||
IPropertyType.IS_FACET_FIELD, | ||
IPropertyType.BOOST_FIELD, | ||
IPropertyType.IDX_FIELD_NAME_FIELD, | ||
IPropertyType.PROPERTY_TYPE_FIELD, | ||
IPropertyType.LABEL_FIELD, | ||
IPropertyType.ALTERNATE_LABEL_FIELD, | ||
IPropertyType.HIDDEN_LABEL_FIELD, | ||
IPropertyType.LANGUAGES_FIELD, | ||
IPropertyType.LANGUAGE_TXT_FIELD, | ||
IPropertyType.LOCAL_NAME_FIELD, | ||
IPropertyType.NAME_SPACE_FIELD, | ||
IPropertyType.ID_FIELD, | ||
IPropertyType.COMMENT_FIELD, | ||
IPropertyType.DESCRIPTION_FIELD, | ||
IPropertyType.RANGE_FIELD, | ||
IPropertyType.VALUE_QUALIFIER_FIELD, | ||
IPropertyType.IS_VISIBLE_FIELD, | ||
IPropertyType.CODE_LIST_FIELD, | ||
IPropertyType.CODE_LIST_ID_FIELD | ||
}) | ||
List<PropertyType> findByNameSpaceAndLocalNameIn(String namespace, Set<String> localNames); | ||
/** | ||
* Retrieve multiple properties by their uri | ||
* @param uri list of URI's to resolve | ||
* @return | ||
*/ | ||
@Query(fields={ | ||
IPropertyType.TYPE_FIELD, | ||
IPropertyType.IS_FACET_FIELD, | ||
IPropertyType.BOOST_FIELD, | ||
IPropertyType.IDX_FIELD_NAME_FIELD, | ||
IPropertyType.PROPERTY_TYPE_FIELD, | ||
IPropertyType.LABEL_FIELD, | ||
IPropertyType.ALTERNATE_LABEL_FIELD, | ||
IPropertyType.HIDDEN_LABEL_FIELD, | ||
IPropertyType.LANGUAGES_FIELD, | ||
IPropertyType.LANGUAGE_TXT_FIELD, | ||
IPropertyType.LOCAL_NAME_FIELD, | ||
IPropertyType.NAME_SPACE_FIELD, | ||
IPropertyType.ID_FIELD, | ||
IPropertyType.COMMENT_FIELD, | ||
IPropertyType.DESCRIPTION_FIELD, | ||
IPropertyType.RANGE_FIELD, | ||
IPropertyType.VALUE_QUALIFIER_FIELD, | ||
IPropertyType.IS_VISIBLE_FIELD, | ||
IPropertyType.CODE_LIST_FIELD, | ||
IPropertyType.CODE_LIST_ID_FIELD | ||
}) | ||
List<PropertyType> findByUriIn(Set<String> uri); | ||
/** | ||
* Retrieve multiple properties by the index field name they serve as a label | ||
* @param itemFieldNames | ||
* @return | ||
*/ | ||
List<PropertyType> findByItemFieldNamesIn(Set<String> itemFieldNames); | ||
/** | ||
* Retrieve multiple fields by their local name OR the index field name | ||
* @param names | ||
* @return | ||
*/ | ||
@Query(fields={ | ||
IPropertyType.TYPE_FIELD, | ||
IPropertyType.IS_FACET_FIELD, | ||
IPropertyType.BOOST_FIELD, | ||
IPropertyType.USED_WITH_FIELD, | ||
IPropertyType.IDX_FIELD_NAME_FIELD, | ||
IPropertyType.PROPERTY_TYPE_FIELD, | ||
IPropertyType.LABEL_FIELD, | ||
IPropertyType.ALTERNATE_LABEL_FIELD, | ||
IPropertyType.HIDDEN_LABEL_FIELD, | ||
IPropertyType.LANGUAGES_FIELD, | ||
IPropertyType.LANGUAGE_TXT_FIELD, | ||
IPropertyType.LOCAL_NAME_FIELD, | ||
IPropertyType.NAME_SPACE_FIELD, | ||
IPropertyType.ID_FIELD, | ||
IPropertyType.COMMENT_FIELD, | ||
IPropertyType.DESCRIPTION_FIELD, | ||
IPropertyType.RANGE_FIELD, | ||
IPropertyType.VALUE_QUALIFIER_FIELD, | ||
IPropertyType.IS_VISIBLE_FIELD, | ||
IPropertyType.CODE_LIST_FIELD, | ||
IPropertyType.CODE_LIST_ID_FIELD | ||
}) | ||
List<PropertyType> findByLocalNameOrItemFieldNamesIn(Set<String> names); | ||
/** | ||
* Remove all properties of the provided namespace | ||
* @param namespace | ||
* @return | ||
*/ | ||
long deleteByNameSpace(String namespace); | ||
|
||
} | ||
package eu.nimble.indexing.repository; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import org.springframework.data.solr.repository.Query; | ||
import org.springframework.data.solr.repository.SolrCrudRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import eu.nimble.service.model.solr.owl.IPropertyType; | ||
import eu.nimble.service.model.solr.owl.PropertyType; | ||
|
||
@Repository | ||
public interface PropertyRepository extends SolrCrudRepository<PropertyType, String>{ | ||
/** | ||
* Obtain a single property by it's uri | ||
* @param uri | ||
* @return | ||
*/ | ||
List<PropertyType> findByUri(String uri); | ||
/** | ||
* Retrieve all properties for a distinct product | ||
* @param product The product's uri | ||
* @return | ||
*/ | ||
@Query(fields={ | ||
IPropertyType.TYPE_FIELD, | ||
IPropertyType.IS_FACET_FIELD, | ||
IPropertyType.BOOST_FIELD, | ||
IPropertyType.IDX_FIELD_NAME_FIELD, | ||
IPropertyType.PROPERTY_TYPE_FIELD, | ||
IPropertyType.LABEL_FIELD, | ||
IPropertyType.ALTERNATE_LABEL_FIELD, | ||
IPropertyType.HIDDEN_LABEL_FIELD, | ||
IPropertyType.LANGUAGES_FIELD, | ||
IPropertyType.LANGUAGE_TXT_FIELD, | ||
IPropertyType.LOCAL_NAME_FIELD, | ||
IPropertyType.NAME_SPACE_FIELD, | ||
IPropertyType.ID_FIELD, | ||
IPropertyType.COMMENT_FIELD, | ||
IPropertyType.DESCRIPTION_FIELD, | ||
IPropertyType.RANGE_FIELD, | ||
IPropertyType.VALUE_QUALIFIER_FIELD, | ||
IPropertyType.IS_VISIBLE_FIELD, | ||
IPropertyType.IS_REQUIRED_FIELD, | ||
IPropertyType.CODE_LIST_FIELD, | ||
IPropertyType.CODE_LIST_ID_FIELD | ||
}) | ||
List<PropertyType> findByProduct(String product); | ||
/** | ||
* Find all properties assigned to one of the provided products | ||
* @param products | ||
* @return | ||
*/ | ||
@Query(fields={ | ||
IPropertyType.TYPE_FIELD, | ||
IPropertyType.IS_FACET_FIELD, | ||
IPropertyType.BOOST_FIELD, | ||
IPropertyType.IDX_FIELD_NAME_FIELD, | ||
IPropertyType.PROPERTY_TYPE_FIELD, | ||
IPropertyType.LABEL_FIELD, | ||
IPropertyType.ALTERNATE_LABEL_FIELD, | ||
IPropertyType.HIDDEN_LABEL_FIELD, | ||
IPropertyType.LANGUAGES_FIELD, | ||
IPropertyType.LANGUAGE_TXT_FIELD, | ||
IPropertyType.LOCAL_NAME_FIELD, | ||
IPropertyType.NAME_SPACE_FIELD, | ||
IPropertyType.ID_FIELD, | ||
IPropertyType.COMMENT_FIELD, | ||
IPropertyType.DESCRIPTION_FIELD, | ||
IPropertyType.RANGE_FIELD, | ||
IPropertyType.VALUE_QUALIFIER_FIELD, | ||
IPropertyType.IS_VISIBLE_FIELD, | ||
IPropertyType.IS_REQUIRED_FIELD, | ||
IPropertyType.CODE_LIST_FIELD, | ||
IPropertyType.CODE_LIST_ID_FIELD | ||
}) | ||
List<PropertyType> findByProductIn(Set<String> products); | ||
/** | ||
* | ||
* @param namespace | ||
* @param localNames | ||
* @return | ||
*/ | ||
@Query(fields={ | ||
IPropertyType.TYPE_FIELD, | ||
IPropertyType.IS_FACET_FIELD, | ||
IPropertyType.BOOST_FIELD, | ||
IPropertyType.IDX_FIELD_NAME_FIELD, | ||
IPropertyType.PROPERTY_TYPE_FIELD, | ||
IPropertyType.LABEL_FIELD, | ||
IPropertyType.ALTERNATE_LABEL_FIELD, | ||
IPropertyType.HIDDEN_LABEL_FIELD, | ||
IPropertyType.LANGUAGES_FIELD, | ||
IPropertyType.LANGUAGE_TXT_FIELD, | ||
IPropertyType.LOCAL_NAME_FIELD, | ||
IPropertyType.NAME_SPACE_FIELD, | ||
IPropertyType.ID_FIELD, | ||
IPropertyType.COMMENT_FIELD, | ||
IPropertyType.DESCRIPTION_FIELD, | ||
IPropertyType.RANGE_FIELD, | ||
IPropertyType.VALUE_QUALIFIER_FIELD, | ||
IPropertyType.IS_VISIBLE_FIELD, | ||
IPropertyType.IS_REQUIRED_FIELD, | ||
IPropertyType.CODE_LIST_FIELD, | ||
IPropertyType.CODE_LIST_ID_FIELD | ||
}) | ||
List<PropertyType> findByNameSpaceAndLocalNameIn(String namespace, Set<String> localNames); | ||
/** | ||
* Retrieve multiple properties by their uri | ||
* @param uri list of URI's to resolve | ||
* @return | ||
*/ | ||
@Query(fields={ | ||
IPropertyType.TYPE_FIELD, | ||
IPropertyType.IS_FACET_FIELD, | ||
IPropertyType.BOOST_FIELD, | ||
IPropertyType.IDX_FIELD_NAME_FIELD, | ||
IPropertyType.PROPERTY_TYPE_FIELD, | ||
IPropertyType.LABEL_FIELD, | ||
IPropertyType.ALTERNATE_LABEL_FIELD, | ||
IPropertyType.HIDDEN_LABEL_FIELD, | ||
IPropertyType.LANGUAGES_FIELD, | ||
IPropertyType.LANGUAGE_TXT_FIELD, | ||
IPropertyType.LOCAL_NAME_FIELD, | ||
IPropertyType.NAME_SPACE_FIELD, | ||
IPropertyType.ID_FIELD, | ||
IPropertyType.COMMENT_FIELD, | ||
IPropertyType.DESCRIPTION_FIELD, | ||
IPropertyType.RANGE_FIELD, | ||
IPropertyType.VALUE_QUALIFIER_FIELD, | ||
IPropertyType.IS_VISIBLE_FIELD, | ||
IPropertyType.IS_REQUIRED_FIELD, | ||
IPropertyType.CODE_LIST_FIELD, | ||
IPropertyType.CODE_LIST_ID_FIELD | ||
}) | ||
List<PropertyType> findByUriIn(Set<String> uri); | ||
/** | ||
* Retrieve multiple properties by the index field name they serve as a label | ||
* @param itemFieldNames | ||
* @return | ||
*/ | ||
List<PropertyType> findByItemFieldNamesIn(Set<String> itemFieldNames); | ||
/** | ||
* Retrieve multiple fields by their local name OR the index field name | ||
* @param names | ||
* @return | ||
*/ | ||
@Query(fields={ | ||
IPropertyType.TYPE_FIELD, | ||
IPropertyType.IS_FACET_FIELD, | ||
IPropertyType.BOOST_FIELD, | ||
IPropertyType.USED_WITH_FIELD, | ||
IPropertyType.IDX_FIELD_NAME_FIELD, | ||
IPropertyType.PROPERTY_TYPE_FIELD, | ||
IPropertyType.LABEL_FIELD, | ||
IPropertyType.ALTERNATE_LABEL_FIELD, | ||
IPropertyType.HIDDEN_LABEL_FIELD, | ||
IPropertyType.LANGUAGES_FIELD, | ||
IPropertyType.LANGUAGE_TXT_FIELD, | ||
IPropertyType.LOCAL_NAME_FIELD, | ||
IPropertyType.NAME_SPACE_FIELD, | ||
IPropertyType.ID_FIELD, | ||
IPropertyType.COMMENT_FIELD, | ||
IPropertyType.DESCRIPTION_FIELD, | ||
IPropertyType.RANGE_FIELD, | ||
IPropertyType.VALUE_QUALIFIER_FIELD, | ||
IPropertyType.IS_VISIBLE_FIELD, | ||
IPropertyType.IS_REQUIRED_FIELD, | ||
IPropertyType.CODE_LIST_FIELD, | ||
IPropertyType.CODE_LIST_ID_FIELD | ||
}) | ||
List<PropertyType> findByLocalNameOrItemFieldNamesIn(Set<String> names); | ||
/** | ||
* Remove all properties of the provided namespace | ||
* @param namespace | ||
* @return | ||
*/ | ||
long deleteByNameSpace(String namespace); | ||
|
||
} |
Oops, something went wrong.