Ejemplo n.º 1
0
 public void internalise(AbsObject absObj, Ontology onto)
     throws UngroundedException, OntologyException {
   try {
     AbsConcept abs = (AbsConcept) absObj;
     apliesTo = (List) onto.toObject(abs.getAbsObject(CBRTerminologyOntology.ATTRIBUTE_APLIESTO));
     describedBy =
         (List) onto.toObject(abs.getAbsObject(CBRTerminologyOntology.ATTRIBUTE_DESCRIBEDBY));
     definition =
         (String) onto.toObject(abs.getAbsObject(CBRTerminologyOntology.ATTRIBUTE_DEFINITION));
     term = (String) onto.toObject(abs.getAbsObject(CBRTerminologyOntology.ATTRIBUTE_TERM));
   } catch (ClassCastException cce) {
     throw new OntologyException("Error internalising Attribute");
   }
 }
Ejemplo n.º 2
0
 public void externalise(AbsObject absObj, Ontology onto) throws OntologyException {
   try {
     AbsConcept abs = (AbsConcept) absObj;
     abs.set(CBRTerminologyOntology.ATTRIBUTE_APLIESTO, (AbsTerm) onto.fromObject(getApliesTo()));
     abs.set(
         CBRTerminologyOntology.ATTRIBUTE_DESCRIBEDBY,
         (AbsTerm) onto.fromObject(getDescribedBy()));
     abs.set(
         CBRTerminologyOntology.ATTRIBUTE_DEFINITION, (AbsTerm) onto.fromObject(getDefinition()));
     abs.set(CBRTerminologyOntology.ATTRIBUTE_TERM, (AbsTerm) onto.fromObject(getTerm()));
   } catch (ClassCastException cce) {
     throw new OntologyException("Error externalising Attribute");
   }
 }
 public void externalise(AbsObject absObj, Ontology onto) throws OntologyException {
   try {
     AbsConcept abs = (AbsConcept) absObj;
     abs.set(
         CommonTerminologyOntology.QUANTITATIVECHARACTERDESCRIPTOR_SCORE,
         (AbsTerm) onto.fromObject(getScore()));
     abs.set(
         CommonTerminologyOntology.QUANTITATIVECHARACTERDESCRIPTOR_ATTRIBUTE,
         (AbsTerm) onto.fromObject(getAttribute()));
     abs.set(
         CommonTerminologyOntology.QUANTITATIVECHARACTERDESCRIPTOR_STRUCTURE,
         (AbsTerm) onto.fromObject(getStructure()));
   } catch (ClassCastException cce) {
     throw new OntologyException("Error externalising QuantitativeCharacterDescriptor");
   }
 }
 public void internalise(AbsObject absObj, Ontology onto)
     throws UngroundedException, OntologyException {
   try {
     AbsConcept abs = (AbsConcept) absObj;
     score =
         (List)
             onto.toObject(
                 abs.getAbsObject(
                     CommonTerminologyOntology.QUANTITATIVECHARACTERDESCRIPTOR_SCORE));
     attribute =
         (Attribute)
             onto.toObject(
                 abs.getAbsObject(
                     CommonTerminologyOntology.QUANTITATIVECHARACTERDESCRIPTOR_ATTRIBUTE));
     structure =
         (Object)
             onto.toObject(
                 abs.getAbsObject(
                     CommonTerminologyOntology.QUANTITATIVECHARACTERDESCRIPTOR_STRUCTURE));
   } catch (ClassCastException cce) {
     throw new OntologyException("Error internalising QuantitativeCharacterDescriptor");
   }
 }