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

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

?? example03.java

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

import java.util.*;

import org.semanticweb.kaon2.api.*;
import org.semanticweb.kaon2.api.owl.elements.*;
import org.semanticweb.kaon2.api.owl.axioms.*;

/**
 * This example demonstrates how to retrieve elements in an ontology. Please make sure
 * you understand Example 1 before you try to understand this example.
 * 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 Example03 {
    /**
     * For details on error handling, please consult Javadoc to see the types
     * of exceptions that can be thrown by various methods.
     */
    public static void main(String[] args) throws Exception {
        // We now show some more advanced aspects of retreving elements from an ontology.
        // We first open the ontology from Example 1.
        KAON2Connection connection=KAON2Manager.newConnection();
        DefaultOntologyResolver resolver=new DefaultOntologyResolver();
        resolver.registerReplacement("http://kaon2.semanticweb.org/example01","file:src/ex01/example01.xml");
        resolver.registerReplacement("http://kaon2.semanticweb.org/example01-inc","file:src/ex01/example01-inc.xml");
        connection.setOntologyResolver(resolver);
        Ontology ontology=connection.openOntology("http://kaon2.semanticweb.org/example01",new HashMap<String,Object>());

        // In Example 1, the ontology was browsed by means of utility methods, located on
        // various API classes, such as OWLClass.getSubDescriptions(). This is a very
        // simple API, to be used only for very simple applications.
        // In reality, ontologies can be large. Hence, calling a method which e.g. returns all
        // individuals of a class might be a problem, if there are many individuals.
        // To remedy that, KAON2 provides a special optimized retrieval API, which we discuss next.
        // This API allows to read ontology elements successively, in batches. Hence, if an application
        // sees that there are too many potential results, it can always stop the retrieval.

        // All retrieval is done by means of the Request<T> class. You create a request object
        // in the following way:
        Request<Axiom> axiomRequest=ontology.createAxiomRequest();

        // You can see how many axioms the ontology contains in the following way.
        System.out.println("There are "+axiomRequest.sizeAll()+" axioms in 'example01' ontology , including all included ontologies.");

        // You might also want to know how many axioms are only in 'example01', without
        // taking into account axioms which the ontology 'inherits' through inclusion.
        // You do this using Request<T>.size() method. In fact, each retrieval operation has
        // two methods: one which takes information only into this ontology into account (and has no
        // name suffix), and one which takes information from this and all included ontologies into
        // account (and as 'All' suffix).
        System.out.println("Ontology 'example01' contains only "+axiomRequest.size()+" axioms (without taking the included ontology into account).");
        System.out.println();

        // We can now retrieve axioms with indices from 5 to 7 in all ontologies in the following way:
        Set<Axiom> axioms=axiomRequest.getAll(5,7);
        int index=5;
        for (Axiom axiom : axioms)
            System.out.println("Axiom with index "+(index++)+" is: "+axiom.toString());
        System.out.println();

        // Sometimes, you might want to retrieve all objects; this you can done by calling
        // Request<T>.get() or Request<T>.getAll(). This will return the set of all objects
        // matching the criteria.
        axioms=axiomRequest.getAll();
        System.out.println("Listing all axioms on all ontologies:");
        for (Axiom axiom : axioms)
            System.out.println("    "+axiom.toString());
        System.out.println();

        // You may set various parameters on a Request<T> to determine which information you actually want.
        // For example, you can retrieve all subclass axioms, where the superclass is '#document' as follows.
        // By passing SubClassOf.class, you say that you want SubClassOf axioms.
        Request<SubClassOf> subClassOfRequest=ontology.createAxiomRequest(SubClassOf.class);

        // Now you need to say that you don't want all subClassOf axioms, but only those there
        // the superclass is '#document'. The properties that you use as parameters correspond to
        // the JavaBeans specification. Hence, in class SubClassOf, you have the getSuperDescription() method.
        // According to the JavaBeans specification, this is equivalent to saying that SubClassOf class
        // has a superDescription property. For more details on JavaBeans, please refer to the Java documentation.
        OWLClass document=KAON2Manager.factory().owlClass("http://kaon2.semanticweb.org/example01#document");
        subClassOfRequest.setCondition("superDescription",document);

        // Now you can access all axioms.
        System.out.println("Listing subClassOf axioms where superDescription is '#document':");
        Set<SubClassOf> subClassOfAxioms=subClassOfRequest.get();
        for (SubClassOf axiom : subClassOfAxioms)
            System.out.println("    "+axiom.toString());
        System.out.println();

        // You might sometimes want to access all objects sequentially. In such a case, repeated calls
        // to Request<T> to retrieve the next window are a significant overhead: on each call,
        // a query will be executed to retrieve a particular window. To remedy that, you can open a cursor
        // over the results. A cursor allows you to access all objects sequentially, but without loading
        // then all at once into a set. This is useful for operations such as export.
        // The method Request.openCursor() exists only in one variant (i.e. there is no "All" variant); i.e.
        // a cursor allows access only to objects in one ontology.
        System.out.println("Listing all entities through a cursor:");
        Request<Entity> entityRequest=ontology.createEntityRequest();
        Cursor<Entity> cursor=entityRequest.openCursor();
        while (cursor.hasNext()) {
            Entity entity=cursor.next();
            System.out.println("    "+entity.toString());
        }
        System.out.println();

        // Cursors must be closed, otherwise you risk a resource leak.
        // Requests do not need to be closed, since they do not represent a 'live'
        // connection to the ontology.
        cursor.close();

        // We finally close the connection.
        connection.close();
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91丝袜在线播放九色| 欧美刺激午夜性久久久久久久| 成人美女视频在线观看| 国产麻豆午夜三级精品| 九九九精品视频| 久久成人久久鬼色| 国产一区二区女| 国产成人av电影在线| 丰满少妇久久久久久久| 99久久精品免费| 在线观看网站黄不卡| 欧美日韩亚洲综合一区二区三区 | 91精品国产乱码| 欧美电影在哪看比较好| 91精品国产欧美一区二区18| 日韩午夜av一区| 久久久综合九色合综国产精品| 国产三级一区二区| 亚洲欧洲精品成人久久奇米网| 亚洲精品久久7777| 中文字幕一区二区三区在线不卡 | 欧美日韩高清一区| 日韩视频在线永久播放| 精品免费99久久| 国产精品电影一区二区| 一区二区免费在线播放| 日本网站在线观看一区二区三区| 久久精品国产精品青草| 成人午夜精品在线| 在线观看av一区二区| 欧美一卡在线观看| 国产欧美日韩视频在线观看| 亚洲视频一二三| 美女一区二区三区| 99久久久久久| 欧美一区二区三区免费在线看| 精品国产91乱码一区二区三区 | 亚洲成人免费看| 狠狠色狠狠色合久久伊人| fc2成人免费人成在线观看播放 | 欧美一区二区视频观看视频| 久久这里只有精品6| 亚洲精品中文在线影院| 久久国产麻豆精品| 91麻豆精品在线观看| 8x8x8国产精品| 国产精品久久久久三级| 日韩福利电影在线观看| 春色校园综合激情亚洲| 欧美日韩国产另类一区| 中日韩av电影| 日韩精品高清不卡| 不卡欧美aaaaa| 日韩你懂的在线观看| 亚洲欧美国产高清| 精彩视频一区二区| 欧美日韩一区国产| 国产精品五月天| 久久www免费人成看片高清| 欧美在线免费播放| 国产亚洲一区二区在线观看| 午夜久久久久久久久| 成人免费看片app下载| 日韩三级高清在线| 一区二区在线观看av| 国产乱码精品一区二区三区av | 欧美日韩一区二区三区在线| 久久综合久久综合久久综合| 婷婷夜色潮精品综合在线| 99热这里都是精品| 久久久影视传媒| 日韩二区在线观看| 欧美在线短视频| 综合久久久久综合| 成人免费视频国产在线观看| 精品国产乱码久久| 日韩专区在线视频| 欧美综合一区二区| 亚洲美女免费视频| 成人性生交大片免费看视频在线 | 99久久伊人网影院| 久久久亚洲精华液精华液精华液| 日韩国产精品大片| 欧美日韩在线一区二区| 一区二区三区在线视频免费| 成人深夜福利app| 国产亚洲自拍一区| 国产东北露脸精品视频| 精品成人免费观看| 久久99精品国产.久久久久久 | 午夜精品视频一区| 日本精品一区二区三区四区的功能| 日本一区二区免费在线| 国产一区999| 国产亚洲精品bt天堂精选| 轻轻草成人在线| 久久精品视频一区二区三区| 91麻豆高清视频| 婷婷综合久久一区二区三区| 国产成人99久久亚洲综合精品| 欧美亚日韩国产aⅴ精品中极品| 国产精品卡一卡二卡三| 粉嫩绯色av一区二区在线观看| 国产午夜精品理论片a级大结局| 日韩国产在线观看| 亚洲精品国产一区二区精华液| 国产另类ts人妖一区二区| 日韩精品专区在线影院重磅| 麻豆极品一区二区三区| 久久综合一区二区| 国产成人精品免费| 国产精品免费久久久久| av成人老司机| 亚洲线精品一区二区三区 | 欧美精品视频www在线观看| 午夜欧美一区二区三区在线播放| 这里是久久伊人| 国产综合色产在线精品| 国产精品伦理一区二区| 99久久久精品免费观看国产蜜| 亚洲综合视频网| 91精品在线一区二区| 国产一区二区免费视频| 国产精品久久久久久户外露出| 日本高清不卡视频| 日韩综合一区二区| 久久久久久久综合日本| 91婷婷韩国欧美一区二区| 亚洲一区二区三区中文字幕| 欧美一区在线视频| 国产一区二区不卡在线 | 91亚洲国产成人精品一区二区三 | 国产一区在线精品| 欧美日韩国产美| 欧美色电影在线| 五月天视频一区| 欧美午夜电影在线播放| 日韩电影在线观看网站| 久久综合九色综合欧美亚洲| 成人福利电影精品一区二区在线观看| 国产精品国模大尺度视频| 欧美性xxxxxx少妇| 精品一区二区三区视频在线观看| 国产精品不卡在线| 欧美区在线观看| 国产成人av资源| 亚洲电影中文字幕在线观看| 欧美成人猛片aaaaaaa| 99久久伊人久久99| 日韩av中文字幕一区二区三区| 国产日韩欧美一区二区三区乱码| 色哟哟欧美精品| 国产在线精品一区在线观看麻豆| 中文字幕日韩av资源站| 欧美精品xxxxbbbb| 99麻豆久久久国产精品免费优播| 日韩精品成人一区二区三区| 国产精品免费看片| 日韩免费观看高清完整版 | 欧美日韩国产一区| 国产麻豆成人传媒免费观看| 伊人性伊人情综合网| 久久久99免费| 欧美喷潮久久久xxxxx| 国产一区二区福利视频| 欧美午夜理伦三级在线观看| 久久精品在这里| 亚洲黄色小视频| 夜夜嗨av一区二区三区网页 | 欧美性猛交xxxx乱大交退制版| 久88久久88久久久| 亚洲一区二区三区视频在线| 久久久精品国产免大香伊| 欧美精品丝袜久久久中文字幕| www.66久久| 国产精品自拍网站| 蜜桃av噜噜一区| 亚洲福利国产精品| 亚洲色图一区二区| 国产日韩欧美不卡| 欧美精品一区二区在线播放| 欧美日韩国产综合一区二区| 99久久伊人久久99| 国产69精品久久777的优势| 麻豆国产欧美一区二区三区| 亚洲大片精品永久免费| 亚洲欧洲综合另类在线| 国产精品久久久久久一区二区三区 | 日日摸夜夜添夜夜添国产精品 | 欧美一区二区三区日韩视频| 美女mm1313爽爽久久久蜜臀| 蜜桃一区二区三区在线| 亚洲妇女屁股眼交7| 亚洲欧美日韩中文播放| 国产精品久久毛片| 亚洲国产精品高清| 国产欧美一区二区精品性色| 久久影院午夜片一区| 精品国产乱码久久久久久浪潮 | 一区二区三区在线视频观看|