Package org.mindswap.pellet.utils

Examples of org.mindswap.pellet.utils.QNameProvider


  static public RDFNode makeRDFNode(ATermAppl term, Model model) {
    return model.asRDFNode( makeGraphNode( term ) );
  }

  static public QNameProvider makeQNameProvider(PrefixMapping mapping) {
    QNameProvider qnames = new QNameProvider();

    Iterator<Map.Entry<String, String>> entries = mapping.getNsPrefixMap().entrySet().iterator();
    while( entries.hasNext() ) {
      Map.Entry<String, String> entry = entries.next();
      String prefix = entry.getKey();
      String uri = entry.getValue();

      qnames.setMapping( prefix, uri );
    }

    return qnames;
  }
View Full Code Here


  public XSDAtomicType restrictMaxLength(int length) {
    return deriveByRestriction( DatatypeFacet.maxLength, length );
  }
   
    public String toString() {
        QNameProvider qnames = new QNameProvider();
        String str;
        if( name == null )
            str = qnames.shortForm( getPrimitiveType().getName().toString() ) + " " + values;       
        else
            str = qnames.shortForm( name.toString() );
           
       
        return str;
    }
View Full Code Here

        }
  }
   
   
    public String toString() {
        QNameProvider qnames = new QNameProvider();
        String str;
        if( isDerived() )
            str = qnames.shortForm( getPrimitiveType().getName().toString() ) + " " + (negated?"not":"") + values;       
        else
            str = qnames.shortForm( name.toString() );
           
       
        return str;
    }
View Full Code Here

    finishTask( "consistency check" );

    if( !isConsistent )
      throw new PelletCmdException( "Ontology is inconsistent, run \"pellet explain\" to get the reason" );

    QNameProvider qnames = new QNameProvider();
    Set<String> unsatisfiableClasses = new TreeSet<String>( Comparators.stringComparator );
   
    ProgressMonitor monitor = PelletOptions.USE_CLASSIFICATION_MONITOR.create();
    monitor.setProgressTitle( "Finding unsatisfiable" );
    monitor.setProgressLength( kb.getClasses().size() );
   
    startTask( "find unsatisfiable" );
    monitor.taskStarted();
   
    Iterator<ATermAppl> i = kb.getClasses().iterator();
    while( i.hasNext() ) {
      monitor.incrementProgress();
      ATermAppl c = i.next();
      if( !kb.isSatisfiable( c ) ) {
        unsatisfiableClasses.add( qnames.shortForm( c.getName() ) );
      }
    }
   
    monitor.taskFinished();
    finishTask( "find unsatisfiable" );
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.utils.QNameProvider

Copyright © 2018 www.massapicom. 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.