Java Doc for LocationAttributes.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » util » location » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.util.location 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cocoon.util.location.LocationAttributes

LocationAttributes
public class LocationAttributes (Code)
A class to handle location information stored in attributes. These attributes are typically setup using org.apache.cocoon.util.location.LocationAttributes.Pipe which augments the SAX stream with additional attributes, e.g.:
 <root xmlns:loc="http://apache.org/cocoon/location"
 loc:src="file://path/to/file.xml"
 loc:line="1" loc:column="1">
 <foo loc:src="file://path/to/file.xml" loc:line="2" loc:column="3"/>
 </root>
 

See Also:   org.apache.cocoon.util.location.LocationAttributes.Pipe
since:
   2.1.8
version:
   $Id: LocationAttributes.java 446919 2006-09-16 19:19:25Z vgritsenko $

Inner Class :public static class Pipe implements ContentHandler

Field Summary
final public static  StringCOL_ATTR
    
final public static  StringLINE_ATTR
    
final public static  StringPREFIX
    
final public static  StringQ_COL_ATTR
    
final public static  StringQ_LINE_ATTR
    
final public static  StringQ_SRC_ATTR
    
final public static  StringSRC_ATTR
    
final public static  StringURI
    


Method Summary
public static  AttributesaddLocationAttributes(Locator locator, Attributes attrs)
     Add location attributes to a set of SAX attributes.
public static  intgetColumn(Attributes attrs)
    
public static  intgetColumn(Element elem)
    
public static  intgetLine(Attributes attrs)
    
public static  intgetLine(Element elem)
    
public static  LocationgetLocation(Attributes attrs, String description)
     Returns the Location of an element (SAX flavor).
public static  LocationgetLocation(Element elem, String description)
     Returns the Location of an element (DOM flavor).
public static  LocationgetLocation(Element elem)
     Same as getLocation(elem, null).
public static  StringgetLocationString(Attributes attrs)
     Returns the location of an element (SAX flavor).
public static  StringgetLocationString(Element elem)
     Returns the location of an element that has been processed by this pipe (DOM flavor).
public static  StringgetURI(Attributes attrs)
    
public static  StringgetURI(Element elem)
    
public static  voidremove(Element elem, boolean recurse)
     Remove the location attributes from a DOM element.

Field Detail
COL_ATTR
final public static String COL_ATTR(Code)
Attribute name for the column number



LINE_ATTR
final public static String LINE_ATTR(Code)
Attribute name for the line number



PREFIX
final public static String PREFIX(Code)
Prefix for the location namespace



Q_COL_ATTR
final public static String Q_COL_ATTR(Code)
Attribute qualified name for the column number



Q_LINE_ATTR
final public static String Q_LINE_ATTR(Code)
Attribute qualified name for the line number



Q_SRC_ATTR
final public static String Q_SRC_ATTR(Code)
Attribute qualified name for the location URI



SRC_ATTR
final public static String SRC_ATTR(Code)
Attribute name for the location URI



URI
final public static String URI(Code)
Namespace URI for location attributes





Method Detail
addLocationAttributes
public static Attributes addLocationAttributes(Locator locator, Attributes attrs)(Code)
Add location attributes to a set of SAX attributes.
Parameters:
  locator - the Locator (can be null)
Parameters:
  attrs - the Attributes where locator information should be added



getColumn
public static int getColumn(Attributes attrs)(Code)
Returns the column number of an element (SAX flavor)
Parameters:
  attrs - the element's attributes that hold the location information the element's column number or -1 if attrshas no location information.



getColumn
public static int getColumn(Element elem)(Code)
Returns the column number of an element (DOM flavor)
Parameters:
  elem - the element that holds the location information the element's column number or -1 if elemhas no location information.



getLine
public static int getLine(Attributes attrs)(Code)
Returns the line number of an element (SAX flavor)
Parameters:
  attrs - the element's attributes that hold the location information the element's line number or -1 if attrshas no location information.



getLine
public static int getLine(Element elem)(Code)
Returns the line number of an element (DOM flavor)
Parameters:
  elem - the element that holds the location information the element's line number or -1 if elemhas no location information.



getLocation
public static Location getLocation(Attributes attrs, String description)(Code)
Returns the Location of an element (SAX flavor).
Parameters:
  attrs - the element's attributes that hold the location information
Parameters:
  description - a description for the location (can be null) a Location object



getLocation
public static Location getLocation(Element elem, String description)(Code)
Returns the Location of an element (DOM flavor).
Parameters:
  elem - the element that holds the location information
Parameters:
  description - a description for the location (if null, the element's name is used) a Location object



getLocation
public static Location getLocation(Element elem)(Code)
Same as getLocation(elem, null).



getLocationString
public static String getLocationString(Attributes attrs)(Code)
Returns the location of an element (SAX flavor). If the location is to be kept into an object built from this element, consider using LocationAttributes.getLocation(Attributes,String) and the Locatable interface.
Parameters:
  attrs - the element's attributes that hold the location information a location string as defined by Location.toString.



getLocationString
public static String getLocationString(Element elem)(Code)
Returns the location of an element that has been processed by this pipe (DOM flavor). If the location is to be kept into an object built from this element, consider using LocationAttributes.getLocation(Element) and the Locatable interface.
Parameters:
  elem - the element that holds the location information a location string as defined by Location.toString.



getURI
public static String getURI(Attributes attrs)(Code)
Returns the URI of an element (SAX flavor)
Parameters:
  attrs - the element's attributes that hold the location information the element's URI or "[unknown location]" if attrshas no location information.



getURI
public static String getURI(Element elem)(Code)
Returns the URI of an element (DOM flavor)
Parameters:
  elem - the element that holds the location information the element's URI or "[unknown location]" if elemhas no location information.



remove
public static void remove(Element elem, boolean recurse)(Code)
Remove the location attributes from a DOM element.
Parameters:
  elem - the element to remove the location attributes from.
Parameters:
  recurse - if true, also remove location attributes on descendant elements.



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.