public class Instance extends Object implements Comparable<Object>, Serializable
| Modifier and Type | Field and Description |
|---|---|
double |
distance |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(String propUri,
String value)
Add a new (property, value) pair
|
void |
addProperty(String propUri,
TreeSet<String> values) |
int |
compareTo(Object o)
Comparison with other Instances
|
Instance |
copy() |
boolean |
equals(Object obj) |
Set<String> |
getAllProperties()
Returns all the properties associated with this instance
|
TreeSet<String> |
getProperty(String propUri)
Return all the values for a given property
|
String |
getUri()
Returns the URI of this instance
|
int |
hashCode() |
void |
removePropery(String uri)
Removes property with URI uri from this Instance
|
void |
replaceProperty(String propUri,
TreeSet<String> values) |
String |
toString() |
public Instance(String _uri)
_uri - URI of the instance. This is the key to accessing it.public void addProperty(String propUri, String value)
propUri - URI of the propertyvalue - value of the property for this instancepublic String getUri()
public TreeSet<String> getProperty(String propUri)
propUri - property URIpublic Set<String> getAllProperties()
public int compareTo(Object o)
compareTo in interface Comparable<Object>o - Instance for comparisonpublic Instance copy()
public void removePropery(String uri)
uri - of the property to be removedCopyright © 2018. All rights reserved.