示例#1
0
 /**
  * Construct a content item of a specified type and relationship, creating a new {@link
  * com.pixelmed.dicom.AttributeList AttributeList}, and add it as a child of the specified parent.
  *
  * <p>The constructor is protected. Instances of specific types of content items should normally
  * be created by using the {@link com.pixelmed.dicom.ContentItemFactory ContentItemFactory}.
  *
  * @param p the parent
  * @param valueType
  * @param relationshipType added only if not null or zero length
  * @param conceptName
  * @throws DicomException
  */
 protected ContentItemWithValue(
     ContentItem p, String valueType, String relationshipType, CodedSequenceItem conceptName)
     throws DicomException {
   super(p, relationshipType);
   this.valueType = valueType;
   {
     Attribute a = new CodeStringAttribute(TagFromName.ValueType);
     a.addValue(valueType);
     list.put(a);
   }
   this.conceptName = conceptName;
   if (conceptName != null) {
     SequenceAttribute a = new SequenceAttribute(TagFromName.ConceptNameCodeSequence);
     a.addItem(conceptName.getAttributeList());
     list.put(a);
   }
 }
示例#2
0
 private void extractContentItemWithValueCommonAttributes() {
   valueType =
       Attribute.getSingleStringValueOrNull(
           list,
           TagFromName
               .ValueType); // NB. Use null rather than default "" to make symmetric with de novo
                            // constructor
   conceptName =
       CodedSequenceItem.getSingleCodedSequenceItemOrNull(
           list, TagFromName.ConceptNameCodeSequence);
 }