Java Code Examples for org.semanticweb.owlapi.model.IRI#create()

The following examples show how to use org.semanticweb.owlapi.model.IRI#create() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: QueryingWithNamedClasses.java    From elk-reasoner with Apache License 2.0 6 votes vote down vote up
public QueryingWithNamedClasses() throws OWLOntologyCreationException {
	// Traditional setup with the OWL-API
	manager = OWLManager.createOWLOntologyManager();
	IRI ontologyIri = IRI.create(EL_ONTOLOGY);
	ontology = manager.loadOntologyFromOntologyDocument(ontologyIri);

	System.out.println("Loaded ontology: " + ontology.getOntologyID());
	// But we use the Elk reasoner (add it to the classpath)
	reasonerFactory = new ElkReasonerFactory();
	reasoner = reasonerFactory.createReasoner(ontology);
	// IMPORTANT: Precompute the inferences beforehand, otherwise no results
	// will be returned
	reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY);
	// Ontologies are not easy to query with the full name of concept, so we
	// keep only the interesting bit ( = shortform)
	shortFormProvider = new SimpleShortFormProvider();

	Set<OWLOntology> importsClosure = ontology.getImportsClosure();
	mapper = new BidirectionalShortFormProviderAdapter(manager,
			importsClosure, shortFormProvider);
}
 
Example 2
Source File: Owl2VowlController.java    From OWL2VOWL with MIT License 6 votes vote down vote up
@RequestMapping(value = СONVERT_MAPPING, method = RequestMethod.GET)
public String convertIRI(@RequestParam("iri") String iri,@RequestParam("sessionId") String sessionId) throws IOException, OWLOntologyCreationException {
	String jsonAsString;
	String out=iri.replace(" ","%20");
	loadingStatusMsg="";
	try {
	
		Owl2Vowl owl2Vowl = new Owl2Vowl(IRI.create(out));
		conversionSessionMap.put(sessionId, owl2Vowl);
  		    jsonAsString =  owl2Vowl.getJsonAsString();
	
		conversionLogger.info(out + " " + 1);
	} catch (Exception e) {
		conversionLogger.info(out + " " + 1);
		return e.getMessage();
	}
	finally {
		evaluateLifeCycleOfConversionObject(sessionId,5000);
	}
	conversionLogger.info(iri + " " + 0);
	return jsonAsString;
}
 
Example 3
Source File: DiffOperationTest.java    From robot with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
/**
 * Compare one ontology to a modified copy.
 *
 * @throws IOException on file problem
 * @throws OWLOntologyCreationException on ontology problem
 */
@Test
public void testCompareModified() throws IOException, OWLOntologyCreationException {
  OWLOntology simple = loadOntology("/simple.owl");
  Set<OWLOntology> onts = new HashSet<>();
  onts.add(simple);
  OWLOntologyManager manager = simple.getOWLOntologyManager();
  OWLDataFactory df = manager.getOWLDataFactory();
  OWLOntology simple1 = manager.createOntology(IRI.create(base + "simple1.owl"), onts);
  IRI test1 = IRI.create(base + "simple.owl#test1");
  manager.addAxiom(
      simple1,
      df.getOWLAnnotationAssertionAxiom(df.getRDFSLabel(), test1, df.getOWLLiteral("TEST #1")));

  StringWriter writer = new StringWriter();
  boolean actual = DiffOperation.compare(simple, simple1, writer);
  System.out.println(writer.toString());
  assertFalse(actual);
  String expected = IOUtils.toString(this.getClass().getResourceAsStream("/simple1.diff"));
  assertEquals(expected, writer.toString());
}
 
