public class Resource extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Resource.Builder
The Builder class instanciates new Resources.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME_DESCRIPTOR |
static String |
TYPE_DESCRIPTOR |
| Modifier | Constructor and Description |
|---|---|
protected |
Resource(Map<String,String> properties,
Map<String,String> descriptors)
Constructs a new resource, given the properties and descriptors.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
filterProperties(Collection<String> filter)
Gets all properties matching particular keys.
|
String |
getDescriptor(String descriptor) |
Map<String,String> |
getDescriptors() |
String |
getName() |
Map<String,String> |
getProperties() |
String |
getProperty(String property) |
String |
getProperty(String property,
String defaultValue) |
String |
getType() |
public static final String NAME_DESCRIPTOR
public static final String TYPE_DESCRIPTOR
protected Resource(Map<String,String> properties, Map<String,String> descriptors)
properties - A map of key-value pairs for all the properties.descriptors - A map of key-value pairs for all descriptors (keys ~ __*__ in the metadata)public String getName()
public String getType()
public Map<String,String> filterProperties(Collection<String> filter)
filter - A list of keys to find in the properties.Copyright © 2013. All Rights Reserved.