|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.contentmanagement.layerindependent.descriptions.BasicReferenceDescription
public class BasicReferenceDescription
Defines constants related to refernces between two info objects as well as an layer-independent representation of such a reference. Layer independent is achieved by having no dependencies to any class of other layers. By this, it can easily be used in combination with Storage as well as Content Layer, on server as well as client side, whereas stubs should be used only within one layer and in the boundary between them.
Field Summary | |
---|---|
static java.lang.String |
ANY_ROLE
wildcard for querying references with arbitrary role |
static java.lang.String |
PROPAGATE_DELETE_SOURCE
will cascade the delete event of the target object to the source object of the reference. |
static java.lang.String |
PROPAGATE_DELETE_SOURCE_IF_SINGLE_APPEARANCE
will propagate delete event of the target object if and onlf if the source object does not appear in any other reference with the same role |
static java.lang.String |
PROPAGATE_DELETE_TARGET
will cascade the delete event of the source object to the target object of the reference. |
static java.lang.String |
PROPAGATE_DELETE_TARGET_IF_SINGLE_APPEARANCE
will propagate delete event of the source object if and onlf if the target object does not appear in any other reference with the same role |
static java.lang.String |
PROPAGATE_NO_DELETE
will not propagate any delete event of the target object of this reference |
static java.lang.String |
REFERENCE
generic reference String for error identification |
static java.lang.String |
RELATION_LEGACY_ROLE_CONTAINED
Deprecated. Should no longer be used, since the ordering is not that useful if a child orders it's parents than the other way round. Has been replaced by RELATION_ROLE_CONTAINS .
Existing records receive special treatment, this means, they
will get inverted / updated to new style automatically. |
static java.lang.String |
RELATION_ROLE_ANNOTATION
Deprecated. |
static java.lang.String |
RELATION_ROLE_CONTAINS
part-of relationship: source is parent document/collection, target is child document / collection. |
static java.lang.String |
RELATION_ROLE_MEMBERSHIP
membership relationship: source is document, target is collection |
static java.lang.String |
RELATION_ROLE_METADATA
metadata relationship: source is document, target is metadata |
static java.lang.String |
RELATION_ROLE_REPRESENTATION
alternative representation relationship: source is the main representation of the content, target represents the same content in a different form is the target, e.g. |
static java.lang.String |
ROLE
generic role String for error identification |
static int |
UNDEFINED_POSITION
indicates that a position has not been defined |
Constructor Summary | |
---|---|
BasicReferenceDescription()
Empty constructor, should only be used for internal purposes. |
|
BasicReferenceDescription(java.lang.String sourceoid,
java.lang.String targetoid,
java.lang.String role,
int position,
java.lang.String rule)
Constructs a reference description with all inforamtion except for secondary role set initially |
|
BasicReferenceDescription(java.lang.String sourceoid,
java.lang.String targetoid,
java.lang.String role,
java.lang.String secondaryRole,
int position,
java.lang.String rule)
Constructs a reference description with all inforamtion set initially |
Method Summary | |
---|---|
int |
getPosition()
Returns the position of the references. |
java.lang.String |
getPropagationRule()
Returns the propagation rule for this reference. |
java.lang.String |
getRole()
Returns the primary role of the source object with respect to the target object of the reference. |
java.lang.String |
getSecondaryRole()
Returns the secondary role |
java.lang.String |
getSourceOID()
Returns the object ID of the source object |
java.lang.String |
getTargetOID()
Returns the object ID of the target object |
void |
setPosition(int position)
Sets the position of the references. |
void |
setPropagationRule(java.lang.String propagationRule)
Sets the propagation rule for this reference. |
void |
setRole(java.lang.String role)
Sets the primary role of the source object with respect to the target object of the reference. |
void |
setSecondaryRole(java.lang.String secondaryRole)
Sets the secondary role |
void |
setSourceOID(java.lang.String sourceoid)
Sets the object ID of the source object |
void |
setTargetOID(java.lang.String targetoid)
Sets the object ID of the target object |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPAGATE_DELETE_TARGET_IF_SINGLE_APPEARANCE
public static final java.lang.String PROPAGATE_DELETE_SOURCE_IF_SINGLE_APPEARANCE
public static final java.lang.String PROPAGATE_DELETE_TARGET
public static final java.lang.String PROPAGATE_DELETE_SOURCE
public static final java.lang.String PROPAGATE_NO_DELETE
public static final int UNDEFINED_POSITION
public static final java.lang.String ANY_ROLE
public static final java.lang.String RELATION_ROLE_MEMBERSHIP
public static final java.lang.String RELATION_ROLE_CONTAINS
public static final java.lang.String REFERENCE
public static final java.lang.String ROLE
@Deprecated public static final java.lang.String RELATION_LEGACY_ROLE_CONTAINED
RELATION_ROLE_CONTAINS
.
Existing records receive special treatment, this means, they
will get inverted / updated to new style automatically.
public static final java.lang.String RELATION_ROLE_REPRESENTATION
RELATION_ROLE_CONTAINS
,
Constant Field Valuespublic static final java.lang.String RELATION_ROLE_METADATA
@Deprecated public static final java.lang.String RELATION_ROLE_ANNOTATION
Constructor Detail |
---|
public BasicReferenceDescription(java.lang.String sourceoid, java.lang.String targetoid, java.lang.String role, int position, java.lang.String rule)
sourceoid
- the object ID of the source objecttargetoid
- the object ID of the target objectrole
- the role of the source obejct with regard to the target objectposition
- the position, of ordering is important or
rule
- the propagation rulepublic BasicReferenceDescription(java.lang.String sourceoid, java.lang.String targetoid, java.lang.String role, java.lang.String secondaryRole, int position, java.lang.String rule)
sourceoid
- the object ID of the source objecttargetoid
- the object ID of the target objectrole
- the role of the source obejct with regard to the target objectsecondaryRole
- the secondary roleposition
- the position, of ordering is important or
rule
- the propagation rulepublic BasicReferenceDescription()
Method Detail |
---|
public int getPosition()
UNDEFINED_POSITION
public void setPosition(int position)
position
- the positionpublic java.lang.String getPropagationRule()
PROPAGATE_DELETE_SOURCE
,
PROPAGATE_DELETE_SOURCE_IF_SINGLE_APPEARANCE
,
PROPAGATE_DELETE_TARGET
,
PROPAGATE_DELETE_TARGET_IF_SINGLE_APPEARANCE
,
PROPAGATE_NO_DELETE
public void setPropagationRule(java.lang.String propagationRule)
propagationRule
- the propation rulePROPAGATE_DELETE_SOURCE
,
PROPAGATE_DELETE_SOURCE_IF_SINGLE_APPEARANCE
,
PROPAGATE_DELETE_TARGET
,
PROPAGATE_DELETE_TARGET_IF_SINGLE_APPEARANCE
,
PROPAGATE_NO_DELETE
public java.lang.String getRole()
RELATION_ROLE_CONTAINS
,
RELATION_ROLE_MEMBERSHIP
,
RELATION_ROLE_METADATA
public void setRole(java.lang.String role)
RELATION_LEGACY_ROLE_CONTAINED
role
- the roleRELATION_ROLE_CONTAINS
,
RELATION_ROLE_MEMBERSHIP
,
RELATION_ROLE_METADATA
public java.lang.String getSourceOID()
public void setSourceOID(java.lang.String sourceoid)
sourceoid
- the object ID from which the reference originspublic java.lang.String getTargetOID()
public void setTargetOID(java.lang.String targetoid)
targetoid
- the object ID to which the reference is pointingpublic java.lang.String getSecondaryRole()
public void setSecondaryRole(java.lang.String secondaryRole)
secondaryRole
- the secondary role
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |