com.clarkparsia.stardog.metadata
Class MetaProperties

java.lang.Object
  extended by com.clarkparsia.stardog.metadata.MetaProperties

public class MetaProperties
extends Object

This class acts as the registry of valid Stardog options and provides convenience functions.

Since:
0.9
Version:
0.9
Author:
Evren Sirin

Field Summary
static Predicate<MetaProperty<?>> CONFIG
          Predicate that the returns true if the given property is a config property.
static Predicate<MetaProperty<?>> CREATABLE
          Predicate that the returns true if the given option is creatable.
static Predicate<MetaProperty<?>> DB_OPTION
           
static Predicate<MetaProperty<?>> DISK_OPTION
           
static Predicate<MetaProperty<?>> INDEX_OPTION
           
static Predicate<MetaProperty<?>> INFO
          Predicate that the returns true if the given property is an info property.
static Predicate<MetaProperty<?>> MEM_OPTION
           
static Ordering<MetaProperty<?>> NAME_ORDERING
          Ordering on the name of options
static Function<String,MetaProperty<?>> NAME_TO_PROP
          Maps a name to an option using get(String)
static Function<MetaProperty<?>,String> PROP_TO_NAME
          Maps an option to its name.
static Predicate<MetaProperty<?>> READABLE
          Predicate that the returns true if the given option is readable.
static Predicate<MetaProperty<?>> RECOGNIZED
          Predicate that the returns true if the given option is a recognized Stardog option as determined by contains(MetaProperty).
static Predicate<MetaProperty<?>> WRITABLE
          Predicate that the returns true if the given option is writable.
 
Method Summary
static 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 Iterable<ConfigProperty<?>> configProperties(Iterable<MetaProperty<?>> theProperties)
           
static boolean contains(MetaProperty<?> theOption)
          Returns true if the given option is contained in the set of all valid Stardog options.
static boolean contains(String theName)
          Returns true if there is a option with the given name in the set of all valid Stardog options.
static Iterable<MetaProperty<?>> databaseProperties()
           
static Metadata defaults(Iterable<MetaProperty<?>> theStardogOptions)
          Returns a new option map that contains explicit mapping for each given option to its default value.
static Iterable<MetaProperty<?>> diskProperties()
           
static Metadata filter(Metadata theOptions, 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(String name)
           
static Iterable<MetaProperty<?>> indexProperties()
           
static Iterable<InfoProperty<?>> infoProperties(Iterable<MetaProperty<?>> theProperties)
           
static Iterable<MetaProperty<?>> memoryProperties()
           
static com.clarkparsia.stardog.metadata.PartitionedMetadata partition(Metadata theOptions, Predicate<MetaProperty<?>> theFilter)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG

public static final Predicate<MetaProperty<?>> CONFIG
Predicate that the returns true if the given property is a config property.


INFO

public static final Predicate<MetaProperty<?>> INFO
Predicate that the returns true if the given property is an info property.


READABLE

public static final Predicate<MetaProperty<?>> READABLE
Predicate that the returns true if the given option is readable.


WRITABLE

public static final Predicate<MetaProperty<?>> WRITABLE
Predicate that the returns true if the given option is writable.


CREATABLE

public static final Predicate<MetaProperty<?>> CREATABLE
Predicate that the returns true if the given option is creatable.


RECOGNIZED

public static final Predicate<MetaProperty<?>> RECOGNIZED
Predicate that the returns true if the given option is a recognized Stardog option as determined by contains(MetaProperty).


DB_OPTION

public static final Predicate<MetaProperty<?>> DB_OPTION

INDEX_OPTION

public static final Predicate<MetaProperty<?>> INDEX_OPTION

MEM_OPTION

public static final Predicate<MetaProperty<?>> MEM_OPTION

DISK_OPTION

public static final Predicate<MetaProperty<?>> DISK_OPTION

PROP_TO_NAME

public static final Function<MetaProperty<?>,String> PROP_TO_NAME
Maps an option to its name.


NAME_TO_PROP

public static final Function<String,MetaProperty<?>> NAME_TO_PROP
Maps a name to an option using get(String)


NAME_ORDERING

public static final Ordering<MetaProperty<?>> NAME_ORDERING
Ordering on the name of options

Method Detail

get

public static <T> MetaProperty<T> get(String name)

contains

public static boolean contains(String theName)
Returns true if there is a option with the given name in the set of all valid Stardog options.


contains

public static boolean contains(MetaProperty<?> theOption)
Returns true if the given option is contained in the set of all valid Stardog options.


allProperties

public static Iterable<MetaProperty<?>> allProperties()
Returns the set of all valid Stardog options.


databaseProperties

public static Iterable<MetaProperty<?>> databaseProperties()

memoryProperties

public static Iterable<MetaProperty<?>> memoryProperties()

diskProperties

public static Iterable<MetaProperty<?>> diskProperties()

indexProperties

public static Iterable<MetaProperty<?>> indexProperties()

configProperties

public static Iterable<ConfigProperty<?>> configProperties(Iterable<MetaProperty<?>> theProperties)

infoProperties

public static Iterable<InfoProperty<?>> infoProperties(Iterable<MetaProperty<?>> theProperties)

defaults

public static Metadata defaults(Iterable<MetaProperty<?>> theStardogOptions)
Returns a new option map that contains explicit mapping for each given option to its default value.


filter

public static Metadata filter(Metadata theOptions,
                              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.clarkparsia.stardog.metadata.PartitionedMetadata partition(Metadata theOptions,
                                                                             Predicate<MetaProperty<?>> theFilter)

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.



Copyright © 2010-2013 Clark & Parsia. All Rights Reserved.