Skip to content

Commit

Permalink
Fix Saving fails for ontologies containing XMLLiteral #495
Browse files Browse the repository at this point in the history
  • Loading branch information
ignazio1977 committed Mar 5, 2016
1 parent d698a36 commit b25fa69
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 170 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* This file is part of the OWL API.
* The contents of this file are subject to the LGPL License, Version 3.0.
* Copyright 2014, The University of Manchester
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
*
* Alternatively, the contents of this file may be used under the terms of the Apache License, Version 2.0 in which case, the provisions of the Apache License Version 2.0 are applicable instead of those above.
* 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. */
package org.semanticweb.owlapi.api.test.anonymous;

import javax.annotation.Nonnull;

import org.semanticweb.owlapi.api.test.baseclasses.AbstractFileRoundTrippingTestCase;

/**
* @author Matthew Horridge, The University Of Manchester, Information
* Management Group
* @since 2.2.0
*/
public class XMLLiteralTestCase extends AbstractFileRoundTrippingTestCase {

@Nonnull
@Override
protected String getFileName() {
return "XMLLiteral.rdf";
}
}
18 changes: 18 additions & 0 deletions contract/src/test/resources/XMLLiteral.rdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<rdf:RDF xmlns="http://testonto#"
xml:base="http://testonto"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:ttania="http://ttania.owl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:ncicp="http://ncicb.nci.nih.gov/xml/owl/EVS/ComplexProperties.xsd#" >

<owl:Ontology rdf:about="http://testonto" />
<owl:AnnotationProperty rdf:about="http://ncicb.nci.nih.gov/xml/owl/EVS/ComplexProperties.xsd#annotProp" />
<owl:Class rdf:about="http://ttania.owl/OWLClass_ce266563_6ce0_4958_b061_a1d2a62b7e86">
<rdfs:label xml:lang="en">ClassA</rdfs:label>
<ncicp:annotProp rdf:parseType="Literal"><ncicp:ComplexTerm xmlns:ncicp="http://ncicb.nci.nih.gov/xml/owl/EVS/ComplexProperties.xsd#"><ncicp:term-name>Role_Has_Parent</ncicp:term-name><ncicp:term-group>PT</ncicp:term-group><ncicp:term-source>NCI</ncicp:term-source></ncicp:ComplexTerm></ncicp:annotProp>
</owl:Class>
</rdf:RDF>
Loading

0 comments on commit b25fa69

Please sign in to comment.