package org.sakaiproject.lessonbuildertool.cc;

/***********
 * This code is based on a reference implementation done for the IMS Consortium.
 * The copyright notice for that implementation is included below. 
 * All modifications are covered by the following copyright notice.
 *
 * Copyright (c) 2011 Rutgers, the State University of New Jersey
 *
 * Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.
 */

/**********************************************************************************
 * $URL: http://ims-dev.googlecode.com/svn/trunk/cc/IMS_CCParser_v1p0/src/main/java/org/imsglobal/cc/DiscussionParser.java $
 * $Id: DiscussionParser.java 227 2011-01-08 18:26:55Z drchuck $
 **********************************************************************************
 *
 * Copyright (c) 2010 IMS GLobal Learning Consortium
 *
 * 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. 
 *
 **********************************************************************************/

import java.io.IOException;
import java.util.Iterator;

import org.jdom.Attribute;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.Namespace;
import org.jdom.xpath.XPath;

public class BLTIParser extends AbstractParser implements ContentParser {
  
  private static final Namespace DT_NS = Namespace.getNamespace("dt", "http://www.imsglobal.org/xsd/imsdt_v1p0");
  
  private static final String ATTACHMENT_QUERY = "attachments/attachment";
  
  private static final String FILE="file";
  private static final String HREF="href";
  private static final String TEXT="text";
  private static final String TITLE="title";
  private static final String TEXTTYPE="texttype";
  
  public void 
  parseContent(DefaultHandler the_handler,
               CartridgeLoader the_cartridge, 
               Element the_resource,
               boolean isProtected) throws ParseException {
      // The sakai implementation actually doesnt use this.
      // processing is done in PrintHandler
  }
}
package org.sakaiproject.lessonbuildertool.cc;

/***********
 * This code is based on a reference implementation done for the IMS Consortium.
 * The copyright notice for that implementation is included below. 
 * All modifications are covered by the following copyright notice.
 *
 * Copyright (c) 2011 Rutgers, the State University of New Jersey
 *
 * Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.
 */

/**********************************************************************************
 * $URL: http://ims-dev.googlecode.com/svn/trunk/cc/IMS_CCParser_v1p0/src/main/java/org/imsglobal/cc/DiscussionParser.java $
 * $Id: DiscussionParser.java 227 2011-01-08 18:26:55Z drchuck $
 **********************************************************************************
 *
 * Copyright (c) 2010 IMS GLobal Learning Consortium
 *
 * 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. 
 *
 **********************************************************************************/

import java.io.IOException;
import java.util.Iterator;

import org.jdom.Attribute;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.Namespace;
import org.jdom.xpath.XPath;

public class BLTIParser extends AbstractParser implements ContentParser {
  
  private static final Namespace DT_NS = Namespace.getNamespace("dt", "http://www.imsglobal.org/xsd/imsdt_v1p0");
  
  private static final String ATTACHMENT_QUERY = "attachments/attachment";
  
  private static final String FILE="file";
  private static final String HREF="href";
  private static final String TEXT="text";
  private static final String TITLE="title";
  private static final String TEXTTYPE="texttype";
  
  public void 
  parseContent(DefaultHandler the_handler,
               CartridgeLoader the_cartridge, 
               Element the_resource,
               boolean isProtected) throws ParseException {
      // The sakai implementation actually doesnt use this.
      // processing is done in PrintHandler
  }
}

@@ -3049,3056 +3049,4 @@
 %7D%0A%7D%0A
-package org.sakaiproject.lessonbuildertool.cc;%0A%0A/***********%0A * This code is based on a reference implementation done for the IMS Consortium.%0A * The copyright notice for that implementation is included below. %0A * All modifications are covered by the following copyright notice.%0A *%0A * Copyright (c) 2011 Rutgers, the State University of New Jersey%0A *%0A * Licensed under the Educational Community License, Version 2.0 (the %22License%22);                                                                %0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *       http://www.osedu.org/licenses/ECL-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0A/**********************************************************************************%0A * $URL: http://ims-dev.googlecode.com/svn/trunk/cc/IMS_CCParser_v1p0/src/main/java/org/imsglobal/cc/DiscussionParser.java $%0A * $Id: DiscussionParser.java 227 2011-01-08 18:26:55Z drchuck $%0A **********************************************************************************%0A *%0A * Copyright (c) 2010 IMS GLobal Learning Consortium%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or%0A * implied. See the License for the specific language governing%0A * permissions and limitations under the License. %0A *%0A **********************************************************************************/%0A%0Aimport java.io.IOException;%0Aimport java.util.Iterator;%0A%0Aimport org.jdom.Attribute;%0Aimport org.jdom.Element;%0Aimport org.jdom.JDOMException;%0Aimport org.jdom.Namespace;%0Aimport org.jdom.xpath.XPath;%0A%0Apublic class BLTIParser extends AbstractParser implements ContentParser %7B%0A  %0A  private static final Namespace DT_NS = Namespace.getNamespace(%22dt%22, %22http://www.imsglobal.org/xsd/imsdt_v1p0%22);%0A  %0A  private static final String ATTACHMENT_QUERY = %22attachments/attachment%22;%0A  %0A  private static final String FILE=%22file%22;%0A  private static final String HREF=%22href%22;%0A  private static final String TEXT=%22text%22;%0A  private static final String TITLE=%22title%22;%0A  private static final String TEXTTYPE=%22texttype%22;%0A  %0A  public void %0A  parseContent(DefaultHandler the_handler,%0A               CartridgeLoader the_cartridge, %0A               Element the_resource,%0A               boolean isProtected) throws ParseException %7B%0A      // The sakai implementation actually doesnt use this.%0A      // processing is done in PrintHandler%0A  %7D%0A%7D%0A

fix patch problem that duplicated lines