Package edu.stanford.smi.protegex.owl.model

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


  /**
   * get range
   */
  public Object[] getRange() {
    if(prop.hasDatatypeRange()){
      RDFResource range = prop.getRange();
      Object [] obj = new Object [1];
      if(range instanceof RDFSDatatype) {
        obj[0] = ((RDFSDatatype) range).getDefaultValue();
      }else if (range instanceof OWLDataRange) {
        obj[0] = ((OWLDataRange) range).getOneOfValues();
View Full Code Here


  /**
   * get range
   */
  public Object[] getRange() {
    if(prop.hasDatatypeRange()){
      RDFResource range = prop.getRange();
      Object [] obj = new Object [1];
      if(range instanceof RDFSDatatype) {
        obj[0] = ((RDFSDatatype) range).getDefaultValue();
      }else if (range instanceof OWLDataRange) {
        obj[0] = ((OWLDataRange) range).getOneOfValues();
View Full Code Here

      Collection list = defaultont.getImportResources();
      for(Object o: list){
        if(o instanceof RDFResource){
          //TODO: maybe there is some tripplestore trick that I can use
          // and avoid loading imported ontology again
          RDFResource on = (RDFResource) o;
          PResource ont = new PResource(on);
          Repository r = model.getRepositoryManager().getRepository(ont.getURI());
          //TODO We check this because sometimes r is null. We dont understand this completely,
          //just circumventing this for now.
          if(r==null)
View Full Code Here

    return (c != null)?new PInstance(c,this):null;
  }

  public IResource getResource(String name) {
    checkModel();
    RDFResource c = model.getRDFResource(getResourceName(name));
    return (c != null)?(IResource)convertGetValue(c):null;
  }
View Full Code Here

   * @return
   */
  public ILogicExpression getParameter(){
    Object obj = null;
    if(rest instanceof OWLAllValuesFrom){
      RDFResource r = ((OWLAllValuesFrom) rest).getAllValuesFrom();
      obj = convertGetValue(r);
    }else if(rest instanceof OWLSomeValuesFrom){
      RDFResource r = ((OWLSomeValuesFrom) rest).getSomeValuesFrom();
      obj = convertGetValue(r);
    }else if(rest instanceof OWLHasValue){
      Object r = ((OWLHasValue) rest).getHasValue();
      obj = convertGetValue(r);
    }else if(rest instanceof OWLCardinalityBase){
View Full Code Here

      Collection list = defaultont.getImportResources();
      for(Object o: list){
        if(o instanceof RDFResource){
          //TODO: maybe there is some tripplestore trick that I can use
          // and avoid loading imported ontology again
          RDFResource on = (RDFResource) o;
          PResource ont = new PResource(on);
          Repository r = model.getRepositoryManager().getRepository(ont.getURI());
          //TODO We check this because sometimes r is null. We dont understand this completely,
          //just circumventing this for now.
          if(r==null)
View Full Code Here

    return (c != null)?new PInstance(c,this):null;
  }

  public IResource getResource(String name) {
    checkModel();
    RDFResource c = model.getRDFResource(getResourceName(name));
    return (c != null)?(IResource)convertGetValue(c):null;
  }
View Full Code Here

   * @return
   */
  public ILogicExpression getParameter(){
    Object obj = null;
    if(rest instanceof OWLAllValuesFrom){
      RDFResource r = ((OWLAllValuesFrom) rest).getAllValuesFrom();
      obj = convertGetValue(r);
    }else if(rest instanceof OWLSomeValuesFrom){
      RDFResource r = ((OWLSomeValuesFrom) rest).getSomeValuesFrom();
      obj = convertGetValue(r);
    }else if(rest instanceof OWLHasValue){
      Object r = ((OWLHasValue) rest).getHasValue();
      obj = convertGetValue(r);
    }else if(rest instanceof OWLCardinalityBase){
View Full Code Here

        RDFSNamedClass singleParent = superclses.size() > 1 ? null : CollectionUtilities.getFirstItem(superclses);

        //add linearization instances
        for (RDFResource linView : getLinearizationValueSet()) {
            RDFResource linSpec = getLinearizationSpecificationClass().createInstance(null); //IDGenerator.getNextUniqueId());//Guoqian
            linSpec.setPropertyValue(getLinearizationViewProperty(), linView);
            if (singleParent != null) {
                linSpec.setPropertyValue(getLinearizationParentProperty(), singleParent);
            }
            cls.addPropertyValue(getLinearizationProperty(), linSpec);
        }

        return cls;
View Full Code Here

            clamlRef.addPropertyValue(getIcdRefProperty(), ref);
        }
    }

    public void fillClamlReference(RDFResource clamlRef, String text, String usage, String refName) {
        RDFResource ref = null;
        if (refName != null) {
            ref = getICDClass(refName, true);
        }
        fillClamlReference(clamlRef, text, usage, ref);
    }
View Full Code Here

TOP

Related Classes of edu.stanford.smi.protegex.owl.model.RDFResource

Copyright © 2018 www.massapicom. 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.