Examples of addSubClass()


Examples of com.hp.hpl.jena.ontology.OntClass.addSubClass()

        m_c.addSubClass( m_d );
        m_e.addSubClass( m_e );
        m_e.addSubClass( m_f );

        OntClass anon0 = m_model.createClass();
        anon0.addSubClass( m_a );
        anon0.addSubClass( m_e );

        List<OntClass> nhr = OntTools.namedHierarchyRoots( m_model );
        assertEquals( 3, nhr.size() );
        assertTrue( nhr.contains( m_a ));
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntClass.addSubClass()

        m_e.addSubClass( m_e );
        m_e.addSubClass( m_f );

        OntClass anon0 = m_model.createClass();
        anon0.addSubClass( m_a );
        anon0.addSubClass( m_e );

        List<OntClass> nhr = OntTools.namedHierarchyRoots( m_model );
        assertEquals( 3, nhr.size() );
        assertTrue( nhr.contains( m_a ));
        assertTrue( nhr.contains( m_e ));
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntClass.addSubClass()

        OntClass anon0 = m_model.createClass();
        OntClass anon1 = m_model.createClass();
        anon0.addSubClass( m_a );
        anon0.addSubClass( m_e );
        anon0.addSubClass( anon1 );
        anon1.addSubClass( m_g );

        m_a.addSubClass( m_b );
        m_b.addSubClass( m_c );
        m_c.addSubClass( m_d );
        m_e.addSubClass( m_e );
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntClass.addSubClass()

    /** Test for no dups in the returned list */
    public void testNamedHierarchyRoots3() {
        OntClass anon0 = m_model.createClass();
        OntClass anon1 = m_model.createClass();
        anon0.addSubClass( m_a );
        anon1.addSubClass( m_a );

        // only a is root
        m_a.addSubClass( m_b );
        m_a.addSubClass( m_c );
        m_a.addSubClass( m_d );
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntClass.addSubClass()

    /** Test for indirect route to a non-root node */
    public void testNamedHierarchyRoots4() {
        OntClass anon0 = m_model.createClass();
        OntClass anon1 = m_model.createClass();
        anon0.addSubClass( m_a );
        anon1.addSubClass( m_b );

        // only a is root, because b is a subclass of a
        // even though b is a sub-class of an anon root
        m_a.addSubClass( m_b );
        m_a.addSubClass( m_c );
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IClass.addSubClass()

      p = target.getProperty(SUB_CLASS);
      if(p != null){
        for(IClass child: getClassList(target,cls.getPropertyValues(p))){
          if(!cls.hasDirectSubClass(child)){
            // add string as a true superclass
            cls.addSubClass(child);
            child.addSuperClass(cls);
           
            // if superclass is not root, then add this class
            // as a child and remove root as parent
            if(child.hasDirectSuperClass(target.getRoot())){
View Full Code Here

Examples of edu.pitt.ontology.IClass.addSubClass()

      p = target.getProperty(SUB_CLASS);
      if(p != null){
        for(IClass child: getClassList(target,cls.getPropertyValues(p))){
          if(!cls.hasDirectSubClass(child)){
            // add string as a true superclass
            cls.addSubClass(child);
            child.addSuperClass(cls);
           
            // if superclass is not root, then add this class
            // as a child and remove root as parent
            if(child.hasDirectSuperClass(target.getRoot())){
View Full Code Here

Examples of l2p.gameserver.model.L2Player.addSubClass()

      StringTokenizer st = new StringTokenizer(fullString);
      if(st.countTokens() > 1)
      {
        st.nextToken();
        short classId = Short.parseShort(st.nextToken());
        if(!player.addSubClass(classId, true))
        {
          activeChar.sendMessage(new CustomMessage("l2p.gameserver.model.instances.L2VillageMasterInstance.SubclassCouldNotBeAdded", activeChar));
          return false;
        }
        player.sendPacket(Msg.CONGRATULATIONS_YOU_HAVE_TRANSFERRED_TO_A_NEW_CLASS); // Transfer to new class.
View Full Code Here

Examples of lineage2.gameserver.model.Player.addSubClass()

      StringTokenizer st = new StringTokenizer(fullString);
      if (st.countTokens() > 1)
      {
        st.nextToken();
        int classId = Short.parseShort(st.nextToken());
        if (!player.addSubClass(classId, true, 0, 0, false, 0))
        {
          activeChar.sendMessage(new CustomMessage("lineage2.gameserver.model.instances.L2VillageMasterInstance.SubclassCouldNotBeAdded", activeChar));
          return false;
        }
        player.sendPacket(Msg.CONGRATULATIONS_YOU_HAVE_TRANSFERRED_TO_A_NEW_CLASS);
View Full Code Here

Examples of org.mindswap.pellet.KnowledgeBase.addSubClass()

    kb.addClass( A );
    kb.addClass( B );
    kb.addClass( C );

    kb.addSubClass( TOP, and( or( B, not( A ) ), or( C, not( B ) ) ) );

    assertSubClass( kb, A, B );

    assertSubClass( kb, B, C );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.