0

Eclipse 3.4、Jsf 1.2、Java 1.7、Tomcat 7、および owl api 4.0 に動的 Web プロジェクトがあります。Java のバッキング Bean でhereのサンプル コードを使用しています。このコードは Java アプリケーションではスムーズに実行されますが、JSF プロジェクトで使用されて tomcat 7 サーバーで実行されるとエラーが発生します。

コード スニペットは次のとおりです。

OWLOntologyWalkerVisitor<Object> visitor = new OWLOntologyWalkerVisitor<Object>(
            walker) {
            @Override
            public Object visit(OWLObjectSomeValuesFrom desc) {
            // Print out the restriction
            System.out.println(desc);
            // Print out the axiom where the restriction is used
            System.out.println(" " + getCurrentAxiom());
            System.out.println();
            // We don't need to return anything here.
            return null;
            }
            };
            // Now ask the walker to walk over the ontology structure using our
            // visitor instance.
            walker.walkStructure(visitor);

それが生成するエラーは次のとおりです:-

 The type OWLOntologyWalkerVisitor is not generic; it cannot be parameterized with arguments<Object>  

なぜこれが起こっているのですか?

4

1 に答える 1