Examples of RDFProperty


Examples of edu.stanford.smi.protegex.owl.model.RDFProperty

   
    // if property is null, well nothing to be done
    if(prop == null)
      return;
   
    RDFProperty p = (RDFProperty) ((PProperty)prop).getResource();
    resource.setPropertyValue(p,convertSetValue(value));
     
  }
View Full Code Here

Examples of edu.stanford.smi.protegex.owl.model.RDFProperty

   
    // if property is null, well nothing to be done
    if(prop == null)
      return;
   
    RDFProperty p = (RDFProperty) ((PProperty)prop).getResource();
    resource.addPropertyValue(p,convertSetValue(value));
     
  }
View Full Code Here

Examples of edu.stanford.smi.protegex.owl.model.RDFProperty

   
    // if property is null, well nothing to be done
    if(prop == null)
      return;
   
    RDFProperty p = (RDFProperty) ((PProperty)prop).getResource();
    resource.setPropertyValues(p,convertSetValues(values));
  }
View Full Code Here

Examples of edu.stanford.smi.protegex.owl.model.RDFProperty

     * @see eu.planets_project.tb.api.model.ontology.OntologyProperty#getParentType()
     */
    public String getParentType() {
      if(parentType==null){
        //get a certain DatatypeProperty
        RDFProperty propertyType = individual.getOWLModel()
        .getRDFProperty("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
        Object oType = individual.getPropertyValue(propertyType);
        if(oType instanceof DefaultOWLNamedClass){
            DefaultOWLNamedClass type = (DefaultOWLNamedClass)oType;
            //return a name without the namespace prefixes
View Full Code Here

Examples of edu.stanford.smi.protegex.owl.model.RDFProperty

     * @see eu.planets_project.tb.api.model.ontology.OntologyProperty#getComment()
     */
    public String getComment() {
      if(comment==null){
        //get a certain DatatypeProperty
          RDFProperty propertyComment = individual.getOWLModel()
          .getRDFProperty("http://www.w3.org/2000/01/rdf-schema#comment");
          Object oComment = individual.getPropertyValue(propertyComment);
          if(oComment instanceof String){
            comment = (String)oComment;
          } else{
View Full Code Here

Examples of edu.stanford.smi.protegex.owl.model.RDFProperty

     * @see eu.planets_project.tb.api.model.ontology.OntologyProperty#getUnit()
     */
    public String getUnit(){
        if(unit==null){
        //rdf property unit: http://planetarium.hki.uni-koeln.de/public/XCL/ontology/XCLOntology.owl#Unit
          RDFProperty propertyUnit = individual.getOWLModel()
          .getRDFProperty(this.xclOntologyLocation+"#Unit");
          Object oUnit = individual.getPropertyValue(propertyUnit);
          if(oUnit instanceof DefaultOWLIndividual){
            DefaultOWLIndividual dUnit = (DefaultOWLIndividual)individual.getPropertyValue(propertyUnit);
            unit= dUnit.getLocalName();
View Full Code Here

Examples of edu.stanford.smi.protegex.owl.model.RDFProperty

   * @see eu.planets_project.tb.api.model.ontology.OntologyProperty#getDataType()
   */
  public String getDataType() {
    if(dataType==null){
      //rdf property datatype: http://planetarium.hki.uni-koeln.de/public/XCL/ontology/XCLOntology.owl#Datatype
      RDFProperty propertyDatatype = individual.getOWLModel()
      .getRDFProperty(this.xclOntologyLocation+"#Datatype");
          //System.out.println("<Prop name: "+datatype.getBrowserText() +" value: "+individual.getPropertyValue(datatype));
          Object oDatatype = individual.getPropertyValue(propertyDatatype);
          if(oDatatype instanceof DefaultOWLIndividual){
            DefaultOWLIndividual ddatatype = (DefaultOWLIndividual)individual.getPropertyValue(propertyDatatype);
View Full Code Here

Examples of edu.stanford.smi.protegex.owl.model.RDFProperty

  /* (non-Javadoc)
   * @see eu.planets_project.tb.api.model.ontology.OntologyProperty#getRDFProperty(java.lang.String)
   */
  public Object getRDFProperty(String rdfString) {
     RDFProperty rdfprop = individual.getOWLModel().getRDFProperty(rdfString);
     return rdfprop;
  }
View Full Code Here

Examples of org.joggito.annotations.RDFProperty

public class TestRDFAnnotationsHelper {
  @Test
  public void gettingURIExpressionValueAsSpecifiedValue() throws Exception {
    Field field = Person.class.getDeclaredField("familyName");
    Method getter = ReflectUtils.getGetterMethod(field);
    RDFProperty rdfProperty = getter.getAnnotation(RDFProperty.class);
   
    String uri = RdfAnnotationsHelper.getURI(field, rdfProperty);
    assertEquals("family_name", uri);
  }
View Full Code Here

Examples of org.joggito.annotations.RDFProperty

  }
 
  @Test
  public void gettingURIExpressionValueAsFieldName() throws Exception {
    Field field = Person.class.getDeclaredField("firstName");
    RDFProperty rdfProperty = field.getAnnotation(RDFProperty.class);

    String uri = RdfAnnotationsHelper.getURI(field, rdfProperty);
    assertEquals(field.getName(), uri);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.