|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.sswap.http.representation.ValueBase
info.sswap.http.representation.Entity
public class Entity
Represents an entity (e.g., subject, object, etc.)
Field Summary | |
---|---|
private java.util.Map<java.lang.String,Property> |
properties
The multi-map of properties. |
private java.lang.String |
uri
The URI of the entity |
Constructor Summary | |
---|---|
Entity(java.lang.String uri)
Creates a new entity without properties, but with the specified URI. |
|
Entity(java.lang.String uri,
java.util.Collection<Property> properties)
Creates a new entity with the specified uri and properties |
Method Summary | |
---|---|
void |
addProperty(Property property)
Adds a new property |
Entity |
asEntity()
Returns the value as an entity |
Property |
getProperty(java.lang.String name)
Gets all the properties with the given name (URI). |
java.util.Collection<java.lang.String> |
getPropertyNames()
Returns all current property names (URIs) |
java.lang.String |
getURI()
Gets the URI of this entity. |
boolean |
isEntity()
Checks whether this value is an entity. |
Methods inherited from class info.sswap.http.representation.ValueBase |
---|
asArray, asBoolean, asDouble, asInteger, asLiteral, asString, isArray, isBoolean, isDouble, isInteger, isLiteral |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String uri
private java.util.Map<java.lang.String,Property> properties
Constructor Detail |
---|
public Entity(java.lang.String uri)
uri
- the uri for the entitypublic Entity(java.lang.String uri, java.util.Collection<Property> properties)
uri
- the uri for the entityproperties
- the properties for the entityMethod Detail |
---|
public java.util.Collection<java.lang.String> getPropertyNames()
public void addProperty(Property property)
property
- the property to be addedpublic Property getProperty(java.lang.String name)
name
- the name of the property (URI)
public java.lang.String getURI()
public boolean isEntity()
Value
isEntity
in interface Value
isEntity
in class ValueBase
public Entity asEntity()
Value
asEntity
in interface Value
asEntity
in class ValueBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |