Class STPropertiesImpl
java.lang.Object
it.uniroma2.art.semanticturkey.properties.STPropertiesImpl
- All Implemented Interfaces:
STProperties
- Direct Known Subclasses:
AbstractPluginConfiguration
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.uniroma2.art.semanticturkey.properties.STProperties
STProperties.BasicPropertiesConstraints, STProperties.BasicPropertyConstraintValidator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertToPropertValue
(Field prop, Object value) getEnumeration
(String id) Returns the enumeration (if any) associated with the property with givenid
.returns all the properties of the class implementing this interface, which have been annotated asSTProperty
getPropertyContentType
(String parID) get the expected type of content for the property.this method returns the description of a propertygets the value of a property previously set on this set of propertiesboolean
tells if this set of properties needs to be explicitly set by the user or if it can be used in its default settingsboolean
isEnumerated
(String id) Tells if the property with givenid
is enumerated: either its type is an enum (seeSTProperties.getPropertyType(String)
) or it is annotated withEnumeration
.boolean
isRequiredProperty
(String parID) void
loadProperties
(File propertyFile) invokesSTProperties.setPropertyValue(String, Object)
on each of the property/value pairs found inpropertyFile
void
setProperties
(Properties props) invokesSTProperties.setPropertyValue(String, Object)
on each of the property/value pairs found inproperties
void
setPropertyValue
(String id, Object value) void
storeProperties
(File propertyFile) stores the properties in this instance in filepropertyFile
void
storeProperties
(Properties properties) stores the properties in this instance in the givenProperties
objectproperties
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface it.uniroma2.art.semanticturkey.properties.STProperties
checkAndConvertPropertyValue, convertToPropertValue, getAnnotations, getHTMLDescription, getHTMLWarning, getPropertyAnnotatedType, getPropertyDisplayName, getPropertyType, getShortName, getStringRepresentation
-
Constructor Details
-
STPropertiesImpl
protected STPropertiesImpl() -
STPropertiesImpl
- Throws:
IOException
WrongPropertiesException
-
-
Method Details
-
getProperties
Description copied from interface:STProperties
returns all the properties of the class implementing this interface, which have been annotated asSTProperty
- Specified by:
getProperties
in interfaceSTProperties
- Returns:
-
getPropertyValue
Description copied from interface:STProperties
gets the value of a property previously set on this set of properties- Specified by:
getPropertyValue
in interfaceSTProperties
- Returns:
- Throws:
PropertyNotFoundException
-
setPropertyValue
- Specified by:
setPropertyValue
in interfaceSTProperties
- Throws:
WrongPropertiesException
-
setProperties
Description copied from interface:STProperties
invokesSTProperties.setPropertyValue(String, Object)
on each of the property/value pairs found inproperties
- Specified by:
setProperties
in interfaceSTProperties
- Throws:
WrongPropertiesException
-
loadProperties
Description copied from interface:STProperties
invokesSTProperties.setPropertyValue(String, Object)
on each of the property/value pairs found inpropertyFile
- Specified by:
loadProperties
in interfaceSTProperties
- Throws:
WrongPropertiesException
IOException
-
storeProperties
Description copied from interface:STProperties
stores the properties in this instance in filepropertyFile
- Specified by:
storeProperties
in interfaceSTProperties
- Throws:
IOException
WrongPropertiesException
-
storeProperties
Description copied from interface:STProperties
stores the properties in this instance in the givenProperties
objectproperties
- Specified by:
storeProperties
in interfaceSTProperties
- Throws:
IOException
WrongPropertiesException
-
getPropertyContentType
Description copied from interface:STProperties
get the expected type of content for the property. Can be used by external tools to drive the acquisition of that value or to check- Specified by:
getPropertyContentType
in interfaceSTProperties
- Returns:
- Throws:
PropertyNotFoundException
-
isRequiredProperty
- Specified by:
isRequiredProperty
in interfaceSTProperties
- Throws:
PropertyNotFoundException
-
hasRequiredProperties
public boolean hasRequiredProperties()Description copied from interface:STProperties
tells if this set of properties needs to be explicitly set by the user or if it can be used in its default settings- Specified by:
hasRequiredProperties
in interfaceSTProperties
- Returns:
-
getPropertyDescription
Description copied from interface:STProperties
this method returns the description of a property- Specified by:
getPropertyDescription
in interfaceSTProperties
- Returns:
- Throws:
PropertyNotFoundException
-
convertToPropertValue
-
toString
-
isEnumerated
Description copied from interface:STProperties
Tells if the property with givenid
is enumerated: either its type is an enum (seeSTProperties.getPropertyType(String)
) or it is annotated withEnumeration
.- Specified by:
isEnumerated
in interfaceSTProperties
- Returns:
- Throws:
PropertyNotFoundException
-
getEnumeration
Description copied from interface:STProperties
Returns the enumeration (if any) associated with the property with givenid
.- Specified by:
getEnumeration
in interfaceSTProperties
- Returns:
- Throws:
PropertyNotFoundException
-