Package it.unibz.inf.ontop.dbschema.impl
Class JsonSerializedMetadataProvider
- java.lang.Object
-
- it.unibz.inf.ontop.dbschema.impl.JsonSerializedMetadataProvider
-
- All Implemented Interfaces:
MetadataLookup,MetadataProvider,SerializedMetadataProvider
public class JsonSerializedMetadataProvider extends Object implements SerializedMetadataProvider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface it.unibz.inf.ontop.dbschema.SerializedMetadataProvider
SerializedMetadataProvider.Factory, SerializedMetadataProvider.MetadataLookupSupplier
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJsonSerializedMetadataProvider(Reader dbMetadataReader, SerializedMetadataProvider.MetadataLookupSupplier parentProviderSupplier, CoreSingletons coreSingletons)protectedJsonSerializedMetadataProvider(Reader dbMetadataReader, CoreSingletons coreSingletons)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RelationDefinitiongetBlackBoxView(String query)DBParametersgetDBParameters()protected Optional<MetadataLookup>getParentProvider()QuotedIDFactorygetQuotedIDFactory()NamedRelationDefinitiongetRelation(RelationID id)it.unibz.inf.ontop.com.google.common.collect.ImmutableList<RelationID>getRelationIDs()voidinsertIntegrityConstraints(NamedRelationDefinition relation, MetadataLookup metadataLookupForFk)protected static JsonMetadataloadAndDeserialize(Reader dbMetadataReader)Deserializes a JSON file into a POJO.voidnormalizeAndOptimizeRelations(List<NamedRelationDefinition> relationDefinitions)
-
-
-
Constructor Detail
-
JsonSerializedMetadataProvider
protected JsonSerializedMetadataProvider(Reader dbMetadataReader, CoreSingletons coreSingletons) throws MetadataExtractionException, IOException
-
JsonSerializedMetadataProvider
protected JsonSerializedMetadataProvider(Reader dbMetadataReader, @Nullable SerializedMetadataProvider.MetadataLookupSupplier parentProviderSupplier, CoreSingletons coreSingletons) throws MetadataExtractionException, IOException
-
-
Method Detail
-
loadAndDeserialize
protected static JsonMetadata loadAndDeserialize(Reader dbMetadataReader) throws MetadataExtractionException, IOException
Deserializes a JSON file into a POJO.- Parameters:
dbMetadataReader- JSON file reader- Returns:
- JSON metadata
- Throws:
MetadataExtractionExceptionIOException
-
getRelation
public NamedRelationDefinition getRelation(RelationID id) throws MetadataExtractionException
- Specified by:
getRelationin interfaceMetadataLookup- Throws:
MetadataExtractionException
-
getBlackBoxView
public RelationDefinition getBlackBoxView(String query) throws MetadataExtractionException, InvalidQueryException
- Specified by:
getBlackBoxViewin interfaceMetadataLookup- Throws:
MetadataExtractionExceptionInvalidQueryException
-
getQuotedIDFactory
public QuotedIDFactory getQuotedIDFactory()
- Specified by:
getQuotedIDFactoryin interfaceMetadataLookup
-
getRelationIDs
public it.unibz.inf.ontop.com.google.common.collect.ImmutableList<RelationID> getRelationIDs() throws MetadataExtractionException
- Specified by:
getRelationIDsin interfaceMetadataProvider- Throws:
MetadataExtractionException
-
insertIntegrityConstraints
public void insertIntegrityConstraints(NamedRelationDefinition relation, MetadataLookup metadataLookupForFk) throws MetadataExtractionException
- Specified by:
insertIntegrityConstraintsin interfaceMetadataProvider- Throws:
MetadataExtractionException
-
getDBParameters
public DBParameters getDBParameters()
- Specified by:
getDBParametersin interfaceMetadataProvider
-
normalizeAndOptimizeRelations
public void normalizeAndOptimizeRelations(List<NamedRelationDefinition> relationDefinitions)
- Specified by:
normalizeAndOptimizeRelationsin interfaceMetadataProvider
-
getParentProvider
protected Optional<MetadataLookup> getParentProvider() throws MetadataExtractionException
- Throws:
MetadataExtractionException
-
-