Package org.purl.sword.base

Examples of org.purl.sword.base.XmlName


           }
           else
           {
             log.error("Unable to parse extract type in " + getQualifiedName() );
                       SwordValidationInfo info = new SwordValidationInfo(xmlName,
                                  new XmlName(attribute),
                                  "Invalid content type has been specified",
                                  SwordValidationInfoType.ERROR);
                       info.setContentDescription(value);
                       attributeItems.add(info);
                       success = false;
           }

                   if( success )
                   {
                       SwordValidationInfo info = new SwordValidationInfo(xmlName, new XmlName(attribute));
                       info.setContentDescription(type.toString());
                       attributeItems.add(info);
                   }
         }
               else
               {
                   SwordValidationInfo info = new SwordValidationInfo(xmlName,
                              new XmlName(attribute),
                              SwordValidationInfo.UNKNOWN_ATTRIBUTE,
                              SwordValidationInfoType.INFO);
                   info.setContentDescription(attribute.getValue());
                   attributeItems.add(info);
               }
View Full Code Here


      }

      if( validateAll )
      {
          SwordValidationInfo info = new SwordValidationInfo(xmlName,
                  new XmlName(xmlName.getPrefix(), ATTRIBUTE_TYPE, xmlName.getNamespace()));
          info.setContentDescription(type.toString());
          result.addAttributeValidationInfo(info);

      }
View Full Code Here

               generator = new Generator();
               generator.unmarshall(element);
            }
            else
            {
               SwordValidationInfo info = new SwordValidationInfo(new XmlName(element),
                       SwordValidationInfo.UNKNOWN_ELEMENT,
                       SwordValidationInfoType.INFO);
               info.setContentDescription(element.getValue());
               validationItems.add(info);
            }
View Full Code Here

               }
            }
            else
            {
               SwordValidationInfo info = new SwordValidationInfo(xmlName,
                       new XmlName(attribute),
                       SwordValidationInfo.UNKNOWN_ATTRIBUTE,
                       SwordValidationInfoType.INFO );
                info.setContentDescription(attribute.getValue());
                attributes.add(info);
            }
View Full Code Here

   {
       SwordValidationInfo info = new SwordValidationInfo(xmlName);

       if( source == null )
       {
           XmlName attributeName = new XmlName(xmlName.getPrefix(),
                       ATTRIBUTE_SRC,
                       xmlName.getNamespace());

          SwordValidationInfo item = new SwordValidationInfo(xmlName, attributeName,
                  SwordValidationInfo.MISSING_ATTRIBUTE_WARNING,
View Full Code Here

                   attributeItems.add(createValidAttributeInfo(ATTRIBUTE_LENGTH, length));
               }
            }
            else
            {
               XmlName attributeName = new XmlName(attribute);

               SwordValidationInfo unknown = new SwordValidationInfo(xmlName,
                       attributeName,
                       SwordValidationInfo.UNKNOWN_ATTRIBUTE,
                       SwordValidationInfoType.INFO);
View Full Code Here

       SwordValidationInfo result = new SwordValidationInfo(xmlName);

       if( href == null )
       {
          XmlName attributeName = new XmlName(xmlName.getPrefix(),
                       ATTRIBUTE_HREF,
                       xmlName.getNamespace());

          SwordValidationInfo item = new SwordValidationInfo(xmlName, attributeName,
                  SwordValidationInfo.MISSING_ATTRIBUTE_WARNING,
View Full Code Here

            email = new Email();
            validationItems.add(email.unmarshall(element, validationProperties));
         }
         else if( validationProperties != null )
         {
            SwordValidationInfo info = new SwordValidationInfo(new XmlName(element),
                    SwordValidationInfo.UNKNOWN_ELEMENT,
                    SwordValidationInfoType.INFO);
            info.setContentDescription(element.getValue());
            validationItems.add(info);
         }
View Full Code Here

                  result.addUnmarshallElementInfo(info);
               }
            }
            else if( validationProperties != null )
            {
                XmlName name = new XmlName(element);
                if( ! isElementChecked(name) )
                {
                   SwordValidationInfo info = new SwordValidationInfo(name,
                          SwordValidationInfo.UNKNOWN_ELEMENT,
                          SwordValidationInfoType.INFO);
View Full Code Here

            attribute = generator.getAttribute(i);
            if( ATTRIBUTE_URI.equals(attribute.getQualifiedName()))
            {
               uri = attribute.getValue();

               XmlName uriName = new XmlName(Namespaces.PREFIX_ATOM, ATTRIBUTE_URI, Namespaces.NS_ATOM);
               SwordValidationInfo info = new SwordValidationInfo(xmlName, uriName);
               info.setContentDescription(uri);
               attributeValidationItems.add(info);

            }
            else if( ATTRIBUTE_VERSION.equals(attribute.getQualifiedName()))
            {
               version = attribute.getValue();
               XmlName versionName = new XmlName(Namespaces.PREFIX_ATOM, ATTRIBUTE_VERSION, Namespaces.NS_ATOM);
               SwordValidationInfo info = new SwordValidationInfo(xmlName, versionName);
               info.setContentDescription(version);
               attributeValidationItems.add(info);
            }
            else
            {
               XmlName attributeName = new XmlName(attribute.getNamespacePrefix(),
                       attribute.getLocalName(),
                       attribute.getNamespaceURI());

               SwordValidationInfo info = new SwordValidationInfo(xmlName, attributeName,
                       SwordValidationInfo.UNKNOWN_ATTRIBUTE,
View Full Code Here

TOP

Related Classes of org.purl.sword.base.XmlName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.