Direct how to handle a subject element.
519075
def subject_director(**kwargs):
    """"""
    if kwargs.get('qualifier') not in ['KWD', '']:
        return ETD_MSSubject(scheme=kwargs.get('qualifier'), **kwargs)
    else:
        return ETD_MSSubject(content=kwargs.get('content'))
540768
private void encodeSubject(Subject subject, PrintStream out,
                                  Indenter indenter) {
        char [] indent = indenter.makeString().toCharArray();
        out.print(indent);
        out.append("<Subject SubjectCategory=\"")
           .append(subject.getCategory().toString()).append('"');

        List subjectAttrs = subject.getAttributesAsList();
        
        if (subjectAttrs.size() == 0) {
            // there's nothing in this Subject, so just close the tag
            out.println("/>");
        } else {
            // there's content, so fill it in
            out.println('>');

            encodeAttributes(subjectAttrs, out, indenter);
        
            out.print(indent);
            out.println("</Subject>");
        }
    }
1038931
def postprocess_subject(self, entry):
        

        if type(entry.subject) not in [str, unicode]:
            subject = u' '.join([unicode(k) for k in entry.subject])
        else:
            subject = entry.subject
        entry.subject = [k.strip().upper() for k in subject.split(';')]
1261010
def head(self, item):
        """"""
        uri = "/%s/%s" % (self.uri_base, utils.get_id(item))
        return self._head(uri)
688518
def start_element (self, tag, attrs):
        """"""
        if tag == 'title':
            data = self.parser.peek(MAX_TITLELEN)
            data = data.decode(self.parser.encoding, "ignore")
            self.title = linkname.title_name(data)
            raise StopParse("found <title> tag")
        elif tag == 'body':
            raise StopParse("found <body> tag")
1046613
def add_subject(self, subject_id, attributes, parents=[],
            issuer='default'):
        
        # MAINT: consider test to avoid adding duplicate subject id
        assert isinstance(attributes, (dict)), "attributes expected to be dict"

        attrs = []
        for key in attributes.keys():
            attrs.append({
                'issuer': issuer,
                'name': key,
                'value': attributes[key]
                })

        body = {
            "subjectIdentifier": subject_id,
            "parents": parents,
            "attributes": attrs,
        }

        return self._put_subject(subject_id, body)
656912
def add_child(self, label_str, type_str):
        """"""
        child_node = SubjectInfoNode(label_str, type_str)
        child_node.parent = self
        self.child_list.append(child_node)
        return child_node
888800
function handleDescription(description, element, parent, spaces, marker) {
  const elementName = element.element;
  let str = '';

  // This flag determines when to use a block description within a list entry
  // instead of just ending the list entry line with the description. This
  // means that some other special values like `+ Properties` will get used
  // later during rendering.
  let useLongDescription = false;
  if (element.attributes &&
      (element.attributes.default !== undefined ||
       element.attributes.sample !== undefined)) {
    useLongDescription = true;
  }

  // Finally, an optional description
  if (description) {
    if (description.indexOf('\n') !== -1) {
      // Multiline description, so we can't use the short form!
      useLongDescription = true;
    }

    if (useLongDescription) {
      str += `\n${description}`;
    } else {
      str += ` - ${description}`;
    }
  }

  // Handle special list items like default/sample here as they are part
  // of the description, before the content (sub-elements) are rendere.
  const defaultValue = element.attributes &&
                       element.attributes.getValue('default');
  if (defaultValue !== undefined) {
    str += `\n${marker} Default: ${defaultValue}\n`;
  }

  const sampleValue = element.attributes &&
                      element.attributes.getValue('sample');
  if (sampleValue !== undefined) {
    str += `\n${marker} Sample: ${sampleValue}\n`;
  }

  // Now, depending on the content type, we will recursively handle child
  // elements within objects and arrays.
  if (element.content && element.content.length) {
    str += '\n';

    if (!parent) {
      // No parent implies a data structure or attribute definition, so
      // buffer it with an extra space.
      str += '\n';
    }

    const [renderedContent, objectLike] = handleContent(element, spaces, marker);

    if (!useLongDescription) {
      str += renderedContent;
    } else if (renderedContent.length) {
      // There is rendered content
      if (objectLike) {
        str += `\n${marker} Properties\n`;
      } else if (elementName === 'enum') {
        // An enum is a special case where the content is a list
        // but you use `Members` rather than `Items`.
        str += `\n${marker} Members\n`;
      } else {
        str += `\n${marker} Items\n`;
      }

      str += indent(renderedContent, spaces, {first: true});
    }
  }

  return str;
}
875303
def handle_data(self, data):
        
        if self.current_parent_element['tag'] == '':
            self.cleaned_html += '<p>'
            self.current_parent_element['tag'] = 'p'

        self.cleaned_html += data
787829
def handle_has_components(self, _, __, tokens: ParseResults) -> ParseResults:
        """"""
        return self._handle_list_helper(tokens, HAS_COMPONENT)
647275
function expose(subject, callback) {
  var name;

  if (!this.active) {
    return this;
  }

  if (typeof subject === 'string') {
    this.localComponents[subject] = true;
    this.exposed[subject] = callback;
  } else if (typeof subject === 'object') {
    for (name in subject) {
      if (subject.hasOwnProperty(name)) {
        this.localComponents[name] = true;
        this.exposed[name] = subject[name];
      }
    }
  }

  return this;
}
592014
def subject(self):
        
        # Fetch subject from first message.
        subject = self.message.get('Subject', '')
        subject, _ = re.subn(r'\s+', ' ', subject)
        return subject
77407
def _handle_relation(self, tokens: ParseResults) -> str:
        """"""
        subject_node_dsl = self.ensure_node(tokens[SUBJECT])
        object_node_dsl = self.ensure_node(tokens[OBJECT])

        subject_modifier = modifier_po_to_dict(tokens[SUBJECT])
        object_modifier = modifier_po_to_dict(tokens[OBJECT])

        annotations = {
            annotation_name: (
                {
                    ae: True
                    for ae in annotation_entry
                }
                if isinstance(annotation_entry, set) else
                {
                    annotation_entry: True
                }
            )
            for annotation_name, annotation_entry in self.control_parser.annotations.items()
        }

        return self._add_qualified_edge(
            subject_node_dsl,
            object_node_dsl,
            relation=tokens[RELATION],
            annotations=annotations,
            subject_modifier=subject_modifier,
            object_modifier=object_modifier,
        )
800914
private void handleSetProperty(final Element element, final Map<String, Object> entityData, final Map<String, Object> config) {

		String propertyName = (String)config.get(PROPERTY_NAME);
		if (propertyName == null) {

			propertyName = element.tagName;
		}

		entityData.put(propertyName, element.text);
	}
239245
def handle_data(self, data):
        """"""
        if 'id' in data:
            self.handle_response(data)
        else:
            self.handle_notification(data)
1228155
def Focus(cls):
        
        
        element = cls._element()        
#         element.send_keys(Keys.NULL)        
        action = ActionChains(Web.driver)
        action.send_keys_to_element(element, Keys.NULL)
        action.perform()
757432
def subject_template(template, context):
    
    subject = loader.get_template(template).render(Context(context))
    return " ".join(subject.splitlines()).strip()