eu.scape_project.watch.domain
Class Property

java.lang.Object
  extended by thewebsemantic.binding.RdfBean<Property>
      extended by eu.scape_project.watch.domain.Property

public class Property
extends thewebsemantic.binding.RdfBean<Property>

A Property defines a specific part of Entity in the world that have the same EntityType, i.e. it represents some characteristic of these Entities. It can specify a data type for its measurements.

Author:
Luis Faria

Constructor Summary
Property()
          Create a new empty property.
Property(EntityType t, String n, String d)
          Create a new property of type DataType.TEXT.
Property(EntityType t, String n, String d, DataType dt)
          Create a new property.
Property(EntityType t, String n, String d, DataType dt, PropertyDataStructure st)
          Create a new property.
Property(EntityType t, String n, String d, PropertyDataStructure st)
          Create a new property.
 
Method Summary
static String createId(String entityTypeName, String propertyName)
          Get the property id based on the entity type and property name.
 void delete()
           
 boolean equals(Object obj)
           
 DataType getDatatype()
           
 String getDescription()
           
 String getId()
           
 String getName()
           
 PropertyDataStructure getStructure()
           
 EntityType getType()
           
 int hashCode()
           
 Property save()
           
 void setDatatype(DataType datatype)
           
 void setDescription(String description)
           
 void setName(String name)
          Set the name and update the Id.
 void setStructure(PropertyDataStructure structure)
           
 void setType(EntityType entityType)
          Set the Entity Type and update the Id.
 String toString()
           
 
Methods inherited from class thewebsemantic.binding.RdfBean
asIndividual, fill, fill, load, query, refresh
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Property

public Property()
Create a new empty property.


Property

public Property(EntityType t,
                String n,
                String d)
Create a new property of type DataType.TEXT. Sets the datatype to DataType.TEXT and the property datastructure to PropertyDataStructure.SINGLE by default.

Parameters:
t - The related entity type.
n - The name, unique within properties of the same type.
d - The description of the Property.

Property

public Property(EntityType t,
                String n,
                String d,
                DataType dt)
Create a new property. Sets the property datastructure to PropertyDataStructure.SINGLE

Parameters:
t - The related entity type.
n - The name, unique within properties of the same type.
d - The description of the Property.
dt - The type of data defined by this property.

Property

public Property(EntityType t,
                String n,
                String d,
                PropertyDataStructure st)
Create a new property. Sets the data type to DataType.TEXT.

Parameters:
t - the related entity type.
n - the name, unique within properties of the same type.
d - the description of the Property.
st - the data structure type of the related values.

Property

public Property(EntityType t,
                String n,
                String d,
                DataType dt,
                PropertyDataStructure st)
Create a new property.

Parameters:
t - the related entity type.
n - the name, unique within properties of the same type.
d - the description of the Property.
dt - the type of data defined by this property.
st - the data structure type of the related values.
Method Detail

createId

public static String createId(String entityTypeName,
                              String propertyName)
Get the property id based on the entity type and property name.

Parameters:
entityTypeName - the related entity type
propertyName - the property name, unique for the related entity type
Returns:
The identifier

getId

public String getId()

getType

public EntityType getType()

setType

public void setType(EntityType entityType)
Set the Entity Type and update the Id.

Parameters:
entityType - The new related EntityType

getName

public String getName()

setName

public void setName(String name)
Set the name and update the Id.

Parameters:
name - The new name

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getDatatype

public DataType getDatatype()

setDatatype

public void setDatatype(DataType datatype)

getStructure

public PropertyDataStructure getStructure()

setStructure

public void setStructure(PropertyDataStructure structure)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

save

public Property save()
Overrides:
save in class thewebsemantic.binding.RdfBean<Property>

delete

public void delete()
Overrides:
delete in class thewebsemantic.binding.RdfBean<Property>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.