comparison flys-client/src/main/java/de/intevation/flys/client/server/CollectionHelper.java @ 4663:fac54537db5b

Fix logging statments and use correct class name
author Björn Ricks <bjoern.ricks@intevation.de>
date Tue, 11 Dec 2012 16:26:50 +0100
parents 953480be5543
children
comparison
equal deleted inserted replaced
4662:9220ab02f34f 4663:fac54537db5b
391 * operation. 391 * operation.
392 * 392 *
393 * @return a Collection with CollectionItems. 393 * @return a Collection with CollectionItems.
394 */ 394 */
395 public static Collection parseCollection(Document description) { 395 public static Collection parseCollection(Document description) {
396 logger.debug("AddArtifactServiceImpl.parseCollection"); 396 logger.debug("CollectionHelper.parseCollection");
397 397
398 if (description == null) { 398 if (description == null) {
399 logger.warn("The DESCRIBE of the Collection is null!"); 399 logger.warn("The DESCRIBE of the Collection is null!");
400 return null; 400 return null;
401 } 401 }
485 * (artifact) uuid. 485 * (artifact) uuid.
486 */ 486 */
487 protected static Map<String, ThemeList> parseThemeLists( 487 protected static Map<String, ThemeList> parseThemeLists(
488 Document desc, Map<String, CollectionItem> collectionItems 488 Document desc, Map<String, CollectionItem> collectionItems
489 ) { 489 ) {
490 logger.debug("DescribeCollectionServiceImpl.parseThemeLists"); 490 logger.debug("CollectionHelper.parseThemeLists");
491 491
492 NodeList lists = (NodeList) XMLUtils.xpath( 492 NodeList lists = (NodeList) XMLUtils.xpath(
493 desc, 493 desc,
494 "/art:artifact-collection/art:attribute/art:outputs/art:output", 494 "/art:artifact-collection/art:attribute/art:outputs/art:output",
495 XPathConstants.NODESET, 495 XPathConstants.NODESET,
524 * (artifact) uuid. 524 * (artifact) uuid.
525 */ 525 */
526 protected static ThemeList parseThemeList( 526 protected static ThemeList parseThemeList(
527 Element node, Map<String, CollectionItem> collectionItems 527 Element node, Map<String, CollectionItem> collectionItems
528 ) { 528 ) {
529 logger.debug("DescribeCollectionServiceImpl.parseThemeList"); 529 logger.debug("CollectionHelper.parseThemeList");
530 530
531 NodeList themes = node.getElementsByTagNameNS( 531 NodeList themes = node.getElementsByTagNameNS(
532 ArtifactNamespaceContext.NAMESPACE_URI, 532 ArtifactNamespaceContext.NAMESPACE_URI,
533 "facet"); 533 "facet");
534 534
548 return new ThemeList(themeList); 548 return new ThemeList(themeList);
549 } 549 }
550 550
551 551
552 protected static Theme parseTheme(Element ele) { 552 protected static Theme parseTheme(Element ele) {
553 logger.debug("DescribeCollectionServiceImpl.parseTheme"); 553 logger.debug("CollectionHelper.parseTheme");
554 554
555 String uri = ArtifactNamespaceContext.NAMESPACE_URI; 555 String uri = ArtifactNamespaceContext.NAMESPACE_URI;
556 556
557 NamedNodeMap attrMap = ele.getAttributes(); 557 NamedNodeMap attrMap = ele.getAttributes();
558 int attrNum = attrMap != null ? attrMap.getLength() : 0; 558 int attrNum = attrMap != null ? attrMap.getLength() : 0;
772 * @param node The root node of the outputmodes list. 772 * @param node The root node of the outputmodes list.
773 * 773 *
774 * @return a list of OutputModes. 774 * @return a list of OutputModes.
775 */ 775 */
776 protected static List<OutputMode> parseOutputModes(Element node) { 776 protected static List<OutputMode> parseOutputModes(Element node) {
777 logger.debug("AddArtifactServiceImpl.parseOutputModes"); 777 logger.debug("CollectionHelper.parseOutputModes");
778 778
779 if (node == null) { 779 if (node == null) {
780 logger.debug("The node for parsing OutputModes is null!"); 780 logger.debug("The node for parsing OutputModes is null!");
781 return null; 781 return null;
782 } 782 }
839 839
840 /** 840 /**
841 * Create a Key/Value map for data nodes of artifact/collectionitem. 841 * Create a Key/Value map for data nodes of artifact/collectionitem.
842 */ 842 */
843 protected static HashMap<String, String> parseDataItems(Element node) { 843 protected static HashMap<String, String> parseDataItems(Element node) {
844 logger.debug("AddArtifactServiceImpl.parseDataItems"); 844 logger.debug("CollectionHelper.parseDataItems");
845 845
846 if (node == null) { 846 if (node == null) {
847 logger.debug("The node for parsing DataItems is null!"); 847 logger.debug("The node for parsing DataItems is null!");
848 return null; 848 return null;
849 } 849 }
914 914
915 return data; 915 return data;
916 } 916 }
917 917
918 protected static List<Facet> extractFacets(Element outmode) { 918 protected static List<Facet> extractFacets(Element outmode) {
919 logger.debug("DescribeCollectionServiceImpl - extractFacets()"); 919 logger.debug("CollectionHelper - extractFacets()");
920 920
921 NodeList facetList = (NodeList) XMLUtils.xpath( 921 NodeList facetList = (NodeList) XMLUtils.xpath(
922 outmode, 922 outmode,
923 XPATH_FACETS, 923 XPATH_FACETS,
924 XPathConstants.NODESET, 924 XPathConstants.NODESET,
945 return facets; 945 return facets;
946 } 946 }
947 947
948 948
949 public static List<Recommendation> parseRecommendations(Document doc) { 949 public static List<Recommendation> parseRecommendations(Document doc) {
950 logger.debug("DescribeCollectionServiceImpl.parseRecommendations"); 950 logger.debug("CollectionHelper.parseRecommendations");
951 951
952 NodeList list = (NodeList) XMLUtils.xpath( 952 NodeList list = (NodeList) XMLUtils.xpath(
953 doc, 953 doc,
954 XPATH_LOADED_RECOMMENDATIONS, 954 XPATH_LOADED_RECOMMENDATIONS,
955 XPathConstants.NODESET, 955 XPathConstants.NODESET,
986 Artifact artifact, 986 Artifact artifact,
987 String url, 987 String url,
988 String locale) 988 String locale)
989 throws ServerException 989 throws ServerException
990 { 990 {
991 logger.debug("Collection.addArtifact"); 991 logger.debug("CollectionHelper.addArtifact");
992 992
993 if (collection == null) { 993 if (collection == null) {
994 logger.warn("The given Collection is null!"); 994 logger.warn("The given Collection is null!");
995 return null; 995 return null;
996 } 996 }
1038 String artifactId, 1038 String artifactId,
1039 String url, 1039 String url,
1040 String locale) 1040 String locale)
1041 throws ServerException 1041 throws ServerException
1042 { 1042 {
1043 logger.debug("Collection.removeArtifact"); 1043 logger.debug("CollectionHelper.removeArtifact");
1044 1044
1045 if (collection == null) { 1045 if (collection == null) {
1046 logger.warn("The given Collection is null!"); 1046 logger.warn("The given Collection is null!");
1047 return null; 1047 return null;
1048 } 1048 }

http://dive4elements.wald.intevation.org