1 6 7 package com.hp.hpl.jena.rdf.model; 8 9 import com.hp.hpl.jena.datatypes.*; 10 import com.hp.hpl.jena.shared.*; 11 12 import java.io.*; 13 import java.util.*; 14 15 66 public interface Model 67 extends ModelCon, ModelGraphInterface, 68 RDFReaderF, RDFWriterF, PrefixMapping, ModelLock 69 { 70 71 72 81 long size() ; 82 83 89 boolean isEmpty(); 90 91 99 ResIterator listSubjects() ; 100 101 111 NsIterator listNameSpaces() ; 112 113 122 Resource getResource(String uri) ; 123 124 134 Property getProperty(String nameSpace, String localName); 135 136 143 public Resource createResource() ; 144 145 158 public Resource createResource( AnonId id ); 159 160 174 public Resource createResource( String uri ) ; 175 176 188 public Property createProperty(String nameSpace, String localName); 189 190 196 197 public Literal createLiteral(String v, String language); 198 199 211 public Literal createLiteral(String v, String language, boolean wellFormed); 212 213 225 public Literal createLiteral(String v, boolean wellFormed); 226 227 241 public Literal createTypedLiteral(String lex, RDFDatatype dtype); 242 243 254 public Literal createTypedLiteral(Object value, RDFDatatype dtype); 255 256 262 public Literal createTypedLiteral(Object value); 263 264 276 public Statement createStatement( Resource s, Property p, RDFNode o ); 277 278 283 public RDFList createList(); 284 285 286 291 public RDFList createList( Iterator members ); 292 293 294 299 public RDFList createList( RDFNode[] members ); 300 301 302 307 Model add(Statement s) ; 308 309 315 Model add( Statement [] statements ); 316 317 322 Model remove( Statement [] statements ); 323 324 331 Model add( List statements ); 332 333 339 Model remove( List statements ); 340 341 345 Model add(StmtIterator iter) ; 346 347 352 Model add(Model m) ; 353 354 361 Model add( Model m, boolean suppressReifications ); 362 363 370 public Model read(String url) ; 371 372 380 public Model read(InputStream in, String base) ; 381 382 399 public Model read(InputStream in, String base, String lang) 400 ; 401 402 416 public Model read(Reader reader, String base) ; 417 418 432 public Model read(String url, String lang) ; 433 434 458 public Model read(Reader reader, String base, String lang); 459 460 466 Model read( String url, String base, String lang ); 467 468 470 479 public Model write( Writer writer ) ; 480 481 494 public Model write( Writer writer, String lang ) ; 495 496 511 public Model write( Writer writer, String lang, String base ); 512 513 514 524 public Model write(OutputStream out) ; 525 526 537 public Model write( OutputStream out, String lang ) ; 538 539 552 public Model write( OutputStream out, String lang, String base ); 553 554 562 Model remove(Statement s) ; 563 564 573 Statement getRequiredProperty(Resource s, Property p) ; 574 575 582 Statement getProperty( Resource s, Property p ); 583 584 590 ResIterator listSubjectsWithProperty(Property p) ; 591 592 598 ResIterator listSubjectsWithProperty(Property p, RDFNode o) 599 ; 600 601 604 NodeIterator listObjects() ; 605 606 610 NodeIterator listObjectsOfProperty(Property p) ; 611 612 616 NodeIterator listObjectsOfProperty(Resource s, Property p); 617 618 626 boolean contains(Resource s, Property p) ; 627 628 636 boolean containsResource( RDFNode r ); 637 638 647 boolean contains(Resource s, Property p, RDFNode o) ; 648 649 654 boolean contains(Statement s) ; 655 656 663 boolean containsAny(StmtIterator iter) ; 664 665 672 boolean containsAll(StmtIterator iter) ; 673 674 681 boolean containsAny(Model model) ; 682 683 690 boolean containsAll(Model model) ; 691 692 698 boolean isReified( Statement s ); 699 700 705 Resource getAnyReifiedStatement( Statement s ); 706 707 710 void removeAllReifications( Statement s ); 711 712 715 void removeReification( ReifiedStatement rs ); 716 717 723 StmtIterator listStatements() ; 724 725 733 StmtIterator listStatements(Selector s) ; 734 746 747 StmtIterator listStatements( Resource s, Property p, RDFNode o ); 748 749 756 ReifiedStatement createReifiedStatement( Statement s ); 757 758 762 ReifiedStatement createReifiedStatement( String uri, Statement s ); 763 764 767 RSIterator listReifiedStatements(); 768 769 773 RSIterator listReifiedStatements( Statement st ); 774 775 779 ReificationStyle getReificationStyle(); 780 781 789 Model query(Selector s) ; 790 791 797 Model union(Model model) ; 798 799 806 Model intersection(Model model) ; 807 808 815 Model difference(Model model) ; 816 817 823 public boolean equals(Object model); 824 825 832 Model begin() ; 833 834 838 Model abort() ; 839 840 844 Model commit() ; 845 846 852 Object executeInTransaction( Command cmd ); 853 854 863 boolean independent(); 864 865 868 boolean supportsTransactions(); 869 870 873 boolean supportsSetOperations(); 874 894 boolean isIsomorphicWith(Model g); 895 896 902 public void close(); 903 904 910 public ModelLock getModelLock() ; 911 912 923 public Model register( ModelChangedListener listener ); 924 925 933 public Model unregister( ModelChangedListener listener ); 934 935 939 public Model notifyEvent( Object e ); 940 941 944 public Model removeAll(); 945 946 949 public Model removeAll( Resource s, Property p, RDFNode r ); 950 951 } 952 953 | Popular Tags |