Class ConceptFromRecordField


  • public class ConceptFromRecordField
    extends ConceptFunction
    A concept function that returns the concept value from the specified field from an input RecordConcept.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Charles Shelton
    Pt.AcceptedRating:
    Red (cshelton)
    Pt.ProposedRating:
    Green (cshelton)
    • Constructor Detail

      • ConceptFromRecordField

        public ConceptFromRecordField​(java.lang.String name,
                                      java.lang.String fieldLabel,
                                      Ontology ontology)
                               throws IllegalActionException
        Create a new ConceptFromRecordField concept function with the specified field label.
        Parameters:
        name - The name of the concept function.
        fieldLabel - The field label from which to get a concept value from the input RecordConcept.
        ontology - The domain and range ontology for this concept function.
        Throws:
        IllegalActionException - Thrown if the concept function cannot be created.
    • Method Detail

      • _evaluateFunction

        protected Concept _evaluateFunction​(java.util.List<Concept> argValues)
                                     throws IllegalActionException
        Return the function output from the given input arguments. The output concept is the concept from the field label specified in the constructor from the input RecordConcept.
        Specified by:
        _evaluateFunction in class ConceptFunction
        Parameters:
        argValues - The Concept input arguments which should be a single RecordConcept.
        Returns:
        The output concept that is the value of the RecordConcept at the specified field. The function will return the bottom of the lattice if the field is not contained in the RecordConcept.
        Throws:
        IllegalActionException - Thrown if there is a problem creating the output Concept or if the input is not a RecordConcept.