亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? example01.java

?? 本體推理工具 共八個例子:從如何建立本體到做一些簡單的的本體推理
?? JAVA
字號:
package ex01;

import java.util.*;

import org.semanticweb.kaon2.api.*;                 // This package contains the basic classes of the API
import org.semanticweb.kaon2.api.owl.elements.*;    // This package contains classes used to represent elements of OWL ontologies


/**
 * This example shows how to load an ontology and print subclasses of some classes.
 * To understand this example, it is necessary to understand the syntax of OWL language.
 * A good source to learn OWL is the OWL Guide, available at http://www.w3.org/TR/owl-guide/.
 */
public class Example01 {
    /**
     * The entry point to this example. In order not to make this example too complicated,
     * we neglect error handling, and allow this method to end with an exception.
     */
    public static void main(String[] args) throws Exception {
        // The first thing we have to do is to obtain a KAON2Connection.
        // A KAON2Connection is then used to open and manipulate ontologies.
        // KAON2Connection is important for ontology inclusion: in a graph of ontologies,
        // each of which imports other ontologies, an ontologies can be imported "multiple times".
        // However, within a single KAON2Connection, each ontology exists only once.
        // Hence, a KAON2Connection provides a context for ontologies.
        KAON2Connection connection=KAON2Manager.newConnection();

        // In OWL, each ontology is identified by its URI, such as 'http://kaon2.semanticweb.org/example01'.
        // However, such an ontology does not need to be physically located at the host 'kaon2.semanticweb.org'.
        // In our example, the ontology is located in the src/ex1 directory. KAON2 can open this ontology,
        // but the logical URI 'http://kaon2.semanticweb.org/example01' has to be translated into
        // a physical URI 'file:src/ex01/example01.xml' (notice we use a relative URI which is valid if you start
        // the example from 'examples' directory in KAON2 distribution). URI translation can be performed
        // through an 'OntologyResolver'. This is an interface which provides callbacks for URI
        // translation. A simple default implementation allows registering several (logical-URI,physical-URI) pairs.
        // We now create and initialize an ontology resolver.
        DefaultOntologyResolver resolver=new DefaultOntologyResolver();
        resolver.registerReplacement("http://kaon2.semanticweb.org/example01","file:src/ex01/example01.xml");

        // Our ontology includes another ontology, so we need to register the physical URI of the included ontology as well.
        resolver.registerReplacement("http://kaon2.semanticweb.org/example01-inc","file:src/ex01/example01-inc.xml");

        // We now register the resolver to the connection.
        connection.setOntologyResolver(resolver);

        // We are now ready to open an ontology. In doing so, we just specify the logical URI of the ontology;
        // the resolver will take care of finding ontologies in appropriate locations on the local drive.
        // Depending on the type of ontology storage, an ontology might require various parameters, such
        // as a password or communication information. Such parameters may be passed in the map.
        // Ontologies stored on a local drive do not require special parameters, so we may pass an empty map.
        Ontology ontology=connection.openOntology("http://kaon2.semanticweb.org/example01",new HashMap<String,Object>());

        // Our ontology contains a class called "http://kaon2.semanticweb.org/example01#document".
        // (In the rest the prefix "http://kaon2.semanticweb.org/example01" shall be omitted.)
        // Our goal now is to read its subclasses. The first thing is to obtain an OWLClass object
        // representing "#document" class from the ontology. We do this by going through a factory,
        // which can be obtained by the KAON2Manager.
        OWLClass document=KAON2Manager.factory().owlClass("http://kaon2.semanticweb.org/example01#document");

        // We can now ask the document object to return all subclasses. In fact, we get a set of
        // Description objects. Remember that in OWL, apart from classes, you can build complex description classes.
        Set<Description> subDescriptions=document.getSubDescriptions(ontology);

        // We can now iterate over this set. We filter out atomic classes by checking for
        // each description if it is an instance of OWLClass.
        // Note that this will include subclasses defined in 'example01', as well as in 'example01-inc' ontology.
        System.out.println("The subclasses of '"+document.getURI()+"' are:");
        for (Description subDescription : subDescriptions)
            if (subDescription instanceof OWLClass) {
                OWLClass subClass=(OWLClass)subDescription;
                System.out.println("    "+subClass.getURI());
            }
        System.out.println();

        // Other objects from the API also contain various methods for browsing the ontology.
        // The structure of these methods follows closely the syntactic structure of OWL ontologies.
        // Please take a look at the Javadoc to familiarize yourself with these methods.
        ObjectProperty isAuthor=KAON2Manager.factory().objectProperty("http://kaon2.semanticweb.org/example01#is-author");
        System.out.println("The domain classes of the '"+isAuthor.getURI()+"' object property are:");
        for (Description description : isAuthor.getDomainDescriptions(ontology))
            if (description instanceof OWLClass) {
                OWLClass domain=(OWLClass)description;
                System.out.println("    "+domain.getURI());
            }
        System.out.println();

        OWLClass person=KAON2Manager.factory().owlClass("http://kaon2.semanticweb.org/example01#person");
        AnnotationProperty labelProperty=KAON2Manager.factory().annotationProperty("http://www.w3.org/2000/01/rdf-schema#label");
        System.out.println("The label of '"+person.getURI()+"' is '"+person.getEntityAnnotationValue(ontology,labelProperty)+"'.");
        System.out.println();

        // As you might have noticed, all retrieval operations require an ontology as the first parameter.
        // This parameter determines the ontology in which the retrieval is done. To demonstrate the difference,
        // we shall now try to read all subclasses of '#document' in 'http://kaon2.semanticweb.org/example01-inc'
        // ontology. The first thing we need to do is obtain the ontology object from KAON2Connection.
        // We can do this using openOntology() method. Since 'http://kaon2.semanticweb.org/example01' includes
        // 'http://kaon2.semanticweb.org/example01-inc', this ontology is already in-memory, and will not be parsed again.
        // Still, we need to pass in the empty parameter map.
        Ontology includedOntology=connection.openOntology("http://kaon2.semanticweb.org/example01-inc",new HashMap<String,Object>());

        // We retrieve subclasses of '#document' in 'http://kaon2.semanticweb.org/example01-inc' in the same way as before.
        // The output is different, since it is restricted to axioms contained exclusively in
        // 'http://kaon2.semanticweb.org/example01-inc' ontology.
        System.out.println("The subclasses of '"+document.getURI()+"' in the inculded ontology are:");
        subDescriptions=document.getSubDescriptions(includedOntology);
        for (Description subDescription : subDescriptions)
            if (subDescription instanceof OWLClass) {
                OWLClass subClass=(OWLClass)subDescription;
                System.out.println("    "+subClass.getURI());
            }
        System.out.println();

        // After usage, we need to close the connection. Otherwise, we risk a resource leak.
        connection.close();
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产高清不卡一区二区| 欧美日韩精品三区| 欧美视频一区二区三区在线观看 | 色屁屁一区二区| 欧美一区二区三区在线看| 亚洲视频在线观看一区| 精品一区二区三区免费毛片爱| 99视频在线精品| 久久一区二区视频| 日本不卡123| 欧美日韩在线播放三区四区| 国产精品久久影院| 国产成人午夜视频| 日韩精品一区二区三区老鸭窝 | 日本一区二区三区国色天香| 日本在线观看不卡视频| 欧美视频一区二区| 一区二区三区四区中文字幕| 成人性生交大片免费看在线播放| 精品福利视频一区二区三区| 三级欧美在线一区| 欧美片在线播放| 亚洲成av人综合在线观看| 91精品福利在线| 亚洲摸摸操操av| 色哟哟欧美精品| 亚洲精品一卡二卡| 色婷婷久久综合| 夜夜精品视频一区二区| 91成人免费网站| 亚洲香肠在线观看| 欧美男人的天堂一二区| 日韩精品亚洲专区| 欧美一区二区私人影院日本| 日韩二区在线观看| 欧美一区二区三区免费观看视频| 三级影片在线观看欧美日韩一区二区| 欧美在线啊v一区| 亚洲福利国产精品| 欧美一区二区日韩| 久久不见久久见免费视频1| 精品入口麻豆88视频| 精品一区二区免费在线观看| 精品国产露脸精彩对白| 国产美女在线观看一区| 国产精品久久久久影院色老大| av一区二区不卡| 亚洲美女在线国产| 在线电影国产精品| 国产综合色产在线精品| 国产日韩欧美电影| 色激情天天射综合网| 日本欧美久久久久免费播放网| 日韩女同互慰一区二区| 成人精品国产福利| 亚洲电影激情视频网站| 欧美日韩亚洲另类| 韩国视频一区二区| 国产精品国产三级国产aⅴ入口| 97精品久久久午夜一区二区三区| 亚洲大片精品永久免费| 欧美成人欧美edvon| 波多野结衣在线aⅴ中文字幕不卡| 136国产福利精品导航| 欧美日韩午夜精品| 国产激情视频一区二区三区欧美 | 丝袜美腿一区二区三区| 国产调教视频一区| 欧美性视频一区二区三区| 捆绑调教一区二区三区| 亚洲视频资源在线| 91精品国模一区二区三区| 国产盗摄女厕一区二区三区| 一区二区三区在线视频免费观看| 精品国产乱码久久久久久影片| 91看片淫黄大片一级在线观看| 久久电影网电视剧免费观看| 亚洲视频在线一区观看| 久久综合国产精品| 欧美区一区二区三区| 成人午夜精品在线| 麻豆精品一区二区av白丝在线| 亚洲视频一二三区| 国产目拍亚洲精品99久久精品| 欧美日韩极品在线观看一区| 成人app在线| 韩国成人福利片在线播放| 午夜av电影一区| 中文字幕在线一区免费| 久久先锋影音av鲁色资源| 欧美日韩激情一区| 色婷婷精品大在线视频| 国产91精品免费| 久久国产麻豆精品| 日韩高清不卡在线| 亚洲国产三级在线| 亚洲综合一区二区三区| 亚洲天堂中文字幕| 国产情人综合久久777777| 日韩精品一区在线观看| 欧美日韩中文国产| 91国产丝袜在线播放| 成人av电影免费在线播放| 国产一区美女在线| 极品美女销魂一区二区三区| 日本欧美大码aⅴ在线播放| 亚洲国产视频一区| 视频一区二区三区在线| 午夜精品福利一区二区三区蜜桃| 一区二区三区视频在线看| 亚洲日韩欧美一区二区在线| 亚洲欧洲美洲综合色网| 国产精品美女久久久久高潮| 国产精品女同互慰在线看| 国产人伦精品一区二区| 国产精品免费观看视频| 亚洲欧美激情视频在线观看一区二区三区 | 日韩欧美激情四射| 日韩欧美一区二区视频| 亚洲精品一区二区三区福利| 精品三级在线观看| 日本一区二区三区电影| 亚洲欧洲精品天堂一级| 亚洲精品伦理在线| 一二三四社区欧美黄| 日韩av成人高清| 黑人精品欧美一区二区蜜桃| 国产精品一二一区| av在线不卡电影| 欧美日韩精品欧美日韩精品一综合| 欧美日韩电影一区| 精品国产免费久久| 国产精品久久久久7777按摩| 亚洲麻豆国产自偷在线| 午夜欧美在线一二页| 美洲天堂一区二卡三卡四卡视频| 国产一区中文字幕| www.一区二区| 欧美精品日韩一区| 国产视频911| 尤物av一区二区| 免费在线看成人av| 成人av电影在线| 欧美久久久久中文字幕| 久久久久久久久99精品| 亚洲人成影院在线观看| 日本aⅴ免费视频一区二区三区| 久久国产尿小便嘘嘘| 91免费观看视频| 日韩一级片在线观看| 国产精品免费观看视频| 水野朝阳av一区二区三区| 国产成人一区二区精品非洲| 欧美图片一区二区三区| 久久久久久97三级| 亚洲国产精品久久久久婷婷884| 精品一区二区三区免费| 欧美怡红院视频| 中文字幕乱码一区二区免费| 亚洲a一区二区| 不卡一卡二卡三乱码免费网站| 欧美另类变人与禽xxxxx| 日本一区二区免费在线观看视频| 亚洲午夜久久久久久久久电影网| 国产一区二区电影| 7777精品伊人久久久大香线蕉经典版下载| 久久久精品欧美丰满| 午夜精品福利久久久| 成人av中文字幕| 精品国一区二区三区| 午夜精品久久久| 色欧美片视频在线观看| 中文字幕精品在线不卡| 美国十次了思思久久精品导航| 日本大香伊一区二区三区| 国产欧美一二三区| 国产自产2019最新不卡| 欧美疯狂做受xxxx富婆| 亚洲伦在线观看| 99久久国产综合精品女不卡| 26uuu色噜噜精品一区二区| 午夜精品在线视频一区| 91福利社在线观看| 亚洲三级理论片| 99久久免费精品| 国产精品婷婷午夜在线观看| 韩国av一区二区三区在线观看| 日韩一区二区三区免费看| 亚洲成av人片一区二区梦乃| 一本一道久久a久久精品综合蜜臀| 中文在线免费一区三区高中清不卡| 精品亚洲成av人在线观看| 欧美成人福利视频| 久久爱www久久做| 精品国产乱码久久久久久图片 | 亚洲图片一区二区| 91成人在线观看喷潮| 亚洲午夜一区二区三区| 在线观看视频一区| 午夜久久久久久久久久一区二区|