Package com.complexible.stardog.metadata
Class MetaProperties
- java.lang.Object
-
- com.complexible.stardog.metadata.MetaProperties
-
public final class MetaProperties extends java.lang.Object
This class acts as the registry of valid Stardog options and provides convenience functions.- Since:
- 0.9
- Version:
- 4.0
- Author:
- Evren Sirin, Michael Grove
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Predicate<MetaProperty<?>>
CREATABLE
Predicate that the returnstrue
if the given option is creatable.static com.google.common.collect.Ordering<MetaProperty<?>>
NAME_ORDERING
Ordering on the name of optionsstatic java.util.function.Predicate<MetaProperty<?>>
WRITABLE
Predicate that the returnstrue
if the given option is writable.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Iterable<MetaProperty<?>>
allProperties()
Returns the set of all valid Stardog options.static Metadata
combine(Metadata... theOptionsArray)
Combines the given multiple options instances one options instance.static java.lang.Iterable<ConfigProperty<?>>
configProperties(java.lang.Iterable<MetaProperty<?>> theProperties)
static boolean
contains(MetaProperty<?> theOption)
Returnstrue
if the given option is contained in the set of all valid Stardog options.static boolean
contains(java.lang.String theName)
Returnstrue
if there is a option with the given name in the set of all valid Stardog options.static java.lang.Iterable<MetaProperty<?>>
databaseProperties()
static Metadata
defaults(java.lang.Iterable<MetaProperty<?>> theStardogOptions)
Returns a new option map that contains explicit mapping for each given option to itsdefault value
.static java.lang.Iterable<MetaProperty<?>>
diskProperties()
static Metadata
filter(Metadata theOptions, java.util.function.Predicate<MetaProperty<?>> theFilter)
Returns a new option map which contains explicit mappings only from those options that satisfy the given filter.static <T> MetaProperty<T>
get(java.lang.String name)
static java.lang.Iterable<MetaProperty<?>>
indexProperties()
static java.lang.Iterable<InfoProperty<?>>
infoProperties(java.lang.Iterable<MetaProperty<?>> theProperties)
static java.lang.Iterable<MetaProperty<?>>
memoryProperties()
static com.complexible.stardog.metadata.PartitionedMetadata
partition(Metadata theOptions, java.util.function.Predicate<MetaProperty<?>> theFilter, boolean theMemory)
static void
register(java.lang.Class<? extends MetaPropertyProvider> aProvider)
-
-
-
Field Detail
-
WRITABLE
public static final java.util.function.Predicate<MetaProperty<?>> WRITABLE
Predicate that the returnstrue
if the given option is writable.
-
CREATABLE
public static final java.util.function.Predicate<MetaProperty<?>> CREATABLE
Predicate that the returnstrue
if the given option is creatable.
-
NAME_ORDERING
public static final com.google.common.collect.Ordering<MetaProperty<?>> NAME_ORDERING
Ordering on the name of options
-
-
Method Detail
-
get
public static <T> MetaProperty<T> get(java.lang.String name)
-
contains
public static boolean contains(java.lang.String theName)
Returnstrue
if there is a option with the given name in the set of all valid Stardog options.
-
contains
public static boolean contains(MetaProperty<?> theOption)
Returnstrue
if the given option is contained in the set of all valid Stardog options.
-
allProperties
public static java.lang.Iterable<MetaProperty<?>> allProperties()
Returns the set of all valid Stardog options.
-
databaseProperties
public static java.lang.Iterable<MetaProperty<?>> databaseProperties()
-
memoryProperties
public static java.lang.Iterable<MetaProperty<?>> memoryProperties()
-
diskProperties
public static java.lang.Iterable<MetaProperty<?>> diskProperties()
-
indexProperties
public static java.lang.Iterable<MetaProperty<?>> indexProperties()
-
configProperties
public static java.lang.Iterable<ConfigProperty<?>> configProperties(java.lang.Iterable<MetaProperty<?>> theProperties)
-
infoProperties
public static java.lang.Iterable<InfoProperty<?>> infoProperties(java.lang.Iterable<MetaProperty<?>> theProperties)
-
defaults
public static Metadata defaults(java.lang.Iterable<MetaProperty<?>> theStardogOptions)
Returns a new option map that contains explicit mapping for each given option to itsdefault value
.
-
filter
public static Metadata filter(Metadata theOptions, java.util.function.Predicate<MetaProperty<?>> theFilter)
Returns a new option map which contains explicit mappings only from those options that satisfy the given filter.
-
partition
public static com.complexible.stardog.metadata.PartitionedMetadata partition(Metadata theOptions, java.util.function.Predicate<MetaProperty<?>> theFilter, boolean theMemory)
-
combine
public static Metadata combine(Metadata... theOptionsArray)
Combines the given multiple options instances one options instance. If there are duplicate options in the given arguments the value that appears in the last options instance wins.
-
register
public static void register(java.lang.Class<? extends MetaPropertyProvider> aProvider)
-
-