Package com.complexible.stardog.metadata

# Class MetaProperty<T>

java.lang.Object
com.complexible.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_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:
  - `Metadata`

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `MetaProperty.Builder<T,P extends MetaProperty<T>>`
  The builder class for building an option instance.
  `protected static enum`
  `MetaProperty.Flag`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `MetaProperty(String theName)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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, Class<T> theClass, T theDefaultValue)`
  `static <T> MetaProperty.Builder<T,ConfigProperty<T>>`
  `config(String theName, T theDefaultValue)`
  `static <T> MetaProperty.Builder<List<T>,ConfigProperty<List<T>>>`
  `configList(String theName, Class<T> theClass, List<T> theDefaultValue)`
  `boolean`
  `equals(Object other)`
  `com.complexible.stardog.metadata.ByteIO<T>`
  `getByteIO()`
  `com.complexible.stardog.metadata.OptionsCategory`
  `getCategory()`
  Returns the category of this property.
  `com.complexible.stardog.metadata.MetaProperty.CollectionType`
  `getCollectionType()`
  `T`
  `getDefaultValue()`
  `String`
  `getDescription()`
  `com.complexible.stardog.metadata.GraphIO<T>`
  `getGraphIO()`
  `String`
  `getLabel()`
  `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.
  `Collection<T>`
  `getPossibleValues()`
  `T`
  `getSystemDefaultValue()`
  `com.complexible.stardog.metadata.TextIO<T>`
  `getTextIO()`
  `Class<?>`
  `getType()`
  `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()`
  Returns `true` if retrieving the value of this property requires database metadata read permission.
  `boolean`
  `isServer()`
  `boolean`
  `isTemporary()`
  `boolean`
  `isValid(T theValue)`
  `boolean`
  `isWritableOnline()`
  `protected void`
  `setByteIO(com.complexible.stardog.metadata.ByteIO<T> theByteIO)`
  `void`
  `setCategory(com.complexible.stardog.metadata.OptionsCategory theCategory)`
  Sets the category of this property.
  `void`
  `setDescription(String theDescription)`
  `protected void`
  `setGraphIO(com.complexible.stardog.metadata.GraphIO<T> theGraphIO)`
  `void`
  `setLabel(String theLabel)`
  `void`
  `setTextIO(com.complexible.stardog.metadata.TextIO<T> theTextIO)`
  `protected void`
  `setType(Class<?> theType)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### MetaProperty

    protected MetaProperty(String theName)

- ## Method Details

  - ### 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()

  - ### setLabel

    public void setLabel(String theLabel)

  - ### getLabel

    public String getLabel()

  - ### setDescription

    public void setDescription(String theDescription)

  - ### getDescription

    public String 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 `null` if 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

    protected void setType(Class<?> theType)

  - ### getType

    public Class<?> getType()

  - ### getCollectionType

    public com.complexible.stardog.metadata.MetaProperty.CollectionType getCollectionType()

  - ### getDefaultValue

    public T getDefaultValue()

  - ### getPossibleValues

    public Collection<T> getPossibleValues()

  - ### getSystemDefaultValue

    public T getSystemDefaultValue()

  - ### isConfig

    public boolean isConfig()

  - ### isInfo

    public boolean isInfo()

  - ### isSecure

    public boolean isSecure()
    Returns `true` if 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 returns `false`. 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

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

  - ### setByteIO

    protected void setByteIO(com.complexible.stardog.metadata.ByteIO<T> theByteIO)

  - ### getTextIO

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

  - ### setTextIO

    public void setTextIO(com.complexible.stardog.metadata.TextIO<T> theTextIO)

  - ### getGraphIO

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

  - ### setGraphIO

    protected void setGraphIO(com.complexible.stardog.metadata.GraphIO<T> theGraphIO)

  - ### 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<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

    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)