Class 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 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
    • Constructor Detail

      • MetaProperty

        protected MetaProperty​(java.lang.String theName)
    • 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()
        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 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • 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<java.util.Collection<T>,​InfoProperty<java.util.Collection<T>>> info​(java.lang.String theName,
                                                                                                                         java.lang.Class<T> theClass,
                                                                                                                         java.util.Collection<T> theDefaultValue)