Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

svn commit: r225213 - /lenya/trunk/src/java/org/apache/lenya/cms/cocoon/sou: msg#00103

cms.lenya.cvs

Subject: svn commit: r225213 - /lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySource.java

Author: michi
Date: Mon Jul 25 17:25:36 2005
New Revision: 225213

URL: http://svn.apache.org/viewcvs?rev=225213&view=rev
Log:
getChildren and getName implemented

Modified:

lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySource.java

Modified:
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySource.java
URL:
http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySource.java?rev=225213&r1=225212&r2=225213&view=diff
==============================================================================
---
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySource.java
(original)
+++
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySource.java
Mon Jul 25 17:25:36 2005
@@ -341,15 +341,17 @@
*
*/
public void makeCollection() {
- getLogger().warn("makeCollection() not implemented yet!");
+ getLogger().warn("RepositorySource().makeCollection() not implemented
yet!");
}

/**
*
*/
public String getName() {
- getLogger().warn("getName() not implemented yet!");
- return null;
+ // Quick and dirty
+ String name = new java.io.File(getURI()).getName();
+ if(getLogger().isDebugEnabled()) getLogger().debug("getName(): URI: "
+ name);
+ return name;
}

/**
@@ -364,13 +366,18 @@
*
*/
public Collection getChildren() {
- getLogger().warn("getChildren() not implemented yet!");
try {
Collection children = this.node.getChildren();
- } catch (TransactionException e) {
+ java.util.Iterator iterator = children.iterator();
+ java.util.Vector newChildren = new java.util.Vector();
+ while (iterator.hasNext()) {
+ Node child = (Node) iterator.next();
+ newChildren.add(new RepositorySource(this.manager,
child.getSourceURI(), this.identityMap, getLogger()));
+ }
+ return newChildren;
+ } catch (Exception e) {
throw new RuntimeException(e);
}
- return null;
}

/**


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation