Java Doc for N3JenaWriterCommon.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » n3 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.n3 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.hp.hpl.jena.n3.N3JenaWriterCommon

All known Subclasses:   com.hp.hpl.jena.n3.N3JenaWriterTriples,  com.hp.hpl.jena.n3.N3JenaWriterPP,  com.hp.hpl.jena.n3.N3JenaWriterPlain,
N3JenaWriterCommon
public class N3JenaWriterCommon implements RDFWriter(Code)
Common framework for implementing N3 writers.
author:
   Andy Seaborne
version:
   $Id: N3JenaWriterCommon.java,v 1.41 2008/02/08 16:13:20 andy_seaborne Exp $


Field Summary
final static  StringNS_W3_log
    
final static  StringWS
    
 booleanallowDecimals
    
 booleanallowDoubles
    
 booleanallowTripleQuotedStrings
    
 booleanalwaysAllocateBNodeLabel
    
 intbNodeCounter
    
 MapbNodesMap
    
 RDFErrorHandlererrorHandler
    
 intindentObject
    
 intindentProperty
    
static  Loglogger
    
 intminGap
    
 StringminGapStr
    
 IndentedWriterout
    
 MapprefixMap
    
 intpropertyCol
    
 intshortSubject
    
 intsubjectColumn
    
 booleanuseWellKnownPropertySymbols
    
static  MapwellKnownPropsMap
    
 intwidePropertyLen
    
 MapwriterPropertyMap
    


Method Summary
protected  StringabsolutePropName(String propName)
    
protected  intcalcPropertyPadding(String propStr)
    
static  booleancheckQName(String ns, String local)
    
static  booleancheckQNameLocalname(String s)
    
static  booleancheckQNameNamespace(String s)
    
static  booleancheckQNamePart(String s)
    
protected  intcountArcsTo(Resource resource)
    
protected  intcountArcsTo(Property prop, Resource resource)
    
protected  intcountProperties(Resource r)
    
protected  intcountProperties(Resource r, Property p)
    
protected  voidfinishWriting()
    
protected  StringformatLiteral(Literal literal)
    
protected  StringformatNode(RDFNode node)
    
protected  StringformatProperty(Property p)
    
protected  StringformatResource(Resource r)
    
protected  StringformatURI(String uriStr)
    
protected  booleangetBooleanValue(String prop, boolean defaultValue)
    
protected  intgetIntValue(String prop, int defaultValue)
    
protected  IndentedWritergetOutput()
    
protected  MapgetPrefixes()
    
protected  StringgetPropValue(String prop)
    
protected  StringgetStringValue(String prop, String defaultValue)
    
protected  ResIteratorlistSubjects(Model model)
    
protected  StringlocalPropName(String propName)
    
protected static  Stringpad(int cols)
    
protected  voidprepare(Model model)
    
protected  ClosableIteratorpreparePropertiesForSubject(Resource r)
    
protected  voidprocessModel(Model baseModel)
    
protected  IteratorrdfListIterator(Resource r)
    
public  RDFErrorHandlersetErrorHandler(RDFErrorHandler errHandler)
    
public  ObjectsetProperty(String propName, Object propValue)
    
protected  booleanskipThisSubject(Resource r)
    
protected  voidstartWriting()
    
protected static  voidstring(StringBuffer sbuff, String s, boolean singleQuoteLiteral)
    
public  voidwrite(Model baseModel, Writer _out, String base)
     Write the model out in N3.
public synchronized  voidwrite(Model model, OutputStream output, String base)
    
protected  voidwriteHeader(Model model)
    
protected  voidwriteLiteral(Literal literal)
    
protected  voidwriteModel(Model model)
    
protected  voidwriteObject(RDFNode node)
    
protected  voidwriteObjectList(Resource subject, Property property)
    
protected  voidwriteOneGraphNode(Resource subject)
    
protected  voidwritePrefixes(Model model)
    
protected  voidwritePropertiesForSubject(Resource subj, ClosableIterator iter)
    
protected  voidwriteSubject(Resource subject)
    

Field Detail
NS_W3_log
final static String NS_W3_log(Code)



WS
final static String WS(Code)



allowDecimals
boolean allowDecimals(Code)



allowDoubles
boolean allowDoubles(Code)



allowTripleQuotedStrings
boolean allowTripleQuotedStrings(Code)



alwaysAllocateBNodeLabel
boolean alwaysAllocateBNodeLabel(Code)



bNodeCounter
int bNodeCounter(Code)



bNodesMap
Map bNodesMap(Code)



errorHandler
RDFErrorHandler errorHandler(Code)



indentObject
int indentObject(Code)



indentProperty
int indentProperty(Code)



logger
static Log logger(Code)



minGap
int minGap(Code)



minGapStr
String minGapStr(Code)



out
IndentedWriter out(Code)



prefixMap
Map prefixMap(Code)



propertyCol
int propertyCol(Code)



shortSubject
int shortSubject(Code)



subjectColumn
int subjectColumn(Code)



useWellKnownPropertySymbols
boolean useWellKnownPropertySymbols(Code)



wellKnownPropsMap
static Map wellKnownPropsMap(Code)



widePropertyLen
int widePropertyLen(Code)



writerPropertyMap
Map writerPropertyMap(Code)





Method Detail
absolutePropName
protected String absolutePropName(String propName)(Code)



calcPropertyPadding
protected int calcPropertyPadding(String propStr)(Code)



checkQName
static boolean checkQName(String ns, String local)(Code)



checkQNameLocalname
static boolean checkQNameLocalname(String s)(Code)



checkQNameNamespace
static boolean checkQNameNamespace(String s)(Code)



checkQNamePart
static boolean checkQNamePart(String s)(Code)



countArcsTo
protected int countArcsTo(Resource resource)(Code)



countArcsTo
protected int countArcsTo(Property prop, Resource resource)(Code)



countProperties
protected int countProperties(Resource r)(Code)



countProperties
protected int countProperties(Resource r, Property p)(Code)



finishWriting
protected void finishWriting()(Code)



formatLiteral
protected String formatLiteral(Literal literal)(Code)



formatNode
protected String formatNode(RDFNode node)(Code)



formatProperty
protected String formatProperty(Property p)(Code)



formatResource
protected String formatResource(Resource r)(Code)



formatURI
protected String formatURI(String uriStr)(Code)



getBooleanValue
protected boolean getBooleanValue(String prop, boolean defaultValue)(Code)



getIntValue
protected int getIntValue(String prop, int defaultValue)(Code)



getOutput
protected IndentedWriter getOutput()(Code)



getPrefixes
protected Map getPrefixes()(Code)



getPropValue
protected String getPropValue(String prop)(Code)



getStringValue
protected String getStringValue(String prop, String defaultValue)(Code)



listSubjects
protected ResIterator listSubjects(Model model)(Code)



localPropName
protected String localPropName(String propName)(Code)



pad
protected static String pad(int cols)(Code)



prepare
protected void prepare(Model model)(Code)



preparePropertiesForSubject
protected ClosableIterator preparePropertiesForSubject(Resource r)(Code)



processModel
protected void processModel(Model baseModel)(Code)



rdfListIterator
protected Iterator rdfListIterator(Resource r)(Code)



setErrorHandler
public RDFErrorHandler setErrorHandler(RDFErrorHandler errHandler)(Code)



setProperty
public Object setProperty(String propName, Object propValue)(Code)



skipThisSubject
protected boolean skipThisSubject(Resource r)(Code)



startWriting
protected void startWriting()(Code)



string
protected static void string(StringBuffer sbuff, String s, boolean singleQuoteLiteral)(Code)



write
public void write(Model baseModel, Writer _out, String base)(Code)
Write the model out in N3. The writer should be one suitable for UTF-8 which excludes a PrintWriter or a FileWriter which use default character set. Examples:
 try {
 Writer w =  new BufferedWriter(new OutputStreamWriter(output, "UTF-8")) ;
 model.write(w, base) ;
 try { w.flush() ; } catch (IOException ioEx) {}
 } catch (java.io.UnsupportedEncodingException ex) {} //UTF-8 is required so can't happen
 
or
 try {
 OutputStream out = new FileOutputStream(file) ;
 Writer w =  new BufferedWriter(new OutputStreamWriter(out, "UTF-8")) ;
 model.write(w, base) ;
 }
 catch (java.io.UnsupportedEncodingException ex) {}
 catch (java.io.FileNotFoundException noFileEx) { ... }
 

See Also:   N3JenaWriterCommon.write(Model,Writer,String)



write
public synchronized void write(Model model, OutputStream output, String base)(Code)
Write the model out in N3, encoded in in UTF-8
See Also:   N3JenaWriterCommon.write(Model,Writer,String)



writeHeader
protected void writeHeader(Model model)(Code)



writeLiteral
protected void writeLiteral(Literal literal)(Code)



writeModel
protected void writeModel(Model model)(Code)



writeObject
protected void writeObject(RDFNode node)(Code)



writeObjectList
protected void writeObjectList(Resource subject, Property property)(Code)



writeOneGraphNode
protected void writeOneGraphNode(Resource subject)(Code)



writePrefixes
protected void writePrefixes(Model model)(Code)



writePropertiesForSubject
protected void writePropertiesForSubject(Resource subj, ClosableIterator iter)(Code)



writeSubject
protected void writeSubject(Resource subject)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.