org.teldap.core.xmlvalidator.unionCatalog.rule
Class URLValidation

java.lang.Object
  extended by org.teldap.core.xmlvalidator.unionCatalog.rule.URLValidation

public class URLValidation
extends java.lang.Object

Copyright 2009 數位典藏與數位學習國家型科技計畫(TELDAP) 數位核心平台計畫

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.

Title: 檢查/DACatalog/AdminDesc/Hyperlink、/DACatalog/AdminDesc/ICON、/DACatalog/ AdminDesc/Multimedia 的連結是否有效

Version:
1.0
Author:
徐慈妍、洪崇熙、洪國翔

Constructor Summary
URLValidation()
           
 
Method Summary
 java.util.HashMap collectMsg()
           
 java.lang.String getHyperlinkTagName()
           
 java.lang.String getICONTagName()
           
 java.util.ArrayList getLosingHyperlink()
          取得失效的/DACatalog/AdminDesc/Hyperlink value
 java.util.ArrayList getLosingICON()
          取得失效的/DACatalog/AdminDesc/ICON value
 java.util.ArrayList getLosingMultimedia()
          取得失效的/DACatalog/AdminDesc/Multimedia value
 java.lang.String getMultimediaTagName()
           
 boolean imageLinkValidate(java.lang.String strURL)
          檢查/DACatalog/AdminDesc/ICON,包括兩項: 1.檢查連結的response code是否等於200(ok,表示連結成功)。
 boolean isHyperlinkContentExist(java.lang.String url)
           
 boolean isICONContentExist(java.lang.String url)
           
 boolean isValidateHyperlink(java.lang.String url)
           
 boolean isValidateHyperlinkTag(int size)
           
 boolean isValidateICON(java.lang.String url)
           
 boolean isValidateICONTag(int size)
           
 boolean isValidateMultimedia(java.lang.String url)
           
 boolean linkValidate(java.lang.String strURL)
          檢查連結是否有效:response code是否等於200(ok,表示連結成功)。
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLValidation

public URLValidation()
Method Detail

getHyperlinkTagName

public java.lang.String getHyperlinkTagName()

getICONTagName

public java.lang.String getICONTagName()

getMultimediaTagName

public java.lang.String getMultimediaTagName()

linkValidate

public boolean linkValidate(java.lang.String strURL)
檢查連結是否有效:response code是否等於200(ok,表示連結成功)。


imageLinkValidate

public boolean imageLinkValidate(java.lang.String strURL)
檢查/DACatalog/AdminDesc/ICON,包括兩項: 1.檢查連結的response code是否等於200(ok,表示連結成功)。 2.檢查連結的content type,此標籤的填充內容為網頁圖片連結,一般常見的網頁影像content type有image/gif, image/jpeg, image/png。


isValidateHyperlinkTag

public boolean isValidateHyperlinkTag(int size)

isValidateHyperlink

public boolean isValidateHyperlink(java.lang.String url)

isValidateICONTag

public boolean isValidateICONTag(int size)

isValidateICON

public boolean isValidateICON(java.lang.String url)

isValidateMultimedia

public boolean isValidateMultimedia(java.lang.String url)

getLosingHyperlink

public java.util.ArrayList getLosingHyperlink()
取得失效的/DACatalog/AdminDesc/Hyperlink value


getLosingICON

public java.util.ArrayList getLosingICON()
取得失效的/DACatalog/AdminDesc/ICON value


getLosingMultimedia

public java.util.ArrayList getLosingMultimedia()
取得失效的/DACatalog/AdminDesc/Multimedia value


isHyperlinkContentExist

public boolean isHyperlinkContentExist(java.lang.String url)

isICONContentExist

public boolean isICONContentExist(java.lang.String url)

collectMsg

public java.util.HashMap collectMsg()