You just have to add the corresponding OWL axiom which is called
AllDifferent in OWL terms on an OntModel:


RDFlist list = ... // your list of individuals here
model.createAllDifferent(list);

or

Iterator<? extends Resource> individuals = ... // your individuals as
iterator here
model.createAllDifferent().addDistinctMembers(individuals);


Javadoc is online:

https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/ontology/OntModel.html#createAllDifferent-org.apache.jena.rdf.model.RDFList-

https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/ontology/AllDifferent.html#addDistinctMembers-java.util.Iterator-

On 16.10.20 13:11, Rezaeifar, Zeinab wrote:
> Hello,
> May I know how I can define distinct members (general axioms) when I define 
> individuals in apache jena. I would like to emphasis that each individual is 
> different than I can apply SWRL rules defined from different individuals.
> Thanks
> Kind regards
> Zeinab
>
>
> This email and any attachments are confidential and intended solely for the 
> use of the addressee and may contain information which is covered by legal, 
> professional or other privilege. If you have received this email in error 
> please notify the system manager at [email protected] and delete this 
> email immediately. Any views or opinions expressed are solely those of the 
> author and do not necessarily represent those of Ulster University.
> The University's computer systems may be monitored and communications carried 
> out on them may be recorded to secure the effective operation of the system 
> and for other lawful purposes. Ulster University does not guarantee that this 
> email or any attachments are free from viruses or 100% secure. Unless 
> expressly stated in the body of a separate attachment, the text of email is 
> not intended to form a binding contract. Correspondence to and from the 
> University may be subject to requests for disclosure by 3rd parties under 
> relevant legislation.
> The Ulster University was founded by Royal Charter in 1984 and is registered 
> with company number RC000726 and VAT registered number GB672390524.The 
> primary contact address for Ulster University in Northern Ireland is Cromore 
> Road, Coleraine, Co. Londonderry BT52 1SA
>

Reply via email to