Java Doc for MarkupUnit.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » insync » markup » 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 » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.insync.markup 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.visualweb.insync.SourceUnit
      org.netbeans.modules.visualweb.insync.markup.MarkupUnit

MarkupUnit
public class MarkupUnit extends SourceUnit implements org.w3c.dom.events.EventListener(Code)

Inner Class :public static class XhtmlEntityResolver implements EntityResolver
Inner Class :public class LineCountingWriter extends Writer

Field Summary
final public static  intALLOW_HTML
    
final public static  intALLOW_XML
    
final static  StringBLANK
    
final public static  StringDOM_ATTR_MODIFIED
    
final public static  StringDOM_CHARACTER_DATA_MODIFIED
    
final public static  StringDOM_DOCUMENT_REPLACED
     Insync extention of MutationEventImpl type (see insyc/MarkupUnit and xerces/MuationEventImpl).
final public static  StringDOM_NODE_INSERTED
    
final public static  StringDOM_NODE_INSERTED_INTO_DOCUMENT
    
final public static  StringDOM_NODE_REMOVED
    
final public static  StringDOM_NODE_REMOVED_FROM_DOCUMENT
    
final public static  StringDOM_SUBTREE_MODIFIED
    
 URLbase
    
 URIbaseURI
    
 intflags
    
 Map<String, String>namespaceUriMap
    
 HashMapnamespaces
    
protected  EventTargetregisteredAsEventListenerOn
    

Constructor Summary
public  MarkupUnit(FileObject fobj, int flags, boolean supportCss, UndoManager undoManager)
    

Method Summary
public  ElementaddElement(Element parent, Node before, String taglibUri, String tagPrefix, String tag)
    
public  voidappendParsedString(Node parent, String xhtml, MarkupDesignBean bean)
    
public  intcomputeLine(Element element)
     Return the buffer start position of a given node.
public  voiddestroy()
    
public  voiddump(org.w3c.dom.Node node, PrintWriter w, int level)
    
public  voiddumpTo(PrintWriter w)
    
public  voidensureAttributeExists(Element element, String attr, String defValue)
     Ensure that a given attribute of a given element exists.
public  voidensureAttributeValue(Element element, String attr, String value)
     Ensure that a given attribute of a given element is a specific value.
public static  ElementensureElement(Element parent, String tag, Element after)
    
public static  ElementensureRoot(Document document, String tag)
     Ensures that there is an element of a given type at the root of the document.
public  ElementfindHtmlTag(Node root)
     Locate the <html> tag.
public  StringfindTaglibUri(String prefix)
    
public  URLgetBase()
     Returns the location to resolve relative URLs against.
public  URIgetBaseURI()
    
public static  ElementgetDescendantElementByAttr(Element parent, String tag, String attrName, String attrValue)
    
public static  StringgetElementText(Element elem)
     Get the text body of an element.
public  StringgetEncoding()
    
public  ParserAnnotation[]getErrors()
     Return the list of errors if this unit does not compile.
public static  ElementgetFirstChildElement(Node parent)
    
public static  ElementgetFirstDescendantElement(Element parent, String tag)
    
public static  StringgetIanaEncoding(String encoding)
    
public static  MarkupDesignBeangetMarkupDesignBeanForElement(Element element)
    
public static  MarkupUnitgetMarkupUnitForDocument(Document doc)
    
public  StringgetNamespacePrefix(String namespaceUri, String suggPrefix)
     Gets the actual prefix in this document for a given namespace.
public static  ElementgetNextSiblingElement(Node elem)
    
public  intgetOffset(Element element)
     Return the buffer start offset of a given node.
public  OutputFormatgetOutputFormat()
    
public  DocumentgetRenderedDom()
    
public  DocumentgetSourceDom()
    
public static  URLgetUrlForDocument(Document doc)
    
public  voidhandleEvent(org.w3c.dom.events.Event e)
    
public  voidindent(PrintWriter w, int level)
    