Example 4
Source File: OWLGraphWrapperEdgesAdvancedTest.java    From owltools with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Test
public void testGetSvfClasses() throws Exception {
	OWLGraphWrapper graph = getGraph("graph/explainConstraints.owl");
	IRI onlyInTaxonIRI = IRI.create("http://purl.obolibrary.org/obo/RO_0002160");
	OWLObjectProperty onlyInTaxon = graph.getDataFactory().getOWLObjectProperty(onlyInTaxonIRI);
	
	OWLClass c1 = graph.getOWLClass(IRI.create("http://purl.obolibrary.org/obo/UBERON_0000001"));
	OWLClass c2 = graph.getOWLClass(IRI.create("http://purl.obolibrary.org/obo/UBERON_0000002"));
	OWLClass c3 = graph.getOWLClass(IRI.create("http://purl.obolibrary.org/obo/UBERON_0000003"));
	
	Set<OWLClass> svf1 = graph.getSvfClasses(c1, onlyInTaxon);
	Set<OWLClass> svf2 = graph.getSvfClasses(c2, onlyInTaxon);
	Set<OWLClass> svf3 = graph.getSvfClasses(c3, onlyInTaxon);
	
	assertEquals(1, svf1.size());
	assertEquals(1, svf2.size());
	assertEquals(0, svf3.size());
}
 
Example 5
Source File: InferenceBuilder.java    From owltools with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public static OWLGraphWrapper enforceEL(OWLGraphWrapper graph) {
	Optional<IRI> originalIRI = graph.getSourceOntology().getOntologyID().getOntologyIRI();
	IRI newIRI;
	if(originalIRI.isPresent()) {
		String workIRI = originalIRI.get().toString();
		if (workIRI.endsWith(".owl")) {
			workIRI = workIRI.replace(".owl", "-el.owl");
		}
		else {
			workIRI = workIRI + "-el";
		}
		newIRI = IRI.create(workIRI);
	}
	else {
		newIRI = IRI.generateDocumentIRI();
	}
	return enforceEL(graph, newIRI);
}
 
Example 6
Source File: OWLGsonParser.java    From owltools with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public OWLOntology convertOntology(Map<Object,Object> m) throws OWLOntologyCreationException {
	Set<OWLAxiom> axioms = null;
	IRI ontologyIRI = null;
	List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
	List<IRI> importsIRIs = new ArrayList<IRI>();
	for (Object k : m.keySet()) {
		if (k.equals("axioms")) {
			axioms = convertAxioms((Object[]) m.get(k));			
		}
		else if (k.equals("iri")) {
			ontologyIRI = IRI.create((String) m.get(k));
		}
		else if (k.equals("annotations")) {
			// TODO
		}
		else if (k.equals("imports")) {
			IRI importIRI = IRI.create((String) m.get(k));
			importsIRIs.add(importIRI);
			
		}
	}
	OWLOntology ont = manager.createOntology(ontologyIRI);
	for (IRI importsIRI : importsIRIs) {
		AddImport ai = new AddImport(ont, manager.getOWLDataFactory().getOWLImportsDeclaration(importsIRI));
		changes.add(ai);
	}
	manager.applyChanges(changes);
	return ont;
}
 
Example 7
Source File: ChEBIParser.java    From act with GNU General Public License v3.0 5 votes vote down vote up
public static void main(String[] args) throws OWLException,
      InstantiationException, IllegalAccessException,
      ClassNotFoundException, IOException {
  // We load an ontology from the URI specified
  IRI documentIRI = IRI.create(args[0]);
  IRI inchiIRI = IRI.create(args[1]);

  String subtree = "CHEBI_25212(metabolite)";
  if (args.length > 2)
    subtree = args[2]; // override the default

  find(subtree, documentIRI, inchiIRI);
}
 
Example 8
Source File: TableToAxiomConverter.java    From owltools with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private IRI resolveIRI(String id) {
	IRI iri;
	if (config.isOboIdentifiers && !id.startsWith("http:/")) {
		iri = graph.getIRIByIdentifier(id);
	}
	else {
		iri = IRI.create(id);
	}
	return iri;
}
 
Example 9
Source File: ReasonerUtilTest.java    From SciGraph with Apache License 2.0 5 votes vote down vote up
@Before
public void setup() throws Exception {
  String uri = Resources.getResource("ontologies/reasoner.owl").toURI().toString();
  IRI iri = IRI.create(uri);
  manager = OWLManager.createOWLOntologyManager();
  ont = manager.loadOntologyFromOntologyDocument(iri);
  ReasonerConfiguration config = new ReasonerConfiguration();
  config.setFactory(ElkReasonerFactory.class.getCanonicalName());
  config.setAddDirectInferredEdges(true);
  config.setAddInferredEquivalences(true);
  util = new ReasonerUtil(config, manager, ont);
}
 
Example 10
Source File: QueryArgumentTest.java    From sparql-dl-api with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Test
public void testHasType() 
{
	QueryArgument arg = new QueryArgument(IRI.create("http://example.com"));
	assertTrue(arg.hasType(QueryArgumentType.URI));
	assertFalse(arg.hasType(QueryArgumentType.VAR));
}
 
Example 11
Source File: ABoxUtils.java    From owltools with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Creates a "fake" individual for every class.
 * 
 * ABox IRI = TBox IRI + suffix
 * 
 * if suffix == null, then we are punning
 * 
 * @param srcOnt
 * @param iriSuffix
 * @throws OWLOntologyCreationException
 */
public static void makeDefaultIndividuals(OWLOntology srcOnt, String iriSuffix) throws OWLOntologyCreationException {
	OWLOntologyManager m = srcOnt.getOWLOntologyManager();
	OWLDataFactory df = m.getOWLDataFactory();
	for (OWLClass c : srcOnt.getClassesInSignature(Imports.INCLUDED)) {
		IRI iri;
		if (iriSuffix == null || iriSuffix.equals(""))
		  iri = c.getIRI();
		else
			iri = IRI.create(c.getIRI().toString()+iriSuffix);
		OWLNamedIndividual ind = df.getOWLNamedIndividual(iri);
		m.addAxiom(srcOnt, df.getOWLDeclarationAxiom(ind));
		m.addAxiom(srcOnt, df.getOWLClassAssertionAxiom(c, ind));
	}
}
 
Example 12
Source File: AbstractElkObjectConverter.java    From elk-reasoner with Apache License 2.0 4 votes vote down vote up
@Override
public IRI visit(ElkAbbreviatedIri iri) {
	return IRI.create(iri.getPrefix().getIri().getFullIriAsString(),
			iri.getLocalName());
}
 
Example 13
Source File: Constants.java    From OWL2VOWL with MIT License 4 votes vote down vote up
public static IRI getIRIWithTestNamespace(String entityIRI) {
	return IRI.create(OWL2VOWL_NAMESPACE + entityIRI);
}
 
Example 14
Source File: SimCommandRunner.java    From owltools with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@CLIMethod("--lcsx-all")
public void lcsxAll(Opts opts) throws Exception {
	opts.info("LABEL", "ont 1");
	String ont1 = opts.nextOpt();

	opts.info("LABEL", "ont 2");
	String ont2 = opts.nextOpt();

	if (simOnt == null) {
		simOnt = g.getManager().createOntology();
	}

	SimEngine se = new SimEngine(g);

	Set <OWLObject> objs1 = new HashSet<OWLObject>();
	Set <OWLObject> objs2 = new HashSet<OWLObject>();

	System.out.println(ont1+" -vs- "+ont2);
	for (OWLObject x : g.getAllOWLObjects()) {
		if (! (x instanceof OWLClass))
			continue;
		String id = g.getIdentifier(x);
		if (id.startsWith(ont1)) {
			objs1.add(x);
		}
		if (id.startsWith(ont2)) {
			objs2.add(x);
		}
	}
	Set<OWLClassExpression> lcsh = new HashSet<OWLClassExpression>();
	OWLObjectRenderer r = new ManchesterOWLSyntaxOWLObjectRendererImpl();
	OWLPrettyPrinter owlpp = new OWLPrettyPrinter(g, r);
	owlpp.hideIds();
	for (OWLObject a : objs1) {
		for (OWLObject b : objs2) {
			OWLClassExpression lcs = se.getLeastCommonSubsumerSimpleClassExpression(a, b);
			if (lcs instanceof OWLAnonymousClassExpression) {
				if (lcsh.contains(lcs)) {
					// already seen
					continue;
				}
				lcsh.add(lcs);
				String label = owlpp.render(lcs);
				IRI iri = IRI.create(Obo2OWLConstants.DEFAULT_IRI_PREFIX+"U_"+
						g.getIdentifier(a).replaceAll(":", "_")+"_" 
						+"_"+g.getIdentifier(b).replaceAll(":", "_"));
				OWLClass namedClass = g.getDataFactory().getOWLClass(iri);
				// TODO - use java obol to generate meaningful names
				OWLEquivalentClassesAxiom ax = g.getDataFactory().getOWLEquivalentClassesAxiom(namedClass , lcs);
				g.getManager().addAxiom(simOnt, ax);
				g.getManager().addAxiom(simOnt,
						g.getDataFactory().getOWLAnnotationAssertionAxiom(
								g.getDataFactory().getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI()),
								iri,
								g.getDataFactory().getOWLLiteral(label)));
				System.out.println("LCSX:"+owlpp.render(a)+" -vs- "+owlpp.render(b)+" = \n "+label);
				//LOG.info("  Adding:"+owlpp.render(ax));
				LOG.info("  Adding:"+ax);

			}
		}					
	}
}
 
Example 15
Source File: NCBIOWL.java    From owltools with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
/**
 * Create and initialize the ontology. This involves adding several
 * annotation properties from OboInOwl and has_rank,
 * adding the ranks themselves, and setting annotation properties
 * on the ontology itself.
 *
 * @see org.obolibrary.obo2owl.Obo2OWLConstants.Obo2OWLVocabulary
 * @return the ontology, ready for adding taxa
 * @throws OWLOntologyCreationException
 */
public static OWLOntology createOWLOntology()
		throws OWLOntologyCreationException {
	IRI iri = IRI.create(OBO + "ncbitaxon.owl");
	OWLOntology ontology = manager.createOntology(iri);
	
	// Add OBO annotation properties
	Obo2OWLVocabulary[] terms = {
		Obo2OWLVocabulary.IRI_OIO_hasExactSynonym,
		Obo2OWLVocabulary.IRI_OIO_hasRelatedSynonym,
		Obo2OWLVocabulary.IRI_OIO_hasBroadSynonym,
		Obo2OWLVocabulary.IRI_OIO_hasDbXref,
		Obo2OWLVocabulary.IRI_OIO_hasOboNamespace,
		Obo2OWLVocabulary.IRI_OIO_hasScope,
		Obo2OWLVocabulary.IRI_OIO_hasOBOFormatVersion,
		Obo2OWLVocabulary.hasSynonymType,
		Obo2OWLVocabulary.IRI_IAO_0000115 // IAO definition
	};
	for (Obo2OWLVocabulary term : terms) {
		createAnnotationProperty(ontology, term);
	}

	// Add has_rank annotation property
	OWLAnnotationProperty rank = createAnnotationProperty(
		ontology, "obo:ncbitaxon#has_rank");
	annotate(ontology, rank, "rdfs:label", "has_rank");
	annotate(ontology, rank, "iao:0000115", "A metadata relation between a class and its taxonomic rank (eg species, family)");
	annotate(ontology, rank, "rdfs:comment", "This is an abstract class for use with the NCBI taxonomy to name the depth of the node within the tree. The link between the node term and the rank is only visible if you are using an obo 1.3 aware browser/editor; otherwise this can be ignored");
	annotate(ontology, rank, "oio:hasOBONamespace", "ncbi_taxonomy");
	
	// Add ranks
	OWLClass taxonomicRank = createTaxon(ontology, 
		"taxonomic_rank");
	annotate(ontology, taxonomicRank, "rdfs:label",
		"taxonomic rank");
	annotate(ontology, taxonomicRank, "rdfs:comment",
		"This is an abstract class for use with the NCBI taxonomy to name the depth of the node within the tree. The link between the node term and the rank is only visible if you are using an obo 1.3 aware browser/editor; otherwise this can be ignored.");
	for(String rankName : ranks) {
		String rankString = reformatName(rankName);
		OWLClass rankClass = createTaxon(ontology, rankString);
		assertSubClass(ontology, rankClass, taxonomicRank);
		annotate(ontology, rankClass, "rdfs:label", rankName);
	}

	// Add synonym type classes
	OWLAnnotationProperty synonymTypeProperty =
		createAnnotationProperty(ontology,
			"oio:SynonymTypeProperty");
	annotate(ontology, synonymTypeProperty, "rdfs:label",
		"synonym_type_property");
	Set<String> synonymNames = synonymTypes.keySet();
	for(String synonymName : synonymNames) {
		String synonymString = reformatName(
			"ncbitaxon:" + synonymName);
		OWLAnnotationProperty synonymProperty =
			createAnnotationProperty(
				ontology, synonymString);
		annotate(ontology, synonymProperty, "rdfs:label", 
			synonymName);
		annotate(ontology, synonymProperty, "oio:hasScope",
			synonymTypes.get(synonymName));
		assertSubAnnotationProperty(ontology,
			synonymProperty, synonymTypeProperty);
	}

	// Annotate the ontology itself.
	annotate(ontology, "rdfs:comment",
		"Autogenerated by OWLTools-NCBIConverter.");
	
	logger.debug("Initialized ontology. Axioms: " +
		ontology.getAxiomCount());
	return ontology;
}
 
