|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eu.planets_project.services.datatypes.Property
public final class Property
Property representation using an URI as ID.
For the most common case (a property with ID, name and value), use the Property(URI, String, String)
constructor:
Property p = new Property(uri, name, value);
Property.Builder
:
Property p = new Property.Builder(uri).unit(unit).build();
Instances of this class are immutable and so can be shared.
Nested Class Summary | |
---|---|
static class |
Property.Builder
Builder to create property instances with optional attributes. |
Constructor Summary | |
---|---|
Property(java.net.URI uri,
java.lang.String name,
java.lang.String value)
Create a property with id, name and value. |
Method Summary | |
---|---|
static Property |
authorizedRoles(java.lang.String roles)
This is a convenience method, equivalent to "new Property(ServiceDescription.PROPERTY, ServiceDescription.AUTHORIZED_ROLES, roles)". |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getDescription()
|
java.lang.String |
getName()
|
java.lang.String |
getType()
|
java.lang.String |
getUnit()
|
java.net.URI |
getUri()
|
java.lang.String |
getValue()
|
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Property(java.net.URI uri, java.lang.String name, java.lang.String value)
Property.Builder
instead.
uri
- The property IDname
- The property namevalue
- The property valueMethod Detail |
---|
public java.net.URI getUri()
public java.lang.String getName()
public java.lang.String getValue()
public java.lang.String getUnit()
public java.lang.String getDescription()
public java.lang.String getType()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public static Property authorizedRoles(java.lang.String roles)
roles
- The authorized roles, comma-separated (e.g. "admin,provider")
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |