Package ptolemy.data.ontologies
Class ConceptFromRecordField
- java.lang.Object
-
- ptolemy.data.ontologies.ConceptFunction
-
- ptolemy.data.ontologies.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)
-
-
Field Summary
-
Fields inherited from class ptolemy.data.ontologies.ConceptFunction
_argumentDomainOntologies, _name, _numArgsIsFixed, _outputRangeOntology
-
-
Constructor Summary
Constructors Constructor Description ConceptFromRecordField(java.lang.String name, java.lang.String fieldLabel, Ontology ontology)
Create a new ConceptFromRecordField concept function with the specified field label.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Concept
_evaluateFunction(java.util.List<Concept> argValues)
Return the function output from the given input arguments.-
Methods inherited from class ptolemy.data.ontologies.ConceptFunction
evaluateFunction, getArgumentDomainOntologies, getName, getNumberOfArguments, getOutputRangeOntology, isMonotonic, isNumberOfArgumentsFixed, toString
-
-
-
-
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 classConceptFunction
- 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.
-
-