Class MetaProperty<T>
- Direct Known Subclasses:
ConfigProperty,InfoProperty
Representation of a Stardog metadata property. Meta properties provide information about Stardog system and databases
in Stardog. Some meta properties (e.g. IndexOptions.INDEX_TYPE) are used to configure 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
com.complexible.stardog.api.admin.AdminConnection#get(String, MetaProperty) 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
com.complexible.stardog.api.admin.DatabaseBuilder#set(ConfigProperty, Object) function if the property is creatable. The values for config properties can be modified later through the AdminConnection interface with
the com.complexible.stardog.api.admin.AdminConnection#set(String, ConfigProperty, Object) function if the property is
writable.
- Since:
- 0.9
- Version:
- 0.9
- Author:
- Evren Sirin
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMetaProperty.Builder<T,P extends MetaProperty<T>> The builder class for building an option instance.protected static enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> MetaProperty.Builder<T, ConfigProperty<T>> 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>> static <T> MetaProperty.Builder<T, ConfigProperty<T>> static <T> MetaProperty.Builder<List<T>, ConfigProperty<List<T>>> configList(String theName, Class<T> theClass, List<T> theDefaultValue) booleancom.complexible.stardog.metadata.ByteIO<T> com.complexible.stardog.metadata.OptionsCategoryReturns the category of this property.com.complexible.stardog.metadata.MetaProperty.CollectionTypecom.complexible.stardog.metadata.GraphIO<T> getLabel()getName()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.complexible.stardog.metadata.TextIO<T> Class<?> getType()inthashCode()static <T> MetaProperty.Builder<T, InfoProperty<T>> 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>> booleanisConfig()booleanbooleanbooleanisIndex()booleanisInfo()booleanbooleanbooleanisSecure()Returnstrueif retrieving the value of this property requires database metadata read permission.booleanisServer()booleanbooleanbooleanprotected voidvoidsetCategory(com.complexible.stardog.metadata.OptionsCategory theCategory) Sets the category of this property.voidsetDescription(String theDescription) protected voidsetGraphIO(com.complexible.stardog.metadata.GraphIO<T> theGraphIO) voidvoidprotected voidtoString()
-
Constructor Details
-
MetaProperty
-
-
Method Details
-
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
-
setLabel
-
getLabel
-
setDescription
-
getDescription
-
getCategory
public com.complexible.stardog.metadata.OptionsCategory getCategory()Returns the category of this property. Categories are used to group related properties by the functionality they configure. This grouping is primarily used for organizing properties in documentation.- Returns:
- the category, or
nullif no category has been set
-
setCategory
public void setCategory(com.complexible.stardog.metadata.OptionsCategory theCategory) Sets the category of this property. Categories are used to group related properties by the functionality they configure. This grouping is primarily used for organizing properties in documentation.- Parameters:
theCategory- the category (must not be null)- Throws:
NullPointerException- if theCategory is null
-
setType
-
getType
-
getCollectionType
public com.complexible.stardog.metadata.MetaProperty.CollectionType getCollectionType() -
getDefaultValue
-
getPossibleValues
-
getSystemDefaultValue
-
isConfig
public boolean isConfig() -
isInfo
public boolean isInfo() -
isSecure
public boolean isSecure()Returnstrueif retrieving the value of this property requires database metadata read permission. Some database metadata properties, e.g. namespaces, can be read without metadata permissions. Databases read/write permissions will still be required to read the value of this property if this function returnsfalse. Database metadata write permission is required to update any property regardless of this value. -
isTemporary
public boolean isTemporary() -
isDatabase
public boolean isDatabase() -
isDiskIndex
public boolean isDiskIndex() -
isMemoryIndex
public boolean isMemoryIndex() -
isIndex
public boolean isIndex() -
isReadable
public boolean isReadable() -
isServer
public boolean isServer() -
isWritableOnline
public boolean isWritableOnline() -
getByteIO
-
setByteIO
-
getTextIO
-
setTextIO
-
getGraphIO
-
setGraphIO
-
isValid
-
hashCode
public int hashCode() -
equals
-
toString
-
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<T,ConfigProperty<T>> config(String theName, Class<T> theClass, T theDefaultValue) -
config
public static <T> MetaProperty.Builder<Collection<T>,ConfigProperty<Collection<T>>> config(String theName, Class<T> theClass, Collection<T> theDefaultValue) -
configList
public static <T> MetaProperty.Builder<List<T>,ConfigProperty<List<T>>> configList(String theName, Class<T> theClass, List<T> theDefaultValue) -
info
-
info
-
info
public static <T> MetaProperty.Builder<Collection<T>,InfoProperty<Collection<T>>> info(String theName, Class<T> theClass, Collection<T> theDefaultValue)
-