|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.ephyra.answerselection.definitional.Dossier
public class Dossier
A Dossier specifies different properties of a target (such as a
person or an event). These properties depend on the target type. For
instance, a person has a property 'nationality', whereas an event has a
property 'date'.
| Field Summary | |
|---|---|
static java.lang.String |
ENTERTAINMENT
|
private static java.lang.String[] |
ENTERTAINMENT_PROPERTIES
|
static java.lang.String |
EVENT
|
private static java.lang.String[] |
EVENT_PROPERTIES
|
static java.lang.String |
ORGANIZATION
|
private static java.lang.String[] |
ORGANIZATION_PROPERTIES
|
static java.lang.String |
PERSON
|
private static java.lang.String[] |
PERSON_PROPERTIES
|
private java.util.Properties |
properties
|
private java.lang.String[] |
propertyNames
|
protected java.lang.String |
target
|
protected java.lang.String |
targetType
|
private static java.util.HashMap<java.lang.String,java.lang.String[]> |
targetTypeProperties
|
private static java.util.ArrayList<java.lang.String> |
targetTypes
|
static java.lang.String |
THING
|
private static java.lang.String[] |
THING_PROPERTIES
|
| Constructor Summary | |
|---|---|
Dossier(java.lang.String target,
java.lang.String targetType)
|
|
| Method Summary | |
|---|---|
static void |
addTargetType(java.lang.String targetType,
java.lang.String[] properties)
register an additional type of target (hard coded are PERSON, ORGANIZATION, EVENT, ENTERTAINMENT and THING) |
static void |
addTargetTypeProperty(java.lang.String targetType,
java.lang.String property)
add a property to some existing target type |
static Dossier |
getDossier(java.lang.String target,
java.lang.String targetType,
java.lang.String[] givenProperties,
java.lang.String[] givenValues)
produce a dossier |
java.lang.String[] |
getMissingPropertyNames()
|
protected static java.lang.String[] |
getPropertiesForTargetType(java.lang.String targetType)
retrieve the names of the properties interesting for some given type of target |
java.lang.String |
getProperty(java.lang.String property)
retrieve the value of a property |
java.lang.String[] |
getPropertyNames()
|
java.lang.String |
getTarget()
|
java.lang.String |
getTargetType()
|
static java.lang.String |
getTargetType(java.lang.String[] givenProperties)
determine the type of a target, using properties as evidence |
boolean |
isPropertySet(java.lang.String property)
check if this dossier already contains a value for some property |
void |
setProperty(java.lang.String property,
java.lang.String value)
set a property of the target to a given value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String target
protected java.lang.String targetType
private java.lang.String[] propertyNames
private java.util.Properties properties
private static java.util.ArrayList<java.lang.String> targetTypes
private static java.util.HashMap<java.lang.String,java.lang.String[]> targetTypeProperties
public static final java.lang.String PERSON
public static final java.lang.String ORGANIZATION
public static final java.lang.String EVENT
public static final java.lang.String THING
public static final java.lang.String ENTERTAINMENT
private static final java.lang.String[] PERSON_PROPERTIES
private static final java.lang.String[] ORGANIZATION_PROPERTIES
private static final java.lang.String[] EVENT_PROPERTIES
private static final java.lang.String[] THING_PROPERTIES
private static final java.lang.String[] ENTERTAINMENT_PROPERTIES
| Constructor Detail |
|---|
public Dossier(java.lang.String target,
java.lang.String targetType)
target - the target StringtargetType - the type of the target| Method Detail |
|---|
public java.lang.String getTarget()
public java.lang.String getTargetType()
public void setProperty(java.lang.String property,
java.lang.String value)
property - the name of the propertyvalue - the value of the propertypublic java.lang.String getProperty(java.lang.String property)
property - the name of the property
public boolean isPropertySet(java.lang.String property)
property - the name of the property to check
public java.lang.String[] getPropertyNames()
public java.lang.String[] getMissingPropertyNames()
protected static java.lang.String[] getPropertiesForTargetType(java.lang.String targetType)
targetType - the target type
public static java.lang.String getTargetType(java.lang.String[] givenProperties)
givenProperties - the names of the properties already known
public static Dossier getDossier(java.lang.String target,
java.lang.String targetType,
java.lang.String[] givenProperties,
java.lang.String[] givenValues)
target - the target stringtargetType - the target type (if set to null, the target type will be determined automatically from the given properties)givenProperties - the properties of the target that are properties already knowngivenValues - the values associated with the known properties
public static void addTargetType(java.lang.String targetType,
java.lang.String[] properties)
targetType - the name for the new target typeproperties - the properties that are of interes with regard to the new target type
public static void addTargetTypeProperty(java.lang.String targetType,
java.lang.String property)
targetType - the target typeproperty - the new property to be associated with the specified target type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||