public static  booleanisDescendent(Node parent, Node descendent)
    
public  booleanisHtmlOnly()
     Return true iff this web page should not be converted to a web form if it's missing a backing file.
public  voidmarkHtmlOnly()
     Mark this web form in such a way that in the future, isHtmlOnly will return false.
protected  voidread(char[] buf, int len)
     Read the actual characters from the source document's content and into our DOM source document object.
public static  voidsetElementText(Element elem, String text)
     Set the text body of an element.
public static  voidsetMarkupDesignBeanForElement(Element element, MarkupDesignBean markupDesignBean)
    
public static  voidsetUrlForDocument(Document doc, URL url)
    
public static  StringtoURL(String path)
     Convert the given path to a URL: encode spaces to %20's, use only forward slashes, etc.
protected  voidunregisterDomListeners()
    
public  voidwriteTo(Writer w)
    

Field Detail
ALLOW_HTML
final public static int ALLOW_HTML(Code)



ALLOW_XML
final public static int ALLOW_XML(Code)



BLANK
final static String BLANK(Code)



DOM_ATTR_MODIFIED
final public static String DOM_ATTR_MODIFIED(Code)



DOM_CHARACTER_DATA_MODIFIED
final public static String DOM_CHARACTER_DATA_MODIFIED(Code)



DOM_DOCUMENT_REPLACED
final public static String DOM_DOCUMENT_REPLACED(Code)
Insync extention of MutationEventImpl type (see insyc/MarkupUnit and xerces/MuationEventImpl).



DOM_NODE_INSERTED
final public static String DOM_NODE_INSERTED(Code)



DOM_NODE_INSERTED_INTO_DOCUMENT
final public static String DOM_NODE_INSERTED_INTO_DOCUMENT(Code)



DOM_NODE_REMOVED
final public static String DOM_NODE_REMOVED(Code)



DOM_NODE_REMOVED_FROM_DOCUMENT
final public static String DOM_NODE_REMOVED_FROM_DOCUMENT(Code)



DOM_SUBTREE_MODIFIED
final public static String DOM_SUBTREE_MODIFIED(Code)



base
URL base(Code)



baseURI
URI baseURI(Code)



flags
int flags(Code)



namespaceUriMap
Map<String, String> namespaceUriMap(Code)



namespaces
HashMap namespaces(Code)



registeredAsEventListenerOn
protected EventTarget registeredAsEventListenerOn(Code)




Constructor Detail
MarkupUnit
public MarkupUnit(FileObject fobj, int flags, boolean supportCss, UndoManager undoManager)(Code)
Construct an MarkupUnit with a source doc




Method Detail
addElement
public Element addElement(Element parent, Node before, String taglibUri, String tagPrefix, String tag)(Code)



appendParsedString
public void appendParsedString(Node parent, String xhtml, MarkupDesignBean bean)(Code)



computeLine
public int computeLine(Element element)(Code)
Return the buffer start position of a given node. Not currently very efficient or accurate the char offset of the node, -1 if not found



destroy
public void destroy()(Code)



dump
public void dump(org.w3c.dom.Node node, PrintWriter w, int level)(Code)



dumpTo
public void dumpTo(PrintWriter w)(Code)



ensureAttributeExists
public void ensureAttributeExists(Element element, String attr, String defValue)(Code)
Ensure that a given attribute of a given element exists. Create it with the default value if it does not, leave it alone if it is. Handles special case of xmlns definition attributes.



ensureAttributeValue
public void ensureAttributeValue(Element element, String attr, String value)(Code)
Ensure that a given attribute of a given element is a specific value. Update it if it is not, leave it alone if it is. Handles special case of xmlns definition attributes.



ensureElement
public static Element ensureElement(Element parent, String tag, Element after)(Code)



ensureRoot
public static Element ensureRoot(Document document, String tag)(Code)
Ensures that there is an element of a given type at the root of the document. the found or created element



