Giter VIP home page Giter VIP logo

ontmalizer's People

Contributors

bdevloed avatar galbiston avatar lewismc avatar msfyuksel avatar rahmivolkan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ontmalizer's Issues

Lowering RDF to XML

Hi,

I need to implement conversion from RDF message to XML according to a specific xml schema in order to be compliant with legacy system.
Are you working also on the implementation of lowering conversion process?
Let me know, please
Thanks so much for your contribution.

G

java.lang.InternalError: unresolved reference

When trying to map a specific xsd file I got an exception which I can not solve.
Exception in thread "main" java.lang.InternalError: unresolved reference at com.sun.xml.xsom.impl.parser.DelayedRef._get(DelayedRef.java:103) at com.sun.xml.xsom.impl.parser.DelayedRef$Element.get(DelayedRef.java:199) at com.sun.xml.xsom.impl.ElementDecl.getSubstAffiliation(ElementDecl.java:115) at com.sun.xml.xsom.impl.ElementDecl.updateSubstitutabilityMap(ElementDecl.java:179) at com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:141) at com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:214) at tr.com.srdc.ontmalizer.XSD2OWLMapper.parseXSD(XSD2OWLMapper.java:128) at tr.com.srdc.ontmalizer.XSD2OWLMapper.<init>(XSD2OWLMapper.java:96) at test.main(test.java:13)
the xsd file is quite big and includes some import. I can share it in case it is required.
Any help would be much appreciated.

using XSD with import statements

I have an XSD schema file that imports types from a different namespace. It seems like Ontmalizer ignores import statements: if I save the model as TTL, there's no mention of the elements with the imported types, and when I try to load a document, it fails.

Are imports supposed to work, or is this a known limitation?

non-deterministic behavior in ontmalizer

Build from latest in github and testing with a simple schema and conforming XML instance and using example code from the blog post (Ontmalizer...).

I am able to map the schema and then when trying to map instance document, non-deterministically, sometimes a reasonable n3 file is generated and sometimes XML2OWLMapper throws an exception when traversing one of the attributes in the first child element of the instance document.

Repeated trials with the same XMLSchema and sample instance documents sometimes fail and sometimes not, and when there is an exception it is not always at the same attribute - I put Logger calls in XML2OWLMapper on calls to traverseChildren and in traverseAttributes. Here is the exception that is thrown (the stacktrace is below):

Exception in thread "main" org.apache.jena.ontology.ConversionException: Cannot convert node http://www.srdc.com.tr/ontmalizer#hasValue to OntProperty

The exception, when it occurs, does not occur on the same attribute but always on some attribute of the first child element of the instance document.

The java test, a sample run, schema and instance file are attached as ontmalizer-nd-issue.zip

Bump up version number and release to Maven Central

Hi Mustafa,

So I have an outstanding pull request - it's nothing major, just a minor addition to allow loading XSDs from resources on the classpath (e.g. XSD files bundled as resources in JARs on the classpath).

