public final class GroupedPropertiesImpl extends java.lang.Object implements GroupedProperties
Modifier and Type | Class and Description |
---|---|
static interface |
GroupedPropertiesImpl.UriTransformation |
Modifier and Type | Method and Description |
---|---|
static GroupedPropertiesImpl |
fromJson(Schema schema,
com.fasterxml.jackson.databind.JsonNode json)
Create an object that implements GroupedProperties from a tree of JsonNode objects
|
static GroupedPropertiesImpl |
fromJson(Schema schema,
java.lang.String json)
Create an object that implements GroupedProperties from a JSON string,
|
java.util.List<FileReference> |
getAllFileReferences()
Get all file references included in this Grouped Properties.
|
java.lang.Boolean |
getBooleanProp(java.lang.String propertyName)
Retrieve the value of a property with type
Property.Type.BOOLEAN in the schema. |
java.lang.Double |
getDoubleProp(java.lang.String propertyName)
Retrieve the value of a property with type
Property.Type.DOUBLE in the schema. |
FileReference |
getFileReferenceProp(java.lang.String propertyName)
Retrieve the value of a property with type
Property.Type.FILE in the schema. |
java.lang.Long |
getLongProp(java.lang.String propertyName)
Retrieve the value of a property with type
Property.Type.LONG in the schema. |
java.util.regex.Pattern |
getRegexProp(java.lang.String propertyName)
Retrieve the value of a property with type
Property.Type.REGEX in the schema. |
java.util.List<GroupedProperties> |
getRepeatGroup(java.lang.String groupName)
Retrieve a group with type
Group.Type.REPEAT in the schema. |
java.util.List<GroupedPropertiesImpl> |
getRepeatGroupInternal(java.lang.String groupName) |
GroupedProperties |
getSimpleGroup(java.lang.String groupName)
Retrieve a group with type
Group.Type.SIMPLE in the schema. |
java.util.List<java.lang.String> |
getStringListProp(java.lang.String propertyName)
Retrieve the value of a property with type
Property.Type.LIST in the schema. |
java.util.Map<java.lang.String,java.lang.String> |
getStringMapProp(java.lang.String propertyName)
Retrieve the value of a property with type
Property.Type.MAP in the schema. |
java.lang.String |
getStringProp(java.lang.String propertyName)
Retrieve the value of a property with type
Property.Type.STRING or
Property.Type.ENUM in the schema. |
java.util.List<FileReference> |
processEachFileReferenceURI(GroupedPropertiesImpl.UriTransformation transformation)
Transform each file references included in this Grouped Properties using the supplied
transformation.
|
java.lang.String |
toJson()
Serialize the content of this object to a JSON String.
|
com.fasterxml.jackson.databind.JsonNode |
toJsonNode()
Convert this object into a tree of JsonNode objects.
|
public static GroupedPropertiesImpl fromJson(Schema schema, java.lang.String json) throws com.fasterxml.jackson.core.JsonProcessingException
GroupedProperties
fromJson
in interface GroupedProperties
schema
- The schema for the GroupedPropertiesjson
- A Json string containing the property valuescom.fasterxml.jackson.core.JsonProcessingException
- When the JSON is invalidpublic static GroupedPropertiesImpl fromJson(Schema schema, com.fasterxml.jackson.databind.JsonNode json) throws com.fasterxml.jackson.core.JsonProcessingException
GroupedProperties
fromJson
in interface GroupedProperties
schema
- The schema for the GroupedPropertiesjson
- The root node of the object treecom.fasterxml.jackson.core.JsonProcessingException
- When the JSON is valid but does not match the provided schemapublic java.lang.String toJson()
GroupedProperties
toJson
in interface GroupedProperties
public com.fasterxml.jackson.databind.JsonNode toJsonNode()
GroupedProperties
toJsonNode
in interface GroupedProperties
public java.util.List<FileReference> processEachFileReferenceURI(GroupedPropertiesImpl.UriTransformation transformation)
transformation
- The transformation to apply to each file reference.public java.util.List<FileReference> getAllFileReferences()
public java.lang.Boolean getBooleanProp(java.lang.String propertyName)
GroupedProperties
Property.Type.BOOLEAN
in the schema.getBooleanProp
in interface GroupedProperties
propertyName
- The name of the propertypublic java.lang.Double getDoubleProp(java.lang.String propertyName)
GroupedProperties
Property.Type.DOUBLE
in the schema.getDoubleProp
in interface GroupedProperties
propertyName
- The name of the propertypublic FileReference getFileReferenceProp(java.lang.String propertyName)
GroupedProperties
Property.Type.FILE
in the schema.getFileReferenceProp
in interface GroupedProperties
propertyName
- The name of the propertypublic java.lang.Long getLongProp(java.lang.String propertyName)
GroupedProperties
Property.Type.LONG
in the schema.getLongProp
in interface GroupedProperties
propertyName
- The name of the propertypublic java.util.regex.Pattern getRegexProp(java.lang.String propertyName)
GroupedProperties
Property.Type.REGEX
in the schema.getRegexProp
in interface GroupedProperties
propertyName
- The name of the propertypublic java.lang.String getStringProp(java.lang.String propertyName)
GroupedProperties
Property.Type.STRING
or
Property.Type.ENUM
in the schema.getStringProp
in interface GroupedProperties
propertyName
- The name of the propertypublic java.util.List<java.lang.String> getStringListProp(java.lang.String propertyName)
GroupedProperties
Property.Type.LIST
in the schema.getStringListProp
in interface GroupedProperties
propertyName
- The name of the propertypublic java.util.Map<java.lang.String,java.lang.String> getStringMapProp(java.lang.String propertyName)
GroupedProperties
Property.Type.MAP
in the schema.getStringMapProp
in interface GroupedProperties
propertyName
- The name of the propertypublic GroupedProperties getSimpleGroup(java.lang.String groupName)
GroupedProperties
Group.Type.SIMPLE
in the schema.getSimpleGroup
in interface GroupedProperties
groupName
- The name of the grouppublic java.util.List<GroupedPropertiesImpl> getRepeatGroupInternal(java.lang.String groupName)
public java.util.List<GroupedProperties> getRepeatGroup(java.lang.String groupName)
GroupedProperties
Group.Type.REPEAT
in the schema.getRepeatGroup
in interface GroupedProperties
groupName
- The name of the group