findHtmlTag
public Element findHtmlTag(Node root)(Code)
Locate the <html> tag. In a normal xhtml/html document, it's the same as the root tag for the DOM, but in our JSF files, it might be nested within <jsp:root>, <f:view>, etc.
Parameters:
  root - The root tag The html tag Element



findTaglibUri
public String findTaglibUri(String prefix)(Code)



getBase
public URL getBase()(Code)
Returns the location to resolve relative URLs against. By default this will be the document's URL if the document was loaded from a URL. If a base tag is found and can be parsed, it will be used as the base location. the base location



getBaseURI
public URI getBaseURI()(Code)



getDescendantElementByAttr
public static Element getDescendantElementByAttr(Element parent, String tag, String attrName, String attrValue)(Code)
Return the child element with a given value for a given attribute



getElementText
public static String getElementText(Element elem)(Code)
Get the text body of an element. Any markup is ignored.



getEncoding
public String getEncoding()(Code)
the current encoding in IANA form, or null for default (UTF8)



getErrors
public ParserAnnotation[] getErrors()(Code)
Return the list of errors if this unit does not compile. If there are no errors it returns an empty array - never null. An array of ParserAnnotations.



getFirstChildElement
public static Element getFirstChildElement(Node parent)(Code)
Get the first child node that is an element



getFirstDescendantElement
public static Element getFirstDescendantElement(Element parent, String tag)(Code)
Get the first descendant element with a given tag



getIanaEncoding
public static String getIanaEncoding(String encoding)(Code)
Return a Xerces-compatible IANA encoding given a Java or IANA encoding
Parameters:
  encoding - Java or IANA encoding Xerces-compatible IANA encoding



getMarkupDesignBeanForElement
public static MarkupDesignBean getMarkupDesignBeanForElement(Element element)(Code)



getMarkupUnitForDocument
public static MarkupUnit getMarkupUnitForDocument(Document doc)(Code)



getNamespacePrefix
public String getNamespacePrefix(String namespaceUri, String suggPrefix)(Code)
Gets the actual prefix in this document for a given namespace. Registers the default if it does not yet exist.
Parameters:
  namespaceUri -
Parameters:
  suggPrefix - the existing or newly registered prefix



getNextSiblingElement
public static Element getNextSiblingElement(Node elem)(Code)
Get the next sibling node that is an element



getOffset
public int getOffset(Element element)(Code)
Return the buffer start offset of a given node. Not currently very efficient or accurate the char offset of the node, -1 if not found



getOutputFormat
public OutputFormat getOutputFormat()(Code)
Get the output format to be used when serializing this buffer



getRenderedDom
public Document getRenderedDom()(Code)



getSourceDom
public Document getSourceDom()(Code)



getUrlForDocument
public static URL getUrlForDocument(Document doc)(Code)



handleEvent
public void handleEvent(org.w3c.dom.events.Event e)(Code)



indent
public void indent(PrintWriter w, int level)(Code)



isDescendent
public static boolean isDescendent(Node parent, Node descendent)(Code)
Return the child element with a given value for a given attribute



isHtmlOnly
public boolean isHtmlOnly()(Code)
Return true iff this web page should not be converted to a web form if it's missing a backing file. Web forms can be marked in this way if the user answers no to the conversion dialog.



markHtmlOnly
public void markHtmlOnly()(Code)
Mark this web form in such a way that in the future, isHtmlOnly will return false. In other words, if this web page should not be converted to a web form, call this method such that the conversion dialog is not shown next time this markup document is opened. This method should NOT be called on a file which already returns isHtmlOnly (it may add additional meta tags, not look for existing ones first).



read
protected void read(char[] buf, int len)(Code)
Read the actual characters from the source document's content and into our DOM source document object. Try an XML and/or an HTML parser depending on our flags setting.



setElementText
public static void setElementText(Element elem, String text)(Code)
Set the text body of an element. Any markup is lost.



setMarkupDesignBeanForElement
public static void setMarkupDesignBeanForElement(Element element, MarkupDesignBean markupDesignBean)(Code)



