|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.infoway.messagebuilder.xml.ChoiceSupport
ca.infoway.messagebuilder.xml.Relationship
public class Relationship
A message part relationship (either an attribute or an association).
Fundamentally, we think of there being four types of relationships:
Constructor Summary | |
---|---|
Relationship()
Default constructor. |
|
Relationship(String name,
String type,
Cardinality cardinality)
Standard constructor. |
Method Summary | |
---|---|
void |
addDifference(Difference difference)
|
Cardinality |
getCardinality()
Get the cardinality. |
List<Relationship> |
getChoices()
Get a list of all choices. |
CodingStrength |
getCodingStrength()
Get the coding strength. |
ConformanceLevel |
getConformance()
Get the conformance level. |
String |
getDefaultValue()
Get the default value. |
List<Difference> |
getDifferences()
Records the differences between relationships of different release versions during regen. |
Documentation |
getDocumentation()
Get the documentation. |
DomainSource |
getDomainSource()
Get the vocabulary source. |
String |
getDomainType()
The domain type. |
String |
getFixedValue()
Get the fixed value. |
Integer |
getLength()
Get the maximum string length. |
String |
getName()
Get the relationship name. |
String |
getParentType()
The type containing this relationship |
int |
getSortOrder()
Get the sort order. |
String |
getTemplateParameterName()
Get the template parameter name. |
String |
getType()
Get the relationship type. |
UpdateMode |
getUpdateMode()
Gets the update mode information that may be used for this element. |
boolean |
hasFixedValue()
Checks if has fixed value. |
boolean |
isAssociation()
Get a flag indicating whether or not the relationship is an association. |
boolean |
isAttribute()
Get a flag indicating whether or not the relationship is an attribute. |
boolean |
isChoice()
Get a flag indicating whether or not the relationship is a choice association. |
boolean |
isCodedType()
Get a flag indicating whether or not the relationship is a coded type. |
boolean |
isFixed()
Get a flag indicating whether or not the relationship is a fixed value and is mandatory. |
boolean |
isMandatory()
Get a flag indicating whether or not the relationship is mandatory. |
boolean |
isPopulated()
Get a flag indicating whether or not the relationship is populated. |
boolean |
isStructural()
Get the structural flag. |
boolean |
isTemplateRelationship()
Get a flag indicating whether or not the relationship is a template relationship. |
void |
setCardinality(Cardinality cardinality)
Set the cardinality. |
void |
setCodingStrength(CodingStrength codingStrength)
Set the codeing strength. |
void |
setConformance(ConformanceLevel conformance)
Set the conformance level. |
void |
setDefaultValue(String defaultValue)
Set the default value. |
void |
setDifferences(List<Difference> differences)
|
void |
setDocumentation(Documentation documentation)
Set the documentation. |
void |
setDomainSource(DomainSource domainSource)
Set the vocabulary source. |
void |
setDomainType(String domainType)
Set the domain type. |
void |
setFixedValue(String fixedValue)
Set the fixed value. |
void |
setLength(Integer length)
Set the maximum string length. |
void |
setName(String name)
Set the name. |
void |
setParentType(String parentType)
The type containing this relationship |
void |
setSortOrder(int sortOrder)
Set the sort order. |
void |
setStructural(boolean structural)
Set the structural flag. |
void |
setTemplateParameterName(String templateParameterName)
Set the template parameter name. |
void |
setType(String type)
Set the type. |
void |
setUpdateMode(UpdateMode updateMode)
Gets the update mode information that may be used for this element. |
String |
toString()
Standard toString method. |
Methods inherited from class ca.infoway.messagebuilder.xml.ChoiceSupport |
---|
choiceOptionNamePredicate, choiceOptionTypePredicate, findChoiceOption |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Relationship()
Default constructor.
public Relationship(String name, String type, Cardinality cardinality)
Standard constructor.
name
- - the relationship nametype
- - the relationship typecardinality
- - the cardinality.Method Detail |
---|
public String getName()
Get the relationship name.
getName
in interface Named
public void setName(String name)
Set the name.
name
- - the new value.public String getType()
Get the relationship type.
Typical types for an attribute might be "II.OID", "LIST<TS.FULLDATE>" or "ST".
Typical types for an association might be "PRPA_MT101103CA.PatientBirthTime". This property is blank if the relationship represents a template relationship.
getType
in interface Typed
public void setType(String type)
Set the type.
type
- - the new valuepublic boolean isStructural()
Get the structural flag.
public void setStructural(boolean structural)
Set the structural flag.
structural
- - the new valuepublic String getDomainType()
The domain type. If a relationship is an attribute and the type is a coded type (e.g. "CD"), then the domain type represents the domain information (e.g. "ProcessingMode").
public void setDomainType(String domainType)
Set the domain type.
domainType
- - the new valuepublic ConformanceLevel getConformance()
Get the conformance level.
public void setConformance(ConformanceLevel conformance)
Set the conformance level.
conformance
- the conformance level.public Cardinality getCardinality()
Get the cardinality.
public void setCardinality(Cardinality cardinality)
Set the cardinality.
cardinality
- - the new valuepublic int getSortOrder()
Get the sort order. The sort order represents the order that the XML elements appear in.
public void setSortOrder(int sortOrder)
Set the sort order.
sortOrder
- - the new valuepublic String getFixedValue()
Get the fixed value. Only attributes can have fixed values. Typically, fixed values are either code values (e.g. classCode="SBJ") or booleans ("true" or "false").
public boolean hasFixedValue()
Checks if has fixed value. Only attributes can have fixed values. Typically, fixed values are either code values (e.g. classCode="SBJ") or booleans ("true" or "false").
public void setFixedValue(String fixedValue)
Set the fixed value.
fixedValue
- - the new valuepublic Documentation getDocumentation()
Get the documentation.
getDocumentation
in interface Documentable
public void setDocumentation(Documentation documentation)
Set the documentation.
setDocumentation
in interface Documentable
documentation
- - the new valuepublic boolean isAttribute()
Get a flag indicating whether or not the relationship is an attribute.
public boolean isChoice()
Get a flag indicating whether or not the relationship is a choice association.
public boolean isFixed()
Get a flag indicating whether or not the relationship is a fixed value and is mandatory.
public boolean isAssociation()
Get a flag indicating whether or not the relationship is an association.
public boolean isMandatory()
Get a flag indicating whether or not the relationship is mandatory.
public boolean isPopulated()
Get a flag indicating whether or not the relationship is populated.
public boolean isCodedType()
Get a flag indicating whether or not the relationship is a coded type.
public boolean isTemplateRelationship()
Get a flag indicating whether or not the relationship is a template relationship.
The implementation of this method is based on knowledge that sometimes message sets have been complete. In a perfect world, a relationship would be a template relationship if there is a template parameter name. In fact, some XSD-generated message set files are missing the type of the choice.
public List<Relationship> getChoices()
Get a list of all choices.
getChoices
in class ChoiceSupport
public String getTemplateParameterName()
Get the template parameter name. Only template associations should have a template parameter name.
public void setTemplateParameterName(String templateParameterName)
Set the template parameter name.
templateParameterName
- - the new value.public Integer getLength()
Get the maximum string length.
public void setLength(Integer length)
Set the maximum string length.
length
- - the new valuepublic CodingStrength getCodingStrength()
Get the coding strength.
public void setCodingStrength(CodingStrength codingStrength)
Set the codeing strength.
codingStrength
- - the new value.public String getDefaultValue()
Get the default value. Typically, only boolean fields have default values.
public void setDefaultValue(String defaultValue)
Set the default value.
defaultValue
- - the new valuepublic String toString()
Standard toString method.
toString
in class Object
public List<Difference> getDifferences()
getDifferences
in interface HasDifferences
public void setDifferences(List<Difference> differences)
public void addDifference(Difference difference)
addDifference
in interface HasDifferences
public DomainSource getDomainSource()
Get the vocabulary source.
public void setDomainSource(DomainSource domainSource)
Set the vocabulary source.
vocabulary
- source - the new value.public UpdateMode getUpdateMode()
Gets the update mode information that may be used for this element.
public void setUpdateMode(UpdateMode updateMode)
Gets the update mode information that may be used for this element.
updateMode
- public String getParentType()
public void setParentType(String parentType)
parentType
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |