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.ObjectRepresentation 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 ofMetaPropertyProviderinterface for a complete list of met properties supported by Stardog.A meta property is uniquely identified by its
name. Properties may have a predefineddefault valuethat 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 propertyandinformation 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 theAdminConnectioninterface 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 classMetaProperty.Builder<T,P extends MetaProperty<T>>The builder class for building an option instance.protected static classMetaProperty.Flag
-
Constructor Summary
Constructors Modifier Constructor Description protectedMetaProperty(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)booleanequals(java.lang.Object other)com.complexible.stardog.metadata.ByteIO<T>getByteIO()java.lang.StringgetCategory()com.complexible.stardog.metadata.MetaProperty.CollectionTypegetCollectionType()TgetDefaultValue()java.lang.StringgetDescription()com.complexible.stardog.metadata.GraphIO<T>getGraphIO()java.lang.StringgetLabel()java.lang.StringgetName()java.lang.StringgetPermission()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()TgetSystemDefaultValue()com.complexible.stardog.metadata.TextIO<T>getTextIO()java.lang.Class<?>getType()inthashCode()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)booleanisConfig()booleanisDatabase()booleanisDiskIndex()booleanisIndex()booleanisInfo()booleanisMemoryIndex()booleanisReadable()booleanisSecure()Returnstrueif retrieving the value of this property requires database metadata read permission.booleanisServer()booleanisTemporary()booleanisValid(T theValue)booleanisWritableOnline()protected voidsetByteIO(com.complexible.stardog.metadata.ByteIO<T> theByteIO)voidsetCategory(java.lang.String theCategory)voidsetDescription(java.lang.String theDescription)protected voidsetGraphIO(com.complexible.stardog.metadata.GraphIO<T> theGraphIO)voidsetLabel(java.lang.String theLabel)voidsetTextIO(com.complexible.stardog.metadata.TextIO<T> theTextIO)protected voidsetType(java.lang.Class<?> theType)java.lang.StringtoString()
-
-
-
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()
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
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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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)
-
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)
-
-