setUrlForDocument
public static void setUrlForDocument(Document doc, URL url)(Code)



toURL
public static String toURL(String path)(Code)
Convert the given path to a URL: encode spaces to %20's, use only forward slashes, etc.



unregisterDomListeners
protected void unregisterDomListeners()(Code)



writeTo
public void writeTo(Writer w) throws java.io.IOException(Code)



Fields inherited from org.netbeans.modules.visualweb.insync.SourceUnit
protected FileObject fobj(Code)(Java Doc)
protected Date lastModelDirty(Code)(Java Doc)
protected Date lastModified(Code)(Java Doc)
protected HashSet listeners(Code)(Java Doc)
protected StyledDocument styledDocument(Code)(Java Doc)
protected UndoManager undoManager(Code)(Java Doc)

Methods inherited from org.netbeans.modules.visualweb.insync.SourceUnit
public void addListener(SourceUnitListener listener)(Code)(Java Doc)
public void changedUpdate(DocumentEvent e)(Code)(Java Doc)
public void destroy()(Code)(Java Doc)
final public void dumpTo(OutputStream out)(Code)(Java Doc)
protected void endFlush(boolean madeDirty)(Code)(Java Doc)
public void fileAttributeChanged(FileAttributeEvent fe)(Code)(Java Doc)
public void fileChanged(FileEvent fe)(Code)(Java Doc)
public void fileDataCreated(FileEvent fe)(Code)(Java Doc)
public void fileDeleted(FileEvent fe)(Code)(Java Doc)
public void fileFolderCreated(FileEvent fe)(Code)(Java Doc)
public void fileRenamed(FileRenameEvent fe)(Code)(Java Doc)
protected void fireModelDirtied()(Code)(Java Doc)
protected void fireSaved()(Code)(Java Doc)
protected void fireSourceDirtied()(Code)(Java Doc)
protected synchronized void firstWriteLock()(Code)(Java Doc)
public boolean flush()(Code)(Java Doc)
public DataObject getDataObject()(Code)(Java Doc)
public ParserAnnotation[] getErrors()(Code)(Java Doc)
public FileObject getFileObject()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public StyledDocument getSourceDocument()(Code)(Java Doc)
public State getState()(Code)(Java Doc)
final protected synchronized Thread getWritingThread()(Code)(Java Doc)
public void insertUpdate(DocumentEvent e)(Code)(Java Doc)
public boolean isBusted()(Code)(Java Doc)
public boolean isWriteLocked()(Code)(Java Doc)
protected synchronized void lastWriteUnlock()(Code)(Java Doc)
protected boolean minimalReplace(String newText)(Code)(Java Doc)
public void propertyChange(PropertyChangeEvent event)(Code)(Java Doc)
abstract protected void read(char[] cbuf, int len)(Code)(Java Doc)
final public synchronized void readLock()(Code)(Java Doc)
final public synchronized void readUnlock()(Code)(Java Doc)
protected void releaseDocument()(Code)(Java Doc)
public void removeListener(SourceUnitListener listener)(Code)(Java Doc)
public void removeUpdate(DocumentEvent e)(Code)(Java Doc)
public void save()(Code)(Java Doc)
public void setBusted()(Code)(Java Doc)
public void setClean()(Code)(Java Doc)
public void setModelDirty()(Code)(Java Doc)
public void setSourceDirty()(Code)(Java Doc)
protected void startFlush()(Code)(Java Doc)
public boolean sync()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
protected void toString(StringBuffer sb)(Code)(Java Doc)
public void undoableEditHappened(UndoableEditEvent e)(Code)(Java Doc)
final public synchronized void writeLock(UndoEvent event)(Code)(Java Doc)
abstract public void writeTo(Writer w) throws java.io.IOException(Code)(Java Doc)
public void writeTo(OutputStream out) throws java.io.IOException(Code)(Java Doc)
final public synchronized boolean writeUnlock(UndoEvent event)(Code)(Java Doc)

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.