Class MetaProperty<T>
- java.lang.Object
-
- com.complexible.stardog.metadata.MetaProperty<T>
-
- Direct Known Subclasses:
ConfigProperty
,InfoProperty
public abstract class MetaProperty<T> extends java.lang.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 ofMetaPropertyProvider
interface for a complete list of met properties supported by Stardog.A meta property is uniquely identified by its
name
. Properties may have a predefineddefault value
that will be used if there is no user-specified value. The values for meta properties are stored inMetadata
.There are two distinct kinds of meta properties:
configuration property
andinformation property
. The values for either property kind can be retrieved usingcom.complexible.stardog.api.admin.AdminConnection#get(String, MetaProperty)
function but only if the property isreadable
(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 itscom.complexible.stardog.api.admin.DatabaseBuilder#set(ConfigProperty, Object)
function if the property iscreatable
. The values for config properties can be modified later through theAdminConnection
interface with thecom.complexible.stardog.api.admin.AdminConnection#set(String, ConfigProperty, Object)
function if the property iswritable
.- 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 class
MetaProperty.Flag
-
Constructor Summary
Constructors Modifier Constructor Description protected
MetaProperty(java.lang.String theName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> MetaProperty.Builder<T,ConfigProperty<T>>
config(java.lang.String theName, java.lang.Class<T> theClass)
static <T> MetaProperty.Builder<java.util.Collection<T>,ConfigProperty<java.util.Collection<T>>>
config(java.lang.String theName, java.lang.Class<T> theClass, java.util.Collection<T> theDefaultValue)
static <T> MetaProperty.Builder<T,ConfigProperty<T>>
config(java.lang.String theName, java.lang.Class<T> theClass, T theDefaultValue)
static <T> MetaProperty.Builder<T,ConfigProperty<T>>
config(java.lang.String theName, T theDefaultValue)
static <T> MetaProperty.Builder<java.util.List<T>,ConfigProperty<java.util.List<T>>>
configList(java.lang.String theName, java.lang.Class<T> theClass, java.util.List<T> theDefaultValue)
boolean
equals(java.lang.Object other)
com.complexible.stardog.metadata.ByteIO<T>
getByteIO()
java.lang.String
getCategory()
com.complexible.stardog.metadata.MetaProperty.CollectionType
getCollectionType()
T
getDefaultValue()
java.lang.String
getDescription()
com.complexible.stardog.metadata.GraphIO<T>
getGraphIO()
java.lang.String
getLabel()
java.lang.String
getName()
java.lang.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.java.util.Collection<T>
getPossibleValues()
T
getSystemDefaultValue()
com.complexible.stardog.metadata.TextIO<T>
getTextIO()
java.lang.Class<?>
getType()
int
hashCode()
static <T> MetaProperty.Builder<T,InfoProperty<T>>
info(java.lang.String theName, java.lang.Class<T> theClass)
static <T> MetaProperty.Builder<java.util.Collection<T>,InfoProperty<java.util.Collection<T>>>
info(java.lang.String theName, java.lang.Class<T> theClass, java.util.Collection<T> theDefaultValue)
static <T> MetaProperty.Builder<T,InfoProperty<T>>
info(java.lang.String theName, T theDefaultValue)
boolean
isConfig()
boolean
isDatabase()
boolean
isDiskIndex()
boolean
isIndex()
boolean
isInfo()
boolean
isMemoryIndex()
boolean
isReadable()
boolean
isSecure()
Returnstrue
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(java.lang.String theCategory)
void
setDescription(java.lang.String theDescription)
protected void
setGraphIO(com.complexible.stardog.metadata.GraphIO<T> theGraphIO)
void
setLabel(java.lang.String theLabel)
void
setTextIO(com.complexible.stardog.metadata.TextIO<T> theTextIO)
protected void
setType(java.lang.Class<?> theType)
java.lang.String
toString()
-
-
-
Method Detail
-
getPermission
public java.lang.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 java.lang.String getName()
-
setLabel
public void setLabel(java.lang.String theLabel)
-
getLabel
public java.lang.String getLabel()
-
setDescription
public void setDescription(java.lang.String theDescription)
-
getDescription
public java.lang.String getDescription()
-
getCategory
public java.lang.String getCategory()
-
setCategory
public void setCategory(java.lang.String theCategory)
-
setType
protected void setType(java.lang.Class<?> theType)
-
getType
public java.lang.Class<?> getType()
-
getCollectionType
public com.complexible.stardog.metadata.MetaProperty.CollectionType getCollectionType()
-
getDefaultValue
public T getDefaultValue()
-
getPossibleValues
public java.util.Collection<T> getPossibleValues()
-
getSystemDefaultValue
public T getSystemDefaultValue()
-
isConfig
public boolean isConfig()
-
isInfo
public boolean isInfo()
-
isSecure
public boolean isSecure()
Returnstrue
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 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
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
config
public static <T> MetaProperty.Builder<T,ConfigProperty<T>> config(java.lang.String theName, T theDefaultValue)
-
config
public static <T> MetaProperty.Builder<T,ConfigProperty<T>> config(java.lang.String theName, java.lang.Class<T> theClass)
-
config
public static <T> MetaProperty.Builder<T,ConfigProperty<T>> config(java.lang.String theName, java.lang.Class<T> theClass, T theDefaultValue)
-
config
public static <T> MetaProperty.Builder<java.util.Collection<T>,ConfigProperty<java.util.Collection<T>>> config(java.lang.String theName, java.lang.Class<T> theClass, java.util.Collection<T> theDefaultValue)
-
configList
public static <T> MetaProperty.Builder<java.util.List<T>,ConfigProperty<java.util.List<T>>> configList(java.lang.String theName, java.lang.Class<T> theClass, java.util.List<T> theDefaultValue)
-
info
public static <T> MetaProperty.Builder<T,InfoProperty<T>> info(java.lang.String theName, T theDefaultValue)
-
info
public static <T> MetaProperty.Builder<T,InfoProperty<T>> info(java.lang.String theName, java.lang.Class<T> theClass)
-
info
public static <T> MetaProperty.Builder<java.util.Collection<T>,InfoProperty<java.util.Collection<T>>> info(java.lang.String theName, java.lang.Class<T> theClass, java.util.Collection<T> theDefaultValue)
-
-