com.clarkparsia.stardog.metadata
Class MetaProperty<T>

java.lang.Object
  extended by com.clarkparsia.stardog.metadata.MetaProperty<T>
Direct Known Subclasses:
ConfigProperty, InfoProperty

public abstract class MetaProperty<T>
extends Object

Representation of a Stardog metadata property. Meta properties provide information about Stardog system and databases in Stardog. Some meta properties (e.g. IndexOptions.INDEX_NAMED_GRAPHS) are used to configure Stardog various aspects of Stardog behavior for loading, indexing, querying, and so on. Other properties only provide information and cannot be modified by users (e.g. IndexOptions.DIFF_INDEX_SIZE). See the implementations of MetaPropertyProvider interface for a complete list of met properties supported by Stardog.

A meta property is uniquely identified by its name. Properties may have a predefined default value that will be used if there is no user-specified value. The values for meta properties are stored in Metadata.

There are two distinct kinds of meta properties: configuration property and information property. The values for either property kind can be retrieved using get function but only if the property is readable (some meta properties are for system use only and their value cannot be read by users). The values for config properties can be specified as input to the database builder at database creation time using its set function if the property creatable. The values for config properties can be modified later through the StardogDBMS interface with the set function if the property is writable.

Since:
0.9
Version:
0.9
Author:
Evren Sirin
See Also:
Metadata

Nested Class Summary
static class MetaProperty.Builder<T,P extends MetaProperty<T>>
          The builder class for building an option instance.
 
Method Summary
static
<T> MetaProperty.Builder<T,ConfigProperty<T>>
config(String theName, Class<T> theClass)
           
static
<T> MetaProperty.Builder<Collection<T>,ConfigProperty<Collection<T>>>
config(String theName, Class<T> theClass, Collection<T> theDefaultValue)
           
static
<T> MetaProperty.Builder<T,ConfigProperty<T>>
config(String theName, T theDefaultValue)
           
 boolean equals(Object other)
           
 com.clarkparsia.stardog.metadata.ByteIO<T> getByteIO()
           
 T getDefaultValue()
           
 com.clarkparsia.stardog.metadata.GraphIO<T> getGraphIO()
           
 String getName()
           
 String getPermission()
          Return the name of the Database metadata security permission that a user is required to have in order to set the value of this property.
 com.clarkparsia.stardog.metadata.TextIO<T> getTextIO()
           
 int hashCode()
           
static
<T> MetaProperty.Builder<T,InfoProperty<T>>
info(String theName, Class<T> theClass)
           
static
<T> MetaProperty.Builder<Collection<T>,InfoProperty<Collection<T>>>
info(String theName, Class<T> theClass, Collection<T> theDefaultValue)
           
static
<T> MetaProperty.Builder<T,InfoProperty<T>>
info(String theName, T theDefaultValue)
           
 boolean isConfig()
           
 boolean isDatabase()
           
 boolean isDiskIndex()
           
 boolean isIndex()
           
 boolean isInfo()
           
 boolean isMemoryIndex()
           
 boolean isReadable()
           
 boolean isSecure()
           
 boolean isTransient()
           
 boolean isValid(T theValue)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getPermission

public String getPermission()
Return the name of the Database metadata security permission that a user is required to have in order to set the value of this property. isSecure() should return true for the value of this method to be relevant.

Returns:
the specific permission name, or the name of the property itself if there is not one specified

getName

public String getName()

getDefaultValue

public T getDefaultValue()

isConfig

public boolean isConfig()

isInfo

public boolean isInfo()

isSecure

public boolean isSecure()

isTransient

public boolean isTransient()

isDatabase

public boolean isDatabase()

isDiskIndex

public boolean isDiskIndex()

isMemoryIndex

public boolean isMemoryIndex()

isIndex

public boolean isIndex()

isReadable

public boolean isReadable()

getByteIO

public com.clarkparsia.stardog.metadata.ByteIO<T> getByteIO()

getTextIO

public com.clarkparsia.stardog.metadata.TextIO<T> getTextIO()

getGraphIO

public com.clarkparsia.stardog.metadata.GraphIO<T> getGraphIO()

isValid

public boolean isValid(T theValue)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

config

public static <T> MetaProperty.Builder<T,ConfigProperty<T>> config(String theName,
                                                                   T theDefaultValue)

config

public static <T> MetaProperty.Builder<T,ConfigProperty<T>> config(String theName,
                                                                   Class<T> theClass)

config

public static <T> MetaProperty.Builder<Collection<T>,ConfigProperty<Collection<T>>> config(String theName,
                                                                                           Class<T> theClass,
                                                                                           Collection<T> theDefaultValue)

info

public static <T> MetaProperty.Builder<T,InfoProperty<T>> info(String theName,
                                                               T theDefaultValue)

info

public static <T> MetaProperty.Builder<T,InfoProperty<T>> info(String theName,
                                                               Class<T> theClass)

info

public static <T> MetaProperty.Builder<Collection<T>,InfoProperty<Collection<T>>> info(String theName,
                                                                                       Class<T> theClass,
                                                                                       Collection<T> theDefaultValue)


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