Resource.InternalType, Resource.Type
Constructor and Description |
---|
ResourceImpl(Resource.Type type)
Create a resource of the given type.
|
ResourceImpl(Resource resource)
Copy constructor
|
ResourceImpl(Resource resource,
Set<String> propertyIds)
Construct a resource from the given resource, setting only the properties
that are found in the given set of property and category ids.
|
Modifier and Type | Method and Description |
---|---|
void |
addCategory(String id)
Add an empty category to this resource.
|
boolean |
equals(Object o) |
Map<String,Map<String,Object>> |
getPropertiesMap()
Obtain the properties contained by this group in a map structure.
|
Object |
getPropertyValue(String id)
Get a property value for the given property id from this resource.
|
Resource.Type |
getType()
Get the resource type.
|
int |
hashCode() |
void |
setProperty(String id,
Object value)
Set a property value for the given property id on this resource.
|
String |
toString() |
public ResourceImpl(Resource.Type type)
type
- the resource typepublic ResourceImpl(Resource resource)
resource
- the resource to copypublic ResourceImpl(Resource resource, Set<String> propertyIds)
resource
- the resource to copypropertyIds
- the set of requested property and category idspublic Resource.Type getType()
Resource
public Map<String,Map<String,Object>> getPropertiesMap()
Resource
getPropertiesMap
in interface Resource
public void setProperty(String id, Object value)
Resource
setProperty
in interface Resource
id
- the property idvalue
- the valuepublic void addCategory(String id)
Resource
addCategory
in interface Resource
id
- the category idpublic Object getPropertyValue(String id)
Resource
getPropertyValue
in interface Resource
id
- the property idCopyright © 2022 Apache Software Foundation. All rights reserved.