Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
JhlInfo2.java.svn-base
Package: SubclipseProj.zip [view]
Upload User: liminzq
Upload Date: 2017-11-13
Package Size: 15143k
Code Size: 6k
Category:
Jsp/Servlet
Development Platform:
Java
- /*******************************************************************************
- * Copyright (c) 2004, 2006 svnClientAdapter project and others.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * svnClientAdapter project committers - initial API and implementation
- ******************************************************************************/
- package org.tigris.subversion.svnclientadapter.javahl;
- import java.io.File;
- import java.io.IOException;
- import java.net.MalformedURLException;
- import java.util.Date;
- import org.tigris.subversion.javahl.Depth;
- import org.tigris.subversion.javahl.Info2;
- import org.tigris.subversion.svnclientadapter.ISVNInfo;
- import org.tigris.subversion.svnclientadapter.SVNNodeKind;
- import org.tigris.subversion.svnclientadapter.SVNScheduleKind;
- import org.tigris.subversion.svnclientadapter.SVNUrl;
- import org.tigris.subversion.svnclientadapter.SVNRevision.Number;
- /**
- * A JavaHL based implementation of {@link ISVNInfo}.
- * Actually just an adapter from {@link org.tigris.subversion.javahl.Info2}
- *
- * @author C閐ric Chabanois
- */
- public class JhlInfo2 implements ISVNInfo {
- private Info2 info;
- private File file;
- /**
- * Constructor
- * @param file
- * @param info
- */
- public JhlInfo2(File file, Info2 info) {
- super();
- this.file = file;
- this.info = info;
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getFile()
- */
- public File getFile() {
- if (file == null) return null;
- try {
- return file.getCanonicalFile();
- } catch (IOException e) {
- return null;
- }
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getUrl()
- */
- public SVNUrl getUrl() {
- try {
- return new SVNUrl(info.getUrl());
- } catch (MalformedURLException e) {
- //should never happen.
- return null;
- }
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getUrlString()
- */
- public String getUrlString() {
- return info.getUrl();
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getUuid()
- */
- public String getUuid() {
- return info.getReposUUID();
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getRepository()
- */
- public SVNUrl getRepository() {
- try {
- return new SVNUrl(info.getReposRootUrl());
- } catch (MalformedURLException e) {
- //should never happen.
- return null;
- }
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getSchedule()
- */
- public SVNScheduleKind getSchedule() {
- return JhlConverter.convertScheduleKind(info.getSchedule());
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getNodeKind()
- */
- public SVNNodeKind getNodeKind() {
- return JhlConverter.convertNodeKind(info.getKind());
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getAuthor()
- */
- public String getLastCommitAuthor() {
- return info.getLastChangedAuthor();
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getRevision()
- */
- public Number getRevision() {
- return JhlConverter.convertRevisionNumber(info.getRev());
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getLastChangedRevision()
- */
- public Number getLastChangedRevision() {
- return JhlConverter.convertRevisionNumber(info.getLastChangedRev());
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getLastChangedDate()
- */
- public Date getLastChangedDate() {
- return info.getLastChangedDate();
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getLastDateTextUpdate()
- */
- public Date getLastDateTextUpdate() {
- return info.getTextTime();
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getLastDatePropsUpdate()
- */
- public Date getLastDatePropsUpdate() {
- return info.getPropTime();
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#isCopied()
- */
- public boolean isCopied() {
- return (info.getCopyFromRev() > 0);
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getCopyRev()
- */
- public Number getCopyRev() {
- return JhlConverter.convertRevisionNumber(info.getCopyFromRev());
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getCopyUrl()
- */
- public SVNUrl getCopyUrl() {
- try {
- return new SVNUrl(info.getCopyFromUrl());
- } catch (MalformedURLException e) {
- //should never happen.
- return null;
- }
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getLockCreationDate()
- */
- public Date getLockCreationDate() {
- if (info.getLock() == null)
- return null;
- else
- return info.getLock().getCreationDate();
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getLockOwner()
- */
- public String getLockOwner() {
- if (info.getLock() == null)
- return null;
- else
- return info.getLock().getOwner();
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getLockComment()
- */
- public String getLockComment() {
- if (info.getLock() == null)
- return null;
- else
- return info.getLock().getComment();
- }
- /* (non-Javadoc)
- * @see org.tigris.subversion.svnclientadapter.ISVNInfo#getDepth()
- */
- public int getDepth() {
- return info.getDepth();
- }
- }