But if you merge that pull request, would you consider bumping the version number of Ontmalizer and also releasing to Maven Central from now on? That would make it super-easy for us here to pick up the latest pull-request changes, while also making further updates much easier to consume (i.e. we'd just need to bump the dependency version in our project POMs (which of course point to Maven Central), and everything else would 'just work').

Cheers,

Pat.

enumeration documentation is not parsed and included in OWL output

My source XML Schema has enumerations, which are correctly parsed by Ontmalizer. However, within each of my enumerations is documentation. It looks like this:

<xs:simpleType name="issuesYears">
	<xs:restriction base="xs:unsignedInt">
		<xs:enumeration value="1">
			<xs:annotation>
				<xs:documentation xml:lang="en">Less than one year</xs:documentation>
			</xs:annotation>
		</xs:enumeration>
		<xs:enumeration value="2">
			<xs:annotation>
				<xs:documentation xml:lang="en">1 to 2 years</xs:documentation>
			</xs:annotation>
		</xs:enumeration>	
                    <xs:enumeration value="3">
			<xs:annotation>
				<xs:documentation xml:lang="en">3 to 5 or more years</xs:documentation>
			</xs:annotation>
		</xs:enumeration>	

And the resulting OWL is:

http://www.hudhdx.info/Resources/Vendors/FY2022/HUD_HMIS.xsd#issuesYears_Enumeration

:issuesYears_Enumeration rdf:type owl:NamedIndividual ,
dtype:Enumeration ;
dtype:hasValue :issuesYears_1 ,
:issuesYears_2 ,
:issuesYears_3 .

It would be great if Ontmalizer picked up these changes, and added the documentation to describe the enumeration values.

Usage Question

How do I use this tool from the command line or is a plugin for a framework? Protege, Eclipse?

This is on 64bit Ubuntu 14.04 LTS.

It appears to have built okay.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:15.255s
[INFO] Finished at: Fri Aug 22 14:44:31 BRT 2014
[INFO] Final Memory: 18M/98M
[INFO] ------------------------------------------------------------------------

Making it executable and then running:
$ ./ontmalizer-1.0.0.jar mlhim244.xsd

where mlhim244.xsd is the schema to translate, yields this output:

./ontmalizer-1.0.0.jar: line 1: $'PK\003\004': command not found
./ontmalizer-1.0.0.jar: line 2: $'\217u\026E': command not found
./ontmalizer-1.0.0.jar: line 3: $'\023\313R\363x\271\234J3sJ\300\342%\231\271\020n\212\256WJ6\310ls=\203x3S^.^.PK\003\004': command not found
K-_��ϳR0�3��r,J��,K-��V��+����R�KRSt�_���ETA-INF/MANIFEST.MF�M��LK-.
��3R�: No such file or directory
./ontmalizer-1.0.0.jar: line 4: {u�E�tr/PK��: No such file or directory
./ontmalizer-1.0.0.jar: line 5: {u�Etr/com/PK��: No such file or directory
./ontmalizer-1.0.0.jar: line 6: {u�E
tr/com/srdc/PK��: No such file or directory
./ontmalizer-1.0.0.jar: line 7: {u�E�tr/com/srdc/ontmalizer/PK��: No such file or directory
./ontmalizer-1.0.0.jar: line 8: {u�E�tr/com/srdc/ontmalizer/data/PK��: No such file or directory
./ontmalizer-1.0.0.jar: line 9: {u�E�tr/com/srdc/ontmalizer/helper/PK��: No such file or directory
./ontmalizer-1.0.0.jar: line 10: syntax error near unexpected token `$'\241\005Z''
./ontmalizer-1.0.0.jar: line 10: {u�E�aZ�����/tr/com/srdc/ontmalizer/data/TypedResource.class��MO�@���͇��(�Z>E�P�.E�"�!5����#�F�R S�TT�?'

Thoughts? Help?

Thanks.

Please Help. XML to OWL

Hi,
A question, I want to transform an xml file to owl, but when for example I put these lines of code:
XSD2OWLMapper mapping = new XSD2OWLMapper(new File("C:/Users/usuario/Desktop/report1.xsd"));
mapping.setObjectPropPrefix("");
mapping.setDataTypePropPrefix("");
mapping.convertXSD2OWL();

// This part converts XML instance to RDF data model.
XML2OWLMapper generator = new XML2OWLMapper(
    new File("C:/Users/usuario/Desktop/report.xml"), mapping);
generator.convertXML2OWL();

// This part prints the RDF data model to the specified file.
try{
    File f = new File("C:/Users/usuario/Desktop/report1.n3");
    f.getParentFile().mkdirs();
    FileOutputStream fout = new FileOutputStream(f);
    generator.writeModel(fout, "N3");
    fout.close();

} catch (Exception e){
    e.printStackTrace();
}
    
  I have this error:

3050 [main] WARN org.apache.jena.rdf.model.impl.RDFDefaultErrorHandler - unknown-source: {W136} Relative URIs are not permitted in RDF: specifically <ont-policy.rdf>
These are the files I'm using

files.zip

I do not know why, please help. I will be grateful if you give me some hints.

Transforming XML/XSD to OWL

Hi, I'm trying to convert a schema using your tool, but i meet some issues and I can't clarify them. As an input I use the official PLCopen (Industry description language - http://www.plcopen.org/pages/tc6_xml/) XSD file and when I check the ontology output it is not consistent and i get some Anonymous classes. I'm attaching both files (input and output) for reference. When I load the ontology in Protege I get also many errors(screenshot attached). I will be grateful if you give me some hints.
files.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.