Example 16
Source File: QueryArgumentTest.java    From sparql-dl-api with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Test
public void testGetValue() 
{
	QueryArgument arg = new QueryArgument(IRI.create("http://example.com"));
	assertEquals(arg.getValueAsIRI(), IRI.create("http://example.com"));
}
 
Example 17
Source File: OWLView.java    From relex with Apache License 2.0 4 votes vote down vote up
public void initOntology()
{
	try
	{
		//Auxiliar structures
		//map_owl_relexwords = new HashMap<String,OWLIndividual>();
		map_owl_properties = new HashMap<String,OWLProperty>();

		// OWLOntologyManager that manages a set of ontologies
		manager = OWLManager.createOWLOntologyManager();

		// URI of the ontology
		ontologyURI = URI.create("http://student.dei.uc.pt/~racosta/relex/owl_format.owl");

		// Pphysical URI
		physicalURI = URI.create("file:/media/Docs/uc/MSc-2/SW/Project/ontologies/relex2.owl");

		// Set up a mapping, which maps the ontology URI to the physical URI
		OWLOntologyIRIMapper mapper = new SimpleIRIMapper(IRI.create(ontologyURI),IRI.create(physicalURI));
		manager.addIRIMapper(mapper);

		// Now create the ontology - we use the ontology URI
		ontology = manager.createOntology(IRI.create(physicalURI));
		//Data factory, allows to manipulate ontology data
		factory = manager.getOWLDataFactory();

		sentence = factory.getOWLClass(IRI.create(ontologyURI + "#Sentence"));
		word = factory.getOWLClass(IRI.create(ontologyURI + "#Word"));
		//relex_word = factory.getOWLClass(IRI.create(ontologyURI + "#Relex_word"));

		//Generic properties for classes
		has = factory.getOWLObjectProperty(IRI.create(ontologyURI + "#relex_has"));
		//map_owl_properties.put("type",factory.getOWLObjectProperty(IRI.create(ontologyURI + "#type")));

		// word is subclass of phrase
		//OWLAxiom subclassing = factory.getOWLSubClassAxiom(word, sentence);

		// Add the axiom to the ontology
		//AddAxiom addAxiom = new AddAxiom(ontology, subclassing);
		// We now use the manager to apply the change
		//manager.applyChange(addAxiom);

		//2º Add the predefined properties

		/*map_owl_properties.put("tense",factory.getOWLObjectProperty(IRI.create(ontologyURI + * "#p_tense")));
		map_owl_properties.put("index",factory.getOWLDataProperty(IRI.create(ontologyURI + "#p_index")));
		//Add possible relex words
		map_owl_relexwords.put("masculine",factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_masculine")));
		map_owl_relexwords.put("feminine",factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_feminine")));
		map_owl_relexwords.put("person",factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_person")));
		map_owl_relexwords.put("neuter",factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_neuter")));*/

		/*OWLObjectProperty number = factory.getOWLObjectProperty(IRI.create(ontologyURI + "#number"));
		OWLObjectProperty tense = factory.getOWLObjectProperty(IRI.create(ontologyURI + "#tense"));
		OWLObjectProperty query = factory.getOWLObjectProperty(IRI.create(ontologyURI + "#query"));
		OWLObjectProperty quantification = factory.getOWLObjectProperty(IRI.create(ontologyURI + "#quantification"));*/

		// Add axioms to the ontology
		//OWLAxiom genderax = factory.getOWLObjectProperty(infinitive);

		//Phrase Individuals
		/*phr_type_map_owl = new HashMap<String,OWLIndividual>();
		phr_type_map_owl.put("Adverbial Phrase", factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_adjective")));
		phr_type_map_owl.put("Adverbial Phrase", factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_adverb")));
		phr_type_map_owl.put("Noun Phrase",      factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_noun")));
		phr_type_map_owl.put("Prepositional Phrase", factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_prepositional")));
		phr_type_map_owl.put("Particle",         factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_particle")));
		phr_type_map_owl.put("Quantifier Phrase", factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_quantifier")));
		phr_type_map_owl.put("Clause",           factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_clause")));
		phr_type_map_owl.put("Subordinate Clause", factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_subordinate")));
		phr_type_map_owl.put("Subject Inverted", factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_inverted")));
		phr_type_map_owl.put("Sentence",         factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_root")));
		phr_type_map_owl.put("Verb Phrase",      factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_verb")));
		phr_type_map_owl.put("Wh-Adverb Phrase", factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_wh-adverb")));
		phr_type_map_owl.put("Wh-Noun Phrase",   factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_wh-noun")));
		phr_type_map_owl.put("Wh-Prepositional Phrase", factory.getOWLNamedIndividual(IRI.create(ontologyURI + "#rw_wh-prep")));*/

		//Add all the phr_type_map_owl Individuals to the Relex_word Class
		/*Set<String> s = phr_type_map_owl.keySet();
		for (Iterator<String> it = s.iterator(); it.hasNext();)
		{
			manager.applyChange(new AddAxiom(ontology, factory.getOWLClassAssertionAxiom(phr_type_map_owl.get(it.next()), relex_word)));
		}

		//Add all the map_owl_relexwords Individuals to the Relex_word Class
		s = map_owl_relexwords.keySet();
		for (Iterator<String> it = s.iterator(); it.hasNext();)
		{
			manager.applyChange(new AddAxiom(ontology, factory.getOWLClassAssertionAxiom(map_owl_relexwords.get(it.next()), relex_word)));
		}*/

	}
	catch (OWLException e)
	{
		e.printStackTrace();
	}
}
 
Example 18
Source File: AbstractOBOSimPreProcessor.java    From owltools with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
protected IRI getIRIViaOBOSuffix(String iriSuffix) {
	return IRI.create(Obo2OWLConstants.DEFAULT_IRI_PREFIX+iriSuffix);
}
 
Example 19
Source File: OWLGraphWrapperExtended.java    From owltools with BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * @see #getOWLIndividual(IRI)
 * @param s
 * @return {@link OWLNamedIndividual}
 */
public OWLNamedIndividual getOWLIndividual(String s) {
	IRI iri = IRI.create(s);
	return getOWLIndividual(iri);
}
 
Example 20
Source File: NCBIConverter.java    From owltools with BSD 3-Clause "New" or "Revised" License 2 votes vote down vote up
/**
 * Create an NCBI taxon IRI from an NCBI ID integer.
 *
 * @param id the numeric ID
 * @return an IRI of the form http://purl.obolibrary.org/obo/NCBITaxon_1
 */
protected static IRI createNCBIIRI(int id) {
	return IRI.create(NCBI + id);
}